/* davidlobo.tech v2. Slate, not black. One family (Archivo); the width axis does the talking.
   Blue is the only accent and it means "data" or "go". */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2-variations"), url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}
:root {
  --bg: #1b2129;
  --bg-2: #171c23;
  --panel: #222a33;
  --panel-2: #29323d;
  --line: #313b46;
  --line-2: #3d4956;
  --text: #e8edf2;
  --dim: #9aa7b4;
  --faint: #6c7a88;
  --blue: #5aa7ff;
  --blue-2: #8cc2ff;
  --blue-ink: #0b1a2c;
  --warm: #ffb547;
  --hot: #ff6b5a;
  --plate: #ffffff;
  --wrap: 1200px;
  --gutter: 24px;
  --head-h: 64px;
  --r: 6px;
  color-scheme: dark;
}
@media (max-width: 640px) { :root { --gutter: 16px; --head-h: 58px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--text); text-decoration-line: underline; text-decoration-color: var(--blue); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--blue-2); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.06; letter-spacing: -0.01em; }
h1 { font-stretch: 122%; font-weight: 800; font-size: clamp(2.4rem, 6vw, 5.2rem); letter-spacing: -0.025em; line-height: .96; }
h2 { font-stretch: 112%; font-size: clamp(1.45rem, 2.4vw, 2.05rem); }
h3 { font-stretch: 106%; font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: .45em; }
strong { font-weight: 650; }
.dim { color: var(--dim); }
.small { font-size: .82rem; }
.note { color: var(--dim); font-size: .92rem; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-stretch: 88%; font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: var(--blue-ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { width: 100%; max-width: 1480px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 44em; }

/* ---------- header */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-inline: var(--gutter);
  background: rgba(27, 33, 41, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); transition: background-color .25s, border-color .25s;
}
.home .site-head:not(.scrolled):not(.menu-open) { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); white-space: nowrap; }
.mark svg { width: 46px; height: auto; }
.mark span { font-stretch: 120%; font-weight: 800; font-size: 1rem; letter-spacing: -.01em; }
.mark:hover { color: var(--text); }
.mark:hover .dl-wing { fill: var(--blue-2); }
.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a { text-decoration: none; font-size: .93rem; font-stretch: 95%; color: var(--dim); padding: 6px 0; border-bottom: 1.5px solid transparent; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--blue); }
.site-nav a.nav-cta { color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 14px; }
.site-nav a.nav-cta:hover { border-color: var(--blue); }
.menu-btn { display: none; background: none; color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; font: inherit; font-size: .88rem; padding: 6px 14px; cursor: pointer; }
@media (max-width: 980px) {
  .menu-btn { display: block; }
  .site-nav { position: fixed; inset: var(--head-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 18px; display: none; max-height: calc(100svh - var(--head-h)); overflow-y: auto; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 0; font-size: 1.1rem; color: var(--text); border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--line); }
  .site-nav a.nav-cta { border: 0; border-radius: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
}

main { display: block; }
main > section { margin-bottom: clamp(64px, 9vw, 120px); }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-stretch: 105%; font-size: .95rem;
  background: var(--blue); color: var(--blue-ink); padding: 12px 20px; border-radius: 999px; border: 1.5px solid var(--blue); cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn:hover { background: var(--blue-2); border-color: var(--blue-2); color: var(--blue-ink); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--blue); color: var(--text); }
.btn .arr::after { content: "\2192"; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- home hero */
.hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); min-height: min(100svh, 980px); background: var(--bg); overflow: hidden; margin-bottom: clamp(56px, 8vw, 96px); }
.hero-text { align-self: end; padding: calc(var(--head-h) + 48px) clamp(24px, 4vw, 64px) clamp(48px, 10vh, 104px) max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
.hero-text h1 { font-size: clamp(3.2rem, 7.6vw, 7.8rem); line-height: .88; }
.hero-text .role { font-stretch: 112%; font-weight: 600; font-size: clamp(1.1rem, 1.7vw, 1.45rem); color: var(--blue-2); margin: 22px 0 0; line-height: 1.25; }
.hero-text p.lede { max-width: 30em; font-size: clamp(1.02rem, 1.25vw, 1.18rem); line-height: 1.55; margin-top: 16px; color: var(--dim); }
.hero-photo { position: relative; min-height: 100%; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 47% 50%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(27,33,41,0) 24%), linear-gradient(180deg, rgba(27,33,41,.6) 0%, rgba(27,33,41,0) 14%), linear-gradient(0deg, rgba(27,33,41,.5) 0%, rgba(27,33,41,0) 20%); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-stretch: 118%; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hero-stats span { font-size: .8rem; color: var(--dim); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { order: -1; aspect-ratio: 5 / 4; max-height: 64svh; width: 100%; }
  .hero-photo img { object-position: 50% 55%; }
  .hero-photo::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(27,33,41,0) 32%), linear-gradient(180deg, rgba(27,33,41,.65) 0%, rgba(27,33,41,0) 20%); }
  .hero-text { padding: 0 var(--gutter) 40px; margin-top: -36px; position: relative; }
  .hero-text h1 { font-size: clamp(3rem, 16vw, 5rem); }
}

/* ---------- page heads */
.pagehead { padding-top: calc(var(--head-h) + clamp(44px, 8vw, 104px)); margin-bottom: clamp(32px, 5vw, 60px) !important; }
.pagehead h1 { max-width: 15em; }
.pagehead .lede { font-size: clamp(1.08rem, 1.6vw, 1.3rem); line-height: 1.5; max-width: 38em; margin-top: 20px; color: var(--dim); }
.pagehead .lede strong { color: var(--text); font-weight: 600; }
.pagehead .meta { color: var(--faint); margin-top: 10px; font-size: .92rem; }
.hero-img { margin: 0 auto clamp(48px, 7vw, 88px) !important; }
.hero-img img { width: 100%; max-height: 80vh; object-fit: cover; border-radius: var(--r); }
.hero-img figcaption { color: var(--dim); font-size: .85rem; margin-top: 10px; }
.cine img { aspect-ratio: 2.39 / 1; max-height: none; }
@media (max-width: 640px) { .cine img { aspect-ratio: 16 / 10; } }

/* ---------- blocks */
.block > .prose { max-width: 42em; }
.block > .prose + * { margin-top: 32px; }
.block.split > .prose + * { margin-top: 0; }
.prose h2 { margin-bottom: 18px; }
.prose h3 { margin: 26px 0 8px; }
.prose ul li::marker { color: var(--blue); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split.top { align-items: start; }
.split.flip > :first-child { order: 2; }
.split > .prose { max-width: 36em; }
@media (max-width: 860px) { .split, .block.split { grid-template-columns: minmax(0, 1fr); } .split.flip > :first-child { order: 0; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { padding: 16px 18px 4px 0; }
.facts dt { color: var(--dim); font-size: .83rem; }
.facts dd { margin: 4px 0 0; font-stretch: 118%; font-weight: 700; font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts dd small { font-size: .55em; font-weight: 600; color: var(--dim); margin-left: 3px; }
@media (max-width: 560px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.callout { border-left: 2px solid var(--blue); padding: 4px 0 4px 18px; color: var(--dim); }
.callout strong { color: var(--text); }
.ip { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font-size: .92rem; color: var(--dim); max-width: 46em; }
.ip::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--warm); }

/* ---------- section title row */
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head p { margin: 0; color: var(--dim); max-width: 36em; }

/* ---------- now (home) */
.now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.now-img { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--panel); }
.now-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .now { grid-template-columns: 1fr; } }

/* ---------- project cards */
.cards { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.card { grid-column: span 4; position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .2s, transform .2s; }
.card:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-2px); }
.card.wide { grid-column: span 8; }
.card .card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.card.wide .card-img { aspect-ratio: auto; flex: 1; min-height: 300px; }
.card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.03); }
.card .card-img.plate { background: var(--plate); }
.card .card-img.plate img { object-fit: contain; padding: 4%; }
.card .card-body { padding: 18px 20px 20px; }
.card h3 { font-size: 1.3rem; font-stretch: 114%; margin-bottom: 6px; }
.card p { margin: 0; color: var(--dim); font-size: .95rem; }
.card .tag { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-stretch: 90%; font-weight: 600; color: var(--blue); margin-bottom: 8px; }
.card .stat { position: absolute; top: 14px; right: 14px; background: rgba(23,28,35,.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 960px) { .card, .card.wide { grid-column: span 6; } .card.wide .card-img { aspect-ratio: 16 / 10; min-height: 0; flex: none; } }
@media (max-width: 620px) { .card, .card.wide { grid-column: span 12; } }

/* ---------- process strip */
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); counter-reset: step; }
.process li { margin: 0; padding: 20px 18px 0 0; position: relative; counter-increment: step; }
.process li::before { content: "0" counter(step); display: block; font-stretch: 80%; font-weight: 600; font-size: .8rem; color: var(--blue); letter-spacing: .08em; margin-bottom: 10px; }
.process li::after { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.process h3 { margin-bottom: 6px; }
.process p { color: var(--dim); font-size: .92rem; margin: 0; }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; } }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; } }

/* ---------- quote */
.quote { position: relative; padding: clamp(36px, 6vw, 72px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quote blockquote { margin: 0; max-width: 24em; font-stretch: 110%; font-weight: 600; font-size: clamp(1.5rem, 3.2vw, 2.6rem); line-height: 1.18; letter-spacing: -.015em; }
.quote blockquote::before { content: "\201C"; display: block; color: var(--blue); font-size: 2.2em; line-height: .6; margin-bottom: 10px; }
.quote figcaption { margin-top: 22px; color: var(--dim); }
.quote figcaption strong { color: var(--text); }
.quote.small blockquote { font-size: clamp(1.25rem, 2.3vw, 1.75rem); max-width: 30em; }

/* ---------- speed tape (HSFD) */
.tape { margin-top: 8px; }
.tape-track { position: relative; height: 54px; border-bottom: 1px solid var(--line-2); background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10%) left bottom / 100% 12px no-repeat; }
.tape-fill { position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%; background: linear-gradient(90deg, var(--line-2) 0%, var(--blue) 100%); transform-origin: left; }
.tape-mark { position: absolute; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.tape-mark b { font-stretch: 112%; font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tape-mark span { font-size: .72rem; color: var(--dim); white-space: nowrap; }
.tape-mark i { width: 1.5px; height: 14px; background: var(--blue); margin-top: 4px; }
.tape-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--faint); margin-top: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .tape-mark b { font-size: .8rem; } .tape-mark span { display: none; } }

/* ---------- version timeline (HSFD) */
.versions { display: grid; gap: 0; border-top: 1px solid var(--line); }
.ver { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; padding: 36px 0; border-bottom: 1px solid var(--line); align-items: start; }
.ver-id { font-stretch: 125%; font-weight: 800; font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: .9; color: var(--text); }
.ver-id small { display: block; font-size: .8rem; font-weight: 600; font-stretch: 95%; color: var(--dim); margin-top: 10px; letter-spacing: .02em; }
.ver .prose h3 { margin: 0 0 10px; font-size: 1.35rem; font-stretch: 112%; }
.ver .badge { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; border: 1px solid var(--line-2); color: var(--dim); }
.ver .badge.ok { color: var(--blue-2); border-color: rgba(90,167,255,.45); }
.ver .badge.lost { color: #ff9d90; border-color: rgba(255,107,90,.4); }
.ver .badge.wip { color: var(--warm); border-color: rgba(255,181,71,.4); }
.ver .gallery { margin: 0; }
@media (max-width: 900px) { .ver { grid-template-columns: 1fr; gap: 16px; } .ver-id small { display: inline; margin-left: 10px; } }

/* ---------- galleries */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery.cols-1 { grid-template-columns: minmax(0, 1fr); }
.gallery.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .gallery.cols-3, .gallery.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .gallery { gap: 8px; } }
.gallery .span-2 { grid-column: span 2; }
.fig { margin: 0; }
.fig .zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--panel); cursor: zoom-in; border-radius: var(--r); overflow: hidden; }
.fig img { width: 100%; aspect-ratio: var(--ratio, 4/3); object-fit: cover; }
.fig.fit-contain .zoom { background: var(--panel); }
.fig.fit-contain img { object-fit: contain; padding: 6px; }
.fig.fit-plate .zoom { background: var(--plate); }
.fig.fit-plate img { object-fit: contain; padding: 4%; }
.fig.fit-natural img { aspect-ratio: auto; }
.fig figcaption { font-size: .83rem; color: var(--dim); margin-top: 7px; line-height: 1.4; }

/* ---------- video */
.videos { display: grid; gap: 18px; align-items: start; }
.videos.one { max-width: 1000px; }
.videos.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.videos.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .videos.two, .videos.three { grid-template-columns: 1fr; } }
.vid { margin: 0; }
.vid video { width: 100%; background: #000; border-radius: var(--r); }
.vid.vertical video { aspect-ratio: 9/16; object-fit: cover; max-height: 78vh; width: auto; max-width: 100%; }
.vid figcaption { font-size: .83rem; color: var(--dim); margin-top: 7px; }
.vid.feature figcaption { font-size: .95rem; }

/* ---------- CFD board */
.board-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { font: inherit; font-size: .85rem; color: var(--dim); background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip[aria-pressed="true"] { background: var(--blue); color: var(--blue-ink); border-color: var(--blue); font-weight: 600; }
.chip i { font-style: normal; opacity: .7; margin-left: 4px; font-size: .8em; }
.board-sort { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--dim); }
.board-sort select { font: inherit; font-size: .85rem; color: var(--text); background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; }
@media (max-width: 640px) { .board-sort { margin-left: 0; width: 100%; } }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sim { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.sim[hidden] { display: none; }
.sim .sim-img { position: relative; background: radial-gradient(ellipse at 50% 55%, #2b3540 0%, var(--panel) 70%); aspect-ratio: 610 / 384; }
.sim .sim-img img { width: 100%; height: 100%; object-fit: contain; }
.sim .sim-tag { position: absolute; left: 8px; top: 8px; font-size: .7rem; font-weight: 600; letter-spacing: .04em; color: var(--dim); }
.sim .sim-flag { position: absolute; right: 8px; top: 8px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--warm); color: #231500; border-radius: 999px; padding: 2px 8px; }
.sim figcaption { padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.sim .sim-title { font-size: .82rem; color: var(--dim); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; }
.sim .sim-title b { color: var(--text); font-weight: 600; }
.sim dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; gap: 4px; }
.sim dt { font-size: .66rem; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.sim dd { margin: 0; font-stretch: 108%; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1rem; }
.sim dd.d { color: var(--blue-2); }
.sim.hl { border-color: rgba(255,181,71,.55); }
.board-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--dim); font-size: .82rem; margin-top: 14px; }

/* ---------- compare (side by side) */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.compare figure { margin: 0; background: var(--plate); border-radius: var(--r); overflow: hidden; }
.compare figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.compare figcaption { background: var(--panel); color: var(--dim); font-size: .85rem; padding: 10px 14px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.compare figcaption b { color: var(--text); font-variant-numeric: tabular-nums; }
.compare .zoom { display: block; padding: 0; border: 0; width: 100%; background: none; cursor: zoom-in; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }

/* ---------- charts */
.chart { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 12px; margin: 0; }
.chart h3 { font-size: 1rem; margin-bottom: 2px; }
.chart .sub { color: var(--dim); font-size: .82rem; margin-bottom: 10px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart svg text { font-family: inherit; fill: var(--dim); font-size: 11px; }
.chart svg .ax { stroke: var(--line-2); stroke-width: 1; }
.chart svg .grid { stroke: var(--line); stroke-width: 1; }
.chart svg .lbl { fill: var(--text); font-weight: 600; }
.chart .key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .8rem; color: var(--dim); margin-top: 8px; }
.chart .key span { display: inline-flex; align-items: center; gap: 6px; }
.chart .key i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .charts { grid-template-columns: 1fr; } }

/* ---------- loop diagram (Kratos solver) */
.loop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: lp; position: relative; }
.loop .node { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; counter-increment: lp; }
.loop .node::before { content: counter(lp); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--blue); color: var(--blue); font-size: .78rem; font-weight: 700; margin-bottom: 10px; }
.loop .node h4 { font-size: 1rem; font-stretch: 108%; margin-bottom: 6px; }
.loop .node p { margin: 0; font-size: .88rem; color: var(--dim); }
.loop-back { margin-top: 10px; border: 1px dashed var(--line-2); border-radius: var(--r); padding: 10px 14px; font-size: .88rem; color: var(--dim); display: flex; gap: 10px; align-items: center; }
.loop-back::before { content: "\21BA"; color: var(--blue); font-size: 1.3rem; line-height: 1; }
@media (max-width: 860px) { .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .loop { grid-template-columns: 1fr; } }
.eq { font-stretch: 92%; font-variant-numeric: tabular-nums; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; color: var(--blue-2); font-size: .95rem; overflow-x: auto; white-space: nowrap; }

/* ---------- article reader */
.reader { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.reader-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--dim); }
.reader-bar .dots { display: flex; gap: 6px; }
.reader-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.reader-bar .url { flex: 1; min-width: 0; background: var(--bg-2); border-radius: 999px; padding: 4px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-bar a { white-space: nowrap; }
.reader-scroll { height: min(70vh, 640px); overflow-y: auto; background: #fff; overscroll-behavior: contain; }
.reader-scroll img { width: 100%; height: auto; }
.press-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.press-list li { margin: 0; border-bottom: 1px solid var(--line); }
.press-list a { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 18px; padding: 16px 0; text-decoration: none; align-items: baseline; }
.press-list .src { color: var(--dim); font-size: .85rem; }
.press-list strong { font-stretch: 106%; }
.press-list .go { color: var(--blue); }
.press-list a:hover strong { text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 3px; }
@media (max-width: 640px) { .press-list a { grid-template-columns: 1fr; gap: 2px; } .press-list .go { display: none; } }

/* ---------- rows (experience) */
.rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.rows > li { margin: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px minmax(0, 1fr) 220px; gap: 28px; padding: 28px 0; align-items: start; }
.rows .yrs { color: var(--dim); font-variant-numeric: tabular-nums; font-size: .92rem; padding-top: 4px; }
.rows h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); font-stretch: 114%; margin-bottom: 4px; }
.rows .role { color: var(--blue-2); margin-bottom: 10px; font-size: .95rem; }
.rows .row-body p:last-child { margin-bottom: 0; }
.rows .row-img { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--panel); }
.rows .row-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .rows > li { grid-template-columns: minmax(0, 1fr); gap: 10px; } .rows .row-img { max-width: 420px; order: -1; } }

/* ---------- 3D model slot */
.model-slot { margin: 0; }
.model-stage { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(ellipse at 50% 40%, #2d3743 0%, var(--panel) 72%); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.model-stage > img { width: 100%; height: 100%; object-fit: contain; padding: 6%; filter: drop-shadow(0 24px 30px rgba(0,0,0,.4)); }
.model-stage model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.model-slot figcaption { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: .83rem; color: var(--dim); }
.model-hint { color: var(--blue); }

/* ---------- resume */
.resume-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; margin-top: 36px; }
.resume-grid h2 { margin: 0 0 16px; font-size: 1.3rem; }
.resume-grid h2:not(:first-child) { margin-top: 40px; }
.cv-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.cv-list li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.cv-list .dim { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .resume-grid { grid-template-columns: 1fr; gap: 24px; } .cv-list li { grid-template-columns: 1fr; gap: 0; } }
.certs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cert-img { border-radius: var(--r); overflow: hidden; background: #fff; margin-bottom: 12px; aspect-ratio: 1.41/1; }
.cert-img img { width: 100%; height: 100%; object-fit: contain; }
.cert h3 { margin-bottom: 6px; font-size: 1rem; }
.cert p { margin: 0 0 6px; font-size: .9rem; }
@media (max-width: 860px) { .certs { grid-template-columns: 1fr; max-width: 520px; } }

/* ---------- contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); border-top: 1px solid var(--line); padding-top: 48px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form label { min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--dim); }
.form .full { grid-column: 1 / -1; }
.form input, .form textarea { font: inherit; font-size: 1rem; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; width: 100%; min-width: 0; box-sizing: border-box; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--blue); }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- prev/next */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--line); padding-top: 24px; }
.pn { display: flex; flex-direction: column; text-decoration: none; font-stretch: 110%; font-weight: 700; font-size: 1.2rem; }
.pn.next { text-align: right; align-items: flex-end; }
.pn .small { font-weight: 400; font-stretch: 100%; color: var(--dim); }

/* ---------- footer */
.site-foot { border-top: 1px solid var(--line); padding: 44px 0 52px; background: var(--bg-2); }
.foot-inner { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); display: grid; grid-template-columns: auto 1fr; gap: 18px 40px; align-items: start; }
.foot-inner svg { width: 64px; }
.foot-cta { font-stretch: 110%; font-weight: 600; font-size: clamp(1.05rem, 1.8vw, 1.3rem); margin: 0 0 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { text-decoration: none; color: var(--dim); }
.foot-links a:hover { color: var(--text); }
.site-foot .small { margin: 14px 0 0; color: var(--faint); }
@media (max-width: 560px) { .foot-inner { grid-template-columns: 1fr; } }

/* ---------- lightbox */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(15, 19, 24, .97); color: var(--text); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(0,0,0,.6); }
.lightbox img { max-width: min(94vw, 2400px); max-height: 86vh; width: auto; height: auto; object-fit: contain; }
.lightbox.light img { background: var(--plate); border-radius: var(--r); }
.lightbox button { position: absolute; background: rgba(34,42,51,.92); color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; font: inherit; font-size: .88rem; padding: 9px 16px; cursor: pointer; }
.lightbox button:hover { border-color: var(--blue); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; bottom: 16px; }
.lb-next { right: 16px; bottom: 16px; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }

/* ---------- small things */
.more { display: flex; gap: 24px; margin-top: 28px; flex-wrap: wrap; }
.logo-line .logo { width: 200px; height: auto; margin-bottom: 18px; }
.links-inline { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.kicker-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.kicker-list li { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.kicker-list h3 { font-size: 1.02rem; margin-bottom: 6px; }
.kicker-list p { margin: 0; color: var(--dim); font-size: .92rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { color: var(--dim); font-weight: 600; font-size: .78rem; background: var(--panel); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.best { color: var(--blue-2); font-weight: 700; }

/* ---------- reader document (light page inside the frame) */
.reader-doc { color: #1d232a; max-width: 720px; margin: 0 auto; padding: 32px clamp(18px, 4vw, 40px) 40px; font-size: 1rem; line-height: 1.65; }
.reader-doc .reader-src { color: #c8102e; font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.reader-doc h3 { font-size: clamp(1.4rem, 3vw, 2rem); font-stretch: 100%; line-height: 1.15; color: #111; margin-bottom: 10px; }
.reader-doc .reader-by { color: #5b6570; font-size: .88rem; margin-bottom: 20px; }
.reader-doc img { border-radius: 4px; margin: 0 0 22px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.reader-doc blockquote { margin: 22px 0; padding-left: 16px; border-left: 3px solid #c8102e; font-size: 1.15rem; font-weight: 600; color: #111; }
.reader-doc blockquote span { display: block; font-size: .85rem; font-weight: 400; color: #5b6570; margin-top: 6px; }
.reader-doc a:not(.btn) { color: #1d232a; }
.reader-more { margin-top: 28px; }
.card .card-img { flex: 1 0 auto; }
.home .site-head:not(.scrolled) .site-nav a { color: var(--text); text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.compare figure img { aspect-ratio: 16 / 9; object-fit: contain; }
.videos.three .vid.vertical video { width: 100%; max-height: 70vh; }
.hero-img.mid { max-width: calc(var(--wrap) + 2 * var(--gutter)); }

/* v2.1 */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
img.co-logo { height: 22px; width: auto; margin: 4px 0 12px; }
.kicker-list img.co-logo { height: 20px; margin: 2px 0 10px; }
.fig.fit-natural .zoom { background: #fff; }
.fig.fit-natural img { aspect-ratio: auto; }
.card .card-img.plate img { padding: 2%; }

/* v2.2 */
img.profile { width: 128px; height: 128px; border-radius: 50%; margin-bottom: 20px; box-shadow: 0 0 0 3px var(--panel), 0 0 0 4px var(--line-2); }
.pdf-embed { display: block; width: 100%; height: min(120vh, 1400px); border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
@media (max-width: 640px) { .pdf-embed { height: 80vh; } }
.narrow-fig { max-width: 760px !important; }
.fig figcaption:empty { display: none; }
.resume-page { display: block; max-width: 900px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.resume-page img { width: 100%; }

/* v2.3 */
.now-img { aspect-ratio: 4 / 5; max-height: 720px; }
.now-img img { object-position: 50% 0%; }
.card img[src$="varg/real-1.webp"] { object-position: 50% 68%; }
.hero-img.mid img { max-height: none; }
.prevnext { padding-top: 32px; margin-bottom: 88px !important; }
.pn.next { padding-right: 8px; }
.pn .small { margin-bottom: 4px; }
.hero-img.small { max-width: calc(880px + 2 * var(--gutter)); }
/* mobile menu: lighter sheet over a dimmed page */
@media (max-width: 980px) {
  .site-head.menu-open { background: var(--panel-2); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--line-2); }
  .site-head.menu-open::before { content: ""; position: fixed; inset: var(--head-h) 0 0 0; background: rgba(8, 11, 15, .6); }
  .site-nav { z-index: 1; background: var(--panel-2); border-bottom: 0; border-radius: 0 0 14px 14px; box-shadow: 0 24px 48px rgba(0, 0, 0, .45); }
  .site-nav a { border-bottom-color: var(--line-2); }
  .site-nav a:last-child { border-bottom: 0; }
}
.home .site-head.menu-open .site-nav a { text-shadow: none; }
