/* ============================================================
   AAKASH THAKUR · NEUMORPHIC PORTFOLIO
   Monochrome · soft extruded surfaces · zero gradients
   ============================================================ */

:root{
  /* ---- Monochrome palette (solid colors only) ---- */
  --bg:        #e7e8ec;   /* base surface */
  --bg-2:      #eceef2;   /* lighter surface */
  --bg-sink:   #dfe1e6;   /* recessed wells */
  --light:     #ffffff;   /* top-left highlight */
  --shadow:    #c3c5cc;   /* bottom-right shadow */
  --shadow-2:  #b6b8c0;   /* deeper shadow */

  --ink:       #24262b;   /* charcoal text */
  --ink-soft:  #4c4f57;
  --muted:     #82858f;   /* gray text */
  --hair:      #d3d5db;   /* hairlines */

  --accent:    #1c1d21;   /* near-black accent */
  --on-accent: #e7e8ec;   /* text/icons on the accent button */
  --ico-on-accent: rgba(255,255,255,.12);
  --hover-tint: rgba(36,38,43,.06);
  --pulse-rgb: 36,38,43;

  color-scheme: light;

  /* ---- Neumorphic shadow recipes ---- */
  --sh-up:     8px 8px 18px var(--shadow), -8px -8px 18px var(--light);
  --sh-up-lg:  14px 14px 30px var(--shadow), -12px -12px 26px var(--light);
  --sh-up-sm:  5px 5px 12px var(--shadow), -5px -5px 12px var(--light);
  --sh-in:     inset 6px 6px 14px var(--shadow), inset -6px -6px 14px var(--light);
  --sh-in-sm:  inset 4px 4px 9px var(--shadow), inset -4px -4px 9px var(--light);
  --sh-press:  inset 7px 7px 14px var(--shadow-2), inset -6px -6px 13px var(--light);

  --r:   22px;
  --r-sm:14px;
  --r-lg:30px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  --maxw: 1240px;
}

/* ============================================================
   DARK THEME — inverted monochrome neumorphism
   ============================================================ */
html[data-theme="dark"]{
  --bg:        #1c1d21;
  --bg-2:      #212327;
  --bg-sink:   #161719;
  --light:     #2b2d33;   /* raised highlight (lighter charcoal) */
  --shadow:    #111215;   /* recessed shadow */
  --shadow-2:  #0c0d0f;

  --ink:       #eceef2;
  --ink-soft:  #b6b9c1;
  --muted:     #797c85;
  --hair:      #2c2e34;

  --accent:    #eceef2;   /* near-white accent in dark */
  --on-accent: #1c1d21;
  --ico-on-accent: rgba(0,0,0,.14);
  --hover-tint: rgba(236,238,242,.08);
  --pulse-rgb: 236,238,242;

  color-scheme: dark;
}

*{ margin:0; padding:0; box-sizing:border-box; }

html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

body{
  font-family:'Inter', system-ui, sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.6;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  transition:background-color .5s var(--ease), color .5s var(--ease);
}

::selection{ background:var(--accent); color:var(--bg); }

a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; }

h1,h2,h3{ font-family:'Space Grotesk', sans-serif; font-weight:600; letter-spacing:-.02em; line-height:1.04; }
em{ font-style:normal; color:var(--muted); }

/* ---- hide native cursor on fine pointers ---- */
@media (pointer:fine){ *{ cursor:none; } }

/* ============================================================
   ICONS (pure CSS masks-free, simple glyphs)
   ============================================================ */
.ico{ display:inline-block; width:1em; height:1em; position:relative; vertical-align:middle; }
.ico-arrow::before{
  content:""; position:absolute; inset:0; margin:auto;
  width:.5em; height:.5em; border-right:2px solid currentColor; border-top:2px solid currentColor;
  transform:rotate(45deg); transition:transform .3s var(--ease);
}
.ico-arrow--up::before{ transform:rotate(-45deg); }
.ico-spark::before,.ico-spark::after{
  content:""; position:absolute; inset:0; margin:auto; background:currentColor;
}
.ico-spark::before{ width:2px; height:100%; }
.ico-spark::after{ width:100%; height:2px; }
.ico-cube{ border:2px solid currentColor; transform:rotate(45deg) scale(.62); border-radius:2px; }
.ico-cube::after{ content:""; position:absolute; inset:18%; border:2px solid currentColor; border-radius:1px; }
.ico-pulse::before{
  content:""; position:absolute; inset:0; margin:auto; width:90%; height:2px; background:currentColor;
  box-shadow:0 -5px 0 -1px currentColor, 0 5px 0 -1px currentColor;
}
.ico-pen{ border-radius:50% 50% 50% 0; border:2px solid currentColor; transform:rotate(45deg) scale(.6); }
.ico-code::before,.ico-code::after{
  content:""; position:absolute; top:50%; width:.42em; height:.42em;
  border-left:2px solid currentColor; border-bottom:2px solid currentColor;
}
.ico-code::before{ left:8%; transform:translateY(-50%) rotate(45deg); }
.ico-code::after{ right:8%; transform:translateY(-50%) rotate(-135deg); }
.ico-layers{ }
.ico-layers::before,.ico-layers::after{
  content:""; position:absolute; left:10%; right:10%; height:.28em; border:2px solid currentColor; border-radius:2px;
}
.ico-layers::before{ top:18%; }
.ico-layers::after{ bottom:18%; }

/* ============================================================
   CURSOR
   ============================================================ */
.cursor,.cursor-dot{ position:fixed; top:0; left:0; pointer-events:none; z-index:9999; border-radius:50%; }
.cursor{
  width:38px; height:38px; border:1.5px solid var(--ink-soft);
  transform:translate(-50%,-50%); transition:width .3s var(--ease),height .3s var(--ease),background .3s,border-color .3s;
  mix-blend-mode:normal;
}
.cursor-dot{ width:5px; height:5px; background:var(--ink); transform:translate(-50%,-50%); }
.cursor.is-hover{ width:64px; height:64px; background:var(--hover-tint); border-color:transparent; }
.cursor.is-down{ width:26px; height:26px; }
@media (pointer:coarse){ .cursor,.cursor-dot{ display:none; } }

/* ============================================================
   LOADER
   ============================================================ */
.loader{
  position:fixed; inset:0; z-index:10000; background:var(--bg);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:34px;
  transition:opacity .8s var(--ease), visibility .8s;
}
.loader.is-done{ opacity:0; visibility:hidden; }
.loader__orb{ position:relative; width:110px; height:110px; display:grid; place-items:center; }
.loader__core{
  width:42px; height:42px; border-radius:50%; background:var(--bg);
  box-shadow:var(--sh-up);
}
.loader__ring{
  position:absolute; inset:0; border-radius:50%;
  box-shadow:var(--sh-in-sm);
}
.loader__ring:nth-child(2){
  inset:14px; border:2px solid transparent; border-top-color:var(--ink);
  box-shadow:none; animation:spin 1s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.loader__count{ font-family:'Space Grotesk'; font-size:54px; font-weight:600; letter-spacing:-.03em; }
.loader__count i{ font-size:22px; color:var(--muted); font-style:normal; margin-left:2px; }
.loader__label{ font-size:13px; letter-spacing:.18em; text-transform:uppercase; color:var(--muted); }

/* ============================================================
   SCROLL PROGRESS
   ============================================================ */
.scroll-progress{
  position:fixed; top:0; left:0; right:0; height:3px; z-index:900; background:transparent;
}
.scroll-progress span{
  display:block; height:100%; width:0%; background:var(--ink);
}

/* ============================================================
   NAV
   ============================================================ */
.nav{
  position:fixed; top:18px; left:50%; transform:translateX(-50%);
  width:calc(100% - 40px); max-width:var(--maxw); z-index:800;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px 12px 22px; border-radius:50px;
  background:var(--bg); box-shadow:var(--sh-up-sm);
  transition:box-shadow .4s var(--ease), width .5s var(--ease), top .4s var(--ease), padding .4s;
}
.nav.is-scrolled{ padding:8px 12px 8px 18px; top:12px; width:min(var(--maxw), calc(100% - 120px)); box-shadow:var(--sh-up); }
.nav__brand{ display:flex; align-items:center; gap:12px; font-family:'Space Grotesk'; font-weight:600; }
.nav__mark{
  display:grid; place-items:center; width:38px; height:38px; border-radius:12px;
  background:var(--bg); box-shadow:var(--sh-up-sm); font-size:14px; letter-spacing:-.02em;
}
.nav__name{ font-size:16px; letter-spacing:-.01em; }
.nav__name i{ color:var(--muted); font-style:normal; }
.nav__links{ display:flex; gap:6px; }
.nav__links a{
  position:relative; padding:9px 16px; border-radius:30px; font-size:14px; font-weight:500; color:var(--ink-soft);
  transition:color .3s, box-shadow .35s var(--ease);
}
.nav__links a::after{
  content:""; position:absolute; inset:0; border-radius:30px; box-shadow:var(--sh-in-sm); opacity:0; transition:opacity .35s var(--ease);
}
.nav__links a:hover{ color:var(--ink); }
.nav__links a:hover::after,.nav__links a.is-active::after{ opacity:1; }
.nav__cta{
  display:flex; align-items:center; gap:10px; padding:11px 14px 11px 20px; border-radius:30px;
  font-size:14px; font-weight:600; background:var(--accent); color:var(--on-accent);
  box-shadow:var(--sh-up-sm); transition:transform .3s var(--ease), box-shadow .3s;
}
.nav__cta .ico{ width:26px; height:26px; border-radius:50%; background:var(--ico-on-accent); }
.nav__cta:hover .ico-arrow::before{ transform:rotate(45deg) translate(1px,-1px); }
.nav__burger{ display:none; flex-direction:column; gap:5px; width:44px; height:44px; border-radius:12px; background:var(--bg); box-shadow:var(--sh-up-sm); align-items:center; justify-content:center; }
.nav__burger span{ width:18px; height:2px; background:var(--ink); border-radius:2px; transition:.3s var(--ease); }
.nav.is-open .nav__burger span:nth-child(1){ transform:translateY(3.5px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2){ transform:translateY(-3.5px) rotate(-45deg); }

/* ---- theme toggle ---- */
.nav__theme{
  display:grid; place-items:center; width:42px; height:42px; border-radius:50%;
  background:var(--bg); box-shadow:var(--sh-up-sm); flex:0 0 auto;
  transition:box-shadow .35s var(--ease), transform .3s var(--ease);
}
.nav__theme:hover{ box-shadow:var(--sh-in-sm); }
.nav__theme-icon{
  position:relative; width:17px; height:17px; border-radius:50%; background:var(--ink);
  transition:background .4s var(--ease), box-shadow .45s var(--ease), transform .5s var(--ease);
}
/* light mode → show a moon (carve a crescent) */
.nav__theme-icon::before{
  content:""; position:absolute; top:-3px; right:-3px; width:14px; height:14px; border-radius:50%;
  background:var(--bg); transition:transform .45s var(--ease), background .4s var(--ease);
}
/* dark mode → morph into a sun (full disc + rays) */
html[data-theme="dark"] .nav__theme-icon{
  width:13px; height:13px;
  box-shadow:
    0 -11px 0 -5px var(--ink), 0 11px 0 -5px var(--ink),
    11px 0 0 -5px var(--ink), -11px 0 0 -5px var(--ink),
    8px 8px 0 -5px var(--ink), -8px 8px 0 -5px var(--ink),
    8px -8px 0 -5px var(--ink), -8px -8px 0 -5px var(--ink);
}
html[data-theme="dark"] .nav__theme-icon::before{ transform:scale(0); }

/* ---- theme reveal overlay (circular wipe from top-right) ---- */
.theme-reveal{
  position:fixed; inset:0; z-index:9500; pointer-events:none;
  background:var(--bg); clip-path:circle(0px at 100% 0%);
  will-change:clip-path; visibility:hidden;
}
.theme-reveal.is-running{ visibility:visible; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn{
  display:inline-flex; align-items:center; gap:12px; padding:16px 26px; border-radius:40px;
  font-weight:600; font-size:15px; transition:transform .35s var(--ease), box-shadow .35s var(--ease);
}
.btn .ico{ width:30px; height:30px; border-radius:50%; }
.btn--solid{ background:var(--accent); color:var(--on-accent); box-shadow:var(--sh-up-sm); }
.btn--solid .ico{ background:var(--ico-on-accent); }
.btn--solid:hover{ transform:translateY(-3px); box-shadow:10px 12px 24px var(--shadow), -8px -8px 18px var(--light); }
.btn--solid:hover .ico-arrow::before{ transform:rotate(45deg) translate(1px,-1px); }
.btn--ghost{ background:var(--bg); color:var(--ink); box-shadow:var(--sh-up-sm); }
.btn--ghost:hover{ box-shadow:var(--sh-in-sm); }
.btn--block{ width:100%; justify-content:center; }
.press{ transition:transform .12s var(--ease); }
.press:active{ transform:scale(.96); }

/* ============================================================
   LAYOUT / SECTIONS
   ============================================================ */
.section{ max-width:var(--maxw); margin:0 auto; padding:120px 28px; }
.section__head{ max-width:760px; margin-bottom:62px; }
.eyebrow{
  display:inline-flex; align-items:center; gap:10px; font-size:12px; font-weight:600;
  letter-spacing:.16em; text-transform:uppercase; color:var(--muted); margin-bottom:22px;
}
.eyebrow i{ width:26px; height:26px; border-radius:8px; background:var(--bg); box-shadow:var(--sh-up-sm); position:relative; }
.eyebrow i::after{ content:""; position:absolute; inset:0; margin:auto; width:6px; height:6px; border-radius:50%; background:var(--ink); }
.section__title{ font-size:clamp(30px,4.4vw,52px); }
.section__title em{ display:inline; }

/* ============================================================
   HERO
   ============================================================ */
.hero{
  position:relative; min-height:100vh; display:flex; align-items:center;
  max-width:var(--maxw); margin:0 auto; padding:150px 28px 90px;
}
.hero__canvas{ position:absolute; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; transition:opacity .6s var(--ease); }
.hero__inner{ position:relative; z-index:2; max-width:720px; }
.hero__pill{
  display:inline-flex; align-items:center; gap:10px; padding:9px 18px; border-radius:30px;
  font-size:13px; font-weight:500; color:var(--ink-soft); background:var(--bg); box-shadow:var(--sh-up-sm); margin-bottom:34px;
}
.hero__pulse{ width:8px; height:8px; border-radius:50%; background:var(--ink); box-shadow:0 0 0 0 rgba(var(--pulse-rgb),.5); animation:pulse 2.2s infinite; }
@keyframes pulse{ 0%{ box-shadow:0 0 0 0 rgba(var(--pulse-rgb),.4);} 70%{ box-shadow:0 0 0 9px rgba(var(--pulse-rgb),0);} 100%{ box-shadow:0 0 0 0 rgba(var(--pulse-rgb),0);} }
.hero__title{ font-size:clamp(44px,8vw,92px); margin-bottom:32px; }
.hero__title .line{ display:block; overflow:hidden; }
.hero__title .line > span{ display:block; }
.hero__title em{ color:var(--muted); }
.hero__sub{ font-size:clamp(16px,2vw,19px); color:var(--ink-soft); max-width:540px; margin-bottom:40px; }
.hero__actions{ display:flex; flex-wrap:wrap; gap:16px; margin-bottom:40px; }

/* ---- snow control panel ---- */
.snowctl{
  display:inline-flex; flex-direction:column; gap:16px; padding:22px 24px; border-radius:var(--r);
  background:var(--bg); box-shadow:var(--sh-up); max-width:420px;
}
.snowctl__title{ display:inline-flex; align-items:center; gap:10px; font-family:'Space Grotesk'; font-weight:600; font-size:14px; letter-spacing:.01em; }
.flake{ display:inline-grid; place-items:center; width:24px; height:24px; border-radius:8px; background:var(--bg); box-shadow:var(--sh-up-sm); }
.flake::before{ content:"</>"; font-family:'Space Grotesk',monospace; font-weight:600; font-size:11px; color:var(--ink); }
.snowctl__row{ display:flex; align-items:center; gap:16px; }
.snowctl__label{ font-size:13px; color:var(--muted); min-width:54px; }
/* slider — recessed groove + solid fill + raised knob */
.nrange{ position:relative; flex:1; height:26px; display:flex; align-items:center; }
.nrange::before{ content:""; position:absolute; left:0; right:0; top:50%; transform:translateY(-50%); height:12px; border-radius:8px; box-shadow:var(--sh-in-sm); }
.nrange__fill{ position:absolute; left:0; top:50%; transform:translateY(-50%); height:12px; width:40%; border-radius:8px; background:var(--accent); z-index:1; pointer-events:none; transition:width .12s linear; }
.snowctl__range{ position:relative; z-index:2; width:100%; height:26px; -webkit-appearance:none; appearance:none; background:transparent; margin:0; outline:none; }
.snowctl__range::-webkit-slider-runnable-track{ -webkit-appearance:none; background:transparent; border:none; height:26px; }
.snowctl__range::-moz-range-track{ background:transparent; border:none; height:26px; }
.snowctl__range::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none; width:22px; height:22px; border-radius:50%; box-sizing:border-box;
  background:var(--accent); border:6px solid var(--bg); box-shadow:var(--sh-up-sm);
  cursor:grab; margin-top:2px; transition:transform .2s var(--ease), box-shadow .25s var(--ease);
}
.snowctl__range::-moz-range-thumb{
  width:22px; height:22px; border-radius:50%; box-sizing:border-box;
  background:var(--accent); border:6px solid var(--bg); box-shadow:var(--sh-up-sm); cursor:grab;
}
.snowctl__range:hover::-webkit-slider-thumb{ transform:scale(1.08); }
.snowctl__range:active::-webkit-slider-thumb{ cursor:grabbing; border-width:5px; }
.snowctl__range:hover::-moz-range-thumb{ transform:scale(1.08); }
.snowctl__actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.snowctl__btn{
  padding:10px 16px; border-radius:24px; font-size:13px; font-weight:600; color:var(--ink);
  background:var(--bg); box-shadow:var(--sh-up-sm); transition:box-shadow .25s var(--ease);
}
.snowctl__btn:hover{ box-shadow:var(--sh-in-sm); }
.snowctl__btn.is-active{ box-shadow:var(--sh-in-sm); color:var(--muted); }
.snowctl__hint{ font-size:12px; color:var(--muted); }
@media (max-width:520px){ .snowctl{ max-width:100%; } .snowctl__hint{ display:none; } }
.hero__stats{ display:flex; gap:46px; flex-wrap:wrap; }
.stat{ display:flex; align-items:baseline; gap:4px; flex-wrap:wrap; }
.stat b{ font-family:'Space Grotesk'; font-size:40px; font-weight:600; letter-spacing:-.03em; }
.stat i{ font-style:normal; font-size:24px; color:var(--muted); }
.stat span{ width:100%; font-size:13px; color:var(--muted); }
.hero__scroll{
  position:absolute; bottom:40px; right:34px; z-index:2; display:flex; align-items:center; gap:12px;
  font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted);
}
.hero__scroll-track{ width:22px; height:36px; border-radius:14px; box-shadow:var(--sh-in-sm); position:relative; }
.hero__scroll-track i{ position:absolute; top:7px; left:50%; transform:translateX(-50%); width:5px; height:5px; border-radius:50%; background:var(--ink); animation:scrolldot 1.8s infinite; }
@keyframes scrolldot{ 0%,100%{ top:7px; opacity:1;} 50%{ top:22px; opacity:.3;} }
@media (max-width:640px){ .hero__scroll{ display:none; } }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee{ overflow:hidden; padding:34px 0; box-shadow:var(--sh-in-sm); margin:0 0 0; }
.marquee__row{ display:inline-flex; align-items:center; gap:38px; white-space:nowrap; will-change:transform; }
.marquee__row span{ font-family:'Space Grotesk'; font-size:clamp(24px,4vw,42px); font-weight:600; letter-spacing:-.02em; }
.marquee__row b{ color:var(--muted); font-size:20px; }

/* ============================================================
   NEUMORPHIC CARD (shared)
   ============================================================ */
.ncard{
  background:var(--bg); border-radius:var(--r); padding:34px; box-shadow:var(--sh-up);
  transition:box-shadow .45s var(--ease), transform .45s var(--ease);
}
.ncard__icon{
  width:56px; height:56px; border-radius:16px; background:var(--bg); box-shadow:var(--sh-up-sm);
  display:grid; place-items:center; font-size:22px; color:var(--ink); margin-bottom:24px;
  transition:box-shadow .4s var(--ease), color .4s;
}
.ncard h3{ font-size:21px; margin-bottom:10px; }
.ncard p{ color:var(--ink-soft); font-size:15px; }
.ncard:hover .ncard__icon{ box-shadow:var(--sh-in-sm); }

/* generic tilt host */
.tilt{ transform-style:preserve-3d; will-change:transform; }

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid{ display:grid; grid-template-columns:.55fr 1.45fr; gap:54px; align-items:center; }
.about__lead p{ font-size:19px; color:var(--ink-soft); margin-bottom:22px; }
.about__lead strong{ color:var(--ink); font-weight:600; }
.link-underline{ font-weight:600; position:relative; }
.link-underline::after{ content:""; position:absolute; left:0; bottom:-3px; width:100%; height:2px; background:var(--ink); transform:scaleX(0); transform-origin:left; transition:transform .4s var(--ease); }
.link-underline:hover::after{ transform:scaleX(1); }

/* profile photo (neumorphic frame, with initials fallback if image is missing) */
.about__photo{ position:relative; aspect-ratio:4/5; max-width:280px; border-radius:var(--r-lg); background:var(--bg); box-shadow:var(--sh-up); }
.term{ position:absolute; inset:14px; z-index:1; display:flex; flex-direction:column; gap:16px; padding:18px; border-radius:calc(var(--r-lg) - 8px); box-shadow:var(--sh-in); background:var(--bg); overflow:hidden; }
.term__bar{ display:flex; gap:8px; }
.term__bar i{ width:11px; height:11px; border-radius:50%; background:var(--bg); box-shadow:var(--sh-up-sm); }
.term__body{ font-family:ui-monospace,'Cascadia Code',Menlo,Consolas,monospace; font-size:14px; line-height:1.75; color:var(--ink); white-space:pre-wrap; word-break:break-word; }
.term__caret{ display:inline-block; width:8px; height:15px; background:var(--ink); margin-left:1px; vertical-align:text-bottom; animation:termblink 1.05s steps(1) infinite; }
@keyframes termblink{ 50%{ opacity:0; } }
.about__photo img{ position:absolute; inset:14px; z-index:1; width:calc(100% - 28px); height:calc(100% - 28px); object-fit:cover; object-position:50% 22%; border-radius:calc(var(--r-lg) - 8px); box-shadow:var(--sh-in-sm); }
.about__photo-tag{ position:absolute; z-index:2; left:16px; bottom:16px; display:inline-flex; align-items:center; gap:8px; padding:9px 15px; border-radius:30px; background:var(--bg); box-shadow:var(--sh-up-sm); font-size:12px; font-weight:600; }
.about__photo-tag .dot{ width:7px; height:7px; border-radius:50%; background:var(--ink); }

.about__cards{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:22px; margin-top:34px; }

/* project tech tags */
.project__tech{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.project__tech span{ padding:6px 13px; border-radius:20px; font-size:12px; font-weight:600; color:var(--ink-soft); box-shadow:var(--sh-up-sm); }
a.project__more{ cursor:pointer; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills__grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:22px; }
.skill{ background:var(--bg); border-radius:var(--r); padding:30px; box-shadow:var(--sh-up); transition:box-shadow .45s var(--ease), transform .45s var(--ease); }
.skill__top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.skill h3{ font-size:19px; margin-bottom:6px; }
.skill p{ color:var(--muted); font-size:14px; margin-bottom:22px; }
.skill__bar{ height:14px; border-radius:10px; box-shadow:var(--sh-in-sm); padding:3px; }
.skill__bar span{ display:block; height:100%; width:0; border-radius:8px; background:var(--accent); transition:width 1.2s var(--ease-out); }

/* ============================================================
   WORK / PROJECTS
   ============================================================ */
.work__grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:26px; }
.project{ background:var(--bg); border-radius:var(--r-lg); padding:22px; box-shadow:var(--sh-up); transition:box-shadow .45s var(--ease), transform .45s var(--ease); }
.project--wide{ grid-column:span 2; display:grid; grid-template-columns:1.1fr 1fr; gap:30px; align-items:center; }
.project__media{ border-radius:var(--r); box-shadow:var(--sh-in); aspect-ratio:16/11; display:grid; place-items:center; overflow:hidden; position:relative; }
/* live iframe / screenshot preview inside the media well */
.project__frame{ position:absolute; inset:14px; border-radius:var(--r-sm); overflow:hidden; box-shadow:var(--sh-in-sm); background:var(--bg-sink); z-index:1; }
.project__frame iframe{ position:absolute; top:0; left:0; width:1280px; height:800px; border:0; transform-origin:0 0; pointer-events:none; }
.project__shot{ position:absolute; inset:14px; width:calc(100% - 28px); height:calc(100% - 28px); object-fit:cover; object-position:top center; border-radius:var(--r-sm); box-shadow:var(--sh-in-sm); z-index:1; filter:grayscale(1); /* ponytail: keeps colorful screenshots on-brand (monochrome); drop if a desaturated shot is supplied */ }
.project__live{ position:absolute; z-index:2; left:22px; bottom:22px; display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border-radius:30px; background:var(--bg); box-shadow:var(--sh-up-sm); font-size:12px; font-weight:600; }
.project__live .dot{ width:7px; height:7px; border-radius:50%; background:var(--ink); animation:pulse 2.2s infinite; }
.project--wide .project__media{ aspect-ratio:16/10; }
.project__obj{ width:120px; height:120px; border-radius:26px; background:var(--bg); box-shadow:var(--sh-up-lg); transition:transform .6s var(--ease); }
.project__obj--a{ border-radius:50%; }
.project__obj--b{ transform:rotate(45deg); border-radius:20px; }
.project__obj--c{ border-radius:50% 50% 50% 12px; }
.project__obj--d{ width:150px; height:90px; border-radius:18px; }
.project:hover .project__obj{ transform:translateY(-8px) scale(1.05) rotate(6deg); }
.project__obj--b{ } .project:hover .project__obj--b{ transform:translateY(-8px) scale(1.05) rotate(55deg); }
.project__body{ padding:24px 14px 10px; }
.project--wide .project__body{ padding:14px; }
.project__tag{ font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); font-weight:600; }
.project__body h3{ font-size:clamp(22px,2.6vw,30px); margin:12px 0 10px; }
.project__body p{ color:var(--ink-soft); font-size:15px; margin-bottom:18px; }
.project__more{ display:inline-flex; align-items:center; gap:10px; font-weight:600; font-size:14px; }
.project__more .ico{ width:26px; height:26px; border-radius:50%; box-shadow:var(--sh-up-sm); transition:box-shadow .3s; }
.project:hover .project__more .ico{ box-shadow:var(--sh-in-sm); }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.quotes__grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:24px; }
.quote{ background:var(--bg); border-radius:var(--r); padding:38px 32px; box-shadow:var(--sh-up); position:relative; transition:box-shadow .45s var(--ease), transform .45s var(--ease); }
.quote__mark{ font-family:'Space Grotesk'; font-size:70px; line-height:.6; color:var(--shadow); height:34px; }
.quote blockquote{ font-size:17px; color:var(--ink-soft); margin:18px 0 26px; }
.quote figcaption{ display:flex; align-items:center; gap:14px; }
.avatar{ display:grid; place-items:center; width:46px; height:46px; border-radius:50%; background:var(--bg); box-shadow:var(--sh-up-sm); font-family:'Space Grotesk'; font-weight:600; font-size:14px; }
.quote figcaption b{ display:block; font-size:15px; }
.quote figcaption i{ font-style:normal; font-size:13px; color:var(--muted); }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline__track{ position:relative; padding-left:42px; }
.timeline__track::before{ content:""; position:absolute; left:14px; top:6px; bottom:6px; width:4px; border-radius:4px; box-shadow:var(--sh-in-sm); }
.tl-item{ position:relative; margin-bottom:30px; }
.tl-item:last-child{ margin-bottom:0; }
.tl-dot{ position:absolute; left:-35px; top:6px; width:18px; height:18px; border-radius:50%; background:var(--bg); box-shadow:var(--sh-up-sm); }
.tl-dot::after{ content:""; position:absolute; inset:5px; border-radius:50%; background:var(--ink); }
.tl-year{ display:inline-block; font-family:'Space Grotesk'; font-weight:600; font-size:14px; color:var(--muted); margin-bottom:12px; letter-spacing:.04em; }
.tl-card{ padding:26px 30px; }
.tl-card h3{ font-size:19px; margin-bottom:8px; }

/* ============================================================
   BLOG
   ============================================================ */
.blog__grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:24px; }
.post{ background:var(--bg); border-radius:var(--r); padding:34px; box-shadow:var(--sh-up); transition:box-shadow .45s var(--ease), transform .45s var(--ease); display:flex; flex-direction:column; }
.post__meta{ font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); font-weight:600; }
.post h3{ font-size:22px; margin:16px 0 12px; }
.post p{ color:var(--ink-soft); font-size:15px; margin-bottom:22px; flex:1; }
.post__read{ display:inline-flex; align-items:center; gap:10px; font-weight:600; font-size:14px; }
.post__read .ico{ width:26px; height:26px; border-radius:50%; box-shadow:var(--sh-up-sm); transition:box-shadow .3s; }
.post:hover .post__read .ico{ box-shadow:var(--sh-in-sm); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact{ padding-bottom:80px; }
.contact__panel{ background:var(--bg); border-radius:var(--r-lg); padding:clamp(34px,5vw,72px); box-shadow:var(--sh-up-lg); text-align:center; }
.contact__title{ font-size:clamp(30px,4.6vw,54px); margin:18px auto 18px; max-width:680px; }
.contact__sub{ color:var(--ink-soft); max-width:520px; margin:0 auto 44px; font-size:17px; }
.contact__form{ display:grid; grid-template-columns:1fr 1fr; gap:18px; max-width:620px; margin:0 auto 36px; text-align:left; }
.field{ position:relative; }
.field--full{ grid-column:1/-1; }
.field input,.field textarea{
  width:100%; font-family:inherit; font-size:15px; color:var(--ink); background:var(--bg);
  border:none; border-radius:var(--r-sm); padding:22px 20px 8px; box-shadow:var(--sh-in-sm); resize:none;
  transition:box-shadow .3s var(--ease);
}
.field input:focus,.field textarea:focus{ outline:none; box-shadow:var(--sh-press); }
.field label{ position:absolute; left:21px; top:16px; font-size:15px; color:var(--muted); pointer-events:none; transition:.25s var(--ease); }
.field input:focus + label,.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,.field textarea:not(:placeholder-shown) + label{ top:7px; font-size:11px; letter-spacing:.06em; text-transform:uppercase; }
.contact__form .btn--block{ grid-column:1/-1; }
.contact__links{ display:flex; flex-direction:column; align-items:center; gap:18px; }
.contact__links > a{ font-family:'Space Grotesk'; font-weight:600; font-size:clamp(18px,2.4vw,26px); }
.contact__socials{ display:flex; gap:10px; }
.contact__socials a{ padding:10px 20px; border-radius:30px; font-size:14px; font-weight:500; box-shadow:var(--sh-up-sm); transition:box-shadow .3s; }
.contact__socials a:hover{ box-shadow:var(--sh-in-sm); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer{
  max-width:var(--maxw); margin:0 auto; padding:34px 28px 50px;
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  font-size:13px; color:var(--muted);
}
.footer__top{ display:inline-flex; align-items:center; gap:10px; padding:11px 20px; border-radius:30px; font-weight:600; font-size:13px; color:var(--ink); box-shadow:var(--sh-up-sm); transition:box-shadow .3s; }
.footer__top .ico{ width:22px; height:22px; }
.footer__top:hover{ box-shadow:var(--sh-in-sm); }

/* ============================================================
   REVEAL ANIMATIONS (JS toggles .in)
   ============================================================ */
[data-reveal]{ opacity:0; transform:translateY(40px); transition:opacity .9s var(--ease-out), transform .9s var(--ease-out); }
[data-reveal].in{ opacity:1; transform:none; }
[data-stagger]{ opacity:0; transform:translateY(26px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:920px){
  .about__grid{ grid-template-columns:1fr; gap:40px; }
  .about__photo{ justify-self:center; width:100%; max-width:340px; }  /* center + a touch larger on phones */
  .work__grid{ grid-template-columns:1fr; }
  .project--wide{ grid-column:span 1; grid-template-columns:1fr; }
}
@media (max-width:760px){
  .nav__links{
    position:absolute; top:calc(100% + 12px); left:0; right:0; flex-direction:column; gap:8px;
    background:var(--bg); border-radius:24px; padding:18px; box-shadow:var(--sh-up);
    opacity:0; visibility:hidden; transform:translateY(-10px); transition:.35s var(--ease);
  }
  .nav.is-open .nav__links{ opacity:1; visibility:visible; transform:none; }
  .nav__cta{ display:none; }
  .nav__burger{ display:flex; }
  .nav.is-scrolled{ width:calc(100% - 40px); top:14px; padding:9px 12px 9px 20px; }  /* keep full width on phones */
  .section{ padding:90px 22px; }
  .contact__form{ grid-template-columns:1fr; }
  .hero__stats{ gap:30px; }
  .stat b{ font-size:32px; }
  .hero__canvas{ opacity:.4; }   /* recede behind text on small screens */
  .hero{ padding-top:130px; }
}
/* ---- touch devices: tap feedback in place of hover effects ---- */
@media (hover:none){
  .project, .ncard, .skill, .post, .quote, .tl-card, .snowctl__btn, .contact__socials a{
    transition:transform .2s var(--ease), box-shadow .3s var(--ease);
  }
  .project:active, .ncard:active, .skill:active, .post:active, .quote:active, .tl-card:active{
    transform:scale(.985); box-shadow:var(--sh-in-sm);
  }
  .ncard__icon, .project__more .ico, .post__read .ico{ transition:box-shadow .3s var(--ease); }
  .ncard:active .ncard__icon{ box-shadow:var(--sh-in-sm); }
  /* the live preview hint reads better as "tap to open" on touch */
  .project__live::after{ content:""; }

  /* thumb-friendly net controls on touch (44px+ targets) */
  .nrange{ height:44px; }
  .nrange::before, .nrange__fill{ height:16px; }
  .snowctl__range{ height:44px; }
  .snowctl__range::-webkit-slider-runnable-track{ height:44px; }
  .snowctl__range::-moz-range-track{ height:44px; }
  .snowctl__range::-webkit-slider-thumb{ width:36px; height:36px; border-width:9px; margin-top:4px; }
  .snowctl__range::-moz-range-thumb{ width:36px; height:36px; border-width:9px; }
  .snowctl__actions{ gap:12px; }
  .snowctl__btn{ flex:1 1 auto; min-height:48px; padding:14px 22px; font-size:15px; }

  /* shake-hover on touch: periodic wiggle + a fast shake while pressed */
  .shake-hover{ animation:shake-pulse 4s ease-in-out infinite; }
  .shake-hover:active{ animation:shake .3s linear infinite; }
}

/* wild shake on hover — add class "shake-hover" to any element (don't combine with data-magnetic) */
@keyframes shake{
  0%,100%{ transform:translate(0,0) rotate(0deg); }
  10%{ transform:translate(-2.5px,-1.5px) rotate(-2deg); }
  20%{ transform:translate(2.5px,1.5px) rotate(2deg); }
  30%{ transform:translate(-3px,1.5px) rotate(-2deg); }
  40%{ transform:translate(3px,-1.5px) rotate(2deg); }
  50%{ transform:translate(-2px,2px) rotate(-2.5deg); }
  60%{ transform:translate(2px,-2px) rotate(2.5deg); }
  70%{ transform:translate(-3px,-1.5px) rotate(-2deg); }
  80%{ transform:translate(2.5px,1.5px) rotate(2deg); }
  90%{ transform:translate(-1.5px,-2px) rotate(-1.5deg); }
}
.shake-hover:hover{ animation:shake .38s linear infinite; }

/* touch has no hover: wiggle briefly every few seconds so it reads as interactive */
@keyframes shake-pulse{
  0%, 12%, 100%{ transform:translate(0,0) rotate(0deg); }
  2%{ transform:translate(-2.5px,-1.5px) rotate(-2deg); }
  4%{ transform:translate(2.5px,1.5px) rotate(2deg); }
  6%{ transform:translate(-3px,1.5px) rotate(-2deg); }
  8%{ transform:translate(3px,-1.5px) rotate(2deg); }
  10%{ transform:translate(-2px,2px) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition-duration:.01ms !important; }
  [data-reveal]{ opacity:1; transform:none; }
}
