/* ============================================================
   Pythonic — Observatory Log
   A dark, cinematic editorial aesthetic. Warm cream type on
   near-black indigo. Italic display serif, mono callsigns,
   numbered entries, signal-trace motifs.
   ============================================================ */

:root {
    /* --- ink (dark surfaces) ------------------------------ */
    --ink-0: #060912;          /* deepest — body */
    --ink-1: #0b1020;          /* lifted panel */
    --ink-2: #131a2f;          /* rule cells */

    /* --- paper (cream ink on dark) ------------------------ */
    --paper: #ece3cf;
    --paper-80: rgba(236, 227, 207, 0.82);
    --paper-60: rgba(236, 227, 207, 0.62);
    --paper-40: rgba(236, 227, 207, 0.42);
    --paper-22: rgba(236, 227, 207, 0.22);
    --paper-12: rgba(236, 227, 207, 0.12);
    --paper-06: rgba(236, 227, 207, 0.06);

    /* --- signal accents ----------------------------------- */
    --signal: #ff7a3a;         /* hot amber — primary accent */
    --signal-hi: #ffa366;
    --cool: #71c7c4;           /* cool data tone — sparing */

    /* --- bauhaus palette ---------------------------------- */
    --bh-ochre: #e3a33b;       /* warm yellow disc */
    --bh-red:   #cc4737;       /* brick red */
    --bh-teal:  #2f7e76;       /* logo teal */
    --bh-navy:  #1a2540;       /* logo navy */
    --bh-paper: #ede3ca;

    /* --- fonts -------------------------------------------- */
    --font-display: 'Instrument Serif', 'Iowan Old Style', 'Apple Garamond', 'EB Garamond', Georgia, serif;
    --font-geo:     'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif;
    --font-body:    'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* --- geometry ----------------------------------------- */
    --page-max: 1160px;
    --content-max: 680px;
    --nav-h: 62px;
    --gutter: clamp(1.25rem, 3vw, 2.25rem);

    /* --- motion ------------------------------------------- */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding-top: var(--nav-h);
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    font-feature-settings: "ss01", "cv11";
    color: var(--paper-80);
    background-color: var(--ink-0);
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -10%, rgba(255, 122, 58, 0.07), transparent 55%),
        radial-gradient(ellipse 60% 40% at 88% 12%, rgba(113, 199, 196, 0.05), transparent 60%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.92  0 0 0 0 0.88  0 0 0 0 0.8  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-repeat: no-repeat, no-repeat, repeat;
    background-size: 100% 900px, 900px 600px, 240px 240px;
    background-attachment: fixed, fixed, fixed;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--signal);
    color: var(--ink-0);
}

/* ---------- typography ---------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-geo);
    font-weight: 500;
    line-height: 1.05;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--paper);
}

h1 { font-size: clamp(3rem, 8vw, 6.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); font-weight: 400; }

p { margin: 0 0 1.1rem; }

strong { font-weight: 500; color: var(--paper); }
em { font-style: italic; }

a {
    color: var(--paper);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    text-decoration-color: var(--paper-22);
    transition: text-decoration-color 0.25s var(--ease), color 0.25s var(--ease);
}
a:hover {
    color: var(--signal-hi);
    text-decoration-color: var(--signal);
}

hr {
    border: 0;
    height: 1px;
    background: var(--paper-12);
    margin: 3rem 0;
}

/* ---------- mono callsign / eyebrow --------------------- */

.eyebrow,
.callsign {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--paper-60);
}
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 1px;
    background: var(--signal);
}
.callsign .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 8px rgba(255, 122, 58, 0.8);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

/* ---------- nav ----------------------------------------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 var(--gutter);
    background: rgba(200, 190, 160, 0.85);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--paper-12);
}

.nav::after {
    /* thin signal trace running along the bottom of the nav */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        transparent 40%,
        var(--signal) 50%,
        transparent 60%,
        transparent 100%);
    background-size: 300% 100%;
    opacity: 0.7;
    animation: trace 7s linear infinite;
    pointer-events: none;
}

@keyframes trace {
    0% { background-position: -50% 0; }
    100% { background-position: 150% 0; }
}

.nav-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--paper);
    flex-shrink: 0;
}
.nav-brand:hover { color: var(--paper); text-decoration: none; }
.nav-brand .brand-mark {
    font-family: var(--font-geo);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.015em;
}
.nav-brand .brand-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper-60);
}

.nav-menu {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    margin-left: 2rem;
    gap: 2rem;
}

.nav-links,
.nav-social {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.6rem;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-60);
    text-decoration: none;
    padding: 0.4rem 0;
    position: relative;
    transition: color 0.25s var(--ease);
}
.nav-links a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.2rem;
    height: 1px;
    width: 0;
    background: var(--signal);
    transition: width 0.3s var(--ease);
}
.nav-links a:hover {
    color: var(--paper);
}
.nav-links a:hover::before { width: 100%; }

.nav-social { gap: 1rem; }
.nav-social a {
    display: block;
    opacity: 0.78;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    padding: 0.25rem;
    text-decoration: none;
}
.nav-social a:hover {
    opacity: 1;
    transform: translateY(-1px);
}
.nav-social img {
    display: block;
    width: 20px;
    height: 20px;
    filter: invert(1) brightness(1.15);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--paper-22);
    width: 40px;
    height: 32px;
    padding: 0;
    cursor: pointer;
    margin-left: auto;
    position: relative;
    transition: border-color 0.25s var(--ease);
}
.nav-toggle:hover { border-color: var(--paper-40); }
.nav-toggle span {
    display: block;
    height: 1px;
    width: 16px;
    background: var(--paper);
    margin: 3.5px auto;
}

@media (max-width: 820px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem var(--gutter) 2rem;
        background: rgba(200, 190, 160, 0.85);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--paper-12);
        display: none;
        margin-left: 0;
    }
    .nav-menu.open { display: flex; }
    .nav-links, .nav-social {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0.85rem;
    }
    .nav-social { flex-direction: row; flex-wrap: wrap; gap: 0.8rem; }
    .nav-links a { font-size: 0.85rem; }
}

/* ---------- layout -------------------------------------- */

.container {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    width: 100%;
}

.col-content {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

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

.hero {
    position: relative;
    padding: clamp(3rem, 10vh, 6rem) var(--gutter) clamp(3rem, 8vh, 5rem);
    overflow: hidden;
}

.hero-grid {
    position: relative;
    max-width: var(--page-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.hero-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-60);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--paper-12);
}
.hero-meta-top .left,
.hero-meta-top .right {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.hero-meta-top .sep {
    width: 18px;
    height: 1px;
    background: var(--paper-22);
    display: inline-block;
}

.hero-headline {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2.8rem, 9vw, 7rem);
    line-height: 0.94;
    letter-spacing: -0.025em;
    color: var(--paper);
    max-width: 18ch;
    margin: clamp(1.5rem, 5vh, 3rem) 0 0;
}
.hero-headline .accent {
    color: var(--signal);
    font-style: italic;
}
.hero-headline .amp {
    display: inline-block;
    transform: translateY(0.05em) rotate(-3deg);
    color: var(--paper-60);
    font-style: italic;
    padding: 0 0.06em;
}

.hero-sub {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: clamp(2.5rem, 7vh, 4rem);
    padding-top: 2rem;
    border-top: 1px solid var(--paper-12);
}

@media (min-width: 760px) {
    .hero-sub {
        grid-template-columns: 1fr 1.4fr;
        gap: clamp(2rem, 6vw, 5rem);
    }
}

.hero-sub-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-60);
    padding-top: 0.25rem;
}
.hero-sub-label .num {
    color: var(--signal);
    margin-right: 0.6rem;
}

.hero-sub-body {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.4;
    color: var(--paper);
    margin: 0;
    max-width: 48ch;
}
.hero-sub-body a {
    color: var(--paper);
    text-decoration-color: var(--signal);
    text-decoration-thickness: 1.5px;
}
.hero-sub-body a:hover {
    color: var(--signal-hi);
}

/* signal trace svg at top of hero */
.hero-trace {
    position: absolute;
    top: 22%;
    left: -6%;
    right: -6%;
    height: 40px;
    pointer-events: none;
    opacity: 0.28;
    z-index: 0;
}
.hero-trace svg { width: 100%; height: 100%; display: block; }
.hero-trace path {
    stroke: var(--signal);
    stroke-width: 1;
    fill: none;
    stroke-linecap: round;
    animation: drift 14s ease-in-out infinite;
    transform-origin: center;
}
@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0) scaleY(1); }
    50% { transform: translate3d(-12px, -4px, 0) scaleY(1.3); }
}

/* ---------- intro (home) -------------------------------- */

.intro {
    position: relative;
    max-width: 920px;
    margin: clamp(3rem, 10vh, 7rem) auto;
    padding: 0 var(--gutter);
}

.intro-lede {
    font-family: var(--font-geo);
    font-size: clamp(1.45rem, 2.6vw, 1.95rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--paper);
    margin: 0 0 2.5rem;
    max-width: 22ch;
}
.intro-lede::before {
    content: "";
    display: block;
    width: 44px;
    height: 2px;
    background: var(--signal);
    margin-bottom: 1.5rem;
}

.intro-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 680px;
    margin-left: auto;
    font-size: 1.02rem;
    line-height: 1.72;
    color: var(--paper-80);
}
.intro-body p { margin: 0 0 1.1rem; }

@media (min-width: 820px) {
    .intro { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; max-width: var(--page-max); }
    .intro-lede { margin: 0; }
    .intro-body { margin: 0; }
}

/* ---------- clients ------------------------------------- */

.clients {
    max-width: var(--page-max);
    margin: clamp(4rem, 10vh, 7rem) auto;
    padding: 3rem var(--gutter);
    border-top: 1px solid var(--paper-12);
    border-bottom: 1px solid var(--paper-12);
}
.clients-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--paper-60);
    margin: 0 0 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.clients-label::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 1px;
    background: var(--signal);
}
.clients-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2.25rem;
    align-items: center;
    justify-items: center;
}
.clients-grid a {
    display: block;
    text-decoration: none;
    border: none;
    opacity: 0.55;
    transition: opacity 0.3s var(--ease), filter 0.3s var(--ease);
    filter: grayscale(1) invert(0.88) brightness(1.08) contrast(0.85);
}
.clients-grid a:hover {
    opacity: 1;
    filter: grayscale(0) invert(0) brightness(1);
    background: var(--paper);
    padding: 0.4rem 0.6rem;
    border-radius: 2px;
}
.clients-grid img {
    display: block;
    max-width: 88px;
    max-height: 40px;
    width: 100%;
    height: auto;
}

@media (max-width: 760px) {
    .clients-grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
}
@media (max-width: 420px) {
    .clients-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- home contact block -------------------------- */

.contact-block {
    max-width: var(--page-max);
    margin: clamp(4rem, 10vh, 6rem) auto clamp(5rem, 14vh, 8rem);
    padding: 0 var(--gutter);
    text-align: center;
}
.contact-line {
    font-family: var(--font-geo);
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--paper);
    margin: 0 0 1rem;
    line-height: 1.35;
}
.contact-line a {
    color: var(--bh-ochre);
    text-decoration-color: var(--bh-ochre);
    text-underline-offset: 0.22em;
    text-decoration-thickness: 1.5px;
}
.contact-line a:hover {
    color: var(--signal-hi);
    text-decoration-color: var(--signal-hi);
}
.contact-coords {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper-40);
}

/* ---------- page chrome (subpages) ---------------------- */

.page {
    max-width: 880px;
    margin: 0 auto;
    padding: clamp(3rem, 7vh, 5rem) var(--gutter) clamp(3rem, 7vh, 5rem);
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--paper-60);
    margin: 0 0 1.5rem;
}
.page-eyebrow::before {
    content: "";
    display: inline-block;
    width: 26px;
    height: 1px;
    background: var(--signal);
}

.page-title {
    font-family: var(--font-geo);
    font-weight: 500;
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--paper);
    margin: 0 0 1.25rem;
}

.accent-dot { color: var(--signal); }

.page-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--paper-60);
    max-width: 56ch;
    margin: 0 0 clamp(2.5rem, 6vh, 4rem);
    line-height: 1.6;
}
.page-subtitle a { color: var(--paper); }

.page-section-heading {
    display: grid;
    grid-template-columns: 80px 1fr;
    align-items: baseline;
    gap: 1.25rem;
    padding: 2.75rem 0 1.25rem;
    margin: 1.5rem 0 0.75rem;
    border-top: 1px solid var(--paper-12);
    font-family: var(--font-geo);
    font-weight: 500;
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--paper);
}
.page-section-heading::before {
    content: attr(data-num);
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--signal);
    align-self: center;
    padding-top: 0.2em;
}
.page-section-heading:first-of-type { border-top: none; padding-top: 0.5rem; }

/* ---------- log entries (CV, projects) ------------------ */

.log {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: log;
}

.entry {
    --bar: rgba(236, 227, 207, 0.18);
    counter-increment: log;
    display: grid;
    grid-template-columns: 80px 140px 1fr;
    gap: 1.5rem;
    padding: 1.6rem 0;
    border-top: 1px solid var(--paper-12);
    position: relative;
    transition: background 0.3s var(--ease);
}
.entry:first-child { border-top: none; }
.entry::before {
    /* line-number */
    content: counter(log, decimal-leading-zero);
    grid-column: 1;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    color: var(--paper-40);
    padding-top: 0.35rem;
    transition: color 0.3s var(--ease);
}
.entry:hover { --bar: var(--signal); }
.entry:hover::before { color: var(--signal); }

.entry-date {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: var(--paper-60);
    padding-top: 0.35rem;
    line-height: 1.55;
}
.entry-date br { content: ""; display: block; margin-bottom: 0.15rem; }

.entry-body {
    position: relative;
    padding-left: 1.6rem;
    display: flow-root; /* clears the floated video thumb */
}
.entry-body::before {
    /* vertical glow bar in the gutter */
    content: "";
    position: absolute;
    left: 0;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 1px;
    background: var(--bar);
    transition: background 0.3s var(--ease);
    box-shadow: 0 0 0 transparent;
}
.entry:hover .entry-body::before {
    box-shadow: 0 0 10px rgba(255, 122, 58, 0.5);
}

.entry-title {
    font-family: var(--font-geo);
    font-weight: 500;
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0 0 0.15rem;
    color: var(--paper);
}
.entry-title a {
    color: var(--paper);
    text-decoration: none;
    background-image: linear-gradient(var(--signal), var(--signal));
    background-repeat: no-repeat;
    background-size: 0% 1px;
    background-position: 0 100%;
    transition: background-size 0.35s var(--ease), color 0.25s var(--ease);
    padding-bottom: 2px;
}
.entry-title a:hover {
    color: var(--signal-hi);
    background-size: 100% 1px;
}

.entry-role {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--paper-60);
    margin: 0 0 0.8rem;
    font-style: normal;
}

.entry-body > p {
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--paper-80);
    margin: 0 0 0.65rem;
}
.entry-body ul {
    margin: 0.4rem 0 0;
    padding: 0;
    list-style: none;
}
.entry-body li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.97rem;
    line-height: 1.6;
    margin: 0.35rem 0;
    color: var(--paper-80);
}
.entry-body li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--signal);
}

.entry-tags {
    margin: 0.85rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.entry-tag {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper-60);
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--paper-22);
    border-radius: 2px;
    transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.entry:hover .entry-tag { border-color: var(--paper-40); }

@media (max-width: 760px) {
    .entry {
        grid-template-columns: 48px 1fr;
        gap: 0.9rem 1rem;
    }
    .entry-date {
        grid-column: 2;
        grid-row: 1;
        padding-top: 0.35rem;
    }
    .entry-body {
        grid-column: 2;
        grid-row: 2;
    }
}

/* --- video thumbnail inside an entry --------------------- */

.entry-video {
    position: relative;
    display: block;
    float: right;
    width: clamp(120px, 26%, 180px);
    aspect-ratio: 16 / 9;
    margin: 0.35rem 0 0.8rem 1.25rem;
    border: 1px solid var(--paper-22);
    border-radius: 2px;
    background: var(--ink-1);
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.25s var(--ease);
}
.entry-video img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.18) contrast(0.95) brightness(0.88);
    transition: filter 0.4s var(--ease), transform 0.6s var(--ease);
}
.entry-video::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(200, 190, 160, 0.85);
    border: 1px solid rgba(236, 227, 207, 0.9);
    transform: translate(-50%, -50%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.entry-video::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 11px solid var(--paper);
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    transform: translate(-30%, -50%);
    transition: border-left-color 0.25s var(--ease);
}
.entry-video:hover { border-color: var(--signal); }
.entry-video:hover img {
    filter: grayscale(0) contrast(1) brightness(1);
    transform: scale(1.04);
}
.entry-video:hover::before {
    background: var(--signal);
    border-color: var(--signal);
}
.entry-video:hover::after { border-left-color: var(--ink-0); }

@media (max-width: 560px) {
    .entry-video { float: none; width: 100%; margin: 0.75rem 0 0.8rem; }
}

/* ---------- publications -------------------------------- */

.pub-list {
    list-style: none;
    counter-reset: pub;
    padding: 0;
    margin: 0;
}
.pub-list > li {
    counter-increment: pub;
    padding: 1.25rem 0;
    border-top: 1px solid var(--paper-12);
    display: grid;
    grid-template-columns: 80px 70px 1fr;
    gap: 1.5rem;
}
.pub-list > li:first-child { border-top: none; }
.pub-list > li::before {
    content: counter(pub, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    color: var(--paper-40);
    padding-top: 0.3rem;
}
.pub-year {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--paper-60);
    padding-top: 0.25rem;
}
.pub-title {
    font-family: var(--font-geo);
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 0 0 0.35rem;
    color: var(--paper);
}
.pub-title a {
    color: var(--paper);
    text-decoration: none;
    background-image: linear-gradient(var(--signal), var(--signal));
    background-repeat: no-repeat;
    background-size: 0% 1px;
    background-position: 0 100%;
    transition: background-size 0.35s var(--ease), color 0.25s var(--ease);
    padding-bottom: 2px;
}
.pub-title a:hover {
    color: var(--signal-hi);
    background-size: 100% 1px;
}
.pub-meta {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--paper-60);
    margin: 0;
    line-height: 1.45;
}
.pub-venue { font-style: italic; color: var(--paper-80); }

@media (max-width: 760px) {
    .pub-list > li {
        grid-template-columns: 48px 1fr;
        gap: 0.8rem;
    }
    .pub-year {
        grid-column: 2;
        padding-top: 0;
    }
    .pub-list > li > div:last-child {
        grid-column: 2;
    }
}

/* ---------- about page ---------------------------------- */

.about-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
@media (min-width: 820px) {
    .about-layout {
        grid-template-columns: 1.1fr 1fr;
    }
}
.about-figure {
    position: relative;
    margin: 0;
}
.about-figure img {
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(0.2) contrast(1.05) brightness(0.92);
    border: 1px solid var(--paper-12);
}
.about-figure figcaption {
    position: absolute;
    left: 0;
    bottom: -2.2rem;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-60);
}
.about-figure figcaption .sig {
    color: var(--signal);
    margin-right: 0.5rem;
}

.about-body {
    font-size: 1.05rem;
    line-height: 1.72;
    color: var(--paper-80);
}
.about-body .lead {
    font-family: var(--font-geo);
    font-weight: 500;
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: var(--paper);
    margin: 0 0 1.75rem;
}

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

.contact-layout {
    max-width: 620px;
}
.contact-layout .big-email {
    font-family: var(--font-geo);
    font-weight: 500;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 0 0 2.5rem;
    color: var(--paper);
    display: inline-block;
    text-decoration: none;
    background-image: linear-gradient(var(--bh-ochre), var(--bh-ochre));
    background-repeat: no-repeat;
    background-size: 100% 2px;
    background-position: 0 100%;
    padding-bottom: 4px;
    transition: color 0.25s var(--ease), background-size 0.35s var(--ease);
}
.contact-layout .big-email:hover {
    color: var(--signal-hi);
}
.contact-layout .meta-rows {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.5rem 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--paper-12);
    border-bottom: 1px solid var(--paper-12);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--paper-80);
}
.contact-layout .meta-rows dt {
    color: var(--paper-60);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.contact-layout .meta-rows dd { margin: 0; }
.contact-layout .meta-rows a {
    color: var(--paper);
    text-decoration: none;
    border-bottom: 1px solid var(--paper-22);
}
.contact-layout .meta-rows a:hover {
    color: var(--signal-hi);
    border-bottom-color: var(--signal);
}

/* ---------- videos -------------------------------------- */

.video-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: vid;
}
.video-list li {
    counter-increment: vid;
    padding: 2.5rem 0;
    border-top: 1px solid var(--paper-12);
}
.video-list li:first-child { border-top: none; padding-top: 0; }

.video-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--paper-60);
    margin: 0 0 0.75rem;
}
.video-label::before {
    content: "▸ " counter(vid, decimal-leading-zero) "  ·  ";
    color: var(--signal);
}

.video-title {
    font-family: var(--font-geo);
    font-weight: 500;
    font-size: clamp(1.4rem, 2.6vw, 1.8rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
    color: var(--paper);
}
.video-desc {
    color: var(--paper-80);
    margin: 0 0 1.5rem;
    max-width: 60ch;
    line-height: 1.65;
}
.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: var(--ink-1);
    border: 1px solid var(--paper-12);
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

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

.site-footer {
    position: relative;
    padding: 3.5rem var(--gutter) 2.5rem;
    margin-top: clamp(4rem, 10vh, 7rem);
    border-top: 1px solid var(--paper-12);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--paper-40);
}
.site-footer-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    align-items: baseline;
}
.site-footer .left { text-align: left; }
.site-footer .center { text-align: center; }
.site-footer .right { text-align: right; }
.site-footer a {
    color: var(--paper-60);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.site-footer a:hover {
    color: var(--signal);
    border-bottom-color: var(--signal);
}
.site-footer .dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--signal);
    margin: 0 0.6rem;
    vertical-align: middle;
}

@media (max-width: 640px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 0.6rem;
    }
    .site-footer .center, .site-footer .right { text-align: left; }
}

/* ---------- reveal on load ------------------------------ */

.reveal {
    opacity: 0;
    transform: translateY(10px);
    animation: reveal 0.9s var(--ease) forwards;
}
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.2s; }
.reveal-3 { animation-delay: 0.35s; }
.reveal-4 { animation-delay: 0.5s; }
.reveal-5 { animation-delay: 0.65s; }

@keyframes reveal {
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; animation: none; }
    .callsign .dot { animation: none; }
    .nav::after { animation: none; opacity: 0.3; }
    .hero-trace path { animation: none; }
}

/* ============================================================
   Bauhaus hero (landing page)
   Geometric composition: ochre disc, paper logo tile, red square,
   teal triangle. Type set in a quiet Jost stack at a calm scale.
   ============================================================ */

.bauhaus {
    max-width: var(--page-max);
    margin: clamp(2rem, 7vh, 4rem) auto clamp(2rem, 6vh, 4rem);
    padding-top: clamp(1rem, 4vh, 2rem);
}

/* --- composition --------------------------------------- */

.bauhaus-composition {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1 / 1;
    justify-self: center;
}
@media (min-width: 900px) {
    .bauhaus-composition {
        justify-self: start;
        max-width: 560px;
    }
}

.bh-shape {
    position: absolute;
    display: block;
}

/* ochre disc — sits behind everything */
.bh-disc {
    width: 72%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--bh-ochre);
    left: 6%;
    top: 8%;
    box-shadow:
        inset 0 -14px 40px rgba(200, 190, 160, 0.85),
        0 40px 80px -30px rgba(227, 163, 59, 0.35);
}

/* hairline horizontal rule crossing the composition */
.bh-rule {
    height: 1px;
    background: var(--paper-22);
    left: -8%;
    right: -8%;
    top: 72%;
}

/* teal triangle, lower-left */
.bh-triangle {
    width: 0;
    height: 0;
    border-left: 48px solid transparent;
    border-right: 48px solid transparent;
    border-bottom: 80px solid var(--bh-teal);
    bottom: 4%;
    left: 6%;
    transform: rotate(-14deg);
    filter: drop-shadow(0 10px 18px rgba(200, 190, 160, 0.85));
}

/* red square, lower-right, offset under the logo tile */
.bh-square {
    width: 96px;
    height: 96px;
    background: var(--bh-red);
    right: 2%;
    bottom: 12%;
    box-shadow: 0 14px 30px -8px rgba(200, 190, 160, 0.85);
}

/* thin navy vertical bar running the full height */
.bh-bar {
    width: 6px;
    top: -2%;
    bottom: -2%;
    right: 18%;
    background: var(--bh-navy);
    opacity: 0.88;
}

/* logo tile — white paper card with the Pythonic mark */
.bh-logo {
    position: absolute;
    width: 58%;
    left: 16%;
    top: 16%;
    display: block;
    background: #ffffff;
    padding: 6%;
    box-shadow:
        0 24px 60px -18px rgba(200, 190, 160, 0.85),
        0 4px 12px -4px rgba(200, 190, 160, 0.85);
    transform: rotate(-1.5deg);
    transition: transform 0.6s var(--ease);
}
.bh-logo:hover { transform: rotate(0deg) translateY(-4px); }

/* tiny mono caption in the composition's top-right corner */
.bh-caption {
    position: absolute;
    top: 0;
    right: 0;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper-60);
    line-height: 1;
    text-align: right;
}
.bh-caption .num {
    display: block;
    color: var(--signal);
    margin-bottom: 0.35rem;
}

/* --- typography side ----------------------------------- */

.bauhaus-type {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    max-width: 50rem;
}

.bauhaus-kicker {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.9rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--paper-60);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--paper-12);
}
.bauhaus-kicker .sig { color: var(--signal); }
.bauhaus-kicker .line {
    height: 1px;
    background: var(--paper-22);
}

.bauhaus-head {
    font-family: var(--font-geo);
    font-weight: 500;
    font-size: clamp(2.1rem, 5.2vw, 4rem);
    line-height: 1.03;
    letter-spacing: -0.022em;
    color: var(--paper);
    margin: 0;
    max-width: 18ch;
    text-transform: none;
}
.bauhaus-head .amp {
    color: var(--bh-ochre);
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    padding: 0 0.04em;
}
.bauhaus-head .accent {
    color: var(--bh-red);
}

.bauhaus-sub {
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--paper-80);
    margin: 0;
    max-width: 38ch;
}
.bauhaus-sub a {
    color: var(--paper);
    text-decoration-color: var(--bh-ochre);
    text-decoration-thickness: 1.5px;
}
.bauhaus-sub a:hover {
    color: var(--bh-ochre);
    text-decoration-color: var(--bh-ochre);
}

.bauhaus-coords {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-60);
    margin: 0.5rem 0 0;
}
.bauhaus-coords .chip {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--bh-red);
}

/* ============================================================
   404 — lost carrier
   ============================================================ */

.notfound {
    position: relative;
    padding: clamp(3rem, 10vh, 6rem) var(--gutter) clamp(4rem, 10vh, 7rem);
    overflow: hidden;
}

.notfound-grid {
    position: relative;
    max-width: var(--page-max);
    margin: 0 auto;
    display: grid;
    gap: clamp(2rem, 5vh, 3.5rem);
}

.notfound-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-60);
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--paper-12);
}
.notfound-meta .right { color: var(--signal); }

.notfound-kicker {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--paper-60);
    margin: 0 0 1.2rem;
}
.notfound-kicker .num {
    color: var(--signal);
    margin-right: 0.8rem;
}

.notfound-head {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2.6rem, 8vw, 6rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: var(--paper);
    margin: 0;
    max-width: 18ch;
}
.notfound-head .accent {
    color: var(--signal);
    font-style: italic;
}
.notfound-head .amp {
    display: inline-block;
    transform: translateY(0.04em) rotate(-3deg);
    color: var(--paper-60);
    font-style: italic;
    padding: 0 0.05em;
}

.notfound-sub {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 1.8vw, 1.4rem);
    line-height: 1.45;
    color: var(--paper-80);
    max-width: 46ch;
    margin: 1.6rem 0 0;
}

.notfound-links {
    list-style: none;
    padding: 0;
    margin: 2.2rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.notfound-links a {
    color: var(--paper);
    text-decoration: none;
    border-bottom: 1px solid var(--paper-22);
    padding-bottom: 2px;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.notfound-links a:hover {
    color: var(--signal);
    border-bottom-color: var(--signal);
}

.notfound-readout {
    margin-top: 1rem;
    padding: 1.4rem 1.5rem;
    border: 1px solid var(--paper-12);
    background: var(--paper-06);
    display: grid;
    gap: 0.8rem;
}
.notfound-readout .readout-label,
.notfound-readout .readout-meta {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--paper-60);
}
.notfound-readout .readout-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.notfound-readout svg {
    width: 100%;
    height: 60px;
    display: block;
}
.notfound-readout svg path {
    stroke: var(--signal);
    stroke-width: 1.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.85;
    stroke-dasharray: 3 5;
    animation: drift 14s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .notfound-readout svg path { animation: none; }
}

/* ============================================================
   Deck viewer — slide presentation renderer
   ============================================================ */

.deck-page .page-subtitle {
    margin-bottom: 2rem;
}

.deck-viewer {
    position: relative;
    background: var(--ink-1);
    border: 1px solid var(--paper-12);
    border-radius: 3px;
    overflow: hidden;
}

.deck-stage {
    position: relative;
    display: flex;
    align-items: center;
}

.deck-frame {
    flex: 1;
    position: relative;
    aspect-ratio: 16 / 9;
    background: rgba(200, 190, 160, 0.85);
    overflow: hidden;
    cursor: default;
}

.deck-slide {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
}

.deck-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(40px, 6vw, 72px);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--paper-40);
    cursor: pointer;
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
    padding: 0;
}
.deck-nav:hover {
    color: var(--paper);
    background: rgba(200, 190, 160, 0.85);
}
.deck-nav:disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}
.deck-prev { left: 0; }
.deck-next { right: 0; }

.deck-controls {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--paper-12);
    background: var(--ink-0);
}

.deck-counter {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--paper-60);
    white-space: nowrap;
    flex-shrink: 0;
}
.deck-counter-current { color: var(--signal); }
.deck-counter-sep { margin: 0 0.2em; color: var(--paper-22); }

.deck-progress {
    flex: 1;
    height: 2px;
    background: var(--paper-12);
    border-radius: 1px;
    overflow: hidden;
}
.deck-progress-bar {
    height: 100%;
    background: var(--signal);
    border-radius: 1px;
    transition: width 0.3s var(--ease);
    width: 0;
}

.deck-actions {
    flex-shrink: 0;
}

.deck-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid var(--paper-22);
    border-radius: 2px;
    color: var(--paper-60);
    cursor: pointer;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
    padding: 0;
}
.deck-btn:hover {
    color: var(--paper);
    border-color: var(--paper-40);
}

.deck-video {
    margin-top: 2rem;
    text-align: center;
}
.deck-video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--paper-60);
    text-decoration: none;
    border: 1px solid var(--paper-22);
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.deck-video-link:hover {
    color: var(--signal);
    border-color: var(--signal);
}
.deck-video-link svg {
    flex-shrink: 0;
}

.deck-meta {
    margin-top: 2rem;
}

.deck-back {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper-60);
    text-decoration: none;
    border-bottom: 1px solid var(--paper-22);
    padding-bottom: 2px;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.deck-back:hover {
    color: var(--signal);
    border-color: var(--signal);
}

/* fullscreen mode */
.deck-viewer:fullscreen {
    display: flex;
    flex-direction: column;
    background: rgba(200, 190, 160, 0.85);
    border: none;
    border-radius: 0;
}
.deck-viewer:fullscreen .deck-stage {
    flex: 1;
    min-height: 0;
}
.deck-viewer:fullscreen .deck-frame {
    aspect-ratio: auto;
    height: 100%;
}
.deck-viewer:fullscreen .deck-controls {
    background: rgba(200, 190, 160, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top-color: rgba(236, 227, 207, 0.08);
}
.deck-viewer:fullscreen .deck-nav {
    width: 80px;
}

@media (max-width: 640px) {
    .deck-nav { width: 36px; }
    .deck-nav svg { width: 18px; height: 18px; }
    .deck-controls { padding: 0.6rem 0.8rem; gap: 0.8rem; }
}

