/* --- Fonts --- */
@font-face {
    font-family: 'Boucherie';
    src: url('../site-media/site-assets/Boucherie\ Block\ W05\ Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'TimesRegular';
    src: url('../site-media/site-assets/Times\ Regular.woff2') format('woff2');
}

/* --- THE CLEAN WHITE BASE --- */
html {
    background-color: #ffffff; 
    
    /* A 3-stop easing curve that packs the gray at the bottom but eliminates the harsh line edge */
    background-image: linear-gradient(
        to top, 
        #f4f4f4 0%, 
        rgba(184, 184, 184, 0.4) 4%, 
        rgba(255, 255, 255, 0) 10%
    );
    background-repeat: no-repeat;
    background-attachment: scroll; 
}

body {
    background-color: transparent; 
}

.mouse-glow {
    position: fixed;
    top: 0; left: 0;
    width: 400px;  
    height: 400px;
    margin-top: -200px;
    margin-left: -200px;
    
    z-index: 10; 
    pointer-events: none;
    border-radius: 50%;
    will-change: transform, opacity;
    
    opacity: 0;
    transition: opacity 0.8s ease-out;
    
    /* 1. SATURATED GLASS: Re-added the saturation and high contrast filters */
    backdrop-filter: blur(12px) brightness(2.0) saturate(190%) contrast(1.2);
    -webkit-backdrop-filter: blur(12px) brightness(1.4) saturate(190%) contrast(1.3);
    
    /* 2. BACKGROUND COLOR: Setting this to pure white makes the lens 
       optically "invisible" when hovering over your white site background. */
    background-color: rgba(255, 255, 255, 0.4); 
    
    /* 3. SOFT DISSOLVE: Keeps the ripple edge-less */
    mask-image: radial-gradient(circle, 
        rgba(0,0,0,0.4) 0%, 
        rgba(0,0,0,0.1) 30%, 
        rgba(0,0,0,0) 60%
    );
    -webkit-mask-image: radial-gradient(circle, 
        rgba(0,0,0,0.4) 0%, 
        rgba(0,0,0,0.1) 30%, 
        rgba(0,0,0,0) 60%
    );
    
    border: none;
    box-shadow: none;
}

/* --- LAYER 3: THE TEXTURE NOISE --- */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    z-index: -1; 
    pointer-events: none; 
    
    /* Premium film grain sitting over the subtle droplet */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Padding goes: Top Right Bottom Left */
    padding: 37px 50px 20px 50px; /* <--- Increased the first number to 50px */
    background: transparent;
}

header .logo img {
    height: 75px; /* Slightly larger signature */
}

.main-nav a {
    font-family: 'Boucherie', sans-serif;
    font-size: 1.3rem;
    color: #000;
    text-decoration: none;
    margin-left: 35px;
    letter-spacing: 1px;
}

.main-nav a:hover {
    color: #555;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 50px 20px 20px 20px;
    max-width: 1000px; /* Widened to allow a massive title */
    margin: 0 auto;
}

.site-title {
    width: 100%;
    max-width: 750px;      /* Made the image smaller */
    margin-top: -100px;      /* Pushed it down from the top */
    margin-bottom: -95px;   /* Added more space between the title and the bio text */
}

.bio-image {
    width: 100%;
    max-width: 1000px; 
    display: block;
    
    /* --- POSITIONING --- */
    margin-top: -14px;       /* Increase this number to push the image DOWN */
    margin-bottom: 25px;   /* Increase this number to push the button below it FURTHER DOWN */
    
    /* These two lines keep the image perfectly centered */
    margin-left: auto;     
    margin-right: auto;    
}

.bio-button img {
    height: 95px;
    margin-top: -45px;      /* Pushed it down from the top */
    cursor: pointer;
    transition: transform 0.2s ease;
}

.bio-button img:hover {
    transform: scale(1.05);
}

/* --- Carousel --- */
.carousel-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 30px 0 10px 0;
    scrollbar-width: none; 
}
.carousel-wrapper::-webkit-scrollbar {
    display: none;
}

/* --- THE INNER CAROUSEL BELT --- */
.carousel-track {
    display: flex;
    gap: 25px; 
    padding: 0;
    width: max-content;
    
    animation: spinIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    
    /* THE FIX: Hardware Acceleration */
    will-change: transform, opacity; 
    backface-visibility: hidden; 

}

.carousel-slide {
    width: 480px; /* Much larger thumbnails to match mockup */
    text-align: center;
    transition: transform 0.3s ease;
    /* Prevents users from highlighting images while dragging */
    user-select: none; 
    -webkit-user-drag: none;
}

.carousel-slide img {
    width: 100%;
    height: 270px; /* Fixed height to keep them uniform */
    object-fit: cover; /* Ensures images fill the box without stretching */
    border-radius: 20px; /* Smooth rounded corners */
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    pointer-events: none; /* Helps with drag interaction */
}

.carousel-slide h3 {
    font-family: 'Boucherie', sans-serif;
    margin-top: 8px;
    font-size: 1.6rem;
    color: #000;
}

.carousel-slide a {
    text-decoration: none;
}

/* --- HOMEPAGE CAROUSEL CROP & VIGNETTE --- */
.carousel-wrapper.home-crop {
    /* 
       DIAL 1: THE WINDOW CROP 
       By default, this spans 100%. Set a max-width to tightly crop the visible area.
       - 1000px: Shows roughly 2.5 slides at once.
       - 800px: Crops it down to focus heavily on the center slide.
    */
    max-width: 2000px; 
    margin: 0 auto; /* Keeps the cropped window dead-center on the page */
    position: relative;
    
    /* 
       DIAL 2: THE WHITE EDGE VIGNETTE
       This creates a smooth gradient fade on both sides.
       - 100px: A soft, luxurious fade-out.
       - 40px: A sharper, more sudden transition.
    */
    mask-image: linear-gradient(
        to right, 
        transparent 0px, 
        black 50px, 
        black calc(100% - 100px), 
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right, 
        transparent 0px, 
        black 50px, 
        black calc(100% - 100px), 
        transparent 100%
    );
}

/* --- Footer --- */
footer {
    padding: 5px 50px 100px 10px;
    display: flex;
    justify-content: flex-end;
}

/* The normal state of the slide */
.carousel-slide {
    width: 400px; /* Adjust this number to scale the whole thumbnail up or down */
    text-align: center;
    transition: transform 0.3s ease; /* This makes the animation smooth */
    user-select: none; 
    -webkit-user-drag: none;
}

/* The hover state of the slide */
.carousel-slide:hover {
    transform: scale(1.05); /* This scales it up by 5% when hovered */
}

.carousel-slide a {
    pointer-events: auto; /* Forces the browser to allow clicks */
    display: block; 
    z-index: 10; /* Pushes the link to the very top layer */
    position: relative;
}

/* --- Subpage Headers --- */
.page-title {
    font-family: 'Boucherie', sans-serif;
    font-size: 3rem;
    text-align: center;
    margin: 40px 0 20px 0;
    color: #000;
}

.section-title {
    font-family: 'Boucherie', sans-serif;
    font-size: 2rem;
    margin: 40px 50px 10px 50px;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
}

/* --- Project Grid (Projects Page) --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 50px 60px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 15px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: #000;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.project-client {
    font-family: 'TimesRegular', serif;
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.project-title {
    font-family: 'Boucherie', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 10px 0;
}

.project-desc {
    font-family: 'TimesRegular', serif;
    font-size: 1rem;
    color: #333;
    line-height: 1.4;
}

/* --- 1. THE GRID (CSS Grid Layout) --- */
.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    column-gap: 25px;       
    grid-auto-rows: 5px;    
    padding: 20px 50px 60px 50px;
    margin-top: 20px;
    
    /* THE GAP FIX: Stops the wrapper from stretching into the empty space */
    align-items: start; 
}

/* --- Default Wrapper (Photos - Natural Aspect Ratio) --- */
.img-wrapper {
    width: 100%;
    background-color: #f4f4f4; 
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Update your existing image rule to include videos */
.img-wrapper img,
.img-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    
    /* THE FIX: This tells the browser exactly how long and how smooth the animation should be */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Make sure the video inside the pop-up modal is also scaled correctly */
#zoom-video {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

/* --- 2. THE HOVER ENLARGE --- */
/* Added the video tag here so your MP4s also scale when hovered! */
.img-wrapper img:hover,
.img-wrapper video:hover {
    transform: scale(1.03); /* Dropped from 1.05 to 1.03 to perfectly match your project pages */
}

/* --- Design Page Override (Forced 4/5 Aspect Ratio & Standard Grid) --- */
#design-grid {
    grid-template-columns: repeat(4, 1fr); /* Changes this specific grid to 4 columns */
    gap: 25px; /* Restores even horizontal AND vertical spacing */
    grid-auto-rows: auto; 
}

#design-grid .img-wrapper {
    aspect-ratio: 4 / 5;
}

#design-grid .img-wrapper img {
    height: 100%;
    object-fit: cover; 
}

/* --- 2. THE HOVER ENLARGE --- */
.img-wrapper img:hover {
    transform: scale(1.05); /* Slight enlarge on hover */
}

/* --- DEBUGGING: Visual Path Error Box --- */
.img-wrapper.path-error {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffe6e6;
    border: 2px dashed #ff0000;
    color: #cc0000;
    font-size: 0.9rem;
    text-align: center;
    padding: 15px;
    cursor: default;
    word-break: break-all;
}

/* --- 3. THE CLICK-TO-ENLARGE POP-UP (MODAL) --- */
.zoom-view {
    display: none; 
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.zoom-view.show { display: flex; } 

.zoom-view img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 5px;
}

.zoom-view .zoom-caption {
    color: white;
    font-family: 'TimesRegular', serif;
    font-size: 1.1rem;
    margin-top: 15px;
    letter-spacing: 1px;
}

.zoom-view .close-btn {
    position: absolute;
    top: 20px; right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* --- About Page Layout --- */
.about-container {
    max-width: 900px;
    margin: 0 auto; /* Centers the content */
    padding: 0 50px 60px 50px;
}

/* --- Resume Button --- */
.resume-btn-container {
    text-align: center;
    margin-top: -4px;
    margin-bottom: 40px;
}

.resume-btn {
    display: inline-block;
    background-color: #000;
    color: #fff;
    font-family: 'Boucherie', sans-serif;
    font-size: 0.8rem;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 50px; /* Gives it a clean pill shape */
    transition: background-color 0.2s ease, transform 0.2s ease;
    letter-spacing: 2px;
}

.resume-btn:hover {
    background-color: #444;
    transform: scale(1.05); /* Slight pop on hover */
}

/* --- Text Styling --- */
.about-content-block {
    margin-bottom: 40px;
}

/* Reusing your existing section-title class styling but removing the side margins to align with the text */
.about-content-block .section-title {
    margin: 0 0 20px 0; 
}

.about-content-block p {
    font-family: 'TimesRegular', serif;
    font-size: 1.15rem;
    line-height: 1.7; /* Adds nice breathing room between lines */
    color: #222;
    margin-bottom: 20px;
}

.about-content-block h3 {
    font-family: 'Boucherie', sans-serif;
    font-size: 1.4rem;
    margin: 0 0 10px 0;
    color: #000;
}

.about-content-block ul {
    font-family: 'TimesRegular', serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: #333;
    list-style-type: square;
    padding-left: 20px;
}

.about-content-block li {
    margin-bottom: 10px;
}

/* --- Bio Style Layout --- */
.bio-style {
    max-width: 900px;
    margin: 0 auto;
}

.bio-style .section-title {
    margin: 0 0 40px 0;
    font-size: 2rem;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.bio-block {
    margin-bottom: 45px;
}

.bio-block h3 {
    font-family: 'Boucherie', sans-serif;
    font-size: 1.6rem;
    margin: 0 0 15px 0;
    color: #000;
    letter-spacing: 0.5px;
}

.bio-block p {
    font-family: 'TimesRegular', serif;
    font-size: 1.15rem;
    line-height: 1.7; /* Gives the paragraphs nice breathing room */
    color: #333;
    margin-bottom: 15px;
}

/* --- Elevated Contact Page Layout --- */
.contact-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 0 50px 80px 50px;
}

.contact-intro {
    text-align: center;
    font-family: 'TimesRegular', serif;
    font-size: 1.25rem;
    color: #444;
    margin-bottom: 40px;
    line-height: 1.6;
}

.direct-email {
    color: #000;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.direct-email:hover {
    border-color: #000; /* Clean underline animation on hover */
}

/* --- The Elevated Form Card --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); /* High-end soft shadow */
    border: 1px solid #f0f0f0;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-family: 'Boucherie', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #000;
    letter-spacing: 1px;
}

/* Modern, chunky inputs with soft backgrounds */
.form-group input,
.form-group textarea {
    font-family: 'TimesRegular', serif;
    font-size: 1.15rem;
    padding: 18px 20px;
    border: 2px solid transparent; /* Invisible border prevents layout shift */
    border-radius: 10px;
    background-color: #f4f4f4;
    transition: all 0.3s ease;
    color: #000;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

/* Sharp snap to black when clicked */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background-color: #fff;
    border-color: #000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* --- Submit Button --- */
.form-action {
    text-align: center;
    margin-top: 10px;
}

.submit-btn {
    background-color: #000;
    color: #fff;
    font-family: 'Boucherie', sans-serif;
    font-size: 1.4rem;
    padding: 18px 50px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.submit-btn:hover {
    background-color: #333;
    transform: translateY(-3px); /* Physically lifts off the page */
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

/* --- Single Project Page Layout --- */
.project-detail-header {
    max-width: 800px;
    margin: 0 auto 50px auto;
    padding: 0 50px;
    text-align: center;
}

.project-meta {
    font-family: 'TimesRegular', serif;
    font-size: 1.1rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.project-meta .project-date {
    color: #999;
}

.project-detail-title {
    font-family: 'Boucherie', sans-serif;
    font-size: 3rem;
    margin: 0 0 25px 0;
    color: #000;
    line-height: 1.1;
}

.project-description {
    font-family: 'TimesRegular', serif;
    font-size: 1.2rem;
    line-height: 1.7;
    color: #333;
    text-align: left; /* Keeps paragraphs readable */
}

.project-description p {
    margin-bottom: 20px;
}

/* Ensure the masonry wrappers hide on load for the fade-in effect on project pages too */
#project-grid .img-wrapper {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* --- Single Project Hero Image --- */
.project-hero {
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    object-fit: cover; /* Ensures the image fills the 16x9 box without stretching */
    border-radius: 15px;
    margin: 0 auto 40px auto;
    display: block;
}

/* --- THE MAIN GRID --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem; /* Tightened the gap so the images sit close together */
    padding: 2rem 0;
    align-items: start; 
}

/* --- THE CLICKABLE CARD --- */
.project-card {
    text-decoration: none; 
    display: flex; 
    flex-direction: column;
    cursor: pointer;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important; 
}

/* --- THE 16x9 THUMBNAIL CONTAINER --- */
.project-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9; 
    overflow: hidden; 
    border-radius: 20px; 
    margin: 0; 
    position: relative; /* CRITICAL: Anchors the title and overlay exactly to this box */
}

/* --- THE HOVER OVERLAY (The lightened background) --- */
.project-thumbnail::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85); /* 85% opaque white */
    opacity: 0; /* Invisible by default */
    transition: opacity 0.3s ease;
    z-index: 1; /* Sits directly above the image */
}

/* --- THE IMAGE ITSELF --- */
.project-thumbnail img {
    display: block; 
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    position: relative;
    z-index: 0;
}

/* --- THE HOVER TITLE TEXT --- */
.project-title {
    margin: 0; 
    font-size: 1.4rem; /* Bumped up the size for impact */
    font-weight: 700;
    color: #111; 
    text-align: center;
    
    /* Centers the text over the image */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -35%); /* Starts slightly lower for the slide-up effect */
    width: 90%; /* Prevents long titles from hitting the edges */
    
    opacity: 0; /* Hidden by default */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2; /* Sits on the very top, above the overlay */
}

/* --- THE HOVER EFFECTS --- */
/* 1. The image slowly scales up */
.project-card:hover .project-thumbnail img {
    transform: scale(1.05);
}

/* 2. The white overlay fades in */
.project-card:hover .project-thumbnail::after {
    opacity: 1;
}

/* 3. The title slides up into true center and fades in */
.project-card:hover .project-title {
    opacity: 1;
    transform: translate(-50%, -50%); 
}

/* --- THE RESTORED MASONRY WRAPPER (For Subpages) --- */
.project-masonry {
    column-count: 3; 
    column-gap: 25px; 
    
    /* THE FIX: Locks the width and centers it, matching your 16x9 hero images */
    max-width: 1200px; 
    margin: 0 auto; 
    
    /* Restores your original side padding */
    padding: 0 50px 60px 50px; 
}

/* --- RESPONSIVE MASONRY SCALING --- */
/* Drops to 2 columns on tablets */
@media (max-width: 900px) {
    .project-masonry {
        column-count: 2;
    }
}

/* Drops to 1 column on mobile phones */
@media (max-width: 600px) {
    .project-masonry {
        column-count: 1;
    }
}

/* The Individual Image Wrappers */
.masonry-item {
    break-inside: avoid; /* CRITICAL: Prevents an image from being split in half across columns */
    margin-bottom: 25px; /* Vertical space between stacked images */
    border-radius: 10px;
    overflow: hidden;
    background-color: #f4f4f4; 
}

/* Update this block to include the video tag */
.masonry-item img,
.masonry-item video {
    width: 100%;
    height: auto; 
    display: block;
    transition: transform 0.2s ease;
}

/* Update the hover effect to include the video tag as well! */
.masonry-item img:hover,
.masonry-item video:hover {
    transform: scale(1.03); 
}

/* --- Bottom Right Dock (Anchored to Footer) --- */
.floating-dock {
    display: flex;
    align-items: center; 
    gap: 12px; 
    /* Removed all the position: fixed, bottom, right, and z-index rules */
}

/* The "Contact" Text Link (Left in case you ever switch back from the image) */
.dock-text {
    font-family: 'Boucherie', sans-serif;
    font-size: 1.3rem;
    color: #000;
    text-decoration: none;
    letter-spacing: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.dock-text:hover {
    opacity: 0.6;
    transform: translateY(-2px);
}

/* --- The Social Icons Base --- */
.dock-icon img {
    width: 85px; 
    height: 85px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.dock-icon:hover img {
    opacity: 0.6;
    transform: scale(1.1); 
}

/* --- PIXEL-PERFECT SPACING CONTROLS --- */

/* 1. Gap between Contact and LinkedIn */
.contact-dock-link + .dock-icon {
    margin-left: -15px; /* Adjust this to move LinkedIn closer/further from Contact */
}

/* 2. Gap between LinkedIn and Instagram */
.dock-icon + .dock-icon {
    margin-left: -35px; /* Adjust this to move Instagram closer/further from LinkedIn ONLY */
}

/* 3. Gap between Instagram and the Bored Button */
.dock-icon + .bored-btn {
    margin-left: -15px; /* Adjust this to move the game button closer/further from Instagram */
}


/* --- Dedicated Contact Button Sizing --- */
.contact-dock-link img {
    height: 50px; 
    width: auto;  
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.contact-dock-link:hover img {
    opacity: 0.6;
    transform: scale(1.05); 
}

/* --- "I'm Bored" Button (Docked Version) --- */
.bored-btn {
    width: 82px; 
    height: 82px; 
    background-image: url('../site-media/site-assets/bored-button.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-indent: -9999px; 
}

.bored-btn:hover {
    transform: scale(1.08); 
    background-color: transparent;
}

/* --- Game Modal Overlay --- */
.game-modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Slightly softer dark overlay */
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-modal.show {
    display: flex;
    opacity: 1;
}

.game-container {
    position: relative;
    width: 90%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    
    /* The Light Grid Background */
    background-color: #fcfcfc;
    background-image: 
        linear-gradient(#ebebeb 1px, transparent 1px),
        linear-gradient(90deg, #ebebeb 1px, transparent 1px);
    background-size: 30px 30px; /* Adjust this to make the grid squares larger or smaller */
    
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

#hoops-game {
    width: 100%;
    height: 100%;
    display: block;
}

.close-game-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.close-game-btn:hover {
    background: #ff3333;
}

/* =========================================
   THE BACKROOMS NO-CLIP EVENT 
========================================= */

/* 1. The Instant Cut (Replaced the falling animation) */
.noclip-active body {
    background-color: #000 !important;
    overflow: hidden;
}

/* Instantly hides the main site elements without the messy falling animation */
.noclip-active body > *:not(#backrooms-canvas):not(#static-overlay):not(script) {
    opacity: 0;
    pointer-events: none;
}

/* 2. The 3D Canvas */
#backrooms-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    opacity: 0;
    transition: opacity 1s ease; 
    pointer-events: none;
}

.noclip-active #backrooms-canvas {
    opacity: 1;
    pointer-events: all;
}

/* 3. The Static Overlay (Now used for both Entry and Exit) */
#static-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../site-media/site-assets/static.gif'); 
    background-size: cover;
    z-index: 999999;
    opacity: 0; 
    pointer-events: none;
    transition: opacity 0.2s ease; /* A much faster, harsher snap */
}

.static-active {
    opacity: 0.8 !important; 
    pointer-events: all; /* Blocks clicks while the transition happens */
}

/* --- 1. THE ANIMATION KEYFRAMES --- */
@keyframes smoothFadeUp {
    0% {
        opacity: 0;
        transform: translateY(25px); /* Starts slightly lower */
    }
    100% {
        opacity: 1;
        transform: translateY(0); /* Snaps into natural position */
    }
}

/* --- 2. APPLYING THE ANIMATION (CONTENT ONLY) --- */
/* Notice header and footer are completely removed from this list */
main, 
.project-hero,
.project-masonry,
.project-embed {
    animation: smoothFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0; 
}

/* --- 3. STAGGERING THE LOAD --- */
/* Shifted the delays up so the content starts animating immediately */
.project-hero { animation-delay: 0.1s; }
.project-masonry { animation-delay: 0.2s; }
.project-embed { animation-delay: 0.1s; }

/* --- CAROUSEL ROTATION & SLIDE ANIMATION --- */
@keyframes spinIn {
    0% {
        opacity: 0;
        /* Pushes the track 80px to the right */
        transform: translateX(450px) translateY(30px) rotate(2deg) scale(0.98); 
    }
    100% {
        opacity: 1;
        /* Sweeps left and snaps perfectly straight */
        transform: translateX(0) translateY(0) rotate(0deg) scale(1); 
    }
}

/* Replace with your ACTUAL carousel item class name */
.carousel-wrapper {
    /* 1. Define the natural resting state so it knows what to release control to */
    opacity: 1; 
    transform: scale(1); 
    
    /* 2. Change 'forwards' to 'backwards' */
    animation: spinIn 1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 0.2s; 
    
    /* 3. Ensure your hover transition is smooth */
    transition: transform 0.1s ease; 
}

/* 4. Your hover effect will now trigger perfectly! */
.carousel-slide:hover {
    transform: scale(1.03); 
    z-index: 10; /* Optional: Pops it above the other items when hovered */
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fafafa;
}
::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Smooth Page Gliding */
html {
    scroll-behavior: smooth;
}

/* --- COMPACT HOME CONTACT FORM --- */
.home-contact-section {
    max-width: 600px;
    margin: 50px auto 30px auto; /* Centered with vertical breathing room */
    padding: 0 20px;
    position: relative;
    z-index: 5; /* Ensures it sits above the background glass droplet but below the lens */
}

.home-contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Tighter gap than the full form to save space */
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #f0f0f0;
}

/* Forces Name and Email onto one single line */
.form-row-inline {
    display: flex;
    gap: 20px;
}

.form-group-inline {
    display: flex;
    flex-direction: column;
    flex: 1; /* Makes Name and Email input boxes take up equal space on the line */
}

.form-group-inline label {
    font-family: 'Boucherie', sans-serif;
    font-size: 1.1rem; /* Slightly smaller to keep it compact */
    margin-bottom: 6px;
    color: #000;
    letter-spacing: 1px;
}

.form-group-inline input,
.form-group-inline textarea {
    font-family: 'TimesRegular', serif;
    font-size: 1.05rem;
    padding: 12px 15px; /* Slimmer padding to reduce vertical height */
    border: 2px solid transparent;
    border-radius: 8px;
    background-color: #f4f4f4;
    transition: all 0.3s ease;
    color: #000;
}

/* Focused active input state matching your main forms */
.form-group-inline input:focus,
.form-group-inline textarea:focus {
    outline: none;
    background-color: #fff;
    border-color: #000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Message styling */
.message-group {
    width: 100%;
}

.form-group-inline textarea {
    resize: vertical;
    min-height: 80px; /* Reduced starting height to stay shallow */
}

/* Compact Submit Button */
.form-action-inline {
    text-align: right; /* Aligns button to the right to flow naturally below the message box */
}

.submit-btn-inline {
    background-color: #000;
    color: #fff;
    font-family: 'Boucherie', sans-serif;
    font-size: 1.1rem;
    padding: 10px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.submit-btn-inline:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Responsive collapse for small mobile viewports */
@media (max-width: 600px) {
    /* 1. Constrain the physical width of the box */
    .home-contact-section {
        max-width: 85%; /* THE FIX: Forces the box to be much narrower than the screen */
        margin: 75px auto; /* Keeps it perfectly centered with standard breathing room */
        padding: 0; 
    }

    /* 2. Shrink the white form card padding */
    .home-contact-form {
        padding: 15px; /* Thinner white borders inside the card */
        gap: 10px;     /* Pulls the inputs very close together */
    }

    /* 3. Stack the Name and Email fields */
    .form-row-inline {
        flex-direction: column;
        gap: 10px;
    }

    /* 4. Slim down the text and inputs further */
    .form-group-inline label {
        font-size: 0.95rem; 
        margin-bottom: 4px;
    }

    .form-group-inline input,
    .form-group-inline textarea {
        padding: 8px 12px; /* Very slim input fields */
        font-size: 0.95rem;
    }
    
    .form-group-inline textarea {
        min-height: 50px; /* Extremely shallow message box */
    }

    /* 5. Center and size the submit button for the new narrow card */
    .form-action-inline {
        text-align: center; 
        margin-top: 5px;
    }
    
    .submit-btn-inline {
        padding: 8px 20px;
        font-size: 1rem;
        width: 100%; /* Makes the button elegantly span the width of the new smaller card */
    }
}

.past-work-container {
    width: 100%;
    max-width: 1000px;
    /* Current: margin: 40px auto; 
       Change the 40px to a smaller number (e.g., 10px or 5px) 
       to shrink the space on both top and bottom */
    margin: -60px auto; 
    padding: 0 5px;
    box-sizing: border-box;
}

.past-work-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px; /* Matches the rounded corners of your other elements */
    transition: transform 0.3s ease;
}

.past-work-img:hover {
    transform: scale(1.02); /* Subtle pop on hover */
}

/* =========================================
   INTERN PROGRAM PAGE OVERRIDES
========================================= */

/* 1. Control the Header Spacing on this page */
.intern-page header {
    padding-top: 20px;    /* Pulls the main navigation closer to the top of the screen */
    padding-bottom: 10px; /* Reduces the gap below the navigation */
}

/* 2. Control the Hero Header Image (intern-header.png) on this page */
.intern-page .project-hero {
    margin-top: 50px;    /* Pulls the image closer to the header */
    margin-bottom: 50px;  /* Controls the gap between this image and the masonry grid below it */
    max-width: 1100px;    /* Shrink or grow the hero width (global is 1200px) */
}

/* 3. Control the Masonry Grid position on this page */
.intern-page .project-masonry {
    margin-top: 50px !important; /* Overrides the inline -80px margin if you want to push it down */
}

/* Minimalist Circular Container for your Speaker PNGs */
.audio-toggle-btn {
    position: absolute;
    /* Pinned to the upper right corner, right beneath the X */
    top: 85px;       /* Pushes it down exactly below the 20px top + font-size of the close button */
    right: 25px;     /* Matches the exact right alignment of your close button */
    background: rgba(0, 0, 0, 0.4); 
    border: none;
    width: 48px;  
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex; 
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.audio-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2); /* Soft white glass feel on the dark overlay */
    transform: scale(1.08); 
}

/* Styles the PNG image inside the button */
.audio-toggle-btn img {
    width: 24px;  
    height: 24px;
    object-fit: contain; 
    display: block;
}

/* --- UPDATED YOUTUBE EMBED CONTAINER --- */
.project-video-wrapper {
    width: 100%;
    max-width: 1200px;        /* Matches your header image width perfectly */
    margin: 0 auto 40px auto; /* Centers it and adds vertical breathing room */
    padding: 0 50px;          /* Matches your standard subpage side spacing */
    box-sizing: border-box;
    display: block;           /* Forces it out of any broken inline layout */
    
    /* Inherits your clean page-load fade animation */
    animation: smoothFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.video-ratio-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;     /* Forces perfect widescreen proportions */
    border-radius: 15px;      /* Matches the radius on your masonry-items */
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-ratio-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- MAIN DIRECTORY THUMBNAIL STROKE --- */
.project-grid .project-thumbnail {
    border: 3px solid rgba(0, 0, 0, 0.25); /* Soft, clean light gray outline */
    border-radius: 17px;                  /* Ensures it follows your existing curved corners */
    overflow: hidden;                     /* Keeps the thumbnail images from clipping past the stroke */
    box-sizing: border-box;               /* Prevents the border from breaking your grid layout spacing */
}

/* --- DESKTOP HIDE RULE --- */
/* Placed outside the media query so desktop keeps the menu hidden */
.mobile-nav-menu {
    display: none;
}

/* =========================================
   GLOBAL MOBILE OVERRIDES (Screens <= 768px)
   Does NOT affect desktop in any way!
========================================= */
@media (max-width: 768px) {

    /* 1. Header & Logo Placement */
    header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 20px 25px 30px 25px !important; 
        
        /* Lock it to the top on mobile ONLY */
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
        
        /* Strip background and blur from the main box so we can fade it on a separate layer */
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* 1b. The Faded Blur Background Layer */
    header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        
        /* THE FIX: Extend the physical box 30% further down than the header */
        height: 130%; 
        z-index: -1; 
        
        /* Adjusted percentages to account for the new 130% height. 
           Starts solid for the top ~60%, fades to 0% at 95%, safely avoiding the 100% edge */
        background: linear-gradient(
            to bottom, 
            rgba(255, 255, 255, 1) 60%,       
            rgba(255, 255, 255, 0) 95%     
        );
        
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        
        /* Matches the background fade exactly */
        mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
        -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
    }

    /* --- Disable Carousel Edge Fade on Mobile --- */
    .carousel-wrapper {
        /* Removes the fade if it was built using a CSS mask */
        mask-image: none !important;
        -webkit-mask-image: none !important;
    }

    /* Removes the fade if it was built using gradient overlay boxes */
    .carousel-wrapper::before,
    .carousel-wrapper::after {
        display: none !important;
    }

    /* 2. Hide Desktop Navigation / Show Mobile Menu */
    .desktop-nav-links {
        display: none !important;
    }

    .mobile-nav-menu {
        display: block !important;
        position: relative !important;
    }

    /* 3. Touch Target Hamburger Icon Button */
    .nav-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        cursor: pointer;
        list-style: none !important;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-toggle-btn::-webkit-details-marker {
        display: none !important;
    }

    .hamburger-icon {
        position: relative;
        display: block;
        width: 26px;
        height: 3px;
        background-color: #000;
        border-radius: 3px;
        transition: background 0.2s ease;
    }

    .hamburger-icon::before,
    .hamburger-icon::after {
        content: '';
        position: absolute;
        left: 0;
        width: 26px;
        height: 3px;
        background-color: #000;
        border-radius: 3px;
    }

    .hamburger-icon::before { top: -8px; }
    .hamburger-icon::after { top: 8px; }

    /* 4. Strict Vertical Dropdown Menu Panel */
    .nav-links-dropdown {
        position: absolute !important;
        top: calc(100% + 10px) !important;
        right: 0 !important;
        left: auto !important;
        
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        
        width: 200px !important;
        background: #ffffff !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
        padding: 8px 0 !important;
        z-index: 99999 !important;
    }

    .nav-links-dropdown a {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 20px !important;
        margin: 0 !important;
        text-align: right !important;
        font-family: 'Boucherie', sans-serif !important;
        font-size: 1.1rem !important;
        color: #000 !important;
        text-decoration: none !important;
    }

    /* 5. Page Titles & Section Headers */
    .page-title {
        font-size: 2.2rem;
        margin: 20px 0 15px 0;
    }

    .section-title {
        margin: 20px 20px 10px 20px;
        font-size: 1.5rem;
    }

    /* 6. Homepage Hero Adjustments */
    .site-title {
        margin-top: -80px !important;
        margin-bottom: -50px !important;
        max-width: 95% !important;
    }

    .bio-image {
        margin-top: 0px !important;
        margin-bottom: 0px !important;
        width: 100% !important;
    }

    .bio-button img {
        margin-top: -8px !important;
        margin-bottom: -20px !important;
        height: 65px !important;
    }

    /* 7. Carousel Mobile Sizing (4:5 Aspect Ratio) */
    .carousel-wrapper {
        padding: 20px 0 !important;
        max-width: 100% !important;  
    }

    .carousel-track {
        gap: 12px !important;
    }

    .carousel-slide {
        width: 68vw !important;
    }

    /* THE FIX: Turns the picture tag into a rigid 4:5 frame */
    .carousel-slide picture {
        display: block !important;
        width: 100% !important;
        aspect-ratio: 4 / 5 !important;
        border-radius: 16px !important;
    }

    /* Forces the image to fill that rigid frame perfectly across all mobile browsers */
    .carousel-slide img,
    .carousel-slide picture img {
        display: block !important;
        width: 100% !important;
        height: 100% !important; /* This MUST be 100%, not auto */
        object-fit: cover !important;
        aspect-ratio: 4 / 5 !important;
        border-radius: 16px !important;
    }

    /* 8. Grids & Containers Stacking */
    .project-grid {
        grid-template-columns: 1fr !important;
        padding: 0 10px 20px 10px !important;
        gap: 10px;
        /* THE FIX: Looks for a custom HTML variable, defaults to 20px if it doesn't find one */
        margin-top: var(--mobile-margin, 20px) !important; 
    }

    .project-masonry,
    .media-grid,
    #design-grid {
        column-count: 2 !important;
        grid-template-columns: repeat(2,1fr) !important;
        padding: 0 10px 0px 10px !important;
        /* THE FIX: Looks for a custom HTML variable, defaults to 20px if it doesn't find one */
        margin-top: var(--mobile-margin, 20px) !important; 
    }

    .project-video-wrapper,
    .contact-container,
    .about-container,
    .project-detail-header {
        padding: 0 10px 20px 10px !important;
    }

    .contact-form {
        padding: 20px;
    }

    /* 9. Footer & Miscellaneous */
    footer {
        padding: 20px 10px 60px 10px;
        justify-content: center;
    }

    .floating-dock {
        transform: scale(0.85);
    }

    .mouse-glow {
        display: none !important;
    }

    /* 10. Mobile Game Container */
    .game-container {
        aspect-ratio: 1 / 1 !important; /* Changes it from 16:9 widescreen to a perfect square */
        width: 95% !important;          /* Gives it slightly more screen width on small phones */
    }

    /* Fix Canvas Distortion */
    #hoops-game {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important; /* Forces the game to keep its native ratio inside the square */
    }

    /* 11. Mobile Embed Overrides (Trivia Game & Project Windows) */
    .project-embed {
        /* Explicitly restores the "auto" margins on the left and right to keep it dead center */
        margin: -20px auto 40px auto !important; 
        padding: 0 15px !important; 
        
        /* THE FIX: Forces the 15px padding to sit inside the 100% width boundary */
        box-sizing: border-box !important; 
    }

    .project-embed iframe {
        height: auto !important; 
        aspect-ratio: 4 / 5 !important; 
    }
}


/* =========================================
   DISABLE BACKROOMS / NO-CLIP (TEMPORARY)
========================================= */

/* 1. Permanently hide the static and 3D canvas */
#backrooms-canvas,
#static-overlay {
    display: none !important;
}

/* 2. Prevent the main website from disappearing if triggered */
.noclip-active body > *:not(#backrooms-canvas):not(#static-overlay):not(script) {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* 3. Stop the background from turning black and locking the scroll */
.noclip-active body {
    background-color: transparent !important;
    overflow: auto !important;
}