/* ─────────────────────────────────────────
    TOKENS
───────────────────────────────────────── */
:root {
    --tape-black: #0e0b10;
    --tape-dark: #1a1520;
    --tape-mid: #2a2232;
    --tape-panel: #221c2a;

    --cream: #f2ead8;
    --dust-pink: #d4a09a;
    --muted-lavender: #a899bb;
    --faded-teal: #7aabaa;
    --vhs-yellow: #d6c96e;
    --warm-white: #ece6d8;

    --body-text: #c2b8a8;
    --dim-text: #7a7068;
    --label-text: #d6c96e;

    --font-display: 'VT323', monospace;
    --font-body: 'Courier Prime', 'Courier New', monospace;

    --scanline-opacity: 0.04;
    --grain-opacity: 0.07;
}

/* ─────────────────────────────────────────
    RESET & BASE
───────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--tape-black);
    color: var(--body-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ── Grain overlay ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: var(--grain-opacity);
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: overlay;
}

/* ── Scanlines overlay ── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(to bottom,
            transparent 0px,
            transparent 3px,
            rgba(0, 0, 0, 0.3) 3px,
            rgba(0, 0, 0, 0.3) 4px);
    opacity: var(--scanline-opacity);
    pointer-events: none;
    z-index: 9997;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

/* ── VHS label utility ── */
.vhs-label {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--label-text);
    opacity: 0.8;
}

/* ── Section divider ── */
.tape-rule {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 0;
}

/* ─────────────────────────────────────────
    NAV
───────────────────────────────────────── */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
    background: linear-gradient(to bottom, rgba(14, 11, 16, 0.96), transparent);
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.12em;
    color: var(--cream);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand .play-icon {
    color: var(--dust-pink);
    font-style: normal;
}

.nav-socials {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    list-style: none;
}

.nav-socials a {
    color: var(--dim-text);
    font-size: 0.95rem;
    transition: color 0.25s ease;
}

.nav-socials a:hover {
    color: var(--cream);
}

/* Hide secondary nav icons on narrow screens — they're all in the social strip below */
@media (max-width: 480px) {
    .nav-hide-sm {
        display: none;
    }

    .site-nav {
        padding: 1rem 1.2rem;
    }
}

/* ─────────────────────────────────────────
    HERO
───────────────────────────────────────── */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

/* Hero image */
.hero-image {
    position: absolute;
    inset: 0;
    background-color: var(--tape-dark);
    background-image: url('img/hero.jpg');
    background-size: cover;
    background-position: center top;
}

/* Image placeholder label */
.hero-image::before {
    content: '[ HERO IMAGE ]';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.08);
}

/* Washed-out tint + fade to black at bottom */
.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(14, 11, 16, 0.1) 0%,
            rgba(180, 140, 160, 0.04) 40%,
            rgba(14, 11, 16, 0.8) 75%,
            rgba(14, 11, 16, 1) 100%);
}

/* Horizontal tracking lines — VHS artifact */
.hero-tracking {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        linear-gradient(transparent 62%, rgba(212, 160, 154, 0.06) 62.5%, transparent 63%),
        linear-gradient(transparent 80%, rgba(122, 171, 170, 0.04) 80.5%, transparent 81%);
    animation: track-drift 18s ease-in-out infinite;
}

@keyframes track-drift {
    0% {
        background-position: 0 0%;
    }

    50% {
        background-position: 0 4%;
    }

    100% {
        background-position: 0 0%;
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 0 3rem 5rem;
    width: 100%;
}

/* Timecode + REC */
.hero-hud {
    position: absolute;
    top: 6rem;
    left: 2.5rem;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hud-rec {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: var(--dust-pink);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hud-rec .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dust-pink);
    animation: blink-rec 1.4s ease-in-out infinite;
}

@keyframes blink-rec {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.1;
    }
}

.hud-timecode {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    color: var(--dim-text);
    font-variant-numeric: tabular-nums;
}

/* SP mode tag */
.hud-sp {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--dim-text);
    opacity: 0.6;
}

/* Hero title */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 9rem);
    line-height: 1;
    letter-spacing: 0.06em;
    color: var(--warm-white);
    /* Chromatic aberration / colour bleed */
    text-shadow:
        -2px 0 2px rgba(212, 160, 154, 0.5),
        2px 0 2px rgba(122, 171, 170, 0.4);
}

.hero-sub {
    margin-top: 0.5rem;
    font-family: var(--font-display);
    font-size: clamp(1rem, 3vw, 1.5rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted-lavender);
    opacity: 0.85;
}

/* Hero corner label */
.hero-corner {
    position: absolute;
    bottom: 5.5rem;
    right: 2.5rem;
    z-index: 4;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--dim-text);
    text-align: right;
    line-height: 1.6;
}

/* ─────────────────────────────────────────
    SHARED SECTION LAYOUT
───────────────────────────────────────── */
.section {
    padding: 5rem 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.6rem;
    letter-spacing: 0.08em;
    color: var(--cream);
    line-height: 1;
}

.section-index {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--dim-text);
}

/* ─────────────────────────────────────────
    BIO SECTION
───────────────────────────────────────── */
.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

@media (max-width: 720px) {
    .bio-grid {
        grid-template-columns: 1fr;
    }
}

/* Image placeholder */
.image-slot {
    aspect-ratio: 4/5;
    background: var(--tape-mid);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.image-slot:not(:has(img))::before {
    content: '[ IMAGE ]';
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.1);
}

.image-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.7) contrast(0.9) brightness(0.95) sepia(0.08);
}

/* Tape-corner decoration */
.image-slot::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 2.5rem 2.5rem 0;
    border-color: transparent var(--tape-black) transparent transparent;
}

.bio-text p {
    margin-bottom: 1.4rem;
    color: var(--body-text);
    font-size: 1rem;
}

.bio-text p:last-child {
    margin-bottom: 0;
}

/* ─────────────────────────────────────────
    SOCIAL LINKS SECTION
───────────────────────────────────────── */
.social-strip {
    background: var(--tape-panel);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.social-strip .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    color: var(--body-text);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.social-link:hover {
    color: var(--cream);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.03);
}

.social-link i {
    font-size: 0.9em;
    opacity: 0.7;
}

/* ─────────────────────────────────────────
    CARDS (TAPE LIBRARY)
───────────────────────────────────────── */
.tape-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tape-card {
    background: var(--tape-panel);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s;
    position: relative;
}

.tape-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.tape-card-media {
    aspect-ratio: 16/10;
    background: var(--tape-mid);
    overflow: hidden;
    position: relative;
}

.tape-card-media:not(:has(img))::before {
    content: '[ IMAGE ]';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.08);
}

.tape-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.65) contrast(0.9) brightness(0.9) sepia(0.1);
    transition: filter 0.3s ease;
}

.tape-card:hover .tape-card-media img {
    filter: saturate(0.85) contrast(0.95) brightness(0.95) sepia(0.05);
}

.tape-card-body {
    padding: 1.2rem 1.3rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tape-number {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--dim-text);
    margin-bottom: 0.3rem;
}

.tape-card-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.06em;
    color: var(--cream);
    margin-bottom: 0.6rem;
    line-height: 1.1;
}

.tape-card-body p {
    font-size: 0.9rem;
    color: var(--dim-text);
    margin-bottom: 1.2rem;
    flex: 1;
}

.tape-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.12em;
    color: var(--cream);
    transition: background 0.2s, border-color 0.2s;
}

.tape-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.28);
}

/* ─────────────────────────────────────────
    YOUTUBE SECTION
───────────────────────────────────────── */
.yt-section {
    background: var(--tape-dark);
}

.yt-embed-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--tape-mid);
    overflow: hidden;
}

.yt-embed-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.yt-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.yt-placeholder i {
    font-size: 2.5rem;
    color: var(--dust-pink);
    opacity: 0.5;
}

.yt-placeholder p {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--dim-text);
}

.yt-meta {
    margin-top: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.yt-channel-link {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.14em;
    color: var(--muted-lavender);
    transition: color 0.2s;
}

.yt-channel-link:hover {
    color: var(--cream);
}

/* ─────────────────────────────────────────
    FOOTER
───────────────────────────────────────── */
.site-footer {
    background: var(--tape-black);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 2.5rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.14em;
    color: var(--dim-text);
}

.footer-copy {
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    color: var(--dim-text);
    opacity: 0.5;
}

.footer-socials {
    display: flex;
    gap: 1.2rem;
    list-style: none;
}

.footer-socials a {
    color: var(--dim-text);
    font-size: 1rem;
    transition: color 0.2s;
}

.footer-socials a:hover {
    color: var(--cream);
}

/* ─────────────────────────────────────────
    TIMECODE JS OUTPUT
───────────────────────────────────────── */
#timecode {
    min-width: 11ch;
}

/* ─────────────────────────────────────────
    SCROLLBAR STYLING
───────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--tape-black);
}

::-webkit-scrollbar-thumb {
    background: var(--tape-mid);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--tape-panel);
}

/* ─────────────────────────────────────────
    SELECTION
───────────────────────────────────────── */
::selection {
    background: var(--dust-pink);
    color: var(--tape-black);
}

/* ─────────────────────────────────────────
    RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 600px) {
    .hero-content {
        padding: 0 1.2rem 4rem;
    }

    .hero-hud {
        left: 1.2rem;
    }

    .section {
        padding: 3.5rem 1.2rem;
    }

    .social-strip .section {
        padding: 2.5rem 1.2rem;
    }

    .site-footer {
        padding: 2rem 1.2rem;
    }
}
