/* ==========================================================================
   Matthieu Playe Portfolio - Premium Minimal Design
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    /* Colors - Refined monochromatic palette */
    --color-bg: #fafafa;
    --color-bg-alt: #ffffff;
    --color-bg-dark: #0a0a0a;
    --color-text: #1a1a1a;
    --color-text-muted: #6b6b6b;
    --color-text-light: #999999;
    --color-accent: #0066ff;
    --color-accent-hover: #0052cc;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-border-strong: rgba(0, 0, 0, 0.12);
    
    /* Typography */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    
    /* Font Sizes - Fluid typography */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --text-4xl: clamp(2.5rem, 1.8rem + 3.5vw, 4rem);
    --text-5xl: clamp(3rem, 2rem + 5vw, 5.5rem);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    --space-3xl: 8rem;
    --space-4xl: 12rem;
    
    /* Layout */
    --max-width: 1400px;
    --content-width: 800px;
    --header-height: 80px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --color-bg: #0a0a0a;
    --color-bg-alt: #141414;
    --color-bg-dark: #000000;
    --color-text: #f5f5f5;
    --color-text-muted: #a0a0a0;
    --color-text-light: #6b6b6b;
    --color-accent: #3b82f6;
    --color-accent-hover: #60a5fa;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-strong: rgba(255, 255, 255, 0.15);

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

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul, ol {
    list-style: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.heading-display {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: italic;
}

p + p {
    margin-top: var(--space-md);
}

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-xl);
    }
}

.section {
    padding: var(--space-3xl) 0;
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-4xl) 0;
    }
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

[data-theme="dark"] .site-header {
    background: rgba(10, 10, 10, 0.8);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

@media (min-width: 768px) {
    .nav {
        padding: 0 var(--space-xl);
    }
}

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

.logo-img {
    height: 32px;
    width: auto;
}

[data-theme="dark"] .logo-img {
    filter: invert(1);
}

.logo-name {
    font-size: var(--text-base);
    font-weight: 600;
    letter-spacing: -0.02em;
    display: none;
}

@media (min-width: 480px) {
    .logo-name {
        display: block;
    }
}

@media (min-width: 768px) {
    .logo-name {
        font-size: var(--text-lg);
    }
}

.logo-text {
    font-size: var(--text-xl);
    font-weight: 600;
    letter-spacing: -0.03em;
}

.nav-links {
    display: none;
    gap: var(--space-xl);
}

@media (min-width: 900px) {
    .nav-links {
        display: flex;
    }
}

/* Contact link only visible in mobile menu */
.nav-link-mobile {
    display: none;
}

@media (max-width: 899px) {
    .nav-links.is-open .nav-link-mobile {
        display: block;
    }
}

/* Mobile language dropdown */
.nav-lang-mobile {
    margin-top: var(--space-sm);
    padding-top: var(--space-lg) !important;
    padding-bottom: var(--space-sm) !important;
    border-top: 1px solid var(--color-border) !important;
    border-bottom: none !important;
}

.lang-dropdown-mobile {
    position: relative;
}

.lang-dropdown-mobile .lang-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: auto;
    top: auto;
    min-width: 180px;
}

.lang-dropdown-mobile .lang-option {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.lang-dropdown-mobile .lang-option .lang-flag {
    flex-shrink: 0;
}

.nav-links a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

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

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

@media (min-width: 768px) {
    .nav-actions {
        gap: var(--space-md);
    }
}

/* Hide contact button on mobile */
.nav-actions .btn {
    display: none;
}

@media (min-width: 900px) {
    .nav-actions .btn {
        display: inline-flex;
    }
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: none;
}

@media (min-width: 768px) {
    .lang-dropdown {
        display: block;
    }
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 12px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-toggle:hover {
    border-color: var(--color-border-strong);
}

.lang-toggle.active {
    border-color: var(--color-text);
}

.lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-flag svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lang-code {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.lang-arrow {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.lang-toggle.active .lang-arrow {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    padding: 8px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    opacity: 1;
    transform: translateY(0);
    transition: all var(--transition-fast);
}

.lang-menu.hidden {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 12px;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.lang-option:hover {
    color: var(--color-text);
    background: var(--color-bg);
}

.lang-option-active {
    color: var(--color-text);
    background: var(--color-bg);
}

.lang-option-active::after {
    content: '';
    margin-left: auto;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

@media (min-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
}

.theme-toggle:hover {
    border-color: var(--color-border-strong);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    color: var(--color-text);
    transition: transform var(--transition-fast);
}

@media (min-width: 768px) {
    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

/* Show sun icon in dark mode (to switch to light) */
[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* Show moon icon in light mode (to switch to dark) */
:root:not([data-theme="dark"]) .theme-toggle .icon-moon,
[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
}

@media (min-width: 900px) {
    .nav-toggle {
        display: none;
    }
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-fast);
}

/* Mobile menu active state */
.nav-toggle.is-active span:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle.is-active span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* Mobile Navigation Menu */
@media (max-width: 899px) {
    .nav-links.is-open {
        display: flex;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: var(--space-md) var(--space-lg) var(--space-xl);
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
    }

    [data-theme="dark"] .nav-links.is-open {
        background: var(--color-bg);
    }

    .nav-links.is-open > li > a {
        display: block;
        padding: var(--space-md) 0;
        font-size: var(--text-base);
        color: var(--color-text);
        border-bottom: 1px solid var(--color-border);
    }

    .nav-links.is-open > li:last-child > a {
        border-bottom: none;
    }

    /* Remove border from Contact (item before language dropdown) */
    .nav-links.is-open > li.nav-link-mobile:not(.nav-lang-mobile) > a {
        border-bottom: none;
    }

    /* Language dropdown in mobile menu */
    .nav-links.is-open .lang-option {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 10px 12px;
        border-bottom: none;
    }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 12px 24px;
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

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

.btn-primary:hover {
    background: var(--color-bg-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Dark mode button fix */
[data-theme="dark"] .btn-primary {
    color: #0a0a0a;
    background: #f5f5f5;
}

[data-theme="dark"] .btn-primary:hover {
    background: #ffffff;
}

.btn-secondary {
    color: var(--color-text);
    background: transparent;
    border: 1px solid var(--color-border-strong);
}

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

.btn-large {
    padding: 16px 32px;
    font-size: var(--text-base);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-3xl);
}

@media (min-width: 768px) {
    .hero {
        padding-top: var(--header-height);
    }
}

.hero-content {
    max-width: 900px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    padding: 8px 16px;
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
}

.hero-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
}

.hero-title .accent {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: italic;
}

.hero-subtitle {
    max-width: 600px;
    font-size: var(--text-xl);
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-xl);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* --------------------------------------------------------------------------
   Services Section
   -------------------------------------------------------------------------- */
.services {
    background: var(--color-bg-alt);
}

.section-header {
    max-width: 600px;
    margin-bottom: var(--space-2xl);
}

.section-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.section-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.section-description {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
}

.services-grid {
    display: grid;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xl);
    }
}

.service-card {
    padding: var(--space-xl);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.service-card:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

a.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-link {
    display: inline-block;
    margin-top: var(--space-md);
    color: var(--color-accent);
    font-weight: 500;
    font-size: var(--text-sm);
    transition: var(--transition-fast);
}

.service-card-link:hover .service-link {
    transform: translateX(4px);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-dark);
    border-radius: var(--radius-md);
    color: white;
}

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

.service-card p {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.service-features {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.service-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.service-features li + li {
    margin-top: var(--space-xs);
}

.service-features li::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--color-text);
    border-radius: 50%;
}

/* --------------------------------------------------------------------------
   Work / Projects Section
   -------------------------------------------------------------------------- */
.work-grid {
    display: grid;
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.project-card:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.project-card:hover .project-image img {
    transform: scale(1.03);
}

.project-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

[data-theme="dark"] .project-image {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.project-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform var(--transition-slow);
    border-radius: var(--radius-sm);
}

.project-info {
    padding: var(--space-lg);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.project-tag {
    padding: 4px 10px;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}

.project-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-xs);
}

.project-card p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
}

.project-link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.project-card:hover .project-link svg {
    transform: translateX(4px);
}

/* Featured Project (full width) */
.project-card.featured {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .project-card.featured {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
    }

    .project-card.featured .project-image {
        aspect-ratio: auto;
        min-height: 300px;
        max-height: 400px;
        padding: var(--space-xl);
    }

    .project-card.featured .project-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: var(--space-2xl);
    }
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about {
    background: var(--color-bg-dark);
    color: white;
}

[data-theme="dark"] .about {
    background: var(--color-bg-alt);
}

.about .section-label {
    color: rgba(255, 255, 255, 0.5);
}

.about-grid {
    display: grid;
    gap: var(--space-2xl);
    align-items: center;
}

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

.about-content h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-lg);
}

.about-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-lg);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item h4 {
    font-size: var(--text-4xl);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.stat-item p {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.5);
}

.about-image {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.testimonials-grid {
    display: grid;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.testimonial-card {
    padding: var(--space-xl);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.testimonial-content {
    font-size: var(--text-lg);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

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

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-bg);
    overflow: hidden;
}

.testimonial-info h4 {
    font-size: var(--text-sm);
    font-weight: 600;
}

.testimonial-info p {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.contact {
    background: var(--color-bg-alt);
}

.contact-grid {
    display: grid;
    gap: var(--space-2xl);
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.contact-content h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.contact-content p {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.contact-method:hover {
    transform: translateX(8px);
}

.contact-method-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-dark);
    border-radius: var(--radius-sm);
    color: white;
}

.contact-method span {
    font-weight: 500;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-xl);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: var(--text-sm);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 14px 16px;
    font-family: inherit;
    font-size: var(--text-base);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-alt);
    transition: all var(--transition-fast);
}

.form-group select {
    appearance: none;
    padding-right: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    cursor: pointer;
}

[data-theme="dark"] .form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-text);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-group select option {
    color: var(--color-text);
    background: var(--color-bg-alt);
}

.form-message {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: var(--text-base);
    line-height: 1.5;
}

.form-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    padding: var(--space-3xl) 0 var(--space-xl);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: grid;
    gap: var(--space-2xl);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 1.5fr 1fr;
        padding: 0 var(--space-xl);
    }
}

.footer-brand .logo-text {
    margin-bottom: var(--space-sm);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.footer-brand .logo-img {
    height: 40px;
    width: auto;
}

.footer-brand .logo-name {
    display: block;
    font-size: var(--text-lg);
}

@media (min-width: 768px) {
    .footer-brand .logo-name {
        font-size: var(--text-xl);
    }
}

.footer-brand p {
    color: var(--color-text-muted);
    max-width: 300px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.footer-col h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.footer-col li + li {
    margin-top: var(--space-sm);
}

.footer-col a {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--color-text);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: var(--space-2xl) auto 0;
    padding: var(--space-lg) var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
}

@media (min-width: 768px) {
    .footer-bottom {
        padding: var(--space-lg) var(--space-xl) 0;
    }
}

.footer-bottom p {
    font-size: var(--text-xs);
    color: var(--color-text-light);
}

/* --------------------------------------------------------------------------
   Project Detail Page
   -------------------------------------------------------------------------- */
.project-hero {
    padding-top: calc(var(--header-height) + var(--space-3xl));
    padding-bottom: var(--space-2xl);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-lg);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--color-text);
}

.back-link svg {
    transition: transform var(--transition-fast);
}

.back-link:hover svg {
    transform: translateX(-4px);
}

.project-hero-content {
    max-width: 800px;
}

.project-hero .project-tags {
    margin-bottom: var(--space-lg);
}

.project-hero h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.project-hero .lead {
    font-size: var(--text-xl);
    color: var(--color-text-muted);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.project-meta-item h4 {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.project-meta-item p {
    font-size: var(--text-base);
    font-weight: 500;
}

.project-showcase {
    background: var(--color-bg-alt);
    padding: var(--space-2xl) 0;
}

.project-showcase img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.project-body {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-lg);
}

@media (min-width: 768px) {
    .project-body {
        padding: var(--space-3xl) var(--space-xl);
    }
}

.project-body h2 {
    font-size: var(--text-2xl);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.project-body h2:first-child {
    margin-top: 0;
}

.project-body p {
    color: var(--color-text-muted);
    font-size: var(--text-lg);
    line-height: 1.7;
}

.project-body ul {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

.project-body li {
    position: relative;
    color: var(--color-text-muted);
    font-size: var(--text-lg);
    padding-left: var(--space-sm);
}

.project-body li::before {
    content: '–';
    position: absolute;
    left: calc(var(--space-lg) * -1);
    color: var(--color-text-light);
}

.project-body li + li {
    margin-top: var(--space-sm);
}

.project-gallery {
    display: grid;
    gap: var(--space-md);
    margin: var(--space-2xl) 0;
}

@media (min-width: 768px) {
    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-gallery img {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

/* Full width project image */
.project-image-full {
    margin: var(--space-2xl) 0;
}

.project-image-full img {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

/* Mobile screenshots gallery - shows phone mockups side by side */
.project-gallery-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin: var(--space-2xl) auto;
    max-width: 500px;
}

@media (min-width: 768px) {
    .project-gallery-mobile {
        grid-template-columns: repeat(3, 1fr);
        max-width: 700px;
    }
}

.project-gallery-mobile img {
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-nav {
    display: flex;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
}

.project-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}

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

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.scroll-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 44px;
        height: 44px;
    }
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Initial state for animated elements */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
}

[data-animate].is-visible {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-text);
    color: var(--color-bg);
    font-weight: 500;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-sm);
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Focus States for Keyboard Navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Remove default focus outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
    outline: none;
}

/* Footer Address */
.footer-address {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: var(--space-md);
    font-style: normal;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --------------------------------------------------------------------------
   Service Pages
   -------------------------------------------------------------------------- */
.service-hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
    text-align: center;
}

.service-hero h1 {
    font-size: var(--text-4xl);
    font-weight: 500;
    margin-top: var(--space-sm);
    margin-bottom: var(--space-md);
}

.service-intro {
    font-size: var(--text-xl);
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.service-content {
    max-width: 800px;
    margin: 0 auto;
}

.service-block {
    margin-bottom: var(--space-2xl);
}

.service-block h2 {
    font-size: var(--text-2xl);
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.service-block p {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.service-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-sm);
}

.service-list li {
    padding: var(--space-sm) 0;
    padding-left: var(--space-md);
    position: relative;
    color: var(--color-text);
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tech-tag {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-alt h2 {
    margin-bottom: var(--space-xl);
}

.service-cta {
    text-align: center;
    padding: var(--space-3xl) 0;
}

.service-cta h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-sm);
}

.service-cta p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

/* --------------------------------------------------------------------------
   404 Page
   -------------------------------------------------------------------------- */
.not-found {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    padding-bottom: var(--space-3xl);
}

.not-found-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.not-found-code {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1;
    color: var(--color-border-strong);
    margin-bottom: var(--space-lg);
}

.not-found-content h1 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.not-found-content p {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.not-found-content .btn {
    gap: var(--space-sm);
}

.not-found-content .btn svg {
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   Cookie Banner
   -------------------------------------------------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-lg) var(--space-md);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform var(--transition-base);
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.cookie-banner-text {
    flex: 1;
    min-width: 0;
}

.cookie-banner-text h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.cookie-banner-text p {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
}

.cookie-banner-text a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.cookie-banner-text a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.cookie-banner .btn {
    white-space: nowrap;
    padding: 0.75rem 1.5rem;
    font-size: var(--text-sm);
}

.cookie-banner .btn-secondary {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border-strong);
}

.cookie-banner .btn-secondary:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cookie-banner {
        padding: var(--space-md);
    }

    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }

    .cookie-banner-actions {
        flex-direction: column;
    }

    .cookie-banner .btn {
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .site-header,
    .site-footer,
    .nav-toggle,
    .btn,
    .cookie-banner {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}
