/* ============================================================================
 * Cynthia Babecka — portfolio styles.
 *
 * Same deep-space palette as the one-page version (near-black navy, one cool
 * accent, one warm one, mono for anything that reads like telemetry), pulled
 * a notch toward professional: real typefaces instead of system fonts,
 * tighter corners, fewer glows, calmer motion. Dark by design, not a dark
 * mode. Fonts are self-hosted (CSP allows font-src 'self' only).
 * ========================================================================== */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/assets/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("/assets/fonts/space-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-display: swap; src: url("/assets/fonts/space-grotesk-600.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("/assets/fonts/space-grotesk-700.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("/assets/fonts/jbmono-400.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/jbmono-500.woff2") format("woff2"); }

:root {
    --bg: #05070d;
    --bg-2: #0a0e19;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-2: rgba(255, 255, 255, 0.055);
    --border: rgba(148, 163, 184, 0.14);
    --border-2: rgba(148, 163, 184, 0.26);
    --text: #eef2f8;
    --text-muted: #a3adc2;
    --text-dim: #7b849c; /* ≥4.5:1 on every surface it sits on */
    --accent: #5cc8ff;
    --accent-hover: #86d7ff;
    --accent-soft: rgba(92, 200, 255, 0.10);
    --accent-line: rgba(92, 200, 255, 0.28);
    --accent-2: #ff8a45;
    --accent-2-soft: rgba(255, 138, 69, 0.12);
    --ok: #4ade80;

    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --display: "Space Grotesk", var(--sans);
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

    --radius: 12px;
    --radius-sm: 8px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1120px;
    --gutter: clamp(1rem, 4vw, 1.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }

img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(92, 200, 255, 0.3); color: #fff; }

.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dim { color: var(--text-dim); }
code {
    font-family: var(--mono); font-size: 0.88em;
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 0.08em 0.35em; border-radius: 4px;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0; color: var(--text); }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.1rem; letter-spacing: -0.01em; }

/* --- Starfield backdrop -----------------------------------------------------
 * Explicit width/height, not inset: a canvas is a replaced element and keeps
 * its intrinsic 300x150 size otherwise. The gradient here is the no-JS /
 * pre-paint fallback; script.js paints its own once it runs. */
#starfield {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1; pointer-events: none;
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(92, 200, 255, 0.08), transparent 60%),
        radial-gradient(700px 500px at 100% 10%, rgba(255, 138, 69, 0.05), transparent 55%),
        var(--bg);
}

/* --- Skip link ------------------------------------------------------------ */
.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 100;
    background: var(--accent); color: var(--bg); font-weight: 600;
    padding: 0.6rem 1rem; border-radius: var(--radius-sm); text-decoration: none;
    transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* --- Top bar ---------------------------------------------------------------*/
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(5, 7, 13, 0.78);
    backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%);
    border-bottom: 1px solid var(--border);
}
.topbar__inner {
    max-width: var(--container); margin: 0 auto;
    padding: 0.85rem var(--gutter);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: baseline; gap: 0.7rem; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand__mark { font-size: 1.05rem; font-weight: 500; letter-spacing: 0.02em; }
.brand__dot { color: var(--accent); }
.brand__name { font-family: var(--display); font-weight: 500; font-size: 0.98rem; color: var(--text-muted); letter-spacing: -0.005em; }
.brand:hover .brand__name { color: var(--text); }

.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav a {
    position: relative; color: var(--text-muted); text-decoration: none;
    font-size: 0.92rem; font-weight: 500; padding: 0.45rem 0.8rem; border-radius: var(--radius-sm);
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]:not(.nav__cta)::after {
    content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: -0.95rem;
    height: 2px; background: var(--accent); border-radius: 2px;
}
.nav .nav__cta {
    margin-left: 0.6rem; color: var(--bg); background: var(--accent); font-weight: 600;
}
.nav .nav__cta:hover, .nav .nav__cta[aria-current="page"] { color: var(--bg); background: var(--accent-hover); }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: 0; cursor: pointer; padding: 0 9px; border-radius: var(--radius-sm); }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s var(--ease), opacity 0.2s var(--ease); }

@media (max-width: 800px) {
    .brand__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* hidden visually, still the link name */
    .nav-toggle { display: flex; }
    .nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #070910; border-bottom: 1px solid var(--border);
        max-height: 0; overflow: hidden; visibility: hidden;
        transition: max-height 0.25s var(--ease), visibility 0s linear 0.25s;
    }
    .nav.is-open { max-height: 380px; visibility: visible; transition: max-height 0.25s var(--ease); }
    .nav a { padding: 0.95rem var(--gutter); border-radius: 0; border-top: 1px solid var(--border); }
    .nav a[aria-current="page"]:not(.nav__cta)::after { left: 0; right: auto; top: 0.8rem; bottom: 0.8rem; width: 2px; height: auto; }
    .nav .nav__cta { margin: 0.9rem var(--gutter) 1.1rem; text-align: center; border-radius: var(--radius-sm); border-top: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --- Layout blocks ---------------------------------------------------------*/
.block { max-width: var(--container); margin: 0 auto; padding: 5.5rem var(--gutter) 0; }
.block--tight { padding-top: 2.5rem; }
.page-head { padding-top: 4.5rem; }
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); }

.kicker {
    display: flex; align-items: center; gap: 0.6rem;
    color: var(--accent); font-size: 0.74rem; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 0.9rem;
}
.kicker__idx { color: var(--text-dim); }
.kicker__idx::after { content: ""; display: inline-block; width: 1.5rem; height: 1px; background: var(--border-2); vertical-align: middle; margin-left: 0.6rem; }

.section-head { margin-bottom: 2.25rem; }
.section-head__lede { color: var(--text-muted); font-size: 1.05rem; max-width: 60ch; margin: 1rem 0 0; }
.section-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.section-row .section-head { margin-bottom: 2.25rem; }
.section-row > .link-arrow, .section-row > .inline-actions { margin-bottom: 2.4rem; }

.link-arrow { font-weight: 500; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }
.more-note { color: var(--text-dim); font-size: 0.92rem; margin: 2rem 0 0; }

/* --- Buttons ---------------------------------------------------------------*/
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.72rem 1.25rem; border-radius: var(--radius-sm);
    font: 600 0.93rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn--primary { background: var(--accent); color: #04121c; }
.btn--primary:hover { background: var(--accent-hover); color: #04121c; transform: translateY(-1px); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); transform: translateY(-1px); }
.btn--text { color: var(--text-muted); padding-left: 0.5rem; padding-right: 0.5rem; }
.btn--text:hover { color: var(--text); }
.btn--block { display: flex; width: 100%; justify-content: space-between; }
.inline-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.inline-actions--center { justify-content: center; }

/* --- Hero ------------------------------------------------------------------*/
.hero {
    max-width: var(--container); margin: 0 auto;
    padding: 5rem var(--gutter) 1rem;
    display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: center;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.1rem); }
.hero__tagline { font-size: clamp(1.1rem, 2.1vw, 1.3rem); color: var(--text); margin: 1.25rem 0 0.5rem; max-width: 40ch; line-height: 1.5; }
.hero__subline { color: var(--text-muted); margin: 0; max-width: 50ch; }
.hero__focus { color: var(--text-muted); font-size: 0.82rem; letter-spacing: 0.04em; margin: 1.1rem 0 0; }
.hero__cta { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin: 2rem 0 2.75rem; }

.status-pill {
    display: inline-flex; align-items: center; gap: 0.6rem;
    margin: 1.4rem 0 0; padding: 0.4rem 0.85rem 0.4rem 0.7rem;
    font-size: 0.86rem; color: var(--text);
    background: rgba(74, 222, 128, 0.07); border: 1px solid rgba(74, 222, 128, 0.25); border-radius: 999px;
}
.status-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18); }
.page-head .status-pill { margin-top: -0.75rem; }
.status-pill--placeholder { background: transparent; border-style: dashed; border-color: var(--border-2); color: var(--text-dim); font-family: var(--mono); font-size: 0.75rem; }

.stat-row { display: flex; flex-wrap: wrap; gap: 1.5rem 2.75rem; margin: 0; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.stat { display: flex; flex-direction: column-reverse; gap: 0.2rem; }
.stat__num { margin: 0; font-size: 1.25rem; font-weight: 500; color: var(--accent-2); }
.stat__label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }

.hero__photo { display: flex; justify-content: center; }
.photo-frame {
    position: relative; width: 100%; max-width: 340px;
    padding: 1px; border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(92, 200, 255, 0.7), rgba(148, 163, 184, 0.15) 45%, rgba(255, 138, 69, 0.6));
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}
.photo-frame img { display: block; width: 100%; height: auto; border-radius: calc(var(--radius) - 1px); background: var(--bg-2); }

@media (max-width: 880px) {
    .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 2.5rem; }
    .hero__photo { order: -1; justify-content: flex-start; }
    .photo-frame { max-width: 200px; }
}

/* --- Home: intro + CTA band -------------------------------------------------*/
.intro { max-width: 760px; }
.intro__lead { font-family: var(--display); font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.45; letter-spacing: -0.015em; color: var(--text); margin: 0 0 1.25rem; }

.cta-band {
    display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
    padding: 2.5rem; border-radius: var(--radius);
    background:
        radial-gradient(600px 200px at 0% 0%, rgba(92, 200, 255, 0.08), transparent 70%),
        var(--surface);
    border: 1px solid var(--border);
}
.cta-band__title { font-size: clamp(1.6rem, 3vw, 2rem); }
.cta-band__text { color: var(--text-muted); margin: 0.6rem 0 0; max-width: 52ch; }
.cta-band__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
@media (max-width: 560px) { .cta-band { padding: 1.75rem 1.4rem; } }

/* --- Cards: shared ---------------------------------------------------------*/
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
@media (max-width: 400px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card, .skill-card, .contact-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.project-card { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.project-card:hover { border-color: var(--accent-line); background: var(--surface-2); transform: translateY(-2px); }
.project-card__media { aspect-ratio: 16 / 9; background: var(--bg-2); border-bottom: 1px solid var(--border); overflow: hidden; }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s var(--ease); }
.project-card:hover .project-card__media img { transform: scale(1.03); }
.project-card__body { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.4rem 1.5rem 1.5rem; flex: 1; }
.project-card__meta { color: var(--text-dim); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; }
.project-card h3 { font-size: 1.2rem; }
/* The title link stretches over the whole card, so the card is one click
 * target but still reads as a single, well-named link to a screen reader. */
.project-card__link { color: var(--text); text-decoration: none; }
.project-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.project-card__link:hover { color: var(--text); }
.project-card__link:focus-visible { outline: none; }
.project-card:has(.project-card__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.project-card__summary { color: var(--text-muted); margin: 0; font-size: 0.95rem; flex-grow: 1; }
.project-card__result { color: var(--accent-2); font-size: 0.85rem; margin: 0; }
.project-card__more { color: var(--accent); font-size: 0.88rem; font-weight: 500; margin-top: 0.35rem; }
.project-card.is-hidden { display: none; }

.skill-card { padding: 1.4rem 1.5rem; }
.skill-card h3 { font-size: 0.98rem; margin-bottom: 0.9rem; }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.tag {
    font-family: var(--mono); font-size: 0.74rem; line-height: 1.4; color: var(--text-muted);
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 0.22rem 0.55rem; border-radius: 5px;
}
.tag--accent { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); font-size: 0.8rem; }

/* --- Placeholders (local preview only — see config.php) --------------------*/
.placeholder {
    border: 1px dashed var(--border-2); border-radius: var(--radius);
    padding: 1.4rem 1.5rem; color: var(--text-dim);
    background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(255, 255, 255, 0.012) 10px 20px);
}
.placeholder--card { min-height: 190px; }
.placeholder--inline { display: inline-block; padding: 0.5rem 0.8rem; font-family: var(--mono); font-size: 0.78rem; border-radius: var(--radius-sm); }
.placeholder__title { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 0.5rem; color: var(--accent-2); }
.placeholder__note { margin: 0; font-size: 0.9rem; }

.empty-state { border: 1px solid var(--border); border-radius: var(--radius); padding: 2.25rem; background: var(--surface); max-width: 640px; }
.empty-state__title { font-family: var(--display); font-size: 1.25rem; font-weight: 600; color: var(--text); margin: 0 0 0.4rem; }
.empty-state p { color: var(--text-muted); margin: 0; }

/* --- Prose (About, project write-ups) ---------------------------------------*/
.prose p, .prose li { color: var(--text-muted); }
.prose p { margin: 0 0 1.15rem; max-width: 66ch; }
.prose__lead { font-size: 1.15rem; color: var(--text) !important; line-height: 1.6; }
.prose strong { color: var(--text); font-weight: 600; }
.prose h2 { font-size: 1.35rem; margin: 2.5rem 0 0.9rem; }
.prose section:first-child h2 { margin-top: 0; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.15rem; max-width: 66ch; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--accent); }

/* --- About ------------------------------------------------------------------*/
.about-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr); gap: 4rem; align-items: start; }
.note-line {
    font-size: 0.93rem; color: var(--text) !important;
    background: var(--surface); border: 1px solid var(--border); border-left: 2px solid var(--accent-2);
    border-radius: var(--radius-sm); padding: 0.8rem 1rem; max-width: none !important;
}
.note-line__k { color: var(--accent-2); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-right: 0.6rem; }

.fact-list { margin: 2rem 0; border-top: 1px solid var(--border); }
.fact-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.fact-list dt { color: var(--text-dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.fact-list dd { margin: 0; color: var(--text); font-weight: 500; text-align: right; }

.about-side { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 6rem; }
.about-photo { margin: 0; }
.about-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border-2); }
.about-photo figcaption { margin-top: 0.65rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }

.field-notes { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.35rem; }
.field-notes__title { color: var(--text-dim); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 0.6rem; }
.field-notes__list { margin: 0; }
.field-notes__list > div { padding: 0.55rem 0; border-top: 1px solid var(--border); }
.field-notes__list > div:first-child { border-top: 0; padding-top: 0; }
.field-notes__list dt { color: var(--text-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.field-notes__list dd { margin: 0; color: var(--text); font-size: 0.92rem; }

@media (max-width: 860px) {
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .about-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
}

/* --- Projects: filter bar ----------------------------------------------------*/
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.filter-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font: 500 0.88rem/1 var(--sans); color: var(--text-muted);
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    padding: 0.55rem 0.95rem; cursor: pointer;
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: var(--border-2); }
.filter-btn[aria-pressed="true"] { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.filter-btn__n { font-size: 0.72rem; color: var(--text-dim); }

/* --- Project detail ----------------------------------------------------------*/
.breadcrumb { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 1.75rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.project__head h1 { max-width: 20ch; }
.project__summary { font-size: 1.2rem; color: var(--text-muted); max-width: 60ch; margin: 1.1rem 0 0; line-height: 1.55; }
.project__cover { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); }
.project__cover img { display: block; width: 100%; height: auto; }
.project__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 4rem; align-items: start; }
.project__side { position: sticky; top: 6rem; display: flex; flex-direction: column; gap: 1.5rem; }
@media (max-width: 900px) {
    .project__layout { grid-template-columns: 1fr; gap: 2.5rem; }
    .project__side { position: static; order: -1; }
}

.spec-list { margin: 0; border-top: 1px solid var(--border); }
.spec-list > div { padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
.spec-list dt { font-family: var(--mono); color: var(--text-dim); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.3rem; }
.spec-list dd { margin: 0; color: var(--text); font-size: 0.95rem; }
.spec-list .tag-list { margin-top: 0.2rem; }

.highlights { background: var(--surface); border: 1px solid var(--border); border-left: 2px solid var(--accent-2); border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; }
.highlights__title { color: var(--accent-2); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 0.6rem; }
.highlights ul { margin: 0; padding-left: 1.1rem; }
.highlights li { color: var(--text); font-size: 0.93rem; margin-bottom: 0.4rem; }
.highlights li::marker { color: var(--accent-2); }
.link-stack { display: flex; flex-direction: column; gap: 0.6rem; }

.project__video { margin: 0 0 2rem; }
.project__video video { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); }
.project__video figcaption { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.5rem; }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.gallery figcaption { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.5rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-top: 4rem; }
.pager__link {
    display: flex; flex-direction: column; gap: 0.3rem; padding: 1.2rem 1.4rem;
    border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.pager__link:hover { border-color: var(--accent-line); background: var(--surface); }
.pager__link--next { text-align: right; grid-column: 2; }
.pager__dir { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }
.pager__title { color: var(--text); font-family: var(--display); font-weight: 500; }

/* --- Résumé -------------------------------------------------------------------*/
.resume-contact { color: var(--text-muted); font-size: 0.82rem; margin: -0.75rem 0 0; }
.resume-contact a { color: var(--text-muted); }
.resume-contact a:hover { color: var(--accent); }
.resume { display: flex; flex-direction: column; }
.resume__section { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--border); }
.resume__h { font-family: var(--mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); padding-top: 0.25rem; }
.resume__summary { color: var(--text); font-size: 1.05rem; margin: 0; max-width: 66ch; }
.entry + .entry { margin-top: 1.75rem; }
.entry__top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.25rem 1.5rem; flex-wrap: wrap; }
.entry h3 { font-size: 1.08rem; }
.entry h3 a { color: var(--text); text-decoration: none; }
.entry h3 a:hover { color: var(--accent); }
.entry__org { color: var(--text-muted); font-weight: 500; }
.entry__when { color: var(--text-dim); font-size: 0.8rem; margin: 0; white-space: nowrap; }
.entry__where, .entry__summary { color: var(--text-muted); margin: 0.2rem 0 0; font-size: 0.95rem; }
.entry ul { margin: 0.6rem 0 0; padding-left: 1.15rem; }
.entry li { color: var(--text-muted); margin-bottom: 0.3rem; max-width: 72ch; }
.entry li::marker { color: var(--text-dim); }
.coursework { color: var(--text-muted); margin: 1.25rem 0 0; font-size: 0.95rem; }
.coursework__k { color: var(--text); font-weight: 500; }
.skill-rows { margin: 0; }
.skill-rows > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 1rem; padding: 0.35rem 0; }
.skill-rows dt { color: var(--text); font-weight: 500; }
.skill-rows dd { margin: 0; color: var(--text-muted); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { color: var(--text-muted); padding: 0.3rem 0; }
.plain-list strong { color: var(--text); font-weight: 500; }
@media (max-width: 720px) {
    .resume__section { grid-template-columns: 1fr; gap: 1rem; }
    .skill-rows > div { grid-template-columns: 1fr; gap: 0; padding: 0.5rem 0; }
}

/* --- Contact ------------------------------------------------------------------*/
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.contact-card { position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding: 1.4rem 1.5rem; text-decoration: none; color: var(--text); }
.contact-card:hover { border-color: var(--accent-line); background: var(--surface-2); color: var(--text); transform: translateY(-2px); }
.contact-card__label { color: var(--text-dim); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; }
.contact-card__value { font-weight: 600; word-break: break-word; }
.contact-card__arrow { position: absolute; top: 1.2rem; right: 1.3rem; color: var(--text-dim); transition: color 0.2s var(--ease), transform 0.2s var(--ease); }
.contact-card:hover .contact-card__arrow { color: var(--accent); transform: translate(2px, -2px); }
.copy-row { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.copy-row__status { color: var(--ok); font-size: 0.8rem; }

/* --- 404 ------------------------------------------------------------------------*/
.err-page {
    min-height: 70vh; max-width: var(--container); margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 4rem var(--gutter) 2rem;
}
.err-page .kicker { justify-content: center; margin-bottom: 0.25rem; }
.err-code {
    font-weight: 500; line-height: 1; margin: 0.5rem 0 1rem;
    font-size: clamp(4.5rem, 16vw, 7.5rem); letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.err-tag { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.err-line { color: var(--text-muted); max-width: 46ch; margin: 0.75rem 0 2rem; }

/* --- Footer ------------------------------------------------------------------*/
.footer { margin-top: 6rem; border-top: 1px solid var(--border); background: rgba(5, 7, 13, 0.6); }
.footer__inner, .footer__base { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-top: 2.25rem; padding-bottom: 1.5rem; }
.footer__name { font-family: var(--display); font-weight: 600; margin: 0; }
.footer__meta { color: var(--text-dim); font-size: 0.88rem; margin: 0.15rem 0 0; }
.footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__links a { color: var(--text-muted); text-decoration: none; font-size: 0.92rem; }
.footer__links a:hover { color: var(--accent); }
.footer__base {
    display: flex; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap;
    padding-top: 1.25rem; padding-bottom: 2rem; border-top: 1px solid var(--border);
    color: var(--text-dim); font-size: 0.8rem;
}
.footer__base p { margin: 0; }
.footer__clock { letter-spacing: 0.06em; }

/* --- Reveal-on-scroll (cards only; see script.js) -----------------------------*/
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .project-card, .contact-card, .btn { transition: none; }
    .project-card:hover, .contact-card:hover, .btn:hover { transform: none; }
}

/* --- Print (mainly for /resume/) -------------------------------------------------
 * Plain black on white, no chrome — someone printing the résumé page should
 * get something that looks like a résumé. */
@media print {
    :root { --text: #111; --text-muted: #333; --text-dim: #555; --accent: #0b5d8a; --border: #ccc; --surface: transparent; }
    body { background: #fff; color: #111; font-size: 10.5pt; }
    #starfield, .topbar, .footer, .skip-link, .no-print, .placeholder, .btn { display: none !important; }
    .block, .page-head, .block--tight { padding: 0; max-width: none; }
    .page-head { margin-bottom: 0.6rem; }
    .page-head h1 { font-size: 22pt; }
    .kicker { display: none; }
    .section-head { margin-bottom: 0.4rem; }
    .resume-contact { margin: 0; }
    .resume__section { grid-template-columns: 1.3in 1fr; gap: 0.2in; padding: 0.12in 0; break-inside: avoid; }
    a { color: inherit; text-decoration: none; }
    .reveal { opacity: 1 !important; transform: none !important; }
}
