/* Koraiio: a light, editorial "lab notebook" design. White paper, serif headlines (Newsreader),
   IBM Plex Sans for text and Plex Mono for labels; real figures in thin frames with numbered
   captions. One brand blue (the mark's brackets) used sparingly. */

:root {
  --bg: #ffffff;
  --paper: #f6f5f1;
  --ink: #14171c;
  --ink-2: #464d57;
  --ink-3: #6e7681;
  --line: #e4e2dc;
  --line-2: #cfccc4;
  --brand: #1f6feb;
  --link: #1a56c4;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
::selection { background: #d6e4ff; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { left: 16px; top: 16px; }

/* ---------- Type ---------- */
.kicker { margin: 0 0 14px; font: 500 .75rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.h1 { font: 400 clamp(2.3rem, 5vw, 4rem)/1.06 var(--serif); letter-spacing: -.02em; max-width: 20ch; }
.h1 em { font-style: italic; color: var(--ink-2); }
.h2 { font: 400 clamp(1.75rem, 3.2vw, 2.6rem)/1.12 var(--serif); letter-spacing: -.015em; max-width: 24ch; }
.h3 { font: 600 1.375rem/1.3 var(--sans); letter-spacing: -.005em; }
.h4 { font: 600 1.125rem/1.35 var(--sans); }
.lede { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.label { font: 500 .72rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.mono { font-family: var(--mono); font-size: .875rem; }
.num { display: block; font: 500 .8rem var(--mono); color: var(--brand); margin-bottom: 10px; }
.text-link { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); }
.text-link:hover { text-decoration-color: var(--ink); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .8em 1.3em; border: 1px solid transparent; border-radius: 999px; font: 500 .9375rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2b313a; color: #fff; }
.btn-secondary { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { color: var(--ink); padding-inline: .4em; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.btn-ghost:hover { text-decoration-color: var(--ink); }
.btn-sm { padding: .6em 1.05em; font-size: .875rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.1875rem/1 var(--sans); letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: .9375rem; font-weight: 500; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); }
.site-nav .nav-cta { padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); }
.site-nav .nav-cta:hover { background: var(--ink); color: #fff; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; margin-left: auto; width: 44px; height: 44px; padding: 0 11px; background: none; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; }
  .nav-toggle span { display: block; height: 1.5px; background: var(--ink); transition: transform .2s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .site-nav { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px var(--gutter) 24px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(20, 23, 28, .06); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s; }
  .site-nav.open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .25s var(--ease); }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; color: var(--ink); }
  .site-nav a[aria-current="page"] { box-shadow: none; font-weight: 600; }
  .site-nav .nav-cta { margin-top: 16px; text-align: center; border-bottom: 1px solid var(--ink); }
}
html.nav-open { overflow: hidden; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-tight { padding-top: clamp(32px, 4vw, 56px); }
.section-paper { background: var(--paper); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head .lede { margin: 0; }
.section-foot { margin: 32px 0 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.split .lede { margin-top: 16px; }
@media (max-width: 900px) { .section-head, .split { grid-template-columns: 1fr; } }

/* ---------- Figures ---------- */
.fig { margin: 0; }
.fig-frame { display: block; background: #fff; border: 1px solid var(--line); padding: clamp(8px, 1.4vw, 16px); }
.fig-frame img { width: 100%; height: auto; }
.fig figcaption, .fig-cap { display: block; margin-top: 10px; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.fig-n { font: 600 .75rem var(--mono); letter-spacing: .04em; color: var(--ink); margin-right: .35em; text-transform: uppercase; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .lede { margin-top: 24px; }
.plate { position: relative; }
.plate-stage { position: relative; aspect-ratio: 4 / 3; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line), 0 24px 48px -32px rgba(20, 23, 28, .25); }
.plate-item { position: absolute; inset: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s .6s; }
.plate-item.is-active { opacity: 1; visibility: visible; transition: opacity .6s var(--ease); }
.plate-img { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: clamp(10px, 2vw, 22px); }
.plate-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.plate-img.plate-photo { padding: 0; }
.plate-img img.photo { width: 100%; height: 100%; object-fit: cover; }
.plate-cap { padding: 12px 16px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--ink-2); background: #fff; }
.plate-item:hover .plate-cap { color: var(--ink); }
.plate-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.plate-tabs button { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink-2); font: 500 .8125rem var(--mono); cursor: pointer; }
.plate-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Track-record strip */
.facts-band { border-block: 1px solid var(--line); }
.facts-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts-row li { padding: 22px 20px 22px 0; display: flex; flex-direction: column; gap: 2px; }
.facts-row li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.facts-row strong { font-weight: 600; }
.facts-row span { color: var(--ink-3); font-size: .9rem; }
@media (max-width: 900px) { .facts-row { grid-template-columns: 1fr 1fr; } .facts-row li:nth-child(3) { padding-left: 0; border-left: 0; } .facts-row li:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Why on-device */
.why-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.why-grid li { padding-top: 18px; border-top: 1px solid var(--line-2); }
.why-grid p { margin-top: 8px; color: var(--ink-2); font-size: .9688rem; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } }

/* Research credibility row */
.venue-row { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.venue-row li { padding: 16px 12px 0 0; display: flex; flex-direction: column; gap: 2px; }
.venue-row strong { font: 400 1.75rem/1.1 var(--serif); }
.venue-row span { font-size: .875rem; color: var(--ink-3); }
@media (max-width: 560px) { .venue-row { grid-template-columns: 1fr 1fr; row-gap: 16px; } }

/* ---------- Work cards ---------- */
.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 3vw, 40px) clamp(20px, 2.4vw, 32px); }
.work-card { grid-column: span 1; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.work-card-lg { grid-column: span 2; }
.work-thumb { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; padding: 12px; background: #fff; border: 1px solid var(--line); overflow: hidden; transition: border-color .2s; }
.work-thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform .4s var(--ease); }
.work-thumb img.photo { width: calc(100% + 24px); height: calc(100% + 24px); max-width: none; max-height: none; margin: -12px; object-fit: cover; }
.work-card:hover .work-thumb { border-color: var(--ink-3); }
.work-card:hover .work-thumb img { transform: scale(1.02); }
.work-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font: 500 .72rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.work-card h3 { margin-top: 8px; font: 400 1.375rem/1.2 var(--serif); letter-spacing: -.01em; }
.work-card-lg h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); }
.work-card p { margin: 8px 0 0; color: var(--ink-2); font-size: .9688rem; line-height: 1.55; }
.work-more { margin-top: 12px; font-size: .875rem; font-weight: 500; color: var(--link); }
.work-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
@media (max-width: 1000px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .work-card-lg { grid-column: span 2; } }
@media (max-width: 640px) { .work-grid { grid-template-columns: 1fr; } .work-card-lg { grid-column: auto; } }

/* ---------- Services (home list + page) ---------- */
.service-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); }
.service-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); padding: 22px 0; border-top: 1px solid var(--line-2); }
.service-list h3 { font: 600 1.125rem/1.35 var(--sans); }
.service-list h3 a { color: var(--ink); text-decoration: none; }
.service-list h3 a:hover { text-decoration: underline; }
.service-list p { margin: 6px 0 0; color: var(--ink-2); }
@media (max-width: 800px) { .service-list { grid-template-columns: 1fr; } }

.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.jump a { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font-size: .875rem; text-decoration: none; }
.jump a:hover { border-color: var(--ink); color: var(--ink); }
.service { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 72px); padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); align-items: start; }
.service:first-child { border-top: 0; padding-top: 0; }
.service-text p { color: var(--ink-2); }
.service-text .service-lead { font: 400 1.25rem/1.4 var(--serif); color: var(--ink); }
.examples { margin: 0 0 18px; padding-left: 1.2em; color: var(--ink-2); }
.examples li { margin-bottom: 4px; }
.service-text .h3 { margin-bottom: 14px; }
.service-fig { display: block; text-decoration: none; color: inherit; }
.service-fig .fig-frame img { max-height: 340px; width: auto; margin: 0 auto; }
.service-fig .fig-frame { display: flex; justify-content: center; }
.service-fig-text { padding: 28px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; }
.tags li { padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .8125rem; color: var(--ink-2); background: #fff; }
.basis { font-size: .9rem; }
.basis a { color: var(--link); }
@media (max-width: 900px) { .service { grid-template-columns: 1fr; } }

.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 36px; }
.cols-3 > div { padding-top: 20px; border-top: 1px solid var(--line-2); }
.cols-3 p { color: var(--ink-2); margin-top: 8px; }
@media (max-width: 800px) { .cols-3 { grid-template-columns: 1fr; } }

.checklist { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--line); }
.checklist li { position: relative; padding: 14px 0 14px 30px; border-bottom: 1px solid var(--line); }
.checklist li::before { content: ""; position: absolute; left: 3px; top: 21px; width: 12px; height: 7px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }

/* ---------- Publications ---------- */
.pub-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.pub-rows li { border-bottom: 1px solid var(--line); }
.pub-rows a { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 24px; align-items: center; padding: 18px 0; text-decoration: none; color: inherit; }
.pub-thumb { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; padding: 6px; background: #fff; border: 1px solid var(--line); }
.pub-thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pub-body { display: flex; flex-direction: column; gap: 4px; }
.pub-venue { font: 500 .75rem/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.pub-title { font: 400 1.25rem/1.3 var(--serif); color: var(--ink); }
.pub-authors { font-size: .9rem; color: var(--ink-2); }
.pub-rows a:hover .pub-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (max-width: 640px) { .pub-rows a { grid-template-columns: 104px minmax(0, 1fr); gap: 16px; } .pub-title { font-size: 1.0625rem; } }

.pubs { margin-top: 32px; border-top: 1px solid var(--line-2); }
.pub-year { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.pub-y { font: 400 1.5rem/1 var(--serif); color: var(--ink-3); }
.pub-year ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.pub { display: block; }
.pub.has-fig { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.pub > div { display: flex; flex-direction: column; gap: 4px; max-width: 78ch; }
.pub-fig { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; padding: 8px; background: #fff; border: 1px solid var(--line); }
.pub-fig img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pub-fig:hover { border-color: var(--ink-3); }
.pubs .pub-title { font-size: 1.25rem; text-decoration: none; }
.pubs .pub-title:hover { text-decoration: underline; }
.pubs .pub-authors b { color: var(--ink); font-weight: 600; }
.pubs .pub-venue { font: italic 400 .95rem/1.45 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.pub-links { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 6px; font-size: .8125rem; }
.pub-links .tag { font: 500 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.pub-links a { color: var(--link); }
.pub-credit { font-size: .75rem; color: var(--ink-3); }
@media (max-width: 760px) { .pub-year { grid-template-columns: 1fr; } .pub.has-fig { grid-template-columns: 1fr; } .pub-fig { max-width: 360px; } }

.patent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 32px; }
.patent { padding: 20px; background: #fff; border: 1px solid var(--line); }
.patent .fig-frame { border: 0; padding: 0 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; display: flex; justify-content: center; }
.patent .fig-frame img { max-height: 240px; width: auto; }
.patent .h4 { margin-bottom: 8px; }
@media (max-width: 800px) { .patent-grid { grid-template-columns: 1fr; } }

.repo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.repo-grid a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px; border: 1px solid var(--line); text-decoration: none; color: inherit; background: #fff; }
.repo-grid a:hover { border-color: var(--ink-3); }
.repo-name { font: 500 1rem var(--mono); color: var(--ink); }
.repo-text { color: var(--ink-2); font-size: .9375rem; }
.repo-host { margin-top: auto; padding-top: 8px; font-size: .8125rem; color: var(--ink-3); }
@media (max-width: 900px) { .repo-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .repo-grid { grid-template-columns: 1fr; } }

.dated-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line-2); }
.dated-list li { border-bottom: 1px solid var(--line); }
.dated-list a { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; padding: 14px 0; text-decoration: none; color: var(--ink); align-items: baseline; }
.dated-list time { font: 500 .75rem var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.dated-list strong { font-weight: 500; }
.dated-list .muted { display: block; font-size: .9rem; }
.dated-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.split .dated-list { margin-top: 0; }

/* ---------- OSINT ---------- */
.osint-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.osint-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.osint-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--line); }
.osint-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.osint-card:hover .osint-thumb img { transform: scale(1.03); }
.osint-meta { margin-top: 8px; font: 500 .72rem var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.osint-title { font: 400 1.3rem/1.25 var(--serif); }
.osint-desc { color: var(--ink-2); font-size: .9375rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.osint-card:hover .osint-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (max-width: 900px) { .osint-grid { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps li { padding-top: 20px; border-top: 2px solid var(--ink); }
.steps h3 { font: 400 1.5rem/1.2 var(--serif); }
.steps p { margin-top: 8px; color: var(--ink-2); font-size: .9688rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { margin-top: 28px; border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 16px; padding: 20px 0; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font: 500 1.125rem/1.4 var(--sans); }
.faq summary::after { content: "+"; font: 400 1.5rem/1 var(--sans); color: var(--ink-3); justify-self: end; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 40px 22px 0; color: var(--ink-2); }

/* ---------- Contact ---------- */
.contact-band { background: var(--paper); border-top: 1px solid var(--line); }
.contact { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 96px); align-items: start; }
.contact .lede { margin-top: 18px; }
.contact-list { margin: 0; border-top: 1px solid var(--line-2); }
.contact-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { font: 500 .72rem/1.9 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Inner pages ---------- */
.page-hero { padding-block: clamp(40px, 6vw, 80px) clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.page-hero .lede { margin-top: 20px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; font-size: .875rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }

.project-head .h1 { max-width: 24ch; }
.project-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 32px 0 0; border-top: 1px solid var(--line-2); }
.project-meta div { padding: 14px 20px 0 0; }
.project-meta div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.project-meta dt { font: 500 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.project-meta dd { margin: 4px 0 0; font-size: .9375rem; }
@media (max-width: 760px) { .project-meta { grid-template-columns: 1fr; } .project-meta div + div { padding-left: 0; border-left: 0; } }
.project-figure { padding-top: clamp(32px, 4vw, 48px); }
.fig-wide .fig-frame { display: flex; justify-content: center; background: #fff; }
.fig-wide .fig-frame img { max-height: 620px; width: auto; }
.project-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px clamp(40px, 6vw, 96px); padding-block: clamp(40px, 5vw, 64px) var(--section); align-items: start; }
.project-aside { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 28px; }
.link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.link-list a:hover { color: var(--link); }
.aside-cta { padding: 20px; background: var(--paper); border: 1px solid var(--line); }
.aside-cta p { color: var(--ink-2); font-size: .9375rem; }
.project-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: var(--section); }
.project-nav a { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 400 1.25rem/1.3 var(--serif); }
.project-nav a:last-child { text-align: right; }
.project-nav a:hover { border-color: var(--ink-3); }
@media (max-width: 900px) { .project-body { grid-template-columns: 1fr; } .project-aside { position: static; } }
@media (max-width: 600px) { .project-nav { grid-template-columns: 1fr; } .project-nav a:last-child { text-align: left; } }

.prose { max-width: 70ch; }
.prose h2 { font: 400 1.75rem/1.2 var(--serif); margin: 1.6em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #2e343c; }
.prose ol, .prose ul { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--ink-3); }
.prose .fig { margin: 2em 0; }
.prose .stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.prose .stack span { padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 .78rem var(--mono); color: var(--ink-2); }
.legal h2 { font: 600 1.25rem/1.3 var(--sans); margin: 1.8em 0 .5em; }

.site-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.site-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: inherit; }
.site-card:hover { border-color: var(--ink-3); }
.site-card p { color: var(--ink-2); font-size: .9375rem; margin: 0; }
.site-host { margin-top: auto; padding-top: 10px; font-size: .875rem; color: var(--link); }
@media (max-width: 1000px) { .site-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-cards { grid-template-columns: 1fr; } }

.facts-table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); }
.facts-table div { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.facts-table div:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); }
.facts-table div:nth-last-child(-n+3) { border-bottom: 0; }
.facts-table dt { font: 500 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.facts-table dd { margin: 4px 0 0; font: 500 1.0625rem var(--mono); }
@media (max-width: 700px) { .facts-table { grid-template-columns: 1fr 1fr; } .facts-table div { border-left: 0 !important; border-bottom: 1px solid var(--line) !important; } .facts-table div:nth-child(even) { border-left: 1px solid var(--line) !important; } }

.founder { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.founder > img { width: 220px; height: 220px; object-fit: cover; border-radius: 4px; }
.founder .role { color: var(--ink-2); margin: 8px 0 20px; }
.inline-links { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
@media (max-width: 700px) { .founder { grid-template-columns: 1fr; } .founder > img { width: 160px; height: 160px; } }

.notfound { min-height: 55vh; display: grid; align-content: center; border-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding-block: 56px 28px; font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand p { margin-top: 14px; color: var(--ink-2); max-width: 36ch; }
.footer-addr a { color: var(--ink); }
.footer-head { font: 500 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.site-footer ul a:hover { color: var(--ink); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line-2); font: .8125rem var(--mono); color: var(--ink-3); }
.footer-family { margin-left: auto; }
.footer-family a { color: var(--ink-2); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } .footer-family { margin-left: 0; } }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
.reduce [data-reveal] { opacity: 1 !important; transform: none !important; }

/* =====================================================================
   Readability pass: no tiny uppercase labels anywhere. Everything that
   used to be small mono print is now normal sans text at a readable size.
   ===================================================================== */
.label, .footer-head, .contact-list dt, .project-meta dt, .facts-table dt, .dated-list time, .osint-meta, .pub-venue, .pub-links .tag, .work-meta, .venue-row span, .repo-host, .stack span, .crumbs {
  font-family: var(--sans); font-size: .9375rem; font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1.5;
}
.label, .footer-head { font-weight: 600; color: var(--ink-2); }
.num { font: 400 1.375rem/1 var(--serif); color: var(--brand); margin-bottom: 12px; }
.fig-n { font: 600 .9375rem var(--sans); letter-spacing: 0; text-transform: none; }
.fig figcaption, .fig-cap, .plate-cap { font-size: .9688rem; }
.facts-row strong { font-size: 1.125rem; }
.facts-row span { font-size: 1rem; color: var(--ink-2); }
.work-card p, .service-list p, .why-grid p, .steps p, .osint-desc, .cols-3 p { font-size: 1.0313rem; }
.work-more { font-size: 1rem; }
.tags li { font-size: .9375rem; }
.contact-list dd, .project-meta dd { font-size: 1.0313rem; }
.footer-base { font: 400 .9375rem var(--sans); }
.site-footer { font-size: 1rem; }
.pub-authors, .basis { font-size: 1rem; }
.dated-list a { grid-template-columns: 120px minmax(0, 1fr); }
.contact-list div { grid-template-columns: 120px minmax(0, 1fr); }

/* Service cards on Home */
.service-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service-card { display: flex; flex-direction: column; gap: 10px; padding: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s; }
.service-card:hover { border-color: var(--ink-3); box-shadow: 0 12px 28px -18px rgba(20, 23, 28, .35); }
.service-card h3 { font: 400 1.5rem/1.2 var(--serif); }
.service-card p { color: var(--ink-2); font-size: 1.0625rem; margin: 0; }
.service-card .more { margin-top: auto; padding-top: 8px; font-weight: 500; color: var(--link); }
@media (max-width: 1000px) { .service-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .service-cards { grid-template-columns: 1fr; } }

/* Drawn diagrams */
.diagram { margin: 0 0 clamp(36px, 5vw, 56px); padding: clamp(16px, 3vw, 32px); background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.diagram-svg { display: block; width: 100%; height: auto; }
.diagram figcaption { margin-top: 14px; color: var(--ink-2); font-size: 1rem; text-align: center; }
.aside-cta p { font-size: 1.0313rem; }
.aside-cta .label { font-size: 1.0625rem; color: var(--ink); }
.link-list a { font-size: 1.0313rem; }
.project-meta dt { color: var(--ink-3); }
