@property --wa { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* ---------- Themes ---------- */
:root {
  color-scheme: dark;
  --bg: #05080a;
  --panel: #0b1216;
  --panel-2: #0f181d;
  --glass: rgba(7, 12, 15, .82);
  --ink: #e9f2f1;
  --soft: #b9c8c9;
  --muted: #829699;
  --faint: #55686b;
  --line: #17252a;
  --line-2: #24373d;
  --accent: #34e0c4;
  --on-accent: #04110f;
  --glow: rgba(52, 224, 196, .10);
  --shadow: rgba(0, 0, 0, .7);
  --c-analog: #34e0c4;
  --c-digital: #8f9bff;
  --c-phys: #ffb766;
  --c-verif: #ff86a6;
  /* bright trace colours for the scope screen, same in both themes */
  --t-analog: #34e0c4; --t-digital: #8f9bff; --t-phys: #ffb766;
  --r: 18px;
  --side: 240px;
  --f-head: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f5;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --glass: rgba(244, 246, 245, .86);
  --ink: #0c1f21;
  --soft: #344a4c;
  --muted: #5f7375;
  --faint: #97a6a7;
  --line: #e1e8e7;
  --line-2: #cdd8d7;
  --accent: #0f8b8d;
  --on-accent: #ffffff;
  --glow: rgba(15, 139, 141, .08);
  --shadow: rgba(12, 31, 33, .22);
  --c-analog: #0f8b8d;
  --c-digital: #4f5bd5;
  --c-phys: #c06f1d;
  --c-verif: #cf3f66;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.08; margin: 0; letter-spacing: -0.025em; font-weight: 500; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* one soft glow behind the hero */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(760px 520px at 80% 10%, var(--glow), transparent 70%); }

/* ================= Sidebar ================= */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 20;
  background: var(--glass); backdrop-filter: blur(14px); border-right: 1px solid var(--line);
  padding: 30px 22px 24px; display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand b { display: block; font-family: var(--f-head); font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; }
.brand small { font-family: var(--f-mono); font-size: .66rem; color: var(--muted); letter-spacing: .08em; }

nav { margin-top: 46px; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: baseline; gap: 12px; padding: 9px 12px; border-radius: 10px;
  text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s, background .2s;
}
.nav a .mono { font-size: .64rem; color: var(--faint); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.nav a.active .mono { color: var(--accent); }

.side-foot { margin-top: auto; display: grid; gap: 14px; }
.status { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .82rem; color: var(--soft); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3fc87a; flex: none; }
.side-links { display: flex; gap: 8px; }
.side-links a, .theme-btn {
  width: 36px; height: 36px; display: grid; place-items: center; color: var(--soft); cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 10px; background: none; padding: 0; transition: border-color .2s, color .2s;
}
.side-links a:hover, .theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.side-links svg { width: 16px; height: 16px; }
.theme-btn { margin-left: auto; }
.theme-btn .sun { display: none; }
[data-theme="light"] .theme-btn .sun { display: block; }
[data-theme="light"] .theme-btn .moon { display: none; }

/* ================= Main ================= */
main { margin-left: var(--side); padding: 72px clamp(20px, 4.5vw, 72px) 40px; max-width: calc(1220px + var(--side)); }
main > section { padding: 104px 0 0; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 64px); align-items: center; min-height: min(74vh, 680px); }
.eyebrow { color: var(--accent); margin: 0 0 22px; }
.hero h1 { font-size: clamp(3rem, 6.4vw, 5.6rem); letter-spacing: -0.05em; line-height: .94; }
.hero h1 span { color: var(--accent); }
.lede { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.4; max-width: 24em; margin: 30px 0 12px; color: var(--soft); }
.lede em { color: var(--ink); font-size: 1.12em; }
.sub { color: var(--muted); font-size: .92rem; margin: 0 0 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent); font-family: var(--f-head); font-weight: 500; font-size: .98rem;
  transition: transform .2s var(--ease), border-color .2s, color .2s;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Wafer (stays dark in both themes, like real silicon) ---------- */
.wafer-wrap { display: grid; justify-items: center; gap: 20px; }
.wafer { position: relative; width: min(100%, 450px); aspect-ratio: 1; --c-analog: #34e0c4; --c-digital: #8f9bff; --c-phys: #ffb766; --c-verif: #ff86a6; }
.wafer-disc {
  position: absolute; inset: 3%; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(5, 8, 10, .3), rgba(5, 8, 10, .84) 72%),
    conic-gradient(from var(--wa), #0e2a30, #1a6a67, #26306e, #5a2a6a, #7a4a2a, #1a6a67, #0e2a30, #26306e, #1a6a67, #0e2a30);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 70px -30px var(--shadow), inset 0 0 60px rgba(0, 0, 0, .6);
  animation: iris 60s linear infinite;
}
@keyframes iris { to { --wa: 360deg; } }
.wafer-notch { position: absolute; left: 50%; bottom: 3%; width: 16px; height: 16px; margin: 0 0 -8px -8px; border-radius: 50%; background: var(--bg); transition: background .3s; }
.wafer svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.die { fill: rgba(255, 255, 255, .018); stroke: rgba(255, 255, 255, .085); stroke-width: 1; }
.die-p { cursor: pointer; outline: none; }
.die-p .pad { fill: color-mix(in srgb, var(--c) 28%, transparent); stroke: var(--c); stroke-width: 1.2; transition: fill .25s; }
.die-p .core { fill: var(--c); }
.die-p:hover .pad, .die-p:focus-visible .pad, .die-p.hot .pad { fill: color-mix(in srgb, var(--c) 70%, transparent); }
.wafer-tip {
  position: absolute; z-index: 3; pointer-events: none; width: 220px; padding: 11px 13px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(8, 14, 17, .96); color: #e9f2f1;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .8);
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s var(--ease);
}
.wafer-tip.show { opacity: 1; transform: none; }
.wafer-tip .mono { color: var(--c, #34e0c4); font-size: .62rem; }
.wafer-tip b { display: block; font-family: var(--f-head); font-weight: 500; font-size: .98rem; margin: 3px 0 4px; line-height: 1.2; }
.wafer-tip span:last-child { font-family: var(--f-mono); font-size: .7rem; color: #b9c8c9; }
.wafer-cap { text-align: center; margin: 0; }

/* ---------- Stats ---------- */
.stats { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 24px 22px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; padding-left: 0; }
.stats b { display: block; margin-top: 6px; font-family: var(--f-head); font-size: clamp(1.5rem, 2.5vw, 2.1rem); font-weight: 500; letter-spacing: -0.03em; }
.stats b small { font-size: .5em; color: var(--accent); margin-left: 3px; letter-spacing: 0; }

/* ---------- Section heads ---------- */
.head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 34px; }
.head .mono { color: var(--accent); margin: 0 0 14px; }
.head h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.head h2 em { font-size: 1.1em; }
.head p.note { color: var(--muted); max-width: 30em; margin: 0; font-size: .95rem; }

.seg { position: relative; display: inline-flex; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: .86rem; color: var(--muted); transition: color .25s; }
.seg button[aria-pressed="true"] { color: var(--bg); font-weight: 500; }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--ink); transition: left .35s var(--ease), width .35s var(--ease); }

/* ---------- Project cards ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card {
  --c: var(--accent);
  grid-column: span 2; position: relative; cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r); padding: 24px; background: var(--panel);
  display: flex; flex-direction: column; gap: 10px; min-height: 270px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s, opacity .3s;
}
.card.featured, .card.wide { grid-column: span 3; }
.card.featured { min-height: 290px; }
.card:hover, .card:focus-visible, .card.hot { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 24px 44px -30px var(--shadow); outline: none; }
.card.dim { opacity: .16; pointer-events: none; }

.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-top .mono { font-size: .66rem; }
.badge {
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .09em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent);
}
.card h3 { font-size: 1.3rem; }
.card.featured h3 { font-size: 1.6rem; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.art { color: var(--c); display: block; }
.card .art { width: 100%; max-width: 160px; height: 88px; margin: 4px 0 4px auto; }
.card.featured .body { display: grid; grid-template-columns: 1fr 170px; gap: 18px; align-items: center; }
.card .body > div { display: grid; gap: 9px; }
.card.featured .art { margin: 0; height: 122px; max-width: 170px; }
.metric { margin-top: auto; display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.metric b { font-family: var(--f-mono); font-size: .9rem; font-weight: 400; }
.metric .open { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c); white-space: nowrap; }

/* ---------- Bench (scope) ---------- */
.bench { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.scope {
  --tc: var(--t-digital);
  position: relative; border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; background: var(--panel);
  display: flex; flex-direction: column;
}
.screen {
  position: relative; flex: 1; min-height: 260px; border-radius: 10px; overflow: hidden; cursor: crosshair;
  background:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 10% 12.5%,
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 10% 12.5%,
    #05090b;
}
.screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud { position: absolute; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .07em; color: rgba(220, 240, 238, .6); pointer-events: none; }
.hud span { white-space: nowrap; }
.hud.top { top: 12px; } .hud.bot { bottom: 12px; }
.hud b { color: var(--tc); font-weight: 400; transition: color .4s; }
.scope-foot { display: flex; justify-content: space-between; padding: 12px 4px 0; }
.scope-foot .mono { font-size: .62rem; }
.channels { display: grid; gap: 12px; }
.ch {
  --c: var(--accent);
  text-align: left; cursor: pointer; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  background: var(--panel); display: grid; gap: 4px; align-content: center; transition: border-color .3s;
}
.ch:hover { border-color: var(--line-2); }
.ch[aria-pressed="true"] { border-color: var(--c); }
.ch .mono { color: var(--c); font-size: .64rem; }
.ch b { font-family: var(--f-head); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.03em; }
.ch span:last-child { color: var(--muted); font-size: .86rem; }

/* ---------- About ---------- */
.chain { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.stage { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stage .mono { font-size: .62rem; }
.stage b { display: block; font-family: var(--f-head); font-size: 1.05rem; font-weight: 500; margin: 5px 0 2px; }
.stage span { font-size: .82rem; color: var(--muted); }
.stage.now { border-color: var(--accent); }
.stage.now .mono { color: var(--accent); }
.stage.next { border-style: dashed; background: none; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 30px; }
.panel h3 { font-size: 1.4rem; }
.panel > .mono { margin: 8px 0 18px; display: block; }
.panel p { margin: 0 0 14px; color: var(--soft); }
.pull { font-family: var(--f-serif); font-style: italic; font-size: 1.6rem; line-height: 1.25; color: var(--ink) !important; border-left: 1px solid var(--accent); padding-left: 18px; margin: 24px 0 0 !important; }
.xp { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.xp li { display: grid; grid-template-columns: 92px 1fr; gap: 14px; font-size: .93rem; color: var(--soft); }
.xp li > b { font-family: var(--f-mono); font-weight: 400; font-size: .74rem; letter-spacing: .04em; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 8px; padding: 6px 8px; height: fit-content; text-align: center; }
.kw { font-family: var(--f-mono); font-size: .86em; color: var(--ink); }

/* ---------- Resume ---------- */
.edu { display: grid; gap: 24px; align-content: start; }
.edu > div { padding-left: 18px; border-left: 1px solid var(--line-2); }
.edu > div:first-child { border-left-color: var(--accent); }
.edu > div > .mono { display: block; margin-top: 8px; }
.edu ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.edu li { margin-bottom: 4px; } .edu li::marker { color: var(--accent); }
/* skills as a layout-editor layer palette */
.layers { display: grid; align-content: start; padding: 10px 30px; }
.layer { --c: var(--c-analog); display: grid; grid-template-columns: 34px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.layer:first-child { border-top: 0; }
.layer:nth-child(2) { --c: var(--c-digital); } .layer:nth-child(3) { --c: var(--c-phys); } .layer:nth-child(4) { --c: var(--c-verif); }
.swatch { width: 34px; height: 22px; border: 1px solid var(--c); border-radius: 3px; margin-top: 2px; background: repeating-linear-gradient(45deg, var(--c) 0 1.5px, transparent 1.5px 6px); }
.layer:nth-child(2) .swatch { background: repeating-linear-gradient(-45deg, var(--c) 0 1.5px, transparent 1.5px 6px); }
.layer:nth-child(3) .swatch { background: repeating-linear-gradient(45deg, var(--c) 0 1px, transparent 1px 6px), repeating-linear-gradient(-45deg, var(--c) 0 1px, transparent 1px 6px); }
.layer:nth-child(4) .swatch { background: radial-gradient(circle, var(--c) 1.2px, transparent 1.6px) 0 0 / 6px 6px; }
.layer h4 { font-family: var(--f-mono); font-size: .7rem; font-weight: 400; letter-spacing: .09em; text-transform: uppercase; color: var(--c); margin-bottom: 10px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 0; }
.tags li { border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 12px; font-size: .82rem; color: var(--soft); }

/* ---------- Contact ---------- */
.contact {
  border: 1px solid var(--line-2); border-radius: 28px; padding: clamp(34px, 6vw, 76px);
  background: radial-gradient(520px 300px at 100% 110%, var(--glow), transparent 70%), var(--panel);
}
.contact .mono { color: var(--accent); }
.contact h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); max-width: 13em; margin: 16px 0 20px; }
.contact p { color: var(--soft); max-width: 34em; margin: 0 0 30px; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 40px 0 6px; }
footer .mono { font-size: .64rem; color: var(--faint); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: .88rem; transition: opacity .3s, transform .3s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= Datasheet ================= */
dialog.sheet {
  --c: var(--accent);
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(920px, 100vw); max-width: 100vw;
  border: 0; border-left: 1px solid var(--line-2); padding: 0; color: var(--ink); background: var(--bg);
  box-shadow: -40px 0 80px -30px var(--shadow);
}
dialog.sheet[open] { animation: slide .45s var(--ease); }
dialog.sheet::backdrop { background: rgba(2, 5, 6, .55); backdrop-filter: blur(4px); animation: fade .3s; }
@keyframes slide { from { transform: translateX(50px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 14px clamp(20px, 4vw, 44px);
  background: var(--glass); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.sheet-bar > .mono { margin-right: auto; color: var(--c); font-size: .66rem; }
.ibtn { height: 34px; min-width: 34px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border: 1px solid var(--line-2); border-radius: 999px; background: none; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .07em; text-transform: uppercase; color: var(--soft); transition: border-color .2s, color .2s; }
.ibtn:hover { border-color: var(--c); color: var(--c); }
.ibtn svg { width: 14px; height: 14px; }
.sheet-body { padding: 34px clamp(20px, 4vw, 44px) 60px; }
.ds-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.ds-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 14px 0 12px; }
.ds-head .desc { color: var(--soft); font-size: 1.05rem; margin: 0 0 20px; }
.ds-meta { margin: 0; border-top: 1px solid var(--line); }
.ds-meta div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.ds-meta dt { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.ds-meta dd { margin: 0; color: var(--soft); }
.ds-fig { margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 12px; background: var(--panel); }
.ds-fig .art { width: 100%; height: 190px; stroke-width: 1.5px; }
.ds-fig figcaption { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); text-align: center; padding-top: 10px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 30px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.kpis div { background: var(--panel); padding: 20px 22px; }
.kpis b { display: block; font-family: var(--f-head); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; color: var(--c); }
.kpis span { font-size: .84rem; color: var(--muted); }
.ds-sec { margin-top: 40px; }
.ds-sec > h3 { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: .68rem; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--c); margin-bottom: 16px; }
.ds-sec > h3 i { font-style: normal; color: var(--faint); }
.ds-sec > h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ds-sec p { color: var(--soft); margin: 0; max-width: 46em; }
.feat { margin: 0; padding: 0 0 0 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 34px; }
.feat li { color: var(--soft); font-size: .95rem; }
.feat li::marker { color: var(--c); }
.spec { width: 100%; border-collapse: collapse; font-size: .9rem; }
.spec th { text-align: left; font-family: var(--f-mono); font-size: .62rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line-2); }
.spec td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--soft); }
.spec td:nth-child(2) { color: var(--muted); font-size: .86rem; }
.spec td:last-child, .spec th:last-child { text-align: right; padding-right: 0; }
.spec td:last-child { font-family: var(--f-mono); font-size: .84rem; color: var(--ink); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.note-card { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--panel); }
.note-card h4 { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 1.45rem; letter-spacing: 0; margin-bottom: 10px; }
.note-card p { font-size: .94rem; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 0; counter-reset: s; }
.flow li { counter-increment: s; display: flex; align-items: center; font-size: .86rem; color: var(--soft); }
.flow li span { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; background: var(--panel); }
.flow li span::before { content: counter(s, decimal-leading-zero); font-family: var(--f-mono); font-size: .62rem; color: var(--c); margin-right: 8px; }
.flow li:not(:last-child)::after { content: ""; width: 20px; height: 1px; background: var(--line-2); }
.ds-foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ds-foot .mono { font-size: .6rem; color: var(--faint); }

/* ================= Responsive ================= */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .wafer { width: min(100%, 400px); }
  .card, .card.featured, .card.wide { grid-column: span 3; }
  .card.solo { grid-column: 1 / -1; }
  .card.featured .body { grid-template-columns: 1fr; }
  .card.featured .art { margin-left: auto; height: 96px; }
  .bench { grid-template-columns: 1fr; }
  .channels { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { position: sticky; top: 0; inset: auto; width: 100%; flex-direction: row; align-items: center; padding: 10px 14px; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand small, .status, .side-links a { display: none; }
  .side-foot { margin: 0; display: block; }
  .brand svg { width: 32px; height: 32px; } .brand b { white-space: nowrap; }
  nav { margin: 0 0 0 auto; overflow-x: auto; scrollbar-width: none; } nav::-webkit-scrollbar { display: none; }
  .nav { display: flex; } .nav a .mono { display: none; }
  .nav a { padding: 7px 10px; font-size: .88rem; }
  main { margin-left: 0; padding-top: 40px; }
  main > section { padding-top: 72px; scroll-margin-top: 50px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; padding-left: 0; } .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bento { grid-template-columns: 1fr; } .card, .card.featured { grid-column: auto; min-height: 0; }
  .channels { grid-template-columns: 1fr; }
  .chain { grid-template-columns: 1fr 1fr; }
  .xp li { grid-template-columns: 1fr; gap: 6px; } .xp li > b { width: fit-content; }
  .ds-head { grid-template-columns: 1fr; }
  .layers { padding: 6px 20px; }
}
@media (max-width: 600px) {
  .brand span { display: none; } .nav a { padding: 7px 7px; font-size: .82rem; }
  .kpis { grid-template-columns: 1fr; }
  .spec th:nth-child(2), .spec td:nth-child(2) { display: none; }
  .ibtn span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
