/* ============================================
   PhysicsLab 3D - Documentacion Tecnica
   Version Mejorada - Estilo Premium Dark
   ============================================ */

/* --- Variables de Diseño --- */
:root {
    /* Colores primarios */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-glow: rgba(59, 130, 246, 0.4);

    /* Colores de acento */
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.4);

    /* Colores de estado */
    --success: #10b981;
    --success-dim: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Fondos */
    --bg-dark: #0b1120;
    --bg-darker: #070c18;
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-card-solid: #1e293b;
    --bg-glass: rgba(15, 23, 42, 0.7);
    --bg-hover: rgba(51, 65, 85, 0.5);

    /* Texto */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    /* Bordes y sombras */
    --border: rgba(148, 163, 184, 0.15);
    --border-hover: rgba(59, 130, 246, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.15);

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(59,130,246,0.2) 0%, rgba(139,92,246,0.2) 100%);
    --gradient-text: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--accent-light) 100%);

    /* Tipografia */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Espaciado */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transiciones */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

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

ul {
    list-style: none;
}

/* --- Utilidades --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* --- Animacion de entrada --- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   NAVEGACION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-base);
    padding: 0;
}

.navbar.scrolled {
    background: rgba(11, 17, 32, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: box-shadow var(--transition-base);
}

.logo:hover .logo-icon {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-light);
    background: rgba(59, 130, 246, 0.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform var(--transition-base);
}

.nav-links a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Nav CTA */
.nav-cta {
    background: var(--gradient-primary);
    color: white;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 72px;
}

.hero-bg-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    top: -10%;
    right: -10%;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    bottom: -10%;
    left: -5%;
    animation: orbFloat 10s ease-in-out infinite reverse;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -20px) scale(1.05); }
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-light);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 28px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    width: fit-content;
}

/* Hero Text */
.hero h1 {
    margin-bottom: 24px;
}

.title-line {
    display: block;
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.title-line.highlight {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 540px;
}

/* Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 40px;
}

.stat {
    text-align: center;
    padding: 0 28px;
}

.stat-number {
    display: block;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-number.infinity {
    font-size: 3rem;
    line-height: 0.9;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 8px;
    font-weight: 500;
}

.stat-separator {
    width: 1px;
    height: 50px;
    background: var(--border);
}

/* CTA Buttons */
.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-primary);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-primary svg {
    transition: transform var(--transition-base);
}

.btn-primary:hover svg {
    transform: translateX(3px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1.5px solid var(--border);
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(59, 130, 246, 0.05);
}

.btn-secondary svg {
    transition: transform var(--transition-base);
}

.btn-secondary:hover svg {
    transform: translate(2px, -2px);
}

/* Hero Visual - Code Window */
.hero-visual {
    position: relative;
    height: 480px;
}

.floating-card {
    position: relative;
    width: 100%;
    height: 100%;
}

.code-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 420px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    backdrop-filter: blur(10px);
    z-index: 2;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--border);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #f59e0b; }
.code-dot.green { background: #10b981; }

.code-title {
    margin-left: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.code-body {
    padding: 20px;
    overflow-x: auto;
}

.code-body pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
}

.code-comment { color: #6b7280; font-style: italic; }
.code-keyword { color: #c084fc; }
.code-var { color: #60a5fa; }
.code-func { color: #fbbf24; }
.code-num { color: #f472b6; }

/* Floating Badges */
.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    z-index: 3;
}

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

.badge-dot.green {
    background: var(--success);
}

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

.badge-1 {
    top: 10%;
    right: -5%;
    animation: floatBadge 6s ease-in-out infinite;
}

.badge-2 {
    bottom: 15%;
    left: -10%;
    animation: floatBadge 7s ease-in-out infinite reverse;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    animation: fadeInUp 1s ease 1.5s both;
}

.scroll-mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-dim);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--text-dim);
    border-radius: 2px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.3; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================
   SECCIONES GENERALES
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-full);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section-desc {
    font-size: 1.0625rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

.section-desc.light {
    color: var(--text-dim);
}

/* ============================================
   INTRO SECTION
   ============================================ */
.intro-section {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    position: relative;
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.intro-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    text-align: center;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.intro-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.intro-card:hover::before {
    transform: scaleX(1);
}

.intro-icon-wrapper {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    background: var(--gradient-glow);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.intro-card:hover .intro-icon-wrapper {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.intro-icon {
    font-size: 2rem;
    line-height: 1;
}

.intro-card h3 {
    font-size: 1.25rem;
    margin-bottom: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.intro-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.card-arrow {
    margin-top: 24px;
    color: var(--text-dim);
    transition: all var(--transition-base);
    display: flex;
    justify-content: center;
}

.intro-card:hover .card-arrow {
    color: var(--primary-light);
    transform: translate(4px, -4px);
}

/* ============================================
   DEVELOPMENT SECTION
   ============================================ */
.development-section {
    padding: 120px 0;
    background: var(--bg-darker);
    position: relative;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--accent), transparent);
    opacity: 0.4;
}

.timeline-item {
    display: flex;
    margin-bottom: 60px;
    position: relative;
    padding-left: 100px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 16px;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px var(--bg-darker), 0 0 0 8px rgba(59, 130, 246, 0.3);
    z-index: 2;
    flex-shrink: 0;
}

.marker-number {
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    font-family: var(--font-mono);
}

.timeline-content {
    flex: 1;
}

.timeline-phase {
    display: inline-block;
    background: var(--gradient-glow);
    color: var(--primary-light);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.timeline-content h3 {
    font-size: 1.375rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 0.9375rem;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

/* Architecture Diagram */
.architecture-diagram {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.arch-layer {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    width: 100%;
    max-width: 300px;
}

.arch-icon {
    color: var(--primary-light);
    display: flex;
}

.arch-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.arch-info span {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.arch-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 32px;
    position: relative;
}

.arch-arrow-line {
    width: 2px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    opacity: 0.5;
}

.arch-arrow-head {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--accent);
    opacity: 0.5;
}

/* Code Block in Timeline */
.code-block {
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    margin-top: 16px;
    overflow: hidden;
}

.code-lang {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-light);
    padding: 6px 16px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
}

.code-block pre {
    padding: 20px;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-x: auto;
}

/* Tech Preview (Vectors) */
.tech-preview {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.preview-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Metrics Row */
.metrics-row {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.mini-metric {
    text-align: center;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    min-width: 90px;
}

.mini-metric strong {
    display: block;
    font-size: 1.25rem;
    color: var(--primary-light);
    font-family: var(--font-mono);
    margin-bottom: 4px;
}

.mini-metric span {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   TECH SECTION
   ============================================ */
.tech-section {
    padding: 120px 0;
    background: var(--bg-dark);
    position: relative;
}

.tech-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tech-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.08), transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.tech-card:hover .tech-glow {
    opacity: 1;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.tech-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.tech-card:hover::before {
    transform: scaleX(1);
}

.tech-card.featured {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
}

.featured-ribbon {
    position: absolute;
    top: 16px;
    right: -30px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 32px;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tech-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: white;
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tech-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tech-card h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.tech-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.tech-tags span {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-light);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Tech Integrations */
.tech-integrations {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.tech-integrations::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.tech-integrations h3 {
    text-align: center;
    margin-bottom: 36px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.integration-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.integration-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
}

.integration-item:hover {
    border-color: var(--border-hover);
    background: rgba(15, 23, 42, 0.6);
    transform: translateY(-2px);
}

.integration-icon {
    color: var(--primary);
    flex-shrink: 0;
    display: flex;
}

.integration-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.integration-name {
    font-family: var(--font-mono);
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.875rem;
}

.integration-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================
   PHYSICS SECTION
   ============================================ */
.physics-section {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    position: relative;
}

.physics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.physics-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.physics-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.physics-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.physics-card:hover::before {
    transform: scaleX(1);
}

.physics-card.wide {
    grid-column: span 3;
    padding: 0;
    overflow: hidden;
}

.formula-header {
    margin-bottom: 20px;
}

.formula-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-mono);
}

.formula-box {
    text-align: center;
    margin-bottom: 20px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: var(--radius);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.formula-box.compact {
    margin-bottom: 0;
    flex-shrink: 0;
    min-width: 260px;
}

.formula {
    display: block;
    font-family: 'Times New Roman', 'Georgia', serif;
    font-size: 2rem;
    font-style: italic;
    color: var(--primary-light);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.formula sub {
    font-size: 0.6em;
    font-style: normal;
}

.formula-name {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    font-style: normal;
}

.physics-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Wide card layout */
.wide-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0;
    align-items: stretch;
}

.wide-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    border-left: 1px solid var(--border);
}

.wide-body p {
    margin-bottom: 0;
}

/* Implementation Detail */
.implementation-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(16, 185, 129, 0.08);
    padding: 14px 18px;
    border-radius: var(--radius);
    border-left: 3px solid var(--success);
}

.detail-icon {
    display: flex;
    flex-shrink: 0;
}

.implementation-detail strong {
    color: var(--success);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 2px;
}

.implementation-detail code {
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-size: 0.875rem;
    background: rgba(15, 23, 42, 0.5);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Variables List */
.variables-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.variable {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.var-name {
    font-family: var(--font-mono);
    color: var(--primary-light);
    font-weight: 600;
    font-size: 1rem;
}

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

.var-slider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.var-slider-track {
    flex: 1;
    height: 6px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.var-slider-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.var-slider-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary-light);
    font-weight: 600;
    min-width: 36px;
}

/* Physics Demo - Force Diagram */
.physics-demo {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.physics-demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.physics-demo h3 {
    margin-bottom: 40px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.force-diagram-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.force-diagram {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diagram-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.grid-line {
    position: absolute;
    background: var(--border);
}

.grid-line.horizontal {
    left: 0;
    right: 0;
    height: 1px;
}

.grid-line.horizontal:nth-child(1) { top: 33%; }
.grid-line.horizontal:nth-child(2) { top: 66%; }

.grid-line.vertical {
    top: 0;
    bottom: 0;
    width: 1px;
}

.grid-line.vertical:nth-child(3) { left: 33%; }
.grid-line.vertical:nth-child(4) { left: 66%; }

.diagram-object {
    width: 72px;
    height: 72px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    z-index: 2;
    position: relative;
}

/* Force Vectors */
.force-vector {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
}

.vector-line {
    width: 3px;
    background: var(--vector-color);
    border-radius: 2px;
}

.vector-arrow {
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
}

.vector-label {
    position: absolute;
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    color: var(--vector-color);
    white-space: nowrap;
    background: var(--bg-dark);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--vector-color);
    font-weight: 600;
}

/* Vector Positions */
.force-vector.applied {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.force-vector.applied .vector-line { height: 60px; }
.force-vector.applied .vector-arrow { border-bottom: 10px solid var(--vector-color); }
.force-vector.applied .vector-label { top: -30px; }

.force-vector.gravity {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.force-vector.gravity .vector-line { height: 50px; }
.force-vector.gravity .vector-arrow { border-top: 10px solid var(--vector-color); }
.force-vector.gravity .vector-label { bottom: -30px; }

.force-vector.friction {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    flex-direction: row;
}

.force-vector.friction .vector-line {
    width: 50px;
    height: 3px;
}

.force-vector.friction .vector-arrow {
    border-right: 10px solid var(--vector-color);
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: none;
}

.force-vector.friction .vector-label {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Force Legend */
.force-legend {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ============================================
   GALLERY SECTION
   ============================================ */
.gallery-section {
    padding: 120px 0;
    background: var(--bg-darker);
    position: relative;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 20px;
}

.gallery-item {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-slow);
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px;
    background: linear-gradient(transparent 0%, rgba(7, 12, 24, 0.95) 100%);
    transform: translateY(100%);
    transition: transform var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.overlay-icon {
    color: var(--primary-light);
    margin-bottom: 12px;
    display: flex;
}

.gallery-overlay h4 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.125rem;
    font-weight: 600;
}

.gallery-overlay p {
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* ============================================
   AUTHORS SECTION
   ============================================ */
.authors-section {
    padding: 120px 0;
    background: var(--bg-dark);
    position: relative;
}

.authors-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.author-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.author-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.author-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.author-card:hover::before {
    transform: scaleX(1);
}

.author-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.author-avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.author-meta h3 {
    font-size: 1.375rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 600;
}

.author-role {
    display: block;
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.author-id {
    display: block;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
}

.author-card > p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.9375rem;
}

.author-contributions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contrib-tag {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-light);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Project Meta */
.project-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 36px 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.project-meta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.meta-item {
    text-align: center;
    padding: 0 40px;
}

.meta-separator {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.meta-label {
    display: block;
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    font-weight: 500;
}

.meta-value {
    display: block;
    font-size: 1.0625rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    padding: 4px 0;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

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

.footer-link:hover::after {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.footer-disclaimer {
    margin-top: 8px;
    font-size: 0.75rem;
    opacity: 0.6;
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* --- Tablets (max-width: 1024px) --- */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-subtitle {
        max-width: 600px;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .title-line {
        font-size: 2.75rem;
    }

    .intro-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

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

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

    .physics-card.wide {
        grid-column: span 1;
    }

    .wide-content {
        grid-template-columns: 1fr;
    }

    .wide-body {
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }

    .gallery-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .authors-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto 60px;
    }

    .project-meta {
        flex-wrap: wrap;
        gap: 20px;
    }

    .meta-separator {
        display: none;
    }

    .meta-item {
        padding: 0 20px;
    }

    /* Timeline: modo linea vertical izquierda */
    .timeline-line {
        left: 24px;
    }

    .timeline-item {
        padding-left: 80px;
    }

    .timeline-marker {
        left: 0;
        width: 48px;
        height: 48px;
    }

    .integration-list {
        grid-template-columns: 1fr;
    }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {
    /* Navbar mobile */
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(11, 17, 32, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        gap: 0;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-links.is-open {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.125rem;
        padding: 16px 24px;
        width: 100%;
        text-align: center;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    /* Hero */
    .title-line {
        font-size: 2.25rem;
    }

    .hero {
        min-height: auto;
        padding-top: 72px;
    }

    .hero-content {
        padding: 50px 20px;
    }

    .stat-number {
        font-size: 2.25rem;
    }

    .hero-stats {
        gap: 0;
    }

    .stat {
        padding: 0 20px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    /* Grid adjustments */
    .tech-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto 60px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }

    .gallery-item.large,
    .gallery-item.wide {
        grid-column: span 1;
    }

    /* Physics */
    .formula {
        font-size: 1.625rem;
    }

    .physics-demo {
        padding: 32px 20px;
    }

    .force-diagram-container {
        flex-direction: column;
        gap: 30px;
    }

    /* Timeline */
    .timeline-line {
        left: 16px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
        left: -4px;
    }

    .marker-number {
        font-size: 0.75rem;
    }

    /* Author cards */
    .author-header {
        flex-direction: column;
        text-align: center;
    }

    .author-card {
        text-align: center;
        padding: 28px;
    }

    .author-contributions {
        justify-content: center;
    }

    /* Project meta */
    .project-meta {
        padding: 28px;
    }

    .meta-item {
        padding: 0 16px;
    }

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

    .footer-brand {
        max-width: 100%;
    }

    .footer-brand .logo {
        justify-content: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    /* Tech integrations */
    .tech-integrations {
        padding: 32px 24px;
    }

    .integration-item {
        padding: 18px;
    }

    /* Scroll indicator */
    .scroll-indicator {
        display: none;
    }

    /* Gallery overlay always visible on touch */
    .gallery-overlay {
        transform: translateY(0);
        background: linear-gradient(transparent 30%, rgba(7, 12, 24, 0.95) 100%);
        padding: 20px;
    }

    .gallery-overlay h4 {
        font-size: 1rem;
    }

    .gallery-overlay p {
        font-size: 0.75rem;
    }
}

/* --- Small Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
    .title-line {
        font-size: 1.875rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.625rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.875rem;
        width: 100%;
        justify-content: center;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .badge {
        font-size: 0.6875rem;
        padding: 6px 14px;
    }

    .stat {
        padding: 0 12px;
    }

    .stat-number {
        font-size: 1.875rem;
    }

    .container {
        padding: 0 16px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .intro-section,
    .development-section,
    .tech-section,
    .physics-section,
    .gallery-section,
    .authors-section {
        padding: 80px 0;
    }

    .author-card,
    .intro-card,
    .tech-card,
    .physics-card {
        padding: 24px 20px;
    }

    .gallery-grid {
        grid-auto-rows: 180px;
        gap: 12px;
    }

    .project-meta {
        gap: 20px;
    }

    .meta-item {
        min-width: 45%;
    }

    .physics-demo {
        padding: 24px 16px;
    }

    .force-diagram {
        width: 240px;
        height: 240px;
    }

    .code-window {
        display: none;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-animate] {
        opacity: 1;
        transform: none;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .hero-visual,
    .scroll-indicator,
    .hero-cta,
    .nav-cta,
    .nav-toggle,
    .footer-links {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        min-height: auto;
        padding: 40px 0;
    }

    section {
        padding: 40px 0 !important;
        page-break-inside: avoid;
    }

    .author-card,
    .intro-card,
    .tech-card,
    .physics-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}
