/* ===== ROOT & RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #050b18;
  --bg2: #0a1628;
  --card: #0f1f3d;
  --border: rgba(100,180,255,0.12);
  --cyan: #00d4ff;
  --purple: #7c3aed;
  --pink: #ec4899;
  --grad: linear-gradient(135deg, #00d4ff, #7c3aed);
  --grad2: linear-gradient(135deg, #7c3aed, #ec4899);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --font: 'Inter', sans-serif;
  --code: 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); overflow-x: hidden; cursor: none; }

/* ===== CANVAS BG ===== */
#bg-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ===== CURSOR ===== */
.cursor { width: 10px; height: 10px; background: var(--cyan); border-radius: 50%; position: fixed; pointer-events: none; z-index: 9999; transform: translate(-50%,-50%); transition: transform 0.1s; mix-blend-mode: difference; }
.cursor-follower { width: 36px; height: 36px; border: 2px solid rgba(0,212,255,0.4); border-radius: 50%; position: fixed; pointer-events: none; z-index: 9998; transform: translate(-50%,-50%); transition: all 0.15s ease; }

/* ===== NAVBAR ===== */
#navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 1rem 4rem; display: flex; align-items: center; justify-content: space-between; transition: all 0.3s; }
#navbar.scrolled { background: rgba(5,11,24,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 0.75rem 4rem; }
.nav-logo { font-size: 1.5rem; font-weight: 900; color: var(--cyan); letter-spacing: -1px; }
.logo-bracket { color: var(--purple); }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; position: relative; transition: color 0.3s; }
.nav-link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--grad); transition: width 0.3s; border-radius: 2px; }
.nav-link:hover, .nav-link.active { color: var(--cyan); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta { padding: 0.5rem 1.5rem; background: var(--grad); border-radius: 50px; color: #fff; font-weight: 600; font-size: 0.875rem; text-decoration: none; transition: opacity 0.3s, transform 0.3s; }
.nav-cta:hover { opacity: 0.85; transform: scale(1.05); }
.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--cyan); transition: all 0.3s; border-radius: 2px; }

/* Mobile Menu */
.mobile-menu { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: var(--bg2); border-left: 1px solid var(--border); z-index: 999; display: flex; align-items: center; justify-content: center; transition: right 0.4s cubic-bezier(0.4,0,0.2,1); }
.mobile-menu.open { right: 0; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 2rem; text-align: center; }
.mob-link { color: var(--text); text-decoration: none; font-size: 1.25rem; font-weight: 600; transition: color 0.3s; }
.mob-link:hover { color: var(--cyan); }

/* ===== SECTION COMMONS ===== */
.section { position: relative; z-index: 1; padding: 6rem 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag { font-size: 0.8rem; font-weight: 700; color: var(--cyan); text-transform: uppercase; letter-spacing: 4px; display: block; margin-bottom: 0.75rem; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.1; }
.section-subtitle { color: var(--muted); margin-top: 1rem; font-size: 1rem; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Buttons */
.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 2rem; background: var(--grad); border-radius: 50px; color: #fff; font-weight: 700; text-decoration: none; font-size: 0.95rem; border: none; cursor: pointer; transition: all 0.3s; box-shadow: 0 0 30px rgba(0,212,255,0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(0,212,255,0.4); }
.btn-outline { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 2rem; border: 2px solid var(--cyan); border-radius: 50px; color: var(--cyan); font-weight: 700; text-decoration: none; font-size: 0.95rem; background: transparent; cursor: pointer; transition: all 0.3s; }
.btn-outline:hover { background: rgba(0,212,255,0.1); transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; }

/* ===== HERO ===== */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: space-between; padding: 6rem 4rem 4rem; gap: 4rem; position: relative; z-index: 1; }
.hero-content { flex: 1; max-width: 600px; animation: fadeInLeft 1s ease both; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.3); border-radius: 50px; padding: 0.4rem 1rem; font-size: 0.82rem; color: var(--cyan); margin-bottom: 1.5rem; }
.badge-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 8px #22c55e; animation: pulse 2s infinite; }
.hero-title { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.1; margin-bottom: 1rem; }
.typewriter-wrap { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; color: var(--muted); margin-bottom: 1.5rem; min-height: 2rem; font-family: var(--code); }
.typewriter { color: var(--cyan); border-right: 2px solid var(--cyan); animation: blink 0.75s infinite; }
.hero-desc { color: var(--muted); line-height: 1.8; font-size: 1rem; margin-bottom: 2rem; }
.hero-desc strong { color: var(--text); }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 2rem; font-weight: 900; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; }
.stat-item > span:nth-child(2) { font-size: 1.5rem; font-weight: 900; color: var(--cyan); }
.stat-label { font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 2px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Hero Visual */
.hero-visual { flex: 1; max-width: 500px; position: relative; animation: fadeInRight 1s ease 0.2s both; }
.code-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,0.5), 0 0 80px rgba(0,212,255,0.05); }
.code-header { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28ca41; }
.code-filename { font-family: var(--code); font-size: 0.75rem; color: var(--muted); margin-left: auto; }
.code-body { padding: 1.5rem; font-family: var(--code); font-size: 0.875rem; line-height: 1.8; overflow-x: auto; }
.c-keyword { color: #c792ea; }
.c-var { color: #82aaff; }
.c-prop { color: #7fdbca; }
.c-str { color: #c3e88d; }
.c-num { color: #f78c6c; }

/* Floating Badges */
.floating-badge { position: absolute; background: var(--card); border: 1px solid var(--border); border-radius: 50px; padding: 0.4rem 0.9rem; font-size: 0.8rem; font-weight: 600; color: var(--text); backdrop-filter: blur(10px); white-space: nowrap; }
.badge-1 { top: -20px; right: -20px; animation: float1 4s ease-in-out infinite; }
.badge-2 { bottom: 60px; right: -30px; animation: float2 5s ease-in-out infinite; }
.badge-3 { bottom: -20px; left: 20px; animation: float1 4.5s ease-in-out infinite 0.5s; }
.badge-4 { top: 80px; left: -30px; animation: float2 3.5s ease-in-out infinite 1s; }

/* ===== ABOUT ===== */
.about { background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 50%, var(--bg) 100%); }
.about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 5rem; align-items: center; }
.about-visual { display: flex; justify-content: center; position: relative; }
.avatar-ring { position: relative; width: 250px; height: 250px; display: flex; align-items: center; justify-content: center; }
.avatar-inner { width: 160px; height: 160px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 900; color: #fff; z-index: 2; box-shadow: 0 0 60px rgba(0,212,255,0.3); }
.ring { position: absolute; border-radius: 50%; border: 1px solid; }
.ring-1 { width: 190px; height: 190px; border-color: rgba(0,212,255,0.3); animation: spin 12s linear infinite; }
.ring-2 { width: 220px; height: 220px; border-color: rgba(124,58,237,0.2); animation: spin 18s linear infinite reverse; }
.ring-3 { width: 250px; height: 250px; border-color: rgba(236,72,153,0.15); animation: spin 25s linear infinite; }
.experience-badge { position: absolute; bottom: 0; right: 0; background: var(--grad); border-radius: 16px; padding: 1rem 1.25rem; text-align: center; }
.exp-num { display: block; font-size: 2rem; font-weight: 900; color: #fff; line-height: 1; }
.exp-text { font-size: 0.72rem; color: rgba(255,255,255,0.8); font-weight: 500; }
.about-text { color: var(--muted); line-height: 1.9; margin-bottom: 1rem; }
.about-text strong { color: var(--text); }
.about-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.highlight-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.highlight-icon { font-size: 1.5rem; flex-shrink: 0; }
.highlight-item strong { color: var(--text); font-size: 0.9rem; display: block; margin-bottom: 0.2rem; }
.highlight-item p { color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

/* ===== SKILLS ===== */
.skills { }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1.5rem; margin-bottom: 4rem; }
.skill-category { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; transition: border-color 0.3s, transform 0.3s; }
.skill-category:hover { border-color: rgba(0,212,255,0.3); transform: translateY(-4px); }
.skill-cat-title { font-size: 0.85rem; font-weight: 700; color: var(--cyan); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 50px; padding: 0.3rem 0.8rem; font-size: 0.78rem; color: var(--muted); transition: all 0.2s; }
.skill-tag:hover { background: rgba(0,212,255,0.1); border-color: var(--cyan); color: var(--cyan); }

/* Proficiency Bars */
.proficiency-bars { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem; }
.prof-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 2rem; color: var(--text); }
.bar-item { margin-bottom: 1.5rem; }
.bar-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.bar-track { height: 6px; background: rgba(255,255,255,0.06); border-radius: 50px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--grad); border-radius: 50px; width: 0; transition: width 1.5s cubic-bezier(0.4,0,0.2,1); }

/* ===== PROJECTS ===== */
.projects { background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 50%, var(--bg) 100%); }
.filter-tabs { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.filter-btn { padding: 0.5rem 1.25rem; background: transparent; border: 1px solid var(--border); border-radius: 50px; color: var(--muted); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.3s; }
.filter-btn:hover, .filter-btn.active { background: var(--grad); border-color: transparent; color: #fff; font-weight: 700; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1.5rem; }
.project-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; transition: all 0.4s cubic-bezier(0.4,0,0.2,1); }
.project-card:hover { transform: translateY(-8px); border-color: rgba(0,212,255,0.3); box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(0,212,255,0.1); }
.project-card.hidden { display: none; }
.project-img { height: 160px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.wp-theme  { background: linear-gradient(135deg,#1a237e,#283593); }
.ec-theme  { background: linear-gradient(135deg,#4a0072,#7b1fa2); }
.ai-theme  { background: linear-gradient(135deg,#004d40,#00695c); }
.code-theme{ background: linear-gradient(135deg,#b71c1c,#c62828); }
.shopify-theme{ background: linear-gradient(135deg,#e65100,#f57c00); }
.ai2-theme { background: linear-gradient(135deg,#1a237e,#0288d1); }
.wp2-theme { background: linear-gradient(135deg,#33691e,#558b2f); }
.code2-theme{ background: linear-gradient(135deg,#4a148c,#6a1b9a); }
.project-icon { font-size: 4rem; filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5)); }
.project-info { padding: 1.5rem; }
.project-tag { font-size: 0.72rem; font-weight: 700; color: var(--cyan); text-transform: uppercase; letter-spacing: 2px; }
.project-info h3 { font-size: 1.05rem; font-weight: 700; margin: 0.4rem 0 0.6rem; color: var(--text); }
.project-info p { color: var(--muted); font-size: 0.85rem; line-height: 1.6; margin-bottom: 1rem; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tech span { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 4px; padding: 0.2rem 0.5rem; font-size: 0.7rem; color: var(--muted); font-family: var(--code); }
/* Project image overlay for when imageURL is used */
.project-img-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.55)); }
.project-icon { position: relative; z-index: 1; }
/* Project link button */
.project-link { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.75rem; font-size: 0.82rem; font-weight: 700; color: var(--cyan); text-decoration: none; border: 1px solid rgba(0,212,255,0.35); border-radius: 50px; padding: 0.35rem 0.9rem; transition: all 0.25s; }
.project-link:hover { background: rgba(0,212,255,0.12); border-color: var(--cyan); gap: 0.6rem; }
/* Card entrance animation */
.project-card { opacity: 0; transform: translateY(24px); transition: opacity 0.45s ease, transform 0.45s ease, border-color 0.3s, box-shadow 0.3s; }
.project-card.card-visible { opacity: 1; transform: translateY(0); }
/* Loading state */
.projects-loading { grid-column: 1/-1; display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 3rem; color: var(--muted); font-size: 0.9rem; }
.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.8s linear infinite; }


/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: start; }
.contact-info { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; text-align: center; transition: all 0.3s; }
.contact-card:hover { border-color: rgba(0,212,255,0.3); transform: translateY(-4px); }
.contact-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.contact-card h4 { font-size: 0.85rem; font-weight: 700; color: var(--cyan); margin-bottom: 0.3rem; }
.contact-card p { font-size: 0.78rem; color: var(--muted); word-break: break-all; }
.contact-form { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 0.4rem; }
.form-group input, .form-group textarea { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1rem; color: var(--text); font-size: 0.9rem; font-family: var(--font); outline: none; transition: border-color 0.3s, box-shadow 0.3s; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,212,255,0.1); }
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(148,163,184,0.4); }
.form-success { display: none; text-align: center; padding: 1rem; color: #22c55e; font-weight: 600; margin-top: 1rem; }

/* ===== FOOTER ===== */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 2.5rem; text-align: center; }
.footer-logo { font-size: 1.75rem; font-weight: 900; color: var(--cyan); margin-bottom: 0.75rem; }
.footer-text { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.3rem; }
.footer-copy { color: rgba(148,163,184,0.4); font-size: 0.78rem; }

/* Scroll to Top */
.scroll-top { position: fixed; bottom: 2rem; right: 2rem; width: 48px; height: 48px; background: var(--grad); border: none; border-radius: 50%; color: #fff; font-size: 1.2rem; cursor: pointer; z-index: 999; opacity: 0; transform: translateY(20px); transition: all 0.3s; box-shadow: 0 4px 20px rgba(0,212,255,0.3); }
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,212,255,0.5); }

/* ===== KEYFRAMES ===== */
@keyframes fadeInLeft  { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes blink { 0%,100% { border-color: var(--cyan); } 50% { border-color: transparent; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 8px #22c55e; } 50% { box-shadow: 0 0 16px #22c55e; } }
@keyframes float1 { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
@keyframes float2 { 0%,100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(-16px) rotate(-2deg); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero { flex-direction: column; padding: 7rem 2rem 4rem; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { max-width: 100%; }
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-highlights { justify-items: center; }
  .highlight-item { flex-direction: column; align-items: center; text-align: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  #navbar { padding: 1rem 1.5rem; }
  #navbar.scrolled { padding: 0.75rem 1.5rem; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .about-highlights { grid-template-columns: 1fr; }
  .contact-info { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero-stats { gap: 1rem; }
  .stat-divider { display: none; }
}
