/* Santiago Security
   Dark-first personal studio look: floating pill nav, oversized type, bento cards, lime accent.
   Every color is a token. Dark is the default for every visitor; the light palette below
   applies only when <html data-theme="light"> is set explicitly. */

:root {
    --bg: #0b0c0e;
    --surface: #15181c;
    --surface-2: #1c2026;
    --ink: #f2f3ee;
    --muted: #a0a6ad;
    --faint: #7a8087;
    --line: #262a31;
    --line-strong: #383d46;
    --accent: #c4f25a;          /* fills, dots, highlights */
    --accent-ink: #0b0c0e;      /* text on accent fills */
    --accent-text: #c4f25a;     /* accent used as text on --bg */
    --glow: rgba(196, 242, 90, 0.14);
    --nav-bg: rgba(21, 24, 28, 0.72);
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);

    --sans: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
    --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
    --deco: "Playfair Display", "Didot", Georgia, serif;

    --step--1: 0.8125rem;
    --step-0: 1rem;
    --step-1: 1.125rem;
    --step-2: clamp(1.3rem, 1.1rem + 0.7vw, 1.65rem);
    --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem);
    --step-4: clamp(2.3rem, 1.4rem + 3.4vw, 4.1rem);
    --step-5: clamp(2.6rem, 1.3rem + 4.6vw, 5.4rem);

    --radius: 28px;
    --radius-sm: 16px;
    --gutter-l: max(16px, env(safe-area-inset-left, 0px));
    --gutter-r: max(16px, env(safe-area-inset-right, 0px));
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #f3f2ec;
    --surface: #fbfaf6;
    --surface-2: #ecebe3;
    --ink: #111214;
    --muted: #52575d;
    --faint: #74797f;
    --line: #dddad0;
    --line-strong: #c4c0b2;
    --accent-ink: #111214;
    --accent-text: #3d6a00;
    --glow: rgba(140, 200, 30, 0.2);
    --nav-bg: rgba(251, 250, 246, 0.78);
    --shadow: 0 24px 60px -34px rgba(40, 38, 30, 0.35);
    color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    position: relative;
    isolation: isolate;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--step-0);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
h3 { letter-spacing: -0.02em; line-height: 1.2; font-size: var(--step-1); }
p { margin: 0; }
/* Accent word in headlines: high-contrast serif, lime color, soft marker underline */
.accent {
    font-family: var(--deco);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--accent-text);
    text-decoration: underline;
    text-decoration-color: var(--glow);
    text-decoration-thickness: 0.2em;
    text-underline-offset: -0.06em;
    text-decoration-skip-ink: none;
}
ul { margin: 0; }

.skip {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 999px; font-weight: 600;
}
.skip:focus { top: calc(16px + env(safe-area-inset-top, 0px)); }

.wrap {
    width: 100%;
    max-width: 1320px;
    margin-inline: auto;
    padding-left: var(--gutter-l);
    padding-right: var(--gutter-r);
}
@media (min-width: 760px) {
    .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}

/* Faint blueprint grid and glow behind the top of every page */
body::after {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 900px; z-index: -1; pointer-events: none;
    background:
        radial-gradient(600px 380px at 78% 120px, var(--glow), transparent 70%),
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 64px 64px,
        linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 64px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 85%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 85%);
}

/* ---------- Labels, pills, buttons ---------- */
.label {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    display: inline-flex; align-items: center; gap: 10px;
}
.label::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.6; }

.pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 14px 7px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    font-size: var(--step--1);
    color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(196, 242, 90, 0.55); }
    70%, 100% { box-shadow: 0 0 0 10px rgba(196, 242, 90, 0); }
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--ink);
    font: 500 var(--step-0)/1 var(--sans);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { border-color: var(--ink); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translate(3px, -3px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-small { min-height: 40px; padding: 9px 16px; font-size: var(--step--1); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.tag {
    font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
    padding: 4px 9px; border-radius: 999px;
    border: 1px solid var(--line-strong); color: var(--muted);
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Header: floating pill ---------- */
body::before {
    content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10;
    background: var(--bg);
}
.site-header {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 20;
    padding-block: 14px;
}
.bar {
    position: relative;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 8px 8px 8px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    box-shadow: var(--shadow);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand .mark-shield { fill: var(--ink); }
.brand .mark-check { stroke: var(--bg); }
.brand .mark-dot { fill: var(--accent); }
.brand b { font-weight: 400; color: var(--muted); margin-left: 4px; }

.bar-actions { display: flex; align-items: center; gap: 6px; }
.site-nav { display: flex; align-items: center; gap: 4px; }

/* Light/dark switch: shows a sun in dark mode (go light) and a moon in light mode (go dark) */
.theme-toggle {
    width: 40px; height: 40px; flex: none;
    display: grid; place-items: center;
    border-radius: 50%; border: 1px solid var(--line-strong);
    background: var(--surface-2); color: var(--ink);
    cursor: pointer; transition: border-color 0.2s, transform 0.3s;
}
.theme-toggle:hover { border-color: var(--ink); transform: rotate(20deg); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.site-nav a {
    text-decoration: none; color: var(--muted);
    padding: 9px 14px; border-radius: 999px; font-size: 0.95rem;
    transition: color 0.2s, background 0.2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.site-nav a.nav-cta { background: var(--accent); color: var(--accent-ink); font-weight: 600; margin-left: 6px; }
.site-nav a.nav-cta:hover { background: var(--ink); color: var(--bg); }

.nav-toggle {
    display: none;
    min-height: 40px; padding: 8px 16px;
    border-radius: 999px; border: 1px solid var(--line-strong);
    background: var(--surface-2); color: var(--ink);
    font: 500 0.95rem/1 var(--sans); cursor: pointer;
}

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; align-items: center; }
    .site-nav {
        display: none;
        position: absolute; top: calc(100% + 10px); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 24px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }
    .site-nav[data-open="true"] { display: flex; }
    .site-nav a { padding: 14px 16px; font-size: 1.05rem; color: var(--ink); }
    .site-nav a.nav-cta { margin: 6px 0 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(32px, 4vw, 56px); }
.hero .pill { margin-bottom: 28px; }
.hero h1 { font-size: var(--step-5); max-width: 13ch; }
.hero-foot {
    margin-top: clamp(24px, 3.5vw, 40px);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
}
.lede { font-size: var(--step-1); color: var(--muted); max-width: 58ch; line-height: 1.55; }
.lede strong { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) { .hero-foot { grid-template-columns: 1fr; } }

/* Inner page header */
.page-head { padding-block: clamp(36px, 5.5vw, 72px) clamp(20px, 3vw, 36px); }
.page-head h1 { font-size: var(--step-4); max-width: 16ch; margin-top: 18px; }
.page-head .lede { margin-top: 22px; }

/* ---------- Marquee ---------- */
.marquee {
    border-block: 1px solid var(--line);
    overflow: hidden;
    padding-block: 18px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span {
    display: inline-flex; align-items: center; gap: 48px;
    font-size: var(--step-2); letter-spacing: -0.02em; color: var(--muted); white-space: nowrap;
}
.marquee-track span::after { content: "\2726"; font-size: 0.6em; color: var(--accent-text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(48px, 6vw, 88px); }
.section.tight-top { padding-top: clamp(16px, 2vw, 28px); }
.section-head {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; align-items: end;
    margin-bottom: clamp(24px, 3.5vw, 40px);
}
.section-head h2 { font-size: var(--step-3); margin-top: 14px; }
.section-head .lede { font-size: var(--step-0); }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.tile {
    position: relative;
    min-width: 0;
    display: flex; flex-direction: column; gap: 14px;
    padding: clamp(20px, 2vw, 28px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s;
}
a.tile { text-decoration: none; }
a.tile:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.tile > .label { margin-bottom: auto; padding-bottom: 18px; }
.tile p { color: var(--muted); }
.tile h3 { font-size: var(--step-2); }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.row-2 { grid-row: span 2; }

.tile-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile-accent p, .tile-accent .label { color: var(--accent-ink); opacity: 0.78; }
.tile-photo { padding: 0; min-height: 320px; }
.tile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.caption {
    position: absolute; left: 14px; right: 14px; bottom: 14px;
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 10px 16px; border-radius: 999px;
    background: rgba(11, 12, 14, 0.62); color: #f2f3ee;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    font-size: var(--step--1);
}
.caption .dot { animation: none; }
.big-num { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.05em; line-height: 0.9; }
.corner {
    position: absolute; top: 20px; right: 20px;
    width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid var(--line-strong); color: var(--ink);
    transition: background 0.2s, color 0.2s, transform 0.25s, border-color 0.2s;
}
.corner svg { width: 16px; height: 16px; }
a.tile:hover .corner { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: rotate(45deg); }
.tile-accent .corner { border-color: rgba(17, 18, 20, 0.3); color: var(--accent-ink); }
a.tile-accent:hover .corner { background: var(--accent-ink); color: var(--accent); }

.framework-list { list-style: none; padding: 0; display: grid; }
.framework-list li {
    display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px;
    padding-block: 11px; border-top: 1px solid var(--line);
    font-size: 0.95rem;
}
.framework-list li:first-child { border-top: 0; padding-top: 0; }
.framework-list b { font-family: var(--mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.05em; color: var(--accent-text); padding-top: 3px; }
.framework-list small { display: block; color: var(--faint); font-size: 0.82rem; }

.span-3 { grid-column: span 3; }
@media (max-width: 1024px) {
    .bento > * { grid-column: span 6; }
    .bento > .wide { grid-column: span 12; }
}
@media (max-width: 640px) {
    .bento { grid-template-columns: minmax(0, 1fr); }
    .bento > * { grid-column: auto !important; grid-row: auto !important; }
    .tile-photo { min-height: 440px; }
}

/* ---------- Role cards (four jobs) ---------- */
.roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.role { min-height: 220px; }
.role .num { font-family: var(--mono); font-size: 0.8rem; color: var(--faint); }
.role h3 { margin-top: auto; font-size: var(--step-1); }
@media (max-width: 1024px) { .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .roles { grid-template-columns: minmax(0, 1fr); } .role { min-height: 0; } .role h3 { margin-top: 18px; } }

/* ---------- Tips / principles ---------- */
.tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tip .num { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.tip h3 { margin-top: 20px; }
@media (max-width: 1024px) { .tips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tips { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Service rows ---------- */
.rows { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.row-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 120px);
    gap: 14px 32px; align-items: start;
    padding-block: 32px;
    border-bottom: 1px solid var(--line);
}
.row-item .num { font-family: var(--mono); color: var(--faint); font-size: 0.85rem; padding-top: 8px; }
.row-item h3 { font-size: var(--step-2); transition: color 0.2s; }
.row-item p { color: var(--muted); }
.row-item ul, .timeline ul { padding: 0; list-style: none; display: grid; gap: 7px; color: var(--muted); }
.row-item ul { margin-top: 14px; font-size: 0.95rem; }
.row-item ul li, .timeline ul li { padding-left: 20px; position: relative; }
.row-item ul li::before, .timeline ul li::before { content: ""; position: absolute; left: 2px; top: 0.75em; width: 8px; height: 1px; background: var(--accent-text); }
.row-item .tags { justify-content: flex-end; padding-top: 8px; }
.row-item:hover h3 { color: var(--accent-text); }
@media (max-width: 900px) {
    .row-item { grid-template-columns: 44px minmax(0, 1fr); }
    .row-item > :nth-child(3), .row-item .tags { grid-column: 2; }
    .row-item .tags { justify-content: flex-start; padding-top: 0; order: -1; grid-row: 1; }
    .row-item .num { grid-row: 1 / span 2; }
}
.legend { margin-top: 20px; }
.outcome {
    margin-top: 18px; padding: 12px 16px;
    border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
    color: var(--ink) !important; font-size: 0.95rem;
    display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline;
}
.outcome span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }

/* ---------- Comparison table ---------- */
.compare { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.compare-row {
    display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 1.2fr);
    border-top: 1px solid var(--line);
}
.compare-row:first-child { border-top: 0; }
.compare-row > span { padding: 18px 24px; min-width: 0; }
.compare-row > span:nth-child(1) { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding-top: 21px; }
.compare-row > span:nth-child(2) { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.compare-row > span:nth-child(3) { color: var(--ink); background: var(--surface-2); font-weight: 500; }
.compare-head > span { font-weight: 600; text-decoration: none !important; color: var(--ink) !important; font-family: var(--sans) !important; font-size: var(--step-0) !important; text-transform: none !important; letter-spacing: -0.01em !important; }
.compare-head > span:nth-child(3) { color: var(--accent-text) !important; }
@media (max-width: 640px) {
    .compare-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .compare-row > span:nth-child(1) { grid-column: 1 / -1; padding-bottom: 0; }
    .compare-head > span:nth-child(1) { display: none; }
    .compare-row > span { padding: 14px 16px; font-size: 0.95rem; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 32px 28px 32px 0; display: grid; gap: 14px; align-content: start; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 28px; }
.stat .big-num span { color: var(--accent-text); }
.stat p:last-child { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 900px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat:nth-child(3) { border-left: 0; padding-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
    .stats { grid-template-columns: minmax(0, 1fr); }
    .stat, .stat + .stat { border-left: 0; padding-left: 0; padding-right: 0; }
    .stat + .stat { border-top: 1px solid var(--line); }
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); min-width: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    list-style: none; cursor: pointer;
    display: flex; justify-content: space-between; gap: 16px; align-items: center;
    padding-block: 22px; font-size: var(--step-1); font-weight: 500; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center; border: 1px solid var(--line-strong);
    font-size: 1.2rem; color: var(--ink); transition: transform 0.25s, background 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.faq summary:hover { color: var(--accent-text); }
.faq details p { color: var(--muted); padding-bottom: 22px; max-width: 62ch; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
    content: counter(step, decimal-leading-zero);
    font-size: var(--step-3); font-weight: 600; letter-spacing: -0.05em; color: var(--accent-text); line-height: 1;
    margin-bottom: 28px;
}
.steps li h3 { font-size: var(--step-1); }
@media (max-width: 1024px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Split / prose ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.prose { display: grid; gap: 1.1em; min-width: 0; max-width: 68ch; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose h2 { font-size: var(--step-2); margin-top: 1.2em; }
.prose h3 { margin-top: 0.6em; }
.prose ul { padding-left: 1.2em; display: grid; gap: 0.4em; }
.prose a:not(.btn) { color: var(--ink); }  /* buttons inside prose keep their own colors */
.sticky-col { position: sticky; top: 110px; }
@media (max-width: 860px) { .sticky-col { position: static; } }

.portrait-frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 5; max-width: 100%; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.timeline > li {
    display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 12px 40px;
    padding-block: 32px; border-bottom: 1px solid var(--line);
}
.timeline .when { font-family: var(--mono); font-size: 0.85rem; color: var(--faint); padding-top: 6px; }
.timeline .current .when { color: var(--accent-text); display: flex; align-items: center; gap: 10px; align-self: start; }
.timeline h3 { font-size: var(--step-2); }
.timeline .org { color: var(--muted); margin-top: 6px; }
.timeline ul { margin-top: 16px; }
@media (max-width: 760px) { .timeline > li { grid-template-columns: minmax(0, 1fr); } }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.92rem; color: var(--ink); background: var(--surface); }

/* ---------- Work cards ---------- */
.work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.work-card { padding: 0; gap: 0; }
.work-card .media {
    aspect-ratio: 16 / 10; max-width: 100%;
    background: var(--surface-2); border-bottom: 1px solid var(--line);
    display: grid; place-items: center; overflow: hidden;
}
.work-card .media img { width: 56%; max-height: 76%; object-fit: contain; border-radius: 12px; transition: transform 0.4s; }
.work-card:hover .media img { transform: scale(1.05); }
.work-card .body { display: flex; flex-direction: column; gap: 12px; padding: 24px; flex: 1; }
.work-card .body h3 { font-size: var(--step-1); }
.work-card .actions { margin-top: auto; padding-top: 8px; }
.meta { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--faint); }
@media (max-width: 1024px) { .work { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .work { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Post list ---------- */
.posts { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.post a {
    display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) 48px; gap: 12px 40px; align-items: start;
    padding-block: 32px; border-bottom: 1px solid var(--line); text-decoration: none;
}
.post .meta { padding-top: 8px; }
.post h3 { font-size: var(--step-2); transition: color 0.2s; }
.post p { color: var(--muted); margin-top: 10px; max-width: 64ch; }
.post .corner { position: static; width: 48px; height: 48px; }
.post a:hover h3 { color: var(--accent-text); }
.post a:hover .corner { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: rotate(45deg); }
@media (max-width: 760px) {
    .post a { grid-template-columns: minmax(0, 1fr) 44px; }
    .post .meta { grid-column: 1 / -1; padding-top: 0; }
    .post .corner { width: 44px; height: 44px; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-list { margin: 0; display: grid; }
.contact-list .row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding-block: 18px; border-top: 1px solid var(--line); }
.contact-list dt { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding-top: 5px; }
.contact-list dd { margin: 0; font-size: var(--step-1); overflow-wrap: anywhere; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--accent-text); }
.mail-big {
    display: inline-block; font-size: var(--step-3); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05;
    text-decoration: none; overflow-wrap: anywhere;
    background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat;
    transition: background-size 0.35s;
    padding-bottom: 4px;
}
.mail-big:hover { background-size: 100% 3px; }
@media (max-width: 560px) { .contact-list .row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* ---------- Article ---------- */
.article-head { padding-block: clamp(36px, 5.5vw, 72px) clamp(20px, 3vw, 32px); }
.article-head h1 { font-size: var(--step-4); max-width: 18ch; margin-top: 18px; }
.article-head .meta { margin-top: 24px; }
.article-body { padding-block: 20px clamp(48px, 6vw, 88px); }
.article-body .prose { margin-inline: auto; font-size: 1.1rem; line-height: 1.75; }
.article-body .prose > p { color: var(--ink); opacity: 0.86; }
blockquote {
    margin: 0.4em 0; padding: 24px 28px;
    border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
}
blockquote p { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.55; color: var(--ink); }
blockquote cite { display: block; margin-top: 12px; font-family: var(--mono); font-size: 0.78rem; font-style: normal; color: var(--faint); }
.callout { padding: 26px 28px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
.callout h3 { margin: 0; }
.callout ul { padding-left: 1.2em; display: grid; gap: 0.4em; }
.callout li { color: var(--muted); }
.sources { font-size: 0.95rem; }

/* ---------- CTA ---------- */
.cta { padding-block: clamp(16px, 3vw, 36px) clamp(48px, 6vw, 88px); }
.cta-card {
    position: relative; overflow: hidden;
    border-radius: calc(var(--radius) + 8px);
    background: var(--accent); color: var(--accent-ink);
    padding: clamp(28px, 4.5vw, 60px);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
}
.cta-card h2 { font-size: var(--step-4); max-width: 12ch; }
.cta-card p { margin-top: 18px; font-size: var(--step-1); max-width: 40ch; opacity: 0.8; }
.cta-card .btn { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); min-height: 60px; padding-inline: 28px; font-weight: 600; position: relative; z-index: 1; }
.cta-card .btn:hover { background: transparent; color: var(--accent-ink); }
.cta-card::after {
    content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
    border: 1px solid rgba(17, 18, 20, 0.18);
    box-shadow: 0 0 0 60px rgba(17, 18, 20, 0.04), 0 0 0 120px rgba(17, 18, 20, 0.03);
    pointer-events: none;
}
@media (max-width: 760px) { .cta-card { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px calc(32px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-top p { color: var(--muted); max-width: 36ch; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-footer nav a:hover { color: var(--ink); }
.wordmark {
    margin-top: 48px;
    font-size: clamp(3rem, 17vw, 12rem); font-weight: 600; letter-spacing: -0.06em; line-height: 0.85;
    color: transparent; -webkit-text-stroke: 1px var(--line-strong);
    white-space: nowrap;
    user-select: none;
}
.footer-base { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--faint); font-size: var(--step--1); }

/* ---------- Reveal on scroll (only after main.js adds .js) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
    .marquee-track { flex-wrap: wrap; width: auto; }
}

@media print {
    body::before, body::after, .site-header, .marquee, .cta, .wordmark { display: none; }
}

/* Citation line under a publication */
.post .cite { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; color: var(--faint); margin-top: 14px; }
.post .cite em { font-style: italic; }
