/**
 * ==============================================================================
 * HOJA DE ESTILOS PRINCIPAL (styles.css)
 * ==============================================================================
 * Autor: Sandra Puerto
 * Estilo: Dark Premium (Autoridad Tranquila)
 * 
 * ÍNDICE (Table of Contents):
 * 1. VARIABLES & DESIGN TOKENS (Paleta de colores, tipografía, espaciado)
 * 2. RESET & BASE (Configuración global del HTML/Body)
 * 3. TYPOGRAPHY (Títulos, párrafos, degradados)
 * 4. LAYOUT & UTILITIES (Contenedores, paneles tipo Glassmorphism)
 * 5. COMPONENTS (Navbar, Hero, Grid de Métricas, Acordeón FAQ, etc.)
 * 6. ANIMATIONS (Animaciones por CSS para LCP, Fade-up, Marquee)
 * ==============================================================================
 */

/* =========================================
   1. VARIABLES & DESIGN TOKENS
   ========================================= */
   :root {
    /* Colors - Deep, rich dark theme */
    --bg-base: #030712; 
    --bg-glass: rgba(17, 24, 39, 0.4);
    --bg-glass-hover: rgba(31, 41, 55, 0.6);
    
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #94a3b8;
    
    --accent: #38bdf8; 
    --accent-glow: rgba(56, 189, 248, 0.5);
    --accent-secondary: #818cf8; 
    --emerald: #10b981;
    --emerald-light: #34d399;
    
    --border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);

    /* Typography */
    --font-heading: 'Outfit', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
    
    /* Responsive Spacing Base (Mobile First - Compacted) */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 2.5rem;
    --space-xxl: 3.5rem;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
    :root {
        /* Desktop Spacing - Compacted for less scroll */
        --space-lg: 2rem;
        --space-xl: 3.5rem;
        --space-xxl: 5rem;
    }
}

/* =========================================
   RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Effects */
#noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.ambient-glow {
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
}

.glow-1 {
    top: -20%;
    left: -10%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

.glow-2 {
    bottom: -10%;
    right: -20%;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    margin-bottom: var(--space-sm);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: 1.15rem;
    margin-bottom: var(--space-xs);
    font-weight: 600;
}

p {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 300;
}

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

/* =========================================
   LAYOUT & UTILITIES
   ========================================= */
.container {
    /* WIDER CONTAINER: Utilize physical screen space */
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-lg) 0; /* Reduced padding between sections */
}

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

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: var(--border-highlight);
    background: var(--bg-glass-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* =========================================
   COMPONENTS
   ========================================= */

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0.8rem 0;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--text-primary);
}

.logo .dot {
    color: var(--accent);
}

.nav-links {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-smooth);
}

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

@media (min-width: 900px) {
    .nav-links {
        display: flex;
    }
}

.btn-nav, .btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-nav, .btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-base);
}

/* Variante de CTA principal (Descargar CV) */
.btn-primary.btn-accent {
    background-color: var(--accent);
    color: #070d19;
    font-weight: 700;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-nav:hover, .btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-nav:hover, .btn-primary:hover {
    background-color: var(--accent);
    color: #fff;
}

.btn-primary.btn-accent:hover {
    color: #070d19;
}

.btn-secondary:hover {
    background-color: var(--bg-glass-hover);
    border-color: var(--border-highlight);
    color: #fff;
}

.nav-icon {
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    padding: 0.4rem;
}
.nav-icon:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    /* COMPACTED HERO */
    padding: 8rem 0 4rem 0;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh; /* Reduced height to pull content up */
}

@media (min-width: 768px) {
    .hero {
        padding: 9rem 0 5rem 0;
    }
}

.hero-tag {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero .subtitle {
    font-size: 1.1rem;
    max-width: 850px;
    margin: 0 auto var(--space-md) auto;
}

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

/* Metrics Grid - Perfect Symmetry */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

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

.metric {
    padding: 1.5rem; /* Compacted padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 4vw, 3.5rem);
    font-weight: 600;
    line-height: 1;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.04em;
}

.metric-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Split Layout (Especialidad) - Symmetrical Centering */
.split-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-md);
}

.split-divider {
    display: none;
}

.split-left, .split-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.tag-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.indicator.red { background: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
.indicator.green { background: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }

.section-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
}

@media (min-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr 1px 1fr;
        grid-template-rows: auto auto 1fr;
        gap: 0 var(--space-lg);
        align-items: start;
    }
    .split-divider {
        display: block;
        grid-column: 2;
        grid-row: 1 / -1;
        width: 1px;
        height: 100%;
        background: var(--border);
        margin: 0 auto;
    }
    .split-left, .split-right {
        display: grid;
        grid-template-rows: subgrid;
        grid-row: 1 / -1;
    }
    .split-left h2, .split-right h2 {
        margin-bottom: var(--space-sm);
    }
    .split-left p, .split-right p {
        margin-bottom: 0;
    }
}

@supports not (grid-template-rows: subgrid) {
    @media (min-width: 900px) {
        .split-left h2, .split-right h2 {
            min-height: 4.8rem;
        }
    }
}

/* Tech Marquee */
.tech-marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: var(--space-md) 0;
    
    /* Full width bleed inside a container */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    
    background: rgba(255, 255, 255, 0.015);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tech-marquee-wrapper::before,
.tech-marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 10%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.tech-marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-base), transparent);
}
.tech-marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-base), transparent);
}

.tech-marquee {
    display: inline-flex;
    width: max-content;
    animation: marquee 55s linear infinite;
}
.tech-marquee:hover {
    animation-play-state: paused;
}

.tech-item {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0 4rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-smooth), transform var(--transition-smooth);
    cursor: default;
}
.tech-item:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}
.tech-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background-color: var(--text-secondary);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color var(--transition-smooth), background var(--transition-smooth), filter var(--transition-smooth);
}

/* Máscaras de iconos (SVGs monocromos en /icons/tech/) */
.tech-item.tech-linux .tech-icon {
    -webkit-mask-image: url('../icons/tech/linux.svg');
    mask-image: url('../icons/tech/linux.svg');
}
.tech-item.tech-proxmox .tech-icon {
    -webkit-mask-image: url('../icons/tech/proxmox.svg');
    mask-image: url('../icons/tech/proxmox.svg');
}
.tech-item.tech-docker .tech-icon {
    -webkit-mask-image: url('../icons/tech/docker.svg');
    mask-image: url('../icons/tech/docker.svg');
}
.tech-item.tech-cloudflare .tech-icon {
    -webkit-mask-image: url('../icons/tech/cloudflare.svg');
    mask-image: url('../icons/tech/cloudflare.svg');
}
.tech-item.tech-tailscale .tech-icon {
    -webkit-mask-image: url('../icons/tech/tailscale.svg');
    mask-image: url('../icons/tech/tailscale.svg');
}
.tech-item.tech-nextcloud .tech-icon {
    -webkit-mask-image: url('../icons/tech/nextcloud.svg');
    mask-image: url('../icons/tech/nextcloud.svg');
}
.tech-item.tech-m365 .tech-icon {
    -webkit-mask-image: url('../icons/tech/m365.svg');
    mask-image: url('../icons/tech/m365.svg');
}
.tech-item.tech-activedirectory .tech-icon {
    -webkit-mask-image: url('../icons/tech/activedirectory.svg');
    mask-image: url('../icons/tech/activedirectory.svg');
}
.tech-item.tech-glpi .tech-icon {
    -webkit-mask-image: url('../icons/tech/glpi.svg');
    mask-image: url('../icons/tech/glpi.svg');
}
.tech-item.tech-php .tech-icon {
    -webkit-mask-image: url('../icons/tech/php.svg');
    mask-image: url('../icons/tech/php.svg');
}
.tech-item.tech-laravel .tech-icon {
    -webkit-mask-image: url('../icons/tech/laravel.svg');
    mask-image: url('../icons/tech/laravel.svg');
}
.tech-item.tech-postgresql .tech-icon {
    -webkit-mask-image: url('../icons/tech/postgresql.svg');
    mask-image: url('../icons/tech/postgresql.svg');
}

/* Colores de marca personalizados en hover */
.tech-item.tech-linux:hover .tech-icon {
    background-color: #FCC624;
    filter: drop-shadow(0 0 10px rgba(252, 198, 36, 0.55));
}
.tech-item.tech-linux:hover {
    color: #fde27e;
}

.tech-item.tech-proxmox:hover .tech-icon {
    background: linear-gradient(135deg, #FFB800 0%, #E57000 100%);
    background-color: #E57000;
    filter: drop-shadow(0 0 10px rgba(229, 112, 0, 0.55));
}
.tech-item.tech-proxmox:hover {
    color: #ffbf66;
}

.tech-item.tech-docker:hover .tech-icon {
    background-color: #2496ED;
    filter: drop-shadow(0 0 10px rgba(36, 150, 237, 0.55));
}
.tech-item.tech-docker:hover {
    color: #70baff;
}

.tech-item.tech-cloudflare:hover .tech-icon {
    background-color: #F38020;
    filter: drop-shadow(0 0 10px rgba(243, 128, 32, 0.55));
}
.tech-item.tech-cloudflare:hover {
    color: #ffaa5e;
}

.tech-item.tech-tailscale:hover .tech-icon {
    background-color: #4B5563;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.45));
}
.tech-item.tech-tailscale:hover {
    color: #e2e8f0;
}

.tech-item.tech-nextcloud:hover .tech-icon {
    background-color: #0082C9;
    filter: drop-shadow(0 0 10px rgba(0, 130, 201, 0.55));
}
.tech-item.tech-nextcloud:hover {
    color: #5ec4ff;
}

.tech-item.tech-m365:hover .tech-icon {
    background-color: #D83B01;
    filter: drop-shadow(0 0 10px rgba(216, 59, 1, 0.55));
}
.tech-item.tech-m365:hover {
    color: #ff8c69;
}

.tech-item.tech-activedirectory:hover .tech-icon {
    background-color: #00A4EF;
    filter: drop-shadow(0 0 10px rgba(0, 164, 239, 0.55));
}
.tech-item.tech-activedirectory:hover {
    color: #66ccff;
}

.tech-item.tech-glpi:hover .tech-icon {
    background-color: #00A5F3;
    filter: drop-shadow(0 0 10px rgba(0, 165, 243, 0.55));
}
.tech-item.tech-glpi:hover {
    color: #7cd2fb;
}

.tech-item.tech-php:hover .tech-icon {
    background-color: #777BB4;
    filter: drop-shadow(0 0 10px rgba(119, 123, 180, 0.55));
}
.tech-item.tech-php:hover {
    color: #c4c7eb;
}

.tech-item.tech-laravel:hover .tech-icon {
    background-color: #FF2D20;
    filter: drop-shadow(0 0 10px rgba(255, 45, 32, 0.55));
}
.tech-item.tech-laravel:hover {
    color: #ff857d;
}

.tech-item.tech-postgresql:hover .tech-icon {
    background-color: #336791;
    filter: drop-shadow(0 0 10px rgba(51, 103, 145, 0.55));
}
.tech-item.tech-postgresql:hover {
    color: #8bbce0;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* Competencies Grid - Perfect Symmetry */
.competencies-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 900px) {
    .competencies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .competencies-grid.grid-2 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1000px;
        margin: 0 auto;
    }
}

.comp-card {
    padding: 1.5rem; /* Compacted padding */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    color: var(--accent);
    border: 1px solid var(--border);
}

.card-icon.icon-emerald {
    color: var(--emerald);
}

/* Etiqueta compacta dentro de tarjetas de proyecto */
.hero-tag.card-tag {
    align-self: flex-start;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
}

.hero-tag.tag-emerald {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--emerald-light);
}

.card-title {
    margin-top: 0.5rem;
}

.card-footer {
    margin-top: 1rem;
}

.card-link {
    color: var(--accent);
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity var(--transition-smooth);
}
.card-link:hover {
    opacity: 0.8;
}
.card-link.link-emerald {
    color: var(--emerald);
}

.comp-card ul {
    list-style: none;
    margin-top: 0.5rem;
    flex-grow: 1;
}

.comp-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.comp-card li::before {
    content: '→';
    margin-right: 10px;
    color: var(--accent);
    opacity: 0.5;
}

.comp-card li:last-child {
    border-bottom: none;
}

/* Timeline - Constrained but compact */
.timeline {
    max-width: 900px; /* Let it breathe a bit more horizontally */
    margin: 0 auto;
    position: relative;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Much tighter gap */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    bottom: 1rem;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding: 1.25rem 1.5rem; /* Compacted */
}

.timeline-dot {
    position: absolute;
    left: -1.90rem; /* Adjusted for centering on new padding */
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-base);
    box-shadow: 0 0 10px var(--accent-glow);
    z-index: 2;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    padding: 0.15rem 0.6rem;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 100px;
}

.timeline-content h4, .timeline-company {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.timeline-content ul {
    list-style: none;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.timeline-content li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    position: relative;
    padding-left: 1.25rem;
}

.timeline-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    opacity: 0.7;
    font-size: 0.9rem;
}

.timeline-content li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* FAQ */
.faq-list {
    max-width: 900px; /* Wider */
    margin: 0 auto;
    padding: 0 1.5rem;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    cursor: pointer;
}
.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3, .faq-question .faq-title {
    margin-bottom: 0;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    padding-right: var(--space-sm);
    font-family: var(--font-heading);
}

.faq-item .icon {
    color: var(--text-muted);
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.faq-item.active .icon {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 250px;
}

.faq-answer p {
    margin-top: 0.8rem;
    margin-bottom: 0;
    font-size: 1rem;
}

/* Formacion */
.credentials-panel {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem;
}

@media (max-width: 600px) {
    .credentials-panel {
        padding: 1.5rem;
    }
}

.credentials-grid {
    display: grid;
    /* min() evita desbordes horizontales en pantallas < 300px */
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.credential-column h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.credential-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.credential-item {
    position: relative;
    padding-left: 1.2rem;
}

.credential-item::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 1;
}

.credential-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.1rem;
    font-weight: 500;
}

.credential-item em {
    opacity: 0.8;
    font-style: italic;
}

.credential-detail {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.credential-quote {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.silent-text {
    max-width: 900px;
    margin: 0 auto;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    font-style: italic;
    color: var(--text-secondary);
    padding: 1.5rem;
    text-align: center;
    line-height: 1.5;
}

.credential-quote .silent-text {
    padding: 0;
    font-size: 1rem;
}

/* Contacto */
.contact-box {
    padding: 2.5rem 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-box p {
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
    font-size: 1.05rem;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

footer {
    padding: 3.5rem 0 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: rgba(3, 7, 18, 0.4);
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.8rem;
    max-width: 320px;
    line-height: 1.5;
}

.footer-col h4, .footer-col .footer-title {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col ul a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-smooth);
}

.footer-col ul a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* =========================================
   ANIMATIONS
   ========================================= */
/* CSS Only Animation for above-fold content (improves LCP) */
@keyframes animateIn {
    from { opacity: 0.1; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: animateIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-up {
    opacity: 0;
    transform: translateY(20px); /* Reduced translate for less motion sickness */
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; animation-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; animation-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; animation-delay: 0.3s; }

/* Accesibilidad: respetar usuarios con sensibilidad al movimiento */
@media (prefers-reduced-motion: reduce) {
    .tech-marquee { animation: none; }
    .fade-up { opacity: 1; transform: none; transition: none; }
    .animate-in { animation: none; }
}