/* CSS Variables & Reset */
:root {
    --bg-color: #222222;
    --text-color: #afafaf;
    --text-light: #bfbfbf;
    --accent-color: #ffffff;
    --sidebar-width: 200px;
    --gutter: 24px;

    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-duration: 400ms;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Header Removed */


/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    /* Maintain 16:9 Aspect Ratio to match video */
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Responsive Vimeo Wrappers */
.vimeo-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.vimeo-wrapper iframe {
    width: 100vw;
    height: 56.25vw;
    /* Given a 16:9 aspect ratio, 9/16*100 = 56.25 */
    min-height: 100vh;
    min-width: 177.77vh;
    /* Given a 16:9 aspect ratio, 16/9*100 = 177.77 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Visibility Control */
.vimeo-wrapper.desktop {
    display: block;
}

.vimeo-wrapper.mobile {
    display: none;
}

/* Mobile Breakpoint: Switch Videos */
@media (max-width: 768px) {
    .hero-section {
        aspect-ratio: 1 / 1;
        height: auto;
        min-height: 0;
    }

    .vimeo-wrapper.desktop {
        display: none;
    }

    .vimeo-wrapper.mobile {
        display: block;
    }

    /* Mobile often has different Aspect Ratio (Square 1:1 requested) */
    .vimeo-wrapper.mobile iframe {
        width: 100%;
        height: 100%;
        min-width: 0;
        /* Reset inherited desktop styles */
        min-height: 0;
        /* Reset inherited desktop styles */
        position: absolute;
        top: 0;
        left: 0;
        transform: none;
        /* Reset transform */
    }

    /* iPhone SE / Mobile Typography & Spacing Fixes */
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.1;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-tagline {
        font-size: 0.6rem;
        line-height: 1.3;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .scroll-indicator {
        bottom: 5px;
        /* Keep base margin centering (left:0; right:0; margin:auto) */
    }

    .scroll-indicator .line {
        height: 23px;
    }

    .tablet-break {
        display: none;
        /* Hide tablet breaks on mobile */
    }
}

/* Tablet Refinements (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .filter-capsule {
        /* Increase from base. Base is scale(1). Mobile was 0.9. */
        /* User asked for +40% (total ~1.4 scale) */
        transform: scale(1.4);
        transform-origin: bottom right;
        bottom: 40px;
        /* Adjust spacing for larger size */
        right: 40px;
    }

    .profile-wrapper {
        /* Increase Avatar size by 40% */
        transform: scale(1.4);
        transform-origin: bottom left;
        bottom: 40px;
        left: 40px;
    }

    .site-logo {
        /* Increase by 20% */
        width: 14.4vw;
        /* Base 12vw * 1.2 = 14.4vw */
        max-width: none;
    }

    .hero-tagline .tablet-break {
        display: block;
        /* Force the 3-line break */
    }

    .scroll-indicator {
        bottom: 20px;
        /* Move down but keep base margin centering */
    }

    .scroll-indicator .line {
        height: 40px;
        /* Base 60 -> -35% = ~39px */
    }
}

/* Mobile Logo Specifics: Decrease 50%, Move Up 20% */
@media (max-width: 768px) {
    .site-logo {
        width: 60px;
        /* 50% of 120px */
        top: 25px;
        /* ~20% up from 32px (32 * 0.8 = ~25.6) */
    }
}

/* Fallback/Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    /* 30% opacity */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    opacity: 0;
    animation: fadeHero 800ms ease-out forwards 200ms;
}

.hero-title {
    font-size: 4rem;
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-style: italic;
    color: #ff6f00;
    /*letter-spacing: -0.02rem;*/
    margin-bottom: 4px;
}

.hero-tagline {
    font-size: 1.25rem;
    font-weight: 300;
    color: white;
    opacity: 0.9;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: max-content;
    z-index: 10;
    /* Safe z-index */
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeScrollIndicator 800ms ease-out forwards 1000ms;
    cursor: pointer;
    /* Indication it's clickable */
    text-decoration: none;
    /* No underline */
}

.scroll-indicator span {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.4);
}

@keyframes fadeHero {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Separate animation for scroll indicator - no transform to avoid centering conflicts */
@keyframes fadeScrollIndicator {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Site Logo */
.site-logo {
    position: fixed;
    top: 32px;

    /* Mobile: Center Logo */
    left: 50%;
    transform: translateX(-50%);

    /* Matched to Avatar Base Size */
    width: 120px;
    /* Wider for text logo */
    height: auto;
    z-index: 200;
    opacity: 0.7;
    /* Full opacity for text */
    display: flex;
    /* Center image */
    align-items: center;
    justify-content: flex-start;
    /* Align left */
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

/* Hide logo on mobile when project modal is open */
@media (max-width: 767px) {
    body.project-modal-open .site-logo {
        opacity: 0;
        pointer-events: none;
    }
}

.site-logo:hover {
    opacity: 1;
}

.site-logo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    /* Fix for "broken" image */
}

/* Profile Avatar Trigger */
/* Filter Capsule */
.filter-capsule {
    position: fixed;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    /* User req: More transparent (from 0.6 to 0.4) */
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-btn:hover {
    color: white;
}

.filter-btn.active {
    background-color: #ff6f00;
    color: white;
    font-weight: 600;
}

/* Mobile Layout Default */
.filter-capsule {
    /* Center align with Avatar (64px height, bottom 24px) */
    /* Avatar Center = 24px + 32px = 56px from bottom */
    /* Filter approx 46px height. To center at 56px: 56 - 23 = 33px */
    bottom: 33px;
    right: 24px;

    /* User req: Smaller on mobile */
    transform: scale(0.9);
    transform-origin: bottom right;
}

/* Profile Avatar Wrapper */
.profile-wrapper {
    position: fixed;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Align Left */
    gap: 16px;

    /* Mobile: Bottom Left (Aligned with Logo) */
    bottom: 24px;
    left: 24px;
    right: auto;

    /* Animation State */
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}

.profile-trigger {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: #333;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.profile-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Label Styling */
.profile-label {
    display: none;
    /* Hidden on Mobile/Tablet (No Hover) */
    background-color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 1.25rem;
    /* User requested 1.25rem */
    font-weight: 600;
    color: #ff6f00;
    text-transform: lowercase;
    /* User requested lowercase */
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

/* Tablet: Move to Left (as soon as grid is > 1 column) */
@media (min-width: 768px) {
    .profile-wrapper {
        left: 32px;
        right: auto;
        align-items: flex-start;
        /* Align to Left edge matching Logo */
    }

    .profile-trigger {
        width: 7vw;
        height: 7vw;
    }

    .site-logo {
        width: 12vw;
        /* Wider for text */
        height: auto;
        /* Natural height */
    }
}

/* Show label on wrapper hover */
.profile-wrapper:hover .profile-label {
    opacity: 1;
    transform: translateY(0);
}

/* Desktop: Avatar Position & Size correction */
@media (min-width: 1200px) {

    /* Filter Desktop Positioning */
    .filter-capsule {
        bottom: auto;
        right: auto;
        top: 32px;
        left: 50%;
        transform: translateX(-50%) translateY(-100px);
        /* Start hidden (slide up) */
        opacity: 0;
        pointer-events: none;
    }

    .filter-capsule.visible {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .site-logo {
        width: 8vw;
        /* Desktop width */
        height: auto;
        /* Match Avatar Height Logic removed */
        max-width: 130px;
        /* Cap width */
        max-height: none;

        top: 32px;
        left: 32px;
        transform: none;
        /* Reset mobile centering */
        /* Aligned with Avatar */
    }

    /* img styles inherited from base: object-fit: cover */

    .profile-wrapper {
        top: 80vh;
        /* Position at 80% down the screen */
        left: 32px;
        bottom: auto;

        /* Initial State: Hidden/Off-screen for scroll animation */
        opacity: 0;
        /* Start slightly to the left for the slide-in effect */
        transform: translateX(-40px);
        pointer-events: none;
    }

    .profile-wrapper.visible {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }

    /* Desktop Alignment Explicit - use base margin centering, no transform override */
    .scroll-indicator {
        bottom: 40px;
        /* Standard Desktop Spacing */
    }

    .profile-trigger {
        width: 5vw;
        /* 5% of screen width */
        height: 5vw;
        max-width: 72px;
        /* Cap size at 1440px viewport */
        max-height: 72px;
        /* Keep it circular */
        border-radius: 50%;
        /* Circle */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .profile-label {
        display: block;
        /* Restore on Desktop */
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%) translateX(10px);
        margin-left: 16px;
    }

    .profile-wrapper:hover .profile-label {
        transform: translateY(-50%) translateX(0);
    }
}

.profile-trigger:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.profile-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: white;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    padding: 40px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 24px;
}

.modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content h2 {
    font-size: 24px;
    color: #ff6f00;
    margin-bottom: 12px;
}

.modal-bio {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 32px;
    text-align: left;
}

.email-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
    /* Space after social icons */
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    /* Prevent layout shift during text swap */
}

.email-copy-btn:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.email-copy-btn .copy-label {
    display: none;
    font-weight: 600;
}

.email-copy-btn:hover .email-text {
    display: none;
}

.email-copy-btn:hover .copy-label {
    display: block;
}

.email-copy-btn:active {
    transform: scale(0.98);
}

.email-copy-btn.copied {
    background-color: #00bf63;
    /* Success Green */
    border-color: #00bf63;
    color: white;
}

.email-copy-btn.copied .copy-label {
    display: block;
}

.email-copy-btn.copied .email-text {
    display: none;
}

.email-copy-btn.copied .copy-label {
    visibility: hidden;
    position: relative;
}

.email-copy-btn.copied .copy-label::after {
    content: "Copied!";
    visibility: visible;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    color: #fff;
    font-size: 1rem;
}

.modal-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 24px;
}

.modal-links a {
    color: #1a1a1a;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-links a:hover {
    transform: translateY(-2px);
    opacity: 0.7;
}

/* Main Content & Grid */
.main-content {
    position: relative;
    background-color: var(--bg-color);
    padding-top: 48px;
    /* Separation from hero */
    padding-bottom: 120px;
    min-height: 100vh;
    z-index: 10;
}

/* Grid Masonry Layout (row-first, variable height) */
.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 1px;
    column-gap: 16px;
    row-gap: 0;
    width: 90%;
    padding: 16px;
    margin: 5%;
    max-width: none;
}

/* Tablet */
@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
        padding: 24px;
    }
}

/* Image Tiles & Aspect Ratios */
.project-tile {
    /* Strict MVSM Specs */
    width: 100%;
    height: auto;

    position: relative;
    background-color: #f0f0f0;
    cursor: pointer;
    opacity: 1;
    /* Force visible */
    transform: none;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    /* Grid masonry: row span is set dynamically via JS */
    align-self: start;

    /* Rounded Corners */
    border-radius: 4px;
    overflow: hidden;
}

/* Aspect Ratio Utilities Removed - Letting images define height */

.image-wrapper {
    /* Strict MVSM Specs */
    width: 100%;
    height: auto;
    overflow: hidden;
    /* Removed min-height as requested */
}

.image-wrapper img,
.image-wrapper video {
    /* Strict MVSM Specs */
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-tile:hover .image-wrapper img,
.project-tile:hover .image-wrapper video {
    transform: scale(1.02);
    /* Subtle zoom */
}

.tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    /* Requirement: 0.15 opacity */
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    color: white;
}

.project-tile:hover .tile-overlay {
    opacity: 1;
}

.project-tile:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    z-index: 2;
    /* Bring forward slightly */
}

.overlay-content {
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.project-tile:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.overlay-content span {
    display: block;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
}

/* Footer */
.site-footer {
    padding: 64px;
    background-color: #222;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.site-footer .social-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

/* Utilities */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: white;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        /* Hide for scope of this MVP */
    }

    /* FINAL Mobile Typography Overrides - Must be at end for cascade */
    .hero-title {
        font-size: 1.75rem !important;
        /* Force override */
        line-height: 1.1;
    }

    .hero-tagline {
        font-size: 0.9rem !important;
        line-height: 1.3;
    }

    .scroll-indicator {
        bottom: 5px;
        /* Keep base margin centering */
    }

    .scroll-indicator .line {
        height: 23px;
    }

    .site-logo {
        width: 80px !important;
        top: 25px !important;
    }
}

/* ============================================
   PROJECT DETAIL MODAL
   ============================================ */

.project-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 150;
    display: flex;
    align-items: flex-end;
    /* Modal touches bottom */
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

.project-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.project-modal-content {
    position: relative;
    display: flex;
    flex-direction: row;
    width: 95%;
    max-width: 1500px;
    height: 85vh;
    background: #f5f5f5;
    /* Match gallery background */
    border-radius: 12px 12px 0 0;
    /* Rounded top only */
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    color: #232323;
    /* All text color */
}

.project-modal-overlay.active .project-modal-content {
    transform: translateY(0);
}

/* Close Button - now a sibling of modal-content */
.project-modal-close {
    position: absolute;
    /* Calculate position relative to modal-content on desktop */
    /* Modal-content is 95% width, max 1500px, centered */
    top: calc(15vh/2 + 20px);
    /* 85vh modal + some offset for top */
    right: calc((100% - min(95%, 1500px)) / 2 + 20px);
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #232323;
    z-index: 160;
}

.project-modal-close:hover {
    background: #eee;
    border-color: rgba(0, 0, 0, 0.2);
}

/* Left Column - Fixed Info */
.modal-left {
    width: 38%;
    min-width: 320px;
    padding: 40px;
    padding-top: 80px;
    /* Space for close button */
    background: #f5f5f5;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-left::-webkit-scrollbar {
    display: none;
}

/* Title */
.project-modal-title {
    font-size: 32px;
    font-weight: 900;
    /* Black weight */
    color: #232323;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Metadata Grid - Two Column Layout */
.project-modal-metadata {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Meta Columns for Desktop */
.meta-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.meta-item {
    flex: 1;
}

.meta-label {
    display: block;
    font-size: 14px;
    text-transform: lowercase;
    /* Lowercase labels */
    letter-spacing: 1px;
    color: #232323;
    opacity: 0.6;
    margin-bottom: 4px;
}

.meta-value {
    display: block;
    font-size: 15px;
    font-weight: 900;
    /* Black weight */
    color: #232323;
}

/* Credits Section */
.meta-credits {
    flex: 1;
}

.meta-credits .meta-label {
    font-size: 15px;
    /* Slightly larger */
    font-weight: 400;
    /* Regular weight */
    margin-bottom: 8px;
}

.credits-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credit-item {
    display: flex;
    flex-direction: column;
}

.credit-role {
    font-size: 15px;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    color: #232323;
    opacity: 0.6;
}

.credit-name {
    font-size: 16px;
    font-weight: 900;
    /* Black weight */
    color: #232323;
}

/* Info Section */
.project-modal-info {
    margin-top: 8px;
    /* Close to metadata */
}

.project-modal-info .meta-label {
    font-size: 15px;
}

.info-text {
    font-size: 15px;
    line-height: 1.6;
    color: #232323;
    font-style: italic;
    font-weight: 300;
    /* Light weight */
    margin: 8px 0 0 0;
}

.project-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #ff6f00;
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.project-link:hover {
    opacity: 1;
}

/* Right Column - Gallery */
.modal-right {
    flex: 1;
    overflow-y: auto;
    background: #f5f5f5;
    padding: 16px;
    padding-top: 80px;
    /* Match left column */
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-right::-webkit-scrollbar {
    display: none;
}

.modal-right img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Desktop & Tablet Layout (768px+) */
@media (min-width: 768px) {
    .modal-left {
        text-align: left;
    }

    .project-modal-info {
        text-align: left;
        /* Info stays left-aligned */
    }

    /* Two-column metadata layout on desktop */
    .project-modal-metadata {
        flex-direction: row;
        gap: 40px;
        align-items: flex-start;
    }

    .meta-column-left {
        flex: 1;
        text-align: left;
    }

    .meta-column-right {
        flex: 1;
        text-align: left;
    }

    .meta-column-left .meta-item {
        align-items: flex-start;
    }

    .credits-list {
        align-items: flex-start;
    }

    .credit-item {
        align-items: flex-start;
    }
}

/* Mobile Only (<768px) */
@media (max-width: 767px) {
    .project-modal-content {
        flex-direction: column;
        height: 90vh;
        width: 95%;
        overflow-y: auto;
        /* Full modal scrolls */
        /* Hide scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .project-modal-content::-webkit-scrollbar {
        display: none;
    }

    .modal-left {
        width: 100%;
        min-width: auto;
        padding: 24px;
        padding-top: 80px;
        flex-shrink: 0;
        overflow-y: visible;
        /* Let parent scroll */
    }

    .modal-right {
        padding-top: 16px;
        overflow-y: visible;
        /* Let parent scroll */
        min-height: auto;
    }

    .project-modal-title {
        font-size: 24px;
    }

    .meta-row {
        flex-direction: column;
        gap: 16px;
    }

    /* Mobile: Close button fixed at bottom-right, aligned with avatar */
    /* Must be positioned relative to viewport, not modal content */
    .project-modal-overlay.active .project-modal-close {
        position: fixed;
        top: auto !important;
        left: auto !important;
        bottom: 24px;
        right: 24px;
        width: 56px;
        height: 56px;
        font-size: 32px;
        border-radius: 50%;
        background: white;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        z-index: 200;
    }
}

/* Small Mobile (<480px) */
@media (max-width: 480px) {
    .project-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .modal-left {
        padding: 20px;
        padding-top: 40px;
    }

    .project-modal-title {
        font-size: 20px;
    }
}

/* ============================================
   GALLERY FULLSCREEN IMAGE PREVIEW
   ============================================ */

/* Gallery Image Wrapper */
.gallery-image-wrapper {
    position: relative;
    cursor: pointer;
}

.gallery-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: filter 0.2s ease;
}

/* Fullscreen Button on Images */
.fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 5;
}

.fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

.gallery-image-wrapper:hover .fullscreen-btn {
    opacity: 1;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Hide fullscreen on mobile - no hover */
@media (max-width: 1023px) {
    .fullscreen-btn {
        display: none;
    }
}

/* ============================================
   GALLERY VIDEO
   ============================================ */

.gallery-video-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.gallery-video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}

/* Centered Play Button */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease, background 0.2s ease;
    z-index: 5;
    pointer-events: auto;
}

.video-play-btn svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
    /* optical center for triangle */
}

.video-play-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

/* Fading out state */
.video-play-btn.fading {
    opacity: 0;
}

/* Hidden state (playing) */
.video-play-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Fullscreen button - top right, appears on hover */
.video-fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 6;
}

.video-fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

.gallery-video-wrapper:hover .video-fullscreen-btn {
    opacity: 1;
}

.video-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* Vimeo Embed Wrapper */
.gallery-vimeo-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.gallery-vimeo-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Transparent overlay to capture clicks (iframes swallow mouse events) */
.vimeo-click-shield {
    position: absolute;
    inset: 0;
    z-index: 4;
    cursor: pointer;
}

.gallery-vimeo-wrapper:hover .video-fullscreen-btn {
    opacity: 1;
}

/* ============================================
   IMAGE LIGHTBOX (Fullscreen Overlay)
   ============================================ */

.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

.image-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}
