*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#09090f; --bg2:#12121a; --bg3:#1c1c28;
  --lime:#c8f04a; --lime2:#a8cc30;
  --vio:#8b5cf6; --vio2:#6d28d9;
  --text:#f0ede8; --muted:#8a8a9e;
  --border:rgba(255,255,255,0.07);
  --border2:rgba(255,255,255,0.12);
  --nav-bg:rgba(9,9,15,0.9);
  --nav-border:rgba(255,255,255,0.07);
  --svc-num-col:rgba(255,255,255,0.04);
  --tag-bg:rgba(255,255,255,0.04);
  --tag-border:rgba(255,255,255,0.07);
  --hover-bg:rgba(255,255,255,0.06);
  --shadow-soft:0 24px 60px rgba(0,0,0,0.55);
  --term-sym:rgba(255,255,255,0.2);
}

/* ── LIGHT THEME ── */
[data-theme="light"]{
  --bg:#f5f3ee; --bg2:#eceae3; --bg3:#e3e1d8;
  --text:#0e0d18; --muted:#5c5c74;
  --border:rgba(0,0,0,0.07);
  --border2:rgba(0,0,0,0.14);
  --nav-bg:rgba(245,243,238,0.92);
  --nav-border:rgba(0,0,0,0.08);
  --svc-num-col:rgba(0,0,0,0.05);
  --tag-bg:rgba(0,0,0,0.04);
  --tag-border:rgba(0,0,0,0.09);
  --hover-bg:rgba(0,0,0,0.04);
  --shadow-soft:0 24px 60px rgba(0,0,0,0.1);
  --term-sym:rgba(0,0,0,0.25);
}

/* Smooth cross-theme transition — applied only during toggle */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after{
  transition:background-color 0.4s ease,color 0.4s ease,border-color 0.4s ease,box-shadow 0.4s ease !important;
}

html{-webkit-font-smoothing:antialiased}
body{background:var(--bg);color:var(--text);font-family:'DM Sans',sans-serif;overflow-x:hidden}

/* NAV */
nav{position:fixed;top:0;left:0;right:0;z-index:200;display:flex;justify-content:space-between;align-items:center;padding:1.1rem 2.5rem;background:var(--nav-bg);backdrop-filter:blur(20px);border-bottom:1px solid var(--nav-border)}
.logo{font-family:'Syne',sans-serif;font-size:1.3rem;font-weight:800;color:var(--text);text-decoration:none;letter-spacing:-0.02em}
.logo span{color:var(--lime)}
.nav-links{display:flex;gap:0.2rem;list-style:none}
.nav-links a{color:var(--muted);text-decoration:none;font-size:0.84rem;padding:0.4rem 0.85rem;border-radius:100px;transition:color 0.2s,background 0.2s}
.nav-links a:hover{color:var(--text);background:var(--hover-bg)}
.nav-right{display:flex;align-items:center;gap:0.75rem}
.nav-cta{background:var(--lime);color:#09090f;padding:0.48rem 1.2rem;border-radius:100px;font-size:0.84rem;font-weight:600;text-decoration:none;transition:opacity 0.2s}
.nav-cta:hover{opacity:0.82}

/* HAMBURGER */
.hamburger{display:none;flex-direction:column;justify-content:center;gap:5px;width:36px;height:36px;background:none;border:none;cursor:pointer;padding:4px;flex-shrink:0}
.hamburger span{display:block;width:22px;height:2px;background:var(--text);border-radius:2px;transition:transform 0.3s ease,opacity 0.3s ease}
.hamburger.open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hamburger.open span:nth-child(2){opacity:0;transform:scaleX(0)}
.hamburger.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* MOBILE NAV OVERLAY */
.mobile-nav{
  position:fixed;inset:0;z-index:190;
  background:var(--bg);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2.5rem;
  opacity:0;pointer-events:none;
  transition:opacity 0.35s ease;
}
.mobile-nav.open{opacity:1;pointer-events:all}
.mobile-nav-links{list-style:none;display:flex;flex-direction:column;align-items:center;gap:0.5rem}
.mobile-nav-link{
  font-family:'Syne',sans-serif;font-size:2.8rem;font-weight:800;
  color:var(--text);text-decoration:none;letter-spacing:-0.03em;
  transition:color 0.2s;display:block;padding:0.25rem 0;
}
.mobile-nav-link:hover{color:var(--lime)}
.mobile-nav-cta{margin-top:0.5rem}

/* THEME TOGGLE */
.theme-toggle{
  width:36px;height:36px;border-radius:50%;
  background:var(--bg3);border:1px solid var(--border2);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:background 0.2s,border-color 0.2s,transform 0.2s;
  flex-shrink:0;
}
.theme-toggle:hover{background:var(--bg2);border-color:var(--lime);transform:scale(1.08)}
.theme-toggle svg{width:16px;height:16px;stroke:var(--muted);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:stroke 0.2s}
.theme-toggle:hover svg{stroke:var(--lime)}
.icon-moon,.icon-sun{display:none}
[data-theme="dark"]  .icon-sun {display:block}
[data-theme="light"] .icon-moon{display:block}

/* Light-mode overrides for elements with hardcoded dark colors */
[data-theme="light"] .about-overlay{
  background:linear-gradient(135deg,rgba(139,92,246,0.15) 0%,transparent 60%),
             linear-gradient(to right,transparent 60%,var(--bg2));
}
[data-theme="light"] .about-img{filter:grayscale(15%) brightness(0.95)}
[data-theme="light"] .terminal{
  /* Terminal intentionally stays dark — looks like a real terminal */
  border-color:rgba(200,240,74,0.25);
  box-shadow:0 0 32px rgba(200,240,74,0.06),var(--shadow-soft);
}
[data-theme="light"] .bubble-tooltip{box-shadow:0 16px 40px rgba(0,0,0,0.15)}

/* HERO */
.hero{position:relative;min-height:100svh;display:flex;align-items:center;overflow:hidden;padding-top:80px}
#bubble-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:1}
.hero-content{position:relative;z-index:10;max-width:1200px;margin:0 auto;padding:4rem 2.5rem;width:100%;display:grid;grid-template-columns:1fr 1fr;gap:4rem;align-items:center}
.hero-eyebrow{display:inline-flex;align-items:center;gap:0.6rem;font-size:0.72rem;letter-spacing:0.12em;text-transform:uppercase;color:var(--lime);font-weight:500;margin-bottom:1.75rem}
.hero-eyebrow::before{content:'';width:20px;height:2px;background:var(--lime)}
.hero h1{font-family:'Syne',sans-serif;font-size:clamp(2.8rem,5.5vw,5rem);font-weight:800;line-height:1.02;letter-spacing:-0.03em;margin-bottom:1.5rem}
.hero h1 .outline{-webkit-text-stroke:2px var(--text);color:transparent}
.hero h1 .lime{color:var(--lime)}
.hero-sub{font-size:1.05rem;color:var(--muted);line-height:1.8;font-weight:400;max-width:400px;margin-bottom:2.5rem}
.hero-btns{display:flex;gap:0.85rem;flex-wrap:wrap}
.btn-lime{background:var(--lime);color:#09090f;padding:0.8rem 1.75rem;border-radius:100px;font-size:0.9rem;font-weight:600;text-decoration:none;transition:opacity 0.2s,transform 0.2s;display:inline-flex;align-items:center;gap:0.4rem}
.btn-lime:hover{opacity:0.85;transform:translateY(-1px)}
.btn-outline{background:transparent;color:var(--text);padding:0.8rem 1.75rem;border-radius:100px;font-size:0.9rem;border:1px solid var(--border2);transition:border-color 0.2s,background 0.2s;display:inline-block}
.btn-outline:hover{border-color:var(--lime);background:var(--hover-bg)}
.bubble-hint{margin-top:1.75rem;display:flex;align-items:center;gap:0.6rem;font-size:0.74rem;color:var(--muted);animation:flt 3s ease-in-out infinite}
.bubble-hint-dot{width:7px;height:7px;border-radius:50%;background:var(--lime);animation:pls 2s infinite}
@keyframes flt{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes pls{0%,100%{opacity:1;transform:scale(1)}50%{opacity:0.3;transform:scale(0.7)}}

/* TERMINAL — stays dark in both themes */
.terminal{background:rgba(9,9,15,0.96);border:1px solid rgba(200,240,74,0.18);border-radius:12px;overflow:hidden;box-shadow:0 0 40px rgba(200,240,74,0.05),var(--shadow-soft)}
.term-bar{background:rgba(255,255,255,0.04);padding:0.68rem 1rem;display:flex;align-items:center;gap:0.4rem;border-bottom:1px solid rgba(255,255,255,0.06)}
.term-dot{width:10px;height:10px;border-radius:50%;display:inline-block}
.term-title{font-size:0.7rem;color:rgba(255,255,255,0.2);margin-left:0.5rem}
.term-body{padding:1.1rem 1.35rem 1.35rem;display:flex;flex-direction:column;gap:0.42rem}
.term-line{font-family:monospace;font-size:0.8rem;line-height:1.5;transition:opacity 0.35s ease}
.term-prompt{color:var(--lime);margin-right:0.5rem;font-weight:600}
.term-cmd{color:rgba(255,255,255,0.85)}
.term-key{color:#61dafc}
.term-sym{color:rgba(255,255,255,0.2);margin:0 0.2rem}
.term-val{color:#f9a66c}
.term-cursor{color:var(--lime);animation:cur 1s infinite}
@keyframes cur{0%,100%{opacity:1}50%{opacity:0}}

/* TOOLTIP */
.bubble-tooltip{
  position:fixed;z-index:300;
  background:var(--bg2);border:1px solid rgba(200,240,74,0.2);
  border-radius:12px;padding:1.1rem 1.35rem;
  min-width:220px;max-width:280px;pointer-events:none;
  opacity:0;transform:translateY(8px) scale(0.96);
  transition:opacity 0.2s,transform 0.2s;
  box-shadow:0 16px 40px rgba(0,0,0,0.55);
}
.bubble-tooltip.show{opacity:1;transform:translateY(0) scale(1)}
.tt-name{font-family:'Syne',sans-serif;font-size:1rem;font-weight:700;color:var(--text);margin-bottom:0.25rem}
.tt-cat{font-size:0.7rem;letter-spacing:0.08em;text-transform:uppercase;color:var(--lime);font-weight:500;margin-bottom:0.6rem}
.tt-desc{font-size:0.84rem;color:var(--muted);line-height:1.6;font-weight:400;margin-bottom:0.9rem}
.tt-btn{
  display:inline-flex;align-items:center;gap:0.35rem;
  background:var(--lime);color:#09090f;
  padding:0.45rem 1rem;border-radius:100px;
  font-size:0.78rem;font-weight:600;text-decoration:none;pointer-events:all;
}
.tt-btn:hover{opacity:0.85}

/* STATS */
.stats{display:grid;grid-template-columns:repeat(4,1fr);background:var(--lime)}
.stat-item{padding:2.25rem 2rem;border-right:1px solid rgba(9,9,15,0.15);text-align:center}
.stat-item:last-child{border-right:none}
.stat-num{font-family:'Syne',sans-serif;font-size:2.75rem;font-weight:800;line-height:1;color:#09090f;margin-bottom:0.3rem}
.stat-lbl{font-size:0.72rem;color:rgba(9,9,15,0.6);letter-spacing:0.05em;text-transform:uppercase;font-weight:500}

/* ABOUT */
.about{display:grid;grid-template-columns:1fr 1fr;background:var(--bg2)}
.about-img-wrap{position:relative;overflow:hidden;min-height:500px}
.about-img{width:100%;height:100%;object-fit:cover;display:block;filter:grayscale(20%) brightness(0.7)}
.about-overlay{position:absolute;inset:0;background:linear-gradient(135deg,rgba(139,92,246,0.25) 0%,transparent 60%),linear-gradient(to right,transparent 60%,var(--bg2))}
.about-content{padding:5rem 3.5rem;display:flex;flex-direction:column;justify-content:center}
.eyebrow{font-size:0.7rem;letter-spacing:0.12em;text-transform:uppercase;color:var(--lime);font-weight:500;margin-bottom:0.85rem;display:flex;align-items:center;gap:0.65rem}
.eyebrow::before{content:'';width:20px;height:2px;background:var(--lime)}
.section-h{font-family:'Syne',sans-serif;font-size:clamp(2rem,3.5vw,2.9rem);font-weight:800;letter-spacing:-0.025em;line-height:1.08;margin-bottom:1rem;color:var(--text)}
.section-h .outline{-webkit-text-stroke:1.5px var(--text);color:transparent}
.section-p{font-size:1rem;color:var(--muted);line-height:1.85;font-weight:400;margin-bottom:2rem}
.about-cards{display:flex;flex-direction:column;gap:0.65rem}
.acard{background:var(--bg3);border:1px solid var(--border);border-radius:8px;padding:1.2rem 1.4rem;transition:border-color 0.2s}
.acard:hover{border-color:rgba(200,240,74,0.25)}
.acard-lbl{font-size:0.66rem;letter-spacing:0.1em;text-transform:uppercase;color:var(--lime);font-weight:500;margin-bottom:0.4rem}
.acard p{font-size:0.92rem;color:var(--muted);line-height:1.7;font-weight:400}
.acard strong{color:var(--text);font-weight:500}

/* SERVICES */
.services{padding:6rem 2.5rem;background:var(--bg)}
.services-top{max-width:1200px;margin:0 auto 3.5rem;display:flex;justify-content:space-between;align-items:flex-end;flex-wrap:wrap;gap:1.5rem}
.services-top-right{max-width:320px;font-size:0.95rem;color:var(--muted);line-height:1.75;font-weight:400}
.svcs{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--border);border:1px solid var(--border);border-radius:12px;overflow:hidden}
.svc{background:var(--bg);padding:2.25rem 2rem;transition:background 0.2s;position:relative;overflow:hidden}
.svc::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(to right,var(--lime),var(--vio));opacity:0;transition:opacity 0.2s}
.svc:hover{background:var(--bg2)}
.svc:hover::before{opacity:1}
.svc-num{font-family:'Syne',sans-serif;font-size:2.5rem;font-weight:800;color:var(--svc-num-col);line-height:1;margin-bottom:1.25rem;letter-spacing:-0.03em}
.svc-ico{margin-bottom:1.1rem}
.svc-ico svg{width:32px;height:32px;stroke:var(--lime);fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.svc h3{font-family:'Syne',sans-serif;font-size:1rem;font-weight:700;color:var(--text);margin-bottom:0.55rem;letter-spacing:-0.01em}
.svc p{font-size:0.88rem;color:var(--muted);line-height:1.75;font-weight:400}
.svc-tags{display:flex;flex-wrap:wrap;gap:0.3rem;margin-top:1.1rem}
.tag{font-size:0.67rem;padding:0.2rem 0.6rem;border-radius:100px;background:var(--tag-bg);border:1px solid var(--tag-border);color:var(--muted)}

/* PROJECTS BUBBLE SECTION */
.projects{padding:6rem 2.5rem;background:var(--bg2);position:relative}
.projects-top{max-width:1200px;margin:0 auto 1.5rem;display:flex;justify-content:space-between;align-items:flex-end;flex-wrap:wrap;gap:1rem}
#proj-canvas-wrap{position:relative;width:100%;max-width:1200px;margin:0 auto;height:600px;border-radius:16px;overflow:hidden;background:var(--bg3);border:1px solid var(--border)}
#proj-canvas{width:100%;height:100%;display:block}

/* SKILLS */
.skills{padding:6rem 2.5rem;background:var(--bg)}
.skills-inner{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:300px 1fr;gap:5rem;align-items:start}
.skills-right{display:grid;grid-template-columns:repeat(3,1fr);gap:2.25rem}
.sg-lbl{font-size:0.67rem;letter-spacing:0.1em;text-transform:uppercase;color:var(--lime);font-weight:500;margin-bottom:0.8rem;padding-bottom:0.55rem;border-bottom:1px solid var(--border)}
.sk{list-style:none;display:flex;flex-direction:column;gap:0.5rem}
.sk li{font-size:0.92rem;color:var(--muted);font-weight:400;display:flex;align-items:center;gap:0.55rem;line-height:1.4}
.sk li::before{content:'';display:block;width:3px;height:3px;border-radius:50%;background:var(--vio);flex-shrink:0}

/* CONTACT */
.contact{background:var(--bg2);padding:6rem 2.5rem}
.contact-inner{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:1fr 1fr;gap:4rem;align-items:center}
.contact h2{font-family:'Syne',sans-serif;font-size:clamp(2.5rem,5vw,4rem);font-weight:800;letter-spacing:-0.03em;line-height:1.0;margin-bottom:0.85rem;color:var(--text)}
.contact h2 .lime{color:var(--lime)}
.contact h2 .outline{-webkit-text-stroke:2px var(--text);color:transparent}
.contact-sub{font-size:1rem;color:var(--muted);line-height:1.8;font-weight:400;margin-bottom:2.25rem;max-width:380px}
.clinks{display:flex;flex-direction:column;gap:0.65rem}
.clink{display:flex;align-items:center;gap:0.9rem;padding:0.9rem 1.1rem;background:var(--bg3);border:1px solid var(--border);border-radius:10px;text-decoration:none;color:var(--text);transition:border-color 0.2s,background 0.2s}
.clink:hover{border-color:rgba(200,240,74,0.35);background:rgba(200,240,74,0.05)}
.clink-ico{width:34px;height:34px;border-radius:7px;background:rgba(200,240,74,0.1);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.clink-ico svg{width:16px;height:16px;stroke:var(--lime);fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.clink-body{flex:1}
.clink-lbl{font-size:0.65rem;color:var(--muted);text-transform:uppercase;letter-spacing:0.07em}
.clink-val{font-size:0.9rem;font-weight:400;margin-top:0.08rem}
.clink-arr{font-size:0.85rem;color:var(--muted)}

footer{background:var(--bg);border-top:1px solid var(--border);padding:1.75rem 2.5rem;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:0.5rem}
footer p{font-size:0.74rem;color:var(--muted)}

.reveal{opacity:0;transform:translateY(20px);transition:opacity 0.6s ease,transform 0.6s ease}
.reveal.in{opacity:1;transform:none}

/* ── CUSTOM CURSOR ── */
.cursor{
  display:none;
  position:fixed;top:0;left:0;
  width:22px;height:22px;
  border:2px solid var(--lime);
  border-radius:50%;
  pointer-events:none;
  z-index:9999;
  transition:width 0.22s ease,height 0.22s ease,background 0.22s ease,border-color 0.22s ease,top 0.22s ease,left 0.22s ease;
  will-change:transform;
  margin:-11px 0 0 -11px;
}
.cursor.hovering{
  width:42px;height:42px;
  margin:-21px 0 0 -21px;
  background:rgba(200,240,74,0.1);
}
.cursor.clicking{
  transform:scale(0.82);
}
@media(hover:hover) and (pointer:fine){
  body,a,button,[role="button"],canvas{cursor:none}
  .cursor{display:block}
}

/* ── HERO SPOTLIGHT ── */
.hero::before{
  content:'';
  position:absolute;inset:0;
  background:radial-gradient(circle 560px at var(--spot-x,50%) var(--spot-y,110%),
    rgba(200,240,74,0.07) 0%,transparent 65%);
  z-index:0;
  pointer-events:none;
  transition:background 0.08s linear;
}

/* ── TABLET ── */
@media(max-width:768px){
  nav{padding:0.85rem 1.25rem}
  .nav-links,.nav-cta{display:none}
  .hamburger{display:flex}

  .hero-content{grid-template-columns:1fr;padding:5.5rem 1.25rem 3rem;gap:2rem}
  .hero h1{font-size:clamp(2.4rem,8vw,3.5rem)}
  .hero-sub{font-size:1rem;max-width:100%}
  #bubble-canvas{opacity:0.45} /* decorative bg on mobile, text is primary */
  .bubble-hint{display:none} /* hover instruction not relevant on touch */
  .terminal{font-size:0.85rem}
  .term-body{padding:0.9rem 1.1rem 1.1rem}

  .stats{grid-template-columns:repeat(2,1fr)}
  .stat-item{padding:1.5rem 1rem}
  .stat-num{font-size:2.25rem}

  .about{grid-template-columns:1fr}
  .about-img-wrap{min-height:220px}
  .about-content{padding:2.5rem 1.25rem}

  .services{padding:4rem 1.25rem}
  .services-top{margin-bottom:2rem}
  .svcs{grid-template-columns:1fr}

  .projects{padding:4rem 1.25rem}
  #proj-canvas-wrap{height:480px}

  .skills{padding:4rem 1.25rem}
  .skills-inner{grid-template-columns:1fr;gap:2.5rem}
  .skills-right{grid-template-columns:repeat(2,1fr);gap:1.5rem}

  .contact{padding:4rem 1.25rem}
  .contact-inner{grid-template-columns:1fr;gap:2rem}

  footer{padding:1.5rem 1.25rem;flex-direction:column;text-align:center}
}

/* ── SMALL PHONES ── */
@media(max-width:480px){
  .hero h1{font-size:clamp(2.2rem,9vw,3rem)}
  .hero-sub{font-size:0.95rem}
  .hero-btns{flex-direction:column;align-items:flex-start}
  .btn-lime,.btn-outline{width:100%;text-align:center;justify-content:center}

  .stats{grid-template-columns:repeat(2,1fr)}
  .stat-num{font-size:2rem}

  .section-h{font-size:clamp(1.75rem,7vw,2.4rem)}

  .svc{padding:1.75rem 1.25rem}
  .svc-num{font-size:2rem}

  #proj-canvas-wrap{height:400px}

  .skills-right{grid-template-columns:1fr;gap:1.25rem}

  .contact h2{font-size:clamp(2rem,8vw,3rem)}

  .mobile-nav-link{font-size:2.2rem}
}
