:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #ff4d4d;
    --font-heading: 'Anton', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor for custom one */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    width: 100vw;
    overflow-x: hidden;
}

body.overlay-open {
    overflow: hidden;
}

/* --- Custom Cursor --- */
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
    backdrop-filter: blur(2px);
    mix-blend-mode: exclusion;
}

.cursor-follower.hover-active {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
}

/* --- Canvas Background --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: filter 0.8s ease;
    /* Creating smoother transition */
}

body.overlay-open #bg-canvas {
    filter: brightness(0.2) blur(3px);
}

/* --- Noise Texture --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Loader --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
}

.loader.hidden {
    opacity: 0;
    /* Fade out instead of slide up */
    pointer-events: none;
    transition: opacity 0.8s ease-out;
    /* Smooth fade */
}

/* Cinematic Typography */
.loader-name-container {
    position: relative;
    font-family: 'Anton', sans-serif;
    /* Condensed/Impact style (Cinematic) */
    font-size: 8vw;
    /* Large and bold */
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    /* Slight tracking */
}




.loader-prompt.hidden {
    display: none;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
        /* Min opacity 20% */
    }
}

.loader-name-container,
.loader-count {
    transition: opacity 0.8s ease-out;
}

.loader-prompt {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    position: absolute;
    /* Take out of flow to perfect center */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    width: 100%;
    text-align: center;
    cursor: pointer;

    /* Fade In Transition */
    opacity: 0;
    transition: opacity 1s ease-in;
}

.blink-text {
    animation: blink 2s infinite;
}

.loader-prompt.visible {
    opacity: 1;
    /* Fade in container */
}

/* Base state: prompt is hidden from layout initially to avoid overlap, 
   but we handle visibility via opacity in the sequence */
.loader-prompt.hidden {
    display: none;
}

/* --- Navigation --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 500;
    mix-blend-mode: difference;
}

.nav-left {
    display: flex;
    flex-direction: column;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
}

.nav-role {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin-top: 0.5rem;
    opacity: 0.7;
    letter-spacing: 0;
}

.nav-right {
    display: flex;
    gap: 3rem;
    /* Increased gap */
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    position: relative;
    background: transparent;
    border: none;
    cursor: none;
    /* Custom cursor */
    padding: 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--text-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* --- Main Content --- */
#main-content {
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

#main-content.visible {
    opacity: 1;
}

.work-section {
    min-height: 100vh;
    padding: 15vh 3rem 10vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-item {
    position: relative;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    cursor: none;
    /* Custom cursor */
    transition: padding 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
    display: block;

    /* Staggered Animation Init State */
    opacity: 0;
    transform: translateY(20px);
}

.project-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.project-item:hover {
    padding-left: 3rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
}

.project-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-bottom: 0.2rem;
    pointer-events: none;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 7vw;
    text-transform: uppercase;
    line-height: 0.9;
    margin: 0;
    color: transparent;
    -webkit-text-stroke: 1px var(--text-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.project-item:hover .project-title {
    color: var(--text-color);
    -webkit-text-stroke: 0;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    opacity: 0.7;
    animation: fadeIn 2s ease 2s forwards, bounce 2s infinite;
    transition: opacity 0.5s ease;
}

.scroll-indicator.hide {
    opacity: 0;
    pointer-events: none;
}

@keyframes bounce {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, 10px);
    }
}

/* --- SPA Overlay --- */
.project-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.0);
    /* Transparent start for seamless feel */
    z-index: 2000;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1), background 0.8s ease;
    padding-bottom: 5rem;
}

.project-overlay.open {
    transform: none;
    /* remove stacking context so fixed children work */
    background: rgba(10, 10, 10, 0.92);
    /* Fade in background */
}

.close-overlay-btn {
    position: fixed;
    top: 2rem;
    right: 3rem;
    background: none;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    padding: 0.5rem 1rem;
    cursor: none;
    z-index: 2001;
    font-size: 0.9rem;
    transition: all 0.3s;
    mix-blend-mode: difference;
}

.close-overlay-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.overlay-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    color: var(--text-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

.project-overlay.open .overlay-content {
    opacity: 1;
    transform: translateY(0);
}

.cs-header {
    padding: 15vh 5vw 5vh;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 4rem;
}

.cs-title-large {
    font-family: var(--font-heading);
    font-size: 10vw;
    line-height: 0.8;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.cs-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
}

.cs-section {
    padding: 4rem 5vw;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-section h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    text-transform: uppercase;
    position: sticky;
    top: 2rem;
}

.cs-content p {
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

.cs-content ul {
    margin-bottom: 2rem;
    list-style: none;
}

.cs-content li {
    font-family: var(--font-body);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent-color);
}

.cs-image {
    width: 100%;
    height: auto;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.overlay-footer {
    padding: 8rem 0;
    text-align: center;
    cursor: none;
    transition: opacity 0.3s;
}

.overlay-footer .next-label {
    font-family: var(--font-mono);
    display: block;
    margin-bottom: 1rem;
}

.overlay-footer .next-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    text-transform: uppercase;
}

/* --- About Section --- */
.about-section {
    position: fixed;
    top: 0;
    right: 0;
    width: 40vw;
    height: 100vh;
    background: #f0f0f0;
    color: #050505;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
    z-index: 3000;
    overflow-y: auto;
    padding: 4rem;
}

.about-section.visible {
    transform: translateX(0);
}

.about-header {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 3rem;
    border-bottom: 2px solid #050505;
    padding-bottom: 1rem;
}

.about-header h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin: 0;
}

.close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    background: none;
    border: 1px solid #050505;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #050505;
    color: #fff;
}

.resume-btn {
    display: inline-block;
    background: #050505;
    color: #fff;
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    text-decoration: none;
    margin-top: 1rem;
    cursor: none;
    transition: transform 0.2s;
}

.resume-btn:hover {
    transform: scale(1.05);
}

.social-link {
    font-family: var(--font-mono);
    color: #050505;
    text-decoration: none;
    border-bottom: 1px solid #050505;
    margin-right: 1rem;
    display: inline-block;
    margin-top: 1rem;
    cursor: none;
}

@media (max-width: 768px) {
    .work-section {
        padding-top: 10rem;
    }

    .project-title {
        font-size: 15vw;
    }

    .cs-section {
        grid-template-columns: 1fr;
    }

    .cs-section h2 {
        position: static;
        margin-bottom: 1rem;
    }

    .about-section {
        width: 100vw;
    }

    .nav-role {
        display: none;
    }
}

/* --- Redesigned About Section --- */
.loader-name-container {
    position: relative;
    font-family: var(--font-heading);
    font-size: 5vw;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.loader-name-stroke {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-color);
    position: relative;
    z-index: 1;
}

.loader-name-fill {
    color: var(--text-color);
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    /* Animates from 0% to 100% */
    overflow: hidden;
    white-space: nowrap;
    z-index: 2;
    transition: width 0.1s linear;
    /* Smooth fill */
}

.loader-count {
    /* Numeric percentage */
    font-family: var(--font-mono);
    font-size: 1rem;
    opacity: 0.7;
    text-align: right;
    width: 100%;
}

.bio-intro {
    font-family: var(--font-heading);
    font-size: 5vw;
    line-height: 0.9;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.bio-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 400px;
    opacity: 0.8;
    margin-bottom: 3rem;
}

.social-links-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.resume-btn {
    background: transparent;
    border: 1px solid #050505;
    color: #050505;
    padding: 0.8rem 2rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    text-align: center;
}

.resume-btn:hover {
    background: #050505;
    color: #fff;
}

.social-row {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #050505;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.social-link:hover {
    border-bottom: 1px solid #050505;
}

.awards-column h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
    letter-spacing: 0.05em;
}

.awards-list {
    list-style: none;
    padding: 0;
}

.awards-list li {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.award-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    opacity: 0.5;
}

/* --- ADVANCED ARTIFACTS (NEW) --- */

/* 1. Persona Cards */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.persona-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    position: relative;
    transition: transform 0.2s;
}

.persona-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.persona-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.persona-avatar {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
    font-family: var(--font-heading);
}

.persona-role {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-transform: uppercase;
}

.persona-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.persona-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

/* 2. Survey Data Visualization */
.survey-row {
    display: grid;
    grid-template-columns: 150px 1fr 50px;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.survey-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    width: 100%;
}

.survey-bar-fill {
    height: 100%;
    background: var(--accent-color);
}

/* 3. IA Tree (Information Architecture) */
.ia-tree-container {
    padding: 3rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
    overflow-x: auto;
}

.ia-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    min-width: 600px;
}

.ia-node {
    border: 1px solid var(--text-color);
    padding: 0.8rem 1.5rem;
    background: #000;
    text-align: center;
    position: relative;
    min-width: 120px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    z-index: 2;
}

.ia-children {
    display: flex;
    gap: 3rem;
    position: relative;
}

.ia-children::before {
    /* Vertical line from parent */
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 2rem;
    background: var(--text-color);
}

.ia-children::after {
    /* Horizontal connector */
    content: '';
    position: absolute;
    top: -1rem;
    /* Midpoint of vertical line */
    left: 10%;
    /* Adjust based on child width */
    width: 80%;
    height: 1px;
    background: var(--text-color);
    z-index: 1;
}

/* 4. Roadmap / Timeline */
.roadmap-container {
    margin: 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.roadmap-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 2rem;
    padding-bottom: 4rem;
    position: relative;
}

.roadmap-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 5px;
    width: 9px;
    height: 9px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
}

.roadmap-phase {
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.roadmap-content h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* 5. Lo-Fi Sketch Style */
.sketch-container {
    border: 3px dashed rgba(255, 255, 255, 0.3);
    background: #151515;
    padding: 3rem;
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    color: #ddd;
    position: relative;
    margin: 3rem 0;
}

.sketch-sticky {
    position: absolute;
    top: -15px;
    right: 20px;
    background: #ffeb3b;
    color: #000;
    padding: 10px 15px;
    font-weight: bold;
    transform: rotate(2deg);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    z-index: 5;
}

.sketch-wireframe {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    height: 400px;
    border: 2px solid #555;
    background: #222;
}

.sketch-sidebar {
    border-right: 2px solid #555;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sketch-block {
    height: 20px;
    background: #444;
    border-radius: 4px;
}

.sketch-main {
    padding: 20px;
}

.sketch-header {
    height: 40px;
    background: #333;
    margin-bottom: 20px;
    border-radius: 4px;
}

.sketch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.sketch-card {
    height: 100px;
    border: 2px dashed #555;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}

/* Artifact Styles (Flowcharts) */
.flow-artifact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 3rem;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    justify-content: center;
}

.flow-step {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    min-width: 180px;
    background: #000;
    position: relative;
}

.flow-step.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.flow-arrow {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.step-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.step-label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.step-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* Lightbox (Image Zoom) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-size: 2rem;
    cursor: none;
    font-family: var(--font-mono);
}

/* Indicating images are clickable */
.cs-image {
    cursor: none;
    /* We use custom cursor, but logic handles it */
    transition: transform 0.3s ease, filter 0.3s ease;
}

.cs-image:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* --- Enhanced Lightbox --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    /* Centering wrapper */
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    opacity: 1;
}

.lightbox-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Prevent scroll when not zoomed */
    cursor: zoom-in;
}

.lightbox-wrapper.zoomed {
    overflow: auto;
    /* Allow scrolling when zoomed */
    display: block;
    /* Switch to block to allow image to overflow */
    cursor: grab;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* When zoomed, image breaks free */
.lightbox-wrapper.zoomed .lightbox-img {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    display: block;
    margin: auto;
    /* Centers it if smaller than viewport, allows scroll if larger */
    cursor: zoom-out;
}

.lightbox-close {
    position: fixed;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    z-index: 10001;
    /* Above image */
    line-height: 0;
    padding-bottom: 5px;
    /* Visual tweak for X */
}

.lightbox-close:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

}


/* --- Sticky Close Button (Project Overlay) --- */
.close-overlay-btn {
    position: fixed;
    /* Sticky behavior */
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    cursor: pointer;
    z-index: 2000;
    /* Ensure it stays on top */
    mix-blend-mode: difference;
    /* Visible on light/dark backgrounds */
    transition: all 0.3s ease;
}

.close-overlay-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}