/* --- VARIABLES & BASE --- */
:root {
    --bg: #050505;
    --mist: #1a1a1a;
    --text: #e0e0e0;
    --accent: #ffffff;
    --subtle: rgba(255, 255, 255, 0.3);
}

html.lenis {
    height: auto;
}

html {
    background-color: var(--bg);
    overscroll-behavior: none;
}

body {
    background-color: var(--bg);
    background: radial-gradient(circle at 50% 50%, var(--mist) 0%, var(--bg) 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Subtle Film Grain */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0.02;
    pointer-events: none;
    z-index: 1;
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
}

/* --- NAVIGATION --- */
nav {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 1002;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 1) 0%, rgba(5, 5, 5, 0) 100%);
    backdrop-filter: blur(8px);
}

.logo {
    font-weight: 900;
    letter-spacing: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.logo-link:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.7rem;
    margin-left: 35px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.nav-links a:hover {
    opacity: 1;
}

/* --- GLOBAL SECTION STYLES --- */
section {
    padding: 0 10vw;
    display: flex;
    flex-direction: column;
}

/* --- HEROES --- */
#hero,
#projects-hero {
    min-height: 70vh;
    justify-content: center;
    padding-bottom: 5vh;
}

h1 {
    font-family: 'Baskervvville', serif;
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 400;
    font-style: italic;
    margin: 0;
    line-height: 0.9;
    letter-spacing: -1.5px;
}

.last-name {
    margin-top: -10px;
    margin-left: -18px;
}

.hero-container {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.hero-role {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    color: var(--accent);
    margin-top: 20px;
    margin-left: 5px;
    font-weight: 300;
    opacity: 0.8;
}

/* --- HOME PAGE GRID FIX --- */
.spec-container,
.spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 2rem;
}

.spec-container .video-wrapper,
.spec-grid .video-wrapper,
.spec-process {
    grid-column: span 1;
    width: 100%;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    margin-bottom: 20px;
}

.glass-card2 {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding-top: 1px;
    padding-left: 30px;
    padding-right: 15px;
    padding-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    margin-bottom: 20px;
}

/* --- PROJECTS PAGE RESTRUCTURE --- */
.highlight-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 8vh;
    width: 100%;
}

.featured-project {
    display: flex;
    flex-direction: column;
}

.highlight-row .video-wrapper {
    grid-column: auto !important;
    width: 100%;
    margin-bottom: 20px;
}

.project-title-link {
    text-decoration: none;
    color: inherit;
}

.project-title-link h2 {
    font-family: 'Baskervvville', serif;
    font-size: 2.2rem;
    font-style: italic;
    font-weight: 400;
    margin: 0;
    transition: transform 0.3s ease;
}

.project-title-link:hover h2 {
    transform: translateX(10px);
}

.subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--subtle);
    margin-top: 5px;
}

/* 2x2 Grid for the smaller projects */
.other-projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding-bottom: 15vh;
}

.standard-project {
    background: rgba(255, 255, 255, 0.02);
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.standard-project h3 {
    font-family: 'Baskervvville', serif;
    font-style: italic;
    font-size: 1.6rem;
    margin: 0;
    margin-top: 24px;
}

.subtitle-small {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--subtle);
    margin-bottom: 15px;
}

.mini-link {
    text-decoration: none;
    color: var(--accent);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-top: 20px;
    opacity: 0.6;
}

/* --- GLOBAL VIDEO WRAPPER --- */
.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: block;
}

.project-video-showcase {
    width: 100%;
    max-width: 440px;
    justify-self: end;
}

.showcase-video {
    width: 100%;
    height: auto;
    border-radius: 6px;
    background: #000;
    display: block;
}

.video-caption {
    padding: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    margin: 0;
    font-style: italic;
}

.spec-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Project detail: two-column layout for overview + video (Spite) */
.project-description-grid {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 48px;
    align-items: start;
    margin-top: 32px;
}

/* --- TRANSITION --- */
.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    transform: scaleY(0);
    transform-origin: top;
}

/* --- MOBILE MENU BUTTON --- */
/* Hidden on desktop, no background, no border */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1003;
    padding: 10px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: none;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    transition: 0.3s;
}

/* --- MOBILE STYLES --- */
@media (max-width: 1000px) {

    nav {
        padding: 20px 20px;
    }

    /* Show hamburger button */
    .menu-toggle {
        display: block;
    }

    /* Fullscreen nav overlay */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transform: translateX(100%);
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
        margin: 0;
    }

    /* Hamburger → X animation */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Stack all sections */
    section,
    .spec-container,
    .spec-grid,
    .spec-grid-dual-video,
    .highlight-row,
    .other-projects-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 20px !important;
        grid-template-columns: 1fr !important;
    }

    /* Cinematic hero must stay full-bleed, no padding */
    #project-hero-cinematic {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
        align-items: flex-end !important;
    }

    .project-video-showcase {
        padding: 0 10px;
        margin: 30px 0;
    }

    .spec-grid-dual-video.rev {
        direction: ltr !important;
    }

    .glass-card,
    .spec-process,
    .standard-project {
        width: 100% !important;
        max-width: 500px;
        text-align: center;
        position: static !important;
        margin: 0 auto !important;
    }

    .section-header,
    .hero-container {
        text-align: center;
        align-items: center;
        width: 100%;
    }

    .video-wrapper,
    .video-stack {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

    h1 {
        text-align: center;
        font-size: 3.5rem !important;
        line-height: 1.1;
    }

    .hero-role {
        margin-left: 0;
        text-align: center;
        letter-spacing: 0.3rem;
    }

    .footer-content {
        padding: 0 10px;
    }
}

/* --- PROJECT DETAIL PAGE --- */
#project-hero-cinematic {
    position: relative;
    width: 100%;
    height: 85vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: #000;
}

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

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.video-bottom-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(5, 5, 5, 0) 0%,
            rgba(5, 5, 5, 0.2) 50%,
            rgba(5, 5, 5, 0.8) 80%,
            #050505 100%);
    pointer-events: none;
}

.project-header-content {
    position: relative;
    z-index: 2;
    padding: 0 10vw 8vh 10vw;
    width: 100%;
    box-sizing: border-box;
}

.project-header-content h1 {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    text-transform: none;
    margin-top: 10px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
}

/* Description & Specs Styling */
.project-description {
    position: relative;
    z-index: 2;
    background: transparent;
    padding-top: 5vh;
    padding-bottom: 20vh;
}

.specs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    margin-bottom: 8vh;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4vh;
}

.spec-item span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--subtle);
    display: block;
    margin-bottom: 10px;
}

.spec-item p {
    margin: 0;
    font-weight: 400;
}

.description-text h2 {
    font-family: 'Baskervvville', serif;
    font-style: italic;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.description-text p {
    max-width: 800px;
    line-height: 1.6;
    opacity: 0.8;
}

/* Center Overview header and text */
.project-description .description-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 1100px; /* constrain measure so the block can be centered */
    margin: 0 auto;    /* center the block horizontally */
}

.project-description .description-text h2 {
    margin: 0;
}

.project-description .description-text p {
    max-width: 880px; /* limit measure for readability */
    margin: 0 auto;
    line-height: 1.75;
}

.spec-grid-dual-video {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 15vh;
}

.spec-grid-dual-video.rev {
    direction: rtl;
}

.spec-grid-dual-video.rev .glass-card,
.spec-grid-dual-video.rev .video-stack {
    direction: ltr;
}

.video-stack {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.spec-grid-dual-video .spec-process {
    position: sticky;
    top: 120px;
}

#Combat,
#Combat-Details {
    margin-bottom: 10vh;
}

/* --- FOOTER --- */
.site-footer {
    padding: 60px 20px;
    background: rgba(15, 15, 15, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 100px;
    font-family: 'Inter', sans-serif;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.internship-notice {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.internship-notice strong {
    color: #fff;
}

.footer-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 30px 0;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
}

.social-icons img {
    width: 24px;
    height: 24px;
    filter: invert(1);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

.social-icons a:hover img {
    transform: translateY(-3px);
    opacity: 1;
}

.email-text a {
    color: #fff;
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}

.email-text a:hover {
    opacity: 0.6;
}

/* --- HOME VIDEO GRID --- */
#home-grid {
    padding: 0 10vw 15vh 10vw;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.grid-card {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    background: #111;
    overflow: hidden;
    display: block;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.large-card {
    aspect-ratio: 16 / 7;
}

.grid-row-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-row-dual .grid-card {
    aspect-ratio: 16 / 10;
}

/* Video Background styling */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: opacity 0.5s ease, transform 0.8s ease;
}

/* Vignette overlay */
.grid-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 5, 5, 0.8) 0%, transparent 60%);
    z-index: 2;
}

/* Text Overlay */
.card-content {
    position: absolute;
    bottom: 30px;
    left: 40px;
    z-index: 3;
    color: var(--text);
}

.card-content h2 {
    font-family: 'Baskervvville', serif;
    font-style: italic;
    font-size: 2rem;
    margin: 5px 0 0 0;
    font-weight: 400;
}

/* Hover Effects */
.grid-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.grid-card:hover .video-container video {
    opacity: 0.8;
    transform: scale(1.03);
}

/* --- HOME GRID MOBILE --- */
@media (max-width: 1000px) {
    #home-grid {
        padding: 0 5vw 10vh 5vw;
        gap: 20px;
    }

    .grid-row-dual {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .grid-card,
    .large-card,
    .grid-row-dual .grid-card {
        aspect-ratio: 16 / 9;
        min-height: 200px;
        position: relative;
        display: block;
        width: 100%;
    }

    .grid-card .video-container {
        position: absolute;
        inset: 0;
        display: block !important;
        visibility: visible !important;
    }

    .video-container video {
        opacity: 0.7 !important;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .grid-card::after {
        background: linear-gradient(to top, rgba(5, 5, 5, 0.9) 0%, rgba(5, 5, 5, 0.2) 100%);
    }

    .card-content {
        left: 20px;
        bottom: 20px;
        text-align: left;
        width: calc(100% - 40px);
    }
}
.grid-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* left title, right link */
    gap: 20px;
    margin-bottom: 30px;
}

/* make the existing centered .see-all-wrap behave correctly inside header */
.grid-section-header .see-all-wrap {
    justify-content: flex-end;
    margin: 0;
    width: auto;
}

/* Ensure good mobile behaviour: stack title + link centered */
@media (max-width: 1000px) {
    .grid-section-header {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .grid-section-header .see-all-wrap {
        justify-content: center;
        width: 100%;
    }
}
.modern-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 40px 0 30px 0;
    padding-left: 10px;
}

.group-section {
    margin-top: 100px; /* Stronger separation for the second section */
}

/* The vertical "Pop" line */
.header-accent {
    width: 4px;
    height: 45px;
    background: #ffffff; /* Or use a signature color if you have one */
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3); /* Glow effect */
}

.header-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.header-main {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: -1px; /* Tighter tracking for that "Pro" look */
    line-height: 1;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .header-main {
        font-size: 1.5rem;
    }
    .header-accent {
        height: 35px;
    }
}
.ownership-highlight {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text);
    opacity: 0.9;
    margin-bottom: 30px;
    padding-left: 5px;
    max-width: 800px;
    /* Optional: subtle left border to match the design language */
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 20px;
}

#hero {
    position: relative;
    overflow: hidden;
    padding: 6vh 10vw;
    min-height: 65vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.45) saturate(0.85);
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,5,5,0.35) 0%, rgba(5,5,5,0.65) 70%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
}

.hero-tagline {
    margin-top: 12px;
    font-size: 1rem;
    opacity: 0.85;
    color: var(--subtle);
}

/* scroll hint */
.scroll-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    text-decoration: none;
    color: var(--subtle);
    z-index: 2;
}

.mouse {
    width: 26px;
    height: 40px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.6);
    display: block;
    position: relative;
}

.mouse::after {
    content: "";
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    animation: scrollDot 1.6s infinite;
}

@keyframes scrollDot {
    0% { top: 10px; opacity: 1; }
    50% { top: 22px; opacity: 0.4; }
    100% { top: 10px; opacity: 1; }
}

.scroll-hint .arrow {
    font-size: 1.2rem;
    opacity: 0.6;
    margin-top: -6px;
}

/* ensure hero video doesn't intercept interactions */
.hero-bg video { pointer-events: none; }
/* Ensure the dual-video grid aligns its columns to the top so the glass-card (AI) starts right under the subtitle */
.spec-grid-dual-video,
.spec-grid-dual-video.rev {
    display: grid; /* keep whatever grid you already use; this is safe if already defined */
    grid-template-columns: 1fr 1fr;
    gap: 32px; /* adjust spacing if needed */
    align-items: start; /* <- key: align columns to top */
}

/* Ensure the .spec-process column itself sits at the top */
.spec-grid-dual-video .spec-process,
.spec-grid-dual-video.rev .spec-process {
    align-self: start;
}

/* Row to place video cards side-by-side */
.video-card-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: stretch; /* ensure child cards stretch to equal height */
    margin: 28px 0;
}

/* Make each card compact and equal-height regardless of text length */
.glass-card.video-card {
    /* Use a grid so header / media / description layout is consistent */
    display: grid;
    grid-template-rows: auto 1fr auto; /* header, flexible middle, description */
    gap: 14px;
    padding: 18px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    text-align: left;
    align-items: start;
    min-height: 420px; /* ensures a generous, equal card height */
}

/* Ensure Overview block spans the grid and is centered when the right column is unused */
.project-description .project-description-grid .description-text {
    grid-column: 1 / -1;    /* span both columns */
    justify-self: center;   /* center the block in the grid */
    text-align: center;     /* center the header and paragraph */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Center headers inside the two small video glass-cards */
.video-card-row .glass-card.video-card > h3 {
    text-align: center;
    width: 100%;
    margin-top: 0;
    margin-bottom: 8px;
}

/* Larger Boss AI card & video */
.glass-card.video-card.boss-card {
    min-height: 520px;
    display: grid;
    grid-template-rows: auto 1fr auto; /* header, video, description */
    align-items: start;
    margin: 40px auto;       /* center block horizontally */
    max-width: 920px;        /* control overall width */
    width: 100%;
    box-sizing: border-box;
}

.glass-card.video-card.boss-card > h3 {
    text-align: center;
    width: 100%;
    margin-top: 0;
    margin-bottom: 6px;
}

.glass-card.video-card.boss-card .video-wrapper.video-small {
    width: 100%;
    max-width: 760px;    /* larger player width for boss demo */
    justify-self: center;
    align-self: center;
}

.glass-card.video-card.boss-card .showcase-video {
    width: 100%;
    height: auto;
    max-height: 480px;  /* larger visible area */
    object-fit: contain; /* show whole frame without cropping */
    border-radius: 6px;
    background: #000;
}

/* keep it tidy on small screens */
@media (max-width: 900px) {
    .glass-card.video-card.boss-card {
        min-height: auto;
        grid-template-rows: auto auto auto;
    }
    .glass-card.video-card.boss-card .video-wrapper.video-small {
        max-width: 100%;
    }
    .glass-card.video-card.boss-card .showcase-video {
        max-height: none;
    }
}

/* Enlarge only the Camera demo video on the Aliens page */
.showcase-video.camera-demo {
    width: 100%;
    max-width: 1100px;   /* bigger than other videos */
    height: auto;
    max-height: 520px;   /* limit height to avoid overflow */
    display: block;
    margin: 0 auto;
    border-radius: 6px;
    object-fit: contain;
}

/* Ensure responsive scaling for smaller screens */
@media (max-width: 900px) {
    .showcase-video.camera-demo {
        max-width: 100%;
        max-height: none;
    }
}

/* Ensure only the Camera demo video can grow (override wrapper/grid constraints) */
.project-video-showcase {
    display: flex;
    justify-content: center;
}

.project-video-showcase .video-wrapper {
    width: 100%;
    max-width: 1100px !important; /* larger container for this showcase */
}

.project-video-showcase .showcase-video.camera-demo {
    width: 100% !important;
    max-width: 1100px !important;
    height: auto;
    max-height: 520px;
    display: block;
    margin: 0;
    object-fit: contain;
}

/* keep responsive behaviour */
@media (max-width: 900px) {
    .project-video-showcase .video-wrapper,
    .project-video-showcase .showcase-video.camera-demo {
        max-width: 100% !important;
        max-height: none;
    }
}

/* Force the Camera demo to use a larger container inside the description block */
.project-description .description-text .project-video-showcase {
    width: 100%;
    max-width: 1100px;
    margin: 28px auto;        /* center the showcase block */
    display: block !important; /* override any grid/flex quirks */
}

/* Target the specific wrapper used for the Camera demo */
.project-description .description-text .video-wrapper.camera-wrapper {
    width: 100% !important;
    max-width: 1100px !important;
    aspect-ratio: 16 / 9;     /* preserve correct ratio */
    overflow: hidden;
    margin: 0 auto;
}

/* Ensure the camera demo video fills that wrapper */
.project-description .description-text .showcase-video.camera-demo {
    width: 100% !important;
    height: auto !important;
    max-height: 520px;       /* adjust if you want taller */
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Camera demo: fill its wrapper (remove letterbox bars) and hide caption */
.video-wrapper.camera-wrapper {
    background: transparent;
    padding: 0;
    margin: 0 auto;
    aspect-ratio: 16/9;
    width: 100%;
    max-width: 1100px;
    overflow: hidden;
}

.showcase-video.camera-demo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;        /* key: fill wrapper without black bars */
    display: block;
    background: transparent;
}

/* hide the caption if you don't want it visible */
.project-video-showcase .video-caption {
    display: none;
}

/* REMOVE this if present */
.header-accent,
.header-label {
    display: none !important;
}

/* Chromatic abrasion for the cursor glow (smoothed) */
.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    pointer-events: none;
    border-radius: 50%;
    transform: translate3d(-50%, -50%, 0) scale(0.95);
    opacity: 0;
    z-index: 9999;
    will-change: transform, opacity;
    transition: opacity 260ms linear, transform 260ms cubic-bezier(.22,.85,.25,1);
    mix-blend-mode: screen;
    background: radial-gradient(circle at 35% 35%,
        rgba(255,255,255,0.9) 0%,
        rgba(150,200,255,0.12) 34%,
        rgba(80,120,200,0.04) 60%,
        rgba(0,0,0,0) 85%);
    box-shadow: 0 6px 18px rgba(100,150,255,0.04);
    overflow: visible;
}

/* two thin colored fringes (subtler) */
.cursor-glow::before,
.cursor-glow::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.55;
    transition: transform 260ms ease, opacity 260ms ease;
    will-change: transform, opacity;
    filter: blur(6px);
}

.cursor-glow::before {
    transform: translate3d(-4px, -2px, 0) scale(1.03);
    opacity: 0.45;
}

.cursor-glow::after {
    transform: translate3d(4px, 2px, 0) scale(1.03);
    opacity: 0.45;
}

.cursor-glow.is-active::before,
.cursor-glow.is-active::after {
    transform: translate3d(0px, 0px, 0) scale(1);
    opacity: 0.36;
}

.cursor-glow.is-visible {
    opacity: 0.75;
    transform: translate3d(-50%, -50%, 0) scale(1);
}

.cursor-glow.is-active {
    width: 30px;
    height: 30px;
    transform: translate3d(-50%, -50%, 0) scale(1.06);
    box-shadow: 0 8px 22px rgba(100,150,255,0.06);
}

/* disable on touch screens */
@media (pointer: coarse), (max-width: 900px) {
    .cursor-glow { display: none !important; }
}

/* "View all projects" link styling */
.see-all-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 28px 0 40px;
}
.see-all-projects {
    display: inline-block;
    text-decoration: none;
    color: var(--accent);
    background: rgba(255,255,255,0.03);
    padding: 10px 18px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms;
}
.see-all-projects:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 34px rgba(0,0,0,0.6);
}

/* Hover animation for clickable videos (only when wrapped in anchors / project-image-link) */
.project-image-link > a .video-wrapper,
.grid-card a .video-wrapper,
.featured-project a .video-wrapper,
.other-projects-grid .project-image-link > a .video-wrapper {
    transition: transform 360ms cubic-bezier(.2,.9,.2,1), box-shadow 360ms, filter 360ms;
    transform-origin: center center;
    will-change: transform, box-shadow;
    cursor: pointer;
}

/* Slight lift + grow on hover (only for anchor-wrapped videos) */
.project-image-link > a:hover .video-wrapper,
.grid-card a:hover .video-wrapper,
.featured-project a:hover .video-wrapper,
.other-projects-grid .project-image-link > a:hover .video-wrapper {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 28px 70px rgba(0,0,0,0.6);
    filter: saturate(1.05) contrast(1.02);
}

/* Ensure the video itself transitions smoothly (keeps edges crisp) */
.project-image-link > a .video-wrapper video,
.grid-card a .video-wrapper video,
.other-projects-grid .project-image-link > a .video-wrapper video {
    transition: transform 360ms cubic-bezier(.2,.9,.2,1), filter 360ms;
    will-change: transform, filter;
}

/* Reduce or disable heavy motion on small screens / touch */
@media (pointer: coarse), (max-width: 1000px) {
    .project-image-link > a .video-wrapper,
    .grid-card a .video-wrapper,
    .other-projects-grid .project-image-link > a .video-wrapper {
        transition: none;
        transform: none !important;
        box-shadow: none !important;
    }
}

/* Custom text selection */
::selection {
    background: rgba(120, 190, 255, 0.22); /* soft cyan glow */
    color: #ffffff;
    text-shadow: none;
}

::-moz-selection {
    background: rgba(120, 190, 255, 0.22);
    color: #ffffff;
}

/* About page framed layout */
.about-frame {
    max-width: 1100px;
    margin: 44px auto;
    padding: 28px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 12px 34px rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
}

.about-grid {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* Profile column */
.profile-column {
    flex: 0 0 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.profile-img {
    width: 160px;
    height: 160px;
    border-radius: 14px; /* softer rounded corners */
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.04);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

/* responsive tweak */
@media (max-width: 900px) {
    .profile-img {
        width: 120px;
        height: 120px;
        border-radius: 12px;
    }
}

/* Content column */
.content-column {
    flex: 1 1 auto;
    color: var(--text);
}

.about-header h1 {
    margin: 0 0 6px;
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.lead {
    margin: 0 0 16px;
    color: rgba(255,255,255,0.75);
    font-weight: 600;
}

.about-body p {
    margin: 0 0 16px;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
}

.about-list {
    margin: 8px 0 18px 20px;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
}

.about-list li {
    margin-bottom: 8px;
}

/* Subhead styling */
.content-column h4 {
    margin: 12px 0 8px;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.85);
    font-weight: 700;
}

/* Responsive: stack on small screens */
@media (max-width: 900px) {
    .about-frame {
        margin: 22px 16px;
        padding: 18px;
    }
    .about-grid {
        flex-direction: column;
        gap: 12px;
    }
    .profile-column {
        flex: 0 0 auto;
        padding: 0;
    }
    .profile-img {
        width: 120px;
        height: 120px;
    }
    .about-header h1 { font-size: 1.6rem; }
}

/* secondary image (portrait thumbnail) — larger portrait */
.profile-gallery .profile-alt {
    width: 160px;
    height: 213px;       /* portrait (3:4 -> height = width * 4/3) */
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.03);
    box-shadow: 0 10px 26px rgba(0,0,0,0.48);
    display: block;
    overflow: hidden;
}

/* responsive sizes */
@media (max-width: 900px) {
    .profile-gallery .profile-img {
        width: 120px;
        height: 120px;
    }
    .profile-gallery .profile-alt {
        width: 120px;
        height: 160px; /* keep portrait proportion on small screens */
    }
}

/* Restore the small left bar + label for the grid header */
.grid-section-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.grid-section-header .grid-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* left accent bar */
.grid-section-header .grid-left::before {
    content: "";
    width: 6px;
    height: 44px;
    border-radius: 3px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(120,200,255,0.35));
    flex-shrink: 0;
}

/* small uppercase label above the title (mimics previous look) */
.grid-section-header .section-title {
    display: flex;
    flex-direction: column;
}
.grid-section-header .section-title::before {
    content: "Featured";
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}
/* make the visible title sit where it was before */
.grid-section-header .section-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
}
/* mobile fallback */
@media (max-width:1000px) {
    .grid-section-header .grid-left::before { height: 36px; }
    .grid-section-header .section-title::before { display: none; }
}

/* Mobile fix — prevent horizontal scroll on project detail pages (Aliens / Spite) */
@media (max-width: 900px) {
  /* block any horizontal overflow coming from project pages */
  main[data-barba-namespace="project-detail"] {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    box-sizing: border-box;
  }

  /* ensure key containers never grow beyond viewport */
  main[data-barba-namespace="project-detail"] .project-description,
  main[data-barba-namespace="project-detail"] .project-video-showcase,
  main[data-barba-namespace="project-detail"] .video-wrapper,
  main[data-barba-namespace="project-detail"] .showcase-video,
  main[data-barba-namespace="project-detail"] .description-text {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* ensure hero/video background doesn't push wider than viewport */
  main[data-barba-namespace="project-detail"] #project-hero-cinematic,
  main[data-barba-namespace="project-detail"] .hero-bg,
  main[data-barba-namespace="project-detail"] .video-background-container {
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  /* clamp media elements */
  main[data-barba-namespace="project-detail"] img,
  main[data-barba-namespace="project-detail"] video {
    max-width: 100vw !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
    display: block;
  }

  /* remove extra vw paddings that sometimes cause overflow */
  main[data-barba-namespace="project-detail"] section,
  main[data-barba-namespace="project-detail"] .project-description .description-text {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Tighter spacing for the Specialization page only */
main[data-barba-namespace="specialization"] section {
    padding-top: 18px;
    padding-bottom: 18px;
    padding-left: 6vw;
    padding-right: 6vw;
}

/* Reduce vertical gaps in spec grids/containers so segments feel more compact */
main[data-barba-namespace="specialization"] .spec-container,
main[data-barba-namespace="specialization"] .spec-grid,
main[data-barba-namespace="specialization"] .spec-grid-dual-video,
main[data-barba-namespace="specialization"] .specs-grid {
    gap: 16px; /* was larger — bring elements closer */
    margin-top: 1rem;
}

/* Reduce card spacing and padding slightly for denser layout */
main[data-barba-namespace="specialization"] .glass-card,
main[data-barba-namespace="specialization"] .glass-card2,
main[data-barba-namespace="specialization"] .standard-project {
    margin-bottom: 12px;
    padding: 20px;
}

/* Reduce the large bottom spacing used for project/video sections on this page */
main[data-barba-namespace="specialization"] .spec-grid-dual-video,
main[data-barba-namespace="specialization"] .highlight-row,
main[data-barba-namespace="specialization"] .other-projects-grid {
    margin-bottom: 6vh;
}

/* Slightly tighter video card spacing */
main[data-barba-namespace="specialization"] .video-stack,
main[data-barba-namespace="specialization"] .video-card-row {
    gap: 14px;
}

/* Reduce top offset for sticky cards so they start earlier when scrolling */
main[data-barba-namespace="specialization"] .spec-grid-dual-video .spec-process {
    top: 88px; /* was 120px — starts sticking earlier */
}

/* Mobile: keep it compact but readable */
@media (max-width: 900px) {
    main[data-barba-namespace="specialization"] section {
        padding-left: 18px;
        padding-right: 18px;
        padding-top: 14px;
        padding-bottom: 14px;
    }
    main[data-barba-namespace="specialization"] .glass-card,
    main[data-barba-namespace="specialization"] .glass-card2,
    main[data-barba-namespace="specialization"] .standard-project {
        padding: 14px;
        margin-bottom: 10px;
    }
    main[data-barba-namespace="specialization"] .spec-grid-dual-video {
        gap: 18px;
        margin-bottom: 5vh;
    }
}



