/* ========================================
   Design Tokens — Dark Theme with Gradient Identity
   ======================================== */

:root {
    /* Core dark background, tinted violet */
    --color-bg: oklch(8% 0.015 300);
    --color-bg-elevated: oklch(14% 0.02 300);
    --color-surface: oklch(17% 0.025 300);
    --color-surface-raised: oklch(22% 0.03 300);
    --color-surface-hover: oklch(26% 0.035 300);
    --color-border: oklch(28% 0.04 300);
    --color-border-subtle: oklch(20% 0.025 300);

    /* Text — warm tinted whites */
    --color-text-primary: oklch(95% 0.005 60);
    --color-text-secondary: oklch(72% 0.01 60);
    --color-text-tertiary: oklch(55% 0.015 300);
    --color-text-muted: oklch(42% 0.015 300);

    /* Brand colors — warm coral-led palette */
    --color-brand-coral: oklch(72% 0.18 30);
    --color-brand-warm: oklch(58% 0.14 25);
    --color-brand-violet: oklch(48% 0.08 300);

    --color-brand: var(--color-brand-warm);
    --color-brand-light: oklch(78% 0.1 30);
    --color-brand-dark: oklch(38% 0.08 25);
    --color-brand-bg: oklch(16% 0.04 25);

    /* Brand block backgrounds (metrics, connect) */
    --color-accent-block: oklch(18% 0.05 20);
    --color-accent-block-text: oklch(96% 0.005 60);
    --color-accent-block-sub: oklch(78% 0.03 30);

    /* Typography */
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: 'Work Sans', system-ui, sans-serif;

    /* Scale */
    --text-display: 5.5rem;
    --text-h1: 3.5rem;
    --text-h2: 2.25rem;
    --text-h3: 1.5rem;
    --text-h4: 1.25rem;
    --text-body: 1rem;
    --text-body-sm: 0.875rem;
    --text-caption: 0.75rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Layout */
    --max-width: 1080px;
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-pill: 9999px;

    /* Divider */
    --divider: 1px solid oklch(24% 0.025 300);
}

/* ========================================
   Light Theme — Warm Cream
   ======================================== */

[data-theme="light"] {
    --color-bg: oklch(97.5% 0.006 90);
    --color-bg-elevated: oklch(92% 0.012 85);
    --color-surface: oklch(95% 0.008 88);
    --color-surface-raised: oklch(90% 0.015 85);
    --color-surface-hover: oklch(86% 0.02 85);
    --color-border: oklch(78% 0.025 85);
    --color-border-subtle: oklch(86% 0.015 85);

    --color-text-primary: oklch(14% 0.02 85);
    --color-text-secondary: oklch(32% 0.03 85);
    --color-text-tertiary: oklch(48% 0.025 85);
    --color-text-muted: oklch(60% 0.02 85);

    --color-brand-coral: oklch(56% 0.18 30);
    --color-brand-warm: oklch(48% 0.15 25);
    --color-brand-violet: oklch(38% 0.08 300);
    --color-brand-light: oklch(62% 0.12 30);
    --color-brand-dark: oklch(32% 0.08 25);
    --color-brand-bg: oklch(90% 0.04 25);

    --color-accent-block: oklch(88% 0.05 25);
    --color-accent-block-text: oklch(16% 0.03 25);
    --color-accent-block-sub: oklch(35% 0.05 25);

    --divider: 1px solid oklch(82% 0.015 85);
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 300;
    line-height: 1.7;
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 400ms ease, color 300ms ease;
}

/* ========================================
   Utility Classes
   ======================================== */

.hero-line-accent {
    color: var(--color-brand-coral);
}

.section-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-brand);
    margin-bottom: var(--space-4);
}

.section-tag.center {
    display: block;
    text-align: center;
}

.section-heading {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 300;
    line-height: 1.25;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    letter-spacing: -0.015em;
}

.section-heading.center {
    text-align: center;
}

.section-sub {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 300;
    color: var(--color-text-secondary);
    max-width: 52ch;
    line-height: 1.7;
}

.section-header {
    margin-bottom: var(--space-12);
}

.section-header .section-sub {
    margin-top: var(--space-2);
}

/* ========================================
   Navigation
   ======================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-3) var(--space-6);
    background: oklch(18% 0.015 300 / 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border-subtle);
    transition: background 300ms ease;
}

.nav.scrolled {
    background: oklch(14% 0.02 300 / 0.95);
}

[data-theme="light"] .nav {
    background: oklch(92% 0.012 85 / 0.8);
    border-bottom: 1px solid var(--color-border-subtle);
}

[data-theme="light"] .nav.scrolled {
    background: oklch(88% 0.015 85 / 0.95);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-img {
    height: 36px;
    width: auto;
    display: block;
}

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

.lang-toggle {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 500;
    color: var(--color-text-primary);
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 200ms ease;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    min-width: 36px;
    text-align: center;
}

.lang-toggle:hover {
    background: var(--color-surface-raised);
    border-color: var(--color-brand);
}

/* Theme toggle */
.theme-toggle {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 500;
    color: var(--color-text-primary);
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 200ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    line-height: 1;
}

.theme-toggle:hover {
    background: var(--color-surface-raised);
    border-color: var(--color-brand-coral);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

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

[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-link {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 400;
    color: var(--color-text-secondary);
    text-decoration: none;
    position: relative;
    padding: var(--space-1) 0;
    transition: color 200ms ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-brand-coral);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms cubic-bezier(0.25, 1, 0.5, 1);
}

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

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link.active {
    color: var(--color-brand-coral);
}

.nav-link.active::after {
    transform: scaleX(1);
    background: var(--color-brand-coral);
}

/* ========================================
   Mobile Hamburger Menu
   ======================================== */

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    gap: 5px;
    z-index: 101;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: all 300ms cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center;
}

.nav-hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: oklch(8% 0.015 300 / 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 400ms ease, visibility 400ms ease;
}

[data-theme="light"] .mobile-menu {
    background: oklch(95% 0.01 90 / 0.98);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
}

.mobile-link {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color 200ms ease;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 400ms ease, transform 400ms cubic-bezier(0.25, 1, 0.5, 1), color 200ms ease;
}

.mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 100ms; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 150ms; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 200ms; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 250ms; }
.mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 300ms; }

.mobile-link:hover {
    color: var(--color-brand);
}

/* ========================================
   Hero Section — Clean, typographic, no gradients
   ======================================== */

.hero {
    position: relative;
    padding: calc(var(--space-32) + 60px) var(--space-6) var(--space-32);
    overflow: hidden;
    background: var(--color-bg);
    border-bottom: var(--divider);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.hero-lockup {
    margin-bottom: var(--space-6);
}

.hero-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 500;
    color: var(--color-brand-coral);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: var(--space-1) var(--space-4);
    border: 1px solid oklch(30% 0.03 30);
    border-radius: var(--radius-sm);
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 300;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-4);
    letter-spacing: 0.03em;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: var(--text-display);
    font-weight: 200;
    line-height: 1.1;
    color: var(--color-text-primary);
    margin-bottom: var(--space-8);
    letter-spacing: -0.02em;
}

.hero-line {
    display: block;
}

.hero-line-accent {
    color: var(--color-brand-coral);
}

/* Bold decorative accent bar under headline */
.hero-accent-bar {
    width: 120px;
    height: 4px;
    background: var(--color-brand-coral);
    margin-bottom: var(--space-8);
    border-radius: 2px;
}

.hero-subline {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-secondary);
    max-width: 56ch;
    margin: 0 0 var(--space-8);
}

.hero-subline strong {
    color: var(--color-text-primary);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Hero embedded metrics */
.hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-10);
}

.hero-metric-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.hero-metric-value {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 200;
    color: var(--color-brand-coral);
    line-height: 1;
}

.hero-metric-label {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 400;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    max-width: 14ch;
}

@media (max-width: 640px) {
    .hero-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 500;
    text-decoration: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-sm);
    transition: all 200ms cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    background: var(--color-brand-dark);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-primary);
    box-shadow: inset 0 0 0 1px var(--color-border);
}

.btn-ghost:hover {
    background: var(--color-surface);
    transform: translateY(-1px);
}

.btn-ghost:active {
    transform: translateY(1px) scale(0.98);
}

.btn-ghost:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-body);
}

/* ========================================
   Metrics Strip
   ======================================== */

.metrics {
    padding: var(--space-20) var(--space-6);
    background: var(--color-accent-block);
    border-bottom: none;
}

.metrics-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    text-align: center;
}

.metric-number {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-h1);
    font-weight: 200;
    color: var(--color-accent-block-text);
    line-height: 1.1;
    margin-bottom: var(--space-2);
}

.metric-label {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    color: var(--color-accent-block-sub);
    font-weight: 400;
}

/* ========================================
   Trusted By
   ======================================== */

.trusted-by {
    padding: var(--space-12) var(--space-6);
    background: var(--color-bg);
}

.trusted-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.trusted-label {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.trusted-logos {
    display: flex;
    gap: var(--space-8);
    flex-wrap: wrap;
    justify-content: center;
}

.trusted-logo {
    font-family: var(--font-display);
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--color-text-tertiary);
    opacity: 0.7;
    transition: opacity 200ms ease;
}

.trusted-logo:hover {
    opacity: 1;
    color: var(--color-text-secondary);
}

/* ========================================
   Services Section
   ======================================== */

.services {
    padding: var(--space-24) var(--space-6);
    border-bottom: var(--divider);
}

.services-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-6);
}

.service-card {
    position: relative;
    padding: var(--space-8);
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    transition: all 200ms cubic-bezier(0.25, 1, 0.5, 1);
}

.service-card:hover {
    background: var(--color-surface-raised);
    border-color: var(--color-border);
    transform: translateY(-4px);
}

.service-card.featured {
    border-color: var(--color-brand);
    background: var(--color-surface-raised);
}

.service-card.featured .service-card-icon {
    width: 56px;
    height: 56px;
    background: var(--color-brand);
    color: var(--color-text-primary);
}

.service-card-badge {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-brand);
    background: var(--color-brand-bg);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
}

.service-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-raised);
    border-radius: var(--radius-md);
    color: var(--color-brand-coral);
    margin-bottom: var(--space-6);
}

.service-card-title {
    font-family: var(--font-display);
    font-size: var(--text-h4);
    font-weight: 400;
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.service-card-desc {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 300;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

.service-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-card-list li {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 300;
    color: var(--color-text-tertiary);
    padding: var(--space-2) 0;
    border-top: 1px solid var(--color-border-subtle);
    position: relative;
    padding-left: var(--space-4);
}

.service-card-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-brand-coral);
    font-weight: 500;
}

/* ========================================
   Work Section (Professional + Academic)
   ======================================== */

.work {
    padding: var(--space-24) var(--space-6);
    background: var(--color-bg-elevated);
    border-bottom: var(--divider);
}

.work-academic {
    background: var(--color-bg);
    border-bottom: var(--divider);
}

.work-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-8);
}

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

.work-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 200ms cubic-bezier(0.25, 1, 0.5, 1);
}

.work-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-border);
}

[data-theme="light"] .work-card:hover {
    box-shadow: 0 12px 32px oklch(60% 0.02 85 / 0.25);
}

/* First work card emphasis */
.work-card-link:first-child .work-card-visual {
    height: 300px;
}

.work-card-link:first-child .work-card {
    border-color: var(--color-border);
}

[data-theme="light"] .work-card-link:first-child .work-card {
    border-color: oklch(55% 0.05 330 / 0.4);
}

/* First work card emphasis — breaks identical grid pattern */
.work-card-visual {
    position: relative;
    height: 240px;
    overflow: hidden;
    --card-solid-color: oklch(18% 0.04 330);
}

.work-card-gradient {
    position: absolute;
    inset: 0;
    background: var(--card-solid-color);
}

/* First work card emphasis */
.work-card-link:first-child .work-card-visual {
    height: 300px;
}

.work-card-link:first-child .work-card {
    border-color: oklch(30% 0.06 330);
}

.work-card-link:first-child .work-card-gradient {
    --card-solid-color: oklch(22% 0.06 330);
}

/* Work card visual color variants */
.work-card-link:nth-child(1) .work-card-visual { --card-solid-color: oklch(20% 0.07 330); }
.work-card-link:nth-child(2) .work-card-visual { --card-solid-color: oklch(18% 0.06 280); }
.work-card-link:nth-child(3) .work-card-visual { --card-solid-color: oklch(16% 0.05 30); }
.work-card-link:nth-child(4) .work-card-visual { --card-solid-color: oklch(17% 0.05 330); }

[data-theme="light"] .work-card-link:nth-child(1) .work-card-visual { --card-solid-color: oklch(82% 0.04 25); }
[data-theme="light"] .work-card-link:nth-child(2) .work-card-visual { --card-solid-color: oklch(80% 0.03 300); }
[data-theme="light"] .work-card-link:nth-child(3) .work-card-visual { --card-solid-color: oklch(84% 0.03 30); }
[data-theme="light"] .work-card-link:nth-child(4) .work-card-visual { --card-solid-color: oklch(82% 0.03 25); }

[data-theme="light"] .work-card-link:first-child .work-card-gradient {
    --card-solid-color: oklch(78% 0.05 25);
}

[data-theme="light"] .work-card-icon svg {
    stroke: oklch(25% 0.04 25);
}

/* Project card icon centered in visual */
.work-card-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    opacity: 0.7;
    pointer-events: none;
}

.work-card-icon svg {
    width: 72px;
    height: 72px;
    stroke: var(--color-text-primary);
    stroke-width: 1.25;
    transition: transform 500ms cubic-bezier(0.25, 1, 0.5, 1), opacity 400ms ease;
}

.work-card:hover .work-card-icon svg {
    transform: scale(1.1);
    opacity: 0.9;
}

.work-card-link:first-child .work-card-icon svg {
    width: 88px;
    height: 88px;
}

.work-card-link:first-child .work-card:hover .work-card-icon svg {
    transform: scale(1.08);
}

.work-card-tags {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    display: flex;
    gap: var(--space-2);
    z-index: 2;
}

.work-card-tag {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-primary);
    background: oklch(0% 0 0 / 0.5);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
}

[data-theme="light"] .work-card-tag {
    background: oklch(0% 0 0 / 0.18);
}

.work-card-content {
    padding: var(--space-6);
}

.work-card-title {
    font-family: var(--font-display);
    font-size: var(--text-h4);
    font-weight: 400;
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.work-card-desc {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 300;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

.work-card-meta {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.work-card-metric {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 500;
    color: var(--color-brand-coral);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.work-card-tech {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 300;
    color: var(--color-text-muted);
}

.work-card-arrow {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 500;
    color: var(--color-brand);
    transition: color 200ms ease;
}

.work-card:hover .work-card-arrow {
    color: var(--color-brand-coral);
}

/* ========================================
   Compact Work Cards (Academic Projects)
   ======================================== */

.work-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.work-card-compact {
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    transition: all 200ms cubic-bezier(0.25, 1, 0.5, 1);
}

.work-card-compact:hover {
    transform: translateY(-4px);
    border-color: var(--color-border);
}

[data-theme="light"] .work-card-compact:hover {
    box-shadow: 0 8px 24px oklch(60% 0.02 85 / 0.2);
}

.work-card-compact .work-card-content {
    padding: var(--space-6);
}

.work-card-tags-compact {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.work-card-tag-compact {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-brand-coral);
    background: var(--color-brand-bg);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
}

/* ========================================
   Skills Section
   ======================================== */

.skills {
    padding: var(--space-24) var(--space-6);
    background: var(--color-bg-elevated);
    border-bottom: var(--divider);
    position: relative;
}

.skills::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image: radial-gradient(circle, oklch(95% 0.01 60) 1px, transparent 1px);
    background-size: 24px 24px;
}

[data-theme="light"] .skills::before {
    opacity: 0.06;
    background-image: radial-gradient(circle, oklch(20% 0.02 85) 1px, transparent 1px);
}

.skills-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-12);
}

.skills-category {
    padding: var(--space-8);
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    border-top-width: 3px;
}

.skills-category:nth-child(1) { border-top-color: var(--color-brand-coral); }
.skills-category:nth-child(2) { border-top-color: var(--color-brand); }
.skills-category:nth-child(3) { border-top-color: var(--color-brand-violet); }
.skills-category:nth-child(4) { border-top-color: var(--color-brand-coral); }

.skills-cat-title {
    font-family: var(--font-display);
    font-size: var(--text-h4);
    font-weight: 400;
    color: var(--color-text-primary);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border-subtle);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.skill-item {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 400;
    color: var(--color-text-secondary);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-subtle);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    transition: all 250ms cubic-bezier(0.25, 1, 0.5, 1);
    cursor: default;
}

.skill-item:hover {
    background: var(--color-brand-bg);
    border-color: var(--color-brand);
    color: var(--color-brand);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px oklch(50% 0.15 330 / 0.15);
}

[data-theme="light"] .skill-item:hover {
    box-shadow: 0 4px 12px oklch(30% 0.15 330 / 0.15);
}

/* ========================================
   Process Section
   ======================================== */

.process {
    padding: var(--space-24) var(--space-6);
    background: var(--color-bg);
    border-bottom: var(--divider);
}

.process-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-8);
}

.process-step {
    padding: var(--space-6);
    border-top: 1px solid var(--color-border-subtle);
    transition: border-color 200ms ease;
}

.process-step:first-child {
    border-top: none;
}

.process-step:hover {
    border-top-color: var(--color-brand);
}

.process-number {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-h1);
    font-weight: 200;
    color: var(--color-brand-violet);
    line-height: 1;
    margin-bottom: var(--space-4);
}

.process-title {
    font-family: var(--font-display);
    font-size: var(--text-h4);
    font-weight: 400;
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.process-desc {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 300;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ========================================
   Tech Grid (inside Skills section)
   ======================================== */

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-10);
}

.tech-item {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 400;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    transition: all 200ms ease;
}

.tech-item:hover {
    background: var(--color-surface-raised);
    border-color: var(--color-brand);
    color: var(--color-text-primary);
}

/* ========================================
   Connect / Social Section
   ======================================== */

.connect {
    padding: var(--space-24) var(--space-6);
    background: var(--color-accent-block);
    border-bottom: none;
}

.connect-inner {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.connect-text {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 300;
    color: var(--color-accent-block-sub);
    line-height: 1.8;
    margin-bottom: var(--space-8);
}

.connect-link {
    color: var(--color-accent-block-text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 200ms ease;
}

.connect-link:hover {
    color: var(--color-brand-coral);
}

.connect-links {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.connect-social {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 500;
    color: var(--color-accent-block-text);
    background: oklch(0% 0 0 / 0.15);
    border: 1px solid oklch(60% 0.05 25 / 0.35);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 200ms ease;
}

.connect-social:hover {
    background: oklch(0% 0 0 / 0.25);
    border-color: var(--color-brand-coral);
    transform: translateY(-1px);
}

.connect-social svg {
    color: var(--color-brand-coral);
}

/* Section tag in connect (on accent bg) */
.connect .section-tag {
    color: var(--color-accent-block-sub);
}

/* ========================================
   Contact Section
   ======================================== */

.contact {
    padding: var(--space-24) var(--space-6);
    background: var(--color-bg-elevated);
    border-bottom: var(--divider);
}

.contact-inner {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.contact-heading {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 300;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    letter-spacing: -0.015em;
}

.contact-subline {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 300;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    line-height: 1.7;
}

.contact-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: var(--space-12) var(--space-6);
    background: var(--color-bg);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-6);
}

.footer-logo-img {
    height: 28px;
    width: auto;
    display: block;
    margin-bottom: var(--space-2);
}

.footer-tagline {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 300;
    color: var(--color-text-tertiary);
}

.footer-links {
    display: flex;
    gap: var(--space-6);
}

.footer-link {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    font-weight: 400;
    color: var(--color-text-tertiary);
    text-decoration: none;
    transition: color 200ms ease;
}

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

.footer-copy {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 300;
    color: var(--color-text-muted);
}

/* ========================================
   Project Detail Page
   ======================================== */

.project-hero {
    padding: calc(var(--space-24) + 60px) var(--space-6) var(--space-16);
    position: relative;
    overflow: hidden;
}

.project-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--color-bg-elevated);
}

.project-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-bg);
    mask-image: radial-gradient(circle at 30% 70%, transparent 0%, black 60%);
    -webkit-mask-image: radial-gradient(circle at 30% 70%, transparent 0%, black 60%);
}

.project-hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
}

.project-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    margin-bottom: var(--space-8);
    transition: color 200ms ease;
}

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

.project-back svg {
    width: 16px;
    height: 16px;
}

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

.project-tag {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-brand-coral);
    background: oklch(0% 0 0 / 0.3);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
}

[data-theme="light"] .project-tag {
    background: oklch(0% 0 0 / 0.08);
    color: var(--color-brand);
}

.project-title {
    font-family: var(--font-display);
    font-size: var(--text-h1);
    font-weight: 300;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    letter-spacing: -0.015em;
    line-height: 1.15;
}

.project-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 300;
    color: var(--color-text-secondary);
    max-width: 56ch;
    line-height: 1.7;
}

.project-body {
    padding: var(--space-24) var(--space-6);
    background: var(--color-bg);
}

.project-body-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-16);
}

.project-main h2 {
    font-family: var(--font-display);
    font-size: var(--text-h3);
    font-weight: 300;
    color: var(--color-text-primary);
    margin: var(--space-12) 0 var(--space-4);
}

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

.project-main p {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 300;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-4);
}

.project-main ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-6);
}

.project-main ul li {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 300;
    color: var(--color-text-secondary);
    padding: var(--space-2) 0;
    padding-left: var(--space-6);
    position: relative;
}

.project-main ul li::before {
    content: '';
    position: absolute;
    left: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background: var(--color-brand-coral);
}

/* Project image placeholder */
.project-image {
    width: 100%;
    height: 320px;
    background: linear-gradient(135deg, var(--color-surface), var(--color-surface-raised));
    border-radius: var(--radius-lg);
    margin: var(--space-6) 0 var(--space-8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    border: 1px dashed var(--color-border);
}

.project-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.project-sidebar-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.project-sidebar-title {
    font-family: var(--font-display);
    font-size: var(--text-body-sm);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-4);
}

.project-sidebar-item {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border-subtle);
}

.project-sidebar-item:last-child {
    border-bottom: none;
}

.project-sidebar-label {
    font-family: var(--font-body);
    font-size: var(--text-caption);
    font-weight: 400;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-1);
}

.project-sidebar-value {
    font-family: var(--font-body);
    font-size: var(--text-body-sm);
    color: var(--color-text-primary);
    font-weight: 400;
}

.project-metric-highlight {
    font-family: var(--font-display);
    font-size: var(--text-h2);
    font-weight: 700;
    color: var(--color-brand-coral);
    line-height: 1.1;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    :root {
        --text-display: 3rem;
        --text-h1: 2.25rem;
        --text-h2: 1.625rem;
        --text-h3: 1.375rem;
        --text-h4: 1.1875rem;
    }

    .hero {
        padding: calc(var(--space-20) + 60px) var(--space-4) var(--space-16);
    }

    .hero-content {
        text-align: left;
    }

    .hero-headline {
        line-height: 1.15;
    }

    .hero-subline {
        font-size: var(--text-body-sm);
    }

    .hero-accent-bar {
        width: 80px;
        height: 3px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    /* Mobile hamburger menu */
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .nav-inner {
        padding: var(--space-3) var(--space-4);
    }

    .nav-logo-img {
        height: 28px;
    }

    .services-grid,
    .work-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

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

    .work-card-visual {
        height: 200px;
    }

    .work-card-link:first-child .work-card-visual {
        height: 240px;
    }

    .metrics-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .process-step {
        border-top: 1px solid var(--color-border-subtle);
        padding-top: var(--space-6);
    }

    .process-step:first-child {
        border-top: none;
        padding-top: 0;
    }

    .project-body-inner {
        grid-template-columns: 1fr;
    }

    .project-sidebar {
        position: static;
        order: -1;
    }

    .project-image {
        height: 200px;
    }

    .trusted-inner {
        flex-direction: column;
        gap: var(--space-4);
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .connect-text {
        font-size: var(--text-body-sm);
    }

    .contact-actions,
    .connect-links {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --text-display: 4.25rem;
    }

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

    .project-body-inner {
        grid-template-columns: 1fr;
    }

    .project-sidebar {
        position: static;
        order: -1;
    }
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn,
    .nav,
    .service-card,
    .work-card,
    .tech-item,
    .skill-item,
    .nav-link::after,
    .process-step {
        transition: none;
    }
}

/* ========================================
   Focus & Selection
   ======================================== */

:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

::selection {
    background: oklch(30% 0.1 330);
    color: var(--color-text-primary);
}

[data-theme="light"] ::selection {
    background: oklch(70% 0.12 330 / 0.3);
    color: oklch(20% 0.03 85);
}

/* ========================================
   Delight: Counter Pulse & Micro-interactions
   ======================================== */

@keyframes counterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.metric-number.pulse {
    animation: counterPulse 500ms cubic-bezier(0.25, 1, 0.5, 1);
}

/* Smooth color transitions for theme-aware elements */
.nav,
.hero,
.metrics,
.services,
.work,
.skills,
.process,
.tech-stack,
.connect,
.contact,
.footer,
.service-card,
.work-card,
.work-card-compact,
.skills-category,
.mobile-menu {
    transition: background-color 500ms ease, border-color 400ms ease;
}

.work-card-visual,
.project-hero-bg,
.metric-number,
.connect-text,
.connect-social,
.theme-toggle,
.lang-toggle {
    transition: background-color 400ms ease, color 300ms ease;
}
