* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #ffffff;
    --off-white: #fbfbfd;
    --light-gray: #f5f5f7;
    --text-gray: #333333;
    --text-light: #666666;
    --accent-line: #e0e0e0;
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
body.dark-mode {
    --white: #0a0a0a;
    --off-white: #0f0f0f;
    --light-gray: #1a1a1a;
    --text-gray: #e5e5e5;
    --text-light: #a0a0a0;
    --accent-line: #2a2a2a;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .nav {
    background: transparent;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--accent-line);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

body.dark-mode .nav.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
}

.nav-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.nav-link {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    letter-spacing: 0.5px;
    color: var(--text-gray);
    text-decoration: none;
    text-transform: lowercase;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

body.dark-mode .nav-link {
    color: #a0a0a0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--text-gray);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--text-gray);
    opacity: 0.7;
}

body.dark-mode .nav-link:hover {
    color: #ffffff;
    opacity: 1;
}

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

/* Elegant Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 30px;
    right: 60px;
    padding: 10px 24px;
    min-height: 40px;
    border-radius: 30px;
    border: 1px solid var(--accent-line);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    position: fixed;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--text-gray);
}

.toggle-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: var(--text-light);
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 1;
    display: block;
}

.toggle-text.light-text {
    opacity: 1;
    visibility: visible;
}

.toggle-text.dark-text {
    opacity: 0;
    visibility: hidden;
    position: absolute;
}

body.dark-mode .toggle-text.light-text {
    opacity: 0;
    visibility: hidden;
    position: absolute;
}

body.dark-mode .toggle-text.dark-text {
    opacity: 1;
    visibility: visible;
    position: relative;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background-color: var(--white);
    color: var(--text-gray);
    line-height: 1.8;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

/* Decorative Photo Frames */
.decorative-frame {
    position: fixed;
    z-index: 1;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.decorative-frame.hidden {
    opacity: 0;
    transform: scale(0.95);
}

.decorative-frame:hover {
    opacity: 0.8;
}

.frame-top-left {
    top: 0;
    left: 0;
    width: 220px;
    height: auto;
}

.frame-bottom-left {
    bottom: 80px;
    left: 0;
    width: 192px;
    height: auto;
}

.frame-right {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 200px;
    height: auto;
}

.frame-right.hidden {
    transform: translateY(-50%) scale(0.9);
}

body.dark-mode .decorative-frame {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 120px 40px 120px 40px;
    background: linear-gradient(180deg, #f7f7f9 0%, var(--white) 100%);
    transition: background 0.3s ease;
    position: relative;
}

body.dark-mode .hero {
    background: linear-gradient(180deg, #0f0f0f 0%, var(--white) 100%);
}

/* Photo Frame */
.photo-frame {
    width: 100%;
    max-width: 650px;
    aspect-ratio: 1/1;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    background: var(--white);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.08),
        0 3px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 1.2s cubic-bezier(0.4, 0, 0.2, 1), border 1.2s ease;
}

.photo-frame::after {
    content: '';
    position: absolute;
    inset: -60px;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.06) 0%,
        rgba(0, 0, 0, 0.03) 30%,
        rgba(0, 0, 0, 0.015) 50%,
        transparent 70%
    );
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    animation: shadowFadeIn 1.5s ease-out forwards;
}

body.dark-mode .photo-frame {
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 60px 6px rgba(255, 255, 255, 0.09),
        0 0 100px 10px rgba(255, 255, 255, 0.06),
        0 0 140px 14px rgba(255, 255, 255, 0.03),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark-mode .photo-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.03) 75%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    mix-blend-mode: overlay;
    transition: opacity 1.2s ease 0.3s;
}

body.dark-mode .photo-frame::before {
    opacity: 1;
}

body.dark-mode .photo-frame::after {
    content: '';
    position: absolute;
    inset: -40px;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 30%,
        rgba(255, 255, 255, 0.02) 50%,
        transparent 70%
    );
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    animation: glowFadeIn 1.5s ease-out forwards;
}

/* Light Turn On Animation (Dark Mode Glow) */
@keyframes glowFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Shadow Fade In Animation (Light Mode) */
@keyframes shadowFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.main-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Artist Info */
.artist-info {
    max-width: 650px;
    text-align: center;
    margin-bottom: 80px;
}

.artist-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: var(--text-gray);
    text-transform: lowercase;
    cursor: default;
}

.artist-name .letter {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.artist-bio {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-light);
    font-weight: 300;
    max-width: 550px;
    margin: 0 auto;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    cursor: pointer;
}

.scroll-indicator:hover {
    opacity: 0.8;
}

.scroll-indicator.hidden {
    opacity: 0;
    visibility: hidden;
}

.scroll-chevron {
    color: var(--text-gray);
    animation: chevronBounce 2s ease-in-out infinite;
}

@keyframes chevronBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

/* Recent Works Section */
.recent-works {
    padding: 120px 60px;
    background-color: var(--white);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    text-align: left;
    margin-bottom: 60px;
    color: var(--text-gray);
    letter-spacing: 1px;
    text-transform: lowercase;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.works-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 120px;
}

.work-item {
    display: flex;
    gap: 80px;
    align-items: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s ease;
}

.work-item:nth-child(even) {
    flex-direction: row-reverse;
}

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

.work-image {
    flex: 1.2;
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.04);
}

.work-image img {
    width: 110%; /* Slightly larger to allow for parallax movement */
    height: 110%;
    object-fit: cover;
    display: block;
    position: relative;
    left: -5%; /* Center the oversized image */
    top: -5%;
    /* Smooth transition but will be overridden by parallax transform */
    transition: none; /* Removed transition for parallax to work smoothly */
    will-change: transform; /* Performance optimization */
}

/* Hover effect removed to avoid conflict with parallax */
/* The parallax effect provides enough visual interest */

.work-details {
    flex: 1;
    padding: 0 20px;
}

.work-tag {
    display: inline-block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    border: 1px solid var(--accent-line);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.work-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: var(--text-gray);
    letter-spacing: 0.5px;
    text-transform: lowercase;
}

.work-description {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-light);
    font-weight: 300;
    margin-bottom: 20px;
    text-transform: lowercase;
}

.work-year {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 2px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.work-link {
    display: inline-block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: var(--white);
    text-decoration: none;
    text-transform: lowercase;
    padding: 12px 30px;
    border: 1px solid var(--text-gray);
    background: var(--text-gray);
    transition: all 0.3s ease;
    margin-top: 25px;
    letter-spacing: 0.5px;
}

.work-year {
    display: block;
}

.work-link:hover {
    background: transparent;
    color: var(--text-gray);
    border-color: var(--text-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .work-link {
    background: var(--white);
    color: var(--text-gray);
    border-color: var(--white);
}

body.dark-mode .work-link:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

/* Contact Section */
.contact-section {
    padding: 120px 60px;
    background-color: var(--off-white);
    border-top: 1px solid var(--accent-line);
}

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

.contact-section .section-title {
    text-align: center;
    margin-bottom: 30px;
}

.contact-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    font-weight: 300;
    margin-bottom: 60px;
    text-transform: lowercase;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 500px;
    margin: 0 auto;
}

.contact-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 25px 35px;
    background: var(--white);
    border: 1px solid var(--accent-line);
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--text-gray);
}

.contact-label {
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--text-light);
    text-transform: uppercase;
}

.contact-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--text-gray);
    letter-spacing: 0.5px;
}

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

.card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-gray);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.section-card:hover .card-overlay {
    opacity: 0.05;
}

.card-content {
    position: relative;
    z-index: 2;
    text-align: center;
    transition: var(--transition);
}

.section-card:hover .card-content {
    transform: translateY(-5px);
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: capitalize;
    margin-bottom: 15px;
    color: var(--text-gray);
}

.card-subtitle {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--text-light);
}

.card-arrow {
    font-size: 2rem;
    display: block;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition);
    color: var(--text-gray);
}

.section-card:hover .card-arrow {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.footer {
    background-color: var(--off-white);
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid var(--accent-line);
}

.footer-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* Gallery Pages */
.gallery-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    z-index: 1000;
    border-bottom: 1px solid var(--accent-line);
    transition: var(--transition);
}

.back-button {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-weight: 300;
}

.back-button:hover {
    opacity: 0.6;
    transform: translateX(-5px);
}

.gallery-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--text-gray);
}

.gallery-title {
    font-size: 1rem;
    letter-spacing: 1px;
    font-weight: 300;
    color: var(--text-light);
}

.gallery-container {
    padding: 150px 60px 80px;
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background: var(--light-gray);
    aspect-ratio: 3/4;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

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

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.03);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 0.1;
}

.play-icon {
    font-size: 3rem;
    color: var(--text-gray);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .recent-works {
        padding: 80px 40px;
    }
    
    .works-container {
        gap: 80px;
    }
    
    .work-item {
        flex-direction: column !important;
        gap: 40px;
    }
    
    .work-image {
        width: 100%;
    }
    
    .work-details {
        padding: 0;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 20px 20px;
    }
    
    .nav-content {
        gap: 30px;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .theme-toggle {
        top: 20px;
        right: 20px;
        padding: 8px 18px;
        min-height: 36px;
    }
    
    .toggle-text {
        font-size: 0.85rem;
    }
    
    .contact-section {
        padding: 80px 20px;
    }
    
    .contact-links {
        gap: 20px;
    }
    
    .contact-link {
        padding: 20px 25px;
    }
    
    .hero {
        padding: 100px 20px 80px;
        height: 100vh;
    }
    
    .photo-frame {
        max-width: 100%;
        margin-bottom: 30px;
        aspect-ratio: 4/3;
        box-shadow: 
            0 8px 30px rgba(0, 0, 0, 0.1),
            0 2px 6px rgba(0, 0, 0, 0.06);
    }
    
    /* Hide decorative frames on mobile */
    .decorative-frame {
        display: none;
    }
    
    .artist-info {
        margin-bottom: 60px;
    }
    
    .artist-name {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .artist-bio {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .scroll-indicator {
        bottom: 30px;
    }
    
    .scroll-chevron {
        width: 20px;
        height: 20px;
    }
    
    .recent-works {
        padding: 60px 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .card-title {
        font-size: 2.5rem;
    }
    
    .portfolio-sections {
        grid-template-columns: 1fr;
    }
    
    .gallery-container {
        padding: 120px 20px 60px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gallery-header {
        padding: 20px;
    }
}

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

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Selection */
::selection {
    background: var(--text-gray);
    color: var(--white);
}

/* ============================================
   PROJECT PAGE STYLES
   ============================================ */

.project-page {
    min-height: 100vh;
    padding-top: 100px;
}

.project-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 60px 40px;
    text-align: center;
}

.project-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--text-gray);
    text-transform: lowercase;
}

.project-year {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--text-light);
    letter-spacing: 2px;
}

.project-hero {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 60px;
}

.project-hero-image {
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.04);
}

.project-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-video {
    max-width: 900px; /* Reasonable max width */
    margin: 60px auto;
    padding: 0 60px;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Default 16:9, but will adjust to video */
    height: 0;
    overflow: hidden;
    background: var(--light-gray);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.04);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.project-content {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 60px;
}

.project-text {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-gray);
    font-weight: 300;
}

.project-text p {
    margin-bottom: 30px;
    text-align: justify;
}

.project-text p:first-child::first-letter {
    font-size: 3.5rem;
    font-family: 'Playfair Display', serif;
    float: left;
    line-height: 1;
    margin-right: 10px;
    margin-top: 5px;
    color: var(--text-gray);
}

.project-gallery {
    max-width: 1400px;
    margin: 100px auto;
    padding: 0 100px;
}

/* Editorial Gallery Layouts */
.gallery-full {
    width: 100%;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.gallery-full.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-full img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.04);
}

.gallery-row-2,
.gallery-row-3 {
    display: grid;
    gap: 30px;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.gallery-row-2.visible,
.gallery-row-3.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.08),
        0 5px 15px rgba(0, 0, 0, 0.04);
}

.gallery-item:hover img {
    transform: scale(1.02);
}

/* Staggered animation delays for rows */
.gallery-row-2 .gallery-item:nth-child(1) { transition-delay: 0.1s; }
.gallery-row-2 .gallery-item:nth-child(2) { transition-delay: 0.2s; }

.gallery-row-3 .gallery-item:nth-child(1) { transition-delay: 0.1s; }
.gallery-row-3 .gallery-item:nth-child(2) { transition-delay: 0.2s; }
.gallery-row-3 .gallery-item:nth-child(3) { transition-delay: 0.3s; }

.project-footer {
    max-width: 1400px;
    margin: 80px auto 60px;
    padding: 0 60px;
    text-align: center;
}

.back-link {
    display: inline-block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--white);
    text-decoration: none;
    text-transform: lowercase;
    padding: 12px 30px;
    border: 1px solid var(--text-gray);
    background: var(--text-gray);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.back-link:hover {
    background: transparent;
    color: var(--text-gray);
    border-color: var(--text-gray);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .back-link {
    background: var(--white);
    color: var(--text-gray);
    border-color: var(--white);
}

body.dark-mode .back-link:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

/* Project Page Responsive */
@media (max-width: 768px) {
    .project-header {
        padding: 40px 20px 20px;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .project-hero {
        margin: 40px auto;
        padding: 0 20px;
    }
    
    .project-hero-image {
        aspect-ratio: 4/3;
    }
    
    .project-video {
        margin: 40px auto;
        padding: 0 20px;
    }
    
    .project-content {
        margin: 60px auto;
        padding: 0 20px;
    }
    
    .project-text {
        font-size: 1rem;
        line-height: 1.8;
    }
    
    .project-text p {
        text-align: left;
        margin-bottom: 25px;
    }
    
    .project-text p:first-child::first-letter {
        font-size: 2.5rem;
        margin-right: 8px;
    }
    
    .project-gallery {
        margin: 60px auto;
        padding: 0 20px;
    }
    
    /* Mobile Gallery Adjustments */
    .gallery-full {
        margin-bottom: 40px;
    }
    
    .gallery-row-2,
    .gallery-row-3 {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .gallery-full img,
    .gallery-item img {
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.08),
            0 3px 10px rgba(0, 0, 0, 0.04);
    }
    
    .project-footer {
        margin: 60px auto 40px;
        padding: 0 20px;
    }
}
