/*
 * xray — Amal Graafstra promo theme.
 * Direction: "X-ray heritage, modernized." Space-black lightbox, electric-blue
 * duotone radiograph hero, DICOM-style mono annotation system, year-railed
 * timeline. Dark-only. No frameworks.
 */

/* ---------------------------------------------------------------- fonts */

@font-face {
    font-family: "Archivo";
    src: url("../fonts/archivo-vf.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("../fonts/jetbrains-mono-vf.woff2") format("woff2-variations");
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* ---------------------------------------------------------------- tokens */

:root {
    --xray-bg: #05070b;
    --xray-panel: #0f172a;
    --xray-border: #1e293b;
    --xray-accent: #38bdf8;
    --xray-accent-soft: #7dd3fc;
    --xray-text: #e2e8f0;
    --xray-muted: #94a3b8;
    --xray-dim: #7c8ba2;          /* fine print / inactive rail — still AA on bg */
    --xray-bright: #f1f5f9;

    /* section hues (from the approved mockup's card tints) */
    --hue-press: #c4b5fd;
    --hue-pubs: #fcd34d;
    --hue-miles: #6ee7b7;

    --font-display: "Archivo", "Segoe UI", system-ui, sans-serif;
    --font-body: "Archivo", -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", Consolas, "Cascadia Code", "SF Mono", Menlo, monospace;

    --edge-glow: rgba(56, 189, 248, .15);   /* header/footer rules */
    --wrap-max: 1140px;
    --measure-max: 760px;
}

/* ---------------------------------------------------------------- base */

* { box-sizing: border-box; }

html {
    background: var(--xray-bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--xray-bg);
    color: var(--xray-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* faint full-page scanlines — single fixed pseudo-element, cheap to paint */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2147483000;
    background: repeating-linear-gradient(
        0deg,
        rgba(226, 232, 240, .022) 0 1px,
        transparent 1px 3px
    );
}

::selection {
    background: rgba(56, 189, 248, .35);
    color: var(--xray-bright);
}

a { color: var(--xray-accent); }
a:hover { color: var(--xray-accent-soft); }

:focus-visible {
    outline: 2px solid var(--xray-accent-soft);
    outline-offset: 2px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    z-index: 2147483001;
    background: var(--xray-accent);
    color: #03121c;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
}
.skip-link:focus-visible { left: 8px; color: #03121c; }

.site-wrapper {
    max-width: var(--wrap-max);
    margin: 0 auto;
    padding: 0 24px;
}

.accent { color: var(--xray-accent); }

/* mono section label — the DICOM annotation voice */
.kicker {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--xray-muted);
}

/* ---------------------------------------------------------------- header */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--edge-glow);
}

.site-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 17px;
    letter-spacing: .5px;
    color: var(--xray-text);
    text-decoration: none;
}
.site-brand span { color: var(--xray-accent); }
.site-brand:hover { color: var(--xray-bright); }

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 26px;
}

.site-nav a {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--xray-muted);
    padding: 4px 0;
}
.site-nav a:hover { color: var(--xray-accent-soft); }
.site-nav a[aria-current="page"] {
    color: var(--xray-accent);
    text-shadow: 0 0 12px rgba(56, 189, 248, .55);
}

/* ---------------------------------------------------------------- chips */

.chip {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}

.chip-year {
    background: rgba(56, 189, 248, .12);
    border: 1px solid rgba(56, 189, 248, .4);
    color: var(--xray-accent-soft);
}

.chip-tag {
    border: 1px solid rgba(56, 189, 248, .35);
    background: rgba(56, 189, 248, .07);
    color: var(--xray-accent-soft);
}

/* section hue coding — structure, not decoration */
.tag-press .chip-tag {
    border-color: rgba(196, 181, 253, .32);
    background: rgba(196, 181, 253, .07);
    color: var(--hue-press);
}
.tag-publications .chip-tag {
    border-color: rgba(252, 211, 77, .3);
    background: rgba(252, 211, 77, .06);
    color: var(--hue-pubs);
}
.tag-milestones .chip-tag {
    border-color: rgba(110, 231, 183, .3);
    background: rgba(110, 231, 183, .06);
    color: var(--hue-miles);
}

a.chip-tag:hover { filter: brightness(1.2); }

/* ---------------------------------------------------------------- hero */

.hero {
    background:
        radial-gradient(ellipse 65% 85% at 72% 30%, rgba(56, 189, 248, .13), transparent 65%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    gap: 56px;
    align-items: center;
    padding: 72px 0 60px;
}

.hero-kicker {
    margin: 0 0 16px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--xray-accent);
}

.hero-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.3rem, 4.6vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -.02em;
    color: var(--xray-bright);
}

.hero-cred {
    margin: 20px 0 0;
    max-width: 48ch;
    color: var(--xray-muted);
    font-size: 1.02rem;
}
.hero-cred em { font-style: italic; color: var(--xray-text); }

/* book title link — inherits the credential line, subtle accent underline */
.hero-book {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(56, 189, 248, .45);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.hero-book:hover {
    color: var(--xray-bright);
    text-decoration-color: var(--xray-accent);
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 6px;
    transition: background-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.btn-solid {
    background: var(--xray-accent);
    color: #03121c;
}
.btn-solid:hover {
    background: var(--xray-accent-soft);
    color: #03121c;
    box-shadow: 0 0 24px rgba(56, 189, 248, .4);
}

.btn-ghost {
    border: 1px solid rgba(56, 189, 248, .5);
    color: var(--xray-accent-soft);
}
.btn-ghost:hover {
    background: rgba(56, 189, 248, .1);
    color: var(--xray-accent-soft);
}

/* the radiograph lightbox — signature element */

.hero-art {
    position: relative;
    margin: 0;
    border: 1px solid rgba(56, 189, 248, .35);
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow:
        inset 0 0 48px rgba(56, 189, 248, .12),
        0 0 64px rgba(56, 189, 248, .09);
}

.hero-art img {
    display: block;
    width: 100%;
    height: auto;
    /* duotone the grayscale film toward electric blue */
    filter: grayscale(1) sepia(1) hue-rotate(175deg) saturate(2.4) brightness(1.02) contrast(1.05);
}

/* film grain + vignette + fine scanlines over the radiograph */
.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 55%, rgba(5, 7, 11, .55)),
        repeating-linear-gradient(0deg, rgba(5, 7, 11, .18) 0 1px, transparent 1px 3px);
}

/* one-time scan sweep on load */
.hero-scan {
    position: absolute;
    left: 0;
    right: 0;
    top: -12%;
    height: 26px;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(125, 211, 252, .38), transparent);
    animation: hero-scan 2.8s ease-in-out .5s 1 forwards;
}

@keyframes hero-scan {
    0%   { top: -12%; opacity: 0; }
    10%  { opacity: 1; }
    85%  { opacity: .85; }
    100% { top: 108%; opacity: 0; }
}

/* implant reticles — positioned on the two glass capsules */
.reticle {
    position: absolute;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 1px solid rgba(125, 211, 252, .75);
    border-radius: 50%;
    pointer-events: none;
    box-shadow:
        0 0 14px rgba(56, 189, 248, .45),
        inset 0 0 10px rgba(56, 189, 248, .25),
        0 0 0 6px rgba(56, 189, 248, .1);
    animation: reticle-pulse 4s ease-in-out infinite;
}
.reticle-l { left: 29.4%; top: 61%; }
.reticle-r { left: 69.6%; top: 62.5%; }

@keyframes reticle-pulse {
    0%, 100% { opacity: .5; }
    50%      { opacity: .95; }
}

/* DICOM-style corner annotations */
.film-note {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.5px;
    line-height: 1.7;
    color: rgba(125, 211, 252, .72);
    text-shadow: 0 0 6px rgba(5, 7, 11, .9);
    background: rgba(5, 7, 11, .45);
    padding: 3px 7px;
    border-radius: 3px;
    pointer-events: none;
}
.film-tl { top: 10px; left: 14px; }
.film-bl { bottom: 10px; left: 14px; }

/* ---------------------------------------------------------------- featured grid */

.sig { margin: 26px 0 8px; }

.sig-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

/* ---------------------------------------------------------------- cards */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--xray-border);
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(15, 23, 42, .9), rgba(15, 23, 42, .45));
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.card:hover {
    border-color: rgba(56, 189, 248, .45);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(56, 189, 248, .1);
}

.card-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.04rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.card-title a {
    color: var(--xray-text);
    text-decoration: none;
}
.card-title a:hover { color: var(--xray-bright); }

/* stretched link — whole card clickable */
.card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.card-excerpt {
    margin: 0;
    color: var(--xray-muted);
    font-size: .88rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-go {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--xray-accent);
}

/* featured variant — section-tinted film panels (mockup tints) */
.card-featured { padding: 20px; }
.card-featured.tag-speaking {
    background: linear-gradient(160deg, rgba(12, 74, 110, .38), rgba(15, 23, 42, .5));
}
.card-featured.tag-press {
    background: linear-gradient(160deg, rgba(76, 29, 149, .3), rgba(15, 23, 42, .5));
}
.card-featured.tag-publications {
    background: linear-gradient(160deg, rgba(113, 81, 6, .32), rgba(15, 23, 42, .5));
}
.card-featured.tag-milestones {
    background: linear-gradient(160deg, rgba(6, 95, 70, .32), rgba(15, 23, 42, .5));
}

/* ---------------------------------------------------------------- timeline */

.timeline { margin: 48px 0 72px; }

.tl-layout {
    display: grid;
    grid-template-columns: 72px 2px minmax(0, 1fr);
    gap: 0 20px;
    margin-top: 16px;
}

.tl-rail {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    scrollbar-width: none;
}
.tl-rail::-webkit-scrollbar { display: none; }
.tl-rail:empty { visibility: hidden; }

.rail-link {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--xray-dim);
    text-decoration: none;
    padding: 3px 7px;
    border: 1px solid transparent;
    border-radius: 4px;
    line-height: 1.2;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.rail-link:hover { color: var(--xray-accent-soft); }
.rail-link.is-active {
    background: rgba(56, 189, 248, .15);
    border-color: rgba(56, 189, 248, .4);
    color: var(--xray-accent-soft);
    text-shadow: 0 0 10px rgba(56, 189, 248, .5);
}

.tl-line {
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(var(--xray-accent), rgba(56, 189, 248, .06));
}

.tl-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.tl-year {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 4px;
    scroll-margin-top: 20px;
}
.tl-year:first-child { margin-top: 2px; }
.tl-year::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--xray-border);
}

.tl-year-chip {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 4px;
    background: rgba(56, 189, 248, .14);
    border: 1px solid rgba(56, 189, 248, .4);
    color: var(--xray-accent-soft);
}

.tl-row {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 13px 16px;
    border: 1px solid var(--xray-border);
    border-radius: 8px;
    background: rgba(15, 23, 42, .35);
    transition: border-color .15s ease, background-color .15s ease;
}
.tl-row:hover {
    border-color: rgba(56, 189, 248, .4);
    background: rgba(15, 23, 42, .7);
}

.tl-date {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .5px;
    color: var(--xray-dim);
    padding-top: 3px;
    white-space: nowrap;
}

.tl-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: .98rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.005em;
}
.tl-title a {
    color: var(--xray-text);
    text-decoration: none;
}
.tl-title a:hover { color: var(--xray-bright); }
.tl-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.tl-excerpt {
    margin: 4px 0 0;
    color: var(--xray-muted);
    font-size: .85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tl-side {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 2px;
}

.tl-go {
    color: var(--xray-accent);
    font-size: 12px;
    line-height: 1;
}

/* ---------------------------------------------------------------- section listings */

.section-header { margin: 52px 0 6px; }

.section-title {
    margin: 10px 0 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.8rem, 3.6vw, 2.4rem);
    letter-spacing: -.015em;
    line-height: 1.1;
    color: var(--xray-bright);
    text-transform: capitalize;
}

.section-desc {
    margin: 12px 0 0;
    max-width: 60ch;
    color: var(--xray-muted);
}

.section-count {
    margin: 12px 0 22px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--xray-dim);
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 64px;
}

/* list mode — cards become horizontal index rows */
.card-list .card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    gap: 6px 18px;
    align-items: start;
    padding: 14px 18px;
}
.card-list .card:hover { transform: none; }
.card-list .card-top {
    grid-row: 1 / span 2;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.card-list .card-title { grid-column: 2; }
.card-list .card-excerpt { grid-column: 2; }
.card-list .card-go {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    margin-top: 0;
}

/* ---------------------------------------------------------------- pagination */

.pagination {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 0 0 64px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.pagination a { color: var(--xray-accent-soft); text-decoration: none; }
.pagination a:hover { color: var(--xray-accent); }
.page-number { color: var(--xray-dim); }

/* ---------------------------------------------------------------- post page */

.post-article {
    max-width: var(--measure-max);
    margin: 0 auto;
    padding: 52px 0 8px;
}

.post-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-title {
    margin: 16px 0 12px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.9rem, 4.4vw, 2.7rem);
    line-height: 1.12;
    letter-spacing: -.018em;
    color: var(--xray-bright);
}

.post-dateline {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--xray-muted);
}

.post-feature {
    margin: 28px auto 0;
    max-width: 400px;
}
.post-feature img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--xray-border);
    box-shadow: 0 8px 28px rgba(56, 189, 248, .12);
}

.post-content {
    margin-top: 30px;
    font-size: 1.05rem;
}

.post-content p { margin: 1.15em 0; }

.post-content a { color: var(--xray-accent); }
.post-content a:hover { color: var(--xray-accent-soft); }

.post-content h2 {
    margin: 2em 0 .6em;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -.01em;
    color: var(--xray-bright);
}

/* content h3s speak the mono annotation voice */
.post-content h3 {
    margin: 2.2em 0 .8em;
    font-family: var(--font-mono);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--xray-accent-soft);
}

.post-content ul,
.post-content ol { margin: 1.15em 0; padding-left: 1.4em; }
.post-content li { margin: .4em 0; }

.post-content blockquote {
    margin: 1.5em 0;
    padding: .2em 0 .2em 18px;
    border-left: 2px solid rgba(56, 189, 248, .5);
    color: var(--xray-muted);
}

.post-content hr {
    border: none;
    height: 1px;
    background: var(--xray-border);
    margin: 2.5em 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* video embeds — Ghost renders them as .kg-embed-card (pt-embed kept as fallback) */
.kg-embed-card,
.pt-embed {
    margin: 1.8em 0;
}
.kg-embed-card iframe,
.pt-embed iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--xray-border);
    border-radius: 10px;
    background: #000;
}
.kg-embed-card figcaption,
.pt-embed figcaption,
.post-content figcaption {
    margin-top: 9px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .5px;
    line-height: 1.6;
    color: var(--xray-muted);
}

.kg-image-card { margin: 1.8em 0; }
.kg-image-card img {
    display: block;
    width: 100%;
    border: 1px solid var(--xray-border);
}

.kg-card figcaption a { color: var(--xray-accent); }

/* Koenig wide/full cards */
.kg-width-wide { max-width: var(--wrap-max); width: 100%; }
.kg-width-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* prev/next within the timeline */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 40px 0 24px;
}

.post-nav-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--xray-border);
    border-radius: 8px;
    background: rgba(15, 23, 42, .35);
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.post-nav-card:hover {
    border-color: rgba(56, 189, 248, .4);
    background: rgba(15, 23, 42, .7);
}
.post-nav-prev { grid-column: 1; }
.post-nav-next { grid-column: 2; text-align: right; }

.post-nav-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--xray-dim);
}
.post-nav-title {
    font-family: var(--font-display);
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--xray-text);
}
.post-nav-card:hover .post-nav-title { color: var(--xray-bright); }
.post-nav-date {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--xray-dim);
}

/* about page */
.page-article { padding-bottom: 40px; }

/* ---------------------------------------------------------------- footer */

.site-footer {
    border-top: 1px solid var(--edge-glow);
    margin-top: 24px;
    padding: 24px 0 28px;
}

/* one row — tagline left, company chips right */
.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 48px;
}

.footer-tagline {
    color: var(--xray-muted);
    font-size: .86rem;
}

/* company chips — bordered pills, visually separated */
.footer-companies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-company {
    font-size: 11px;
    padding: 8px 13px;
    border: 1px solid rgba(56, 189, 248, .35);
    background: rgba(56, 189, 248, .07);
    color: var(--xray-accent-soft);
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.chip-company:hover {
    border-color: rgba(56, 189, 248, .65);
    background: rgba(56, 189, 248, .13);
    color: var(--xray-accent);
}

/* ---------------------------------------------------------------- contact page */

.contact-page {
    max-width: 640px;
    margin: 0 auto;
    padding-bottom: 72px;
}
.contact-page .section-title { text-transform: none; }

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 26px;
}
.cf-half { grid-column: span 1; }
.cf-full { grid-column: 1 / -1; }

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--xray-text);
    background: rgba(15, 23, 42, .55);
    border: 1px solid var(--xray-border);
    border-radius: 6px;
    padding: 10px 12px;
    transition: border-color .15s ease;
}
.contact-form ::placeholder { color: var(--xray-dim); opacity: 1; }
.cf-thanks {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--xray-text);
    font-size: 1.05rem;
    letter-spacing: .02em;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(56, 189, 248, .6);
}
.contact-form textarea { resize: vertical; min-height: 96px; }

.contact-form .btn {
    border: 0;
    cursor: pointer;
    justify-self: start;
}
.contact-form .btn:disabled {
    opacity: .55;
    cursor: default;
    box-shadow: none;
}

/* honeypot — visually removed, still in the DOM for bots */
.cf-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cf-status {
    margin: 0;
    grid-column: 1 / -1;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .5px;
}
.cf-status:empty { display: none; }
.cf-status.is-ok { color: var(--hue-miles); }
.cf-status.is-err { color: #fca5a5; }

.footer-copy {
    margin: 24px 0 0;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 1px;
    color: var(--xray-dim);
}

/* visually hidden (labels) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
    .hero-inner {
        gap: 36px;
        padding: 56px 0 48px;
    }
    .sig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .site-header { padding: 16px 0; }
    .site-nav { gap: 4px 18px; }
    .site-nav a { letter-spacing: 2px; }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 34px;
        padding: 40px 0 40px;
    }
    .hero-cred { font-size: .96rem; }

    .sig-grid { grid-template-columns: 1fr; }

    /* year rail becomes a sticky horizontal strip */
    .tl-layout {
        display: block;
    }
    .tl-line { display: none; }
    .tl-rail {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        top: 0;
        z-index: 40;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        margin: 0 -24px 14px;
        padding: 10px 24px;
        background: rgba(5, 7, 11, .92);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        border-bottom: 1px solid var(--xray-border);
    }
    .tl-year { scroll-margin-top: 58px; }

    .tl-row {
        display: block;
        padding: 12px 14px;
    }
    .tl-date {
        display: inline-block;
        padding-top: 0;
        margin-bottom: 5px;
    }
    .tl-side {
        margin-top: 9px;
        padding-top: 0;
        justify-content: space-between;
    }

    .card-list .card {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .card-list .card-top { flex-direction: row; }

    .post-feature { max-width: 85%; }

    .post-nav { grid-template-columns: 1fr; }
    .post-nav-prev,
    .post-nav-next { grid-column: auto; text-align: left; }

    /* tagline above, chips wrap below */
    .footer-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .contact-form { grid-template-columns: 1fr; }
    .cf-half { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .hero-scan { display: none; }
    .reticle { opacity: .6; }
    .card:hover { transform: none; }
}
