@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Serif+Display&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --hba-purple: #7c6cf0;
    --hba-purple-dark: #6a5bd6;
    --hba-purple-glow: rgba(124, 108, 240, 0.22);
    --hba-pink: #ff4d8d;
    --hba-yellow: #feca57;
    --hba-cyan: #70a1ff;
    --hba-lime: #2ed573;
    --hba-bg: #090b14;
    --hba-bg-elevated: #10121f;
    --hba-black: #06070d;
    --hba-white: #e8eaf0;
    --hba-muted: #8b8fa8;
    --hba-border: rgba(255, 255, 255, 0.08);
    --hba-font-display: 'Bebas Neue', 'Space Grotesk', sans-serif;
    --hba-font-serif: 'DM Serif Display', Georgia, serif;
    --hba-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --hba-font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --hba-dot: radial-gradient(circle, rgba(124, 108, 240, 0.22) 1px, transparent 1px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.hba-page {
    font-family: var(--hba-font-body);
    background: var(--hba-bg);
    color: var(--hba-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.hba-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hba-dots {
    background-color: var(--hba-bg-elevated);
    background-image: var(--hba-dot);
    background-size: 10px 10px;
}

.hba-hero {
    padding: 7.5rem 0 4rem;
    position: relative;
    border-bottom: 1px solid var(--hba-border);
}

.hba-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: center;
}

.hba-badge {
    display: inline-block;
    font-family: var(--hba-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--hba-purple);
    color: #fff;
    padding: 0.45rem 0.75rem;
    margin-bottom: 1.25rem;
}

.hba-hero-title {
    font-family: var(--hba-font-display);
    font-size: clamp(3.2rem, 9vw, 6.5rem);
    line-height: 0.92;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--hba-white);
}

.hba-hero-title span {
    display: block;
}

.hba-hero-title .hba-accent {
    color: var(--hba-purple);
    text-shadow: 3px 3px 0 var(--hba-pink);
}

.hba-hero-sub {
    font-size: 1.1rem;
    max-width: 34rem;
    color: var(--hba-muted);
    margin-bottom: 1rem;
}

.hba-hero-thesis {
    font-family: var(--hba-font-serif);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--hba-white);
    max-width: 32rem;
    margin-bottom: 1.25rem;
}

.hba-hero-quote {
    font-family: var(--hba-font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hba-yellow);
}

.hba-portrait-wall {
    --hba-tile: 154px;
    display: grid;
    grid-template-columns: repeat(2, var(--hba-tile));
    gap: 0.75rem;
    width: fit-content;
    max-width: 100%;
    justify-self: end;
}

.hba-portrait {
    width: var(--hba-tile);
    height: var(--hba-tile);
    box-sizing: border-box;
    border: 3px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.65rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.hba-portrait:hover {
    transform: scale(1.03);
    z-index: 2;
    border-color: var(--hba-purple);
}

.hba-portrait__label {
    font-family: var(--hba-font-display);
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    line-height: 1.05;
    text-transform: uppercase;
    max-width: 100%;
    overflow-wrap: break-word;
}

.hba-portrait__year {
    font-family: var(--hba-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    opacity: 0.85;
}

.hba-portrait--purple { background: var(--hba-purple); color: #fff; }
.hba-portrait--pink { background: var(--hba-pink); color: #fff; }
.hba-portrait--cyan { background: var(--hba-cyan); color: var(--hba-black); }
.hba-portrait--lime { background: var(--hba-lime); color: var(--hba-black); }

.hba-portrait--offset::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid var(--hba-purple);
    transform: translate(5px, 5px);
    z-index: -1;
    opacity: 0.55;
}

.hba-eras {
    padding: 4.5rem 0;
    background: var(--hba-bg);
}

.hba-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.hba-section-title {
    font-family: var(--hba-font-display);
    font-size: clamp(2.2rem, 5vw, 3.75rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hba-white);
}

.hba-section-kicker {
    font-family: var(--hba-font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--hba-purple);
}

.hba-era-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.hba-era-card {
    border: 1px solid var(--hba-border);
    border-radius: 14px;
    padding: 1.25rem;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.hba-era-card:hover {
    border-color: rgba(124, 108, 240, 0.35);
    transform: translateY(-3px);
}

.hba-era-card__name {
    font-family: var(--hba-font-display);
    font-size: 1.55rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--hba-white);
}

.hba-era-card__desc {
    font-size: 0.92rem;
    color: var(--hba-muted);
}

.hba-era-card__tag {
    font-family: var(--hba-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hba-yellow);
    margin-top: 1rem;
}

.hba-spine {
    padding: 3.5rem 0;
    background: linear-gradient(180deg, rgba(124, 108, 240, 0.08) 0%, transparent 100%);
    border-top: 1px solid var(--hba-border);
    border-bottom: 1px solid var(--hba-border);
}

.hba-spine-lead {
    font-family: var(--hba-font-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-style: italic;
    max-width: 42rem;
    margin-bottom: 1.5rem;
    color: var(--hba-white);
}

.hba-spine-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hba-spine-step {
    font-family: var(--hba-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(124, 108, 240, 0.35);
    border-radius: 999px;
    background: rgba(124, 108, 240, 0.1);
}

.hba-timeline {
    padding: 4.5rem 0;
    background: var(--hba-bg-elevated);
}

.hba-timeline-list {
    list-style: none;
    border-top: 2px solid var(--hba-border);
}

.hba-bug-entry {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--hba-border);
    align-items: start;
}

.hba-bug-entry__year {
    font-family: var(--hba-font-display);
    font-size: 2.25rem;
    line-height: 1;
    color: var(--hba-purple);
}

.hba-bug-entry__title {
    font-family: var(--hba-font-display);
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
    color: var(--hba-white);
}

.hba-bug-entry__copy {
    font-size: 0.96rem;
    color: var(--hba-muted);
    max-width: 42rem;
}

.hba-bug-entry__copy a {
    color: var(--hba-purple);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hba-bug-entry__copy code {
    font-family: var(--hba-font-mono);
    font-size: 0.85em;
    color: var(--hba-cyan);
    background: rgba(112, 161, 255, 0.1);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    white-space: nowrap;
}

.hba-bug-entry__medium {
    display: inline-block;
    margin-top: 0.6rem;
    font-family: var(--hba-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hba-yellow);
}

.hba-editions {
    padding: 4.5rem 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(124, 108, 240, 0.18), transparent 45%),
        var(--hba-bg);
}

.hba-editions-intro {
    max-width: 36rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--hba-muted);
    margin-bottom: 0.5rem;
}

.hba-can-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.hba-can {
    background: var(--hba-bg-elevated);
    border: 2px solid var(--hba-border);
    border-radius: 10px;
    padding: 1rem 0.75rem;
    text-align: center;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.hba-can:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 108, 240, 0.45);
}

.hba-can__brand {
    font-family: var(--hba-font-display);
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hba-purple);
    border-bottom: 2px solid var(--hba-border);
    padding-bottom: 0.35rem;
    margin-bottom: 0.5rem;
}

.hba-can__flavor {
    font-family: var(--hba-font-mono);
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--hba-muted);
}

.hba-can__edition {
    margin-top: 0.75rem;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hba-yellow);
}

.hba-cta {
    padding: 5rem 0;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(124, 108, 240, 0.35), transparent 55%),
        var(--hba-black);
    border-top: 1px solid var(--hba-border);
}

.hba-cta-title {
    font-family: var(--hba-font-display);
    font-size: clamp(2.2rem, 6vw, 4rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--hba-white);
}

.hba-cta-copy {
    max-width: 34rem;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
    color: var(--hba-muted);
}

.hba-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.hba-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    font-family: var(--hba-font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hba-btn:hover {
    transform: translateY(-2px);
}

.hba-btn--primary {
    background: var(--hba-purple);
    color: #fff;
    box-shadow: 0 8px 24px var(--hba-purple-glow);
}

.hba-btn--ghost {
    background: transparent;
    color: var(--hba-white);
    border-color: var(--hba-border);
}

.hba-footer {
    padding: 2rem 0 2.5rem;
    background: var(--hba-bg);
    border-top: 1px solid var(--hba-border);
}

.hba-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hba-footer-links {
    display: flex;
    gap: 1.25rem;
}

.hba-footer-links a {
    color: var(--hba-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.hba-footer-links a:hover {
    color: var(--hba-purple);
}

.hba-footer-note {
    font-family: var(--hba-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 860px) {
    .hba-hero-grid {
        grid-template-columns: 1fr;
    }

    .hba-portrait-wall {
        --hba-tile: min(154px, calc((100vw - 3rem - 0.75rem) / 2));
        justify-self: center;
        margin: 0 auto;
    }

    .hba-bug-entry {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hba-portrait,
    .hba-era-card,
    .hba-can,
    .hba-btn {
        transition: none;
    }
}

/* ============================================================
   AI-era interaction — "the cursor is the present"
   Moving the mouse drags a neon aura of 2026 across the archival
   page; scrolling down from 1947 ignites the whole page into the
   AI era (--era 0 -> 1) and charges the timeline spine.
   ============================================================ */
body.hba-page {
    --era: 0;      /* 0 = 1947 · 1 = 2026 / AI era (scroll-driven) */
    --mx: 50vw;    /* cursor x */
    --my: 35vh;    /* cursor y */
}

.hba-aura {
    position: fixed;
    inset: 0;
    z-index: 40;
    pointer-events: none;
    mix-blend-mode: screen;
    background:
        radial-gradient(460px circle at var(--mx) var(--my),
            rgba(124, 108, 240, 0.22),
            rgba(255, 77, 141, 0.10) 38%,
            transparent 70%);
    opacity: calc(0.40 + 0.60 * var(--era));
    transition: opacity 0.5s ease;
    will-change: background;
}

/* Dot grid that thickens as the page ages into the AI era */
.hba-aura::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--hba-dot);
    background-size: 12px 12px;
    opacity: calc(0.14 * var(--era));
}

/* Timeline spine — charges grey -> neon from 1947 down to 2026 */
.hba-timeline-list {
    position: relative;
}

.hba-timeline-list::before,
.hba-timeline-list::after {
    content: '';
    position: absolute;
    top: 0;
    left: 128px;
    width: 2px;
    border-radius: 2px;
}

.hba-timeline-list::before {
    bottom: 0;
    background: var(--hba-border);
}

.hba-timeline-list::after {
    height: calc(var(--tl, 0) * 100%);
    background: linear-gradient(180deg,
        #8b8fa8 0%, var(--hba-purple) 45%, var(--hba-pink) 78%, var(--hba-cyan) 100%);
    box-shadow: 0 0 14px rgba(124, 108, 240, 0.55);
    transition: height 0.15s linear;
}

/* Modern / AI-era entries (2024 + the eternal bug) shimmer once lit */
.hba-bug-entry--ai .hba-bug-entry__title {
    background: linear-gradient(90deg,
        var(--hba-white) 0%, var(--hba-purple) 35%, var(--hba-pink) 60%, var(--hba-white) 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hba-shimmer 6s linear infinite;
    animation-play-state: paused;
}

body.hba-page.hba-lit .hba-bug-entry--ai .hba-bug-entry__title {
    animation-play-state: running;
}

.hba-lit .hba-cta-title {
    text-shadow: 0 0 26px rgba(124, 108, 240, 0.55);
}

@keyframes hba-shimmer {
    0% { background-position: 0% 0; }
    100% { background-position: 300% 0; }
}

@media (max-width: 860px) {
    /* timeline collapses to one column on mobile — drop the spine */
    .hba-timeline-list::before,
    .hba-timeline-list::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hba-aura {
        display: none;
    }

    .hba-bug-entry--ai .hba-bug-entry__title {
        animation: none;
        -webkit-text-fill-color: var(--hba-white);
        background: none;
    }

    .hba-timeline-list::after {
        transition: none;
    }

    .hba-mar { transition: none; }
}

/* Source links on timeline titles — inherit the title's look (incl. the
   AI-era shimmer via text-fill-color: inherit), reveal on hover. */
.hba-bug-entry__title a {
    color: inherit;
    -webkit-text-fill-color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

.hba-bug-entry__title a:hover,
.hba-bug-entry__title a:focus-visible {
    color: var(--hba-purple);
    -webkit-text-fill-color: var(--hba-purple);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================
   "The Marilyn" — the 1947 moth, silkscreened Warhol-style.
   One motif (#hba-moth) repeated in clashing pop-art colorways.
   ============================================================ */
.hba-marilyn {
    padding: 4.5rem 0;
    background: var(--hba-bg-elevated);
    border-top: 1px solid var(--hba-border);
}

.hba-marilyn-intro {
    max-width: 40rem;
    color: var(--hba-muted);
    margin-bottom: 2rem;
}

.hba-marilyn-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    max-width: 760px;
}

.hba-mar {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    margin: 0;
    transition: transform 0.2s ease;
}

.hba-mar:hover {
    transform: scale(1.04);
    z-index: 2;
}

/* The real photo, tinted by the cell colour via a luminosity blend —
   one image, eight screen-printed colourways (Warhol Marilyn). */
.hba-mar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% 50%;
    display: block;
    /* Push the paper toward white so multiply turns it into a solid colour
       field, leaving the handwriting + moth as dark line art. */
    filter: grayscale(1) contrast(1.4) brightness(1.2);
    mix-blend-mode: multiply;
}

.hba-mar--1 { background: #ff2d7e; }
.hba-mar--2 { background: #7c6cf0; }
.hba-mar--3 { background: #ffc312; }
.hba-mar--4 { background: #4d8dff; }
.hba-mar--5 { background: #21d96b; }
.hba-mar--6 { background: #ff7038; }
.hba-mar--7 { background: #12d3c5; }
.hba-mar--8 { background: #c44dff; }

.hba-marilyn-credit {
    margin-top: 1.25rem;
    font-family: var(--hba-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.42);
}

.hba-marilyn-credit a {
    color: var(--hba-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hba-marilyn-credit a:hover { color: var(--hba-purple); }

@media (max-width: 720px) {
    .hba-marilyn-grid { grid-template-columns: repeat(2, 1fr); }
}
