html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

/* About Panel Overlay */
#about-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    overflow-y: auto;
    /* Enable vertical scrolling */
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    padding: 80px 0;
    /* Space for close button and bottom */
}

#about-panel[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.about-close-btn {
    position: fixed;
    /* Fixed relative to viewport so it stays visible */
    top: 20px;
    right: 30px;
    font-size: 3rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
    line-height: 1;
}

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #333333;
    --container-width: 1400px;
    --font-main: "Inter", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.site-header {
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}



.site-nav ul {
    display: flex;
    gap: 1.25rem;
}

.site-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Sections */
.case-section {
    padding: 4.5rem 0;
}

.case-header {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 2rem;
}

.case-kicker {
    font-size: 0.9rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #777;
    padding-top: 0.35rem;
}

.case-title {
    font-size: 2.1rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
}



.case-desc {
    grid-column: 1 / -1;
    font-size: 1.1rem;
    color: #222;
    max-width: none;
    margin-top: 1rem;
}

.case-desc a {
    text-decoration: underline;
    text-underline-offset: 3px;
    color: inherit;
}

.case-desc a:hover {
    color: #555;
    text-decoration-color: #555;
}

/* Scroll reveal */
.fade {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.92);
    padding: 90px 20px 30px;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: min(1200px, 92vw);
    max-height: 78vh;
    object-fit: contain;
    animation: zoom 0.22s ease-out;
}

@keyframes zoom {
    from {
        transform: scale(0.96);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: fixed;
    top: 14px;
    right: 16px;
    color: #f1f1f1;
    font-size: 44px;
    line-height: 1;
    border: 0;
    background: transparent;
    cursor: pointer;
}

#caption {
    margin: 14px auto 0;
    width: min(700px, 92vw);
    text-align: center;
    color: #ccc;
    font-size: 0.95rem;
}

/* Marquee / Slideshow — BULLETPROOF */
.marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    will-change: transform;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);

    /* JS sets --marqueeDistance in px */
    animation: marquee-move 60s linear infinite;
}

/* DEFAULT: LEFT -> RIGHT (track moves from -distance to 0) */
@keyframes marquee-move {
    from {
        transform: translateX(var(--marqueeFrom, 0));
    }

    to {
        transform: translateX(var(--marqueeTo, 0));
    }
}

/* If you ever want RIGHT -> LEFT, use this instead:
@keyframes marquee-move {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(var(--marqueeDistance, 0px) * -1), 0, 0); }
}
*/

.marquee-track img,
.marquee-track video {
    height: 400px;
    width: auto;
    max-width: none;
    object-fit: cover;

    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

    /* grayscale */
    -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
    transition: transform 0.35s ease, filter 0.35s ease;

    will-change: transform, filter;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.marquee-track img:hover,
.marquee-track video:hover {
    transform: scale(1.02) translateZ(0);
    -webkit-filter: grayscale(0%);
    filter: grayscale(0%);
}

@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .site-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        /* Scrollbar space */
    }

    .site-nav ul {
        gap: 1.25rem;
        flex-wrap: nowrap;
        /* Horizontal scroll on very small screens */
    }

    .case-header {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .case-title {
        font-size: 1.7rem;
    }

    .case-desc {
        grid-column: 1 / -1;
        font-size: 1rem;
    }

    /* Resize marquee images/videos for mobile */
    .marquee-track img,
    .marquee-track video {
        height: 250px;
        /* Reduced from 400px */
        width: auto;
    }

    .marquee-track {
        gap: 2rem;
        /* Reduced gap */
    }

    .case-section {
        padding: 3rem 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none !important;
        transform: none !important;
    }
}

/* About Me Headshot & Layout */
.footer-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
    max-width: 1100px;
    flex-wrap: wrap;
    /* Allows stacking on smaller screens */
}

.about-headshot {
    /* Exact match for resized image */
    width: 300px;
    height: 300px;

    object-fit: cover;
    object-position: top center;
    border-radius: 50%;

    /* Standard grayscale */
    -webkit-filter: grayscale(100%);
    filter: grayscale(100%);

    transition: filter 0.3s ease, transform 0.3s ease;
}

.about-headshot:hover {
    transform: scale(1.03);
    -webkit-filter: grayscale(0%);
    filter: grayscale(0%);
}

.about-text p {
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.about-text {
    flex: 1;
    min-width: 300px;
    margin: 0;
}

@media (max-width: 900px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-headshot {
        width: 200px;
        height: 200px;
    }
}

/* Social Icon Styling */
.social-links a {
    display: inline-flex;
    color: #000;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: #555;
    transform: scale(1.1);
}

.social-links svg {
    width: 24px;
    height: 24px;
}