/* ─────────────────────────────────────────────────
   HOME — HERO
───────────────────────────────────────────────── */

#hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-hero);
    background-color: #161310;
    isolation: isolate;

    & .hero-media,
    & .hero-overlay {
        position: absolute;
        inset: 0;
    }

    & .hero-media {
        z-index: 0;
        margin: 0;

        & img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            display: block;
            transform: scale(1.015);
        }
    }

    & .hero-overlay {
        z-index: 1;
        background:
            radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.26) 0 30%, rgba(0, 0, 0, 0.62) 72%),
            linear-gradient(180deg, rgba(0, 0, 0, 0.36) 0%, var(--color-hero-overlay) 54%, rgba(0, 0, 0, 0.58) 100%);
    }

    & .hero-content {
        position: relative;
        z-index: 2;
        width: min(100%, 72rem);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        color: #fff;

        @media (min-width: 48rem) {
            margin-top: clamp(3rem, 7vh, 5.5rem);
        }
    }

    & h1 {
        font-family: var(--font-sans);
        font-size: clamp(2.9rem, 12vw, 5.25rem);
        font-weight: 800;
        line-height: 0.96;
        letter-spacing: -0.025em;
        color: #fff;
        max-width: 12.8ch;
        margin-inline: auto;
        margin-bottom: clamp(1.25rem, 2.7vw, 2rem);
        text-wrap: balance;

        @media (min-width: 48rem) {
            font-size: clamp(4.35rem, 5.8vw, 6.5rem);
            max-width: 18.5ch;
        }
    }

    & .hero-description {
        font-family: var(--font-sans);
        font-size: clamp(0.875rem, 1.35vw, 1.0625rem);
        line-height: 1.4;
        color: rgba(255, 255, 255, 0.72);
        max-width: 35rem;
        margin-bottom: clamp(2rem, 4.8vw, 4.5rem);
        text-wrap: balance;

        @media (min-width: 48rem) {
            max-width: 34rem;
            margin-inline: auto;
            font-weight: 500;
        }

        & em {
            font-style: normal;
            font-weight: 800;
            color: #fff;
        }
    }

    & .hero-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;

        @media (min-width: 48rem) {
            gap: 0.9rem;
        }
    }

    @media (max-width: 47.999rem) {
        & .hero-media img {
            object-position: 50% 50%;
        }

        & .hero-actions {
            width: min(100%, 22rem);
        }

        & .hero-actions .button {
            flex: 1 1 10rem;
            justify-content: center;
        }
    }
}


/* ─────────────────────────────────────────────────
   HOME — SELECTED WORKS HEADING
───────────────────────────────────────────────── */

#projects {
    & > hgroup {
        & h2 {
            font-family: var(--font-sans);
            font-size: clamp(4.5rem, 6.4vw, 5.75rem);
            font-weight: 800;
            letter-spacing: -0.025em;
            line-height: 1.05;
            color: var(--color-fg);
        }
    }
}


/* ─────────────────────────────────────────────────
   PLAY — FREEFORM CANVAS
───────────────────────────────────────────────── */

/* Dark grid canvas fills the full viewport */
.play-wrapper {
    position: fixed;
    inset: 0;
    overflow: hidden;
    cursor: grab;
    background-color: #141414;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 32px 32px;
    touch-action: none;
}

.play-wrapper.is-dragging {
    cursor: grabbing;
}

/* The large virtual canvas (JS translates this) */
.play-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 2400px;
    height: 1600px;
    will-change: transform;
}

/* Ghost headline — large decorative text centered on canvas */
.play-headline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    user-select: none;
    display: flex;
    flex-direction: column;
    line-height: 0.88;
    white-space: nowrap;
}

.play-headline span:first-child {
    font-family: var(--font-sans);
    font-size: clamp(6rem, 14vw, 14rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: rgba(255, 255, 255, 0.07);
}

.play-headline span:last-child {
    font-family: var(--font-sans);
    font-size: clamp(5rem, 12vw, 12rem);
    font-weight: 800;
    font-style: italic;
    letter-spacing: -0.03em;
    color: rgba(255, 255, 255, 0.045);
}

/* Individual image cards */
.play-card {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    transform: rotate(var(--r));
    border-radius: 10px;
    overflow: hidden;
    margin: 0;
    background: #fff;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.5),
        0 12px 40px rgba(0, 0, 0, 0.45);
    transition: box-shadow 220ms ease, transform 220ms ease;
    z-index: 1;
}

.play-card:hover {
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.65),
        0 20px 56px rgba(0, 0, 0, 0.6);
    transform: rotate(var(--r)) scale(0.98);
    z-index: 10;
}

.play-card img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Placeholder cards are hidden until an src is provided */
.play-card--placeholder {
    display: none;
}

/* "DRAG TO MOVE" hint pill at bottom center */
.play-hint {
    position: fixed;
    bottom: 2.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 500ms ease;
}

.play-hint.is-hidden {
    opacity: 0;
}

/* Nav overrides — dark glass pill on the dark canvas */
.play-page .site-header {
    background: transparent;
}

.play-page .site-nav {
    background: rgba(18, 18, 18, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, 0.1);
}

.play-page .site-nav .nav-links a,
.play-page .site-nav .nav-logo,
.play-page .site-nav .nav-toggle span {
    color: rgba(255, 255, 255, 0.82);
}

.play-page .site-nav .nav-toggle span {
    background-color: rgba(255, 255, 255, 0.82);
}


/* ─────────────────────────────────────────────────
   ABOUT PAGE
───────────────────────────────────────────────── */

.about-page {
    background: #fff;

    @media (max-width: 47.999rem) {
        & .site-header .site-nav .nav-logo img {
            filter: none;
        }

        & .site-header .site-nav .nav-toggle span {
            background: var(--color-fg);
        }
    }
}

.about-main {
    padding: 0.5rem;
    padding-top: 3.85rem;

    @media (min-width: 48rem) {
        padding: 3rem 1.4rem 0;
        padding-top: 5rem;
    }
}

.about-page .site-footer {
    margin-top: 0;
}

.about-page .section-label {
    font-size: clamp(0.42rem, 0.58vw, 0.5rem);
    letter-spacing: 0.1em;
    color: rgba(0, 0, 0, 0.58);
}

.about-shell {
    background: var(--color-hero-bg);
    border-radius: clamp(0.9rem, 2.1vw, 1.3rem);
    padding: 1.8rem 0.95rem 2rem;

    @media (min-width: 48rem) {
        width: min(100%, 76rem);
        margin-inline: auto;
        padding: 2.95rem 1.1rem 1.85rem;
    }
}

.about-intro {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 1.15rem;
    margin-bottom: 2.35rem;

    & h1 {
        max-width: 18ch;
        font-family: var(--font-sans);
        font-size: clamp(1.92rem, 5vw, 2.95rem);
        font-weight: 700;
        line-height: 1.05;
        letter-spacing: -0.02em;
    }
}

.about-portrait {
    width: clamp(6.9rem, 18vw, 8.5rem);
    aspect-ratio: 1 / 1;
    border-radius: 0.55rem;
    overflow: hidden;
    margin: 0;
    background: #d9d9d9;

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}

.about-bio {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2.25rem;
}

.about-row {
    display: grid;
    grid-template-columns: minmax(0, 5.2rem) minmax(0, 1fr);
    align-items: start;
    gap: 0.55rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.13);

    & .about-row-label {
        font-family: var(--font-mono);
        font-size: 0.45rem;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        color: rgba(0, 0, 0, 0.62);
    }

    & p:last-child {
        font-family: var(--font-ui);
        font-size: clamp(0.565rem, 1.18vw, 0.8125rem);
        line-height: 1.28;
        max-width: 65ch;
    }

    @media (min-width: 48rem) {
        grid-template-columns: minmax(0, 6.2rem) minmax(0, 40rem);
        gap: 0.75rem;
        justify-content: center;
        padding: 0.78rem 0;

        & .about-row-label {
            font-size: 0.47rem;
        }

        & p:last-child {
            font-size: clamp(0.66rem, 0.8vw, 0.76rem);
            line-height: 1.3;
        }
    }
}

.about-experience {
    margin-bottom: 2.25rem;
    text-align: center;

    & hgroup {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 0.65rem;
    }

    & h2 {
        font-family: var(--font-sans);
        font-size: clamp(2rem, 4.2vw, 2.7rem);
        line-height: 1.05;
        letter-spacing: -0.02em;
    }

    & .section-label {
        margin-bottom: 0.15rem;
    }
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.72rem;

    @media (min-width: 48rem) {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.5rem;
    }
}

.experience-card {
    background: #ebebeb;
    border-radius: 0.6rem;
    padding: 0.58rem 0.65rem;
    min-height: 3.15rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.1rem;

    & .experience-role {
        font-family: var(--font-ui);
        font-size: clamp(0.58rem, 1.12vw, 0.74rem);
        font-weight: 600;
    }

    & .experience-meta {
        font-family: var(--font-mono);
        font-size: clamp(0.44rem, 0.78vw, 0.54rem);
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: rgba(0, 0, 0, 0.6);
    }
}

.about-resume-button {
    background: #d07ceb;
    color: #050505;
    border: 0;
    min-height: 2.05rem;
    padding: 0.42rem 1.05rem;
    font-size: clamp(0.47rem, 0.72vw, 0.62rem);

    &:hover {
        background: #c46edf;
    }
}

.about-life {
    text-align: center;

    & hgroup {
        margin-bottom: 1rem;
    }

    & h2 {
        font-family: var(--font-sans);
        font-size: clamp(2rem, 4.2vw, 2.7rem);
        line-height: 1.05;
        letter-spacing: -0.02em;
    }
}

.about-life-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;

    & li {
        border-radius: 0.5rem;
        overflow: hidden;
        aspect-ratio: 0.9 / 1;
        background: #d5d5d5;
    }

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    @media (min-width: 48rem) {
        gap: 0.48rem;

        & li {
            border-radius: 0.6rem;
            aspect-ratio: 0.95 / 1;
        }
    }
}

.about-page .site-footer .footer-layout {
    padding-top: 2.2rem;
    padding-bottom: 1.35rem;
    min-height: 0;

    @media (min-width: 48rem) {
        padding-top: 3.15rem;
        padding-bottom: 2.5rem;
        min-height: 20rem;
    }
}

.about-page .site-footer .footer-logomark img {
    width: clamp(6.5rem, 26vw, 8rem);

    @media (min-width: 48rem) {
        width: clamp(10rem, 14.5vw, 13rem);
    }
}

.about-page .site-footer .footer-heading p {
    font-size: clamp(0.47rem, 0.72vw, 0.62rem);
}

.about-page .site-footer .footer-email {
    font-size: clamp(1.55rem, 3.1vw, 2.1rem);
}

.about-page .site-footer .footer-social {
    @media (min-width: 48rem) {
        margin-top: 0.2rem;
    }
}

.about-page .site-footer .footer-micro {
    padding-top: 0.85rem;
}
