@charset "UTF-8";

/* ==========================================================================
   1. CORE VARIABLES & RESET (Refined Charcoal Palette)
   ========================================================================== */
:root {
    /* Rich Charcoal Neutrals */
    --bg: #121212;
    --section-bg: #1c1c1c; /* Slightly lighter for depth */
    --accent: #d4af37;      /* Keeping your Gold/Bronze accent */
    --text-main: #f0f0f0;   /* Off-white for readability */
    --text-dim: #9ca3af;    /* Slate-tinted grey */
    --border: #2e2e2e;
    
    --frame-size: 0px;
    --nav-height: 80px;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text-main);
    /* Letter spacing improved for high-end look */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.01em; 
    overflow: hidden; 
    cursor: default;
    -webkit-tap-highlight-color: transparent;
}

.nav-btn, .nav-icon-link, .dropdown-content a, .home-btn {
    cursor: pointer;
}

/* ==========================================================================
   5. PORTFOLIO PAGE STYLING (Modernized Hierarchy)
   ========================================================================== */

.ProjectDescription { 
    font-size: 1.25rem; /* Slightly smaller for better balance */
    font-weight: 700; 
    color: var(--text-main); 
    text-transform: uppercase; 
    letter-spacing: 0.1em;
    margin-top: 40px;
    margin-bottom: 8px;
    background: transparent; /* Removed block background for cleaner look */
    text-align: left; /* Aligned left for better readability in text-heavy pages */
    padding: 0;
}

.ProjectDetails { 
    font-size: 0.95rem;
    font-weight: 400; 
    line-height: 1.6; /* Increased leading for readability */
    color: var(--text-dim); 
    margin-top: 0px;
    margin-bottom: 40px;
    background: transparent;
    text-align: left;
    padding: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 30px;
}



/* ==========================================================================
   5. RESUME CONTENT & GRID
   ========================================================================== */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; background-color: var(--bg); }
.scroll-area { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; height: 100%; }

.container { 
    max-width: 1100px; /* Tighter container for better line lengths */
    margin: 0 auto; 
    padding: 120px 40px 100px 40px; 
}

header { 
    text-align: left; /* Shifted to left-align for a modern "Studio" feel */
    margin-bottom: 60px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid var(--border); 
}

h1 { 
    font-size: 3.2rem; 
    font-weight: 900; 
    text-transform: uppercase; 
    letter-spacing: -0.03em;
    margin: 0; 
    line-height: 0.9;
}

.roles {
    font-size: 1.1rem; 
    font-weight: 500; 
    color: var(--accent); 
    text-transform: uppercase; 
    letter-spacing: 0.2em;
    margin-top: 12px; 
}

h2 { 
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: transparent;
    color: var(--accent);
    padding: 0;
    border-left: none; /* Removed thick border for a more minimal look */
    margin-top: 50px;
    margin-bottom: 20px;
}

.skills-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Responsive grid */
    gap: 24px; 
}

.skill-label { 
    font-weight: 700; 
    color: var(--text-main); 
    text-transform: uppercase; 
    font-size: 0.75rem; 
    letter-spacing: 0.05em;
    margin-bottom: 8px; 
}

.experience-block { 
    margin-bottom: 40px; 
    padding-bottom: 20px;
}

.exp-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
    margin-bottom: 10px;
}

.company-name { 
    font-size: 1.25rem; 
    font-weight: 700; 
    color: var(--text-main); 
}

.date-loc { 
    color: var(--text-dim); 
    font-size: 0.85rem; 
    font-weight: 500; 
}

ul { list-style: none; padding: 0; }
li { 
    margin-bottom: 10px; 
    padding-left: 20px; 
    position: relative; 
    color: var(--text-dim); 
    line-height: 1.5;
    font-size: 0.95rem;
}

li::before { 
    content: ""; 
    position: absolute; 
    left: 0; 
    top: 10px;
    width: 6px;
    height: 1px; /* Minimalist dash instead of a bullet */
    background-color: var(--accent); 
}




/* ==========================================================================
   2. Resume PDF downloading
   ========================================================================== */

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    /* Using a bright white or very light blue for visibility */
    color: #ffffff !important; 
    border: 1.5px solid #ffffff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
}

.download-btn:hover {
    background-color: #ffffff;
    color: #1e293b !important; /* Switch text to dark on hover */
}

/* Ensure the icon scales with the text */
.download-btn svg {
    stroke: currentColor;
}

@media print {
    .no-print { display: none !important; }
}



/* ==========================================================================
   2. THE PAGE FRAME
   ========================================================================== */
.page-frame {
    position: relative;
    height: 100vh;
    width: 100vw;
    border: var(--frame-size) solid black; 
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

/* ==========================================================================
   3. NAVIGATION (GENERAL / DESKTOP)
   ========================================================================== */
.nav-strip {
    position: relative;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center; 
    justify-content: space-between;
    z-index: 1000; 
    background: black;
    border-bottom: 1px solid var(--border);
}

.nav-logo-section, 
.nav-links, 
.nav-contact-section {
    position: relative;
    z-index: 1001; /* Keeps these slightly above the strip background */
}


.nav-strip.glass-nav {
    position: absolute;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .nav-strip.glass-nav {
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}


.nav-logo-section {
    flex: 1; /* Keeps the logo on the left */
    display: flex;
    align-items: center;
    min-width: 120px;

}
.nav-logo-section > * + * {
    margin-left: 15px;
}


.nav-contact-section {
    flex: 1; /* Keeps the right side balanced */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* CRITICAL: Change from flex-end to flex-start */
    padding-left: 10px; /* Adjust this for the gap between the last button and the icon */
    min-width: 120px;
}


.nav-logo {
    padding-left: 30px;
    color: white;
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    white-space: nowrap;
    text-transform: uppercase;
    /* ADD THIS LINE BELOW TO LOCK IT IN */
    letter-spacing: -0.03em; 
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex: 0 0 auto; /* Ensures this group only takes up the space it needs */
}


.nav-links > * { 
        margin: 0 6px !important; 
    }

.nav-btn {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.nav-btn:hover, .nav-btn.active-dropdown {
    color: var(--accent) !important;
}

.nav-icon-link {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-icon-link:hover { color: var(--accent); }

/* Keep the "behavior" shared */
.nav-icon, 
.nav-icon-link svg {
    display: block;
}

/* Set individual base sizes */
.nav-icon {
    width: 20px;
    height: 20px;
}

.nav-icon-link svg {
    width: 20px;
    height: 20px;
}

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: block; 
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px); 
    background-color: rgba(0, 0, 0, 0.9); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 200px;
    border: 1px solid var(--border);
    z-index: 1100;
    transition: all 0.3s ease;
    pointer-events: none;
}
.dropdown-content.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.dropdown-content a {
    color: var(--text-dim);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    transition: all 0.2s ease;
}
.dropdown-content a:hover {
    background: var(--section-bg);
    color: var(--accent);
    padding-left: 22px;
}

/* ==========================================================================
   4. WELCOME SCREEN & CAROUSEL
   ========================================================================== */

.welcome-slide {
    position: absolute;
    /* Replacing inset: 0 for iPad 4 compatibility */
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeOutWelcome 1s ease-in-out 4s forwards;
    pointer-events: none;
}

/* iPad 4 / Legacy Reset: Kill welcome screen if backdrop-filter isn't supported */
@supports not (backdrop-filter: blur(10px)) {
    @supports not (-webkit-backdrop-filter: blur(10px)) {
        .welcome-slide {
            display: none !important;
            animation: none !important;
        }
    }
}

.welcome-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: 10px;
    color: white;
    opacity: 0;
    animation: fadeInText 1s ease-out 0.5s forwards;
}

.home-content { 
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0; 
    z-index: 1; 
    overflow: hidden; 
    cursor: default; 
}

.carousel-container { 
    width: 100%; 
    height: 100%; 
    background-color: #000; 
    /* STATIC FALLBACK: Loaded first by all devices */
    background-image: url('backdrops_mobile/background_00_mobile.jpg'); 
    background-size: cover; 
    background-position: center; 
}

/* STATIC HIDE: Slides are invisible by default so they don't cause black screens */
.slide {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    will-change: opacity;
}

/* MODERN UPGRADE: Only enable carousel if browser supports modern filters/animations */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .slide {
        display: block;
        animation: crossFade 48s infinite;
    }
}

/* Desktop Backgrounds (Modern Only) */
@media (min-width: 1025px) {
    .carousel-container { background-image: url('backdrops/background_00.jpg'); }
    .slide:nth-child(1) { background-image: url('backdrops/background_00.jpg'); }
    .slide:nth-child(2) { background-image: url('backdrops/background_01.jpg'); }
    .slide:nth-child(3) { background-image: url('backdrops/background_11.jpg'); }
    .slide:nth-child(4) { background-image: url('backdrops/background_12.jpg'); }
    .slide:nth-child(5) { background-image: url('backdrops/background_04.jpg'); }
    .slide:nth-child(6) { background-image: url('backdrops/background_05.jpg'); }
    .slide:nth-child(7) { background-image: url('backdrops/background_06.jpg'); }
    .slide:nth-child(8) { background-image: url('backdrops/background_10.jpg'); }
}

/* Mobile Backgrounds (Modern Only) */
@media (max-width: 1024px) {
    .slide:nth-child(1) { background-image: url('backdrops_mobile/background_00_mobile.jpg'); }
    .slide:nth-child(2) { background-image: url('backdrops_mobile/background_01_mobile.jpg'); }
    .slide:nth-child(3) { background-image: url('backdrops_mobile/background_11_mobile.jpg'); }
    .slide:nth-child(4) { background-image: url('backdrops_mobile/background_12_mobile.jpg'); }
    .slide:nth-child(5) { background-image: url('backdrops_mobile/background_04_mobile.jpg'); }
    .slide:nth-child(6) { background-image: url('backdrops_mobile/background_05_mobile.jpg'); }
    .slide:nth-child(7) { background-image: url('backdrops_mobile/background_06_mobile.jpg'); }
    .slide:nth-child(8) { background-image: url('backdrops_mobile/background_10_mobile.jpg'); }
}

/* Animation Timings */
.slide:nth-child(1) { animation-delay: 4s; opacity: 1; }
.slide:nth-child(2) { animation-delay: 10s; }
.slide:nth-child(3) { animation-delay: 16s; }
.slide:nth-child(4) { animation-delay: 22s; }
.slide:nth-child(5) { animation-delay: 28s; }
.slide:nth-child(6) { animation-delay: 34s; }
.slide:nth-child(7) { animation-delay: 40s; }
.slide:nth-child(8) { animation-delay: 46s; }









/* ==========================================================================
   6. ANIMATION UTILITIES (Trigger Classes)
   ========================================================================== */

/* This class triggers the fade/slide on any element you add it to */
.fade-entrance {
    animation: fadeInUp 0.8s ease-out forwards;
    -webkit-animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

/* Use this alongside fade-entrance to make the grid wait for the header */
.delay-1 {
    animation-delay: 0.3s;
    -webkit-animation-delay: 0.3s;
}



/* Optimized for iPad 4 Vertical & iPhone 8 Plus Landscape */
@media (max-width: 1024px) { 
    .nav-strip {
        height: auto !important;
        padding: 10px 20px;
        /* Ensures items stay on one line unless they absolutely can't fit */
        flex-wrap: nowrap !important; 
    }

    .nav-logo-section {
        /* FIXED: 0 0 auto means "Don't grow, don't shrink, stay size of content" */
        flex: 0 0 auto !important; 
        min-width: 0 !important;
        display: flex;
        align-items: center;
    }

    .nav-logo {
        padding-left: 0 !important; 
        font-size: 18px !important;
        margin-right: 10px; /* Space between logo text and Home icon */
    }

    .nav-links {
        /* ALLOWS links to take up the remaining space and push right */
        flex: 1 !important; 
        gap: 12px !important; 
        justify-content: flex-end !important;
        display: flex !important;
    }
    
    .nav-btn {
        font-size: 12px !important;
        padding: 5px;
    }
}





/* THE IPHONE 8 PLUS / SMARTPHONE FIX */
/* THE IPHONE FIX (Shortened Names + No Stacking) */
@media (max-width: 500px) {

    .container {
        /* 140px on top provides clearance for the 115px nav + animation bounce */
        padding: 140px 20px 60px 20px !important;
    }
    .nav-strip {
        height: auto !important;
        min-height: 115px; 
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 10px 0;
    }

    .nav-logo-section {
        flex: 0 0 auto !important;
        width: 100% !important;
        justify-content: center !important;
        margin-bottom: 10px;
    }

    .nav-logo { padding-left: 0; font-size: 20px; }

    /* This forces the buttons and email to stay locked on one line */
    .nav-links {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; /* NO WRAPPING ALLOWED */
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important; /* Span the width to center as a group */
    }



    /* Tighten spacing to fit iPhone 8 (375px wide) */
    .nav-links > * { 
        margin: 0 3px !important; 
    }

    .nav-btn { 
        font-size: 11px; 
        padding: 10px 2px; 
        letter-spacing: -0.5px; /* Tighter text to save room */
    }

/* --- UPDATE THIS SPECIFIC PART BELOW --- */

    /* Shortened Names for Art */
    .art-dropdown .nav-btn { font-size: 0 !important; }
    .art-dropdown .nav-btn::before { 
        content: "ART ▼"; 
        font-size: 11px; 
        display: block; 
    }

    /* Shortened Names for Tech */
    .tech-dropdown .nav-btn { font-size: 0 !important; }
    .tech-dropdown .nav-btn::before { 
        content: "TECH ▼"; 
        font-size: 11px; 
        display: block; 
    }

.nav-icon-link svg, .nav-icon { width: 18px; height: 18px; }
}


/* ==========================================================================
   7. KEYFRAMES
   ========================================================================== */
@keyframes fadeOutWelcome { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
@keyframes fadeInText { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes crossFade { 
    0% { opacity: 0; transform: scale(1); } 
    4% { opacity: 1; } 
    12.5% { opacity: 1; } 
    16.5% { opacity: 1; transform: scale(1.05); } 
    20% { opacity: 0; transform: scale(1.1); } 
}

/* Custom Scrollbar */
.scroll-area::-webkit-scrollbar { width: 12px; }
.scroll-area::-webkit-scrollbar-track { background: black; }
.scroll-area::-webkit-scrollbar-thumb { background: #444; border-radius: 10px; border: 3px solid black; }


/* ==========================================================================
   ACTIVE PAGE STATE (REFINED)
   ========================================================================== */

/* 1. Targets top-level nav buttons, home icon, AND dropdown links */
.nav-btn.current-page,
.nav-icon-link.current-page,
.dropdown-content a.current-page {
    color: var(--accent) !important;
}

/* 2. Optional: Add the underline only to top-level buttons (looks cleaner) */
.nav-btn.current-page {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
}

/* 3. Dropdown specific: Ensures the active link stays blue even if not hovered */
.dropdown-content a.current-page {
    background: var(--section-bg); /* Slight background highlight */
    font-weight: 600;
}

/* Special Case: The Home Icon shouldn't have an underline */
.home-btn.current-page {

}

/* ==========================================================================
   COMPLETE PORTFOLIO GRID (4-Column, Centered, Responsive)
   ========================================================================== */

.portfolio-grid {
    display: -webkit-flex; 
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: center;
    justify-content: center; 
    margin: -10px;
    margin-bottom: 60px;

    /* REMOVED hard-coded animation here so the trigger class handles it */
}

.portfolio-item {
    position: relative;
    /* 25% width for 4 columns minus the 20px combined margin */
    width: calc(25% - 20px); 
    margin: 10px;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border); 
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

/* Fallback for iPad 4 (iOS 10 doesn't support aspect-ratio) */
@supports not (aspect-ratio: 16/9) {
    .portfolio-item { 
        height: 160px; 
    }
}

/* Hover State - Border & Glow */
.portfolio-item:hover {
    border-color: var(--accent);
    z-index: 10;
}

/* Image Zoom and Brightness Effects */
.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9; /* Slightly dimmed to pop on hover */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05); /* Gentle zoom */
    opacity: 1; /* Full brightness */
}

.item-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4); 
    display: -webkit-flex; /* iPad 4 legacy support */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; 
}

/* Force hide the text across all devices and media queries */
.item-overlay span {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.portfolio-item:hover .item-overlay {
    opacity: 1; 
}

/* ==========================================================================
   RESPONSIVE TIERS (Breakpoints)
   ========================================================================== */

/* Small Laptops / Large Tablets (3 Columns) */
@media (max-width: 1100px) {
    .portfolio-item { 
        width: calc(33.333% - 20px); 
    }
}

/* Tablets & iPhone 8 Plus Landscape (2 Columns) */
@media (max-width: 768px) {
    .portfolio-item { 
        width: calc(50% - 20px); 
    }
}

/* Mobile Phones (1 Column) */
@media (max-width: 480px) {
    .portfolio-item { 
        width: calc(100% - 20px); 
    }
    .portfolio-grid {
        margin: 0; /* Tighten up spacing on small screens */
    }
    .portfolio-item {
        margin: 10px 0; /* Vertical spacing only */
    }
}

/* ==========================================================================
   LIGHTBOX - CLEAN & FAILSAFE (Pointer Only)
   ========================================================================== */

.lightbox {
    display: none; 
    position: fixed; 
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.98);
    z-index: 3000;
    -webkit-flex-direction: column;
    flex-direction: column;
    /* Stops the blue selection overlay */
    -webkit-user-select: none;
    user-select: none; 
}

.lightbox.active {
    display: -webkit-flex !important;
    display: flex !important;
}

.lightbox-main {
    -webkit-flex: 1;
    flex: 1; 
    display: -webkit-flex;
    -webkit-align-items: center;
    -webkit-justify-content: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto; 
    padding: 15px; 
    position: relative;
    cursor: default; /* Background area is not clickable for zoom */
}

#lightbox-img {
    display: block;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    /* Force the hand icon whenever hovering over the image */
    cursor: pointer !important; 
}

/* Image scaling logic simplified */
#lightbox-img.fit-screen {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    max-width: 100%;
    max-height: 100%;
}

#lightbox-img.actual-size {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    display: block;
    margin: 0; /* Important: removes auto-centering */
}
.lightbox-main.zoom-active {
    display: block; /* Overrides Flexbox */
    overflow: auto;
}


/* Controls */
.lightbox-controls {
    /* Reduced from 60px to 45px */
    height: 45px; 
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid var(--border);
    display: -webkit-flex;
    -webkit-justify-content: center;
    -webkit-align-items: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; 
    /* Maintains safe area for modern iPhones while staying slim */
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 3005;
}

.ctrl-btn {
    color: white;
    font-weight: 500;
    font-size: 12px; /* Slightly smaller to fit slim bar */
    letter-spacing: 1px;
    text-transform: uppercase;
    background: transparent;
    border: none;
    cursor: pointer !important;
    font-family: inherit;
    white-space: nowrap;
    padding: 5px 5px; /* Reduced vertical padding */
}

.ctrl-btn:hover {
    color: var(--accent);
}

.mid-btn {
    min-width: 120px;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 40px;
    color: white;
    cursor: pointer !important;
    z-index: 3010;
    line-height: 1;
}

/* Mobile Tweaks */
/* Mobile Tweaks for iPhone 8 Plus & iPad 4 */
@media (max-width: 500px) {
.lightbox-main { 
        padding: 5px; /* Smaller padding gives image more room */
    }

    .lightbox-controls { 
        /* Reduced from 80px to 55px for mobile */
        height: 55px; 
        gap: 5px; 
        /* Ensure legacy support for padding */
        padding-bottom: 5px; 
        padding-bottom: calc(5px + env(safe-area-inset-bottom));
    }

    .ctrl-btn { 
        font-size: 11px; /* Scaled down for the shorter bar */
        padding: 10px 5px; 
        flex: 1; 
        text-align: center;
    }

    .mid-btn { 
        min-width: 90px; /* Reduced to prevent overflow on slim bar */
    }

    .close-btn {
        top: 15px;
        right: 20px;
        font-size: 45px; /* Bigger X for easier closing */
    }
}


/* ==========================================================================
   YOUTUBE EMBED STYLING
   ========================================================================== */
.video-section {
    width: 100%;
    max-width: 750px; 
    margin: 60px auto 20px auto; /* 60px on top creates breathing room from grid */
    padding: 0 10px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Magic number for 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border: 2px solid var(--border); /* Matches your portfolio item style */
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Forces the iPad to treat the iframe as a hardware-accelerated layer */
    -webkit-transform: translateZ(0);
    background: #000; 
}

/* Optional: Subtle glow or border change on the video container */
.video-container:hover {
    border-color: var(--accent);
}


/* ==========================================================================
   MINIMALIST FOOTER
   ========================================================================== */
.site-footer {
    margin-top: 80px;
    padding-bottom: 40px;
    text-align: center;
}

.footer-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    margin-bottom: 30px;
}

.footer-content p {
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 5px 0;
}

.footer-subtext {
    opacity: 0.5;
    font-size: 9px !important;
}

@-webkit-keyframes fadeInUp {
    from { opacity: 0; -webkit-transform: translateY(20px); }
    to { opacity: 1; -webkit-transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

