/* =========================================================
   Sunil Samson Suresh: portfolio
   Deep navy base · cobalt structure · amber highlights
   ========================================================= */

:root {
  --bg: #060B16;
  --bg-2: #0A1222;
  --surface: #0D1628;
  --surface-2: #121D34;
  --line: #17233B;
  --line-2: #24365A;
  --text: #E8EDF7;
  --muted: #94A2BF;
  --faint: #7B8AAA;
  --cobalt: #3B7BFF;
  --cobalt-ink: #82ADFF;
  --cobalt-btn: #2D63E0;
  --cobalt-soft: rgba(59, 123, 255, .14);
  --amber: #FFB23F;
  --amber-ink: #FFC56B;
  --amber-soft: rgba(255, 178, 63, .14);
  --grad: linear-gradient(92deg, #5B95FF 0%, #5CC8FF 48%, #FFC36B 100%);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* blueprint grid + cobalt glow, fixed behind everything */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 82% -10%, rgba(59, 123, 255, .16), transparent 70%),
    radial-gradient(700px 500px at 0% 110%, rgba(255, 178, 63, .05), transparent 70%),
    linear-gradient(rgba(130, 173, 255, .04) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(130, 173, 255, .04) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--bg);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 650; color: var(--text); }
kbd {
  font-family: var(--mono); font-size: .78em;
  padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--line-2); border-bottom-width: 2px;
  background: var(--surface); color: var(--text);
}
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
::selection { background: var(--amber); color: var(--bg); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

/* the logo sprite stays in the DOM (display:none would break its gradients) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  background: var(--amber); color: var(--bg); font-weight: 700;
  padding: 10px 14px; border-radius: 8px; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--cobalt-ink);
}

/* scroll progress */
.progress { position: fixed; inset: 0 0 auto; z-index: 60; height: 2px; pointer-events: none; }
.progress span {
  display: block; height: 100%;
  background: var(--grad);
  transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: rgba(6, 11, 22, .74);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(36, 54, 90, .55);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--cobalt-ink);
  box-shadow: 0 8px 24px -10px rgba(59, 123, 255, .7);
}
.brand-text { font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: .2em; color: var(--muted); }

.nav {
  display: flex; gap: 2px; padding: 4px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(13, 22, 40, .6);
}
.nav a {
  padding: 7px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="true"] { color: var(--text); background: var(--cobalt-soft); box-shadow: inset 0 0 0 1px rgba(59, 123, 255, .4); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(13, 22, 40, .6);
  color: var(--muted); cursor: pointer; text-decoration: none;
  transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--cobalt); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.icon-btn kbd { border: 0; background: none; padding: 0; font-size: 15px; color: inherit; }
.icon-btn .glyph, .tile .glyph { fill: currentColor; stroke: none; }
.icon-btn .glyph { width: 19px; height: 19px; }
.menu-btn { display: none; }

.mobile-menu {
  position: absolute; top: calc(100% + 8px); right: var(--gutter);
  width: min(260px, calc(100vw - 2 * var(--gutter)));
  display: grid; gap: 2px; padding: 8px;
  border: 1px solid var(--line-2); border-radius: 18px;
  background: rgba(10, 16, 30, .97);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 12px 14px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 500; }
.mobile-menu a:hover { background: var(--cobalt-soft); }
.menu-sep { height: 1px; margin: 6px 8px; background: var(--line-2); }

@media (max-width: 880px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 520px) {
  .brand-text { font-size: 12px; letter-spacing: .1em; white-space: nowrap; }
  .icon-btn.social { display: none; }   /* the menu carries them on phones */
}

/* =========================================================
   INTRO: the laptop
   The scene box is the open lid; its bottom edge is the hinge. The camera is fixed at deck level
   (perspective-origin on the hinge line), so the closed laptop reads as a thin horizontal slab and
   the opening lid only ever shows its screen side, never the outer shell.
   ========================================================= */
.intro {
  position: relative;
  --lw: min(1040px, 82vw, calc((100svh - var(--header-h) - 130px) / .7));
  --lh: calc(var(--lw) * .64);
  --ld: calc(var(--lw) * .64);
  --lt: calc(var(--lw) * .009);
  --bt: calc(var(--lw) * .016);
  --persp: calc(var(--lw) * 4);
  /* final-state defaults: what reduced motion / no JS shows. The scroll intro overrides these. */
  --open: 1; --wake: 1; --lock: 0; --unlock: 1;
  --bar: 1; --win: 1; --dock: 1; --icons: 1; --card: 1; --hint1: 0; --hint2: 0;
}
.intro-scroll .intro {
  height: 330vh; height: 330svh;
  --open: 0; --wake: 0; --lock: 0; --unlock: 0;
  --bar: 0; --win: 0; --dock: 0; --icons: 0; --card: 0; --hint1: 1; --hint2: 0;
}

.stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: calc(100svh - var(--header-h));
  padding: 28px var(--gutter) 64px;
  overflow-x: clip;
}
.intro-scroll .stage {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h));
  padding-block: 20px 40px;
}

.scene {
  position: relative; flex: none;
  width: var(--lw); height: var(--lh);
  margin-bottom: calc(var(--lw) * .06);           /* room for the front lip and floor glow */
  perspective: var(--persp);
  perspective-origin: 50% calc(100% - 1px);       /* eye level = the closed screen's plane */
}
.rig {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(0);
}

/* ----- lid ----- */
.lid {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--lt) / 2 + 1px);
  height: var(--lh);
  transform-style: preserve-3d;
  transform-origin: 50% 100%;
  transform: rotateX(calc((var(--open) - 1) * 90deg));
}
.lid-front, .lid-back {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border-radius: calc(var(--lw) * .024) calc(var(--lw) * .024) calc(var(--lw) * .006) calc(var(--lw) * .006);
}
.lid-front {
  transform: translateZ(calc(var(--lt) / 2));
  background: #040507;
  box-shadow: inset 0 0 0 1px #343B48, inset 0 0 0 2px #08090C;
}
.intro.is-flat .lid-front, html:not(.intro-scroll) .lid-front { transform: none; }
/* the outer shell faces away from the camera at every angle; it is only a safety net */
.lid-back {
  transform: translateZ(calc(var(--lt) / -2)) rotateY(180deg);
  background: linear-gradient(180deg, #3A404C, #1F232A);
}
/* the lid's front edge: when closed it is the top half of the slab you see */
.lid-edge {
  position: absolute; top: 0;
  left: calc(var(--lw) * .012); right: calc(var(--lw) * .012);
  height: var(--lt);
  transform-origin: 50% 0;
  transform: translateZ(calc(var(--lt) / -2)) rotateX(90deg);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;   /* outer side only */
  border-radius: calc(var(--lw) * .004);
  background: linear-gradient(90deg, #2A2F37, #6E7583 18%, #A3AAB6 50%, #6E7583 82%, #2A2F37);
}
.notch {
  position: absolute; z-index: 3; top: 0; left: 50%;
  width: calc(var(--lw) * .125); height: calc(var(--lw) * .031);
  transform: translateX(-50%);
  border-radius: 0 0 calc(var(--lw) * .01) calc(var(--lw) * .01);
  background: #040507;
}
.notch::after {
  content: ""; position: absolute; left: 50%; top: 42%;
  width: calc(var(--lw) * .006); aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, #2B3550, #0A0D14);
}
.chin {
  position: absolute; left: 50%; bottom: calc(var(--lw) * .009);
  transform: translateX(-50%);
  font: 500 calc(var(--lw) * .0095)/1 var(--ui);
  letter-spacing: .12em; color: rgba(255, 255, 255, .26);
}

/* ----- screen ----- */
.screen {
  position: absolute;
  top: calc(var(--lw) * .016); left: calc(var(--lw) * .016);
  right: calc(var(--lw) * .016); bottom: calc(var(--lw) * .03);
  overflow: hidden;
  border-radius: calc(var(--lw) * .012) calc(var(--lw) * .012) calc(var(--lw) * .003) calc(var(--lw) * .003);
  background: #000;
  font-family: var(--ui); color: #fff; line-height: 1.35;
}
/* fixed desktop-sized canvas (screen aspect .968 : .594), scaled by script.js to the real screen width */
.screen-canvas {
  position: absolute; left: 0; top: 0;
  width: 1000px; height: 613.64px;
  transform-origin: 0 0;
  transform: scale(var(--s, 1));
  container-type: inline-size;
}
.js .screen-canvas:not(.is-scaled) { visibility: hidden; }
html:not(.js) .screen-canvas { width: 100%; height: 100%; transform: none; }
.wall {
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 120%, rgba(20, 60, 160, .55), transparent 70%),
    linear-gradient(165deg, #0A1734 0%, #0D2255 42%, #0A1838 100%);
}
.blob { position: absolute; border-radius: 50%; }
.b1 { left: -24%; bottom: -52%; width: 86%; height: 105%; transform: rotate(-16deg);
      background: radial-gradient(closest-side, rgba(255, 128, 64, .95), rgba(255, 112, 70, .45) 55%, transparent 100%); }
.b2 { left: 12%; bottom: -36%; width: 58%; height: 66%;
      background: radial-gradient(closest-side, rgba(255, 196, 92, .9), rgba(255, 178, 63, .3) 55%, transparent 100%); }
.b3 { right: -28%; bottom: -44%; width: 92%; height: 110%; transform: rotate(14deg);
      background: radial-gradient(closest-side, rgba(45, 107, 255, .95), rgba(45, 107, 255, .35) 58%, transparent 100%); }
.b4 { right: 2%; top: -38%; width: 56%; height: 78%;
      background: radial-gradient(closest-side, rgba(52, 205, 245, .6), rgba(52, 205, 245, .15) 60%, transparent 100%); }

.screen-off {
  position: absolute; inset: 0; z-index: 8; pointer-events: none;
  background:
    linear-gradient(118deg, transparent 30%, rgba(255, 255, 255, .05) 42%, transparent 54%),
    linear-gradient(165deg, #0B0E14 0%, #030407 55%, #07080C 100%);
  opacity: calc(1 - var(--wake));
}
.glare {
  position: absolute; inset: 0; z-index: 9; pointer-events: none;
  background: linear-gradient(118deg, transparent 36%, rgba(255, 255, 255, .035) 46%, transparent 58%);
}

/* lock screen */
.lock {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 6.6cqw;
  background: rgba(3, 6, 16, .22);
  opacity: var(--lock);
  pointer-events: none;
  text-shadow: 0 .2cqw 1.2cqw rgba(0, 0, 0, .25);
}
.lock-date, .lock-time, .lock-user { translate: 0 calc(var(--unlock) * -4cqw); }
.lock-date { font-size: 1.65cqw; font-weight: 500; opacity: .88; }
.lock-time { margin-top: .2cqw; font-size: 9.4cqw; font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lock-user { position: absolute; bottom: 8.4cqw; display: flex; flex-direction: column; align-items: center; gap: .5cqw; }
.lock-user img {
  width: 6.4cqw; height: 6.4cqw; object-fit: cover;
  border-radius: 1.6cqw;
  box-shadow: 0 0 0 .22cqw rgba(255, 255, 255, .3), 0 1cqw 2.4cqw rgba(0, 0, 0, .35);
}
.lock-name { margin-top: .5cqw; font-size: 1.9cqw; font-weight: 600; }
.lock-role { font-size: 1.3cqw; color: #FFD18A; }
.lock-pill {
  display: inline-flex; align-items: center; gap: .6cqw;
  margin-top: 1.2cqw; padding: .55cqw 1.5cqw;
  border-radius: 99px; border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .14);
  font-size: 1.2cqw;
}
.lock-pill svg { width: 1.35cqw; height: 1.35cqw; fill: none; stroke: currentColor; stroke-width: 2.2; overflow: visible; }
.lock-pill .shackle { transform-box: fill-box; transform-origin: 100% 100%; transform: rotate(calc(var(--unlock) * 30deg)); }

/* desktop */
.desk { position: absolute; inset: 0; z-index: 3; }
.intro-scroll .intro:not(.is-ready) .desk { pointer-events: none; }

.menubar {
  position: absolute; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; gap: 1.7cqw;
  height: 2.7cqw; padding: 0 1.5cqw;
  font-size: 1.25cqw; font-weight: 500;
  background: rgba(8, 13, 30, .4);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  transform: translateY(calc((1 - var(--bar)) * -110%));
}
.mb-logo {
  font: 700 1.02cqw/1 var(--mono);
  padding: .26cqw .42cqw; border-radius: .42cqw;
  background: rgba(255, 255, 255, .16);
}
.mb-app { font-weight: 700; }
.mb-menu { display: flex; gap: 1.7cqw; }
.mb-menu a { color: rgba(255, 255, 255, .9); text-decoration: none; border-radius: .4cqw; padding: .1cqw .35cqw; margin: 0 -.35cqw; }
.mb-menu a:hover { background: rgba(255, 255, 255, .16); }
.mb-status { margin-left: auto; display: flex; align-items: center; gap: 1.2cqw; font-variant-numeric: tabular-nums; }
.mb-status svg { width: 1.55cqw; height: 1.55cqw; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* About window */
.window {
  --dx: 0px; --dy: 0px;
  position: absolute; z-index: 4; left: 50%; top: 47%;
  width: 63cqw;
  transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(calc(.93 + .07 * var(--win)));
  opacity: var(--win);
  border-radius: 1.3cqw;
  background: rgba(19, 23, 35, .74);
  -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .6), 0 2.4cqw 6cqw rgba(0, 0, 0, .45);
  text-align: left;
  transition: opacity .35s var(--ease), transform .45s var(--ease), width .45s var(--ease);
}
.window.is-dragging { transition: none; }
.window.is-closed { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(.88); }
.window.is-min { opacity: 0; pointer-events: none; transform: translate(-50%, 30%) translate(var(--dx), var(--dy)) scale(.1); }
.window.is-zoomed { width: 78cqw; }
.window-bar {
  position: relative; display: flex; align-items: center;
  height: 3.3cqw; padding: 0 1.25cqw;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.window.is-dragging .window-bar { cursor: grabbing; }
.lights { position: relative; z-index: 1; display: flex; gap: .75cqw; }
.light {
  position: relative; width: 1.25cqw; height: 1.25cqw; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25);
}
.light::before { content: ""; position: absolute; inset: -6px; }
.light::after {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 1cqw/1 var(--ui); color: rgba(0, 0, 0, .55); opacity: 0;
}
.lights:hover .light::after, .light:focus-visible::after { opacity: 1; }
.l-close { background: #FF5F57; } .l-close::after { content: "×"; }
.l-min { background: #FEBC2E; }   .l-min::after { content: "−"; }
.l-zoom { background: #28C840; }  .l-zoom::after { content: "+"; }
.window-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 1.2cqw; font-weight: 600; color: rgba(255, 255, 255, .55);
}
.window-body {
  display: grid; grid-template-columns: 21cqw minmax(0, 1fr); gap: 2.8cqw; align-items: center;
  padding: .4cqw 2.8cqw 2.8cqw;
}
.photo img {
  width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: 1cqw;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 1.6cqw 3.2cqw rgba(0, 0, 0, .4);
}
.about h1 {
  font-family: var(--display); font-size: 3.3cqw; font-weight: 800;
  font-variation-settings: "opsz" 96; letter-spacing: -.03em; line-height: 1;
}
.about-role {
  margin-top: .8cqw; width: fit-content;
  font-size: 1.7cqw; font-weight: 650;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.about-intro { margin-top: 1.2cqw; font-size: max(11px, 1.4cqw); line-height: 1.5; color: rgba(255, 255, 255, .8); }
.spec { margin: 1.5cqw 0 0; display: grid; gap: .5cqw; font-size: max(10.5px, 1.2cqw); }
.spec div { display: grid; grid-template-columns: 9.5cqw minmax(0, 1fr); gap: 1cqw; align-items: baseline; }
.spec dt { font-family: var(--mono); font-size: max(10px, 1.05cqw); color: rgba(255, 255, 255, .5); }
.spec dd { margin: 0; color: rgba(255, 255, 255, .92); }
.spec .currently { color: #FFD18A; }
.about-actions { margin-top: 1.9cqw; display: flex; flex-wrap: wrap; gap: .9cqw; }
.mac-btn {
  display: inline-flex; align-items: center;
  padding: .55cqw 1.45cqw; border-radius: .7cqw;
  font-size: max(11px, 1.22cqw); font-weight: 500; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  transition: filter .2s;
}
.mac-btn:hover { filter: brightness(1.15); }
.mac-btn-primary { background: linear-gradient(#3C86F7, #2463E7); border-color: rgba(255, 255, 255, .2); }

/* notification */
.notif {
  position: absolute; z-index: 6; top: 3.7cqw; right: 1.3cqw;
  width: 31cqw;
  display: grid; grid-template-columns: 3.6cqw minmax(0, 1fr) auto; gap: 1.1cqw; align-items: start;
  padding: 1.15cqw 1.2cqw;
  border-radius: 1.5cqw;
  background: rgba(30, 34, 46, .8);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 1.2cqw 3cqw rgba(0, 0, 0, .35);
  font-size: max(10.5px, 1.18cqw);
  animation: notif-in .45s var(--ease);
}
.notif[hidden] { display: none; }
@keyframes notif-in { from { opacity: 0; transform: translateX(30%); } }
.notif .app { position: relative; inset: auto; width: 3.6cqw; height: 3.6cqw; }
.notif-title { display: flex; justify-content: space-between; gap: 1cqw; font-weight: 650; }
.notif-time { font-weight: 400; color: rgba(255, 255, 255, .5); }
.notif-body { margin-top: .25cqw; color: rgba(255, 255, 255, .84); }
.notif-link {
  margin-top: .6cqw; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: #8FB8FF;
}
.notif-link:hover { text-decoration: underline; }
.notif-close {
  width: 2cqw; height: 2cqw; min-width: 18px; min-height: 18px;
  display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .7);
  font-size: max(11px, 1.2cqw); line-height: 1;
}

/* dock */
.dock {
  --icon: 3.9cqw;
  position: absolute; z-index: 5; left: 50%; bottom: .9cqw;
  display: flex; align-items: flex-end;
  padding: .5cqw .33cqw;
  border-radius: 1.65cqw;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1cqw 3cqw rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  transform: translateX(-50%) translateY(calc((1 - var(--dock)) * 170%));
}
.dock-item {
  --m: 1;
  --k: clamp(0, calc(var(--icons) * 22 - var(--i)), 1);
  position: relative; flex: none;
  width: calc(var(--icon) * var(--m) * var(--k)); aspect-ratio: 1;
  margin: 0 calc(.225cqw * var(--k));
  padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 23%;
  opacity: var(--k);
  transform-origin: 50% 100%;
  transform: translateY(calc((1 - var(--k)) * 70%)) scale(calc(.5 + .5 * var(--k)));
  transition: width .12s ease-out;
}
.dock.is-measuring .dock-item { transition: none; }
.dock-item:focus-visible { outline-offset: 2px; }
.dock-item.is-running::after {
  content: ""; position: absolute; left: 50%; bottom: -.42cqw;
  width: .36cqw; height: .36cqw; min-width: 3px; min-height: 3px; border-radius: 50%;
  transform: translateX(-50%); background: rgba(255, 255, 255, .85);
}
.dock-sep { flex: none; align-self: stretch; width: 1px; margin: .3cqw calc(.4cqw * var(--icons)); background: rgba(255, 255, 255, .3); opacity: var(--icons); }

/* macOS-style app icons */
.app {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 23%; overflow: hidden;
  box-shadow: 0 .28cqw .7cqw rgba(0, 0, 0, .35), inset 0 0 0 .5px rgba(0, 0, 0, .2);
}
.app::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 46%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.app svg { width: 62%; height: 62%; }
.app-wide svg { width: 82%; }
.app-me img { width: 100%; height: 100%; object-fit: cover; }
.app-light { background: linear-gradient(180deg, #FFFFFF, #E4E9F1); }
.app-pytorch { background: linear-gradient(160deg, #F7784F, #DB3413); color: #fff; }
.app-hf { background: linear-gradient(160deg, #FFE68A, #FFC23D); }
.app-langgraph { background: linear-gradient(160deg, #2E6461, #11302E); color: #fff; }
.app-llama { background: linear-gradient(160deg, #222A3B, #070A12); }
.app-databricks { background: linear-gradient(160deg, #FF6B48, #E0291A); color: #fff; }
.app-spark { background: linear-gradient(160deg, #2C3038, #111318); }
.app-mongo { background: linear-gradient(160deg, #0F5141, #052A22); }
.app-docker { background: linear-gradient(160deg, #46A2FF, #1C63ED); color: #fff; }
.app-fastapi { background: linear-gradient(160deg, #2CC6B4, #0A8579); color: #fff; }
.app-mlflow { background: linear-gradient(180deg, #FFFFFF, #E2F1FB); color: #0194E2; }
.app-gha { background: linear-gradient(160deg, #343B47, #10141A); color: #fff; }
.app.is-bouncing { animation: dock-bounce .9s cubic-bezier(.3, .7, .4, 1); }
@keyframes dock-bounce {
  0%, 100% { transform: translateY(0); }
  18% { transform: translateY(-58%); }
  38% { transform: translateY(0); }
  56% { transform: translateY(-26%); }
  72% { transform: translateY(0); }
  84% { transform: translateY(-7%); }
}
.tip {
  position: absolute; left: 50%; bottom: calc(100% + 1.2cqw);
  padding: .35cqw .95cqw; border-radius: .6cqw;
  background: rgba(30, 34, 46, .92); border: 1px solid rgba(255, 255, 255, .14);
  font: 500 max(10px, 1.1cqw)/1.3 var(--ui); color: #fff; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .15s, transform .15s;
}
.dock-item:hover .tip, .dock-item:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }

/* ----- base: seen edge-on, so only its front lip shows ----- */
.lip {
  position: absolute; top: 100%;
  left: calc(var(--lw) * -.01); right: calc(var(--lw) * -.01);
  height: var(--bt);
  transform: translateZ(var(--ld));
  border-radius: 0 0 calc(var(--lw) * .02) calc(var(--lw) * .02) / 0 0 calc(var(--lw) * .012) calc(var(--lw) * .012);
  background: linear-gradient(180deg, #A2A9B5 0%, #6A707C 18%, #42474F 55%, #1F2228 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.thumb {
  position: absolute; top: 0; left: 50%;
  width: 13%; height: 46%;
  transform: translateX(-50%);
  border-radius: 0 0 calc(var(--lw) * .01) calc(var(--lw) * .01);
  background: linear-gradient(180deg, #24272E, #474C56);
}
/* contact shadow under the laptop, plus a cobalt glow that grows as the screen lights up */
.floor {
  position: absolute; top: 100%;
  left: -18%; right: -18%;
  height: calc(var(--lw) * .11);
  pointer-events: none;
  background: radial-gradient(44% 26% at 50% 20%, rgba(0, 0, 0, .75), transparent 100%);
}
.floor::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(40% 55% at 50% 22%, rgba(59, 123, 255, .34), transparent 100%);
  opacity: var(--wake);
}

/* ----- intro overlays ----- */
.intro-card { display: none; }
.intro-hint, .skip-intro { display: none; }
.intro-scroll .intro-hint {
  display: block; position: absolute; left: 50%; bottom: 18px;
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; pointer-events: none;
}
.intro-scroll .hint-open { top: calc(100% + var(--lw) * .06 + 18px); bottom: auto; opacity: var(--hint1); }
.hint-explore { opacity: var(--hint2); }
.intro-hint span { display: inline-block; margin-left: 6px; color: var(--amber); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
.intro-scroll .skip-intro {
  position: fixed; right: 24px; bottom: 24px; z-index: 30;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 10px 18px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(8, 14, 28, .88); color: var(--text);
  font-size: 15px; cursor: pointer;
  transition: opacity .3s, transform .3s, border-color .2s;
}
.intro-scroll .skip-intro:hover { border-color: var(--cobalt); }
.skip-intro.is-done { opacity: 0; transform: translateY(10px); pointer-events: none; }

@media (max-width: 700px) {
  .intro { --lw: min(82vw, 560px); }
  .stage { padding-top: 24px; }
  .intro-scroll .stage { height: auto; min-height: calc(100svh - var(--header-h)); padding-block: 16px 84px; }
  .scene { margin-bottom: calc(var(--lw) * .1); }
  .intro-card {
    display: block; width: 100%; max-width: 560px;
    opacity: var(--card); transform: translateY(calc((1 - var(--card)) * 18px));
  }
  .intro-card-text { margin-top: 10px; font-size: 1.08rem; line-height: 1.6; color: var(--text); }
  .currently-line { margin-top: 14px; padding: 8px 12px; border-left: 2px solid var(--amber); background: linear-gradient(90deg, var(--amber-soft), transparent); font-family: var(--mono); font-size: 13px; color: var(--text); }
  .currently-line span { color: var(--amber); }
  .intro-card .cta-row { margin-top: 18px; }
  .intro-scroll .skip-intro { right: 16px; bottom: 16px; min-height: 40px; padding: 8px 14px; font-size: 14px; }
  .intro-scroll .hint-explore { bottom: 22px; }
  .intro-scroll .stage { padding-bottom: 64px; }
}

/* short phones: a slightly smaller laptop so the whole intro fits on screen */
@media (max-width: 700px) and (max-height: 760px) {
  .intro { --lw: min(76vw, 560px); }
}

/* =========================================================
   Sections
   ========================================================= */
.section { position: relative; padding-block: clamp(84px, 11vw, 140px); }
.section h2 {
  margin-top: 14px; max-width: 17em; text-wrap: balance;
  font-size: clamp(2.2rem, 5vw, 3.7rem); font-weight: 800;
  font-variation-settings: "opsz" 96; letter-spacing: -.035em; line-height: 1.04;
}
.section-sub { margin-top: 22px; max-width: 46em; color: var(--muted); font-size: 1.12rem; line-height: 1.7; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(10, 18, 34, .6);
  color: var(--muted); font-size: 14px;
}
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 24px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cobalt-btn); color: #fff; box-shadow: 0 14px 34px -14px rgba(59, 123, 255, .9); }
.btn-primary:hover { background: #3A70EE; }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(10, 18, 34, .5); }
.btn-ghost:hover { border-color: var(--cobalt); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.tile {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--cobalt-soft); color: var(--cobalt-ink);
  box-shadow: inset 0 0 0 1px rgba(59, 123, 255, .25);
}
.tile svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile-sm { width: 42px; height: 42px; border-radius: 12px; font-family: var(--mono); font-weight: 700; font-size: 13px; }
.tile-sm svg { width: 19px; height: 19px; }
.tile-amber { background: var(--amber-soft); color: var(--amber-ink); box-shadow: inset 0 0 0 1px rgba(255, 178, 63, .25); }
.side-label { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.link { color: var(--cobalt-ink); text-decoration: underline; text-decoration-color: rgba(130, 173, 255, .4); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 84px); align-items: center; }
.lead { margin-top: 26px; font-size: clamp(1.1rem, 1.6vw, 1.28rem); line-height: 1.65; color: var(--text); }
.body-copy { margin-top: 16px; color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.about-grid .pills { margin-top: 26px; }
.highlights { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hl {
  display: flex; flex-direction: column; gap: 8px;
  min-height: 188px; padding: 22px;
  border-radius: 22px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(19, 31, 56, .82), rgba(10, 17, 32, .82));
  transition: transform .3s var(--ease), border-color .3s;
}
.hl:hover { transform: translateY(-3px); border-color: rgba(59, 123, 255, .5); }
.hl-num {
  height: 42px;
  font-family: var(--mono); font-size: clamp(2rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 42px;
  width: fit-content; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hl-icons { display: flex; align-items: center; gap: 6px; height: 42px; }
.hl-icons .app {
  position: relative; inset: auto;
  width: 36px; height: 36px; border-radius: 10px;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .65), inset 0 0 0 .5px rgba(0, 0, 0, .2);
}
.hl-icons .app svg { width: 64%; height: 64%; }
.hl-title { margin-top: 6px; font-size: 1.08rem; font-weight: 700; line-height: 1.3; color: var(--text); }
.hl-sub { font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--muted); }

/* ---------- Experience ---------- */
.exp-grid { margin-top: 52px; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(24px, 3.5vw, 44px); align-items: start; }
.timeline { --fill: 0; list-style: none; position: relative; padding-left: 46px; display: grid; gap: 22px; }
.timeline::before, .timeline::after {
  content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px;
}
.timeline::before { background: var(--line-2); }
.timeline::after { background: linear-gradient(var(--cobalt), var(--amber)); transform-origin: 50% 0; transform: scaleY(var(--fill)); }
.role { position: relative; }
.role::before {
  content: ""; position: absolute; z-index: 1; left: -41px; top: 30px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cobalt);
}
.role:first-child::before { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 5px var(--amber-soft); }
.role-card {
  padding: clamp(20px, 3vw, 30px);
  border-radius: 26px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(16, 26, 48, .8), rgba(9, 15, 29, .8));
  transition: border-color .3s;
}
.role-card.is-current {
  border-color: rgba(59, 123, 255, .45);
  background: linear-gradient(180deg, rgba(20, 38, 76, .82), rgba(10, 18, 36, .82));
  box-shadow: 0 34px 90px -46px rgba(59, 123, 255, .55);
}
.role-head { display: flex; align-items: flex-start; gap: 16px; }
.role-logo {
  display: grid; place-items: center; flex: none;
  width: 50px; height: 50px; border-radius: 15px;
  background: var(--cobalt-soft); color: var(--cobalt-ink);
  box-shadow: inset 0 0 0 1px rgba(59, 123, 255, .28);
  font-family: var(--mono); font-weight: 700; font-size: 14px;
}
.role-titles { min-width: 0; }
.role-titles h3 { font-size: 1.32rem; font-weight: 700; }
.role-meta { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--muted); font-size: 15px; }
.role-co { color: var(--text); font-weight: 500; }
.sep { color: var(--faint); }
.badge-now {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--amber-soft); color: var(--amber-ink);
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.badge-now::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(255, 178, 63, 0); } 0% { box-shadow: 0 0 0 0 rgba(255, 178, 63, .55); } }
.role-card .pills { margin-top: 16px; }
.role-summary { margin-top: 16px; color: var(--muted); font-size: 1.04rem; line-height: 1.7; }
.role-toggle {
  margin-top: 20px; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); background: none;
  color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
}
.role-toggle:hover { color: var(--text); }
.chev {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(59, 123, 255, .08); flex: none;
}
.chev::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; border-right: 2px solid var(--cobalt-ink); border-bottom: 2px solid var(--cobalt-ink);
  transform: translate(-50%, -70%) rotate(45deg);
  transition: transform .3s var(--ease);
}
.role-toggle[aria-expanded="true"] .chev::before { transform: translate(-50%, -30%) rotate(-135deg); }
.role-details { margin-top: 16px; display: grid; gap: 12px; }
.role-details[hidden] { display: none; }
.js .role-details:not([hidden]) { animation: drop .35s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.detail { padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(5, 10, 20, .45); }
.detail-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--cobalt-ink);
}
.detail-label svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.detail ul { margin-top: 10px; list-style: none; display: grid; gap: 6px; }
.detail li {
  position: relative; margin-left: -10px; padding: 6px 10px 6px 24px;
  border-radius: 10px; color: var(--muted); line-height: 1.65;
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.detail li::before { content: ""; position: absolute; left: 10px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--cobalt); }
.detail li strong { color: var(--text); }
.stack { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.stack span { padding: 4px 11px; border-radius: 999px; background: var(--cobalt-soft); color: var(--cobalt-ink); font-size: 13.5px; }

.exp-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 16px; }
.side-card {
  padding: 24px; border-radius: 24px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(16, 26, 48, .78), rgba(9, 15, 29, .78));
  transition: background-color .3s, box-shadow .3s;
}
.side-card .tile { margin-bottom: 18px; }
.side-card h3 { margin-top: 8px; font-size: 1.22rem; font-weight: 700; line-height: 1.25; }
.side-card h3 + p { margin-top: 10px; color: var(--muted); line-height: 1.6; }
.side-meta { margin-top: 12px; font-family: var(--mono); font-size: 13px; color: var(--amber-ink); }
.side-list { margin-top: 10px; list-style: none; display: grid; gap: 8px; }
.side-list li { position: relative; padding-left: 18px; color: var(--muted); }
.side-list li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

/* skill highlight + jump flash */
[data-skills].lit { color: var(--text); background: var(--amber-soft); box-shadow: inset 3px 0 0 var(--amber); }
.body-copy.lit, .lead.lit { border-radius: 10px; padding: 8px 12px; margin-inline: -12px; }
[data-skills].flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 40% { box-shadow: inset 3px 0 0 var(--amber), 0 0 0 3px rgba(255, 178, 63, .5); } }

/* ---------- Statement ---------- */
.statement { padding-block: clamp(90px, 16vw, 210px); text-align: center; }
.statement-text {
  max-width: 17em; text-wrap: balance; margin: 0 auto; padding-inline: var(--gutter);
  font-size: clamp(2rem, 5.6vw, 4.4rem); font-weight: 800;
  font-variation-settings: "opsz" 96; letter-spacing: -.04em; line-height: 1.08;
}
.statement .line { display: block; }
.grad-line { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.js .statement .line {
  --rv: 110%;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--rv) - 12%), rgba(0, 0, 0, .16) var(--rv));
          mask-image: linear-gradient(90deg, #000 calc(var(--rv) - 12%), rgba(0, 0, 0, .16) var(--rv));
}

/* ---------- Skills ---------- */
.editor {
  margin-top: 52px; overflow: hidden;
  border-radius: 26px; border: 1px solid var(--line-2);
  background: rgba(8, 14, 27, .88);
  box-shadow: 0 50px 120px -70px rgba(59, 123, 255, .55);
}
.editor-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  background: rgba(18, 28, 50, .6);
}
.dots { display: inline-flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; }
.dots i:nth-child(2) { background: #FEBC2E; }
.dots i:nth-child(3) { background: #28C840; }
.editor-path { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.editor-meta { margin-left: auto; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.skill-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.skill-col { padding: 26px 24px 28px; border-right: 1px solid var(--line); }
.skill-col:last-child { border-right: 0; }
.col-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--cobalt-ink); }
.skill-col h3 { margin-top: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 1.15rem; font-weight: 700; }
.col-num { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--faint); }
.chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 6px 12px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: rgba(14, 23, 42, .7);
  font-family: var(--mono); font-size: 13px; color: var(--text);
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s, transform .2s var(--ease);
}
.chip:hover { border-color: var(--cobalt); transform: translateY(-1px); }
.chip.is-active { border-color: var(--amber); background: var(--amber-soft); color: var(--amber-ink); }
.chip[aria-pressed="true"] { box-shadow: 0 0 0 3px rgba(255, 178, 63, .18); }
.chip-ico {
  display: grid; place-items: center; flex: none;
  width: 20px; height: 20px; border-radius: 6px;
  background: linear-gradient(180deg, #fff, #E4E9F1);
}
.chip-ico svg { width: 72%; height: 72%; }
.chip-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 6px; background: var(--cobalt-soft); color: var(--cobalt-ink); font-size: 11px;
}
.chip.is-active .chip-count { background: var(--amber); color: var(--bg); }
.match { min-height: 132px; padding: 20px 24px 24px; border-top: 1px solid var(--line); background: rgba(4, 8, 16, .6); font-family: var(--mono); font-size: 13.5px; }
.match-prompt, .match-head { color: var(--text); }
.prompt { color: var(--amber); margin-right: 4px; }
.match-head b { color: var(--amber); font-weight: 700; }
.match-list { margin-top: 12px; list-style: none; display: grid; gap: 8px; }
.match-list button {
  width: 100%; display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 14px; align-items: baseline;
  padding: 10px 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: transparent;
  transition: border-color .2s, background-color .2s;
}
.match-list button:hover { border-color: var(--cobalt); background: var(--cobalt-soft); }
.match-src { color: var(--amber); font-size: 12.5px; }
.match-txt { font-family: var(--display); font-size: 14.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-txt mark { background: none; color: var(--amber-ink); font-weight: 650; }
.match-go { font-size: 12px; color: var(--cobalt-ink); }

/* ---------- Contact ---------- */
.contact-grid {
  margin-top: 52px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(16px, 3vw, 36px); align-items: center;
  padding: clamp(12px, 2vw, 22px);
  border-radius: 32px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(20, 36, 72, .8), rgba(9, 16, 31, .85));
  box-shadow: 0 40px 100px -60px rgba(59, 123, 255, .65);
}
.contact-card { padding: clamp(14px, 2.6vw, 28px); }
.contact-card .tile { margin-bottom: 20px; }
.contact-card h3 { margin-top: 8px; font-size: 1.6rem; font-weight: 700; }
.contact-card .muted { margin-top: 12px; line-height: 1.7; }
.contact-card .cta-row { margin-top: 26px; }
.code-card { overflow: hidden; border-radius: 22px; border: 1px solid var(--line-2); background: rgba(6, 11, 22, .9); }
.contact-rows { list-style: none; padding: 18px; display: grid; gap: 12px; }
.crow {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(5, 10, 20, .45);
}
.crow .side-label { display: block; }
a.crow { color: inherit; text-decoration: none; transition: border-color .2s, background-color .2s; }
a.crow:hover { border-color: var(--cobalt); background: var(--cobalt-soft); }
a.crow:hover .row-value { color: var(--amber-ink); }
a.crow:hover .row-btn { color: var(--text); border-color: var(--cobalt); }
.row-value { display: block; margin-top: 2px; font-family: var(--mono); font-size: 15px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
a.row-value:hover { color: var(--amber-ink); }
.row-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; border: 1px solid var(--line-2); background: rgba(13, 22, 40, .6);
  color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s;
}
.row-btn:hover { color: var(--text); border-color: var(--cobalt); }
.row-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 34px 46px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; color: var(--muted); font-size: 14px; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-weight: 700; letter-spacing: .2em; color: var(--text); }
.footer-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.footer-inner kbd { padding: 0 4px; margin-right: 2px; }

.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 30;
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(8, 14, 28, .88); color: var(--text);
  cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .3s, transform .3s, border-color .2s;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { border-color: var(--cobalt); }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Command palette ---------- */
.palette {
  width: min(560px, calc(100vw - 32px));
  margin: 14vh auto auto; padding: 0;
  border: 1px solid var(--line-2); border-radius: 16px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(59, 123, 255, .1);
}
.palette::backdrop { background: rgba(4, 8, 16, .66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.palette[open] { animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.palette input {
  width: 100%; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--text); font-family: var(--mono); font-size: 15px;
}
.palette input::placeholder { color: var(--faint); }
.palette input:focus { outline: none; }
#palette-list { list-style: none; padding: 6px; max-height: 52vh; overflow-y: auto; }
#palette-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; }
#palette-list li .k { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
#palette-list li[aria-selected="true"] { background: var(--cobalt-soft); box-shadow: inset 2px 0 0 var(--cobalt); }
#palette-list li[aria-selected="true"] .k { color: var(--cobalt-ink); }
#palette-list .empty { color: var(--faint); cursor: default; font-family: var(--mono); font-size: 13px; }
.palette-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.palette-foot kbd { padding: 0 5px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70;
  width: max-content; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 14px;
  padding: 12px 12px 12px 16px;
  border: 1px solid var(--line-2); border-left: 3px solid var(--amber); border-radius: 12px;
  background: var(--surface-2); color: var(--text);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
  font-size: 15px; transform: translateX(-50%);
}
.toast[hidden] { display: none; }
.toast a { color: var(--amber); }
.toast-close { flex: none; width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; }
.js .toast:not([hidden]) { animation: toast-in .3s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Konami: app icons rain ---------- */
.rain { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.rain .app { position: absolute; inset: auto; top: -80px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(115vh) rotate(var(--rot, 0deg)); } }

/* ---------- Custom cursor (mouse only, added by JS) ---------- */
.cursor-ring, .cursor-dot {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  border-radius: 50%; opacity: 0; transition: opacity .2s;
}
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1.5px solid rgba(130, 173, 255, .7);
  transition: opacity .2s, width .2s var(--ease), height .2s var(--ease), margin .2s var(--ease), background-color .2s, border-color .2s;
}
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--amber); }
.cursor-on .cursor-ring, .cursor-on .cursor-dot { opacity: 1; }
.cursor-hover .cursor-ring { width: 52px; height: 52px; margin: -26px 0 0 -26px; background: rgba(59, 123, 255, .1); border-color: var(--amber); }
.cursor-down .cursor-ring { width: 24px; height: 24px; margin: -12px 0 0 -12px; }

/* ---------- Scroll reveal (a few key blocks only) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .skill-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-col:nth-child(2) { border-right: 0; }
  .skill-col:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 960px) {
  .about-grid, .exp-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .exp-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 620px) {
  .skill-cols { grid-template-columns: minmax(0, 1fr); }
  .skill-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .skill-col:last-child { border-bottom: 0; }
  .timeline { padding-left: 30px; }
  .timeline::before, .timeline::after { left: 6px; }
  .role::before { left: -30px; }
  .role-logo { width: 42px; height: 42px; border-radius: 13px; font-size: 13px; }
  .badge-now { display: none; }
  .role-meta { flex-direction: column; gap: 2px; }
  .role-meta .sep { display: none; }
  .highlights { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hl { min-height: 0; padding: 18px 20px; }
  .contact-grid { padding: 8px; border-radius: 26px; }
  .contact-rows { padding: 10px; gap: 10px; }
  .crow { gap: 12px; padding: 12px; border-radius: 16px; }
  .crow .tile-sm { width: 38px; height: 38px; border-radius: 11px; }
  .row-value { font-size: 13px; }
  a.crow .row-btn { display: none; }        /* the whole row is the link */
  .site-footer { padding-bottom: 96px; }    /* keep the floating back-to-top button off the text */
  .match-list button { grid-template-columns: minmax(0, 1fr) auto; }
  .match-txt { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .to-top { right: 16px; bottom: 16px; }
}

/* ---------- Reduced motion: keep it calm ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .statement .line { -webkit-mask-image: none; mask-image: none; }
}
