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

/* ============================================
   XIBALBA SOLUTIONS — DESIGN SYSTEM v2.0
   Mobile-First · Dark Obsidian · Raleway
   ============================================ */

:root {
    /* Color System */
    --color-brand-primary: #00F2FF;
    --color-brand-primary-glow: rgba(0, 242, 255, 0.2);
    --color-brand-primary-dim: rgba(0, 242, 255, 0.08);
    --color-brand-secondary: #7000FF;
    --color-brand-secondary-glow: rgba(112, 0, 255, 0.25);
    --color-brand-accent: #00E5FF;
    --color-success: #00FF88;
    --color-warning: #FFD600;
    --color-error: #FF0055;

    /* Surfaces */
    --bg-body: #050508;
    --bg-surface: #0a0a0f;
    --bg-card: rgba(10, 10, 15, 0.7);
    --bg-card-hover: rgba(0, 242, 255, 0.04);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-blur: blur(24px);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-main: rgba(255, 255, 255, 0.07);
    --border-bright: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(0, 242, 255, 0.25);

    /* Text */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-dim: #475569;

    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* Spacing */
    --nav-h: 80px;
    --container-max: 1280px;
    --section-pad: 8rem;

    /* Transitions */
    --t-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --t-fast: all 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
    --glow-primary: 0 0 20px var(--color-brand-primary-glow);
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Subtle ambient gradient */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 0% 0%, var(--color-brand-secondary-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, var(--color-brand-primary-glow) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

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

h1 { font-size: 2.5rem; margin-bottom: 1.25rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p {
    color: var(--text-secondary);
    line-height: 1.75;
    font-weight: 400;
    margin-bottom: 1rem;
}

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

a:hover {
    opacity: 0.85;
}

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

.gradient-text {
    background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.meta-label {
    display: inline-block;
    color: var(--color-brand-primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

/* ── Utility ── */
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-error { color: var(--color-error) !important; }
.text-primary-gradient { 
    background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Layout ── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

section {
    padding: var(--section-pad) 0;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-main);
    margin: 0;
}

/* ── Navigation ── */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-h);
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    transition: var(--t-fast);
}

nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
    border-bottom-color: var(--border-main);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.logo img {
    height: 72px;
    filter: drop-shadow(0 0 8px var(--color-brand-primary-glow));
    transition: var(--t-smooth);
}

.logo img:hover {
    filter: drop-shadow(0 0 16px var(--color-brand-primary-glow));
}

.nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 5rem 1.5rem 2rem;
    gap: 0.25rem;
    border-left: 1px solid var(--border-main);
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.nav-links.active {
    display: flex;
    right: 0;
}

.nav-links a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: var(--t-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-brand-primary);
    background: var(--color-brand-primary-dim);
}

.nav-social {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 1rem;
    margin-top: auto;
    border-top: 1px solid var(--border-main);
}

.nav-social a {
    color: var(--text-muted);
    transition: var(--t-fast);
}

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

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--t-fast);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.nav-overlay.active {
    display: block;
}

/* ── Hero Section ── */
.hero {
    padding: calc(var(--nav-h) + 6rem) 0 6rem;
    text-align: center;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 20%; left: 50%;
    width: 800px; height: 800px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--color-brand-secondary-glow) 0%, transparent 70%);
    z-index: -1;
    opacity: 0.5;
    filter: blur(60px);
}

.hero-logo-container {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-logo-main {
    max-height: 450px;
    width: auto;
    filter: drop-shadow(0 0 60px rgba(0, 242, 255, 0.1));
    transition: var(--t-smooth);
    z-index: 2;
}

.hero-logo-main:hover {
    transform: scale(1.02) rotate(1deg);
    filter: drop-shadow(0 0 80px rgba(0, 242, 255, 0.2));
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

.hero-badge {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--border-main);
    border-radius: 100px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.02);
}

/* Hero Status Bar */
.hero-status-bar {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-main);
    border-radius: 100px;
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-success);
    animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* ── Page Header (sub-pages) ── */
.page-header {
    padding: calc(var(--nav-h) + 5rem) 0 4rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.page-header p {
    max-width: 600px;
    margin: 0 auto;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-secondary) 100%);
    color: #fff;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--t-smooth);
    box-shadow: 0 8px 32px rgba(112, 0, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 242, 255, 0.3);
}

.btn-outline {
    display: inline-block;
    padding: 0.95rem 2.3rem;
    background: transparent;
    border: 1px solid var(--border-bright);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--t-smooth);
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--color-brand-primary);
    background: rgba(0, 242, 255, 0.05);
    color: var(--color-brand-primary);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.btn-sm {
    padding: 0.6rem 1.4rem;
    font-size: 0.8rem;
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-main);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--t-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.card:hover {
    border-color: var(--border-accent);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 0 20px var(--color-brand-primary-dim);
    background: var(--bg-card-hover);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1.25rem;
    display: block;
}

.card h3 {
    margin-bottom: 0.75rem;
}

.card p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.card-link {
    color: var(--color-brand-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
}

.card-link:hover {
    opacity: 0.8;
}

/* Card Grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-card.featured {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--t-smooth);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 30px var(--color-brand-primary-dim);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-icon {
    font-size: 2.5rem;
}

.project-visual img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-main);
    box-shadow: var(--shadow-md);
}

.project-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.link-glow {
    color: var(--color-brand-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--t-fast);
}

.link-glow:hover {
    text-shadow: 0 0 10px var(--color-brand-primary-glow);
    letter-spacing: 0.02em;
}

/* ── Feature Grid ── */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 640px) and (max-width: 991px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    padding: 2.5rem;
    border-radius: 24px;
    transition: var(--t-smooth);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.feature-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Terminal Window */
.terminal-window {
    background: #050508;
    border: 1px solid var(--border-bright);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    font-family: var(--font-mono);
}

.terminal-header {
    background: rgba(255,255,255,0.05);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-main);
}

.terminal-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-header .dot:nth-child(1) { background: #ff5f56; }
.terminal-header .dot:nth-child(2) { background: #ffbd2e; }
.terminal-header .dot:nth-child(3) { background: #27c93f; }

.terminal-title {
    margin-left: 1rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.terminal-content {
    padding: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.7;
}

.code-comment { color: var(--text-muted); }
.code-key { color: var(--color-brand-primary); }
.code-val { color: var(--color-success); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 3rem 0;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 16px;
    transition: var(--t-smooth);
}

.stat-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--color-brand-primary);
    margin-bottom: 0.25rem;
    display: block;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

/* Visual Frame */
.visual-frame {
    position: relative;
    border-radius: 24px;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
    border: 1px solid var(--border-main);
}

.frame-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(5, 5, 8, 0.4));
    pointer-events: none;
    border-radius: 24px;
}

/* ── Image Showcase ── */
.showcase-img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-main);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    transition: var(--t-smooth);
}

.showcase-img:hover {
    transform: scale(1.01);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* ── Split Layout ── */
.split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.split.reversed {
    direction: ltr;
}

/* ── Code Block ── */
.code-block {
    background: #000;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-main);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-success);
    overflow-x: auto;
    line-height: 1.6;
}

/* ── Category Tag ── */
.tag {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    background: var(--color-brand-primary-dim);
    color: var(--color-brand-primary);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tag-success { background: rgba(0,255,136,0.08); color: var(--color-success); border-color: rgba(0,255,136,0.2); }
.tag-warning { background: rgba(255,214,0,0.08); color: var(--color-warning); border-color: rgba(255,214,0,0.2); }
.tag-error { background: rgba(255,0,85,0.08); color: var(--color-error); border-color: rgba(255,0,85,0.2); }

/* ── Metric Cards ── */
.metric-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: -4rem; /* Overlap with hero */
    position: relative;
    z-index: 10;
}

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

.metric-card {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(15, 15, 24, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-main);
    border-radius: 20px;
    transition: var(--t-smooth);
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, var(--color-brand-primary-glow) 0%, transparent 70%);
    opacity: 0;
    transition: var(--t-smooth);
    pointer-events: none;
}

.metric-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-brand-primary);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 20px var(--color-brand-primary-dim);
}

.metric-card:hover::after {
    opacity: 1;
}

.metric-value {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    font-family: var(--font-primary);
    line-height: 1;
}

.metric-label {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.metric-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.metric-trend {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
}

.metric-footer {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1.25rem;
    display: flex;
    justify-content: center;
}

.metric-status {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

/* ── Tier Cards ── */
.tier-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-main);
    border-radius: 16px;
    transition: var(--t-smooth);
}

.tier-card:hover {
    transform: translateY(-2px);
}

.tier-badge {
    font-size: 1.5rem;
    font-weight: 900;
    min-width: 60px;
    text-align: center;
}

/* ── Detail List ── */
.detail-list {
    list-style: none;
    padding: 0;
}

.detail-list li {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.7;
}

.detail-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-brand-primary);
    font-weight: bold;
}

/* ── CTA Section ── */
.cta-section {
    text-align: center;
    padding: 5rem 0;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 600px; height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--color-brand-primary-glow) 0%, transparent 70%);
    z-index: -1;
}

/* ── Animations ── */
.animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
/* ── Blog Sections ── */
.blog-hub {
    padding-bottom: var(--section-pad);
}

.featured-post {
    margin-bottom: 4rem;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 32px;
    padding: 3rem;
    align-items: center;
    box-shadow: 0 0 40px var(--color-brand-primary-dim);
}

@media (min-width: 992px) {
    .featured-card {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.featured-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

/* Article Styling */
.progress-bar-container {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 999;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-brand-primary), var(--color-brand-secondary));
    transition: width 0.1s ease;
}

.article-header {
    padding: calc(var(--nav-h) + 6rem) 0 4rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.article-header h1 {
    font-size: 4rem;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

.reading-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.5rem 8rem;
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-content h2 {
    margin: 3.5rem 0 1.5rem;
    color: var(--text-primary);
    font-size: 2rem;
}

.article-content p {
    margin-bottom: 1.75rem;
}

.article-content ul, .article-content ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.75rem;
}

.article-content blockquote {
    border-left: 4px solid var(--color-brand-primary);
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    margin: 3rem 0;
    border-radius: 0 16px 16px 0;
    font-style: italic;
    font-size: 1.25rem;
}

.author-section {
    margin-top: 6rem;
    padding: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 24px;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-secondary));
    flex-shrink: 0;
}

.author-info h4 {
    margin-bottom: 0.5rem;
}

.author-info p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 242, 255, 0.05); }
    50% { box-shadow: 0 0 40px rgba(0, 242, 255, 0.1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ── Footer ── */
footer {
    background: #050508;
    border-top: 1px solid var(--border-main);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo img {
    height: 72px;
    filter: drop-shadow(0 0 8px var(--color-brand-primary-glow));
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 360px;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-column h4 {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--t-fast);
}

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

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 72px;
    border: 1px solid var(--border-main);
    border-radius: 8px;
    color: var(--text-muted);
    transition: var(--t-fast);
}

.footer-social a:hover {
    border-color: var(--color-brand-primary);
    color: var(--color-brand-primary);
    background: var(--color-brand-primary-dim);
}

.footer-social a svg {
    width: 16px;
    height: 16px;
}

.footer-bottom {
    max-width: var(--container-max);
    margin: 3rem auto 0;
    padding: 1.5rem 1.25rem 0;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin: 0;
}

/* ── Table ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    overflow-x: auto;
    display: block;
}

.data-table th {
    color: var(--color-brand-primary);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--border-main);
}

.data-table td {
    padding: 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.data-table tr:hover td {
    background: var(--glass-bg);
}

/* ── Scroll indicator ── */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: float 2s ease-in-out infinite;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
}

/* ── Tech Spec Box ── */
.tech-spec {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-main);
    padding: 2rem;
    border-radius: 16px;
    margin-top: 2rem;
}

.tech-spec h4 {
    color: var(--color-brand-primary);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    font-weight: 800;
}

/* ── Callout Box ── */
.callout {
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-main);
    margin: 2rem 0;
}

.callout-cyan {
    background: rgba(0, 242, 255, 0.03);
    border-color: rgba(0, 242, 255, 0.15);
}

.callout-violet {
    background: rgba(112, 0, 255, 0.03);
    border-color: rgba(112, 0, 255, 0.15);
}

/* ── Math Block ── */
.math-block {
    background: rgba(0, 242, 255, 0.03);
    border: 1px solid rgba(0, 242, 255, 0.15);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 2rem 0;
    overflow-x: auto;
}

/* ══════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════ */

/* Tablet: 600px+ */
@media (min-width: 600px) {
    html { font-size: 17px; }

    .container { padding: 0 2rem; }

    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }

    .hero h1 { font-size: 3.5rem; }

    .hero-logo-main { max-height: 480px; }

    .card-grid { grid-template-columns: repeat(2, 1fr); }

    .feature-grid { grid-template-columns: repeat(2, 1fr); }

    .metric-grid { grid-template-columns: repeat(3, 1fr); }

    .stats-row { grid-template-columns: repeat(4, 1fr); }

    .page-header h1 { font-size: 3.25rem; }

    .footer-container {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* Desktop: 900px+ */
@media (min-width: 900px) {
    html { font-size: 18px; }

    :root {
        --section-pad: 7rem;
        --nav-h: 80px;
    }

    .container { padding: 0 2rem; }

    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }

    .hero {
        padding: calc(var(--nav-h) + 6rem) 0 6rem;
    }

    .hero h1 { font-size: 4.5rem; }

    .hero p { font-size: 1.25rem; max-width: 700px; }

    .hero-logo-main { max-height: 600px; }

    .page-header {
        padding: calc(var(--nav-h) + 7rem) 0 5rem;
    }

    .page-header h1 { font-size: 4rem; }

    .page-header p { max-width: 700px; }

    /* Desktop nav */
    .hamburger { display: none; }

    .nav-links {
        display: flex;
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        gap: 0.5rem;
        border: none;
        overflow: visible;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.5rem 0.9rem;
    }

    .nav-social {
        border-top: none;
        padding: 0;
        margin-top: 0;
        margin-left: 0.5rem;
    }

    .nav-overlay { display: none !important; }

    /* Split layouts */
    .split { grid-template-columns: 1fr 1fr; gap: 5rem; }

    .split.reversed .split-content { order: 2; }
    .split.reversed .split-media { order: 1; }

    .card-grid { grid-template-columns: repeat(3, 1fr); }

    .feature-grid { grid-template-columns: repeat(3, 1fr); }

    .footer-container {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 4rem;
    }

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

/* Large Desktop: 1200px+ */
@media (min-width: 1200px) {
    .hero h1 { font-size: 5rem; }

    .page-header h1 { font-size: 4.5rem; }
}

/* ── Utility Classes ── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.relative { position: relative; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mt-8 { margin-top: 4rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }
.mb-8 { margin-bottom: 4rem; }
.pt-4 { padding-top: 2rem; }
.pb-4 { padding-bottom: 2rem; }

/* ── Mermaid Override (if still used) ── */
.mermaid {
    background: rgba(0, 0, 0, 0.4) !important;
    border-radius: 12px;
    padding: 2rem !important;
    margin: 2rem 0 !important;
    font-family: var(--font-primary) !important;
}

.mermaid svg {
    max-width: 100% !important;
    height: auto !important;
}
/* ── Institutional Components ── */
.institutional-section {
    background: rgba(112, 0, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.institutional-section::after {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 60%; height: 200%;
    background: radial-gradient(circle, var(--color-brand-primary-dim) 0%, transparent 70%);
    transform: rotate(-15deg);
    z-index: 0;
    pointer-events: none;
}

.split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

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

.split-content h2 {
    margin-bottom: 1.5rem;
}

.visual-frame {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.visual-frame::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(to bottom, var(--color-brand-primary), var(--color-brand-secondary));
}

.mermaid-v8 {
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
}
/* ── Full Width Stats ── */
.full-width-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 4rem;
    width: 100%;
}

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

.full-width-stats .stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border-main);
    border-radius: 24px;
    transition: var(--t-smooth);
}

.full-width-stats .stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--color-brand-primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--color-brand-primary-dim);
}

.full-width-stats .stat-value {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.full-width-stats .stat-label {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}
