/* ==========================================================================
   Castor Dafonte — Design System
   Fuentes: Sora (display) · Inter (texto) · JetBrains Mono (etiquetas)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
    color-scheme: light;

    /* Marca */
    --brand: #0f6cbd;
    --brand-strong: #0b4f8a;
    --brand-soft: #e5f1fb;
    --accent: #ff8c2a;
    --accent-soft: #fff1e5;
    --cyan: #27c3f2;

    /* Superficies */
    --bg: #f6f8fb;
    --bg-elev: #ffffff;
    --bg-alt: #eef3f9;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: #ffffff;
    --border: rgba(15, 35, 60, 0.09);
    --border-strong: rgba(15, 35, 60, 0.16);

    /* Texto */
    --text: #0f1c2e;
    --text-2: #4a5a6e;
    --text-3: #7b8a9d;
    --on-brand: #ffffff;

    /* Oscuro (contacto/footer) */
    --dark-bg: #0b1120;
    --dark-bg-2: #111a2e;
    --dark-border: rgba(255, 255, 255, 0.09);
    --dark-text: #e6edf6;
    --dark-text-2: #a9b6c8;

    /* Gradientes */
    --g-brand: linear-gradient(135deg, #0f6cbd 0%, #27c3f2 100%);
    --g-text: linear-gradient(100deg, #0f6cbd 0%, #27c3f2 55%, #0f6cbd 100%);
    --g-accent: linear-gradient(135deg, #ff8c2a 0%, #ffb067 100%);

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(15, 28, 46, 0.05), 0 2px 8px rgba(15, 28, 46, 0.04);
    --shadow-md: 0 6px 20px rgba(15, 28, 46, 0.08), 0 2px 6px rgba(15, 28, 46, 0.05);
    --shadow-lg: 0 20px 50px rgba(15, 28, 46, 0.12), 0 6px 16px rgba(15, 28, 46, 0.06);
    --shadow-glow: 0 10px 40px rgba(15, 108, 189, 0.25);

    /* Forma y movimiento */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dur: 0.35s;

    /* Tipografía */
    --font-display: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

    /* Layout */
    --container: 1180px;
    --gutter: clamp(20px, 4vw, 40px);
    --header-h: 72px;
}

/* Modo oscuro: preferencia del sistema (si el usuario no ha elegido) y elección explícita */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --brand: #4ea1e8;
        --brand-strong: #7fc0f5;
        --brand-soft: rgba(78, 161, 232, 0.14);
        --accent: #ff9d4d;
        --accent-soft: rgba(255, 140, 42, 0.14);
        --bg: #0b1120;
        --bg-elev: #111a2e;
        --bg-alt: #0e1627;
        --surface: rgba(17, 26, 46, 0.72);
        --surface-strong: #141f36;
        --border: rgba(255, 255, 255, 0.08);
        --border-strong: rgba(255, 255, 255, 0.16);
        --text: #e6edf6;
        --text-2: #a9b6c8;
        --text-3: #7f8da3;
        --g-text: linear-gradient(100deg, #7fc0f5 0%, #27c3f2 55%, #7fc0f5 100%);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
        --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
        --shadow-glow: 0 10px 40px rgba(78, 161, 232, 0.25);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --brand: #4ea1e8;
    --brand-strong: #7fc0f5;
    --brand-soft: rgba(78, 161, 232, 0.14);
    --accent: #ff9d4d;
    --accent-soft: rgba(255, 140, 42, 0.14);
    --bg: #0b1120;
    --bg-elev: #111a2e;
    --bg-alt: #0e1627;
    --surface: rgba(17, 26, 46, 0.72);
    --surface-strong: #141f36;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #e6edf6;
    --text-2: #a9b6c8;
    --text-3: #7f8da3;
    --g-text: linear-gradient(100deg, #7fc0f5 0%, #27c3f2 55%, #7fc0f5 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 10px 40px rgba(78, 161, 232, 0.25);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color var(--dur) ease, color var(--dur) ease;
}

img,
svg {
    display: block;
    max-width: 100%;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

ul {
    list-style: none;
}

::selection {
    background: var(--brand);
    color: #fff;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

a,
button,
.skill-tag {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (max-width: 768px) {
    input,
    textarea {
        font-size: 16px !important;
    }
}

.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}

/* ---------- Utilidades ---------- */
.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    padding: 0.7rem 1.1rem;
    background: var(--text);
    color: var(--bg);
    border-radius: 999px;
    font-weight: 600;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.scroll-progress {
    position: fixed;
    inset: 0 auto auto 0;
    height: 3px;
    width: 100%;
    background: var(--g-brand);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1200;
    pointer-events: none;
}

/* Fondo decorativo: rejilla de puntos + manchas de color */
.bg-decor {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.15));
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.15));
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    will-change: transform;
    animation: drift 24s ease-in-out infinite alternate;
}

.blob-1 {
    width: 56vw;
    height: 56vw;
    max-width: 760px;
    max-height: 760px;
    top: -22vw;
    right: -14vw;
    background: radial-gradient(circle, rgba(15, 108, 189, 0.45), transparent 65%);
}

.blob-2 {
    width: 44vw;
    height: 44vw;
    max-width: 600px;
    max-height: 600px;
    bottom: -18vw;
    left: -14vw;
    background: radial-gradient(circle, rgba(255, 140, 42, 0.35), transparent 65%);
    animation-delay: -8s;
}

.blob-3 {
    width: 30vw;
    height: 30vw;
    max-width: 420px;
    max-height: 420px;
    top: 45%;
    left: 55%;
    background: radial-gradient(circle, rgba(39, 195, 242, 0.3), transparent 65%);
    animation-delay: -16s;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(4vw, 3vw, 0) scale(1.08); }
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid transparent;
    transition: background var(--dur) ease, border-color var(--dur) ease, box-shadow var(--dur) ease;
}

.header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: var(--header-h);
}

/* Marca */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    flex-shrink: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--dark-bg);
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.03em;
    box-shadow: inset 0 0 0 1px rgba(255, 140, 42, 0.35), 0 4px 14px rgba(11, 17, 32, 0.25);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.brand:hover .brand-mark {
    transform: rotate(-6deg) scale(1.06);
    box-shadow: inset 0 0 0 1px rgba(255, 140, 42, 0.6), 0 8px 22px rgba(255, 140, 42, 0.3);
}

.brand-text {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: var(--text);
}

.brand-text strong {
    font-weight: 700;
}

/* Enlaces */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    position: relative;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--text-2);
    white-space: nowrap;
    transition: color var(--dur) ease, background var(--dur) ease;
}

.nav-link:hover {
    color: var(--text);
    background: var(--brand-soft);
}

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

.nav-link-cta {
    margin-left: 0.25rem;
    color: var(--bg);
    background: var(--text);
}

.nav-link-cta:hover,
.nav-link-cta.active {
    color: var(--on-brand);
    background: var(--brand);
}

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

/* Selector de idioma (control segmentado) */
.language-switcher {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}

.lang-btn {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-3);
    transition: color var(--dur) ease, background var(--dur) ease, box-shadow var(--dur) ease;
}

.lang-btn:hover {
    color: var(--text);
}

.lang-btn.active {
    color: var(--on-brand);
    background: var(--brand);
    box-shadow: 0 2px 8px rgba(15, 108, 189, 0.35);
}

/* Toggle de tema */
.theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-2);
    display: grid;
    place-items: center;
    overflow: hidden;
    transition: color var(--dur) ease, border-color var(--dur) ease, transform var(--dur) var(--ease);
}

.theme-toggle:hover {
    color: var(--brand);
    border-color: var(--border-strong);
    transform: rotate(15deg);
}

.theme-toggle i {
    position: absolute;
    transition: transform 0.45s var(--ease), opacity 0.3s ease;
}

.theme-icon-light {
    opacity: 0;
    transform: translateY(16px) rotate(90deg);
}

[data-theme="dark"] .theme-icon-dark {
    opacity: 0;
    transform: translateY(-16px) rotate(-90deg);
}

[data-theme="dark"] .theme-icon-light {
    opacity: 1;
    transform: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-icon-dark {
        opacity: 0;
        transform: translateY(-16px) rotate(-90deg);
    }

    :root:not([data-theme="light"]) .theme-icon-light {
        opacity: 1;
        transform: none;
    }
}

/* Menú móvil */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Botones
   ========================================================================== */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1;
    border: 1.5px solid transparent;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) ease, color var(--dur) ease, border-color var(--dur) ease;
    overflow: hidden;
    isolation: isolate;
}

.btn:active {
    transform: translateY(1px) scale(0.99);
}

.btn-primary {
    background: var(--g-brand);
    color: #fff;
    box-shadow: 0 6px 18px rgba(15, 108, 189, 0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--ease);
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 108, 189, 0.4);
}

.btn-primary:hover::after {
    transform: translateX(120%);
}

.btn-outline {
    background: var(--surface-strong);
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline:hover {
    background: var(--brand);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-ghost:hover {
    border-color: var(--text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100svh;
    padding: calc(var(--header-h) + 3rem) 0 5rem;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.hero-content > * {
    animation: fadeUp 0.9s var(--ease) both;
}

.hero-content > :nth-child(1) { animation-delay: 0.05s; }
.hero-content > :nth-child(2) { animation-delay: 0.15s; }
.hero-content > :nth-child(3) { animation-delay: 0.25s; }
.hero-content > :nth-child(4) { animation-delay: 0.35s; }
.hero-content > :nth-child(5) { animation-delay: 0.45s; }
.hero-content > :nth-child(6) { animation-delay: 0.55s; }
.hero-content > :nth-child(7) { animation-delay: 0.65s; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.95rem 0.45rem 0.7rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.pulse-dot {
    position: relative;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #22c55e;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.9rem, 7vw, 5.4rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin-bottom: 1rem;
    background: var(--g-text);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUp 0.9s var(--ease) 0.15s both, shimmer 7s linear 1.2s infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 0.9rem;
}

.hero-typing {
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    color: var(--text-2);
    margin-bottom: 1.4rem;
    min-height: 1.6em;
}

.typed-wrap {
    color: var(--accent);
    font-weight: 500;
}

.typed-cursor {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 2px;
    vertical-align: -0.15em;
    background: var(--accent);
    animation: blink 1s steps(2) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-description {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.75;
    color: var(--text-2);
    max-width: 58ch;
    margin-bottom: 2.2rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 2.2rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
    font-size: 0.86rem;
    color: var(--text-3);
    font-weight: 500;
}

.hero-badges li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-badges i {
    color: var(--brand);
}

/* Visual: letrero neón */
.hero-visual {
    position: relative;
    animation: fadeUp 1.1s var(--ease) 0.3s both;
    perspective: 1200px;
}

.sign-board {
    position: relative;
    aspect-ratio: 5 / 4;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 90% at 50% 100%, rgba(255, 140, 42, 0.18), transparent 60%),
        linear-gradient(160deg, #141f36 0%, #0b1120 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 30px 80px rgba(11, 17, 32, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: grid;
    place-items: center;
    transform-style: preserve-3d;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1));
    transition: transform 0.18s ease-out;
    will-change: transform;
}

.sign-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 36px 36px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 80%);
    mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 80%);
}

.sign-logo {
    position: relative;
    width: 84%;
    height: auto;
    filter:
        drop-shadow(0 0 2px rgba(255, 225, 180, 0.9))
        drop-shadow(0 0 8px rgba(255, 150, 50, 0.75))
        drop-shadow(0 0 24px rgba(255, 120, 20, 0.5))
        drop-shadow(0 0 60px rgba(255, 100, 0, 0.35));
    animation: neonOn 2.2s steps(1, end) 0.4s both, neonPulse 3.2s ease-in-out 2.6s infinite;
    transform: translateZ(60px);
    transition: filter 0.4s ease;
}

.sign-board:hover .sign-logo {
    filter:
        brightness(1.15)
        drop-shadow(0 0 3px rgba(255, 235, 200, 1))
        drop-shadow(0 0 12px rgba(255, 160, 60, 0.95))
        drop-shadow(0 0 32px rgba(255, 120, 20, 0.7))
        drop-shadow(0 0 90px rgba(255, 100, 0, 0.5));
}

/* Encendido tipo neón: parpadeos antes de quedarse fijo */
@keyframes neonOn {
    0% { opacity: 0.15; }
    8% { opacity: 1; }
    12% { opacity: 0.2; }
    20% { opacity: 1; }
    24% { opacity: 0.35; }
    30% { opacity: 1; }
    55% { opacity: 1; }
    58% { opacity: 0.5; }
    62% { opacity: 1; }
    100% { opacity: 1; }
}

@keyframes neonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
    88% { opacity: 1; }
    91% { opacity: 0.7; }
    94% { opacity: 1; }
}

.sign-glow {
    position: absolute;
    inset: 15% 10%;
    background: radial-gradient(ellipse at center, rgba(255, 140, 42, 0.5), rgba(255, 120, 20, 0.18) 45%, transparent 70%);
    filter: blur(28px);
    animation: glowBreath 3.2s ease-in-out infinite;
    transition: opacity 0.4s ease;
}

.sign-board:hover .sign-glow {
    opacity: 1.4;
}

@keyframes glowBreath {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.12); opacity: 1; }
}

/* Reflejo del neón en la base del panel */
.sign-board::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 0;
    height: 28%;
    background: linear-gradient(to top, rgba(255, 140, 42, 0.22), transparent);
    filter: blur(14px);
    pointer-events: none;
}

.float-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    animation: floaty 6s ease-in-out infinite;
    translate: var(--px, 0px) var(--py, 0px);
    transition: translate 0.18s ease-out;
}

.float-chip i {
    color: var(--brand);
}

.chip-1 { top: -4%; left: -8%; animation-delay: 0s; }
.chip-2 { top: 18%; right: -10%; animation-delay: -1.5s; }
.chip-3 { bottom: 14%; left: -12%; animation-delay: -3s; }
.chip-4 { bottom: -5%; right: 4%; animation-delay: -4.5s; }

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

/* Indicador de scroll */
.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 1.6rem;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-3);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    animation: fadeUp 1s var(--ease) 1.1s both;
}

.scroll-line {
    display: block;
    width: 1px;
    height: 44px;
    background: linear-gradient(to bottom, transparent, var(--text-3));
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--brand);
    animation: scrollLine 1.8s var(--ease) infinite;
}

@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* ==========================================================================
   Secciones
   ========================================================================== */
.section {
    position: relative;
    padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

.section-alt {
    background: color-mix(in srgb, var(--bg-alt) 70%, transparent);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    text-align: center;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.9rem;
}

.section-num {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 500;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.6vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}

.section-lead {
    text-align: center;
    color: var(--text-2);
    max-width: 60ch;
    margin: -1.5rem auto 2.5rem;
}

.bg-dark {
    background:
        radial-gradient(80% 60% at 100% 0%, rgba(15, 108, 189, 0.35), transparent 60%),
        radial-gradient(60% 50% at 0% 100%, rgba(255, 140, 42, 0.22), transparent 60%),
        var(--dark-bg);
    color: var(--dark-text);
}

.bg-dark .section-title {
    color: #fff;
}

.bg-dark .section-eyebrow {
    color: #7fc0f5;
}

.bg-dark .section-num {
    background: rgba(127, 192, 245, 0.15);
    color: #7fc0f5;
}

/* Tarjeta base */
.card {
    background: var(--surface);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* Efecto foco: borde que sigue el ratón */
.spotlight {
    position: relative;
    overflow: hidden;
}

.spotlight::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand) 16%, transparent), transparent 45%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.spotlight:hover::before {
    opacity: 1;
}

.spotlight > * {
    position: relative;
}

/* Animación de aparición */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: var(--delay, 0ms);
}

.reveal.in-view {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   Sobre mí
   ========================================================================== */
.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.about-text p {
    font-size: clamp(1.02rem, 1.5vw, 1.15rem);
    line-height: 1.8;
    color: var(--text-2);
    margin-bottom: 1.25rem;
}

.about-text p:first-child::first-letter {
    font-family: var(--font-display);
    font-size: 2.6em;
    font-weight: 800;
    float: left;
    line-height: 0.85;
    margin: 0.08em 0.12em 0 0;
    color: var(--brand);
}

.about-highlights {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.8rem;
}

.about-highlights li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform var(--dur) var(--ease), border-color var(--dur) ease;
}

.about-highlights li:hover {
    transform: translateX(6px);
    border-color: var(--brand);
}

.about-highlights i {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
    flex-shrink: 0;
}

.about-stats {
    display: grid;
    gap: 1rem;
}

.stat {
    padding: 1.8rem 2rem;
    border-radius: var(--radius);
    background: var(--surface);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.4rem;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) ease;
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--brand);
    min-width: 2.4ch;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-2);
    line-height: 1.3;
}

/* ==========================================================================
   Experiencia (timeline)
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 190px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(to bottom, var(--brand), var(--cyan), transparent);
    opacity: 0.6;
}

.timeline-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 3.6rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 182px;
    top: 14px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg);
    border: 4px solid var(--brand);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 18%, transparent);
    z-index: 2;
    transition: transform var(--dur) var(--ease);
}

.timeline-item:hover::before {
    transform: scale(1.2);
}

.timeline-item:first-child::before {
    background: var(--brand);
    animation: ring 2.4s ease-out infinite;
}

@keyframes ring {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); }
    100% { box-shadow: 0 0 0 16px transparent; }
}

.timeline-date {
    text-align: right;
    padding-top: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--text-3);
    font-weight: 500;
}

.timeline-content {
    padding: 1.8rem 2rem;
    border-radius: var(--radius);
    background: var(--surface);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) ease;
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-2);
    margin-bottom: 1rem;
}

.timeline-content li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 0.45rem;
    color: var(--text-2);
    font-size: 0.95rem;
}

.timeline-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--g-brand);
    transform: rotate(45deg);
}

/* ==========================================================================
   Certificaciones
   ========================================================================== */
.cert-level-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 2.5rem 0 1.2rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}

.cert-level-title::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--brand);
    transform: rotate(45deg);
    flex-shrink: 0;
}

.cert-level-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.cert-level-ai::before { background: var(--g-accent); }
.cert-level-expert::before { background: #c026d3; }
.cert-level-associate::before { background: var(--brand); }
.cert-level-fundamentals::before { background: #16a34a; }
.cert-level-other::before { background: var(--text-3); }

.cert-count {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    text-transform: none;
    letter-spacing: 0;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.1rem;
}

.cert-card {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.3rem 1.3rem 1.2rem;
    border-radius: var(--radius);
    background: var(--surface);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) ease;
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.cert-badge {
    width: 68px;
    height: 68px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
    transition: transform 0.5s var(--ease);
}

.cert-card:hover .cert-badge {
    transform: scale(1.08) rotate(-4deg);
}

.cert-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cert-info h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin-bottom: 0.45rem;
    color: var(--text);
}

.cert-skills {
    font-size: 0.83rem;
    line-height: 1.5;
    color: var(--text-3);
    margin-bottom: 0.8rem;
}

.cert-verify-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand);
    transition: gap var(--dur) var(--ease), color var(--dur) ease;
}

.cert-verify-link:hover {
    gap: 0.7rem;
    color: var(--brand-strong);
}

.cert-verify-link i {
    font-size: 0.75rem;
}

/* ==========================================================================
   Habilidades
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.skill-category {
    padding: 1.8rem;
    border-radius: var(--radius);
    background: var(--surface);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) ease;
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.skill-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--g-brand);
    color: #fff;
    font-size: 1.15rem;
    margin-bottom: 1.1rem;
    box-shadow: 0 6px 16px rgba(15, 108, 189, 0.3);
}

.skill-category h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-2);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    transition: transform var(--dur) var(--ease), background var(--dur) ease, color var(--dur) ease, border-color var(--dur) ease;
    cursor: default;
}

.skill-tag:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    transform: translateY(-2px);
}

/* ==========================================================================
   Educación
   ========================================================================== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    max-width: 860px;
    margin: 0 auto;
}

.education-item {
    padding: 2rem;
    border-radius: var(--radius);
    background: var(--surface);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) ease;
}

.education-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}

.education-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 1rem;
    border-radius: 16px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.3rem;
}

.education-item h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.7rem;
}

.education-date {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 0.9rem;
}

.education-degree {
    color: var(--text-2);
    font-size: 0.95rem;
}

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact-content {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4rem);
    max-width: 1040px;
    margin: 0 auto;
    align-items: start;
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.8rem;
    background: linear-gradient(100deg, #fff, #7fc0f5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-info > p {
    color: var(--dark-text-2);
    font-size: 1.05rem;
    margin-bottom: 1.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.8rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    color: var(--dark-text);
    transition: transform var(--dur) var(--ease), background var(--dur) ease, border-color var(--dur) ease;
}

a.contact-item:hover {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(127, 192, 245, 0.5);
}

.contact-item i {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(127, 192, 245, 0.14);
    color: #7fc0f5;
    flex-shrink: 0;
}

.contact-item-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.contact-item-text small {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dark-text-2);
    margin-bottom: 0.15rem;
}

.social-links {
    display: flex;
    gap: 0.7rem;
    margin-top: 1.6rem;
}

.social-link {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--dark-border);
    color: var(--dark-text);
    font-size: 1.15rem;
    transition: transform var(--dur) var(--ease), background var(--dur) ease, border-color var(--dur) ease, box-shadow var(--dur) ease;
}

.social-link:hover {
    transform: translateY(-4px);
    background: var(--g-brand);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 108, 189, 0.4);
}

/* Formulario */
.contact-form {
    padding: clamp(1.5rem, 3vw, 2.4rem);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.045);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid var(--dark-border);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dark-text-2);
    margin-bottom: 0.45rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1.05rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--dark-border);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--dur) ease, background var(--dur) ease, box-shadow var(--dur) ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(230, 237, 246, 0.4);
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7fc0f5;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 4px rgba(127, 192, 245, 0.2);
}

.form-group input:user-invalid,
.form-group textarea:user-invalid {
    border-color: #f87171;
}

.form-status {
    display: none;
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
}

.form-status.is-success {
    display: block;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
}

.form-status.is-error {
    display: block;
    background: rgba(248, 113, 113, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #fca5a5;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--dark-bg);
    color: var(--dark-text-2);
    border-top: 1px solid var(--dark-border);
    padding: 3rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr auto auto;
    align-items: center;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--dark-border);
}

.footer-brand {
    display: grid;
    gap: 0.6rem;
}

.footer .brand-text {
    color: #fff;
}

.footer-tagline {
    font-size: 0.86rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.2rem;
}

.footer-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-text-2);
    transition: color var(--dur) ease;
}

.footer-link:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 0.6rem;
}

.footer-social .social-link {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-top: 1.5rem;
    font-size: 0.84rem;
}

/* Volver arriba */
.scroll-to-top {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 900;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--dur) ease, transform var(--dur) var(--ease), visibility var(--dur), background var(--dur) ease;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.scroll-to-top:hover {
    background: var(--brand);
    color: #fff;
}

/* ==========================================================================
   Animaciones
   ========================================================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-description {
        margin-inline: auto;
    }

    .hero-buttons,
    .hero-badges {
        justify-content: center;
    }

    .hero-visual {
        max-width: 520px;
        margin: 1rem auto 0;
        width: 100%;
    }

    .chip-1 { left: 0; }
    .chip-2 { right: 0; }
    .chip-3 { left: 0; }
    .chip-4 { right: 4%; }

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

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

    .stat {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

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

@media (max-width: 980px) {
    .nav-links {
        position: absolute;
        top: calc(var(--header-h) + 8px);
        left: var(--gutter);
        right: var(--gutter);
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        padding: 0.6rem;
        border-radius: var(--radius);
        background: var(--surface-strong);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px) scale(0.98);
        transform-origin: top center;
        transition: opacity 0.25s ease, transform 0.3s var(--ease), visibility 0.3s;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-link {
        padding: 0.85rem 1rem;
        font-size: 1rem;
    }

    .nav-link-cta {
        margin: 0.3rem 0 0;
        text-align: center;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .timeline::before {
        left: 9px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding-left: 2.4rem;
    }

    .timeline-item::before {
        left: 0;
        top: 4px;
    }

    .timeline-date {
        text-align: left;
        padding-top: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .footer-nav {
        justify-content: center;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 640px) {
    :root {
        --header-h: 64px;
    }

    .brand-text {
        display: none;
    }

    .footer .brand-text {
        display: inline;
    }

    .hero {
        padding-top: calc(var(--header-h) + 2rem);
        padding-bottom: 4.5rem;
        min-height: auto;
    }

    .hero-eyebrow {
        font-size: 0.75rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }

    .btn {
        width: 100%;
    }

    .hero-visual {
        max-width: 100%;
    }

    .float-chip {
        font-size: 0.72rem;
        padding: 0.45rem 0.7rem;
    }

    .chip-1 { top: -14px; }
    .chip-4 { bottom: -14px; }

    .scroll-indicator {
        display: none;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .stat {
        flex-direction: row;
        text-align: left;
        padding: 1.3rem 1.5rem;
    }

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

    .cert-card {
        padding: 1.1rem;
    }

    .cert-badge {
        width: 56px;
        height: 56px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .scroll-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 42px;
        height: 42px;
    }
}

/* ==========================================================================
   Accesibilidad: movimiento reducido
   ========================================================================== */
@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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .sign-board {
        transform: none !important;
    }
}

/* Impresión */
@media print {
    .header,
    .bg-decor,
    .scroll-progress,
    .scroll-to-top,
    .hero-visual,
    .scroll-indicator,
    .contact-form,
    .theme-toggle,
    .language-switcher {
        display: none !important;
    }

    .section {
        padding: 1.5rem 0;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
