/* ================================
   PALETA CORPORATE CLEAN RAWBYTES
   ================================ */

:root {
    --color-bg: #F7F9FC;
    --color-primary: #2563EB;
    --color-accent: #38BDF8;
    --color-text: #0F172A;
    --color-text-secondary: #475569;
    --color-border: #E2E8F0;
    --color-bg-navbar: #F5F7FA;
    --radius: 12px;
    --transition: 0.25s ease;
    --max-width: 1200px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.06);
}

/* ================
   CONFIGURACIÓN GLOBAL
   ================ */
/* ---------- DARK MODE ---------- */
.dark-mode {
    --color-bg: #1E1E1E;                 /* Fondo general */
    --color-bg-card: #2A2A2A;            /* Tarjetas */
    --color-border: #3A3A3A;             /* Bordes sutiles */
    --color-text: #E6E6E6;               /* Texto principal */
    --color-text-secondary: #C7C7C7;     /* Texto secundario */
    --color-primary: #36CFC9;            /* Acento premium */
    --color-accent: #4EE8E2;             /* Hover/acento */
    --color-bg-navbar: #1A1A1A;
}

html.dark-mode,
html.dark-mode body {
    background: var(--color-bg); /* el color real de tu dark mode */
}

/* Navbar en modo oscuro */
.dark-mode .navbar {
    background: var(--color-bg-navbar);
    border-bottom: 1px solid #3A3A3A;
}

/* Tarjetas */
.dark-mode .card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

/* Textos */
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode p,
.dark-mode li {
    color: var(--color-text);
}

.dark-mode a {
    color: var(--color-primary);
}

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

/* Footer */
.dark-mode footer {
    background: #1A1A1A;
    color: var(--color-text);
}

/* Transición suave global */
body, .card, .navbar, footer, section {
    transition: background 0.35s ease, color 0.35s ease, border 0.35s ease;
}

.dark-mode .btn-primary {
    background: #00c2b8;
    color: #000;
}

.dark-mode .btn-primary:hover {
    background: #00c2b8;
    color: #000;
}

.dark-mode .btn-outline {
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}

.dark-mode .btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

.dark-mode .app-link {
    background: #00c2b8;
    color: #000;
}
.dark-mode .app-link:hover {
    background: #00c2b8;
    color: #000;
}

/* ---------- LIGHT MODE ---------- */
html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    font-family: 'Inter', sans-serif;
    color: var(--color-text);
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

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

/* ============
   CONTENEDORES
   ============ */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.6rem;
}

/* ===========================
   TIPOGRAFÍA BASE
   =========================== */

h1, h2, h3, h4 {
    color: var(--color-text);
    margin: 0;
    font-weight: 700;
}

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

/* ===========================
   NAVBAR
   =========================== */
.navbar {
    width: 100%;
    background: var(--color-bg-navbar);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    border-bottom: 1px solid var(--color-primary);
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    padding: 1rem 2rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO */
.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    gap: 2px;
    position: relative;
}

.brand-top {
    font-size: 1.6rem;
    font-weight: 850;
    letter-spacing: -1px;
    color: var(--color-primary);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.brand-bottom {
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.brand:hover .brand-top {
    transform: translateY(-2px);
    opacity: 1;
}

.brand:hover .brand-bottom {
    transform: translateY(2px);
    opacity: 1;
}


/* DESKTOP LINKS */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* RIGHT SECTION */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* HAMBURGER (Linear style) */
.hamburger {
    width: 28px;
    height: 22px;
    display: none;        /* hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* MOBILE MENU */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 2rem;
}

.mobile-menu a {
    padding: 0.7rem 0;
    text-decoration: none;
    color: var(--color-text);
    font-size: 1.1rem;
}

.mobile-menu a:hover {
    color: var(--color-primary);
}

/* ---------------- RESPONSIVE NAVBAR ---------------- */
@media (max-width: 768px) {

    .nav-links {
        display: none;  /* hide desktop links */
    }

    .hamburger {
        display: flex; /* show hamburger */
    }

    /* Mobile menu when opened */
    .mobile-menu.active {
        display: flex;
    }

    /* Burger animation (X shape) */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* ================
   LANG DROPDOWN
   ================ */

.lang-dropdown {
    position: relative;
    display: inline-block;
    border: none;
    outline: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

/* Quitamos triángulo nativo del summary */
.lang-dropdown > summary {
    list-style: none;
}

.lang-dropdown > summary::-webkit-details-marker {
    display: none;
}

/* Toggle button (igual que el tuyo) */
.lang-dropdown-toggle {
    background: transparent;
    border: 1px solid var(--color-border);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    height: 32px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text);
    transition: background 0.2s ease;
}

.lang-dropdown-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}


/* Flecha */
.lang-dropdown .arrow {
    font-size: 0.75rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

/* Rotar flecha cuando está abierto */
.lang-dropdown[open] .arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.lang-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.4rem 0;
    box-shadow: var(--shadow-md);
    min-width: 150px;
    z-index: 50;

    /* Animación suave */
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

/* Cuando está abierto */
.lang-dropdown[open] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    border: none;
    outline: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.lang-dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    border-radius: 10px;
    padding: 0;
    margin: 0;
}

/* Opciones */
.lang-option {
    width: 100%;
    background: none;
    border: none;
    padding: 10px 14px;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--color-text);
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    border-radius: 10px;
}

.lang-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lang-option.active {
    font-weight: 600;
    background: rgba(0, 0, 0, 0.08);
}

.dark-mode .lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .lang-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .lang-option.active {
    background: rgba(255, 255, 255, 0.09);
}

/* ===========================
   SECCIÓN HERO
   =========================== */

.hero {
    padding: 8rem 1.5rem 6rem;
    background: var(--color-bg);
    text-align: center;
}
.hero {
    min-height: 100vh;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    padding: 8rem 1.5rem 6rem;
    box-sizing: border-box;
    text-align: center;
}
.hero-container {
    max-width: 900px;
    margin: auto;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--color-primary);
}

.hero-subtitle {
    margin-top: 1.2rem;
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.hero-cta {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-outline {
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--color-border);
    background: transparent;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-outline:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.05);
}

.btn-secondary {
    border: 1px solid var(--color-border);
    padding: 0.9rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    color: var(--color-text);
    transition: border 0.25s ease, color 0.25s ease;
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.hero-note {
    margin-top: 2.5rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    opacity: 0.8;
}

/* Dark mode tweaks */
.dark-mode .btn-secondary {
    border-color: var(--color-border);
}
/* ===========================
   ECOSISTEMA
   =========================== */
.ecosystem {
    padding: 5rem 2rem;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.ecosystem-container {
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

.ecosystem-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-text);
}

.ecosystem-subtitle {
    color: var(--color-text-secondary);
    margin: 1rem auto 3rem;
    max-width: 600px;
}

/* Flow horizontally on desktop */
.ecosystem-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.8rem;
    flex-wrap: wrap;
}

.eco-step {
    background: var(--color-bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    width: 180px;
    border: 1px solid var(--color-border);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.eco-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.eco-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.eco-step h3 {
    font-size: 1.15rem;
    color: var(--color-text);
}

.eco-step p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

/* Arrow style */
.eco-arrow {
    font-size: 2rem;
    color: var(--color-text-secondary);
}

/* Mobile: stack vertically */
@media (max-width: 700px) {
    .eco-arrow {
        display: none;
    }

    .ecosystem-flow {
        flex-direction: column;
    }

    .eco-step {
        width: 100%;
        max-width: 400px;
    }
}

/* ===========================
   tecnologias
   =========================== */
.techstack {
    padding: 5rem 1.5rem;
    background: var(--color-bg);
}

.techstack-container {
    max-width: var(--max-width);
    margin: auto;
    text-align: center;
}

.section-title {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--color-text);
}

.section-subtitle {
    max-width: 640px;
    margin: 1rem auto 3.5rem;
    font-size: 1.15rem;
    color: var(--color-text-secondary);
}

/* GRID PRINCIPAL CON CATEGORÍAS */
.tech-categories {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* TITULO DE CATEGORÍA */
.cat-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1rem;
    text-align: left;
}

/* ITEMS DENTRO DE LA CATEGORÍA */
.cat-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* TARJETAS LINEAR-LIKE */
.tech-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card, var(--color-bg));
    font-weight: 600;
    text-align: left;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.tech-item:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

/* ICONOS MONOCROMOS */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    opacity: 0.9;
}

.icon svg {
    width: 100%;
    height: 100%;
    fill: var(--color-text-secondary);
    transition: var(--transition);
}

.tech-item:hover .icon svg {
    fill: var(--color-primary);
}
/* ===========================
   Nuestras apps
   =========================== */
/* ---------------- APPS SECTION ---------------- */

.apps {
    padding: 5rem 2rem;
    background: var(--color-bg);
}

.apps-container {
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

.apps-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-text);
}

.apps-subtitle {
    color: var(--color-text-secondary);
    margin: 1rem auto 3rem;
    max-width: 600px;
}

/* GRID */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

/* CARD */
.app-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: left;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.app-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.app-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
}

.app-desc {
    margin: 0.8rem 0 1.5rem;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* BADGES */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-top: 0.3rem;
    font-weight: 600;
}

.badge-dev {
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
}

.badge-soon {
    background: rgba(100, 100, 100, 0.15);
    color: var(--color-text-secondary);
}

/* LINK */
.app-link {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.25s ease;
}

.app-link:hover {
    background: var(--color-accent);
}

.app-link.disabled {
    pointer-events: none;
    opacity: 0.5;
    color: #fff;
}

/* Placeholder for coming soon cards */
.app-soon .app-placeholder {
    margin-top: 1rem;
    font-size: 2rem;
    opacity: 0.3;
    text-align: center;
}

/* ===========================
   about
   =========================== */
.about {
    padding: 5rem 1.5rem;
    background: var(--color-bg);
}

.about-container {
    max-width: 800px;
    margin: auto;
    text-align: center;
}

.about-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-text);
}

.about-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.about-content {
    text-align: left;
    line-height: 1.7;
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.about-signature {
    margin-top: 2rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
    opacity: 0.85;
}

/* ===========================
   Timeline
   =========================== */
.timeline {
    padding: 5rem 1.5rem;
    background: var(--color-bg);
}

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

.timeline-title {
    text-align: center;
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--color-text);
}

.timeline-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 1rem auto 3rem;
    color: var(--color-text-secondary);
    font-size: 1.15rem;
}

/* Línea vertical */
.timeline-line {
    position: absolute;
    top: 160px;
    bottom: 0;
    left: 28px;
    width: 2px;
    background: var(--color-border);
    opacity: 0.7;
}

/* ITEMS */
.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
}

/* Círculo (dot) */
.dot {
    width: 16px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
    box-shadow: 0 0 6px var(--color-primary);
}

/* TEXTOS */
.content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
    color: var(--color-text);
}

.content p {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* =====================
   Container
===================== */
.timeline-section {
    padding: 5rem 1.5rem;
    background: var(--color-bg);
}

.timeline-container {
    max-width: 1100px;
    margin: auto;
    text-align: center;
}

.timeline-title {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--color-text);
}

.timeline-subtitle {
    max-width: 700px;
    margin: 1rem auto 3rem;
    color: var(--color-text-secondary);
    font-size: 1.15rem;
}

/* =====================
   DESKTOP VERSION
===================== */
.timeline-horizontal {
    display: flex;
    position: relative;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
    padding: 0 1rem;
}

.timeline-horizontal .timeline-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.timeline-line {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

/* Dot */
.timeline-step .dot {
    width: 16px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 50%;
    margin: 0 auto;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 8px var(--color-primary);
}

/* Title & Text */
.timeline-step h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}

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

/* =====================
   MOBILE ACCORDION
===================== */
.timeline-mobile {
    display: none;
    margin-top: 2rem;
}

details {
    background: var(--color-bg-card, var(--color-bg));
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    margin-bottom: 0.7rem;
    cursor: pointer;
}

details summary {
    font-weight: 600;
    color: var(--color-text);
}

details p {
    margin-top: 0.5rem;
    color: var(--color-text-secondary);
}

/* =====================
   RESPONSIVE SWITCH
===================== */
@media (max-width: 900px) {
    .timeline-horizontal {
        display: none;
    }
    .timeline-mobile {
        display: block;
    }
}

/* ===========================
   Utils
   =========================== */
.card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.card h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

/* GRID RESPONSIVE */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    padding: 3rem 1.5rem;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    margin-top: 6rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
}

.footer-logo {
    width: 26px;
    height: 26px;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-text-secondary);
    transition: var(--transition);
    font-size: 0.95rem;
}

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

.footer-meta {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    opacity: 0.85;
}

.footer .highlight {
    color: var(--color-primary);
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .footer-links {
        gap: 1rem;
    }
}

/* ===========================
   MODO OSCURO
   =========================== */
.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-toggle input {
    display: none;
}

.toggle-label {
    width: 48px;
    height: 24px;
    background: var(--color-border);
    border-radius: 40px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease;
}

.toggle-label::after {
    content: "";
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, background 0.3s ease;
}

/* Activado */
#darkModeToggle:checked + .toggle-label {
    background: var(--color-primary);
}

#darkModeToggle:checked + .toggle-label::after {
    transform: translateX(24px);
}

/* -------------- SLIDE-OVER MOBILE MENU -------------- */

.mobile-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 80;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 78%;
    max-width: 340px;
    height: 100%;
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.25);

    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.25, .8, .25, 1);

    z-index: 90;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.mobile-panel.active {
    transform: translateX(0%);
}

.mobile-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--color-text);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.close-btn:hover {
    opacity: 0.5;
}

/* Links */
.mobile-panel-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-panel-links a {
    color: var(--color-text);
    font-size: 1.2rem;
    text-decoration: none;
    padding: 0.3rem 0;
    transition: color 0.2s ease;
}

.mobile-panel-links a:hover {
    color: var(--color-primary);
}

.mobile-menu {
    display: none !important;
}

/* ================================
   SCROLL REVEAL
   ================================ */

/* Estado inicial */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: reveal-fade 0.8s ease-out forwards;

    /* vincular animación al scroll */
    animation-timeline: view(); /* 🔥 magia */
    animation-range: entry 0% cover 30%;
}

/* Animación */
@keyframes reveal-fade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-left {
    animation-name: reveal-left;
}
@keyframes reveal-left {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.reveal-right {
    animation-name: reveal-right;
}
@keyframes reveal-right {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}