/* Cormorant Garamond - Latin Extended */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url(fonts/cormorant-garamond-normal-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Cormorant Garamond - Latin */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url(fonts/cormorant-garamond-normal-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Cormorant Garamond Italic - Latin Extended */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 300 500;
    font-display: swap;
    src: url(fonts/cormorant-garamond-italic-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Cormorant Garamond Italic - Latin */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 300 500;
    font-display: swap;
    src: url(fonts/cormorant-garamond-italic-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Instrument Sans - Latin Extended */
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(fonts/instrument-sans-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Instrument Sans - Latin */
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(fonts/instrument-sans-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
    --color-bg: #FAF9F6;
    --color-bg-alt: #F0EDE8;
    --color-bg-warm: #E8E2D9;
    --color-bg-elevated: #FFFFFF;
    --color-bg-accent: #6B5545;
    --color-bg-dark: #2A2A28;
    --color-border: #D8D6D0;
    --color-text: #5C5C58;
    --color-text-strong: #2A2A28;
    --color-text-muted: #767572;
    --color-text-inverse: #FAF9F6;
    --color-text-on-dark: #FAF9F6;
    --color-accent: #A67D65;
    --color-accent-hover: #8F6C55;
    --color-accent-light: #C9B8AD;
    --color-accent-subtle: rgba(166, 125, 101, 0.12);
    --color-accent-glow: rgba(166, 125, 101, 0.2);
    --color-nav-glass: rgba(250, 249, 246, 0.85);
    --color-overlay-dark: rgba(0, 0, 0, 0.15);
    --color-glass-bg: rgba(255, 255, 255, 0.12);
    --color-glass-bg-hover: rgba(255, 255, 255, 0.18);
    --color-glass-border: rgba(255, 255, 255, 0.18);
    --color-glass-text: rgba(255, 255, 255, 0.92);
    --color-text-inverse-muted: rgba(255, 255, 255, 0.7);
    --color-inverse-subtle: rgba(255, 255, 255, 0.15);

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Instrument Sans', -apple-system, sans-serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    --space-2xl: 12rem;
    
    --max-width: 1400px;
    --content-width: 800px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 100px;
}

[data-theme="dark"] {
    --color-bg: #1A1918;
    --color-bg-alt: #222120;
    --color-bg-warm: #2A2826;
    --color-bg-elevated: #2C2A28;
    --color-bg-accent: #5A4535;
    --color-bg-dark: #141312;
    --color-border: #3D3B38;
    --color-text: #A8A6A2;
    --color-text-strong: #E8E6E2;
    --color-text-muted: #8A8886;
    --color-text-inverse: #1A1918;
    --color-text-on-dark: #FAF9F6;
    --color-accent: #C4956F;
    --color-accent-hover: #D4A37D;
    --color-accent-light: #8A7B6E;
    --color-accent-subtle: rgba(196, 149, 111, 0.15);
    --color-accent-glow: rgba(196, 149, 111, 0.2);
    --color-nav-glass: rgba(26, 25, 24, 0.85);

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 768px) { html { font-size: 16px; } }

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* Grain overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; color: var(--color-text-strong); transition: color 0.4s ease; }
h1 { font-size: clamp(3rem, 8vw, 5.5rem); letter-spacing: -0.03em; font-weight: 300; }
h2 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; margin-bottom: var(--space-md); }
h3 { font-size: 1.25rem; font-weight: 500; margin-bottom: var(--space-sm); }
p { max-width: 60ch; }
.lead { font-size: 1.2rem; color: var(--color-text); max-width: 48ch; line-height: 1.6; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.container--narrow { max-width: var(--content-width); }
section { padding: var(--space-xl) 0; position: relative; transition: background-color 0.4s ease; }
@media (max-width: 768px) { section { padding: var(--space-lg) 0; } }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    z-index: 200;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-text-strong);
    color: var(--color-text-inverse);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-sm);
}
.skip-link:focus {
    top: var(--space-sm);
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}
.theme-toggle:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}
.cta-primary:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    box-shadow: var(--shadow-md);
}
.cta-secondary:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* Navigation */
nav { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    z-index: 100; 
    padding: var(--space-sm) 0; 
    background: transparent;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}
nav.scrolled {
    background: var(--color-nav-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}
nav .container { display: flex; justify-content: space-between; align-items: center; }
.nav-left, .nav-right { display: flex; align-items: center; gap: var(--space-sm); }

.logo { 
    font-family: var(--font-display); 
    font-size: 1.4rem; 
    font-weight: 400; 
    color: var(--color-text-strong); 
    text-decoration: none; 
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.theme-toggle { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 44px; 
    height: 44px; 
    border: 1px solid var(--color-border); 
    border-radius: 50%; 
    background: var(--color-bg);
    color: var(--color-text); 
    cursor: pointer; 
    transition: all 0.3s ease; 
}
.theme-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Hero */
.hero { 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    padding-top: var(--space-xl); 
    position: relative; 
    overflow: hidden;
    background: var(--color-bg);
}
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 70%;
    height: 140%;
    background: radial-gradient(ellipse at center, var(--color-accent-subtle) 0%, transparent 70%);
    pointer-events: none;
    transition: background 0.4s ease;
}
.hero-content { position: relative; z-index: 2; max-width: 900px; }
.hero h1 { margin-bottom: var(--space-md); }
.hero h1 em { 
    font-style: italic; 
    color: var(--color-accent);
    transition: color 0.4s ease;
}
.hero .lead { margin-bottom: var(--space-lg); }
.hero-eyebrow { 
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 0.15em; 
    color: var(--color-accent); 
    margin-bottom: var(--space-md);
    transition: color 0.4s ease;
}
.hero-eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--color-accent);
    transition: background 0.4s ease;
}

/* Decorative element */
.hero-deco {
    position: absolute;
    bottom: var(--space-lg);
    right: var(--space-lg);
    font-family: var(--font-display);
    font-size: clamp(8rem, 20vw, 16rem);
    font-weight: 300;
    color: var(--color-accent);
    opacity: 0.08;
    line-height: 0.8;
    pointer-events: none;
    user-select: none;
    transition: color 0.4s ease;
}
@media (max-width: 768px) {
    .hero-deco { display: none; }
}

/* CTAs */
.cta-group { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.cta-primary { 
    display: inline-block; 
    font-family: var(--font-body); 
    font-size: 0.95rem; 
    font-weight: 500; 
    color: var(--color-text-inverse); 
    background-color: var(--color-text-strong); 
    padding: 1rem 2rem; 
    border-radius: var(--radius-full); 
    text-decoration: none; 
    transition: all 0.3s ease; 
}
.cta-primary:hover { background-color: var(--color-accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cta-secondary { 
    display: inline-block; 
    font-family: var(--font-body); 
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-strong); 
    padding: 1rem 2rem; 
    border: 1px solid var(--color-border); 
    border-radius: var(--radius-full); 
    text-decoration: none; 
    transition: all 0.3s ease; 
}
.cta-secondary:hover { border-color: var(--color-text-strong); background: var(--color-text-strong); color: var(--color-text-inverse); }

/* Intro/About Section */
.intro {
    background: var(--color-bg);
    padding: var(--space-2xl) 0;
    border-bottom: 1px solid var(--color-border);
}
.intro-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    align-items: start;
}
@media (max-width: 900px) {
    .intro-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
}
.intro-photo {
    position: sticky;
    top: 120px;
}
@media (max-width: 900px) {
    .intro-photo { position: static; }
}
.intro-photo-frame {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all 0.4s ease;
}
.intro-content h2 {
    margin-bottom: var(--space-sm);
}
.intro-content .subtitle {
    font-size: 1.1rem;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
    transition: color 0.4s ease;
}
.intro-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

/* Problem Section - Full bleed accent */
.problem { 
    background-color: var(--color-bg-accent);
    color: var(--color-text-on-dark);
    position: relative;
    overflow: hidden;
}
.problem::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 40%, var(--color-overlay-dark) 100%);
    pointer-events: none;
}
.problem h2 { color: var(--color-text-on-dark); opacity: 0.95; }
.problem .lead { color: var(--color-text-on-dark); opacity: 0.85; }
.problem-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: var(--space-sm); 
    margin-top: var(--space-lg); 
}
@media (max-width: 768px) { .problem-grid { grid-template-columns: 1fr; } }
.problem-item { 
    padding: var(--space-md); 
    background: var(--color-glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-glass-border);
    transition: all 0.3s ease;
}
.problem-item:hover { 
    background: var(--color-glass-bg-hover);
    transform: translateY(-2px);
}
.problem-item p { 
    color: var(--color-glass-text);
    font-size: 1rem; 
    max-width: none;
}

/* Vision - Large Typography Moment */
.vision { 
    background-color: var(--color-bg); 
    padding: var(--space-2xl) 0;
    position: relative;
}
.vision-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}
@media (max-width: 900px) {
    .vision-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
}
.vision-big {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 300;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--color-text-strong);
    transition: color 0.4s ease;
}
.vision-big span {
    display: block;
}
.vision-big .accent {
    color: var(--color-accent);
    font-style: italic;
    transition: color 0.4s ease;
}
.vision-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

/* Philosophy */
.philosophy {
    background: var(--color-bg-alt);
    padding: var(--space-2xl) 0;
}
.philosophy-header {
    max-width: 600px;
    margin-bottom: var(--space-xl);
}
.philosophy-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: var(--space-md);
}
@media (max-width: 1000px) { .philosophy-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .philosophy-grid { grid-template-columns: 1fr; } }
.philosophy-item { 
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}
.philosophy-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.philosophy-item .number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: var(--space-sm);
    transition: color 0.4s ease;
}
.philosophy-item h3 { 
    font-family: var(--font-body); 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--color-text-strong); 
    margin-bottom: var(--space-xs); 
}
.philosophy-item p { color: var(--color-text-muted); font-size: 0.95rem; }

/* Process */
.process { 
    background-color: var(--color-bg);
    padding: var(--space-2xl) 0;
}
.process-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}
.process-header h2 { margin-bottom: 0; }
.process-steps { 
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-sm);
    position: relative;
}
.process-steps::before {
    content: '';
    position: absolute;
    top: 72px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border) 10%, var(--color-border) 90%, transparent);
    transition: background 0.4s ease;
}
@media (max-width: 1000px) {
    .process-steps { grid-template-columns: repeat(3, 1fr); }
    .process-steps::before { display: none; }
}
@media (max-width: 600px) {
    .process-steps { grid-template-columns: 1fr; }
}
.process-step {
    text-align: center;
    padding: var(--space-md);
}
.step-number { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    font-family: var(--font-display); 
    font-size: 1.5rem; 
    color: var(--color-accent); 
    font-weight: 400;
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}
.process-step:hover .step-number {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-accent);
    transform: scale(1.1);
}
.step-content h3 { 
    font-family: var(--font-body); 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--color-text-strong); 
    margin-bottom: var(--space-xs); 
}
.step-content p { 
    color: var(--color-text-muted); 
    font-size: 0.9rem;
    max-width: none;
}

/* Project Showcase */
.showcase {
    background: var(--color-bg-alt);
    padding: var(--space-2xl) 0;
}
.showcase-header {
    max-width: 600px;
    margin-bottom: var(--space-xl);
}
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}
@media (max-width: 800px) {
    .showcase-grid { grid-template-columns: 1fr; }
}
.showcase-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}
.showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.showcase-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}
@media (max-width: 800px) {
    .showcase-card.featured { 
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}
.showcase-image {
    background: var(--color-bg-warm);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.showcase-card.featured .showcase-image {
    min-height: 280px;
}
.showcase-image-icon {
    width: 64px;
    height: 64px;
    color: var(--color-accent);
    opacity: 0.4;
    transition: all 0.4s ease;
}
.showcase-card:hover .showcase-image-icon {
    opacity: 0.6;
    transform: scale(1.1);
}
.showcase-content {
    padding: var(--space-md);
}
.showcase-industry {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
    transition: color 0.4s ease;
}
.showcase-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: var(--space-sm);
}
.showcase-content p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}
.showcase-stats {
    display: flex;
    gap: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}
.showcase-stat {
    flex: 1;
}
.showcase-stat-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text-strong);
    line-height: 1.2;
    transition: color 0.4s ease;
}
.showcase-stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

/* Work - Bento Grid */
.work {
    background: var(--color-bg);
    padding: var(--space-2xl) 0;
}
.work-header {
    max-width: 600px;
    margin-bottom: var(--space-xl);
}
.work-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: var(--space-sm);
}
@media (max-width: 900px) {
    .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .work-grid { grid-template-columns: 1fr; }
}
.work-item { 
    padding: var(--space-lg); 
    background: var(--color-bg-alt);
    border-radius: var(--radius-md); 
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.work-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.work-item:hover::before {
    transform: scaleX(1);
}
.work-item:hover { 
    transform: translateY(-4px); 
    box-shadow: var(--shadow-lg);
    background: var(--color-bg-elevated);
}
.work-item.featured {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: var(--color-text-strong);
}
.work-item.featured::before { display: none; }
.work-featured-icon {
    width: 100%;
    height: auto;
    flex: 1;
    min-height: 0;
    transition: all 0.3s ease;
}
/* SVG theming: light mode (dark card bg) */
.svg-label { font-family: var(--font-body); }
.svg-muted { fill: rgba(255,255,255,0.45); }
.svg-card { fill: rgba(255,255,255,0.08); stroke: rgba(255,255,255,0.15); stroke-width: 1; }
.svg-card-done { fill: rgba(255,255,255,0.1); stroke: var(--color-accent-light); stroke-width: 1.2; }
.svg-card-check { stroke: rgba(255,255,255,0.25); stroke-width: 1.5; }
.svg-card-line { stroke: rgba(255,255,255,0.25); stroke-width: 1.5; stroke-linecap: round; }
.svg-card-line-faint { stroke: rgba(255,255,255,0.12); stroke-width: 1.5; stroke-linecap: round; }
.svg-flow-line { stroke: rgba(255,255,255,0.2); stroke-width: 1.2; stroke-linecap: round; fill: none; }
/* SVG theming: dark mode (light card bg) */
[data-theme="dark"] .svg-muted { fill: rgba(0,0,0,0.4); }
[data-theme="dark"] .svg-card { fill: rgba(0,0,0,0.04); stroke: rgba(0,0,0,0.12); }
[data-theme="dark"] .svg-card-done { fill: rgba(0,0,0,0.03); stroke: var(--color-accent-light); }
[data-theme="dark"] .svg-card-check { stroke: rgba(0,0,0,0.2); }
[data-theme="dark"] .svg-card-line { stroke: rgba(0,0,0,0.2); }
[data-theme="dark"] .svg-card-line-faint { stroke: rgba(0,0,0,0.1); }
[data-theme="dark"] .svg-flow-line { stroke: rgba(0,0,0,0.15); }
/* SVG theming: hover (dark bg in both modes) */
.work-item.featured:hover .svg-muted { fill: rgba(255,255,255,0.45); }
.work-item.featured:hover .svg-card { fill: rgba(255,255,255,0.08); stroke: rgba(255,255,255,0.15); }
.work-item.featured:hover .svg-card-done { fill: rgba(255,255,255,0.1); }
.work-item.featured:hover .svg-card-check { stroke: rgba(255,255,255,0.25); }
.work-item.featured:hover .svg-card-line { stroke: rgba(255,255,255,0.25); }
.work-item.featured:hover .svg-card-line-faint { stroke: rgba(255,255,255,0.12); }
.work-item.featured:hover .svg-flow-line { stroke: rgba(255,255,255,0.2); }
.work-item.featured:hover {
    background: var(--color-bg-dark);
    color: var(--color-text-on-dark);
}
.work-item.featured:hover h3 { color: var(--color-text-on-dark); }
.work-item.featured:hover p { color: var(--color-text-on-dark); }
.work-item.featured h3 { color: var(--color-text-inverse); opacity: 0.95; }
.work-item.featured p { color: var(--color-text-inverse); opacity: 0.7; }
@media (max-width: 900px) {
    .work-item.featured { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 600px) {
    .work-item.featured { grid-column: span 1; }
}
.work-item-icon {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 28px;
    height: 28px;
    color: var(--color-accent);
    opacity: 0.4;
    transition: opacity 0.3s ease, color 0.3s ease;
}
.work-item:hover .work-item-icon {
    opacity: 0.7;
}
.work-item h3 {
    font-family: var(--font-display); 
    font-size: 1.4rem; 
    font-weight: 400;
    margin-bottom: var(--space-xs);
}
.work-item p { 
    font-size: 0.95rem; 
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* Testimonials */
.testimonials {
    background: var(--color-bg-warm);
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}
.testimonials::before {
    content: '"';
    position: absolute;
    top: -40px;
    left: 5%;
    font-family: var(--font-display);
    font-size: 20rem;
    color: var(--color-accent);
    opacity: 0.06;
    line-height: 1;
    pointer-events: none;
    transition: color 0.4s ease;
}
.testimonials-header {
    max-width: 500px;
    margin-bottom: var(--space-xl);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}
@media (max-width: 1000px) {
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .testimonials-grid { grid-template-columns: 1fr; }
}
.testimonial-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.testimonial-card.featured {
    grid-column: span 2;
    grid-row: span 1;
    background: var(--color-text-strong);
}
.testimonial-card.featured .testimonial-quote,
.testimonial-card.featured .testimonial-name,
.testimonial-card.featured .testimonial-role {
    color: var(--color-text-inverse);
}
.testimonial-card.featured .testimonial-quote { opacity: 0.92; }
.testimonial-card.featured .testimonial-role { opacity: 0.65; }
@media (max-width: 1000px) {
    .testimonial-card.featured { grid-column: span 2; }
}
@media (max-width: 700px) {
    .testimonial-card.featured { grid-column: span 1; }
}
.testimonial-quote {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--color-text);
    flex: 1;
    margin-bottom: var(--space-md);
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-accent);
    font-weight: 400;
    flex-shrink: 0;
    transition: all 0.4s ease;
}
.testimonial-card.featured .testimonial-avatar {
    background: var(--color-inverse-subtle);
    color: var(--color-text-inverse);
}
.testimonial-info {
    min-width: 0;
}
.testimonial-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-strong);
    margin-bottom: 2px;
}
.testimonial-role {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Why Section */
.why { 
    background-color: var(--color-bg);
    padding: var(--space-2xl) 0;
}
.why-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xl);
}
@media (max-width: 900px) {
    .why-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
}
.why-header h2 {
    position: sticky;
    top: 120px;
}
.why-list { 
    display: grid; 
    gap: var(--space-md);
}
.why-item { 
    display: flex; 
    gap: var(--space-md); 
    align-items: flex-start;
    padding: var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}
.why-item:hover {
    background: var(--color-bg-elevated);
    box-shadow: var(--shadow-md);
}
.why-icon { 
    flex-shrink: 0; 
    width: 48px; 
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-subtle);
    border-radius: var(--radius-sm);
    color: var(--color-accent);
    transition: all 0.4s ease;
}
.why-item p { font-size: 1rem; }
.why-item strong { color: var(--color-text-strong); }

/* Engagement */
.engagement { 
    background-color: var(--color-bg-alt);
    padding: var(--space-2xl) 0;
}
.engagement-content {
    max-width: 700px;
}
.engagement-content .lead {
    margin-bottom: var(--space-lg);
}
.engagement-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: var(--space-sm);
}
@media (max-width: 700px) { .engagement-grid { grid-template-columns: 1fr; } }
.engagement-item { 
    padding: var(--space-md); 
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}
.engagement-item:hover {
    box-shadow: var(--shadow-md);
}
.engagement-item h3 { 
    font-family: var(--font-body); 
    font-weight: 600; 
    font-size: 1rem;
    color: var(--color-text-strong); 
    margin-bottom: var(--space-xs); 
}
.engagement-item p { font-size: 0.95rem; color: var(--color-text); }

/* CTA Section */
.cta-section {
    background: var(--color-text-strong);
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, var(--color-accent-glow) 0%, transparent 60%);
    pointer-events: none;
}
.cta-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
    position: relative;
    z-index: 1;
}
@media (max-width: 900px) {
    .cta-layout { grid-template-columns: 1fr; gap: var(--space-lg); }
}
.cta-content h2 {
    color: var(--color-text-inverse);
    margin-bottom: var(--space-sm);
}
.cta-content .lead {
    color: var(--color-text-inverse-muted);
    margin-bottom: var(--space-md);
}
.cta-email {
    font-size: 0.9rem;
    color: var(--color-text-inverse-muted);
}
.cta-email a {
    color: var(--color-text-inverse);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}
.cta-email a:hover {
    color: var(--color-accent);
}
.cta-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}
.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-inverse-muted);
}
.form-group input,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text-strong);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-subtle);
}
.cta-section .cta-primary {
    background: var(--color-bg);
    color: var(--color-text-strong);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    align-self: flex-start;
    transition: all 0.3s ease;
}
.cta-section .cta-primary:hover {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
[data-theme="dark"] .cta-content h2 {
    color: var(--color-bg);
}
[data-theme="dark"] .cta-content .lead {
    color: var(--color-bg);
    opacity: 0.7;
}
[data-theme="dark"] .cta-email {
    color: var(--color-bg);
    opacity: 0.7;
}
[data-theme="dark"] .cta-email a {
    color: var(--color-bg);
    opacity: 1;
}
[data-theme="dark"] .form-group label {
    color: var(--color-bg);
    opacity: 0.7;
}
[data-theme="dark"] .cta-section .cta-primary {
    background: var(--color-bg);
    color: var(--color-text-strong);
}
[data-theme="dark"] .cta-section .cta-primary:hover {
    background: var(--color-accent);
    color: var(--color-bg);
}

/* Footer */
footer { 
    padding: var(--space-lg) 0; 
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}
footer .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: var(--space-sm); 
}
footer p { font-size: 0.85rem; color: var(--color-text-muted); }
footer a { color: var(--color-text); text-decoration: none; transition: color 0.3s ease; }
footer a:hover { color: var(--color-accent); }

section[id] { scroll-margin-top: 80px; }
