/* Hallmark · shape: engagement record (home); long document (case studies) · genre: modern-minimal · theme: custom · redesign: full · job: hire · idea: "a security report about my own work: each project is a scoped engagement with what was built, what was found and what is still open" · vibe: "precise, candid, engineered, quiet, report-like, bilingual-ready"
 * paper: oklch(98.4% 0.003 250) · accent: oklch(53% 0.19 32) · display: Pretendard Variable · body: Pretendard Variable · hero: Settled (/), name and one sentence left, the deployed architecture of koreanpages.com.au drawn right with its open findings marked; Banner (/cybershield.html, /pentest-report.html, /ai-attack-classifier.html), a report cover with its record · nav: wordmark left, section links, resume link and a mode switch right, hairline under · footer: one line, name and place left, source and type credit right · imagery: the product (live screenshots, real PoC captures, two architecture diagrams of the real systems) · signature: the koreanpages.com.au architecture with its four open findings marked in the accent
 * axes: light/grotesk-sans/chromatic-vermillion · posture: restrained · modes: light+dark · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4 · weakest: P, a portfolio is a quiet argument; made it one by publishing the open findings beside the controls instead of hiding them */
/* Hallmark · dismissed 41 · the band reads --color-paper-2 and inherits --color-ink, both of which swap together in the dark block */
/* Hallmark · dismissed 25 · .section-head p is a one-sentence lede under the section head, legal from 28ch */
/* Hallmark · waive 78 · the case studies are a Long Document shape with a sticky contents list · their h2 are report section heads at 28px so a 40px head does not shout over tables and code; the homepage h2 run at 40px */
/* Hallmark · dismissed 77 · each case study is one long-document article holding five to eight sections, not two thin page sections */
/* Hallmark · dropped #focus · the nav link went when Focus and Toolbox merged into one Capabilities section, which keeps both ids (focus, skills) so old deep links still land */
/* Hallmark · dismissed kept headings · the numbered section heads were eyebrowed (54) and Focus plus Toolbox merged into Capabilities; every fact under them is kept, listed in the handoff */
/* Hallmark · dismissed kept images · profile.jpg is still in the repo and still the same photograph, now served as profile-480 webp and jpg */
/* Hallmark · answered F20 · the three project links wrap two and one only in the narrow work column; each is a different destination */
/* Hallmark · dismissed render fallback · only the file:// renders miss the preloaded subset; every http://localhost render loads Pretendard */
/* Hallmark · answered F25 · the dataset table scrolls inside a labelled, focusable region at 375; label and count stay in the first view, share is one swipe away */
/* Hallmark · hero-review: fix · 5 findings · 4 resolved 1 partial (phone: the diagram follows the text) */
/* Hallmark · finish-review: subagent · 7 findings · 5 resolved 1 unresolved (1920 gap above Selected work, minor) 1 to owner (generic section heads) · gap: none */
@import url("./tokens.css");
@import url("./base.css");

/* ---------- Base ---------- */
body { font-size: var(--text-body); line-height: 1.6; font-weight: var(--weight-body); font-feature-settings: "ss06" 0; word-break: keep-all; overflow-wrap: break-word; }
strong, b { font-weight: var(--weight-strong); color: var(--color-ink); }
code, kbd, samp, pre { font-family: var(--font-outlier); font-size: 0.9em; }
:not(pre) > code { padding: 0 var(--space-2xs); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-chip); background: var(--color-paper-2); color: var(--color-ink); overflow-wrap: anywhere; }
ul, ol { margin: 0; padding: 0; }
dl, dd, figure { margin: 0; }
a { color: var(--color-ink); text-decoration-color: var(--color-rule-2); transition: color var(--dur-micro) var(--ease-out), text-decoration-color var(--dur-micro) var(--ease-out); }
a:hover { color: var(--color-accent); text-decoration-color: currentColor; }
a:active { color: var(--color-ink-2); }
a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-chip); }
hr { border: 0; border-top: var(--rule-hair) solid var(--color-rule); margin: 0; }
.muted { color: var(--color-muted); }
.mono { font-family: var(--font-outlier); font-size: 0.92em; font-variant-numeric: tabular-nums slashed-zero; }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-sm); background: var(--color-ink); color: var(--color-paper); border-radius: var(--radius-pill); }
.skip:focus, .skip:focus-visible { top: var(--space-sm); color: var(--color-paper); }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-pill); background: var(--color-paper); color: var(--color-ink); font: var(--weight-strong) var(--text-md)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-paper-2); border-color: var(--color-ink-2); color: var(--color-ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }

.text-link { font-weight: var(--weight-strong); text-decoration-line: underline; text-underline-offset: 0.22em; }
.links { display: flex; flex-wrap: wrap; column-gap: var(--space-lg); row-gap: var(--space-xs); list-style: none; }

/* ---------- Navigation ---------- */
.site-nav { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule); }
.site-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: var(--nav-height); }
.wordmark { font-weight: var(--weight-display); font-size: var(--text-lg); letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.nav-links { display: flex; gap: var(--space-2xs); list-style: none; }
.nav-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-sm); border-radius: var(--radius-pill); color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav-links a:hover { color: var(--color-ink); background: var(--color-paper-2); }
.nav-links a[aria-current="page"] { color: var(--color-ink); }
.nav-tools { display: flex; align-items: center; gap: var(--space-xs); }
.nav-tools .nav-resume { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-sm); font-size: var(--text-sm); font-weight: var(--weight-strong); white-space: nowrap; text-underline-offset: 0.22em; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 40px; min-width: 40px; padding: 0 var(--space-sm); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-paper); color: var(--color-ink-2); font: 500 var(--text-sm)/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.icon-btn:hover { background: var(--color-paper-2); color: var(--color-ink); }
.icon-btn:active { background: var(--color-paper-3); }
.icon-btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.icon-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.icon-btn svg { width: 16px; height: 16px; }
.menu-btn { display: none; }

/* ---------- Home: hero ---------- */
.hero { padding-block: var(--space-2xl) var(--space-3xl); }
.hero__text { grid-column: 1 / span 6; align-self: start; padding-top: var(--space-xl); }
.hero__figure { grid-column: 8 / span 5; align-self: start; }
.hero h1 { font-size: var(--text-h1); font-weight: var(--weight-display); letter-spacing: var(--tracking-display); line-height: 1.04; }
.hero h1 .h1-sub { display: block; margin-top: var(--space-xs); font-size: var(--text-h1-sub); letter-spacing: -0.018em; line-height: 1.2; }
.hero__lede { margin-top: var(--space-lg); max-width: 34ch; font-size: var(--text-lead); color: var(--color-ink-2); line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xl); }
.hero__links { margin-top: var(--space-lg); font-size: var(--text-md); }

.standing { margin-top: var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule); max-width: 520px; }
.standing > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: var(--space-md); padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); }
.standing dt { font-size: var(--text-sm); color: var(--color-muted); padding-top: var(--space-3xs); }
.standing dd { font-size: var(--text-md); font-weight: 500; line-height: 1.45; }

.fig-record { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.3fr); column-gap: var(--space-md); margin-bottom: var(--space-lg); border-top: var(--rule-hair) solid var(--color-ink); }
.fig-record > div { padding-top: var(--space-xs); }
.fig-record dt { font-size: var(--text-sm); color: var(--color-muted); }
.fig-record dd { font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--color-ink); line-height: 1.4; }

/* ---------- Diagrams (inline SVG of real systems) ---------- */
.diagram { width: 100%; height: auto; color: var(--color-ink); }
.diagram .dg-box { fill: var(--color-paper); stroke: var(--color-rule-2); stroke-width: 1; }
.diagram .dg-box--key { fill: var(--color-paper-2); stroke: var(--color-ink-2); }
.diagram .dg-group { fill: var(--color-paper-2); stroke: var(--color-rule); stroke-width: 1; }
.diagram .dg-open { fill: var(--color-accent-soft); stroke: var(--color-accent); stroke-width: 1; stroke-dasharray: 4 3; }
.diagram .dg-line { fill: none; stroke: var(--color-ink-2); stroke-width: 1.25; }
.diagram .dg-line--quiet { stroke: var(--color-rule-2); stroke-dasharray: 3 3; }
.diagram .dg-arrow { fill: var(--color-ink-2); }
.diagram .dg-title { fill: var(--color-ink); font-family: var(--font-body); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.diagram .dg-sub { fill: var(--color-muted); font-family: var(--font-body); font-size: 14px; }
.diagram .dg-label { fill: var(--color-ink-2); font-family: var(--font-body); font-size: 14px; font-weight: 500; }
.diagram .dg-open-text { fill: var(--color-accent); font-family: var(--font-body); font-size: 14px; font-weight: 600; }
.figure figcaption, .caption { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); line-height: 1.5; max-width: 60ch; }
.figure--scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.figure--scroll:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.figure--scroll .diagram { min-width: 640px; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-gap-s); }
.section--ruled { border-top: var(--rule-hair) solid var(--color-rule); }
.section--band { background: var(--color-paper-2); border-block: var(--rule-hair) solid var(--color-rule); }
.section--tight-top { padding-top: var(--space-3xl); }
.section-head { grid-column: 1 / span 3; }
.section-head h2 { font-size: var(--text-section); font-weight: var(--weight-display); letter-spacing: var(--tracking-section); line-height: 1.08; }
.section-head p { margin-top: var(--space-md); font-size: var(--text-md); color: var(--color-muted); max-width: 30ch; }
.section-body { grid-column: 4 / -1; min-width: 0; }
.section-head--sticky { align-self: start; position: sticky; top: calc(var(--nav-height) + var(--space-xl)); }

/* ---------- Work ---------- */
.work + .work { margin-top: var(--space-3xl); padding-top: var(--space-3xl); border-top: var(--rule-hair) solid var(--color-rule); }
.work__grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); }
.work__text { grid-column: 1 / span 5; }
.work__aside { grid-column: 6 / span 4; }
.work__wide { grid-column: 1 / -1; }
.work__when { font-size: var(--text-sm); color: var(--color-muted); }
.work h3 { margin-top: var(--space-xs); font-size: var(--text-title); font-weight: var(--weight-display); letter-spacing: -0.018em; line-height: 1.2; }
.work__summary { margin-top: var(--space-md); color: var(--color-ink-2); max-width: 62ch; }
.work__points { margin-top: var(--space-lg); display: grid; gap: var(--space-sm); list-style: none; }
.work__points li { position: relative; padding-left: var(--space-lg); color: var(--color-ink-2); font-size: var(--text-md); max-width: 64ch; }
.work__points li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule-2); }
.work .links { margin-top: var(--space-lg); }
.work__stack { margin-top: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: var(--rule-hair) solid var(--color-rule); }
.facts > div { padding-block: var(--space-md); border-bottom: var(--rule-hair) solid var(--color-rule); }
.facts > div:nth-child(odd) { padding-right: var(--space-md); }
.facts > div:nth-child(even) { padding-left: var(--space-md); border-left: var(--rule-hair) solid var(--color-rule); }
.facts dt { font-size: var(--text-sm); color: var(--color-muted); }
.facts dd { margin-top: var(--space-2xs); font-size: var(--text-figure); font-weight: var(--weight-display); letter-spacing: -0.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts--four > div { padding: var(--space-md); border-left: var(--rule-hair) solid var(--color-rule); }
.facts--four > div:first-child { padding-left: 0; border-left: 0; }
.facts--four > div:nth-child(odd), .facts--four > div:nth-child(even) { padding-right: var(--space-md); }

.status { display: inline-flex; align-items: center; min-height: 28px; padding: 0 var(--space-xs); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-chip); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); background: var(--color-paper); }
.status--open { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-soft); }

.shot { border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); overflow: hidden; background: var(--color-paper-2); }
.shot img { width: 100%; height: auto; }

.ledger { list-style: none; border-top: var(--rule-hair) solid var(--color-ink); }
.ledger > li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr) minmax(0, 2fr); column-gap: var(--gap-columns); row-gap: var(--space-sm); padding-block: var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); }
.ledger__when { font-size: var(--text-sm); color: var(--color-muted); padding-top: var(--space-2xs); }
.ledger h3 { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-strong); letter-spacing: -0.012em; line-height: 1.3; }
.ledger p { margin-top: var(--space-xs); color: var(--color-ink-2); font-size: var(--text-md); max-width: 62ch; }
.ledger .links { margin-top: var(--space-sm); font-size: var(--text-md); }
.ledger__figure { text-align: right; }
.ledger__figure strong { display: block; font-size: var(--text-figure); font-weight: var(--weight-display); letter-spacing: -0.025em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ledger__figure span { display: block; margin-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }

/* ---------- Experience ---------- */
.career { list-style: none; }
.career > li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 7fr); column-gap: var(--gap-columns); padding-block: var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule); }
.career > li:first-child { border-top-color: var(--color-ink); }
.career__when { font-size: var(--text-sm); color: var(--color-muted); padding-top: var(--space-2xs); }
.career__when b { display: block; color: var(--color-ink); font-weight: 500; }
.career h3 { font-size: var(--text-title); font-weight: var(--weight-display); letter-spacing: -0.018em; line-height: 1.25; }
.career__org { margin-top: var(--space-2xs); color: var(--color-ink-2); font-weight: 500; }
.career ul { margin-top: var(--space-md); display: grid; gap: var(--space-sm); list-style: none; }
.career ul li { position: relative; padding-left: var(--space-lg); color: var(--color-ink-2); max-width: 70ch; }
.career ul li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule-2); }
.career__also { margin-top: var(--space-xl); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-lg); }
.career__also > div { padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); }
.career__also h4 { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-sm); margin: 0; font-size: var(--text-md); font-weight: var(--weight-strong); line-height: 1.4; }
.career__also h4 > span:first-child { min-width: 0; padding-top: var(--space-3xs); }
.career__also h4 .status { flex: none; white-space: nowrap; }
.career__also p { margin-top: var(--space-xs); color: var(--color-ink-2); font-size: var(--text-md); }
.career__also .work__stack { margin-top: var(--space-sm); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
.table-wrap:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--text-md); line-height: 1.5; }
table.data caption { text-align: left; padding-bottom: var(--space-sm); font-size: var(--text-md); font-weight: var(--weight-strong); color: var(--color-ink); }
table.data th { text-align: left; vertical-align: bottom; padding: var(--space-sm) var(--space-md) var(--space-sm) 0; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); border-bottom: var(--rule-hair) solid var(--color-ink); white-space: nowrap; }
table.data td { vertical-align: top; padding: var(--space-md) var(--space-md) var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); color: var(--color-ink-2); }
table.data td:last-child, table.data th:last-child { padding-right: 0; }
table.data th[scope="row"] { vertical-align: top; padding-top: var(--space-md); font-size: var(--text-md); font-weight: var(--weight-strong); color: var(--color-ink); border-bottom: var(--rule-hair) solid var(--color-rule); white-space: normal; }
table.data code { white-space: nowrap; }
table.data .r { text-align: right; font-variant-numeric: tabular-nums; }
table.data tfoot td, table.data tfoot th { color: var(--color-ink); font-weight: var(--weight-strong); border-bottom: 0; }
table.data--compact td, table.data--compact th[scope="row"] { padding-block: var(--space-sm); }
.cap-table td:nth-child(2) { width: 42%; }
.cap-table td:last-child { color: var(--color-muted); font-size: var(--text-md); }

.cred-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-2xl); }
.cred-grid__main { grid-column: 1 / -1; }
.cred-grid__half { grid-column: span 4; }
.cred-grid__half + .cred-grid__half { grid-column: 6 / span 4; }
.cred-grid h3 { font-size: var(--text-lg); font-weight: var(--weight-strong); letter-spacing: -0.012em; }
.plain-list { list-style: none; margin-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-ink); }
.plain-list li { padding-block: var(--space-md); border-bottom: var(--rule-hair) solid var(--color-rule); color: var(--color-ink-2); }
.plain-list li strong { display: block; }
.plain-list .muted { display: block; margin-top: var(--space-2xs); font-size: var(--text-md); }

/* ---------- Contact ---------- */
.contact__body { grid-column: 4 / span 6; }
.contact__photo { grid-column: 11 / span 2; align-self: end; }
.contact__photo img { width: 100%; height: auto; border-radius: var(--radius-card); border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper-2); }
.contact__lede { color: var(--color-ink-2); font-size: var(--text-lead); max-width: 46ch; line-height: 1.5; }
.contact__email { display: inline-block; margin-top: var(--space-xl); font-size: min(var(--text-figure), 6.4vw); font-weight: var(--weight-display); letter-spacing: -0.025em; line-height: 1.15; text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 0.16em; text-decoration-color: var(--color-accent); overflow-wrap: anywhere; }
.contact .links { margin-top: var(--space-xl); }

/* ---------- Footer ---------- */
.site-footer { border-top: var(--rule-hair) solid var(--color-rule); padding-block: var(--space-xl); font-size: var(--text-sm); color: var(--color-muted); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-md); }
.site-footer a { color: var(--color-ink-2); }
.site-footer a:hover { color: var(--color-accent); }

/* ---------- Case studies ---------- */
.doc-header { padding-block: var(--space-2xl) var(--space-2xl); border-bottom: var(--rule-hair) solid var(--color-rule); }
.crumbs { grid-column: 1 / -1; font-size: var(--text-sm); color: var(--color-muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-xs); list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: var(--space-xs); color: var(--color-rule-2); }
.doc-header__text { grid-column: 1 / span 7; margin-top: var(--space-xl); }
.doc-header__aside { grid-column: 8 / span 5; margin-top: var(--space-xl); align-self: end; min-width: 0; }
.doc-header__aside .facts dd .sev { min-height: 0; padding: 0 var(--space-xs); font-size: inherit; line-height: 1.1; }
.doc-header h1 { font-size: var(--text-h1); font-weight: var(--weight-display); letter-spacing: var(--tracking-display); line-height: 1.05; }
.doc-header__lede { margin-top: var(--space-lg); max-width: 58ch; font-size: var(--text-lead); color: var(--color-ink-2); line-height: 1.5; }
.doc-header .links { margin-top: var(--space-xl); }
.doc-meta { grid-column: 1 / -1; margin-top: var(--space-2xl); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap-columns); border-top: var(--rule-hair) solid var(--color-ink); }
.doc-meta > div { padding-top: var(--space-md); }
.doc-meta dt { font-size: var(--text-sm); color: var(--color-muted); }
.doc-meta dd { margin-top: var(--space-2xs); font-size: var(--text-md); font-weight: 500; color: var(--color-ink); line-height: 1.45; }

.doc { padding-block: var(--space-2xl) var(--section-gap-s); }
.toc { grid-column: 1 / span 3; align-self: start; position: sticky; top: calc(var(--nav-height) + var(--space-xl)); font-size: var(--text-sm); }
.toc h2 { font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--color-ink); letter-spacing: 0; }
.toc ol { margin-top: var(--space-sm); list-style: none; border-left: var(--rule-hair) solid var(--color-rule); }
.toc a { display: block; padding: var(--space-2xs) var(--space-md); margin-left: calc(-1 * var(--rule-hair)); border-left: var(--rule-hair) solid transparent; color: var(--color-muted); text-decoration: none; }
.toc a:hover { color: var(--color-ink); border-left-color: var(--color-ink-2); }
.doc-body { grid-column: 4 / span 8; min-width: 0; }
.doc-body > section + section { margin-top: var(--space-3xl); }
.doc-body h2 { font-size: var(--text-2xl); font-weight: var(--weight-display); letter-spacing: -0.02em; line-height: 1.2; scroll-margin-top: calc(var(--nav-height) + var(--space-lg)); }
.doc-body h3 { margin-top: var(--space-xl); font-size: var(--text-lg); font-weight: var(--weight-strong); letter-spacing: -0.012em; line-height: 1.3; }
.doc-body h2 + *, .doc-body h3 + * { margin-top: var(--space-md); }
.doc-body p { color: var(--color-ink-2); max-width: var(--measure); }
.doc-body p + p { margin-top: var(--space-md); }
.doc-body * + .table-wrap, .doc-body * + .figure, .doc-body * + .facts, .doc-body * + pre, .doc-body * + .steps, .doc-body * + .bullets, .doc-body * + .chain { margin-top: var(--space-lg); }
.doc-body .figure img { width: 100%; height: auto; border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper-2); }
.doc-body .figure--narrow { max-width: 440px; }
.bullets { display: grid; gap: var(--space-sm); list-style: none; }
.bullets li { position: relative; padding-left: var(--space-lg); color: var(--color-ink-2); max-width: var(--measure); }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule-2); }
.steps { display: grid; gap: var(--space-sm); list-style: none; counter-reset: step; }
.steps li { position: relative; padding-left: var(--space-xl); color: var(--color-ink-2); max-width: var(--measure); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; font-variant-numeric: tabular-nums; color: var(--color-muted); font-weight: 500; }

pre.code { margin: 0; padding: var(--space-md) var(--space-lg); background: var(--color-code-bg); color: var(--color-code-ink); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); overflow-x: auto; font-size: var(--text-sm); line-height: 1.7; tab-size: 4; }
pre.code:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
pre.code .c { color: var(--color-code-comment); }
pre.code .k { color: var(--color-code-keyword); }
pre.code .s { color: var(--color-code-string); }
pre.code .n { color: var(--color-code-number); }
pre.code .d { color: var(--color-code-danger); }

.sev { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--space-xs); border-radius: var(--radius-chip); font-size: var(--text-sm); font-weight: var(--weight-strong); white-space: nowrap; }
.sev--critical { color: var(--color-sev-critical); background: var(--color-sev-critical-soft); }
.sev--high { color: var(--color-sev-high); background: var(--color-sev-high-soft); }
.sev--medium { color: var(--color-sev-medium); background: var(--color-sev-medium-soft); }
.sev--low { color: var(--color-sev-low); background: var(--color-sev-low-soft); }
.sev--planned { color: var(--color-ink-2); background: var(--color-paper-3); }
.sev--pending { color: var(--color-accent); background: var(--color-accent-soft); }

.finding { padding-block: var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule); scroll-margin-top: calc(var(--nav-height) + var(--space-lg)); }
.finding:first-of-type { border-top-color: var(--color-ink); }
.finding__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: var(--space-md); row-gap: var(--space-xs); }
.finding__head h3 { margin: 0; font-size: var(--text-lg); }
.finding__tag { display: flex; align-items: center; gap: var(--space-sm); margin: 0; }
.finding__id { color: var(--color-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
code.vector { margin-left: var(--space-xs); font-size: var(--text-xs); overflow-wrap: anywhere; }
a.nowrap { white-space: nowrap; }
.finding__meta { margin-top: var(--space-md); display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--space-lg); row-gap: var(--space-2xs); font-size: var(--text-sm); }
.finding__meta dt { color: var(--color-muted); }
.finding__meta dd { color: var(--color-ink); min-width: 0; overflow-wrap: anywhere; }
.finding h4 { margin: var(--space-lg) 0 0; font-size: var(--text-md); font-weight: var(--weight-strong); color: var(--color-ink); }
.finding h4 + * { margin-top: var(--space-xs); }
.patched { margin-top: var(--space-lg); padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); color: var(--color-ink-2); }
.patched strong { color: var(--color-sev-low); }

.chain { list-style: none; display: grid; gap: 0; }
.chain { counter-reset: chain; }
.chain li { position: relative; padding: var(--space-md) var(--space-md) var(--space-md) var(--space-xl); border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); color: var(--color-ink-2); counter-increment: chain; }
.chain li + li { border-top: 0; }
.chain li::before { content: counter(chain); position: absolute; left: var(--space-md); top: var(--space-md); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.chain li:last-child { background: var(--color-sev-critical-soft); color: var(--color-ink); }
.chain b { color: var(--color-ink); }

.next-case { margin-top: var(--space-3xl); padding-top: var(--space-xl); border-top: var(--rule-hair) solid var(--color-ink); }
.next-case p { font-size: var(--text-sm); color: var(--color-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 75rem) {
  .hero__text { grid-column: 1 / span 7; }
  .hero__figure { grid-column: 8 / span 5; }
  .contact__body { grid-column: 4 / span 7; }
  .contact__photo { grid-column: 11 / span 2; }
}
@media (max-width: 60rem) {
  .nav-links a { padding: 0 var(--space-xs); }
  .hero__text, .hero__figure, .section-head, .section-body, .contact__body, .doc-header__text, .doc-header__aside, .doc-body { grid-column: 1 / -1; }
  .hero__figure { margin-top: var(--space-2xl); max-width: 520px; grid-row: 2; }
  .hero__text { padding-top: 0; }
  .section-head { margin-bottom: var(--space-xl); }
  .section-head--sticky { position: static; }
  .section-head p { max-width: 60ch; }
  .work__text, .work__aside { grid-column: 1 / -1; }
  .contact__photo { grid-column: 1 / span 4; grid-row: 1; margin-bottom: var(--space-xl); max-width: 160px; }
  .contact__body { grid-row: 2; }
  .toc { display: none; }
  .doc-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-lg); }
  .cred-grid__half, .cred-grid__half + .cred-grid__half { grid-column: 1 / -1; }
}
@media (max-width: 48rem) {
  .js .menu-btn { display: inline-flex; }
  .js .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; flex-direction: column; gap: 0; padding: var(--space-xs) var(--gutter) var(--space-md); background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule); }
  .js .nav-links.open { display: flex; }
  .js .nav-links a { min-height: 44px; padding: 0; font-size: var(--text-md); }
  .site-nav__inner { position: relative; flex-wrap: wrap; }
  html:not(.js) .site-nav nav { order: 3; width: 100%; padding-bottom: var(--space-xs); }
  html:not(.js) .nav-links { flex-wrap: wrap; }
  .nav-tools .nav-resume { display: none; }
  .hero { padding-top: var(--space-xl); }
  .standing > div { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-3xs); }
  .ledger > li { grid-template-columns: minmax(0, 1fr); }
  .ledger__figure { text-align: left; grid-row: 3; }
  .career > li { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-sm); }
  .career__also { grid-template-columns: minmax(0, 1fr); }
  .facts--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts--four > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts--four > div { border-bottom: var(--rule-hair) solid var(--color-rule); }
  .doc-meta { grid-template-columns: minmax(0, 1fr); }
  .finding__meta { grid-template-columns: minmax(0, 1fr); }
  .finding__meta dd + dt { margin-top: var(--space-xs); }
  .hero__actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .icon-btn, a { transition: none; }
  .btn:active { transform: none; }
}
@media print {
  .site-nav, .toc, .skip, .site-footer { display: none; }
  .doc-body, .section-body { grid-column: 1 / -1; }
}
