/* ==========================================================================
   Yohann Chetrit — personal site
   Aesthetic: technical blueprint / engineering drawing sheet.
   Theming: light "drafting paper" (default) + dark, via [data-theme].
   Single restrained steel-blue accent. Monospace-led.
   ========================================================================== */

:root {
  /* ---- Light "drafting paper" theme (default) ---- */
  --ink: #f2f0ea;        /* page background (paper) */
  --ink-2: #ece9e1;
  --panel: #f8f7f2;
  --panel-2: #efece4;

  --line: rgba(22, 24, 29, 0.13);
  --line-2: rgba(22, 24, 29, 0.22);
  --line-3: rgba(22, 24, 29, 0.36);

  --text: #16181d;
  --muted: #4c525b;
  --faint: #878d96;
  --dim: #b6bac0;

  --accent: #3a5c93;
  --accent-2: #2a4471;
  --accent-line: rgba(58, 92, 147, 0.42);
  --accent-dim: rgba(58, 92, 147, 0.09);

  --shadow-card: 0 22px 56px rgba(40, 44, 60, 0.13);
  --shadow-soft: rgba(40, 44, 60, 0.18);
  --nav-bg: rgba(242, 240, 234, 0.82);
  --menu-bg: rgba(242, 240, 234, 0.97);
  --scan: rgba(0, 0, 0, 0.022);
  --on-accent: #ffffff;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
  --nav-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  --ink: #07080a;
  --ink-2: #0a0c0f;
  --panel: #0d0f13;
  --panel-2: #111419;

  --line: rgba(232, 236, 242, 0.10);
  --line-2: rgba(232, 236, 242, 0.18);
  --line-3: rgba(232, 236, 242, 0.30);

  --text: #e8eaed;
  --muted: #9298a1;
  --faint: #5a606b;
  --dim: #3b404a;

  --accent: #8fb0e6;
  --accent-2: #b3c8ef;
  --accent-line: rgba(143, 176, 230, 0.42);
  --accent-dim: rgba(143, 176, 230, 0.12);

  --shadow-card: 0 24px 70px rgba(2, 4, 20, 0.55);
  --shadow-soft: rgba(2, 4, 20, 0.6);
  --nav-bg: rgba(7, 8, 10, 0.82);
  --menu-bg: rgba(7, 8, 10, 0.97);
  --scan: rgba(0, 0, 0, 0.16);
  --on-accent: #0a0c0f;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { width: min(var(--wrap), 100% - calc(var(--gutter) * 2)); margin-inline: auto; }
.mono { font-family: var(--font-mono); }
.dim { color: var(--dim); }
.hl { color: var(--accent); }
.ok { color: var(--accent-2); }

/* ===== Drawing-sheet frame ===== */
.sheet { position: fixed; inset: 14px; z-index: 60; pointer-events: none; border: 1px solid var(--line); }
.sheet__corner { position: absolute; width: 14px; height: 14px; border: 1.5px solid var(--line-3); }
.sheet__corner--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.sheet__corner--tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.sheet__corner--bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.sheet__corner--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
@media (max-width: 720px) { .sheet { inset: 8px; } }

/* ===== CAD crosshair + readout ===== */
.cross { position: fixed; inset: 0; z-index: 55; pointer-events: none; opacity: 0; transition: opacity .4s; }
.cross.is-on { opacity: 1; }
.cross__v, .cross__h { position: absolute; background: var(--accent-line); }
.cross__v { top: 0; bottom: 0; width: 1px; transform: translateX(var(--cx, -100px)); }
.cross__h { left: 0; right: 0; height: 1px; transform: translateY(var(--cy, -100px)); }
.readout {
  position: fixed; right: 26px; bottom: 26px; z-index: 61;
  display: flex; gap: 14px; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--faint); pointer-events: none;
  opacity: 0; transition: opacity .5s;
}
.readout.is-on { opacity: 1; }
.readout__seg b { color: var(--muted); font-weight: 500; margin-left: 4px; }
.readout__seg--live { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.readout__seg--live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
@media (max-width: 720px) { .readout { display: none; } }

/* ===== Background ===== */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg__grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 35%, transparent 85%);
  opacity: 0.7;
}
.bg__glow {
  position: absolute; top: -340px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 700px;
  background: radial-gradient(ellipse, var(--accent-dim), transparent 66%);
  filter: blur(40px);
}
.bg__scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, var(--scan) 3px, var(--scan) 4px);
  opacity: 0.5; mix-blend-mode: multiply;
}

/* ===== Buttons ===== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.02em;
  padding: 13px 22px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn > span { display: inline-flex; align-items: center; gap: 9px; }
.btn--lg { padding: 16px 26px; font-size: 0.88rem; }
.btn--primary { background: var(--text); color: var(--ink); font-weight: 600; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px var(--shadow-soft); }
.btn--line { border-color: var(--line-2); color: var(--text); }
.btn--line:hover { border-color: var(--accent-line); color: var(--accent); transform: translateY(-2px); }

/* ===== Status pill ===== */
.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 2px;
  padding: 7px 14px;
}
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(120,150,205,0.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(120,150,205,0.5); } 70% { box-shadow: 0 0 0 8px rgba(120,150,205,0); } 100% { box-shadow: 0 0 0 0 rgba(120,150,205,0); } }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 50;
  transition: background .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 18px; }
.brand { display: inline-flex; align-items: center; }
.brand__txt { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.brand__dot { color: var(--accent); }
.brand:hover .brand__txt { color: var(--text); }
.nav__links { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav__links > a { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); transition: color .25s; }
.nav__idx { color: var(--dim); margin-right: 5px; transition: color .25s; }
.nav__links > a:hover { color: var(--text); }
.nav__links > a:hover .nav__idx { color: var(--accent); }
.nav__cta {
  border: 1px solid var(--line-2); padding: 9px 16px; color: var(--text) !important;
  transition: border-color .25s, color .25s, transform .25s var(--ease) !important;
}
.nav__cta:hover { border-color: var(--accent-line); color: var(--accent) !important; }
.theme {
  width: 38px; height: 38px; border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--muted);
  transition: border-color .25s, color .25s, transform .3s var(--ease);
  flex-shrink: 0;
}
.theme:hover { border-color: var(--accent-line); color: var(--accent); }
.theme svg { width: 17px; height: 17px; }
.lang { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line-2); height: 38px; padding: 0 11px; display: inline-flex; align-items: center; text-decoration: none; transition: color .25s, border-color .25s; }
.lang:hover { border-color: var(--accent-line); color: var(--accent); }
.theme .theme__sun { display: none; }
html[data-theme="dark"] .theme .theme__moon { display: none; }
html[data-theme="dark"] .theme .theme__sun { display: block; }
.nav__burger { display: none; flex-direction: column; gap: 6px; padding: 8px; }
.nav__burger span { width: 22px; height: 1.5px; background: var(--text); transition: transform .3s, opacity .3s; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* ===== Section heads ===== */
section { position: relative; padding: clamp(80px, 12vw, 150px) 0; }
.shead { display: flex; align-items: center; gap: 18px; margin-bottom: clamp(40px, 6vw, 72px); }
.shead__no { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); }
.shead__label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.shead__rule { flex: 1; height: 1px; background: var(--line); transform-origin: left; }

h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }

/* ===== Hero ===== */
.hero { padding-top: calc(var(--nav-h) + clamp(56px, 9vw, 110px)); padding-bottom: 0; }
.hero__inner { display: grid; grid-template-columns: 1.5fr 0.9fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.hero__role {
  font-family: var(--font-mono); font-size: clamp(0.85rem, 1.4vw, 1rem);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  margin: 26px 0 22px;
}
.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.7rem, 7vw, 5.6rem); line-height: 1.0; letter-spacing: -0.035em;
}
.hero__title .ln { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero__title .ln__i { display: block; transform: translateY(110%); animation: rise 0.9s var(--ease) forwards; }
.hero__title .ln:nth-child(1) .ln__i { animation-delay: 0.1s; }
.hero__title .ln:nth-child(2) .ln__i { animation-delay: 0.22s; }
.hero__title .ln:nth-child(3) .ln__i { animation-delay: 0.34s; }
@keyframes rise { to { transform: translateY(0); } }
.hero__lead { max-width: 46ch; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.15rem); margin: 30px 0 34px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.hero__meta { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); }
.hero__meta li { display: flex; flex-direction: column; gap: 5px; padding: 18px 28px 0 0; margin-right: 28px; }
.hero__meta .k { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; color: var(--faint); }
.hero__meta .v { font-size: 0.92rem; color: var(--text); }

/* Spec sheet / title block */
.spec {
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  position: relative;
}
.spec::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line); pointer-events: none; }
.spec__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; color: var(--faint);
}
.spec__rev { color: var(--accent); }
.spec__portrait { position: relative; margin: 16px; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); }
.spec__portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.03); transition: filter .5s; }
.spec:hover .spec__portrait img { filter: grayscale(0.4) contrast(1.04); }
.spec__tick { position: absolute; width: 9px; height: 9px; border: 1px solid var(--accent-line); z-index: 2; }
.spec__tick--tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.spec__tick--tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.spec__tick--bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.spec__tick--br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.spec__dim {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em; color: var(--muted);
  background: linear-gradient(var(--ink-2), var(--ink-2)) padding-box; padding: 2px 8px;
}
.spec__dim i { width: 26px; height: 1px; background: var(--line-3); position: relative; }
.spec__dim i::before, .spec__dim i::after { content: ""; position: absolute; top: -2px; width: 1px; height: 5px; background: var(--line-3); }
.spec__dim i::before { left: 0; } .spec__dim i::after { right: 0; }
.spec__fields { padding: 4px 16px 16px; display: grid; gap: 0; }
.spec__fields > div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: baseline; }
.spec__fields dt { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; color: var(--faint); }
.spec__fields dd { font-size: 0.86rem; color: var(--text); }

/* Ticker */
.ticker { margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker__track { display: flex; align-items: center; gap: 24px; width: max-content; animation: marquee 38s linear infinite; }
.ticker__track span { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.ticker__track i { color: var(--accent); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== Metrics ===== */
.metrics { padding-top: clamp(56px, 8vw, 90px); padding-bottom: clamp(56px, 8vw, 90px); }
.metrics__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); }
.metric { padding: 30px clamp(18px, 2.4vw, 30px); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.metric:last-child { border-right: 0; }
.metric__v { font-family: var(--font-display); font-size: clamp(2.1rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.metric__l { font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.5; color: var(--faint); }

/* ===== Profile ===== */
.profile__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 5vw, 70px); align-items: start; }
.profile__lead h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.profile__body p { color: var(--muted); font-size: 1.05rem; margin-bottom: 18px; }
.profile__body strong { color: var(--text); font-weight: 600; }
.profile__note {
  border-left: 2px solid var(--accent-line); padding-left: 20px; margin-top: 26px;
  font-size: 0.98rem !important; color: var(--muted);
}
.profile__note-k { display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 8px; }

/* System diagram */
.sysmap { margin-top: clamp(50px, 7vw, 90px); border: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-2), var(--ink)); }
.sysmap__cap { padding: 12px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.sysmap__diagram { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 0; padding: clamp(30px, 5vw, 56px) clamp(20px, 4vw, 50px); }
.node {
  position: relative; padding: 22px 22px; border: 1px solid var(--line-2);
  background: var(--panel); display: flex; flex-direction: column; gap: 5px;
  transition: border-color .4s, transform .4s var(--ease);
}
.node::before { content: ""; position: absolute; inset: 4px; border: 1px solid var(--line); pointer-events: none; }
.node:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.node__tag { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; color: var(--accent); }
.node__title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.node__sub { font-family: var(--font-mono); font-size: 0.7rem; color: var(--faint); }
.wire { position: relative; height: 1px; min-width: 48px; background: var(--line-2); margin: 0 4px; align-self: center; overflow: visible; }
.wire::after { content: ""; position: absolute; right: -1px; top: -3px; width: 6px; height: 6px; border-top: 1px solid var(--line-3); border-right: 1px solid var(--line-3); transform: rotate(45deg); }
.wire .pulse { position: absolute; top: 50%; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); box-shadow: 0 0 10px var(--accent); opacity: 0; }
.is-visible .wire--1 .pulse { animation: flow 3.4s linear infinite; }
.is-visible .wire--2 .pulse { animation: flow 3.4s linear infinite; animation-delay: 1.7s; }
@keyframes flow { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

/* ===== Engagements ===== */
.engage__intro, .track__intro, .stack__intro { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.engage__intro h2, .track__intro h2, .stack__intro h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); margin-bottom: 16px; }
.engage__intro p, .track__intro p, .stack__intro p { color: var(--muted); font-size: 1.05rem; }
.engage__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }
.ecard { position: relative; padding: clamp(28px, 3.4vw, 40px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.ecard:nth-child(2n) { border-right: 0; }
.ecard:nth-child(5), .ecard:nth-child(6) { border-bottom: 0; }
.ecard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px circle at var(--mx,50%) var(--my,-30%), var(--accent-dim), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.ecard:hover::before { opacity: 1; }
.ecard__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.ecard__no { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.08em; }
.ecard__ico { width: 40px; height: 40px; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--accent); }
.ecard__ico svg { width: 22px; height: 22px; }
.ecard h3 { font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 12px; }
.ecard p { color: var(--muted); font-size: 0.96rem; margin-bottom: 20px; }
.ecard__list { list-style: none; padding: 0; display: grid; gap: 9px; }
.ecard__list li { position: relative; padding-left: 20px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text); }
.ecard__list li::before { content: "+"; position: absolute; left: 0; color: var(--accent); }

/* ===== Track record / timeline ===== */
.timeline { list-style: none; padding: 0; display: grid; gap: 0; }
.trow { display: grid; grid-template-columns: 40px 200px 1fr; gap: 0; }
.trow__rail { position: relative; display: flex; justify-content: center; }
.trow__rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.trow:first-child .trow__rail::before { top: 14px; }
.trow:last-child .trow__rail::before { bottom: calc(100% - 14px); }
.trow__node { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 8px; background: var(--ink); border: 1px solid var(--line-3); transform: rotate(45deg); transition: border-color .4s, background .4s; }
.trow:first-child .trow__node { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 12px rgba(120,150,205,0.5); }
.trow__when { padding: 4px 24px 48px 18px; }
.trow__date { display: block; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--text); }
.trow__badge { display: inline-block; margin-top: 8px; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; color: var(--accent); border: 1px solid var(--accent-line); padding: 2px 8px; }
.trow__dur { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 0.68rem; color: var(--faint); }
.trow__card { position: relative; border: 1px solid var(--line); background: var(--panel); padding: clamp(22px, 3vw, 32px); margin-bottom: 28px; overflow: hidden; transition: border-color .35s; }
.trow__card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(460px circle at var(--mx,50%) var(--my,-30%), var(--accent-dim), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.trow__card:hover { border-color: var(--line-2); }
.trow__card:hover::before { opacity: 1; }
.trow__cardhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.trow__cardhead h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.015em; }
.trow__co { font-family: var(--font-mono); font-size: 0.86rem; color: var(--accent); }
.trow__pts { list-style: none; padding: 0; display: grid; gap: 11px; margin-bottom: 20px; }
.trow__pts li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.95rem; }
.trow__pts li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--font-mono); }
.trow__pts strong { color: var(--text); font-weight: 600; }
.trow__card > p { color: var(--muted); font-size: 0.98rem; margin-bottom: 18px; }
.trow__card > p strong { color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; transition: border-color .25s, color .25s; }
.trow__card:hover .tags span { border-color: var(--line-2); }

.edu { margin-top: 36px; border: 1px solid var(--line); padding: clamp(22px, 3vw, 30px); margin-left: 240px; }
.edu__k { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); display: block; margin-bottom: 16px; }
.edu__items { display: grid; gap: 14px; }
.edu__item { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: baseline; }
.edu__yr { font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint); }
.edu__what { font-size: 0.95rem; color: var(--muted); }
.edu__what strong { color: var(--text); font-weight: 600; }

/* ===== Capabilities (legend) ===== */
.legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); }
.legend__col { padding: clamp(22px, 2.6vw, 32px) clamp(16px, 2vw, 26px); border-right: 1px solid var(--line); }
.legend__col:last-child { border-right: 0; }
.legend__h { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); margin-bottom: 20px; }
.legend__no { color: var(--accent); }
.legend__col ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.legend__col li { position: relative; padding-left: 18px; font-size: 0.92rem; color: var(--muted); transition: color .25s; }
.legend__col li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 7px; height: 1px; background: var(--accent-line); }
.legend__col li:hover { color: var(--text); }
.legend__foot { border: 1px solid var(--line); border-top: 0; padding: 20px 26px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); line-height: 1.7; }
.legend__foot .k { color: var(--accent); margin-right: 8px; }
.legend__foot strong { color: var(--text); font-weight: 500; }

/* ===== Contact ===== */
.contact__panel { position: relative; border: 1px solid var(--line-2); background: linear-gradient(160deg, var(--panel), var(--ink-2)); padding: clamp(40px, 7vw, 88px) clamp(28px, 6vw, 80px); text-align: center; overflow: hidden; }
.contact__panel::before { content: ""; position: absolute; top: -340px; left: 50%; transform: translateX(-50%); width: 700px; height: 560px; background: radial-gradient(ellipse, var(--accent-dim), transparent 66%); pointer-events: none; }
.contact__corner { position: absolute; width: 22px; height: 22px; border: 1px solid var(--accent-line); }
.contact__corner--tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; }
.contact__corner--br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }
.contact__panel h2 { position: relative; font-size: clamp(1.8rem, 4vw, 3.2rem); margin-bottom: 20px; }
.contact__panel > p { position: relative; max-width: 52ch; margin: 0 auto 38px; color: var(--muted); font-size: 1.06rem; }
.contact__actions { position: relative; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 30px; }
.contact__avail { position: relative; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.76rem; color: var(--faint); }

/* ===== Footer / title block ===== */
.foot { border-top: 1px solid var(--line-2); padding: 0 0 26px; }
.foot__block { display: grid; grid-template-columns: 2fr 1fr 1fr; border-bottom: 1px solid var(--line); }
.foot__cell { padding: 26px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.foot__cell:last-child { border-right: 0; }
.foot__cell dt { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; color: var(--faint); }
.foot__cell dd { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text); }
.foot__cell dd a { transition: color .25s; }
.foot__cell dd a:hover { color: var(--accent); }
.foot__cell--brand { gap: 12px; }
.foot__mark { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; }
.foot__tag { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em; }
.foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 22px 0; font-family: var(--font-mono); font-size: 0.74rem; color: var(--faint); }
.foot__top { transition: color .25s; }
.foot__top:hover { color: var(--accent); }

/* ===== Reveal ===== */
[data-animate] { opacity: 0; transform: translateY(20px); animation: fadeUp .9s var(--ease) forwards; animation-delay: var(--d, .15s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
.shead__rule { transform: scaleX(0); transition: transform .9s var(--ease) .1s; }
.shead.is-visible .shead__rule, .reveal.is-visible .shead__rule { transform: scaleX(1); }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .hero__inner { grid-template-columns: 1fr; }
  .spec { max-width: 420px; }
  .profile__grid { grid-template-columns: 1fr; gap: 28px; }
  .metrics__grid { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(1), .metric:nth-child(2) { border-bottom: 1px solid var(--line); }
  .engage__grid { grid-template-columns: 1fr; }
  .ecard { border-right: 0; }
  .ecard:nth-child(5) { border-bottom: 1px solid var(--line); }
  .legend { grid-template-columns: 1fr 1fr; }
  .legend__col { border-bottom: 1px solid var(--line); }
  .legend__col:nth-child(2n) { border-right: 0; }
  .legend__col:nth-last-child(-n+2) { border-bottom: 0; }
  .sysmap__diagram { grid-template-columns: 1fr; gap: 0; }
  .wire { width: 1px; height: 40px; min-width: 0; margin: 6px auto; justify-self: center; }
  .wire::after { right: -3px; top: auto; bottom: -1px; transform: rotate(135deg); }
  .is-visible .wire--1 .pulse, .is-visible .wire--2 .pulse { animation: flowV 3.4s linear infinite; }
  @keyframes flowV { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
  .wire .pulse { left: 50%; }
}

@media (max-width: 760px) {
  .nav__links {
    position: fixed; top: calc(var(--nav-h) + 14px); left: 14px; right: 14px;
    flex-direction: column; align-items: stretch; gap: 0; margin-left: 0;
    background: var(--menu-bg); backdrop-filter: blur(16px);
    border: 1px solid var(--line-2);
    padding: 8px; transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: opacity .3s, transform .3s var(--ease);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links > a { padding: 14px 12px; border-bottom: 1px solid var(--line); }
  .nav__cta { border: 0 !important; padding: 14px 12px; }
  .nav__burger { display: flex; }

  .trow { grid-template-columns: 28px 1fr; }
  .trow__when { grid-column: 2; padding: 4px 0 14px; display: flex; align-items: center; gap: 12px; }
  .trow__badge, .trow__dur { margin-top: 0; }
  .trow__card { grid-column: 2; }
  .edu { margin-left: 28px; }
  .edu__item { grid-template-columns: 1fr; gap: 4px; }
  .metrics__grid { grid-template-columns: 1fr; }
  .metric { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .legend { grid-template-columns: 1fr 1fr; }
  .legend__col:nth-child(odd) { border-right: 1px solid var(--line); }
  .legend__col:nth-child(even) { border-right: 0; }
  .legend__col:last-child { border-bottom: 0; }
  .hero__meta li { padding-right: 0; margin-right: 0; flex-basis: 50%; }
  .foot__block { grid-template-columns: 1fr 1fr; }
  .foot__cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .foot__cell dd { overflow-wrap: anywhere; }
  .foot__cell--brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .contact__panel { padding: 40px 20px; }
  .contact__panel h2 { font-size: 1.5rem; }
  .contact__panel h2 br { display: none; }
  .contact__panel > p { font-size: 0.98rem; }
  .contact__actions .btn { width: 100%; }
  .contact__avail { font-size: 0.7rem; line-height: 1.5; }
  .hero__title { font-size: clamp(2.4rem, 11vw, 3rem); }
  .legend { grid-template-columns: 1fr; }
  .legend__col { border-right: 0 !important; }
  .foot__block { grid-template-columns: 1fr; }
  .foot__cell { border-right: 0; }
}

/* ===== Reduced motion / capture ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  [data-animate], .hero__title .ln__i { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
  .shead__rule { transform: scaleX(1); }
}
body.is-capture [data-animate], body.is-capture .hero__title .ln__i { opacity: 1 !important; transform: none !important; animation: none !important; }
body.is-capture .reveal { opacity: 1 !important; transform: none !important; }
body.is-capture .shead__rule { transform: scaleX(1) !important; }
