@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500&display=swap');

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

:root {
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-secondary: #06b6d4;
    --color-bg: #fafafa;
    --color-bg-dark: #f5f5f5;
    --color-text: #171717;
    --color-text-muted: #737373;
    --color-border: #e5e5e5;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;
    --radius: 16px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --color-bg: #0a0a0a;
    --color-bg-dark: #171717;
    --color-text: #fafafa;
    --color-text-muted: #a3a3a3;
    --color-border: #262626;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: floatOrb 20s ease-in-out infinite;
}

body::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.6) 0%, rgba(99, 102, 241, 0) 70%);
    top: -200px;
    right: -200px;
}

body::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.6) 0%, rgba(6, 182, 212, 0) 70%);
    bottom: -100px;
    left: -150px;
    animation-delay: -10s;
    animation-duration: 25s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -80px) scale(1.1);
    }
    50% {
        transform: translate(-30px, -120px) scale(0.9);
    }
    75% {
        transform: translate(80px, -50px) scale(1.05);
    }
}

nav,
.container,
footer {
    position: relative;
    z-index: 1;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

html {
    scroll-behavior: smooth;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    z-index: 101;
    transition: width 0.1s;
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
    transition: all 0.3s ease;
    padding-top: 8px;
    padding-bottom: 8px;
}

nav.scrolled {
    padding-top: 2px;
    padding-bottom: 2px;
}

nav.scrolled .nav-container {
    padding: 8px var(--spacing-md);
}

nav.scrolled .logo img {
    max-width: 28px;
}

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

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s ease;
}

.nav-container > * {
    display: flex;
    align-items: center;
}

/* Logo Styles */
.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
}

.logo img {
    max-width: 45px;
    height: auto;
    display: block;
    transition: all 0.3s ease;
}

/* Hide white logo by default, show dark logo */
.logo .logo-dark {
    display: block;
}

.logo .logo-light {
    display: none;
}

/* In dark mode, hide dark logo and show white logo */
[data-theme="dark"] .logo .logo-dark {
    display: none;
}

[data-theme="dark"] .logo .logo-light {
    display: block;
}

/* Nav Back Link (for case study pages) */
.nav-back {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.nav-back:hover {
    color: var(--color-primary);
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-links li::before {
    content: none;
    display: none;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0;
}

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

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    background: var(--color-bg-dark);
}

.theme-icon {
    width: 20px;
    height: 20px;
    fill: var(--color-text-muted);
    stroke: var(--color-text-muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill 0.2s, stroke 0.2s;
}

.theme-toggle:hover .theme-icon {
    fill: var(--color-primary);
    stroke: var(--color-primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* Mobile Controls Container */
.mobile-controls {
    display: none;
    align-items: center;
    gap: 8px;
}

/* Hide mobile theme toggle on desktop */
.mobile-theme-toggle {
    display: none;
}

.hamburger {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background 0.3s;
    display: block;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.mobile-menu-toggle.active .hamburger {
    background: var(--color-text);
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

/* Hero Section */
.hero {
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-xl);
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: clamp(48px, 8vw, 72px);
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
}

.hero .subtitle {
    font-size: clamp(18px, 3vw, 24px);
    color: var(--color-text-muted);
    font-weight: 400;
    max-width: 700px;
    margin-bottom: var(--spacing-md);
}

.hero .location {
    font-size: 16px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

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

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-secondary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Tags */
.tags {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: white;
    border: 1.5px solid var(--color-border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
}

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

.tag.primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Meta Grid */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

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

.meta-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.meta-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 500;
}

.meta-value {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
}

/* Case Studies Grid (Homepage) */
.case-studies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.case-study-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    position: relative;
}

[data-theme="dark"] .case-study-card {
    background: var(--color-bg-dark);
}

.case-study-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
    pointer-events: none;
}

.case-study-card:nth-child(1) { animation-delay: 0.1s; }
.case-study-card:nth-child(2) { animation-delay: 0.2s; }
.case-study-card:nth-child(3) { animation-delay: 0.3s; }

.case-study-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    border-color: var(--color-primary);
}

.case-study-card:hover::before {
    opacity: 1;
}

.case-study-card > * {
    position: relative;
    z-index: 2;
}

.card-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.card-image span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-study-card:hover .card-image img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

[data-theme="dark"] .card-image {
    background: linear-gradient(135deg, #171717 0%, #262626 100%);
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.case-study-card:hover .card-image::after {
    opacity: 1;
}

.card-content {
    padding: var(--spacing-md);
}

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

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

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

.card-tag.primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
}

.card-content h3 {
    font-size: 24px;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
    transition: color 0.3s ease;
}

.case-study-card:hover .card-content h3 {
    color: var(--color-primary);
}

.card-content p {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.6;
    transition: color 0.3s ease;
}

.case-study-card:hover .card-content p {
    color: var(--color-text);
}

/* About Section (Homepage) */
.about {
    padding: var(--spacing-xl);
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    margin-bottom: var(--spacing-xl);
}

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

.about-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--color-border);
    flex-shrink: 0;
}

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

.about-text h2 {
    font-size: 32px;
    margin-bottom: var(--spacing-md);
}

.about-text p {
    font-size: 17px;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Contact Section (Homepage) */
.contact-section {
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    text-align: center;
}

.contact-section h2 {
    font-size: 32px;
    margin-bottom: var(--spacing-sm);
}

.contact-section p {
    font-size: 17px;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
}

.cta-button {
    display: inline-block;
    padding: 16px 32px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.cta-button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Footer */
footer {
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-links li {
    padding: 0;
    margin: 0;
    list-style: none;
}

.social-links li::before {
    content: none;
    display: none;
}

.social-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--color-primary);
}

/* Sections (Case Study Pages) */
.section {
    margin-bottom: var(--spacing-xl);
}

h2 {
    font-size: clamp(32px, 5vw, 48px);
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 28px;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

h4 {
    font-size: 20px;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

p {
    font-size: 17px;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

/* Two Column Layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl);
    margin: var(--spacing-lg) 0;
}

/* Accent Box */
.accent-box {
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius);
    border-left: 4px solid var(--color-primary);
    margin: var(--spacing-lg) 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.stat-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.7) 0%, rgba(79, 70, 229, 0.7) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), 0 0 30px rgba(6, 182, 212, 0.4);
}

.stat-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='198'%3e%3cdefs%3e%3clinearGradient id='a' x1='50%25' x2='50%25' y1='-10.959%25' y2='100%25'%3e%3cstop stop-color='%2306b6d4' stop-opacity='.2' offset='0%25'/%3e%3cstop stop-color='%2306b6d4' stop-opacity='.35' offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath fill='url(%23a)' fill-rule='evenodd' d='M.005 121C311 121 409.898-.25 811 0c400 0 500 121 789 121v77H0s.005-48 .005-77z'/%3e%3c/svg%3e"),
        url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='198'%3e%3cdefs%3e%3clinearGradient id='b' x1='50%25' x2='50%25' y1='-10.959%25' y2='100%25'%3e%3cstop stop-color='%23ffffff' stop-opacity='.08' offset='0%25'/%3e%3cstop stop-color='%23ffffff' stop-opacity='.15' offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath fill='url(%23b)' fill-rule='evenodd' d='M.005 121C311 121 409.898-.25 811 0c400 0 500 121 789 121v77H0s.005-48 .005-77z'/%3e%3c/svg%3e"),
        url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='198'%3e%3cdefs%3e%3clinearGradient id='c' x1='50%25' x2='50%25' y1='-10.959%25' y2='100%25'%3e%3cstop stop-color='%2306b6d4' stop-opacity='.1' offset='0%25'/%3e%3cstop stop-color='%2306b6d4' stop-opacity='.2' offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath fill='url(%23c)' fill-rule='evenodd' d='M.005 121C311 121 409.898-.25 811 0c400 0 500 121 789 121v77H0s.005-48 .005-77z'/%3e%3c/svg%3e");
    background-repeat: repeat-x;
    background-size: 1600px 100%, 1400px 90%, 1800px 110%;
    animation: waves-card1 30s ease-in-out infinite;
    pointer-events: none;
}

.stat-card:nth-child(2)::before {
    animation: waves-card2 30s ease-in-out infinite;
    animation-delay: -10s;
}

.stat-card:nth-child(3)::before {
    animation: waves-card3 30s ease-in-out infinite;
    animation-delay: -20s;
}

/* Card 1: Fast forward, Medium backward, Slow forward */
@keyframes waves-card1 {
    0% {
        background-position: 0 100%, 1400px 95%, 0 105%;
    }
    33% {
        background-position: 533px 100%, 933px 95%, 600px 105%;
    }
    66% {
        background-position: 1066px 100%, 467px 95%, 1200px 105%;
    }
    100% {
        background-position: 1600px 100%, 0 95%, 1800px 105%;
    }
}

/* Card 2: Medium forward, Fast backward, Slow backward */
@keyframes waves-card2 {
    0% {
        background-position: 0 100%, 1400px 95%, 1800px 105%;
    }
    33% {
        background-position: 467px 100%, 933px 95%, 1200px 105%;
    }
    66% {
        background-position: 933px 100%, 467px 95%, 600px 105%;
    }
    100% {
        background-position: 1400px 100%, 0 95%, 0 105%;
    }
}

/* Card 3: Slow forward, Fast forward, Medium backward */
@keyframes waves-card3 {
    0% {
        background-position: 0 100%, 0 95%, 1400px 105%;
    }
    33% {
        background-position: 600px 100%, 533px 95%, 933px 105%;
    }
    66% {
        background-position: 1200px 100%, 1066px 95%, 467px 105%;
    }
    100% {
        background-position: 1800px 100%, 1600px 95%, 0 105%;
    }
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: var(--spacing-xs);
    position: relative;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    position: relative;
}

/* Blockquote */
blockquote {
    font-size: 18px;
    color: var(--color-text);
    margin: 40px 0;
    padding: 24px 32px;
    border-left: 4px solid var(--color-primary);
    background: transparent;
    font-style: normal;
    line-height: 1.7;
    position: relative;
}

blockquote::before {
    content: '"';
    font-size: 32px;
    color: var(--color-primary);
    opacity: 0.3;
    font-family: Georgia, serif;
    margin-right: 8px;
    line-height: 0;
    vertical-align: middle;
}

blockquote::after {
    content: '"';
    font-size: 32px;
    color: var(--color-primary);
    opacity: 0.3;
    font-family: Georgia, serif;
    margin-left: 8px;
    line-height: 0;
    vertical-align: middle;
}

/* Image Container */
.image-container {
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    border: 1px solid var(--color-border);
}

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

.image-placeholder {
    padding: 120px 40px;
    text-align: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 500;
}

[data-theme="dark"] .image-placeholder {
    background: linear-gradient(135deg, #171717 0%, #262626 100%);
}

.image-placeholder small {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: var(--color-primary);
}

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

/* Lists */
ul {
    list-style: none;
    margin: var(--spacing-md) 0;
    padding: 0;
}

li {
    padding: var(--spacing-sm) 0 var(--spacing-sm) 32px;
    position: relative;
    color: var(--color-text-muted);
    font-size: 17px;
    line-height: 1.6;
}

li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 22px;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
}

/* Override default list styles for principle cards */
.principle-list,
.principles-grid ul {
    list-style-type: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.principle-list li,
.principles-grid li {
    padding: 8px 0 8px 28px !important;
    position: relative;
    margin-bottom: 4px;
    list-style-type: none !important;
}

.principle-list li::before,
.principles-grid li::before {
    content: '→' !important;
    position: absolute;
    left: 0;
    top: 8px;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border-radius: 0 !important;
    color: #6366f1;
    font-weight: bold;
    font-size: 18px;
}

/* Callout */
.callout {
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius);
    margin: var(--spacing-lg) 0;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.callout h3 {
    margin-top: 0;
    color: var(--color-primary);
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--color-border) 50%, transparent 100%);
    margin: var(--spacing-xl) 0;
}

/* Next Project */
.next-project {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

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

.next-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.next-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
}

.next-link:hover {
    color: var(--color-primary);
}

.next-link svg {
    transition: transform 0.2s;
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

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

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* SUS Score Visualization (USH Case Study) */
.sus-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 40px 0;
}

.sus-circle {
    position: relative;
    text-align: center;
}

.circle-bg {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto 16px;
    border: 8px solid #e5e5e5;
}

[data-theme="dark"] .circle-bg {
    background: linear-gradient(135deg, #171717 0%, #262626 100%);
    border-color: #404040;
}

.circle-score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 56px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.circle-change {
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
    margin-top: 8px;
}

.circle-label {
    font-size: 14px;
    color: var(--color-text);
    font-weight: 600;
    margin-top: 8px;
}

.circle-sublabel {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Progress Bars (USH Case Study) */
.progress-comparison {
    margin: 40px 0;
}

.progress-item {
    margin-bottom: 32px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.progress-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--color-text);
}

.progress-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #6366f1;
}

.progress-bar {
    height: 12px;
    background: var(--color-bg-dark);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    border-radius: 100px;
    transition: width 1s ease;
}

/* Design Principles (USH Case Study) */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
}

.principle-card {
    padding: 32px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.principle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.15);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
    border-color: rgba(99, 102, 241, 0.25);
}

.principle-card:hover .principle-icon {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
}

.principle-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-radius: 50%;
    color: #6366f1;
    transition: all 0.3s ease;
}

.principle-icon svg {
    width: 32px;
    height: 32px;
}

.principle-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #6366f1;
}

.principle-list {
    list-style: none;
    text-align: left;
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.8;
    padding: 0;
    margin: 0;
}

.principle-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    margin-bottom: 4px;
    list-style: none;
}

.principle-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 8px;
    color: #6366f1;
    font-weight: bold;
    font-size: 18px;
}

/* IMAGE CAROUSEL STYLES */
.image-carousel {
    margin: var(--spacing-xl) 0;
    position: relative;
}

.carousel-container {
    position: relative;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

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

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    flex-shrink: 0;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 600px;
    display: block;
    object-fit: contain;
}

/* Carousel Navigation Buttons */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-button svg {
    width: 24px;
    height: 24px;
}

.carousel-button.prev {
    left: 20px;
}

.carousel-button.next {
    right: 20px;
}

/* Carousel Dots */
.carousel-dots {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: white;
    width: 32px;
    border-radius: 6px;
}

/* Carousel Caption */
.carousel-caption {
    padding: var(--spacing-md);
    text-align: center;
    font-size: 14px;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    position: relative;
    z-index: 1;
}

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

/* Image Grid (for multiple wireframes side-by-side) */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.image-container.wireframe {
    background: var(--color-bg);
}

[data-theme="dark"] .image-container.wireframe {
    background: var(--color-bg-dark);
}

.image-container.hero-image {
    margin: var(--spacing-xl) 0;
}

.image-container.detail-image {
    margin: var(--spacing-lg) 0;
}

/* Responsive */
@media (max-width: 768px) {
    /* Navigation - Mobile */
    nav {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    nav.scrolled {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    nav.scrolled .nav-container {
        padding: 12px var(--spacing-md);
    }

    .nav-container {
        position: relative;
        justify-content: space-between;
        padding: var(--spacing-md);
        align-items: center;
        display: flex;
    }

    /* Logo on mobile - left aligned for homepage */
    .logo {
        position: relative;
        left: auto;
        transform: none;
        z-index: 100;
        display: flex;
        align-items: center;
    }

    .logo img {
        max-width: 40px;
        display: block;
    }

    nav.scrolled .logo img {
        max-width: 32px;
    }

    /* Mobile controls container */
    .mobile-controls {
        display: flex;
        position: relative;
    }

    /* Hide desktop theme toggle on mobile */
    .desktop-theme-toggle {
        display: none !important;
    }

    /* Show mobile theme toggle on mobile */
    .mobile-theme-toggle {
        display: flex;
    }

    /* Mobile menu toggle button */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 100;
        position: relative;
        padding: 8px;
    }

    /* Mobile nav links dropdown */
    .nav-links {
        position: fixed;
        top: 89px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 99;
        gap: 0;
        opacity: 0;
        visibility: hidden;
    }

    nav.scrolled + * .nav-links,
    nav.scrolled .nav-links {
        top: 73px;
    }

    [data-theme="dark"] .nav-links {
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 12px 0;
        width: 100%;
    }

    /* Theme toggle in mobile menu */
    .nav-links .theme-toggle {
        margin: 0 auto;
    }

    /* Case Study Nav on Mobile - Logo centered */
    .case-study-nav {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .case-study-nav.scrolled {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .case-study-nav.scrolled .nav-container {
        padding: 12px var(--spacing-md);
    }

    .case-study-nav .nav-container {
        grid-template-columns: 1fr;
        position: relative;
        padding: var(--spacing-md);
        justify-content: center;
    }

    .case-study-nav .nav-back {
        position: absolute;
        left: var(--spacing-md);
        font-size: 14px;
    }

    .case-study-nav .logo {
        justify-self: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .case-study-nav .logo img {
        max-width: 40px;
    }

    nav.scrolled.case-study-nav .logo img,
    .case-study-nav.scrolled .logo img {
        max-width: 24px !important;
    }

    .case-study-nav .theme-toggle {
        position: absolute;
        right: var(--spacing-md);
    }

    /* General */
    .container {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .hero {
        padding: var(--spacing-lg) 0;
    }

    /* Layouts */
    .two-col {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .case-studies {
        grid-template-columns: 1fr;
    }

    .meta-grid {
        grid-template-columns: 1fr;
    }

    /* USH Visualizations */
    .sus-comparison {
        grid-template-columns: 1fr;
    }

    .circle-bg {
        width: 160px;
        height: 160px;
    }

    .circle-score {
        font-size: 48px;
    }

    .principles-grid {
        grid-template-columns: 1fr;
    }

    /* Typography */
    blockquote {
        font-size: 17px;
        padding: 20px 24px;
        margin: 32px 0;
    }

    /* Images - Much Bigger on Mobile */
    .image-container:not(.carousel-container) {
        margin: var(--spacing-lg) calc(var(--spacing-sm) * -1);
        border-radius: 0;
        width: calc(100% + (var(--spacing-sm) * 2));
    }

    .image-placeholder {
        padding: 100px 20px;
        font-size: 14px;
    }

    .image-placeholder small {
        font-size: 12px;
        margin-top: 10px;
    }

    .image-container:not(.carousel-container) img {
        width: 100%;
        min-height: 250px;
        object-fit: cover;
    }

    /* Carousel on mobile */
    .image-carousel {
        margin: var(--spacing-lg) calc(var(--spacing-sm) * -1);
        width: calc(100% + (var(--spacing-sm) * 2));
    }

    .carousel-container {
        border-radius: 0;
    }

    .carousel-slide {
        min-height: 300px;
    }

    .carousel-slide img {
        max-height: 500px;
        width: 100%;
        object-fit: contain;
    }

    .carousel-button {
        width: 40px;
        height: 40px;
    }

    .carousel-button.prev {
        left: 10px;
    }

    .carousel-button.next {
        right: 10px;
    }

    .carousel-dots {
        bottom: 60px;
        gap: 8px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .carousel-dot.active {
        width: 24px;
    }

    .carousel-caption {
        padding: var(--spacing-sm);
        font-size: 13px;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    /* Buttons */
    .back-to-top {
        bottom: 20px;
        right: 20px;
    }

    /* About section mobile */
    .about {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        text-align: center;
    }

    .about-image {
        margin: 0 auto var(--spacing-md);
        width: 160px;
        height: 160px;
    }

    .about-text {
        text-align: left;
    }

    /* Hide orbs on mobile for performance */
    body::before,
    body::after {
        display: none;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo img {
        max-width: 36px;
    }

    nav.scrolled .logo img {
        max-width: 22px;
    }
}