/* =========================================
   A Calm, Sensory Archive - Style System
   Vibe: Her (Film), A24, Gentle Monster
   ========================================= */

:root {
    /* Color Palette - "Soft Ethereal, Premium Light" */
    --text-primary: #332D31; /* Deep soft purple-black */
    --text-muted: #857C85;   /* Soft warm grey */
    --accent-color: #A38DA4; /* Subtle dusty mauve */

    /* Typography */
    --font-logic: 'Inter', -apple-system, sans-serif;
    --font-poetic: 'Cormorant Garamond', serif; /* Highly artistic serif */
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── FOUC Prevention ── */
html.js-loading body {
    visibility: hidden;
    opacity: 0;
}

/* ── Page Transition: Breathing Effect ── */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: -9999; /* Sits behind everything to crossfade the background */
    pointer-events: none;
    opacity: 0; /* Default invisible */
    transition: opacity 1s cubic-bezier(0.43, 0.13, 0.23, 0.96);
}

/* Base transition settings for content */
main, .site-nav, .custom-cursor, .ambient-halo, .global-ambient-orbs, .hero-orbs, .content-orbs, .cute-element {
    transition: opacity 1s cubic-bezier(0.43, 0.13, 0.23, 0.96),
                transform 1s cubic-bezier(0.43, 0.13, 0.23, 0.96);
    transform-origin: center top;
}

/* Entering and Exiting States */
body.is-entering main, 
body.is-exiting main {
    opacity: 0;
    transform: scale(0.98);
}

body.is-entering .site-nav, body.is-exiting .site-nav,
body.is-entering .ambient-halo, body.is-exiting .ambient-halo,
body.is-entering .global-ambient-orbs, body.is-exiting .global-ambient-orbs,
body.is-entering .hero-orbs, body.is-exiting .hero-orbs,
body.is-entering .content-orbs, body.is-exiting .content-orbs,
body.is-entering .cute-element, body.is-exiting .cute-element {
    opacity: 0;
}


body {
    /* Soft icy blue/lavender gradient, clean but with a distinct vibe */
    background: linear-gradient(145deg, #F5F7FA 0%, #E8EDF5 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-logic);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.5;
    cursor: none; /* Hide default cursor */
}

/* Ethereal Light Halo (Smudge/Light effect) */
.ambient-halo {
    position: fixed;
    top: 30%;
    left: 50%;
    width: 120vw;
    height: 120vh;
    transform: translate(-50%, -50%);
    /* Gentle, soft pastel glows (Lilac, Ice Blue, Pale Pink) - Clean but atmospheric */
    background: 
        radial-gradient(circle at 40% 30%, rgba(200, 180, 255, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(255, 200, 220, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 30% 70%, rgba(180, 220, 255, 0.4) 0%, transparent 60%);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}

/* Custom Cursor - Frosted Glass */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px; /* Larger base size */
    height: 24px;
    background-color: rgba(255, 255, 255, 0.3); /* Translucent base */
    backdrop-filter: blur(6px); /* Frosted glass blur */
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.7); /* Sharp glass edge */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Soft depth shadow */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.custom-cursor.active {
    width: 80px; /* Expands to a large circle */
    height: 80px;
    background-color: rgba(255, 255, 255, 0.05); /* Extremely faint */
    border: 1px solid rgba(163, 141, 164, 0.5); /* Soft mauve border to match theme */
    backdrop-filter: none; /* Removed blur so text is clearly visible */
    -webkit-backdrop-filter: none;
}

/* Lenis Smooth Scrolling */
html.lenis {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* Typography Utilities */
.italic-highlight {
    font-family: var(--font-poetic);
    font-style: italic;
    font-weight: 300;
    color: var(--accent-color);
}

a {
    color: inherit;
    text-decoration: none;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* Navigation */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 5vw; /* Narrower for more elegance */
    z-index: 999; /* Highest priority */
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    
    /* Refined 'Ultra Clear Fog' Effect */
    background: var(--nav-bg, rgba(255, 255, 255, 0.05)); /* Near invisible */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: none; /* Removed glass edge to eliminate 'white bar' feel */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02); /* Even subtler shadow */
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.nav-right {
    display: flex;
    align-items: center;
}

.nav-right a {
    font-family: var(--font-poetic) !important;
    font-size: 1.25rem !important;
    font-style: italic !important;
    text-transform: capitalize !important;
    letter-spacing: 0.02em !important;
    margin-left: 2rem;
    transition: opacity 0.3s ease;
}



/* Site Logo - Masking technique for dynamic coloring */
.nav-left {
    display: inline-flex;
    align-items: center;
    background-color: var(--logo-color, var(--text-primary)); 
    -webkit-mask-image: url('../images/logo.png');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center left;
    mask-image: url('../images/logo.png');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center left;
    transition: transform 0.3s ease;
}

.nav-left:hover {
    transform: scale(1.05);
}

.site-logo {
    height: 35px; /* Adjust based on the actual logo proportions */
    width: auto;
    display: block;
    visibility: hidden; /* Hide the original image to only show the masked background */
}

/* Section: Hero (The Entrance) */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 5vw;
}

.hero-content {
    text-align: left; 
    width: 100%;
}

.author-name-large {
    font-family: var(--font-poetic);
    font-size: clamp(2rem, 3.5vw, 4rem);
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

.manifesto-title {
    font-family: var(--font-poetic);
    font-size: clamp(3rem, 5.5vw, 6.5rem); /* Very large, fits on one line on desktop */
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    white-space: normal; /* Changed from nowrap to allow wrapping */
    color: var(--text-primary);
}

.manifesto-subtitle {
    font-family: var(--font-poetic);
    font-size: clamp(2rem, 3.8vw, 4.5rem); /* Smaller than H1 but prominent */
    font-style: italic;
    color: var(--accent-color);
    font-weight: 300;
    line-height: 1.2;
    white-space: normal; /* Changed from nowrap to allow wrapping */
}

/* Cute Floating Elements (Stars) */
@keyframes starTwinkle {
    0%, 100% { opacity: 0.1; transform: scale(0.9) translateY(0) rotate(0deg); }
    50% { opacity: 0.8; transform: scale(1.1) translateY(-10px) rotate(15deg); }
}

.cute-element {
    position: fixed; /* Keep them in the viewport as you scroll */
    pointer-events: none;
    z-index: -1; /* Float them behind the main content */
    font-family: sans-serif; /* For the special characters */
    animation: starTwinkle 5s infinite ease-in-out;
}

/* Stagger the animations so they twinkle randomly */
.element-1 { top: 20%; left: 8%; font-size: 3.5rem; color: #C3A5EC; animation-delay: 0s; }
.element-2 { top: 65%; right: 12%; font-size: 1.5rem; color: #F4C4D7; animation-delay: 1.5s; }
.element-3 { top: 80%; left: 15%; font-size: 2.5rem; color: #C1E3F4; animation-delay: 0.8s; }
.element-4 { top: 15%; right: 20%; font-size: 2rem; color: #C3A5EC; animation-delay: 2.2s; }
.element-5 { top: 40%; left: 2%; font-size: 1rem; color: #F4C4D7; animation-delay: 3.5s; }
.element-6 { top: 75%; right: 25%; font-size: 4rem; color: #C1E3F4; animation-delay: 1.1s; }
.element-7 { top: 10%; left: 30%; font-size: 1.2rem; color: #F4C4D7; animation-delay: 2.8s; }
.element-8 { top: 45%; right: 5%; font-size: 2.8rem; color: #C3A5EC; animation-delay: 4.1s; }

.manifesto .line-wrap {
    overflow: hidden;
    display: block;
}

.manifesto .word {
    display: inline-block;
    transform-origin: bottom left;
}

.italic-highlight {
    font-family: var(--font-poetic);
    font-style: italic;
    font-weight: 300;
    color: var(--accent-color);
    padding-right: 0.1em;
}

.scroll-indicator {
    position: absolute;
    bottom: 4rem;
    right: 5vw; /* Move to right side */
    left: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    opacity: 0;
    gap: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    gap: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Subtle bounce for the text */
@keyframes textHover {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.scroll-indicator p {
    animation: textHover 2s infinite ease-in-out;
}

/* Elegant stretch for the vertical line */
@keyframes lineStretch {
    0% { transform: scaleY(1); transform-origin: top; opacity: 0.5; }
    50% { transform: scaleY(1.5); transform-origin: top; opacity: 1; }
    100% { transform: scaleY(1); transform-origin: top; opacity: 0.5; }
}

.scroll-indicator .line {
    width: 1px;
    height: 40px;
    background-color: var(--text-muted);
    animation: lineStretch 2s infinite ease-in-out;
}

/* Section: Archive (Projects) */
.archive {
    padding: 10vh 0;
    position: relative;
    z-index: 1; /* Ensure it stays above decorations */
}

.section-header {
    margin-bottom: 12vh;
}

.section-header h2 {
    font-family: var(--font-logic);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.section-desc {
    font-family: var(--font-poetic);
    font-style: italic;
    font-size: clamp(2.5rem, 4vw, 3.5rem); /* Significantly larger */
    line-height: 1.2;
    color: var(--accent-color); /* Uses the soft mauve for a 'cute but professional' touch */
    max-width: 800px;
}

/* Project List */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6rem 0;
    border-top: 1px solid rgba(232, 227, 223, 0.05);
    position: relative;
    cursor: none;
}

.project-item:last-child {
    border-bottom: 1px solid rgba(232, 227, 223, 0.05);
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    mix-blend-mode: difference; /* Makes text pop over images */
}

.project-item:hover .project-info {
    transform: translateX(40px);
}

.project-number {
    font-family: var(--font-logic);
    font-size: 1rem;
    color: var(--accent-color);
}

.project-info h3 {
    font-family: var(--font-poetic);
    font-size: clamp(3.5rem, 7vw, 6.5rem); /* Much larger, artistic titles */
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--text-primary);
}

.project-tags {
    font-family: var(--font-logic);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.project-item:hover .project-tags {
    opacity: 1;
}

/* Gentle Monster vibe hover image - High-end Editorial Photography Feel */
.project-image-wrapper {
    position: absolute;
    right: 5vw;
    width: 44vw; /* Back to horizontal/landscape ratio */
    height: 26vw; /* Elegant wide cinematic feel */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    border-radius: 12px; /* Soft, modern physical edges */
    overflow: hidden;
    /* Deep soft shadow to make it float */
    box-shadow: 
        0 40px 80px rgba(0,0,0,0.15),
        0 15px 35px rgba(0,0,0,0.08);
    /* Subtle glass/photo border to frame the image */
    border: 1px solid rgba(255, 255, 255, 0.5); 
}

.project-item:hover .project-image-wrapper {
    opacity: 1;
}

.project-image {
    width: 110%; /* Reduced slightly so it doesn't crop the sides of your landscape images too much */
    height: 110%;
    top: -5%; left: -5%;
    position: absolute;
    background-size: cover;
    background-position: center;
    /* Initially muted, slightly desaturated, and zoomed in */
    filter: grayscale(20%) brightness(0.85) contrast(1.1);
    transform: scale(1.08); /* Gentle scale down for horizontal layout */
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-item:hover .project-image {
    /* Color blooms fully, image elegantly settles back to normal scale */
    filter: grayscale(0%) brightness(1) contrast(1.05);
    transform: scale(1);
}

/* Section: Author */
.author {
    padding: 20vh 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.author-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.author-title h2 {
    font-family: var(--font-poetic);
    font-style: italic;
    font-size: clamp(2.5rem, 4.5vw, 4rem); /* Significantly larger to match the hero vibe */
    font-weight: 300;
    line-height: 1.2;
    color: var(--accent-color);
}

.author-bio {
    font-family: var(--font-poetic);
    font-size: 1.6rem; /* Larger font size for the serif body text */
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 300;
}

.author-bio p {
    margin-bottom: 2.5rem;
}

.contact-link {
    display: inline-block;
    border-bottom: 1px solid var(--text-primary);
    color: var(--text-primary);
    padding-bottom: 4px;
    font-family: var(--font-poetic);
    font-style: italic;
    text-transform: capitalize;
    letter-spacing: 0.05em;
    font-size: 1.25rem;
    transition: color 0.3s, border-color 0.3s;
}

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


/* =========================================
   Responsive Design System
   ========================================= */

/* Global Responsive Rules */
img, video {
    max-width: 100%;
    height: auto;
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
    .custom-cursor {
        display: none !important;
    }
    body {
        cursor: auto !important;
    }
    .project-item {
        cursor: pointer !important;
    }
}

/* ── Tablet & Mobile (768px) ── */
@media (max-width: 768px) {
    .container {
        padding: 0 6vw;
    }

    /* 1. Header & Nav Fix - Keep on one line but compact */
    .site-nav {
        position: fixed;
        top: 0;
        flex-direction: row !important; /* Revert to one line */
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1rem 6vw !important;
        background: var(--nav-bg, rgba(235, 244, 250, 0.1)) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border-top: none !important;
        gap: 0 !important;
        height: auto !important;
        z-index: 1000;
    }

    .nav-left {
        margin-bottom: 0;
    }

    .site-logo {
        height: 22px !important; /* Slightly smaller to fit one line */
    }

    .nav-right {
        width: auto;
        justify-content: flex-end;
        gap: 1.2rem;
    }

    .nav-right a {
        font-size: 0.95rem !important;
    }

    /* 2. Hero / H1 Fix - Reposition below header */
    /* 2. Hero / H1 Fix - Full screen entry */
    .hero {
        padding-top: 0 !important;
        height: 100vh !important;
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important; /* Vertical Centering */
        align-items: flex-start !important;
        position: relative !important;
    }

    .manifesto-title {
        margin-top: -10vh !important; /* Slightly above center for visual balance */
        font-size: 8vw !important;
        line-height: 1.2 !important;
    }

    /* 3. Project List Overhaul - Clean, no frames */
    .archive {
        padding-top: 10vh !important;
        margin-top: 100px !important; /* Push Index out of first fold */
    }

    .project-item {
        position: relative !important;
        width: 100% !important;
        display: block !important;
        padding: 3rem 0 !important; /* Back to simple padding */
        margin-bottom: 1rem;
        background: transparent !important; /* Removed white frames */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        border-top: 1px solid rgba(0,0,0,0.05) !important; /* Minimal separator */
    }

    .project-info {
        mix-blend-mode: normal !important;
        transform: none !important;
        width: 100% !important;
    }

    .project-info h3 {
        font-size: 2.2rem !important;
        margin-bottom: 0.5rem;
    }

    .scroll-indicator {
        position: absolute !important;
        bottom: 40px !important; /* Fixed at bottom as requested */
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: fit-content;
    }
    
    .scroll-indicator::after {
        content: "";
        width: 10px;
        height: 10px;
        border-right: 1px solid var(--text-muted);
        border-bottom: 1px solid var(--text-muted);
        transform: rotate(45deg);
        margin-top: -5px;
        opacity: 0.6;
    }

    .project-image-wrapper {
        display: none !important; /* Hide hover image interaction on mobile */
    }

    .project-item:hover .project-info {
        transform: none !important;
    }

    .author-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .section-header {
        margin-bottom: 6vh;
    }
}

/* ── Small Mobile (480px) ── */
@media (max-width: 480px) {
    .manifesto-title {
        font-size: 2rem !important;
    }

    .project-info h3 {
        font-size: 1.8rem !important;
    }

    .author-title h2 {
        font-size: 1.8rem !important;
    }

    .author-bio {
        font-size: 1.1rem !important;
    }
}
