/* Portfolio styles: one stylesheet for every page. Colors are tokens on :root, redefined for dark mode. */

:root {
  color-scheme: light;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #16181d;
  --text-2: #464b55;
  --muted: #6b6f78;
  --border: #e4e4e0;
  --border-strong: #c9c9c3;
  --grid: #ececea;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-weak: #eaf2fc;
  --code-bg: #f3f3f1;
  --series-1: #2a78d6;
  --series-base: #a9a9a2;
  --series-2: #d97a0b;
  --btn-bg: #2a78d6;
  --btn-bg-hover: #1c5cab;
  --header-bg: rgba(255, 255, 255, 0.72);
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.05), 0 8px 24px rgba(20, 20, 20, 0.06);
  --cat-text: #2a78d6;
  --cat-audio: #d97a0b;
  --cat-mm: #7b52d6;
  --cat-data: #2e9b5f;
  --todo-bg: #fff6dc;
  --todo-border: #d29a00;
  --todo-ink: #5c4300;
  --mark-bg: #ffd7d1;
  --status-bad: #c62828;
  --status-ok: #2e7d32;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "NanumGothic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "D2Coding", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211;
  --surface: #1a1a19;
  --text: #f0efec;
  --text-2: #c6c5bc;
  --muted: #9b9a91;
  --border: #2f2f2c;
  --border-strong: #4a4a46;
  --grid: #2a2a28;
  --accent: #5598e7;
  --accent-ink: #86b6ef;
  --accent-weak: #172638;
  --code-bg: #222220;
  --series-1: #3987e5;
  --series-base: #6f6e68;
  --series-2: #e0912f;
  --todo-bg: #2c2410;
  --todo-border: #c98500;
  --todo-ink: #f1d48a;
  --mark-bg: #5c2a22;
  --status-bad: #f2726b;
  --status-ok: #63c26a;
  --btn-bg: #3987e5;
  --btn-bg-hover: #2a78d6;
  --header-bg: rgba(26, 26, 25, 0.72);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
  --cat-text: #5598e7;
  --cat-audio: #e0912f;
  --cat-mm: #a585e8;
  --cat-data: #4fb37a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211;
    --surface: #1a1a19;
    --text: #f0efec;
    --text-2: #c6c5bc;
    --muted: #9b9a91;
    --border: #2f2f2c;
    --border-strong: #4a4a46;
    --grid: #2a2a28;
    --accent: #5598e7;
    --accent-ink: #86b6ef;
    --accent-weak: #172638;
    --code-bg: #222220;
    --series-1: #3987e5;
    --series-base: #6f6e68;
    --series-2: #e0912f;
    --todo-bg: #2c2410;
    --todo-border: #c98500;
    --todo-ink: #f1d48a;
    --mark-bg: #5c2a22;
    --status-bad: #f2726b;
    --status-ok: #63c26a;
    --btn-bg: #3987e5;
    --btn-bg-hover: #2a78d6;
    --header-bg: rgba(26, 26, 25, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
    --cat-text: #5598e7;
    --cat-audio: #e0912f;
    --cat-mm: #a585e8;
    --cat-data: #4fb37a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

img, svg { max-width: 100%; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 880px; }

[id] { scroll-margin-top: 84px; }

/* Header and footer */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--surface); }
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}
.brand { font-weight: 650; color: var(--text); text-decoration: none; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; margin-left: auto; }
.tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 36px; min-width: 36px; padding: 0 9px;
  border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--text-2);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn svg { width: 18px; height: 18px; flex: none; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}
.lang { position: relative; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 110;
  min-width: 150px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.lang-menu[hidden] { display: none; }
.lang-menu li { margin: 0; }
.lang-menu a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; }
.lang-menu a:hover { background: var(--code-bg); color: var(--text); }
.lang-menu a[aria-current="true"] { font-weight: 650; color: var(--accent-ink); }
.lang-menu a[aria-disabled="true"] { color: var(--muted); cursor: default; }
.lang-menu a[aria-disabled="true"]:hover { background: none; }
.lang-menu .soon { font-size: 12px; color: var(--muted); }
.site-nav a { color: var(--text-2); text-decoration: none; }
.site-nav a:hover { color: var(--accent-ink); text-decoration: underline; }

.site-footer {
  margin-top: 72px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

/* Type */

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; margin: 0 0 12px; font-weight: 700; }
h2 { font-size: 1.4rem; margin: 52px 0 12px; font-weight: 650; }
h3 { font-size: 1.1rem; margin: 28px 0 8px; font-weight: 650; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 4px 0; }
.lead { font-size: 1.15rem; color: var(--text-2); }
.small { font-size: 14px; color: var(--muted); }
code, kbd { font-family: var(--mono); font-size: 0.9em; background: var(--code-bg); padding: 1px 5px; border-radius: 5px; }
strong { font-weight: 650; }

/* Home page */

.hero { padding: 56px 0 8px; }
.hero h1 { font-size: 2.3rem; }
.hero .role { font-size: 1.15rem; color: var(--text-2); margin-bottom: 18px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.links a {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  background: var(--surface);
}
.links a:hover { border-color: var(--accent); color: var(--accent-ink); }
.links a.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.links a.primary:hover { background: var(--accent-ink); color: #fff; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.card h3 { margin: 4px 0 8px; font-size: 1.15rem; }
.card p { color: var(--text-2); font-size: 15.5px; }
.card .where { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.card .more { margin-top: auto; padding-top: 8px; font-size: 15px; color: var(--accent-ink); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; padding: 0; list-style: none; }
.tags li { margin: 0; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--code-bg); color: var(--text-2); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); margin: 0; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.timeline .what strong { display: block; }
.timeline .what span { color: var(--text-2); font-size: 15.5px; }

/* Case-study pages */

.crumb { margin: 32px 0 0; font-size: 15px; }
.crumb a { text-decoration: none; }
.crumb-hidden { visibility: hidden; }
/* Floating project navigation (site.js). The bottom links stay in the page for site.js but are hidden. */
.next-prev { display: none; }
.float-nav, .float-home { position: fixed; z-index: 40; display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none;
  background: var(--header-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.float-nav { --edge: max(12px, calc((100vw - 1160px) / 2 - 70px)); top: 50%; transform: translateY(-50%); min-height: 48px; min-width: 48px; padding: 0 12px;
  justify-content: center; border-radius: 24px; box-sizing: border-box; max-width: calc(var(--edge) + 40px); }
/* The arrow keeps its place; on hover the pill widens outward, into the empty margin, never over the page. */
.float-prev { right: calc(100% - var(--edge) - 48px); flex-direction: row-reverse; }
.float-next { left: calc(100% - var(--edge) - 48px); }
.float-nav svg { width: 22px; height: 22px; flex: none; }
.float-label { display: none; min-width: 0; padding: 6px 0; font-size: 14px; font-weight: 600; line-height: 1.3; white-space: normal; text-wrap: balance; }
.float-prev .float-label { text-align: right; }
.float-nav:hover, .float-nav:focus-visible { border-color: var(--accent); color: var(--accent-ink); }
.float-nav:hover .float-label, .float-nav:focus-visible .float-label { display: inline; }
.float-home { top: 76px; right: max(16px, calc((100vw - 1160px) / 2)); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.float-home:hover { border-color: var(--accent); color: var(--accent-ink); }
/* Narrow screens: no side margin, so the buttons sit in the bottom corners and widen inward. */
@media (max-width: 1299px) {
  .float-nav { top: auto; bottom: 18px; transform: none; max-width: calc(50vw - 24px); }
  .float-prev { right: auto; left: var(--edge); flex-direction: row; }
  .float-next { left: auto; right: var(--edge); flex-direction: row-reverse; }
  .float-prev .float-label { text-align: left; }
}
.case-head { padding: 18px 0 4px; }
.case-head .lead { margin-bottom: 20px; }

.meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 0 0 8px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15.5px;
}
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }

.note {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-weak);
  border-radius: 0 8px 8px 0;
  font-size: 15.5px;
}

.todo {
  margin: 14px 0;
  padding: 10px 14px;
  border: 1.5px dashed var(--todo-border);
  background: var(--todo-bg);
  color: var(--todo-ink);
  border-radius: 8px;
  font-size: 15px;
}
.todo::before { content: "TODO "; font-weight: 700; letter-spacing: 0.03em; }
span.todo { display: inline; padding: 1px 6px; margin: 0; border-radius: 5px; font-size: 0.9em; }

figure { margin: 22px 0; }
.fig {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fig-scroll svg { display: block; width: 100%; min-width: 620px; height: auto; }
figcaption { margin-top: 10px; font-size: 14.5px; color: var(--text-2); }

/* Shared SVG figure styles (diagrams and charts) */

:is(.fig, .figstyle) svg { font-family: var(--font); }
:is(.fig, .figstyle) svg text { fill: var(--text); text-anchor: middle; }
:is(.fig, .figstyle) .node rect { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.25; }
:is(.fig, .figstyle) .node.accent rect { fill: var(--accent-weak); stroke: var(--accent); stroke-width: 1.5; }
:is(.fig, .figstyle) .node.dashed rect { stroke-dasharray: 5 4; }
:is(.fig, .figstyle) .node.soft rect { fill: var(--bg); }
:is(.fig, .figstyle) text.t { font-size: 14px; font-weight: 650; }
:is(.fig, .figstyle) text.s { font-size: 12px; fill: var(--text-2); }
:is(.fig, .figstyle) text.lbl { font-size: 11.5px; fill: var(--muted); }
:is(.fig, .figstyle) .edge { fill: none; stroke: var(--muted); stroke-width: 1.5; }
:is(.fig, .figstyle) .edge.dashed { stroke-dasharray: 4 4; }
:is(.fig, .figstyle) .ah { fill: var(--muted); }
:is(.fig, .figstyle) .grid { stroke: var(--grid); stroke-width: 1; }
:is(.fig, .figstyle) .axis { stroke: var(--border-strong); stroke-width: 1; }
:is(.fig, .figstyle) text.tick { font-size: 11.5px; fill: var(--muted); }
:is(.fig, .figstyle) text.cat { font-size: 13px; text-anchor: end; }
:is(.fig, .figstyle) text.cat2 { font-size: 12px; text-anchor: end; fill: var(--text-2); }
:is(.fig, .figstyle) text.val { font-size: 12px; text-anchor: start; fill: var(--text-2); font-variant-numeric: tabular-nums; }
:is(.fig, .figstyle) text.leg { font-size: 12.5px; text-anchor: start; fill: var(--text-2); }
:is(.fig, .figstyle) .bar-main { fill: var(--series-1); }
:is(.fig, .figstyle) .bar-base { fill: var(--series-base); }
:is(.fig, .figstyle) .bar-alt { fill: var(--series-2); }
:is(.fig, .figstyle) .bar-soft { fill: var(--series-1); opacity: 0.38; }
:is(.fig, .figstyle) .bar-main:hover, .fig .bar-base:hover, .fig .bar-alt:hover { opacity: 0.85; }
:is(.fig, .figstyle) .bar-soft:hover { opacity: 0.3; }

/* Tables and code samples */

.table-wrap { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 650; color: var(--text-2); background: var(--code-bg); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.highlight td { background: var(--accent-weak); }

details { margin: 10px 0 0; font-size: 15px; }
summary { cursor: pointer; color: var(--accent-ink); }
details.example { margin: 34px 0 0; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
details.example > summary { font-size: 16px; font-weight: 650; }
details.example[open] > summary { margin-bottom: 14px; }

pre.sample {
  margin: 0;
  padding: 14px 16px;
  background: var(--code-bg);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}
pre.sample.wrapped { white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
pre.sample mark { background: var(--mark-bg); color: inherit; padding: 0 2px; border-radius: 3px; }
.page-img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.compare.stack { grid-template-columns: 1fr; }
.compare + p.small { margin-top: 10px; }
.compare h4 { margin: 0 0 6px; font-size: 14px; color: var(--text-2); font-weight: 650; }

.chat { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.chat li { margin: 0; padding: 10px 14px; border-radius: 12px; max-width: 88%; font-size: 15.5px; }
.chat .user { background: var(--code-bg); justify-self: end; }
.chat .bot { background: var(--accent-weak); justify-self: start; }
.chat .tool { justify-self: center; max-width: 100%; font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 2px 8px; }
.chat .who { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }

/* Voice-phishing demo (assets/vp-demo.js) */

.vp-demo { margin: 16px 0 8px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.vp-demo[hidden] { display: none; }
.vp-tabs { display: flex; gap: 6px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.vp-tab { font: inherit; font-size: 14.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-2); cursor: pointer; }
.vp-tab[aria-selected="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: #fff; }
.vp-tab[hidden] { display: none; }
.vp-body { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 16px; }
.vp-list { display: grid; gap: 5px; align-content: start; }
.vp-group { grid-column: 1 / -1; margin: 6px 0 1px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); }
.vp-group:first-child { margin-top: 0; }
.vp-pick {
  display: block; width: 100%; text-align: left; font: inherit; padding: 5px 9px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); color: var(--text); cursor: pointer;
}
.vp-pick strong { display: block; font-size: 14px; font-weight: 650; }
.vp-pick span { font-size: 12px; color: var(--muted); }
.vp-pick:hover { border-color: var(--accent); }
.vp-pick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-weak); }
.vp-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vp-main { min-width: 0; }
.vp-main audio { display: block; width: 100%; }
.vp-live { margin: 0 0 12px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 10px; }
.vp-live .btn { padding: 7px 14px; font-size: 14px; cursor: pointer; }
.vp-live-status { margin-left: 10px; }
.vp-models { display: grid; gap: 8px; margin: 14px 0 4px; }
.vp-row { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) 46px 74px; gap: 10px; align-items: center; }
.vp-name { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.vp-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; align-self: center; }
.vp-detail { flex-basis: 100%; padding-left: 16px; font-size: 12px; color: var(--muted); }
.vp-bar { position: relative; height: 8px; border-radius: 999px; background: var(--grid); }
.vp-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--series-1); transition: width 0.3s ease; }
.vp-bar-thr { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text-2); }
.vp-score { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
.vp-verdict { font-size: 13px; font-weight: 650; white-space: nowrap; }
.vp-verdict::before { display: inline-block; width: 1.2em; font-weight: 700; }
.vp-verdict.bad { color: var(--status-bad); }
.vp-verdict.bad::before { content: "⚠"; }
.vp-verdict.ok { color: var(--status-ok); }
.vp-verdict.ok::before { content: "✓"; }
.vp-verdict.wait { color: var(--muted); font-weight: 500; }
.vp-verdict.wait::before { content: "…"; }
.vp-plot { display: block; width: 100%; height: auto; margin: 12px 0 4px; font-family: var(--font); }
.vp-plot text { font-size: 11.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.vp-plot .axis { stroke: var(--border-strong); stroke-width: 1; }
.vp-plot .grid { stroke: var(--grid); stroke-width: 1; }
.vp-plot .thr { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 4 4; }
.vp-plot .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.vp-plot .dot { stroke: var(--surface); stroke-width: 2; }
.vp-transcript { list-style: none; margin: 10px 0 0; padding: 0; max-height: 260px; overflow-y: auto; border-top: 1px solid var(--border); }
.vp-transcript li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; margin: 0; padding: 6px 8px; border-bottom: 1px solid var(--border); font-size: 15px; }
.vp-transcript li.now { background: var(--accent-weak); }
.vp-transcript .vp-t { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.vp-transcript .vp-x { word-break: keep-all; }
.vp-chips { display: inline-flex; gap: 4px; align-items: flex-start; padding-top: 1px; }
.vp-chip { font-size: 11.5px; padding: 0 5px; border: 1.5px solid; border-radius: 6px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.vp-truth { margin: 12px 0 0; font-size: 15px; font-weight: 650; }
.vp-type { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 10px 0 0; padding: 8px 12px; border: 1px solid var(--status-bad); border-radius: 10px; font-size: 15px; }
.vp-type[hidden] { display: none; }
.vp-type-lbl { font-size: 12.5px; font-weight: 700; color: var(--status-bad); text-transform: uppercase; letter-spacing: 0.04em; }
.vp-type-p { font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.vp-type-note { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.vp-model { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }

/* Copyright demo (cr-demo.js) */
.cr-demo { margin: 16px 0 8px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.cr-demo[hidden] { display: none; }
.cr-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; grid-auto-flow: column; gap: 4px 8px; margin-bottom: 14px; }
.cr-group { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); grid-row: 1; }
.cr-group:first-child { grid-column: 1 / span 3; }
.cr-group:not(:first-child) { grid-column: 4 / span 2; }
.cr-pick { grid-row: 2; }
.cr-pages video { display: block; width: 100%; height: auto; border-radius: 4px; background: #000; }
.cr-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0 4px; }
.cr-frames figure { margin: 0; }
.cr-frames img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--border); }
.cr-frames figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cr-pick { font: inherit; text-align: left; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.cr-pick strong { display: block; font-size: 15px; font-weight: 650; }
.cr-pick span { display: block; font-size: 13px; color: var(--muted); }
.cr-pick .cr-src.scan { color: var(--text-2); font-weight: 600; }
.cr-pick:hover { border-color: var(--accent); }
.cr-pick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-weak); }
.cr-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cr-body { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cr-pages { max-height: 520px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--code-bg); padding: 8px; }
.cr-pages img { display: block; width: 100%; height: auto; margin: 0 0 8px; border: 1px solid var(--border); background: #fff; }
.cr-page-link { display: block; margin: 0 0 8px; border-radius: 4px; }
.cr-page-link:last-child { margin-bottom: 0; }
.cr-page-link img { margin: 0; transition: box-shadow 0.15s ease; }
.cr-page-link:hover img { box-shadow: 0 0 0 2px var(--accent); }
.cr-pages-hint { margin: 6px 0 0; text-align: center; }
.cr-docinfo { margin: 8px 0 0; }
.cr-main { min-width: 0; }
.cr-blurb { margin: 0 0 10px; }
.cr-run { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.cr-run .btn { padding: 7px 14px; font-size: 14px; cursor: pointer; border: 0; font: inherit; font-size: 14px; }
.cr-run .btn.ghost { border: 1px solid var(--border-strong); }
.cr-run .btn[disabled] { opacity: 0.55; cursor: default; transform: none; }
.cr-run .btn[hidden] { display: none; }
.cr-gantt { position: relative; display: grid; gap: 6px; margin: 4px 0 14px; }
.cr-lane, .cr-axis { display: grid; grid-template-columns: 150px minmax(0, 1fr) 54px; gap: 10px; align-items: center; }
.cr-lname { font-size: 13.5px; color: var(--text-2); }
.cr-sec { font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.cr-track { position: relative; height: 14px; background: var(--grid); border-radius: 4px; }
.cr-seg { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: color-mix(in srgb, var(--seg) 22%, transparent); overflow: hidden; }
.cr-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--seg); }
.cr-seg.read { --seg: var(--series-base); }
.cr-seg.llm { --seg: var(--cat-text); }
.cr-seg.ner { --seg: var(--cat-mm); }
.cr-seg.arb { --seg: var(--cat-audio); }
.cr-seg.rules { --seg: var(--cat-data); }
.cr-ticks { position: relative; height: 18px; border-top: 1px solid var(--border-strong); }
.cr-ticks span { position: absolute; top: 3px; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-ticks span { white-space: nowrap; }
.cr-ticks span:first-child { transform: none; }
.cr-ticks span.last { transform: translateX(-100%); }
.cr-cursor { position: absolute; bottom: 18px; width: 2px; height: 0; margin-left: -1px; background: var(--text-2); pointer-events: none; }
.cr-cursor[hidden] { display: none; }
.cr-result[hidden], .cr-result-wide[hidden] { display: none; }
.cr-result-wide { margin-top: 6px; }
.cr-result h4, .cr-result-wide h4 { margin: 18px 0 4px; font-size: 15.5px; }
.cr-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 0 0; border-top: 1px solid var(--border); font-size: 14px; }
.cr-sum-lead { color: var(--text-2); margin-right: 2px; }
.cr-badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.cr-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--b); }
.cr-badge.agreed { --b: var(--status-ok); }
.cr-badge.conflict { --b: var(--cat-audio); }
.cr-badge.llm { --b: var(--cat-text); }
.cr-badge.ner { --b: var(--cat-mm); }
.cr-badge.removed, .cr-badge.missing { --b: var(--series-base); }
.cr-result .table-wrap, .cr-result-wide .table-wrap { margin: 6px 0 8px; }
.cr-result table, .cr-result-wide table { font-size: 14px; }
.cr-result td, .cr-result th, .cr-result-wide td, .cr-result-wide th { padding: 7px 9px; }
.cr-record th { width: 26%; background: transparent; color: var(--text-2); }
.cr-ko, .cr-ko-why { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.cr-val { word-break: keep-all; }
.cr-check { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.cr-check.noted { white-space: normal; min-width: 180px; }
.cr-check b { font-weight: 700; }
.cr-check.ok b, span.cr-check.ok { color: var(--status-ok); }
.cr-check.part b { color: var(--cat-audio); }
.cr-check.miss b, span.cr-check.miss { color: var(--status-bad); }
.cr-rights { display: flex; flex-wrap: wrap; gap: 5px 6px; align-items: center; }
.cr-right { padding: 1px 7px; border-radius: 6px; font-size: 13px; border: 1px solid var(--border); color: var(--muted); }
.cr-right.yes { border-color: var(--status-ok); color: var(--text); font-weight: 600; }
.cr-rights span.cr-check { margin-left: 6px; font-weight: 600; }
.cr-kw { margin: 2px 0 0; }
.cr-arb { min-width: 760px; }
.cr-arb td { word-break: keep-all; }
.cr-arb .cr-field { font-weight: 600; white-space: nowrap; }
.cr-arb .cr-final { font-weight: 600; }
.cr-arb .cr-why { min-width: 260px; }
.cr-arb td:nth-child(2), .cr-arb td:nth-child(3), .cr-arb td:nth-child(4) { max-width: 230px; }
.cr-arb tr.removed td:nth-child(3) { text-decoration: line-through; color: var(--muted); }
.cr-none { color: var(--muted); }
.cr-ocr pre { max-height: 320px; overflow: auto; font-size: 13px; white-space: pre-wrap; }
.cr-ocr mark { background: var(--mark-bg); color: inherit; padding: 0 2px; border-radius: 3px; }

.next-prev { justify-content: space-between; gap: 16px; margin-top: 48px; font-size: 15px; flex-wrap: wrap; }

/* Buttons */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--btn-bg); color: #fff; font-weight: 600; font-size: 15px;
  text-decoration: none; box-shadow: var(--shadow);
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--btn-bg-hover); color: #fff; transform: translateY(-1px); }
.btn .arr { transition: transform 0.15s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--accent-ink); border: 1px solid var(--border-strong); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

/* Home: hero with photo */

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 40px; align-items: center; }
.hero-photo { width: 230px; height: auto; aspect-ratio: 5 / 6; object-fit: cover; border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* Home: projects as figure + text rows */

.features { display: grid; gap: 26px; margin-top: 22px; }
.feature {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 34px; align-items: center;
  padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
.feature:nth-child(even) .feature-fig { order: 2; }
.feature-fig { padding: 14px; background: var(--bg); }
.feature-fig svg, .feature-fig img { display: block; width: 100%; min-width: 0; height: auto; }
.feature .where { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.feature h3 { margin: 6px 0 10px; font-size: 1.35rem; }
.feature p { color: var(--text-2); }
.feature .btn { margin-top: 8px; }

/* Home: publications and patents */

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 18px 0 26px; }
.stat { padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.stat .num { display: block; font-size: 2.3rem; font-weight: 700; line-height: 1.1; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.stat .lbl { display: block; margin-top: 6px; font-weight: 650; font-size: 15px; }
.stat .sub { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.pub-list { list-style: none; padding: 0; margin: 0 0 18px; }
.pub-list li { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15.5px; }
.pub-list li:last-child { border-bottom: 0; }
.badge { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--code-bg); color: var(--text-2); vertical-align: 1px; }
.badge.review { background: var(--todo-bg); color: var(--todo-ink); }
.badge.ok { background: var(--accent-weak); color: var(--accent-ink); }

/* Wide blocks inside narrow case-study pages */

.wide { position: relative; left: 50%; width: min(1160px, calc(100vw - 32px)); transform: translateX(-50%); }
.results-stack figure { margin: 0 0 8px; }
.results-stack .fig-big svg { width: 100%; max-width: 1060px; height: auto; display: block; margin: 0 auto; }
.results-stack .table-wrap table { font-size: 15.5px; }
td.best { color: var(--status-ok); font-weight: 700; }
.shots .carousel-track { gap: 14px; padding-bottom: 6px; }
.shots .slide.shot { flex: 0 0 190px; margin: 0; cursor: zoom-in; }
.shots .slide.shot img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); }
.shots .slide.shot figcaption { margin-top: 6px; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.video-fig { margin: 18px 0; }
.video-fig video { display: block; width: 100%; max-width: 1100px; height: auto; border-radius: 10px; border: 1px solid var(--border); background: #000; }
.video-fig figcaption { max-width: 1100px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.kpi .num { font-size: 30px; font-weight: 700; line-height: 1.15; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.kpi .lbl { font-size: 15px; font-weight: 600; color: var(--text); }
.kpi .sub { margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.45; }
/* Demos may run wider than the text column, up to 1400 px. */
.demo-bleed { position: relative; left: 50%; width: min(1400px, calc(100vw - 32px)); transform: translateX(-50%); }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.split > figure, .split > div { margin: 0; }
.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split table { font-size: 14px; }
.split th.num { white-space: normal; min-width: 72px; }
.split td, .split th { padding: 8px 9px; }

/* Carousel (scroll-snap; controls in assets/site.js) */

.carousel { margin: 22px 0; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0; padding: 0 2px; }
.slide .fig { display: flex; align-items: center; justify-content: center; min-height: 320px; background: #fff; }
.slide .fig img { display: block; max-height: 520px; width: auto; max-width: 100%; height: auto; }
.slide .fig.svg-slide { background: var(--surface); }
.slide .fig.svg-slide svg { width: 100%; max-width: 880px; min-width: 0; height: auto; margin: 0 auto; }
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--border-strong); cursor: pointer; }
.carousel-dot[aria-current="true"] { background: var(--accent); }
.carousel-count { min-width: 44px; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Paper figures */

.paper-fig { background: #fff; }
.paper-fig img { display: block; width: 100%; height: auto; }
.fig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 22px 0; }
.fig-grid figure { margin: 0; }
.fig-grid .paper-fig { display: flex; align-items: center; justify-content: center; min-height: 280px; }
.fig-grid .paper-fig img { max-height: 420px; width: auto; max-width: 100%; }

/* Home: projects carousel with a peek of the next card */

.carousel-track { position: relative; }
.projects-carousel { margin-top: 18px; }
.projects-carousel .carousel-track { gap: 18px; padding: 4px 2px 16px; }
.projects-carousel .slide { flex: 0 0 91%; }
.projects-carousel .slide.feature { padding: 26px; }
.projects-carousel .feature { height: 100%; }
.projects-carousel .carousel-nav { margin-top: 4px; }
.carousel-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 12px; }
.carousel-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.carousel-tabs::-webkit-scrollbar { display: none; }
.carousel-tab { font: inherit; font-size: 14.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.carousel-tab .n { margin-right: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.carousel-tab:hover { border-color: var(--accent); }
.carousel-tab[aria-selected="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: #fff; }
.carousel-tab[aria-selected="true"] .n { color: rgba(255, 255, 255, 0.75); }
.carousel-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.carousel-ctrl { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.projects-carousel .carousel-track { cursor: grab; }
.carousel-track.dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.projects-carousel .feature:nth-child(even) .feature-fig { order: 0; }
.feature h3 a { color: inherit; text-decoration: none; }
.feature h3 a:hover { color: var(--accent-ink); text-decoration: underline; }

/* Languages with flags */

.langs { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 6px 0 0; padding: 0; list-style: none; }
.langs li { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 7px 14px 7px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 15px; }
.langs img { width: 24px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }
.langs .lvl { color: var(--muted); }

/* Mosaic of figures with click-to-enlarge */

.mosaic {
  display: grid; gap: 14px; margin: 22px 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, 210px);
  grid-template-areas: "ov ov at" "ov ov bt" "ac ac mm";
}
.tile { position: relative; margin: 0; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.tile .tile-media { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px; }
.tile .tile-media img, .tile .tile-media svg { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.tile.svg-tile { background: var(--surface); }
.tile.svg-tile .tile-media svg { width: 100%; min-width: 0; }
.tile figcaption { margin: 0; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface); font-size: 13.5px; color: var(--text-2); }
.tile .more { display: none; }
.zoomable { cursor: zoom-in; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.zoomable:hover, .zoomable:focus-visible { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 14px 32px rgba(0, 0, 0, 0.14); }
.zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.zoom-hint { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: rgba(0, 0, 0, 0.55); color: #fff; opacity: 0; transition: opacity 0.15s ease; }
.zoomable:hover .zoom-hint, .zoomable:focus-visible .zoom-hint { opacity: 1; }

dialog.lightbox { width: min(1200px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
dialog.lightbox::backdrop { background: rgba(10, 10, 10, 0.72); }
.lightbox-body { display: flex; flex-direction: column; max-height: 92vh; }
.lightbox-media { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 18px; background: #fff; }
.lightbox-media img { max-width: 100%; max-height: 74vh; width: auto; height: auto; }
.lightbox-media svg { width: 100%; max-width: 1100px; height: auto; min-width: 0; }
.lightbox-media.svg-media { background: var(--surface); }
.lightbox-cap { margin: 0; padding: 12px 18px 16px; font-size: 15px; color: var(--text-2); border-top: 1px solid var(--border); }
.lightbox-close { position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--surface); }
.lightbox-prev, .lightbox-next { display: none; position: absolute; top: 45%; z-index: 2; width: 44px; height: 44px; background: var(--surface); box-shadow: var(--shadow); }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
dialog.lightbox.has-nav .lightbox-prev, dialog.lightbox.has-nav .lightbox-next { display: inline-flex; }
dialog.lightbox.has-nav .lightbox-media { padding-left: 64px; padding-right: 64px; }
.lightbox-count { display: inline-block; margin-right: 10px; padding: 1px 8px; border-radius: 999px; background: var(--code-bg); font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* History line (voice-phishing page) */

.history { margin: 26px 0 8px; }
.history-track { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.history-track::before {
  content: ""; position: absolute; left: 6px; right: 6px; top: 17px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--cat-text), var(--cat-audio), var(--cat-mm));
}
.hist-year { position: relative; padding-top: 48px; }
.hist-year .yr {
  position: absolute; top: 0; left: 0; display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 2px solid var(--accent);
  font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
}
.hist-item {
  margin: 0 0 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.45;
}
.hist-item strong { display: block; font-size: 14.5px; }
.hist-item .venue { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.cat { display: inline-block; margin-bottom: 5px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; }
.cat.text { background: var(--cat-text); }
.cat.audio { background: var(--cat-audio); }
.cat.mm { background: var(--cat-mm); }
.cat.data { background: var(--cat-data); }
.history-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 6px; font-size: 13px; color: var(--muted); }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .history-track { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  .history-track::before { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 1.8rem; }
  .cards { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .meta { grid-template-columns: 1fr; gap: 0 0; }
  .meta dd { margin-bottom: 8px; }
  .site-nav { gap: 14px; }
  .vp-demo { padding: 12px; }
  .vp-body { grid-template-columns: 1fr; }
  .vp-row { grid-template-columns: 1fr 46px 74px; }
  .vp-row .vp-name { grid-column: 1 / -1; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-photo { width: 160px; order: -1; }
  .feature { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .feature:nth-child(even) .feature-fig { order: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .fig-grid { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: none; }
  .mosaic .tile { grid-area: auto !important; min-height: 220px; }
  .projects-carousel .slide { flex-basis: 92%; }
  .projects-carousel .slide.feature { padding: 18px; }
  .history-track { grid-template-columns: 1fr; gap: 0; padding-left: 26px; }
  .history-track::before { display: block; left: 8px; right: auto; top: 6px; bottom: 6px; width: 4px; height: auto; background: linear-gradient(180deg, var(--cat-text), var(--cat-audio), var(--cat-mm)); }
  .hist-year { padding-top: 46px; }
  .hist-year .yr { left: -26px; }
  .slide .fig { min-height: 200px; }
  .site-header .wrap { gap: 8px 14px; padding-top: 6px; padding-bottom: 6px; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 14px; }
  .vp-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .float-home { top: auto; bottom: 18px; right: 50%; transform: translateX(50%); padding: 9px 14px; }
  .float-nav { min-height: 42px; min-width: 42px; padding: 0 9px; }
  dialog.lightbox.has-nav .lightbox-media { padding-left: 46px; padding-right: 46px; }
  .cr-demo { padding: 12px; }
  .cr-picks { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-flow: row; gap: 6px; }
  .cr-group, .cr-group:first-child, .cr-group:not(:first-child) { grid-column: 1 / -1; grid-row: auto; }
  .cr-pick { grid-row: auto; }
  .cr-pick { padding: 7px 8px; }
  .cr-pick strong { font-size: 14px; }
  .cr-pick span { font-size: 12px; line-height: 1.35; }
  .cr-record, .cr-record tbody, .cr-record tr, .cr-record th, .cr-record td { display: block; width: auto; }
  .cr-record tr { padding: 7px 0; border-bottom: 1px solid var(--border); }
  .cr-record th, .cr-record td { padding: 1px 4px; border: 0; }
  .cr-record th .cr-ko { display: inline; margin-left: 6px; }
  .cr-record td.cr-rights { display: flex; }
  .cr-right { white-space: nowrap; }
  .cr-check.noted { min-width: 0; }
  .cr-arb { min-width: 0; }
  .cr-arb thead { display: none; }
  .cr-arb, .cr-arb tbody, .cr-arb tr, .cr-arb td { display: block; width: auto; max-width: none !important; }
  .cr-arb tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .cr-arb td { padding: 1px 4px; border: 0; }
  .cr-arb td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12.5px; font-weight: 400; }
  .cr-arb td:nth-child(5) { margin: 3px 0; }
  .cr-arb .cr-why { min-width: 0; }
  .cr-arb td.cr-why::before { display: none; }
  .cr-body { grid-template-columns: 1fr; }
  .cr-pages { max-height: 340px; }
  .cr-lane, .cr-axis { grid-template-columns: 104px minmax(0, 1fr) 46px; gap: 6px; }
  .cr-lname { font-size: 12.5px; }
  .fig-scroll + figcaption::before { content: "Swipe sideways to see the whole figure. "; color: var(--muted); }
}
