/* 
        ========================================
        CORE & RESET
        ========================================
        */
:root[data-theme="dark"] {
    --bg: #050505;
    --text: #e0e0e0;
    --text-dim: #888888;
    --accent: #4f46e5;
    --line: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(5, 5, 5, 0.8);
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-display: 'Italiana', serif;
    --font-body: 'Space Grotesk', sans-serif;
    --cursor-size: 20px;
}

:root[data-theme="light"] {
    --bg: #ffffff;
    --text: #111111;
    --text-dim: #555555;
    --accent: #2563eb;
    --line: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.6);
    --font-display: 'Italiana', serif;
    --font-body: 'Space Grotesk', sans-serif;
    --cursor-size: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Custom cursor */
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s, color 0.5s;
}

html {
    scroll-behavior: smooth;
}

/* Scroll snap only on desktop for better mobile performance */
@media (min-width: 769px) {
    html {
        scroll-snap-type: y proximity;
    }
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* 
        ========================================
        UTILITIES
        ========================================
        */
.container {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.uppercase {
    text-transform: uppercase;
}

.relative {
    position: relative;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1;
}

.display-text {
    font-size: clamp(4rem, 15vw, 12rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    mix-blend-mode: exclusion;
}

.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
    display: inline-block;
}

/* Section Snap Points - Desktop only */
@media (min-width: 769px) {
    section {
        scroll-snap-align: start;
        scroll-snap-stop: normal;
    }
}

/* Section Transition Indicator */
.section-indicator {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
    opacity: 0.3;
    transition: all 0.3s ease;
    cursor: none;
    position: relative;
}

.section-dot.active {
    opacity: 1;
    background: var(--accent);
    transform: scale(1.5);
}

.section-dot::before {
    content: attr(data-label);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-dim);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    pointer-events: none;
}

.section-dot:hover::before {
    opacity: 1;
}

/* 
        ========================================
        BACKGROUND & DEPTH
        ========================================
        */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--bg);
    transition: background 0.5s;
}

/* Gradient Mesh - Modern animated background */
.gradient-mesh {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(at 20% 30%, var(--accent) 0px, transparent 50%),
        radial-gradient(at 80% 20%, #8b5cf6 0px, transparent 50%),
        radial-gradient(at 40% 70%, #06b6d4 0px, transparent 50%),
        radial-gradient(at 90% 80%, #ec4899 0px, transparent 50%),
        radial-gradient(at 10% 90%, #10b981 0px, transparent 50%);
    filter: blur(100px);
    opacity: 0.3;
    animation: meshMove 20s ease-in-out infinite;
    will-change: transform;
}

@keyframes meshMove {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(5%, -5%) scale(1.1);
    }

    50% {
        transform: translate(-3%, 3%) scale(0.95);
    }

    75% {
        transform: translate(3%, 5%) scale(1.05);
    }
}

/* Individual mesh orbs for layered effect */
.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: meshFloat 15s infinite ease-in-out;
    will-change: transform, opacity;
    transition: transform 0.3s ease-out;
}

.mesh-orb-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: -15%;
    left: -15%;
    animation-delay: 0s;
}

.mesh-orb-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.mesh-orb-3 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

.mesh-orb-4 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    top: 20%;
    right: 10%;
    animation-delay: -7s;
}

@keyframes meshFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.25;
    }

    33% {
        transform: translate(20px, -30px) scale(1.08);
        opacity: 0.3;
    }

    66% {
        transform: translate(-15px, 15px) scale(0.92);
        opacity: 0.2;
    }
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.05;
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAGFBMVEUAAAA5OTkAAABMTExERERmZmYzMzNmZmYwPj/1AAAACHRSTlMAMwA1MzMzM7O0s14AAABSSURBVDjLY2AYBaNg2AJGJiBpCqSNAUiTIGkOIE2CpDmBNAmS5gTSJEiaE0iTIGlOIE2CpDmBNAmS5gTSJEiaE0iTIGlOIE2CpDmBNAmS5gQoAADsQBAzTgn5oAAAAABJRU5ErkJggg==');
}

/* Theme Transition Overlay */
.theme-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.theme-transition.active {
    opacity: 1;
}

.theme-transition::before {
    content: '';
    position: absolute;
    top: var(--transition-y, 50%);
    left: var(--transition-x, 50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--bg);
    transform: translate(-50%, -50%);
    transition: width 0.8s cubic-bezier(0.77, 0, 0.175, 1),
        height 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.theme-transition.active::before {
    width: 300vmax;
    height: 300vmax;
}

/* Mesh orb color transitions */
.mesh-orb {
    transition: transform 0.3s ease-out, background 0.8s ease;
}

/* Enhanced Glassmorphism with Visual Depth */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 16px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition:
        transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.4s,
        backdrop-filter 0.3s,
        border 0.3s;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg,
            var(--accent) 0%,
            #8b5cf6 50%,
            var(--accent) 100%);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s, background-position 0.5s;
    animation: borderGradient 3s ease infinite;
}

@keyframes borderGradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.glass-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 12px 24px rgba(0, 0, 0, 0.15),
        0 24px 48px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-color: var(--accent);
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover::after {
    opacity: 1;
}

/* Magnetic Hover Effect */
.magnetic {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    z-index: 10001;
    transition: width 0.1s ease-out;
}

/* Mobile Touch Optimizations */
@media (max-width: 768px) {

    /* Smooth touch scrolling */
    html {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: none;
    }

    body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: none;
    }

    .menu-btn,
    .project-item,
    .section-dot {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-controls {
        gap: 0.5rem;
    }

    /* Mobile Optimizations: Hide custom cursor & section indicator */
    #cursor {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }

    .section-indicator {
        display: none !important;
    }

    /* Disable heavy animations on mobile */
    .mesh-orb,
    .gradient-mesh {
        animation: none !important;
        transform: none !important;
    }

    /* Optimize transforms for mobile */
    .hero-text-upper,
    .hero-text-lower {
        will-change: auto !important;
    }
}

/* Pull to Refresh Indicator */
.pull-refresh {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    opacity: 0;
}

.pull-refresh.active {
    top: 20px;
    opacity: 1;
}

.pull-refresh.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: translateX(-50%) rotate(0deg);
    }

    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

/* Mobile Navigation Drawer */
@media (max-width: 768px) {
    .menu-overlay {
        transform: translateX(100%);
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: 5rem;
        width: 80%;
        max-width: 320px;
        left: auto;
        right: 0;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    }

    .menu-overlay.active {
        transform: translateX(0);
    }

    .menu-link {
        font-size: clamp(2rem, 5vw, 3rem);
        text-align: left;
        width: 100%;
        padding: 0 2rem;
    }

    .menu-overlay::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
    }

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

/* Skeleton Screens */
.skeleton {
    background: linear-gradient(90deg,
            var(--glass-bg) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            var(--glass-bg) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-title {
    height: 2rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-card {
    height: 200px;
    margin-bottom: 1rem;
}

/* Lazy Loading Images */
.lazy-image {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
}

.lazy-image img {
    /* Set for instant load: no fade on default */
    opacity: 1;
    transition: none !important;
    -webkit-transition: none !important;
    transform: none !important;
}

.lazy-image img.loaded {
    opacity: 1;
}

/* Shimmer effect removed for instant load */
.lazy-image::before {
    display: none;
}

/* Stagger Animation Enhancement */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) {
    transition-delay: 0.05s;
}

.stagger-item:nth-child(2) {
    transition-delay: 0.1s;
}

.stagger-item:nth-child(3) {
    transition-delay: 0.15s;
}

.stagger-item:nth-child(4) {
    transition-delay: 0.2s;
}

.stagger-item:nth-child(5) {
    transition-delay: 0.25s;
}

.stagger-item:nth-child(6) {
    transition-delay: 0.3s;
}

.stagger-item:nth-child(7) {
    transition-delay: 0.35s;
}

.stagger-item:nth-child(8) {
    transition-delay: 0.4s;
}

/* Haptic Feedback Simulation */
@keyframes haptic-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.95);
    }
}

.haptic-feedback {
    animation: haptic-pulse 0.15s ease-in-out;
}

/* 
        ========================================
        CUSTOM CURSOR (Enhanced)
        ========================================
        */
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 1px solid var(--text);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-radius 0.3s;
    mix-blend-mode: difference;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cursor.hovered {
    width: 60px;
    height: 60px;
    background-color: var(--accent);
    border-color: var(--accent);
    mix-blend-mode: normal;
    opacity: 0.5;
}

#cursor.view-project {
    width: 100px;
    height: 100px;
    background-color: var(--accent);
    border-radius: 50%;
    border: none;
}

#cursor.view-project::after {
    content: 'View';
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
}

#cursor.click-me {
    width: 80px;
    height: 80px;
    background-color: rgba(79, 70, 229, 0.3);
    border: 2px solid var(--accent);
}

#cursor.click-me::after {
    content: 'Click';
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
}

/* 
        ========================================
        SCROLL ANIMATIONS
        ========================================
        */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-up.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

.stagger-5 {
    transition-delay: 0.5s;
}

/* Fallback - ensure content is visible if JS doesn't load */
.no-js .fade-in,
.no-js .slide-up {
    opacity: 1;
    transform: translateY(0);
}

/* 
        ========================================
        NAVIGATION (Split Frame - Refined)
        ========================================
        */
nav {
    position: static;
}

.nav-logo {
    position: fixed;
    top: 2rem;
    left: 3rem;
    z-index: 1000;
    text-decoration: none;
    mix-blend-mode: difference;
}

/* Light Mode - Nav Logo normal blend */
:root[data-theme="light"] .nav-logo {
    mix-blend-mode: normal !important;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text);
    letter-spacing: -1px;
}

/* Light Mode - Logo black */
:root[data-theme="light"] .logo {
    color: #000000 !important;
    mix-blend-mode: normal !important;
}

.nav-controls {
    position: fixed;
    top: 2rem;
    right: 3rem;
    z-index: 1000;
    display: flex;
    gap: 1rem;
    align-items: center;
    mix-blend-mode: difference;
}

/* Light Mode - Nav Controls normal blend */
:root[data-theme="light"] .nav-controls {
    mix-blend-mode: normal !important;
}

/* Light Mode - Menu Button visibility */
:root[data-theme="light"] .menu-btn {
    border-color: #000000 !important;
    background: #000000 !important;
    color: #ffffff !important;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: none;
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.menu-btn:hover {
    background: var(--text);
    color: var(--bg);
    transform: scale(1.05);
}

#themeToggle {
    font-size: 1rem;
    padding: 0.8rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 
        ========================================
        PROJECTS (Refined List)
        ========================================
        */
.projects {
    padding: 10rem 0;
    position: relative;
}

.projects-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 6rem;
    align-items: start;
}

/* Left Column: List */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 10vh;
    padding-bottom: 10vh;
}

.project-item {
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    text-decoration: none;
    color: var(--text-dim);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
    position: relative;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
    cursor: none;
}

.project-item:last-child {
    border-bottom: none;
}

.project-item.active {
    color: var(--text);
    padding-left: 2rem;
}

.project-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 5vw, 6rem);
    line-height: 0.9;
    display: block;
    margin-bottom: 1rem;
    transition: transform 0.4s;
}

.project-item:hover .project-name {
    transform: skewX(-10deg);
}

.project-meta {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    display: block;
}

/* Fullscreen Menu */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem 5%;
    opacity: 0;
}

.menu-overlay.active {
    transform: translateY(0);
    opacity: 1;
}

/* Light mode menu overlay */
:root[data-theme="light"] .menu-overlay {
    background: rgba(255, 255, 255, 0.95);
}

.menu-link {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 8rem);
    color: var(--text-dim);
    text-decoration: none;
    margin: 0.2rem 0;
    /* Reduced from 0.5rem to fit all items */
    transition: color 0.3s, transform 0.3s;
    opacity: 0;
    transform: translateY(20px);
    max-width: 90vw;
    /* Prevent overflow */
    text-align: center;
    word-wrap: break-word;
}

.menu-overlay.active .menu-link {
    animation: slideUpFade 0.5s forwards;
}

.menu-overlay.active .menu-link:nth-child(1) {
    animation-delay: 0.1s;
}

.menu-overlay.active .menu-link:nth-child(2) {
    animation-delay: 0.2s;
}

.menu-overlay.active .menu-link:nth-child(3) {
    animation-delay: 0.3s;
}

.menu-overlay.active .menu-link:nth-child(4) {
    animation-delay: 0.4s;
}

.menu-overlay.active .menu-link:nth-child(5) {
    animation-delay: 0.5s;
}

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

.menu-link:hover {
    color: var(--accent);
    transform: skewX(-5deg) scale(1.05) !important;
    /* Reduced skew and added scale instead of translateX */
}

/* 
        ========================================
        LOADER (Minimalist & Elegant)
        ========================================
        */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-counter {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--text);
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.loader-text {
    font-family: var(--font-body);
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

/* Minimalist Progress Bar */
.loader-bar {
    width: 200px;
    height: 1px;
    background: var(--line);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
    animation: loadProgress 0.8s ease-out forwards;
}

@keyframes loadProgress {
    to {
        width: 100%;
    }
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 
        ========================================
        HERO SECTION (Pure Typography)
        ========================================
        */
.hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.hero-text-upper {
    font-family: var(--font-display);
    font-size: clamp(5rem, 18vw, 16rem);
    line-height: 0.8;
    z-index: 1;
    position: relative;
    mix-blend-mode: exclusion;
    pointer-events: none;
    color: var(--text);
}

.hero-text-lower {
    font-family: var(--font-display);
    font-size: clamp(5rem, 18vw, 16rem);
    line-height: 0.8;
    z-index: 3;
    position: relative;
    margin-top: 0;
    mix-blend-mode: exclusion;
    pointer-events: none;
    color: var(--text);
}

/* Light Mode Fix - Override blend mode and set black */
:root[data-theme="light"] .hero-text-upper,
:root[data-theme="light"] .hero-text-lower {
    color: #000000 !important;
    mix-blend-mode: normal !important;
}

/* Light Mode - High Contrast Polish */
:root[data-theme="light"] .hero-tagline,
:root[data-theme="light"] .hero-tagline span {
    color: #000000 !important;
    opacity: 1 !important;
    font-weight: 500;
}

:root[data-theme="light"] .stat-number {
    color: #000000 !important;
}

:root[data-theme="light"] .stat-number+span {
    color: #000000 !important;
    font-weight: 500;
}

:root[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
}

:root[data-theme="light"] .glass-card:hover {
    border-color: var(--accent);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.25);
}

/* Fix visibility for stats and cursor in light mode */
:root[data-theme="light"] .display-text,
:root[data-theme="light"] .stat-number {
    mix-blend-mode: normal !important;
    color: #000000 !important;
}

:root[data-theme="light"] #cursor {
    mix-blend-mode: normal !important;
    border-color: #000000 !important;
    background-color: rgba(0, 0, 0, 0.1);
    /* Slight fill for visibility */
}

:root[data-theme="light"] #cursor.hovered {
    background-color: rgba(0, 0, 0, 0.1) !important;
    border-color: transparent !important;
    transform: translate(-50%, -50%) scale(2);
}

.hero-tagline {
    position: absolute;
    bottom: 3rem;
    left: 3rem;
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    max-width: 300px;
    z-index: 5;
}

.scroll-indicator-hero {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--text-dim);
    opacity: 0.7;
    animation: bounce 2s infinite;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 5;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* Hero Parallax Layers */
.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.1;
    border: 1px solid var(--text);
}

.hero-shape-1 {
    width: 100px;
    height: 100px;
    top: 15%;
    left: 10%;
    border-radius: 50%;
    animation: floatShape 20s ease-in-out infinite;
    z-index: 0;
}

.hero-shape-2 {
    width: 80px;
    height: 80px;
    top: 70%;
    right: 15%;
    transform: rotate(45deg);
    animation: floatShape 15s ease-in-out infinite reverse;
    z-index: 0;
}

.hero-shape-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    border-radius: 50%;
    animation: floatShape 18s ease-in-out infinite;
    animation-delay: -5s;
    z-index: 0;
}

.hero-shape-4 {
    width: 120px;
    height: 120px;
    top: 40%;
    right: 10%;
    transform: rotate(30deg);
    animation: floatShape 22s ease-in-out infinite;
    animation-delay: -8s;
    z-index: 0;
}

@keyframes floatShape {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.1;
    }

    25% {
        transform: translate(20px, -20px) rotate(90deg);
        opacity: 0.15;
    }

    50% {
        transform: translate(0, -40px) rotate(180deg);
        opacity: 0.08;
    }

    75% {
        transform: translate(-20px, -20px) rotate(270deg);
        opacity: 0.12;
    }
}

/* Stats Animation Styles */
.stat-number {
    display: inline-block;
    transition: transform 0.3s ease;
}

.stat-number.counting {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        color: var(--accent);
    }
}

@media (max-width: 768px) {

    .hero-text-upper,
    .hero-text-lower {
        font-size: 20vw;
    }

    .hero-tagline {
        left: 1.5rem;
        bottom: 6rem;
        font-size: 0.8rem;
    }

    .scroll-indicator-hero {
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

/*
        ========================================
        ABOUT
        ========================================
        */
.about {
    padding: 10rem 0;
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 5rem;
    left: -5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.1;
    filter: blur(40px);
    z-index: -1;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 6rem;
    align-items: center;
}

.about-text {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.4;
    color: var(--text);
    position: relative;
    font-weight: 300;
}

.stat-number {
    font-size: clamp(4rem, 6vw, 6rem);
    color: var(--text);
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.about-decoration {
    position: absolute;
    top: -2rem;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.about-text .section-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-bottom: 3rem;
    border-bottom: none;
    padding-bottom: 0;
}

.about-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-dim);
}

.highlight {
    color: var(--accent);
}

/* 
        ========================================
        SKILLS (Ticker)
        ========================================
        */
.skills-ticker {
    padding: 4rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    white-space: nowrap;
}

.ticker-track {
    display: inline-block;
    animation: ticker 20s linear infinite;
}

.ticker-item {
    font-family: var(--font-display);
    font-size: 4rem;
    margin: 0 2rem;
    color: transparent;
    -webkit-text-stroke: 1px var(--text-dim);
    transition: color 0.3s;
}

.ticker-item:hover {
    color: var(--accent);
    -webkit-text-stroke: 1px var(--accent);
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Skill Cards */
.skill-card {
    position: relative;
}

.skill-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* 
        ========================================
        PROJECTS (Card Grid)
        ========================================
        */
.projects {
    padding: 10rem 0;
    position: relative;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Work Cards */
.work-card {
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 420px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.work-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    transition: transform 0.3s ease;
}

.work-card:hover .work-icon {
    transform: scale(1.1) rotate(5deg);
}

.work-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.work-tech {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .work-card {
        padding: 2rem 1.5rem;
    }

    .work-icon {
        font-size: 3rem;
    }

    .work-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
}

/* 
        ========================================
        PHOTOGRAPHY (UPGRADED - VERSION B)
        ========================================
        */

/* Section container */
.photography {
    padding: 5rem 0;
    overflow: hidden;
}

/* Horizontal track: instagram-like smooth scroll */
.photo-track {
    display: flex;
    gap: 1.5rem;
    padding-left: 5%;
    padding-top: 2rem;
    padding-bottom: 4rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    will-change: transform;
}

.photo-track::-webkit-scrollbar {
    display: none;
}

/* Photo card (improved scales & consistent heights) */
.photo-card {
    min-width: clamp(280px, 22vw, 380px);
    height: clamp(400px, 50vh, 580px);
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    scroll-snap-align: center;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s ease;
    cursor: grab;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent);
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.35);
    -webkit-user-select: none;
    user-select: none;
}

/* Drag cursor tweak */
.photo-card:active {
    cursor: grabbing;
    transform: scale(0.997);
}

/* Image fill - instant load (no transition) */
.photo-card img,
.lazy-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1 !important;
    transition: none !important;
    transform: none !important;
}

/* Desktop hover: subtle lift and zoom */
@media (min-width: 769px) {
    .photo-card:hover {
        transform: translateY(-12px) scale(1.02);
        box-shadow: 0 26px 60px -18px rgba(0, 0, 0, 0.6);
        z-index: 20;
    }

    .photo-card:hover img {
        transform: scale(1.03);
        transition: transform 0.45s ease;
    }
}

/* Overlay - subtle and non-intrusive */
.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18) 55%);
    opacity: 0;
    transition: opacity 0.36s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    pointer-events: none;
    /* prevents overlay interfering with touch scroll */
}

/* Show only on hover for desktops */
@media (hover: hover) {
    .photo-card:hover .photo-overlay {
        opacity: 1;
    }
}

/* Text container animation (desktop) */
.photo-info {
    transform: translateY(22px);
    transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
    .photo-card:hover .photo-info {
        transform: translateY(0);
    }
}

/* Titles - balanced for photography */
.photo-title {
    font-family: var(--font-display);
    font-size: 1.9rem;
    color: #ffffff;
    margin-bottom: 0.3rem;
    line-height: 1.05;
    letter-spacing: -0.01em;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

.photo-loc {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.88);
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-weight: 600;
}

/* Accessibility: ensure overlay text remains readable on light themes */
:root[data-theme="light"] .photo-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6) 55%);
}

:root[data-theme="light"] .photo-title {
    color: #000;
    text-shadow: none;
}

:root[data-theme="light"] .photo-loc {
    color: rgba(0, 0, 0, 0.7);
}

/* ========================================
   MOBILE - IMPORTANT FIXES (Version B)
   ======================================== */
@media (max-width: 768px) {

    .photo-track {
        padding-left: 1rem;
        gap: 0.9rem;
    }

    /* Use viewport height for consistent scaling */
    .photo-card {
        min-width: 80vw;
        height: 55vh;
        border-radius: 12px;
        box-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.45);
    }

    /* Overlay becomes smaller and lighter */
    .photo-overlay {
        padding: 0.85rem !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.56), transparent 52%) !important;
        opacity: 1;
        /* show overlay on mobile for immediate context but lightweight */
        pointer-events: none;
    }

    /* Smaller title & location so it never pushes content */
    .photo-title {
        font-size: 1.05rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.15rem !important;
    }

    .photo-loc {
        font-size: 0.65rem !important;
        letter-spacing: 1px !important;
        opacity: 0.95;
    }

    /* Ensure images load instantly without transitions */
    .lazy-image img,
    .photo-card img {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    /* Make sure the overlay text doesn't push or change layout */
    .photo-info {
        transform: translateY(0) !important;
    }
}

/* small phone tweak */
@media (max-width: 420px) {
    .photo-card {
        min-width: 86vw;
        height: 52vh;
    }

    .photo-title {
        font-size: 1rem !important;
    }

    .photo-loc {
        font-size: 0.62rem !important;
    }
}

/* Gallery Controls */
.gallery-nav {
    display: flex;
    gap: 1rem;
}

.gallery-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.gallery-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
}

@media (max-width: 768px) {
    .gallery-nav {
        display: none;
    }
}

/* ========================================
   END PHOTOGRAPHY - VERSION B
   ======================================== */

/* 
        ========================================
        CONTACT
        ========================================
        */
.contact {
    padding: 10rem 0;
    text-align: center;
    position: relative;
}

.contact-link {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 8rem);
    color: var(--text);
    text-decoration: none;
    position: relative;
    display: inline-block;
    background: linear-gradient(90deg, var(--accent), #8b5cf6, var(--accent));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    transition: transform 0.3s ease;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.contact-link:hover {
    transform: scale(1.05);
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-link:hover::after {
    width: 100%;
}

/* Enhanced Email Button */
.contact .menu-btn {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    }

    50% {
        box-shadow: 0 4px 25px rgba(79, 70, 229, 0.5);
    }
}

.contact .menu-btn:hover {
    box-shadow: 0 6px 30px rgba(79, 70, 229, 0.6);
    transform: translateY(-2px);
}

/* 
        ========================================
        FOOTER
        ========================================
        */
footer {
    padding: 4rem 5%;
    border-top: 1px solid var(--line);
    background: var(--bg);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1;
}

.footer-copyright {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.footer-nav {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.footer-link:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }
}

/* Mobile: Reduce section gaps globally */
@media (max-width: 768px) {

    .projects,
    .about,
    .photography,
    .contact {
        padding: 5rem 0 !important;
    }
}

/* 
        ========================================
        PROJECT MODAL
        ========================================
        */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 3rem;
    border-radius: 20px;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-dim);
    cursor: none;
    line-height: 1;
    transition: color 0.3s, transform 0.3s;
}

.modal-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    color: var(--text);
}

.modal-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.modal-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.modal-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.modal-tag {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text);
}

.modal-features {
    list-style: none;
    padding: 0;
}

.modal-features li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-dim);
    line-height: 1.6;
}

.modal-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.modal-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-link {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--line);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.modal-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

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

@media (max-width: 768px) {
    .modal-content {
        padding: 2rem;
        max-height: 90vh;
    }

    .modal-title {
        font-size: 2rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .project-name {
        font-size: 2rem;
    }

    .photo-card {
        min-width: 300px;
        height: 400px;
    }
}

/* Reveal Animation Class */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.active {
    opacity: 1;
    transform: translateY(0);
}

/* 
========================================
BACK TO TOP BUTTON
========================================
*/
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Mobile adjustment */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
        font-size: 1.2rem;
    }
}