/* Fonts are served locally, no requests to third parties. Files in assets/fonts, see README. */
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-Variable.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* The ERP Self-Test · site styles
   Concept: an engineering drawing set. Every page is a sheet with a title block.
   Blueprint blue ground, tracing paper panels, redline (signal orange) annotations. */

:root {
  --bp: #0E2240;          /* blueprint ground */
  --bp-deep: #091831;     /* deeper ground, code */
  --bp-raise: #13294B;    /* raised surfaces */
  --grid: rgba(156, 200, 240, 0.07);
  --line: #2E4C78;        /* drawing hairlines */
  --line-strong: #46689A;
  --cyan: #9CC8F0;        /* drawing ink */
  --cyan-soft: #6E97C2;
  --text: #E8EEF6;
  --muted: #9AB0CB;
  --film: #E6ECF3;        /* tracing film panels */
  --film-ink: #102646;
  --film-muted: #4D6283;
  --red: #F2A65A;         /* redline / signal */
  --red-ink: #B9611D;
  --ok: #7FD1A8;
  --warn: #F2C35A;

  --font-sans: "Archivo", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 2.125rem;
  --step-4: 3rem;
  --step-5: clamp(3rem, 7.5vw, 6.5rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--bp);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(rgba(156,200,240,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156,200,240,0.035) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
.prose p, .prose li { color: var(--text); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--red); color: var(--bp); padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- Header / navigation ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(9, 24, 49, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; white-space: nowrap; }
.brand svg, .brand img { flex: none; display: block; border-radius: 7px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-domain { font-size: 1rem; }
.brand-project { font-size: 0.72rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: var(--step--1); padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--bp-raise); }
.nav a[aria-current="page"] { color: var(--bp); background: var(--cyan); }

/* ---------- Title block (the memorable device) ---------- */
.sheet { padding: clamp(40px, 7vw, 88px) 0 32px; }
.sheet h1 {
  font-size: var(--step-5); line-height: 0.95; margin: 0 0 20px; font-weight: 800;
  font-stretch: 125%; letter-spacing: -0.035em; max-width: 14ch;
}
.sheet .lede { font-size: var(--step-1); color: var(--muted); max-width: 56ch; margin: 0 0 32px; }
.titleblock {
  display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr 1.2fr; border: 1px solid var(--line-strong);
  font-size: var(--step--1); max-width: 920px; background: rgba(9, 24, 49, 0.6);
}
.titleblock div { padding: 8px 12px; border-right: 1px solid var(--line); min-width: 0; }
.titleblock div:last-child { border-right: 0; }
.titleblock dt { color: var(--cyan-soft); font-size: 0.75rem; margin: 0; }
.titleblock dd { margin: 2px 0 0; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titleblock .rev dd { color: var(--red); }
@media (max-width: 760px) {
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock div { border-bottom: 1px solid var(--line); }
  .titleblock div:nth-child(2n) { border-right: 0; }
  .titleblock div:first-child { grid-column: 1 / -1; border-right: 0; }
}

/* ---------- Sections ---------- */
section { padding: clamp(40px, 6vw, 80px) 0; }
section + section { border-top: 1px dashed var(--line); }
h2 { font-size: var(--step-4); line-height: 1.05; font-weight: 750; font-stretch: 115%; letter-spacing: -0.025em; margin: 0 0 16px; max-width: 22ch; }
h3 { font-size: var(--step-2); line-height: 1.2; font-weight: 700; font-stretch: 105%; letter-spacing: -0.01em; margin: 0 0 8px; }
h4 { font-size: var(--step-1); margin: 0 0 6px; font-weight: 700; }
p { margin: 0 0 1em; }
.section-intro { color: var(--muted); max-width: 60ch; font-size: var(--step-1); margin-bottom: 36px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.split.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .split, .split.rev { grid-template-columns: minmax(0, 1fr); } }

/* Plain blocks with a drawing-style frame, varied, not a card kit */
.frame { border: 1px solid var(--line); padding: 22px; position: relative; }
.frame.corner::before, .frame.corner::after { content: ""; position: absolute; width: 10px; height: 10px; border: 1px solid var(--cyan); }
.frame.corner::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.frame.corner::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.film { background: var(--film); color: var(--film-ink); padding: clamp(20px, 3vw, 32px); border-radius: 2px; box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 18px 40px -24px rgba(0,0,0,0.6); }
.film h3, .film h4 { color: var(--film-ink); }
.film p, .film li { color: var(--film-ink); }
.film .muted { color: var(--film-muted); }
.film a { color: #1F57A6; }

.redline { border-left: 3px solid var(--red); padding: 4px 0 4px 18px; color: var(--text); }
.redline strong { color: var(--red); }
.note-label { color: var(--red); font-weight: 700; }

/* Lists with drawing ticks */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: 10px 0 10px 28px; border-bottom: 1px solid var(--line); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 12px; height: 1px; background: var(--cyan); }
.ticks li:last-child { border-bottom: 0; }
.film .ticks li { border-color: #C9D3E0; }
.film .ticks li::before { background: var(--film-ink); }

/* Principles: dense, typographic */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--line-strong); }
.principle { padding: 20px 20px 24px 0; border-bottom: 1px solid var(--line); }
.principle h4 { font-stretch: 112%; }
.principle p { color: var(--muted); margin: 0; font-size: var(--step--1); line-height: 1.55; }

/* Figures */
figure { margin: 0; }
figure.fig { border: 1px solid var(--line); background: rgba(9,24,49,0.55); padding: clamp(14px, 2.5vw, 28px); }
figure.fig svg { width: 100%; height: auto; display: block; }
figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 12px; }
figcaption b { color: var(--cyan); font-weight: 600; }
.svg-label { font-family: var(--font-sans); font-size: 13px; fill: var(--text); }
.svg-small { font-family: var(--font-sans); font-size: 11px; fill: var(--muted); }
.svg-title { font-family: var(--font-sans); font-size: 15px; font-weight: 700; fill: var(--text); }

/* Code */
.code { position: relative; background: var(--bp-deep); border: 1px solid var(--line); border-radius: 4px; margin: 0 0 20px; }
.code .code-name { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--cyan-soft); }
.code button.copy { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); font: inherit; font-size: 11px; padding: 3px 9px; border-radius: 4px; cursor: pointer; }
.code button.copy:hover { color: var(--text); border-color: var(--cyan); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.65; color: #D7E3F2; tab-size: 2; }
.tok-key { color: #9CC8F0; }
.tok-str { color: #B7E3B0; }
.tok-num { color: #F2C35A; }
.tok-com { color: #6E86A6; font-style: italic; }
.tok-kw { color: #F2A65A; }
.tok-fn { color: #C9B6F2; }
.tok-punc { color: #7E97B8; }

/* Tabs */
.tabs [role="tablist"] { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 0; overflow-x: auto; }
.tabs [role="tab"] { background: transparent; border: 0; color: var(--muted); padding: 10px 14px; font: inherit; font-size: var(--step--1); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--red); }
.tabs [role="tabpanel"] { padding-top: 16px; }
.tabs [role="tabpanel"][hidden] { display: none; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--cyan); font-weight: 600; background: rgba(9,24,49,0.6); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td code, p code, li code { font-family: var(--font-mono); font-size: 0.86em; color: var(--cyan); background: rgba(156,200,240,0.08); padding: 1px 5px; border-radius: 3px; }
.film td code, .film p code, .film li code { color: #1F57A6; background: rgba(16,38,70,0.07); }

/* Chips / status */
.chip { display: inline-block; font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.chip.m { border-color: var(--red); color: var(--red); }
.chip.s { border-color: var(--cyan); color: var(--cyan); }
.chip.k { border-color: var(--line-strong); color: var(--muted); }
.chip.d { border-style: dashed; color: var(--muted); }
.chip.accepted { border-color: var(--ok); color: var(--ok); }
.chip.proposed { border-color: var(--warn); color: var(--warn); }
.chip.open { border-color: var(--cyan); color: var(--cyan); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.filters button { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: var(--step--1); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--cyan); color: var(--bp); border-color: var(--cyan); }
.search { width: 100%; max-width: 420px; background: var(--bp-deep); border: 1px solid var(--line-strong); color: var(--text); padding: 10px 14px; font: inherit; border-radius: 6px; margin-bottom: 16px; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.8rem); line-height: 0.88; font-weight: 850; font-stretch: 125%; letter-spacing: -0.045em; margin: 0 0 24px; }
.hero .quote { font-size: var(--step-2); line-height: 1.3; margin: 0 0 20px; max-width: 30ch; color: var(--text); }
.hero .quote span { color: var(--muted); display: block; font-size: var(--step-0); margin-top: 8px; }
.hero p.lede { color: var(--muted); font-size: var(--step-1); max-width: 46ch; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 6px; font-weight: 650; text-decoration: none; border: 1px solid var(--cyan); color: var(--cyan); }
.btn.primary { background: var(--red); border-color: var(--red); color: #1B1205; }
.btn:hover { filter: brightness(1.08); color: inherit; }
.btn.primary:hover { color: #1B1205; }

/* Hero drawing: one orchestrated draw-in */
.draw path, .draw line, .draw rect, .draw polyline, .draw circle { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2.4s ease forwards; }
.draw .d2 { animation-delay: 0.4s; } .draw .d3 { animation-delay: 0.8s; } .draw .d4 { animation-delay: 1.2s; }
.draw text { opacity: 0; animation: fadein 0.8s ease forwards 1.4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .draw path, .draw line, .draw rect, .draw polyline, .draw circle { animation: none; stroke-dashoffset: 0; }
  .draw text { animation: none; opacity: 1; }
}

/* Status strip */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); margin-top: 40px; }
.strip div { padding: 16px 18px; border-right: 1px solid var(--line); }
.strip div:last-child { border-right: 0; }
.strip b { display: block; font-size: var(--step-3); font-stretch: 120%; font-weight: 800; line-height: 1; margin-bottom: 6px; }
.strip span { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 760px) { .strip { grid-template-columns: 1fr 1fr; } .strip div:nth-child(2) { border-right: 0; } .strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* Reality map */
.map { display: grid; gap: 14px; }
.map-row { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: center; }
.map-row h4 { font-size: var(--step-0); margin: 0; }
.map-row p { margin: 0; color: var(--muted); font-size: 13px; }
.cells { display: flex; flex-wrap: wrap; gap: 6px; }
.cell { width: 44px; height: 44px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 11px; color: var(--muted); position: relative; cursor: default; background: rgba(9,24,49,0.5); }
.cell[data-s="pass"] { background: rgba(127,209,168,0.18); border-color: var(--ok); color: var(--ok); }
.cell[data-s="partial"] { background: rgba(242,195,90,0.16); border-color: var(--warn); color: var(--warn); }
.cell[data-s="fail"] { background: rgba(242,166,90,0.16); border-color: var(--red); color: var(--red); }
.cell:hover .tip, .cell:focus .tip { display: block; }
.tip { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 240px; background: var(--film); color: var(--film-ink); padding: 10px 12px; font-size: 12.5px; line-height: 1.4; z-index: 5; border-radius: 3px; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); margin-top: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--line-strong); margin-right: 6px; vertical-align: -1px; }
@media (max-width: 760px) { .map-row { grid-template-columns: 1fr; } }

/* Diary */
.entry { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 28px; padding: 36px 0; border-top: 1px solid var(--line); }
.entry .num { font-size: 4.5rem; font-weight: 850; font-stretch: 125%; line-height: 0.85; color: var(--cyan); letter-spacing: -0.04em; }
.entry .date { color: var(--muted); font-size: var(--step--1); margin-top: 10px; }
.entry-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
.entry-body img { border: 1px solid var(--line); }
.entry details { margin-top: 10px; }
.entry summary { cursor: pointer; color: var(--cyan); }
.entry .post-text { white-space: pre-wrap; color: var(--text); font-size: 15.5px; margin-top: 12px; border-left: 1px solid var(--line-strong); padding-left: 16px; }
.entry .takeaways { margin: 10px 0 0; }
@media (max-width: 900px) { .entry { grid-template-columns: 1fr; gap: 10px; } .entry-body { grid-template-columns: 1fr; } }

/* Decision records */
.adr { border-top: 1px solid var(--line); padding: 28px 0; }
.adr-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.adr-head .id { font-family: var(--font-mono); color: var(--cyan-soft); font-size: 13px; }
.adr-head h3 { margin: 0; }
.adr-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 14px; }
.adr-cols h4 { font-size: var(--step--1); color: var(--cyan); font-weight: 600; }
.adr-cols p, .adr-cols li { font-size: 15px; color: var(--muted); }
.adr-cols ul { padding-left: 18px; margin: 0; }
.scale-note { margin-top: 14px; font-size: 15px; }
@media (max-width: 900px) { .adr-cols { grid-template-columns: 1fr; } }
.matrix td.score { font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--cyan); }

/* Toolbox */
.tool { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.tool h3 { margin-bottom: 4px; }
.tool .cat { font-size: 13px; color: var(--muted); }
.tool .why { margin: 0 0 10px; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 14.5px; }
.proscons h4 { font-size: 13px; font-weight: 600; color: var(--cyan); margin-bottom: 4px; }
.proscons ul { margin: 0; padding-left: 18px; color: var(--muted); }
.atscale { margin-top: 12px; font-size: 14.5px; border-left: 3px solid var(--red); padding-left: 12px; }
.atscale b { color: var(--red); }
@media (max-width: 900px) { .tool, .proscons { grid-template-columns: 1fr; } }

/* Enterprise vs solo table emphasis */
.vs td:nth-child(3) { color: var(--red); }

/* About */
.portrait { border: 1px solid var(--line-strong); filter: saturate(0.9); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 32px 0 48px; color: var(--muted); font-size: var(--step--1); }
.site-foot .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.site-foot a { color: var(--muted); }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr; } }

/* Page index on home */
.index { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line); }
.index a { display: block; padding: 18px 18px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.index a:hover { background: var(--bp-raise); }
.index .no { font-family: var(--font-mono); font-size: 12px; color: var(--cyan-soft); }
.index h4 { margin: 6px 0 4px; font-stretch: 112%; }
.index p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }

/* Roadmap: a real sequence, so numbered and connected */
.roadmap { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; border-top: 2px solid var(--line-strong); }
.roadmap li { padding: 18px 18px 22px 0; position: relative; }
.roadmap li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bp); border: 2px solid var(--cyan); }
.roadmap li:first-child::before { background: var(--red); border-color: var(--red); }

/* Navigation: a few primary sheets plus the full sheet index */
.sheets-btn { display: inline-flex; align-items: center; gap: 10px; background: transparent; border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: var(--step--1); padding: 7px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.sheets-btn:hover, .sheets-btn[aria-expanded="true"] { border-color: var(--cyan); }
.sheets-icon { width: 14px; height: 10px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; position: relative; }
.sheets-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 3.5px; border-top: 1.5px solid currentColor; }
.sheets-panel { border-top: 1px solid var(--line); background: rgba(9, 24, 49, 0.97); }
.sheets-panel ol { list-style: none; margin: 0; padding: 18px 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 20px; }
.sheets-panel a { display: flex; gap: 12px; align-items: baseline; padding: 9px 10px; color: var(--text); text-decoration: none; border-radius: 4px; }
.sheets-panel a:hover { background: var(--bp-raise); }
.sheets-panel a[aria-current="page"] { color: var(--bp); background: var(--cyan); }
.sheets-panel .no { font-family: var(--font-mono); font-size: 12px; color: var(--cyan-soft); }
.sheets-panel a[aria-current="page"] .no { color: var(--bp); }
@media (max-width: 860px) { .nav { display: none; } .sheets-btn { margin-left: auto; } }
.site-head .sheets-panel .wrap { display: block; min-height: 0; }

/* About me */
.profile-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.portrait-frame { position: relative; border: 1px solid var(--line-strong); padding: 14px; background: rgba(9,24,49,0.6); }
.portrait-frame::before, .portrait-frame::after { content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid var(--red); }
.portrait-frame::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.portrait-frame::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.portrait-frame img { width: 100%; height: auto; filter: saturate(0.92) contrast(1.03); }
.portrait-frame figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.profile-role { color: var(--red); font-weight: 650; font-size: var(--step-1); margin-bottom: 14px; }
.profile-lede { font-size: var(--step-3); line-height: 1.15; font-weight: 750; font-stretch: 112%; letter-spacing: -0.02em; margin-bottom: 22px; }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 2px solid var(--cyan); margin-top: 24px; }
.hl { padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.hl h3 { font-size: var(--step-1); }
.hl p { color: var(--muted); margin: 0; font-size: 15px; }
.career { list-style: none; padding: 0; margin: 24px 0 0; border-left: 1px solid var(--line-strong); }
.career li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; padding: 0 0 26px 24px; position: relative; }
.career li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bp); border: 2px solid var(--cyan); }
.career .period { color: var(--cyan); font-weight: 600; }
.career .org { margin: 0; color: var(--text); }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line); }
.skill { display: block; padding: 20px 20px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.skill:hover { background: var(--bp-raise); }
.skill p { color: var(--muted); font-size: 15px; margin: 4px 0 12px; }
.skill .seen { font-size: 13px; color: var(--cyan); }
@media (max-width: 860px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } .highlights { grid-template-columns: minmax(0, 1fr); } .career li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

.background { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line); margin-top: 24px; }
.bg-item { padding: 20px 20px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bg-item h3 { font-size: var(--step-2); font-stretch: 115%; margin-bottom: 6px; }
.bg-item p { color: var(--muted); font-size: 15px; margin: 0; }
@media (max-width: 960px) { .background { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .background { grid-template-columns: minmax(0, 1fr); } }
