/* CSBench — Dark Technical Theme: Core Design System */

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

:root {
    /* Backgrounds */
    --bg-primary: #0a0f1a;
    --bg-secondary: #0f1623;
    --bg-card: #141c2b;
    --bg-card-hover: #1a2438;
    --bg-surface: #111827;
    --bg-elevated: #1e293b;

    /* Primary — Teal/Cyan */
    --primary: #06d6a0;
    --primary-dim: #04b585;
    --primary-glow: rgba(6, 214, 160, 0.12);
    --primary-border: rgba(6, 214, 160, 0.2);

    /* Secondary — Ocean Blue */
    --secondary: #38bdf8;
    --secondary-dim: #0ea5e9;

    /* Accent — Warm Gold */
    --accent: #ffd166;
    --accent-dim: #e6b84d;

    /* Semantic */
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #ef476f;
    --info: #38bdf8;

    /* Text */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(6, 214, 160, 0.18);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px rgba(6, 214, 160, 0.08);

    /* Layout */
    --max-width: 1100px;
    --max-width-wide: 1280px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* Transitions */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --t-fast: 0.15s var(--ease);
    --t-base: 0.3s var(--ease);
    --t-slow: 0.5s var(--ease);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Subtle grid noise background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(6, 214, 160, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 214, 160, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   Typography
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.1rem);
}

h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

em {
    color: var(--primary);
    font-style: normal;
    font-weight: 500;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--t-fast);
}

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

code {
    background: rgba(6, 214, 160, 0.07);
    padding: 0.12rem 0.35rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--primary);
    border: 1px solid var(--primary-border);
}

::selection {
    background: rgba(6, 214, 160, 0.25);
    color: #fff;
}

/* ========================================
   Layout
   ======================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* ========================================
   Section
   ======================================== */
section {
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    border-bottom: none;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
    border-radius: 1px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }
}

/* ========================================
   Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: var(--text-inverse);
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
}

.skip-to-content:focus {
    top: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}