/* ============================================================
   SYS::MU — muhammeduygur.dev
   Molten-amber-on-void · code-voice · cinematic terminal
   Progressive enhancement: default CSS = final, legible, at-rest.
   Motion start-states are gated behind body.motion (JS + motion-ok).
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* palette */
  --bg:      #080A0C;
  --bg-2:    #0B0E11;
  --surface: #0F1316;
  --surface-2:#141A1E;
  --line:    #1D2429;
  --ink:     #E8EAE6;
  --muted:   #7C8A88;
  --muted-2: #55605E;
  --accent:  #FF5B2E;   /* amber — attention / pulse */
  --accent-ink:#FF7A50;
  --mint:    #3DF5C4;   /* success ONLY */
  --sel:     rgba(255,91,46,.22);

  /* type */
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --disp: 'Syne', 'Space Grotesk', var(--mono);
  --serif:'Fraunces', Georgia, serif;

  --fs-hero:  clamp(2.6rem, 9vw, 7rem);
  --fs-cmd:   clamp(1.05rem, 3.4vw, 1.7rem);
  --fs-lead:  clamp(1.1rem, 2.2vw, 1.4rem);
  --fs-body:  15px;
  --fs-sm:    12.5px;
  --fs-xs:    11px;
  --fs-whisper: clamp(1.15rem, 2.4vw, 1.55rem);

  /* space (8px base) */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px;
  --s6: 64px; --s7: 96px; --s8: 128px; --s9: 180px;

  --maxw: 1200px;
  --gutter-w: clamp(28px, 5vw, 64px);

  /* motion */
  --ease: cubic-bezier(.22,.61,.16,1);      /* quick-out / slow-settle */
  --ease-in: cubic-bezier(.6,.04,.98,.34);
  --dur: .6s;

  --scan: rgba(0,0,0,.5);
  --grain-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-body);
  line-height: 1.75;
  font-feature-settings: "liga" 0, "calt" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
img,svg,canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul,ol { list-style: none; padding: 0; }
::selection { background: var(--sel); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 200;
  background: var(--accent); color: #000; padding: 8px 14px; font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* shared atoms */
.prompt { color: var(--accent); }
.sep { color: var(--muted); }
.ok { color: var(--mint); }
.chrome__path { color: var(--mint); }
.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 10px var(--mint); vertical-align: middle;
}
.caret {
  display: inline-block; width: .58em; height: 1.05em; background: var(--accent);
  vertical-align: -0.18em; margin-left: .12em; box-shadow: 0 0 12px rgba(255,91,46,.6);
}
.motion .caret { animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 0%,50%{opacity:1} 50.01%,100%{opacity:0} }

kbd {
  font-family: var(--mono); font-size: .8em; line-height: 1;
  padding: 3px 6px; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; background: var(--surface); color: var(--ink);
}

/* ============================================================
   CURSOR (desktop pointer only)
   ============================================================ */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  body.js.cursor-on,
  body.js.cursor-on a,
  body.js.cursor-on button,
  body.js.cursor-on input,
  body.js.cursor-on [tabindex] { cursor: none; }
  .cursor {
    display: block; position: fixed; top: 0; left: 0; z-index: 300;
    width: 12px; height: 20px; pointer-events: none; will-change: transform;
    transform: translate3d(-100px,-100px,0);
    mix-blend-mode: difference;
  }
  .cursor__glyph {
    display: block; width: 100%; height: 100%; background: var(--accent);
    box-shadow: 0 0 14px rgba(255,91,46,.7);
    transition: width .18s var(--ease), height .18s var(--ease), background .18s;
  }
  .cursor.is-text .cursor__glyph { width: 3px; height: 22px; }
  .cursor.is-probe .cursor__glyph { width: 22px; height: 3px; margin-top: 17px; }
  .cursor.is-hot   { mix-blend-mode: normal; }
  .cursor.is-hot .cursor__glyph { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,91,46,.18); border: 1px solid var(--accent); box-shadow: 0 0 24px rgba(255,91,46,.4); }
  .motion .cursor.is-idle .cursor__glyph { animation: blink 1.05s steps(1) infinite; }
}

/* ============================================================
   ATMOSPHERE — WebGL canvas / CRT / grain
   ============================================================ */
.bg {
  position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease);
}
.bg.is-on { opacity: 1; }
.crt, .grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.crt {
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(0,0,0,.55) 100%),
    repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(0,0,0,.16) 3px);
  opacity: .35; mix-blend-mode: multiply;
}
.grain { opacity: .05; background-image: var(--grain-url); background-size: 180px; }
.motion .crt { animation: scanroll 8s linear infinite; }
@keyframes scanroll { to { background-position: 0 0, 0 6px; } }

/* content sits above atmosphere */
.chrome, .nav, main, .foot, .palette { position: relative; z-index: 5; }

/* ============================================================
   BOOT
   ============================================================ */
.boot {
  position: fixed; inset: 0; z-index: 400; background: var(--bg);
  display: grid; place-items: center; overflow: hidden;   /* full-screen curtain never spills its boot-log content */
  transition: opacity .6s var(--ease), visibility .6s;
}
.no-js .boot { display: none; }
body[data-boot="done"] .boot { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__inner { width: min(560px, 84vw); display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.boot__mark { width: 96px; height: auto; color: var(--accent); overflow: visible; }
.boot__mark-stroke { fill: none; stroke: var(--accent); stroke-width: 18px; }
.boot__mark-fill { fill: var(--accent); opacity: 0; }
.boot__log {
  font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted);
  width: 100%; min-height: 120px; white-space: pre-wrap; line-height: 1.7;
  margin: 0;
}
.boot__log .ok { color: var(--mint); }
.boot__log .accent { color: var(--accent); }
.boot__bar { width: 100%; height: 2px; background: var(--line); overflow: hidden; }
.boot__bar > i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.boot__skip {
  font-size: var(--fs-xs); color: var(--muted); letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 6px; transition: color .2s, border-color .2s;
}
.boot__skip:hover { color: var(--ink); border-color: var(--muted); }

/* ============================================================
   CHROME (terminal title bar)
   ============================================================ */
.chrome {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  height: 46px; padding: 0 clamp(12px, 2.5vw, 22px);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.chrome__l { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.mark { display: grid; place-items: center; width: 26px; height: 20px; color: var(--accent); }
.mark__svg { width: 26px; height: auto; fill: var(--accent); filter: drop-shadow(0 0 8px rgba(255,91,46,.4)); transition: transform .3s var(--ease); }
.mark:hover .mark__svg { transform: translateY(-1px) scale(1.05); }
.chrome__dots { display: inline-flex; gap: 7px; }
.chrome__dots .d { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.chrome__dots .d--close { background: var(--accent); }
.motion .chrome__dots .d--close { animation: pulse 2.6s var(--ease) infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(255,91,46,.5)} 50%{box-shadow:0 0 0 4px rgba(255,91,46,0)} }
.chrome__title { font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chrome__r { display: flex; align-items: center; gap: var(--s2); }
.telemetry { display: flex; gap: var(--s2); align-items: center; }
.tel { display: flex; gap: 6px; align-items: baseline; font-size: var(--fs-xs); }
.tel dt { color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; }
.tel dd { color: var(--muted); font-variant-numeric: tabular-nums; }
.tel--fps dd { color: var(--mint); }
.kbtn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.kbtn:hover { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(255,91,46,.25); }
.kbtn kbd { border: none; background: none; padding: 0; color: var(--accent); font-size: .95em; }
.kbtn__label { color: var(--muted); font-size: var(--fs-sm); }

/* nav */
.nav {
  position: fixed; top: 46px; right: clamp(12px,2.5vw,22px); z-index: 39;
  display: flex; gap: var(--s2); padding: 8px 0; font-size: var(--fs-sm);
}
.nav a { color: var(--muted); position: relative; padding: 2px 0; }
.nav a::after { content:""; position:absolute; left:0; bottom:-1px; height:1px; width:0; background: var(--accent); transition: width .28s var(--ease); }
.nav a:hover { color: var(--ink); } .nav a:hover::after { width: 100%; }
@media (max-width: 900px) { .nav { display: none; } }
@media (max-width: 700px) { .telemetry { display: none; } .chrome__title { display: none; } }

/* ============================================================
   LAYOUT — gutter + sections
   ============================================================ */
main { padding-left: var(--gutter-w); }
.gutter {
  position: fixed; top: 46px; left: 0; bottom: 0; width: var(--gutter-w); z-index: 6;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; padding-top: var(--s3);
  gap: 4px; font-size: 10px; color: var(--muted-2); overflow: hidden;
  background: linear-gradient(var(--bg), transparent 40%);
  pointer-events: none;
}
.gutter span { font-variant-numeric: tabular-nums; letter-spacing: .05em; }
@media (max-width: 640px) { main { padding-left: 0; } .gutter { display: none; } }

.sec {
  max-width: var(--maxw); margin: 0 auto; padding: var(--s6) clamp(20px,5vw,64px);
  border-top: 1px solid var(--line);
}
.sec__head { display: flex; align-items: center; gap: 10px; font-size: var(--fs-cmd); margin-bottom: var(--s4); flex-wrap: wrap; }
.sec__head .cmd { color: var(--ink); }
.sec__head::after { content: ""; display: inline-block; width: .5em; height: 1.05em; background: var(--accent); }
.motion .sec__head::after { animation: blink 1.05s steps(1) infinite; }
.sec__body { max-width: 920px; }

/* whisper (Fraunces) */
.whisper {
  font-family: var(--serif); font-style: italic; font-size: var(--fs-whisper);
  color: var(--ink); font-optical-sizing: auto; font-weight: 400; line-height: 1.35;
}
.whisper--sec { color: var(--muted); margin-top: var(--s3); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; padding: 84px clamp(20px,5vw,64px) var(--s6);
  display: flex; flex-direction: column; justify-content: center;
  max-width: var(--maxw); margin: 0 auto; border: none;
}
.hero__wrap { width: 100%; }
.hero__cmd { font-size: var(--fs-sm); color: var(--ink); margin-bottom: var(--s4); }
.hero__cmd .prompt { color: var(--accent); }
.hero__cmd .typed { color: var(--ink); }

.hero__stage {
  position: relative; display: grid; justify-items: center; align-items: center;
  min-height: min(58vh, 520px);
}
.hero__name {
  position: relative; z-index: 1; display: flex; flex-direction: column;
  align-items: center; font-family: var(--disp); font-weight: 700;
  font-size: var(--fs-hero); line-height: .84; letter-spacing: -.03em;
  text-align: center; margin: 0;
}
.hero__word { display: block; font-variation-settings: "wght" 700; }
.hero__word--back  { color: var(--ink); position: relative; z-index: 1; }
.hero__word--front { color: var(--ink); position: relative; z-index: 3; }
.motion .hero__word--front { text-shadow: 2px 0 rgba(255,91,46,.25), -2px 0 rgba(61,245,196,.12); }

.hero__photo {
  position: absolute; z-index: 2; bottom: -4%; left: 50%; translate: -50% 0;
  width: auto; height: clamp(280px, 62vh, 560px);
  display: flex; justify-content: center;
  -webkit-mask-image: linear-gradient(#000 80%, transparent 99%);
          mask-image: linear-gradient(#000 80%, transparent 99%);
}
.hero__photo picture,.hero__photo img { height: 100%; width: auto; object-fit: contain; position: relative; z-index: 1; }
/* soft radial stage-light so the dark figure separates from the void even without particles */
.hero__photo::before {
  content: ""; position: absolute; z-index: 0; left: 50%; top: 42%; translate: -50% -50%;
  width: 150%; height: 118%;
  background: radial-gradient(ellipse at center, rgba(255,110,60,.12) 0%, rgba(120,140,160,.06) 34%, transparent 66%);
  pointer-events: none;
}
/* duotone + rim-light that follows the silhouette (not a rectangle) */
.hero__photo img {
  filter: grayscale(.5) contrast(1.06) brightness(1.5)
          drop-shadow(-10px 0 20px rgba(255,91,46,.38))
          drop-shadow(10px 6px 22px rgba(0,0,0,.6));
}
.hero__photo .leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.leaders path { fill: none; stroke: var(--accent); stroke-width: 1; }
.leaders circle { fill: var(--accent); }
.leaders text { fill: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .05em; }
.fig { position: absolute; bottom: -26px; left: 50%; translate: -50% 0; white-space: nowrap; font-size: var(--fs-xs); color: var(--muted-2); }

.hero__stdout { margin-top: var(--s5); font-size: var(--fs-body); color: var(--ink); display: grid; gap: 4px; }
.hero__stdout .out__k { color: var(--muted); }
.hero__stdout .out__c { color: var(--muted); }
.hero .whisper { margin-top: var(--s3); }

.hint {
  display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s5);
  font-size: var(--fs-sm); color: var(--muted);
}
.hint kbd { color: var(--accent); }
.hint__scroll { color: var(--muted-2); margin-left: 6px; }
.motion .hint { animation: floaty 3s var(--ease) infinite; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(4px)} }

/* ---- 3D EXTRUDED HERO NAME (chosen hero) ---- */
.hero__grain { position: absolute; inset: -40%; z-index: 1; pointer-events: none; opacity: .05; mix-blend-mode: soft-light; background-image: var(--grain-url); background-size: 150px; }
.hero__namewrap { position: relative; z-index: 2; width: 100%; display: flex; justify-content: center; perspective: 1200px; perspective-origin: 50% 42%; margin: clamp(10px, 2.4vw, 26px) 0; }
.hero__namewrap::after { content: ""; position: absolute; left: 50%; top: 58%; width: min(78vw, 900px); height: 34%; transform: translate(-50%, 0); background: radial-gradient(60% 100% at 50% 0%, rgba(255,91,46,.16), transparent 70%); filter: blur(14px); z-index: -1; pointer-events: none; }
.hero__name--3d {
  display: block; text-align: center; margin: 0;
  font-family: var(--disp); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.8rem, 9vw, 8rem); line-height: .9; letter-spacing: -.02em;
  transform-style: preserve-3d; backface-visibility: hidden; will-change: transform;
  background: linear-gradient(178deg, #FDF8F1 0%, #ECE5DC 38%, #C7BFB4 70%, #8F8C84 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hero__name--3d .hero__word { display: block; }
.motion .hero__name--3d { opacity: 0; transition: opacity .9s var(--ease); }
.motion .hero__name--3d.in { opacity: 1; }

/* ---- Vortex hero: the name is drawn as amber embers on <canvas>; scrolling
   sucks them into a spinning whirlpool, scrolling back re-forms the name.
   The DOM name stays for a11y + the non-vortex (mobile/reduced-motion) fallback. ---- */
.hero__pin { position: relative; width: 100%; }
.hero__foot { display: flex; flex-direction: column; gap: var(--s3); }
.vortex { display: none; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.vortex-on .vortex { display: block; }

.vortex-on #hero { height: 260vh; min-height: 260vh; padding: 0; max-width: none; display: block; }
.vortex-on .hero__pin {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  margin-left: calc(-1 * var(--gutter-w)); width: calc(100% + var(--gutter-w));
  display: flex;
}
.vortex-on .hero__wrap {
  position: relative; z-index: 2; width: 100%;
  max-width: var(--maxw); margin: 0 auto;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 84px clamp(24px, 5vw, 72px) var(--s5);
}
/* crisp, readable name at rest — it dissolves into the swirl on scroll (JS crossfade) */
/* dark halo around each letterform so the name reads over the logo field (no plate) */
.hero__name--crisp { position: relative; z-index: 2; color: var(--ink); text-transform: uppercase; letter-spacing: -.03em; will-change: opacity;
  text-shadow: 0 0 42px #080A0C, 0 0 20px #080A0C, 0 0 9px #080A0C, 0 3px 32px rgba(0,0,0,.8); }
/* subtle dark glow behind the terminal text so it stays legible over the logos */
.vortex-on .hero__cmd, .vortex-on .hero__foot { text-shadow: 0 0 14px #080A0C, 0 0 7px #080A0C, 0 1px 4px #080A0C; }
.hero__desc { color: var(--muted); font-size: var(--fs-body); max-width: 48ch; line-height: 1.6; }
.motion .hero__name--crisp { opacity: 0; transition: opacity .8s var(--ease); }
.motion .hero__name--crisp.in { opacity: 1; }
.vortex-on .hero__foot { gap: var(--s2); max-width: 60ch; }

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: var(--s5); align-items: stretch; }
.sec--about .code { display: flex; flex-direction: column; justify-content: center; }  /* center code so it matches the framed prose height */
.code {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: var(--s3); font-size: var(--fs-body); line-height: 1.85; overflow-x: auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.code code { font-feature-settings: "liga" 1, "calt" 1; white-space: pre; }
.tk-key{color:#c792ea}.tk-var{color:#82aaff}.tk-prop{color:var(--ink)}.tk-str{color:var(--mint)}
.tk-op{color:var(--accent)}.tk-bool{color:var(--accent-ink)}.tk-fn{color:#82aaff}.tk-com{color:var(--muted-2);font-style:italic}
.about__prose { display: grid; gap: var(--s2); align-content: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: var(--s4) var(--s3); box-shadow: inset 0 1px 0 rgba(255,255,255,.02); }
.comment { color: var(--muted); position: relative; }
.comment::before { content: "// "; color: var(--muted-2); }

/* ============================================================
   METRICS
   ============================================================ */
.diff { display: grid; gap: 10px; font-size: clamp(1rem,2.4vw,1.35rem); }
.diff__row { color: var(--ink); position: relative; padding-left: 1.4em; }
.diff__plus { position: absolute; left: 0; color: var(--mint); font-weight: 700; }
.diff__num { color: var(--mint); font-variant-numeric: tabular-nums; font-weight: 700; }

/* ============================================================
   SKILLS
   ============================================================ */
.sec--skills .sec__body { max-width: var(--maxw); }
.graph { width: 100%; position: relative; }
.graph svg { width: 100%; height: auto; display: block; overflow: visible; }
.skills__lists { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin-top: var(--s4); }
.js .skills__lists { /* still shown; graph augments */ }
.skillset h3 { font-family: var(--mono); font-weight: 500; font-size: var(--fs-body); color: var(--ink); display: flex; align-items: center; gap: 8px; margin-bottom: var(--s2); letter-spacing: .02em; }
.dot--dev { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.dot--des { background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.skillset ul { display: flex; flex-wrap: wrap; gap: 8px; }
/* wide screens: the design column mirrors to the RIGHT so it lines up with the
   graph's design side (labels sit on the right edge, dot after the title) */
@media (min-width: 760px){
  /* row-reverse flips the main axis → flex-START packs to the visual RIGHT (dot ends up after the title) */
  .skills__lists .skillset:last-child h3 { flex-direction: row-reverse; justify-content: flex-start; }
  .skills__lists .skillset:last-child ul { justify-content: flex-end; }
}
.skillset li {
  font-size: var(--fs-sm); color: var(--muted); padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
  transition: color .2s, border-color .2s, transform .2s var(--ease);
}
.skillset li:hover { color: var(--ink); border-color: var(--muted); transform: translateY(-2px); }

/* ============================================================
   EDUCATION
   ============================================================ */
.edu__list { display: grid; gap: 2px; }
.edu__row {
  display: grid; grid-template-columns: 72px 1fr auto auto; gap: var(--s3); align-items: baseline;
  padding: var(--s2) var(--s2); border-bottom: 1px solid var(--line);
}
.edu__deg { color: var(--accent); font-weight: 700; }
.edu__field { color: var(--ink); }
.edu__inst { color: var(--muted); font-size: var(--fs-sm); }
.edu__yr { color: var(--muted-2); font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }

/* ============================================================
   WORK
   ============================================================ */
.work { display: grid; gap: 2px; max-width: var(--maxw); }
.proj {
  display: grid; grid-template-columns: 54px minmax(0,1fr) minmax(0,300px); gap: var(--s3);
  align-items: center; padding: var(--s4) var(--s2); border-top: 1px solid var(--line);
  transition: background .3s var(--ease); position: relative;
}
.proj:last-child { border-bottom: 1px solid var(--line); }
.proj:hover, .proj:focus-visible { background: var(--surface); outline: none; }
.proj__id { font-size: var(--fs-sm); color: var(--muted-2); font-variant-numeric: tabular-nums; align-self: start; padding-top: 6px; }
.proj__name {
  font-family: var(--disp); font-weight: 600; font-size: clamp(1.4rem,3.4vw,2.1rem);
  letter-spacing: -.02em; color: var(--ink); line-height: 1.05; margin-bottom: 8px;
}
.proj:hover .proj__name, .proj:focus-visible .proj__name { color: var(--accent); }
.proj__desc { color: var(--muted); font-size: var(--fs-body); margin-bottom: var(--s2); max-width: 52ch; }
.proj__block { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s4); font-size: var(--fs-sm); }
.proj__block > div { display: flex; gap: 8px; }
.proj__block dt { color: var(--muted-2); } .proj__block dt::after { content: ""; }
.proj__block dd { color: var(--muted); }
.proj__diagram { height: 150px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); position: relative; overflow: hidden; }
.proj__diagram svg { width: 100%; height: 100%; }
@media (max-width: 820px) {
  .proj { grid-template-columns: 40px 1fr; }
  .proj__diagram { grid-column: 1 / -1; height: 120px; }
}

/* ============================================================
   COLOPHON
   ============================================================ */
.colophon { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,.7fr); gap: var(--s5); align-items: stretch; }
.colophon .code { display: flex; flex-direction: column; justify-content: center; }
.code--src { font-size: var(--fs-sm); }
.spec { display: grid; gap: 10px; align-content: space-between; }
.spec li { display: flex; justify-content: space-between; gap: var(--s2); border-bottom: 1px dashed var(--line); padding-bottom: 8px; font-size: var(--fs-sm); }
.spec span { color: var(--muted); }
.spec b { color: var(--ink); font-weight: 500; }
.spec b.ok { color: var(--mint); }

/* ============================================================
   CONTACT
   ============================================================ */
.sec--contact { border-bottom: 1px solid var(--line); }
.sec--contact .sec__body { max-width: var(--maxw); }
.contact { display: block; }
.contact__head { max-width: var(--maxw); margin-bottom: clamp(28px,5vw,52px); }
.contact__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: stretch; }

/* left: terminal "compose mail" window — balances the link cards at equal height */
.contact__mail { position: relative; }
.mailwin { height: 100%; position: relative; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0) 42%); }
.mailwin::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(58% 46% at 50% 44%, rgba(255,91,46,.13), transparent 70%); }
.mailwin__bar { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.mailwin__bar .idn__dot:first-child { background: var(--accent); }
.mailwin__title { margin-left: 8px; }
.mailwin__net { margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.mailwin__net i { width: 7px; height: 7px; border-radius: 50%; background: #3DF5C4; }
.motion .mailwin__net i { animation: blink 1.4s steps(1) infinite; }
.mailwin__body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px; padding: 30px 24px; }
.mailwin__lines { font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); margin: 0; line-height: 1.95; }
.mailwin__lines .ml-k { color: var(--accent); display: inline-block; width: 2.6em; }
.mailwin__foot { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.mailwin__cta .mailcta__k { color: var(--accent); margin-right: .4em; }
.mailwin__st { display: inline-flex; align-items: center; gap: 6px; }
.mailwin__st .dot { width: 7px; height: 7px; border-radius: 50%; background: #3DF5C4; }
.mailcaret { display: inline-block; width: .5em; height: 1em; background: var(--accent); vertical-align: -1px; margin-left: 2px; }
.motion .mailcaret { animation: blink 1.05s steps(1) infinite; }

/* animated envelope inside the window */
.mailicon { position: relative; width: min(58%, 168px); animation: mailFloat 4.6s ease-in-out infinite; }
.mailicon__svg { width: 100%; height: auto; display: block; overflow: visible;
  filter: drop-shadow(0 12px 30px rgba(255,91,46,.18)); }
.mailicon__body { stroke: var(--ink); stroke-width: 3; }
.mailicon__flap { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 130; animation: mailFlap 4.6s ease-in-out infinite; }
.mailicon__dot { fill: var(--accent); transform-box: fill-box; transform-origin: center;
  animation: mailDot 1.8s ease-in-out infinite; }
@keyframes mailFloat { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-12px) } }
@keyframes mailDot  { 0%,100%{ opacity: .35; transform: scale(.8) } 50%{ opacity: 1; transform: scale(1.12) } }
@keyframes mailFlap { 0%{ stroke-dashoffset: 130 } 40%,60%{ stroke-dashoffset: 0 } 100%{ stroke-dashoffset: -130 } }

.contact__status { font-size: var(--fs-body); color: var(--ink); margin-bottom: var(--s2); }
.contact__lead { font-family: var(--mono); font-weight: 700; font-size: clamp(1.35rem,3vw,2.15rem); letter-spacing: -.01em; line-height: 1.2; margin: 0; }
.links { display: grid; gap: 6px; max-width: none; align-content: space-between; }
.links a {
  display: flex; align-items: baseline; gap: var(--s2); padding: 12px var(--s2);
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink); transition: border-color .25s, transform .25s var(--ease), background .25s;
  will-change: transform;
}
.links a:hover { border-color: var(--accent); background: var(--surface-2); }
.links__k { color: var(--muted); min-width: 92px; font-size: var(--fs-sm); }
.links a:hover .links__k { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { max-width: var(--maxw); margin: 0 auto; padding: var(--s4) clamp(20px,5vw,64px) var(--s5); color: var(--muted-2); font-size: var(--fs-sm); display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.palette { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding-top: 14vh; }
.palette[hidden] { display: none; }
.palette__scrim { position: absolute; inset: 0; background: rgba(4,6,7,.72); backdrop-filter: blur(6px); }
.palette__sheet {
  position: relative; width: min(600px, 92vw); background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,91,46,.12);
}
.motion .palette__sheet { animation: paletteIn .28s var(--ease); }
@keyframes paletteIn { from { opacity:0; transform: translateY(-10px) scale(.98); } to { opacity:1; transform:none; } }
.palette__bar { display: flex; align-items: center; gap: var(--s2); padding: 14px var(--s3); border-bottom: 1px solid var(--line); }
.palette__bar .prompt { font-size: 1.1rem; }
.palette__input { flex: 1; background: none; border: none; color: var(--ink); font-family: var(--mono); font-size: var(--fs-lead); outline: none; }
.palette__input::placeholder { color: var(--muted-2); }
.palette__esc { color: var(--muted); }
.palette__list { max-height: 46vh; overflow-y: auto; padding: 8px; }
.palette__opt {
  display: flex; align-items: center; gap: var(--s2); padding: 11px var(--s2);
  border-radius: 8px; cursor: pointer; color: var(--muted);
}
.palette__opt .po__icon { color: var(--accent); width: 20px; text-align: center; }
.palette__opt .po__label { color: var(--ink); flex: 1; }
.palette__opt .po__hint { color: var(--muted-2); font-size: var(--fs-sm); }
.palette__opt[aria-selected="true"] { background: rgba(255,91,46,.12); color: var(--ink); }
.palette__opt[aria-selected="true"] .po__label { color: var(--accent); }
.palette__foot { display: flex; gap: var(--s3); padding: 10px var(--s3); border-top: 1px solid var(--line); color: var(--muted-2); font-size: var(--fs-xs); }

/* ============================================================
   MOTION START-STATES (only when body.motion)
   ============================================================ */
.motion [data-reveal] { opacity: 0; transform: translateY(18px); }
.motion [data-metric] { opacity: 0; transform: translateY(10px); }
.motion .proj { opacity: 0; transform: translateY(24px); }
.motion .hero__stdout,
.motion .hero .whisper,
.motion .hint { opacity: 0; }
.motion .leaders { opacity: 0; }
.motion .sec__head .cmd { opacity: 0; }

/* revealed states */
.motion [data-reveal],
.motion [data-metric],
.motion .proj { transition: opacity .75s var(--ease), transform .75s var(--ease); will-change: opacity, transform; }
.motion [data-reveal].in,
.motion [data-metric].in,
.motion .proj.in { opacity: 1; transform: none; }
.motion .hero__stdout,
.motion .hero .whisper,
.motion .hint,
.motion .leaders,
.motion .sec__head .cmd { transition: opacity .8s var(--ease); }
.motion .hero__stdout.in,
.motion .hero .whisper.in,
.motion .hint.in,
.motion .leaders.in,
.motion .sec__head .cmd.in { opacity: 1; }
.motion .proj.in { transition-delay: var(--d, 0s); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .about__grid, .colophon, .contact__cols { grid-template-columns: 1fr; }
  .skills__lists { grid-template-columns: 1fr; }
  .mailwin { min-height: 320px; }
}
/* the node-graph is illegible when squeezed onto a phone → show the readable pill lists only */
@media (max-width: 759px) { .graph { display: none; } .skills__lists { margin-top: 0; } }
/* hero hint (⌘K palette + drag-to-spin/scroll-to-swirl) is desktop-only → hide on phones */
@media (max-width: 759px) { .hero .hint { display: none; } }
@media (max-width: 640px) {
  :root { --fs-body: 14.5px; }
  .sec { padding: var(--s5) var(--s3); }
  .hero { padding: 74px var(--s3) var(--s5); }
  .hero__stage { min-height: 52vh; }
  .edu__row { grid-template-columns: 60px 1fr; }
  .edu__inst, .edu__yr { grid-column: 2; }
  .foot { flex-direction: column; gap: 6px; }
}

/* ============================================================
   SKILLS GRAPH
   ============================================================ */
.graph .edge { fill: none; stroke-width: 1.7; opacity: .62; }
.graph .edge[stroke="var(--accent)"] { filter: drop-shadow(0 0 3px rgba(255,91,46,.55)); }
.graph .edge[stroke="var(--mint)"] { filter: drop-shadow(0 0 3px rgba(61,245,196,.5)); }
.motion .graph .edge { stroke-dasharray: 1; stroke-dashoffset: 1; animation: gdraw 1.4s var(--ease) .3s forwards; }
@keyframes gdraw { to { stroke-dashoffset: 0; } }
.graph .nd { fill: var(--bg); stroke-width: 2.4; transition: fill .2s; }
.graph .nd--dev { stroke: var(--accent); filter: drop-shadow(0 0 5px rgba(255,91,46,.55)); }
.graph .nd--des { stroke: var(--mint); filter: drop-shadow(0 0 5px rgba(61,245,196,.5)); }
.graph .nlab { fill: #C9D1CE; font-family: var(--mono); font-size: 13.5px; font-weight: 500; transition: fill .2s; }
.graph .node { cursor: default; }
.graph .node.hot .nd--dev { fill: var(--accent); }
.graph .node.hot .nd--des { fill: var(--mint); }
.graph .node.hot .nlab { fill: var(--ink); }
.graph .node:focus-visible { outline: none; }
.graph .node:focus-visible .nlab { fill: var(--ink); text-decoration: underline; }
.graph .core__halo { fill: var(--accent); opacity: .2; }
.motion .graph .core__halo { animation: pulseHalo 3.2s var(--ease) infinite; }
@keyframes pulseHalo { 0%,100% { opacity: .16; transform: scale(1); } 50% { opacity: .32; transform: scale(1.08); } }
.graph .core__halo { transform-box: fill-box; transform-origin: center; }
.graph .core__ring { fill: none; stroke: var(--accent); stroke-width: 2.4; filter: drop-shadow(0 0 8px rgba(255,91,46,.6)); }
.graph .core__m { fill: var(--accent); filter: drop-shadow(0 0 10px rgba(255,91,46,.75)); }
.graph .gpulse--dev { filter: drop-shadow(0 0 5px rgba(255,91,46,.9)); }
.graph .gpulse--des { filter: drop-shadow(0 0 5px rgba(61,245,196,.85)); }
.graph .axis { fill: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: .14em; }
.graph .axis--des { fill: var(--mint); }

/* project diagrams */
.dg-box { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.dg-box--accent { stroke: var(--accent); }
.dg-box--mint { stroke: var(--mint); }
.dg-t { fill: var(--muted); font-family: var(--mono); font-size: 9px; }
.dg-arr { stroke: var(--muted); stroke-width: 1; }
.proj__diagram [data-draw] { stroke-dashoffset: 0; }
.motion .proj__diagram [data-draw] { stroke-dasharray: 1; stroke-dashoffset: 1; }
.motion .proj.in .proj__diagram [data-draw] { transition: stroke-dashoffset .8s var(--ease) .3s; stroke-dashoffset: 0; }

/* scramble glyph */
.scr { color: var(--muted); opacity: .9; }
.sec__head .cmd .scr { color: var(--accent); }
.hero__word .scr { color: var(--accent); opacity: .7; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 32px; translate: -50% 0; z-index: 320;
  background: var(--surface); border: 1px solid var(--accent); color: var(--ink);
  padding: 10px 16px; border-radius: 10px; font-size: var(--fs-sm);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), translate .25s var(--ease);
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; translate: -50% -6px; }

/* boot mark reveal (reliable fill scale-in) */
.boot__mark-stroke { display: none; }
.boot__mark-fill { opacity: 0; transform-box: fill-box; transform-origin: center; animation: mfill 1s var(--ease) .15s forwards; }
@keyframes mfill { 0% { opacity: 0; transform: scale(.82); } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
.boot__mark { filter: drop-shadow(0 0 18px rgba(255,91,46,.35)); }

/* ============================================================
   WORK — real screenshots + visit link
   ============================================================ */
.proj__visit { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s2); color: var(--accent); font-size: var(--fs-sm); }
.proj__visit span { transition: transform .3s var(--ease); }
.proj__visit:hover span { transform: translate(3px, -3px); }
.proj__shot {
  display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--bg-2); aspect-ratio: 16 / 10; position: relative; align-self: start;
}
.proj__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: saturate(.9) brightness(.86); transition: transform .55s var(--ease), filter .4s; }
.proj:hover .proj__shot img, .proj:focus-within .proj__shot img { transform: scale(1.05); filter: saturate(1.05) brightness(1); }
.proj__shot::after { content: "↗"; position: absolute; top: 8px; right: 11px; color: var(--accent); opacity: 0; transition: opacity .3s; }
.proj:hover .proj__shot::after, .proj:focus-within .proj__shot::after { opacity: 1; }
@media (max-width: 820px) { .proj__shot { grid-column: 1 / -1; aspect-ratio: 16 / 9; margin-top: var(--s2); } }

/* ============================================================
   DESIGN gallery (masonry + lightbox)
   ============================================================ */
.gallery { max-width: var(--maxw); }
.gal-cat { margin-bottom: var(--s6); }
.gal-cat__label { font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--s3); letter-spacing: .02em; }
.gal-grid { columns: 4 210px; column-gap: 12px; }
.gal-item { break-inside: avoid; margin: 0 0 12px; }
.gal-btn { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); position: relative; cursor: pointer; }
.gal-btn img { width: 100%; height: auto; display: block; transition: transform .55s var(--ease); }
.gal-btn:hover img, .gal-btn:focus-visible img { transform: scale(1.05); }
.gal-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; background: linear-gradient(transparent, rgba(8,10,12,.92)); text-align: left; opacity: 0; transform: translateY(6px); transition: .3s var(--ease); pointer-events: none; }
.gal-btn:hover figcaption, .gal-btn:focus-visible figcaption { opacity: 1; transform: none; }
.gal-item figcaption b { display: block; color: var(--ink); font-size: var(--fs-sm); }
.gal-item figcaption span { color: var(--accent); font-size: var(--fs-xs); }
@media (max-width: 640px) { .gal-grid { columns: 2 140px; } }

.lightbox { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; background: rgba(4,6,7,.9); backdrop-filter: blur(8px); padding: 6vh 5vw; }
.lightbox.is-open { display: grid; }
.motion .lightbox.is-open { animation: fadeIn .25s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 8px; box-shadow: 0 30px 90px rgba(0,0,0,.7); }
.lightbox__close { position: fixed; top: 18px; right: 22px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 1.3rem; line-height: 1; display: grid; place-items: center; }
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   WORK — interactive tilting monitor
   ============================================================ */
.wtv { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: var(--s5); align-items: start; }
.wtv__frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.5); transition: transform .3s var(--ease); will-change: transform; }
.wtv__chrome { display: flex; align-items: center; gap: var(--s2); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.wtv__dots { display: inline-flex; gap: 6px; }
.wtv__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.wtv__dots i:first-child { background: var(--accent); }
.wtv__addr { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: var(--fs-sm); background: var(--bg-2); padding: 5px 12px; border-radius: 20px; }
.wtv__addr svg { width: 13px; height: 13px; color: var(--mint); }
.wtv__stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.wtv__slide { position: absolute; inset: 0; opacity: 0; transform: scale(1.05) translateX(4%); transition: opacity .55s var(--ease), transform .7s var(--ease); pointer-events: none; }
.wtv__slide.is-on { opacity: 1; transform: none; pointer-events: auto; }
.wtv__slide img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.wtv__info { margin-bottom: var(--s3); }
.wtv__title { font-family: var(--disp); font-weight: 600; font-size: clamp(1.4rem,2.6vw,1.95rem); letter-spacing: -.02em; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  /* single line → info height stays constant across slides (no shift on SABEM etc.) */
.wtv__sub { color: var(--muted); font-size: var(--fs-body); margin: 8px 0 var(--s2); max-width: 40ch; min-height: 3em; }
.wtv__info { min-height: 4.6em; }
.wtv__visit { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: var(--fs-sm); }
.wtv__visit span { transition: transform .3s var(--ease); }
.wtv__visit:hover span { transform: translate(3px,-3px); }
.wtv__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wtv__thumb { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; aspect-ratio: 16/10; background: var(--bg-2); cursor: pointer; padding: 0; }
.wtv__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: .45; transition: opacity .3s, transform .5s var(--ease); }
.wtv__thumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 4px 4px; font-size: 10px; letter-spacing: .04em; color: var(--ink); background: linear-gradient(transparent, rgba(8,10,12,.92)); text-align: center; }
.wtv__thumb:hover img, .wtv__thumb.is-active img { opacity: 1; }
.wtv__thumb:hover img { transform: scale(1.06); }
.wtv__thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(255,91,46,.4); }
@media (max-width: 860px) { .wtv { grid-template-columns: 1fr; } .wtv__frame { transform: none !important; } }

/* ============================================================
   DESIGN — auto-scrolling marquee rows
   ============================================================ */
.design__lead { color: var(--muted); max-width: var(--maxw); margin: 0 auto var(--s5); padding: 0 clamp(20px,5vw,64px); font-size: var(--fs-sm); }
.marquee { display: grid; gap: 14px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.marquee__row { overflow: hidden; }
.marquee__track { display: flex; gap: 14px; width: max-content; animation: mq 64s linear infinite; }
.marquee__row--rev .marquee__track { animation-direction: reverse; animation-duration: 78s; }
.marquee__row:hover .marquee__track { animation-play-state: paused; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mq-item { position: relative; flex: none; height: 244px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); cursor: pointer; padding: 0; }
.mq-item img { height: 100%; width: auto; display: block; transition: transform .5s var(--ease); }
.mq-item:hover img, .mq-item:focus-visible img { transform: scale(1.06); }
.mq-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; background: linear-gradient(transparent, rgba(8,10,12,.94)); text-align: left; color: var(--accent); font-size: var(--fs-xs); opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
.mq-cap b { display: block; color: var(--ink); font-size: var(--fs-sm); }
.mq-item:hover .mq-cap, .mq-item:focus-visible .mq-cap { opacity: 1; }
@media (max-width: 640px) { .mq-item { height: 172px; } }
@media (prefers-reduced-motion: reduce) { .marquee__row { overflow-x: auto; } }

/* ============================================================
   CODE — public repositories
   ============================================================ */
.code__lead { color: var(--muted); margin-bottom: var(--s4); max-width: 62ch; }
.repos { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.repos li { list-style: none; }
.repo { display: flex; flex-direction: column; gap: 9px; height: 100%; padding: var(--s3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .25s, transform .25s var(--ease), background .25s; }
.repo:hover { border-color: var(--accent); background: var(--surface-2); transform: translateY(-2px); }
.repo__top { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.repo__name { color: var(--ink); font-weight: 500; word-break: break-all; }
.repo:hover .repo__name { color: var(--accent); }
.repo__arr { color: var(--muted-2); flex: none; }
.repo:hover .repo__arr { color: var(--accent); }
.repo__desc { color: var(--muted); font-size: var(--fs-sm); flex: 1; }
.repo__lang { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: var(--fs-sm); }
.repo__lang::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, #888); }

/* ============================================================
   LANGUAGE SWITCHER (15 languages)
   ============================================================ */
.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: var(--fs-sm); transition: border-color .2s, color .2s; }
.lang__btn:hover, .lang.is-open .lang__btn { border-color: var(--accent); color: var(--ink); }
.lang__btn [data-lang-current] { color: var(--ink); font-weight: 500; letter-spacing: .03em; }
.lang__caret { color: var(--muted); font-size: .8em; }
.lang__menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; min-width: 168px; max-height: 62vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 20px 55px rgba(0,0,0,.55); }
.lang__menu[hidden] { display: none; }
.motion .lang.is-open .lang__menu { animation: paletteIn .2s var(--ease); }
.lang__menu li { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; white-space: nowrap; }
.lang__menu li b { color: var(--muted-2); font-weight: 500; min-width: 24px; letter-spacing: .04em; }
.lang__menu li:hover { background: var(--surface-2); color: var(--ink); }
.lang__menu li[aria-selected="true"] { color: var(--accent); }
.lang__menu li[aria-selected="true"] b { color: var(--accent); }
[dir="rtl"] { text-align: right; }
@media (max-width: 700px) { .lang__caret { display: none; } .lang__menu { max-height: 70vh; } }

/* ============================================================
   REDUCED MOTION — hard stop
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .boot { display: none !important; }
  .bg, .crt, .grain { display: none !important; }
  * { animation: none !important; transition: none !important; }
  .cursor { display: none !important; }
  html, body { scroll-behavior: auto !important; }
}

/* ═══════════════════════ IDENTITY MARK (3D glass  < • > ) ═══════════════════════ */
.sec--identity{
  position: relative; max-width: none; width: 100%; margin: 0; padding: 0;
  overflow: hidden; min-height: auto; border-top: 1px solid var(--line);
}
.sec--identity::before{            /* faint amber+mint haze behind the mark */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42% 52% at 50% 46%, rgba(255,91,46,.11), transparent 70%),
    radial-gradient(46% 56% at 62% 62%, rgba(61,245,196,.06), transparent 72%);
}
.sec--identity .sec__head{
  position: absolute; top: clamp(20px,5vw,44px); left: clamp(20px,5vw,64px);
  margin: 0; z-index: 3;
}
.identity__stage{ position: relative; width: 100%;
  padding: clamp(104px,16vh,180px) 0 clamp(84px,13vh,140px); }  /* content-height + breathing (no 100vh void) */
.identity__stage.is-grabbing{ cursor: grabbing; }
.no-mark3d .identity__stage{ cursor: default; }
/* persistent 3D mark layer — fixed, BEHIND all content (main is z:5) so text stays on top */
.markfx{ position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 2; pointer-events: none; display: block; }
/* custom cursor — the < • > mark (desktop pointers only) */
@media (hover: hover) and (pointer: fine){
  body{ cursor: url("/assets/img/cursor-mark.svg") 15 12, auto; }
  a, button, .kbtn, [data-magnetic], input, textarea, select, label, summary,
  .mq-item, .wtv__slide, .lang__btn, [data-set-lang], [role="button"], [data-open-palette-hint]{ cursor: pointer; }
}
body.mark-hot{ cursor: grab; }
body.mark-dragging{ cursor: grabbing; user-select: none; }

/* graceful fallback glyph (mobile / reduced-motion / no-WebGL) */
.mark3d__fallback{
  display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(42vw,300px); height: auto; color: var(--accent); z-index: 1;
  filter: drop-shadow(0 0 34px rgba(255,91,46,.30));
}
.no-mark3d .markfx{ display: none; }
.no-mark3d .mark3d__fallback{ display: block; }

/* identity → two-panel: manifesto (one clean face) + mark in a viewport frame */
.identity__grid{
  position: relative; z-index: 3; pointer-events: none;
  display: grid; grid-template-columns: 1fr minmax(280px,380px); gap: clamp(24px,4vw,56px);
  align-items: stretch; padding: 0 clamp(20px,5vw,64px);
}
.idn__text{ max-width: 640px; display: flex; flex-direction: column; justify-content: flex-start; }
.idn__credo{
  font-family: var(--mono); font-weight: 700;               /* JetBrains Mono — the "engineering" voice */
  font-size: clamp(1.3rem,2.5vw,2.05rem); line-height: 1.3; letter-spacing: -.01em;
  color: var(--ink); margin: 0 0 clamp(20px,3vw,30px);
}
.idn__notes{ list-style: none; margin: 0 0 22px; padding: 0; font-family: var(--mono); }
.idn__notes li{ display: flex; gap: 12px; align-items: baseline;
  color: var(--muted); font-size: clamp(.9rem,1.25vw,1.02rem); line-height: 1.55; margin: 9px 0; }
.idn__k{ flex: none; width: 2em; font-weight: 700; }
.idn__k--code{ color: #F06529; } .idn__k--node{ color: var(--accent); } .idn__k--sig{ color: #3DF5C4; }
.idn__foot{ font-family: var(--mono); color: var(--muted-2);
  font-size: clamp(.82rem,1.1vw,.94rem); margin: 22px 0 0; }

.idn__frame{
  align-self: stretch; min-height: 300px; pointer-events: auto;
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0) 42%);
}
.idn__bar{ display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.idn__dot{ width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.idn__dot:first-child{ background: var(--accent); }
.idn__bar-title{ margin-left: 8px; }
.idn__bar-live{ margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted-2); letter-spacing: .1em; text-transform: uppercase; font-size: 10.5px; }
.idn__bar-live i{ width: 7px; height: 7px; border-radius: 50%; background: #3DF5C4; }
.motion .idn__bar-live i{ animation: blink 1.4s steps(1) infinite; }
.idn__view{ flex: 1; position: relative; }        /* transparent — 3D mark shows through & locks here */
.idn__view .mark3d__fallback{ width: min(48%,180px); }
.idn__footbar{ display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted-2); }
.idn__q{ color: var(--accent); }

@media (max-width: 859px){   /* stack early (matches work/about) so the two-panel is never cramped on tablets */
  .sec--identity{ min-height: auto; }
  .identity__stage{ min-height: auto; }
  .identity__grid{ position: static; grid-template-columns: 1fr; gap: 30px;
    padding: 8vh clamp(20px,5vw,64px) 5vh; }
  .idn__text{ height: auto; }
  .idn__frame{ height: 50vh; }
}
