:root {
    /* Editorial Precision Aesthetic Settings */
    /* Base Neutral Palette using OKLCH - high contrast */
    --surface-dark: oklch(0.18 0.01 250);
    --surface-light: oklch(0.98 0.01 250);
    
    --text-primary-dark: oklch(0.95 0.01 250);
    --text-muted-dark: oklch(0.70 0.02 250);
    
    --text-primary-light: oklch(0.15 0.01 250);
    --text-muted-light: oklch(0.40 0.02 250);

    /* Accent color - striking emerald */
    --accent: oklch(0.65 0.15 150);
    
    /* Default to Dark Theme variables mapped to generic names */
    --bg: var(--surface-dark);
    --surface: oklch(0.22 0.01 250);
    --border: oklch(0.35 0.01 250);
    --text-primary: var(--text-primary-dark);
    --text-muted: var(--text-muted-dark);
    
    /* Fluid typography scales */
    /* Step -1: 14px to 16px */
    --text-sm: clamp(0.875rem, 0.84rem + 0.18vw, 1rem);
    /* Step 0: 16px to 18px */
    --text-base: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
    /* Step 1: 20px to 24px */
    --text-md: clamp(1.25rem, 1.18rem + 0.36vw, 1.5rem);
    /* Step 2: 24px to 32px */
    --text-lg: clamp(1.5rem, 1.36rem + 0.71vw, 2rem);
    /* Step 3: 32px to 48px */
    --text-xl: clamp(2rem, 1.71rem + 1.43vw, 3rem);
    /* Step 4: 48px to 72px */
    --text-xxl: clamp(3rem, 2.57rem + 2.14vw, 4.5rem);
    /* Step 5: 64px to 110px */
    --text-display: clamp(4rem, 3.18rem + 4.11vw, 6.875rem);

    /* Layout Spacing */
    --space-xs: clamp(0.5rem, 0.46rem + 0.18vw, 0.625rem);
    --space-sm: clamp(1rem, 0.93rem + 0.36vw, 1.25rem);
    --space-md: clamp(2rem, 1.86rem + 0.71vw, 2.5rem);
    --space-lg: clamp(4rem, 3.71rem + 1.43vw, 5rem);
    --space-xl: clamp(6rem, 5.43rem + 2.86vw, 8rem);
    --space-2xl: clamp(8rem, 6.86rem + 5.71vw, 12rem);
    
    /* Animation Easing - Natural */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Component boundaries */
    --container-width: 1400px;
    --grid-gap: var(--space-md);
}

[data-theme="light"] {
    --bg: var(--surface-light);
    --surface: oklch(0.95 0.01 250);
    --border: oklch(0.85 0.01 250);
    --text-primary: var(--text-primary-light);
    --text-muted: var(--text-muted-light);
}

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

html, body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: 'Instrument Sans', -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    line-height: 1.1;
    color: var(--text-primary);
}

p {
    color: var(--text-muted);
    font-size: var(--text-base);
    max-width: 65ch;
    margin-bottom: var(--space-md);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--ease-out-expo);
}

ul, ol {
    list-style: none;
}

/* Layout utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    position: relative;
}

/* Navigation - Editorial Minimalist */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: var(--space-md) 0;
    transition: padding 0.5s var(--ease-out-expo), background-color 0.5s var(--ease-out-expo);
}

nav.scrolled {
    padding: var(--space-sm) 0;
    background-color: color-mix(in oklch, var(--bg) 90%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--text-md);
    font-weight: 600;
    letter-spacing: -0.02em;
    font-style: italic;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.nav-links a {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Mobile Nav - simplified for CSS, same logic as before */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
}



/* Structural Layouts */
section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

/* Editorial Hero */
.editorial-hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: stretch;
    gap: var(--space-lg);
    padding-top: var(--space-xl);
}

.hero-type {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl) 0;
}

.hero-badge {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: var(--text-sm);
    color: var(--accent);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.hero-title {
    font-size: var(--text-display);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
    max-width: 12ch;
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--text-muted);
    max-width: 30ch;
    margin-bottom: var(--space-lg);
}

.hero-visual {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.hero-caption {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    font-family: 'Instrument Sans', sans-serif;
    font-size: var(--text-sm);
    text-align: right;
    /* Force visibility on dark photography regardless of light/dark theme */
    color: oklch(0.95 0.01 250);
}

.hero-caption span {
    display: block;
    color: var(--accent);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: 'Instrument Sans', sans-serif;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
}

.btn:hover {
    background: var(--text-primary);
    color: var(--bg);
    border-color: var(--text-primary);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--text-primary);
    /* Refined Depth */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --border: color-mix(in oklch, var(--text-primary) 10%, transparent);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 30px -10px rgba(0,0,0,0.5);
}

/* Atmosphere & Noise */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Ffilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

body {
    background-color: var(--surface);
    background-image: 
        radial-gradient(circle at 10% 10%, color-mix(in oklch, var(--accent) 5%, transparent), transparent 50%),
        radial-gradient(circle at 90% 90%, color-mix(in oklch, var(--accent) 5%, transparent), transparent 50%);
    background-attachment: fixed;
}

/* Technical Index (Capabilities) */
.capability-index {
    margin-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.index-row {
    display: grid;
    grid-template-columns: 80px 1.5fr 2.5fr;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.5s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.index-row:hover {
    background-color: color-mix(in oklch, var(--surface-alt) 40%, transparent);
}

.index-id {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
    opacity: 0.6;
    padding-top: 0.4rem;
}

.index-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--text-lg);
    font-style: italic;
    font-weight: 500;
    color: var(--text-primary);
}

.index-desc {
    font-family: 'Instrument Sans', sans-serif;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 600px;
}

@media (max-width: 768px) {
    .index-row {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
        padding: var(--space-md) 0;
    }
    .index-id {
        padding-top: 0;
        margin-bottom: 0.5rem;
    }
}

/* Staggered Reveals */
.reveal-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s var(--ease-out-expo);
}

.reveal-item.is-visible,
.is-visible .reveal-item {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }


/* Editorial Lists */
.editorial-list {
    margin-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.list-item {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: var(--space-md);
    align-items: baseline;
}

.list-item:hover {
    background-color: color-mix(in oklch, var(--surface) 50%, transparent);
}

.list-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--text-muted);
}

.list-content h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.list-content p {
    margin-bottom: 0;
}

/* Project Grid & Rows */
.project-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.systems-registry {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.project-row {
    display: grid;
    grid-template-columns: 80px 120px 1.5fr 2fr 180px;
    gap: 2rem;
    align-items: baseline;
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.project-row:first-child {
    border-top: 1px solid var(--border);
}

.project-num {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--accent);
    opacity: 0.6;
}

.project-id {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.project-main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    opacity: 0.8;
}

.project-title {
    font-size: 1.5rem;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--text-primary);
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-summary {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    background: var(--surface-alt);
}

.project-action {
    display: flex;
    justify-content: flex-end;
}

.btn-registry {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
}

.btn-registry:hover {
    background: var(--accent);
    color: var(--surface);
    border-color: var(--accent);
}

@media (max-width: 1100px) {
    .project-row {
        grid-template-columns: 50px 100px 1fr;
        gap: 1.5rem;
    }
    .project-details, .project-action {
        grid-column: 2 / span 2;
    }
}

@media (max-width: 600px) {
    .project-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .project-id, .project-details, .project-action {
        grid-column: auto;
    }
    .project-action {
        justify-content: flex-start;
    }
}


.project-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: var(--space-xs);
    display: block;
}

.project-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-sm);
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
}

.project-summary {
    font-size: var(--text-base);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    max-width: 50ch;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--space-lg);
}





.visual-accent {
    font-family: 'Cormorant Garamond', serif;
    font-size: 8rem;
    opacity: 0.05;
    font-weight: 700;
    font-style: italic;
    transform: rotate(15deg);
    user-select: none;
    color: var(--text-primary);
}

@media (max-width: 900px) {
    .project-row, .project-row-alt {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    .project-row-alt .project-info, .project-row-alt .project-visual {
        grid-column: auto;
    }
    .project-visual {
        height: 250px;
    }
}

/* Section Types */
.section-header {
    margin-bottom: var(--space-xl);
    max-width: 60ch;
}

.section-label {
    font-family: 'Instrument Sans', -apple-system, sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: var(--space-md);
    display: block;
}

/* Contact / Form Override */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.form-group {
    margin-bottom: var(--space-sm);
}

.form-control {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: var(--space-sm) 0;
    color: var(--text-primary);
    font-family: 'Instrument Sans', sans-serif;
    font-size: var(--text-base);
}

.form-control:focus {
    outline: none;
    border-bottom-color: var(--text-primary);
}

/* Footer */
.site-footer {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive Overrides */
@media (max-width: 900px) {
    .editorial-hero {
        grid-template-columns: 1fr;
        padding-top: var(--space-xl);
        min-height: auto;
    }
    
    .hero-type {
        order: 2;
        padding: var(--space-md) 0;
    }

    .hero-title {
        font-size: var(--text-xl);
        max-width: 100%;
    }
    
    .hero-visual {
        order: 1;
        aspect-ratio: 1;
        max-height: 40vh;
        margin-bottom: var(--space-lg);
    }

    .hero-visual img {
        object-position: center top;
        border: 1px solid var(--border);
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    
    .list-item {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
        padding: var(--space-md) 0;
    }
    
    .list-number {
        font-size: var(--text-xl);
    }
    
    .project-row {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        margin-bottom: var(--space-xl);
        padding: var(--space-md) var(--space-sm);
        border: 1px solid var(--border);
    }
    
    .project-num, .project-id {
        display: none;
    }

    .project-main {
        margin-bottom: var(--space-xs);
    }

    .btn-registry {
        justify-content: center;
        width: 100%;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out-expo);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}