/* ── LAYOUT ──────────────────────────────────────────── */

main {
    height: 100vh;
    padding-top: var(--header-h);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

main a {
    text-decoration: none;
    color: var(--ink);
}

main a:hover {
    color: var(--ink);
}

/* ── LEFT PANEL ──────────────────────────────────────── */

.left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 3vw, 3rem) clamp(2rem, 3vw, 3rem) clamp(2rem, 3vw, 3rem) clamp(2.5rem, 4vw, 4rem);
    opacity: 0;
    animation: fadeUp 0.7s ease 0.3s forwards;
}

.eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(3rem, 4vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: clamp(0.95rem, 0.8vw, 1.25rem);
    font-weight: 300;
    color: var(--muted);
    margin-bottom: 2.5rem;
    letter-spacing: 0.02em;
}

/* ── RIGHT PANEL ─────────────────────────────────────── */

.right {
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 0.9s ease 0.5s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 3rem 3rem 2.5rem;
    gap: 0.5rem;
}

.image-figure img {
    max-width: 100%;
    max-height: calc(100% - 2rem);
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 1;
}

.image-figure figcaption {
    font-family: 'retro', sans-serif;
    font-size: clamp(0.4rem, 0.5vw, 0.55rem);
    letter-spacing: 0.1em;
    color: var(--muted);
    opacity: 0.7;
    text-align: center;
    flex-shrink: 0;
}

.image-figure figcaption a {
    text-decoration: none;
    color: var(--ink);
}

.image-figure figcaption a:hover, 
.image-figure figcaption a:focus, 
.image-figure figcaption a:active {
    color: var(--ink);
}

/* ── HAMBURGER (about page uses drawer.css for drawer itself) */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--ink);
    transition: 0.3s;
}

/* ── TABLET (<=1024px): single-column, image on top ───── */

@media (max-width: 1024px) {
    html, body {
        overflow: auto;
        height: auto;
    }

    main {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
        min-height: unset;
        padding-bottom: 40px;
    }

    .left {
        padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vw, 3rem) clamp(2rem, 4vw, 3rem);
        order: 1;
        justify-content: flex-start;
    }

    .right {
        order: 0;
        height: auto;
    }

    .image-figure {
        height: auto;
        padding: 1.5rem 0.5rem 0.5rem;
    }

    .image-figure img {
        width: 100%;
        height: auto;
        max-height: 40vw;
        object-fit: contain;
        object-position: center bottom;
    }

    .image-figure figcaption {
        margin-bottom: 0.25rem;
    }

    nav { display: none; }
    .hamburger { display: flex; }
}

/* ── PHONE (<=480px): tighter padding, smaller text ───── */

@media (max-width: 480px) {
    .left {
        padding: 1.5rem 1.25rem 2.5rem;
    }

    .eyebrow {
        font-size: 0.6rem;
        margin-bottom: 0.6rem;
    }

    .subtitle {
        font-size: clamp(0.75rem, 0.75vw, 0.95rem);
        margin-bottom: 1.5rem;
    }

    h1 {
        font-size: clamp(2rem, 3vw, 4rem);
    }
    
    .image-figure img {
        width: 100%;
        height: auto;
        max-height: 70vw;
        object-fit: contain;
        object-position: center bottom;
    }
}

body.dark .image-figure figcaption {
    color: var(--muted);
}

body.dark .image-figure figcaption a {
    color: var(--white);
}