/* Fuentes — import obligatorio en CSS (regla del proyecto: no usar <link> en HTML) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* ------------------------------------------------------------
   PALETA — Modo claro
   Hilo conductor: azul-teal-verde acuático.
   baltic-blue → teal → verdigris → mint-leaf.
   Contraste verificado AA contra fondos claros.
   ------------------------------------------------------------ */
:root {
    /* Tokens base de la paleta — disponibles en toda la app */
    --baltic-blue: #05668d;
    --teal: #028090;
    --verdigris: #00a896;
    --mint-leaf: #02c39a;

    --primary-color: #05668d;   /* baltic-blue — CTA principal, máximo contraste sobre claro */
    --secondary-color: #028090; /* teal — hover/active del primario */
    --accent-color: #00a896;    /* verdigris — acento complementario */
    --text-dark: #0f172a;       /* slate-900 — máximo contraste sobre claro */
    --text-light: #64748b;      /* slate-500 — texto secundario */
    --white: #ffffff;
    --bg-light: #f0fbf8;        /* off-white con tinte mint apenas perceptible */
    --bg-dark: #033649;         /* baltic profundo para footer */
    --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 20px 60px rgba(15, 23, 42, 0.14);
    --transition: all 0.3s ease;

    /* Habilita animación de tamaños 'auto' para transiciones suaves
       (necesario para animar la apertura de <details> a altura natural) */
    interpolate-size: allow-keywords;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    /* Sticky footer: en páginas con poco contenido (servicios, blog) el footer
       queda pegado abajo en lugar de flotar dejando hueco. El navbar, el boot-screen
       y el skip-link están fuera de flujo (fixed/absolute), así que los únicos hijos
       en flujo son <main> y <footer>. */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* El contenido crece para empujar el footer al fondo */
body > main {
    flex: 1 0 auto;
}

/* El footer conserva su altura natural al fondo */
body > .footer {
    flex-shrink: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Skip link — accesibilidad: visible solo al recibir foco con teclado.
   No altera el diseño porque permanece fuera de la pantalla hasta entonces. */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 9999;
    border-radius: 0 0 6px 0;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Respeta preferencia del usuario por menos movimiento (a11y) */
@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;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar--scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    /* Reset de estilos por defecto del <button> para conservar el diseño original */
    background: transparent;
    border: 0;
    padding: 8px;
    margin: -8px;
    color: inherit;
    line-height: 1;
    transition: var(--transition);
}

/* Tamaño explícito del icono Font Awesome (las tres líneas).
   Aplicar sobre el <i> evita que reglas globales de Font Awesome
   ganen especificidad y mantengan el tamaño por defecto (~1rem). */
.hamburger i {
    font-size: 2.0rem;
    line-height: 1;
}

.hamburger.active {
    transform: rotate(90deg);
}

.nav-links.active {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    padding: 20px;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero {
    /* Tokens locales del hero: por defecto modo claro.
       Se sobrescriben en [data-theme="dark"] más abajo. */
    --hero-bg: #e6f7f3;
    --hero-grid: rgba(15, 23, 42, 0.06);
    --hero-orb-1: rgba(5, 102, 141, 0.32);   /* baltic-blue */
    --hero-orb-2: rgba(2, 195, 154, 0.22);   /* mint-leaf */
    --hero-text: var(--text-dark);
    --hero-text-muted: var(--text-light);
    --hero-text-soft: #475569;
    --hero-highlight: var(--primary-color);

    min-height: 100vh;
    display: flex;
    align-items: center;
    /* Base + grid de puntos sutil como textura, controlado por tokens */
    background-color: var(--hero-bg);
    background-image: radial-gradient(circle, var(--hero-grid) 1px, transparent 1px);
    background-size: 28px 28px;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

/* Overrides para modo oscuro */
[data-theme="dark"] .hero {
    --hero-bg: #03161e;
    --hero-grid: rgba(255, 255, 255, 0.05);
    --hero-orb-1: rgba(0, 168, 150, 0.42);    /* verdigris luminoso */
    --hero-orb-2: rgba(2, 195, 154, 0.32);    /* mint-leaf */
    --hero-text: #ffffff;
    --hero-text-muted: rgba(241, 245, 249, 0.72);
    --hero-text-soft: rgba(241, 245, 249, 0.55);
    --hero-highlight: #02c39a;  /* mint-leaf — destaca sobre fondo oscuro y combina con orbes */
}

.hero > .container {
    position: relative;
    z-index: 2;
}

/* Orbe 1 — azul-índigo, esquina superior derecha */
.hero::before {
    content: '';
    position: absolute;
    width: 680px;
    height: 680px;
    background: radial-gradient(circle, var(--hero-orb-1) 0%, transparent 65%);
    border-radius: 50%;
    top: -220px;
    right: -140px;
    pointer-events: none;
    z-index: 1;
    animation: heroOrb1 9s ease-in-out infinite alternate;
}

/* Orbe 2 — cian-azul, esquina inferior izquierda */
.hero::after {
    content: '';
    position: absolute;
    width: 580px;
    height: 580px;
    background: radial-gradient(circle, var(--hero-orb-2) 0%, transparent 65%);
    border-radius: 50%;
    bottom: -160px;
    left: -100px;
    pointer-events: none;
    z-index: 1;
    animation: heroOrb2 12s ease-in-out infinite alternate;
}

@keyframes heroOrb1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-55px, 45px) scale(1.15); }
}

@keyframes heroOrb2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(65px, -50px) scale(1.12); }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    /* Siempre por encima de la foto de fondo y de los orbes */
    position: relative;
    z-index: 2;
}

/* Texto controlado por tokens locales del hero (adapta a claro/oscuro) */
.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--hero-text);
}

.hero h1 .highlight {
    color: var(--hero-highlight);
}

.hero h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--hero-text-muted);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--hero-text-soft);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.btn {
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(5, 102, 141, 0.3);
}

.hero-buttons .btn-primary {
    animation: pulse 2s infinite;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-dark);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

@media (hover: hover) {
    .social-icon:hover {
        transform: translateY(-5px);
    }

    .social-github:hover {
        background: #181717;
        color: var(--white);
    }

    .social-whatsapp:hover {
        background: #25D366;
        color: var(--white);
    }
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    /* Hereda el token de texto suave del hero para adaptarse a claro/oscuro */
    color: var(--hero-text-soft, rgba(255, 255, 255, 0.4));
    animation: bounce 2s infinite;
    z-index: 2;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(5, 102, 141, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(5, 102, 141, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(5, 102, 141, 0);
    }
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-dark);
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    width: 290px;
    height: 390px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--mint-leaf));
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(4deg);
    z-index: 0;
}

.about-image::after {
    content: '';
    position: absolute;
    width: 290px;
    height: 390px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--teal), var(--accent-color));
    top: 6px;
    left: 50%;
    transform: translateX(-50%) rotate(-4deg);
    z-index: 0;
    opacity: 0.5;
}

.profile-image {
    width: 280px;
    height: 380px;
    border-radius: 20px;
    object-fit: cover;
    object-position: top center;
    box-shadow: 0 20px 60px rgba(5, 102, 141, 0.3);
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.profile-image:hover {
    transform: scale(1.03);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.info-item {
    display: flex;
    gap: 10px;
}

.info-item .label {
    font-weight: 600;
    color: var(--text-dark);
}

.info-item .value {
    color: var(--text-light);
}

.info-item .value.available {
    color: #10b981;
    font-weight: 600;
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background: var(--bg-light);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    transition: var(--transition);
}

.skill-html5:hover {
    color: #E34C26;
}

.skill-css3:hover {
    color: #1572B6;
}

.skill-javascript:hover {
    color: #F7DF1E;
}

.skill-git:hover {
    color: #F1502F;
}

.skill-design:hover {
    color: #9F7AEA;
}

.skill-github:hover {
    color: #181717;
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.progress-bar {
    background: var(--bg-light);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 5px;
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Cada <li> envuelve un <article.project-card>: el li es el item del grid,
   forzamos al article a ocupar toda su altura para conservar el diseño original */
.projects-grid > li {
    display: flex;
}
.projects-grid > li > .project-card {
    flex: 1;
    width: 100%;
}

.project-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    height: 180px;
    background: linear-gradient(135deg, var(--baltic-blue) 0%, var(--mint-leaf) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.project-icon {
    font-size: 4.5rem;
    color: rgba(255, 255, 255, 0.9);
    transition: transform 0.35s ease, color 0.35s ease;
    z-index: 1;
}

.project-card:hover .project-icon {
    transform: scale(1.15);
    color: var(--white);
}

.project-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.project-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.project-tags span {
    padding: 5px 15px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: auto;
    justify-content: center;
}

.btn-project {
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-project {
    background: var(--primary-color);
    color: var(--white);
}

.btn-project:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

/* FAQ Section — details/summary nativo, sin JS */
.faq {
    padding: 100px 0;
    background: var(--bg-light);
}

.faq__list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq__item {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Animación suave de apertura/cierre usando el pseudo-elemento
   ::details-content (Chrome 131+, soporte moderno 2025+).
   En navegadores antiguos el panel simplemente aparece/desaparece sin animar. */
.faq__item::details-content {
    block-size: 0;
    opacity: 0;
    overflow: clip;
    transition:
        block-size 0.4s ease,
        opacity 0.3s ease 0.05s,
        content-visibility 0.4s allow-discrete;
}

.faq__item[open]::details-content {
    block-size: auto;
    opacity: 1;
}

/* Respeta la preferencia de movimiento reducido del sistema */
@media (prefers-reduced-motion: reduce) {
    .faq__item::details-content {
        transition: none;
    }
    .faq__icon {
        transition: none;
    }
}

/* Oculta el marcador nativo del navegador */
.faq__item summary {
    list-style: none;
}
.faq__item summary::-webkit-details-marker {
    display: none;
}

.faq__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 28px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition);
    user-select: none;
}

.faq__question:hover {
    color: var(--primary-color);
}

.faq__icon {
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

/* Rota el chevron cuando el details está abierto */
.faq__item[open] .faq__icon {
    transform: rotate(180deg);
}

.faq__answer {
    padding: 0 28px 22px;
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ============================================================
   FOOTER — 3 columnas con jerarquía visual y acentos de marca
   ============================================================ */
.footer {
    background: var(--bg-dark);
    padding: 70px 0 24px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Línea decorativa superior con gradiente de marca */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color) 30%, var(--mint-leaf) 70%, transparent);
}

/* Halo sutil detrás del footer */
.footer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(5, 102, 141, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.footer .container {
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    align-items: flex-start;
    margin-bottom: 50px;
}

.footer__col {
    min-width: 0;
}

/* — Marca — */
.footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--white);
}

.footer__logo-mark {
    width: 14px;
    height: 14px;
    background: var(--mint-leaf);
    border-radius: 50%;
    flex-shrink: 0;
    animation: footerPulse 2s ease-in-out infinite;
}

@keyframes footerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(2, 195, 154, 0.7); }
    50%       { box-shadow: 0 0 0 8px rgba(2, 195, 154, 0); }
}

.footer__logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer__tagline {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 14px;
    font-weight: 500;
}

.footer__bio {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 380px;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.footer__availability {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #cbd5e1;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 8px 14px;
    border-radius: 999px;
}

.footer__dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* — Headings de columna — */
.footer__heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    padding-bottom: 10px;
}

.footer__heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* — Lista de navegación — */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #94a3b8;
    transition: var(--transition);
    font-size: 0.9rem;
    width: fit-content;
    position: relative;
    padding-left: 0;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 12px;
}

.footer-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    transform: translateY(-50%);
}

.footer-links a:hover::before {
    width: 8px;
}

/* — Iconos sociales como botones circulares — */
.footer__contact {
    display: flex;
    gap: 12px;
    font-style: normal;
    margin-bottom: 20px;
}

.footer__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer__social:hover {
    transform: translateY(-3px);
    color: var(--white);
    border-color: transparent;
}

.footer__social--whatsapp:hover {
    background: #25D366;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.footer__social--github:hover {
    background: #181717;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.footer__cta {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* — Barra inferior — */
.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 24px;
}

.footer__copy,
.footer__credit {
    font-size: 0.85rem;
    color: #94a3b8; /* slate-400: contraste AA legible sobre el footer oscuro (antes #64748b se veía "transparente") */
    margin: 0;
}

.footer__copy strong {
    color: #cbd5e1;
    font-weight: 600;
}

.footer__credit a {
    color: #94a3b8;
    transition: var(--transition);
    font-weight: 600;
}

.footer__credit a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
    }

    .about-info {
        justify-content: center;
    }

    .info-item {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer__col--brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .scroll-down {
        bottom: 110px;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
        /* Pequeña separación con el toggle de tema que ahora queda a su izquierda */
        margin-left: 14px;
    }

    /* En móvil, .nav-links se oculta; el toggle de tema queda con
       'space-between' lejos del hamburguesa. margin-left:auto lo empuja
       hasta el lado derecho para que ambos queden agrupados. */
    .theme-toggle {
        margin-left: auto;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.4rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-info {
        grid-template-columns: 1fr;
    }

    /* Footer centrado en móvil — todo el contenido sobre el eje central
       para mejorar la jerarquía vertical y el ritmo de lectura en una
       sola columna estrecha. */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    /* Logo es inline-flex: para centrarlo usamos auto-margins en el contenedor de bloque */
    .footer__logo {
        margin-left: auto;
        margin-right: auto;
    }

    .footer__bio {
        max-width: 100%;
        /* En columna estrecha, justify deja huecos feos entre palabras */
        text-align: center;
    }

    /* Subrayado del heading centrado debajo del texto */
    .footer__heading {
        padding-bottom: 14px;
    }

    .footer__heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Enlaces de navegación: centrar cada item dentro de la columna */
    .footer-links {
        align-items: center;
    }

    /* Anula el desplazamiento horizontal del hover (rompería el centrado) */
    .footer-links a:hover {
        padding-left: 0;
    }
    .footer-links a::before,
    .footer-links a:hover::before {
        display: none;
    }

    /* Iconos sociales centrados horizontalmente */
    .footer__contact {
        justify-content: center;
    }

    /* Pastilla de disponibilidad también centrada (es inline-flex) */
    .footer__col--brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer__bottom {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 8px;
    }

    .faq__question {
        padding: 18px 20px;
        font-size: 0.95rem;
    }

    .faq__answer {
        padding: 0 20px 18px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ============================================================
   DARK MODE
   Activado vía data-theme="dark" en <html>.
   Las variables sobreescriben las del :root en claro.
   ============================================================ */

/* ------------------------------------------------------------
   PALETA — Modo oscuro
   Misma familia baltic→teal→verdigris→mint, pero invertida en
   luminosidad: mint-leaf y verdigris pasan a roles primarios
   por su mejor contraste sobre superficies oscuras. Superficies
   con micro-tinte azul-teal para coherencia con la marca.
   ------------------------------------------------------------ */
[data-theme="dark"] {
    --primary-color: #02c39a;   /* mint-leaf — luminoso, contraste AA sobre oscuro */
    --secondary-color: #00a896; /* verdigris — hover/active */
    --accent-color: #028090;    /* teal — acento más sobrio */
    --text-dark: #f1f5f9;       /* slate-100 — texto principal sobre oscuro */
    --text-light: #94a3b8;      /* slate-400 — secundario */
    --white: #0a2733;           /* superficies con micro-tinte baltic */
    --bg-light: #051d27;        /* fondo principal */
    --bg-dark: #02131a;         /* footer / capa más profunda */
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* Fondo del body en dark usa bg-light para que las tarjetas (--white) resalten */
[data-theme="dark"] body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Navbar */
[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .nav-links a {
    color: var(--text-dark);
}

[data-theme="dark"] .nav-links.active {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Icono skill-github: en dark su color hover negro quedaría invisible */
[data-theme="dark"] .skill-github:hover {
    color: #94a3b8;
}

/* GitHub social icon: fondo negro (#181717) con --white redefinido a oscuro = texto invisible */
[data-theme="dark"] .social-github:hover,
[data-theme="dark"] .footer__social--github:hover {
    background: #181717;
    color: #f1f5f9;
}

/* Footer en dark: --white pasa a ser un tono oscuro (#0a2733) para superficies
   con micro-tinte baltic, así que los textos del footer (que usan var(--white))
   se vuelven ilegibles sobre --bg-dark. Forzamos textos claros aquí. */
[data-theme="dark"] .footer,
[data-theme="dark"] .footer__logo,
[data-theme="dark"] .footer__heading {
    color: #f1f5f9;
}

[data-theme="dark"] .footer__copy strong {
    color: #ffffff;
}

/* ============================================================
   TOGGLE BUTTON — diseño tipo iOS switch
   ============================================================ */

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-radius: 999px;
    transition: outline 0.2s ease;
}

.theme-toggle:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Pista (track): pastilla que cambia de color */
.theme-toggle__track {
    position: relative;
    width: 52px;
    height: 28px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.35s ease;
    flex-shrink: 0;
}

[data-theme="dark"] .theme-toggle__track {
    background: var(--primary-color);
}

/* Thumb: círculo que desliza con resorte */
.theme-toggle__thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: var(--white, #fff);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.35s ease;
}

/* En dark: desliza hacia la derecha (52 - 20 - 4 - 4 = 24px) */
[data-theme="dark"] .theme-toggle__thumb {
    transform: translateX(24px);
    background: var(--bg-dark, #020617);
}

/* Iconos dentro del thumb: cross-fade sol ↔ luna */
.theme-toggle__sun,
.theme-toggle__moon {
    position: absolute;
    font-size: 0.9rem;
    transition: opacity 0.25s ease, transform 0.35s ease;
}

.theme-toggle__sun {
    color: #f59e0b;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle__moon {
    color: #02c39a;
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}

[data-theme="dark"] .theme-toggle__sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}

[data-theme="dark"] .theme-toggle__moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.about-content,
.skills-grid,
.projects-grid {
    animation: fadeInUp 0.8s ease forwards;
}

/* Scroll animations */
.skill-card,
.project-card {
    opacity: 0;
    transform: translateY(30px);
}

.skill-card.visible,
.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   BOOT SCREEN — splash de arranque tipo terminal
   ============================================================ */
#boot-screen {
    position: fixed;
    inset: 0;
    background: #060d12;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#boot-screen.boot--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot__inner {
    width: min(620px, 90vw);
    padding: 0 20px;
}

.boot__title {
    font-size: clamp(2.4rem, 8vw, 3.8rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2.8rem;
    letter-spacing: -0.01em;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    line-height: 1.1;
}

.boot__jeff {
    color: #02c39a;
}

.boot__log {
    margin-bottom: 2rem;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: clamp(0.78rem, 2.2vw, 0.9rem);
    line-height: 1.9;
    display: flex;
    flex-direction: column;
}

.boot__line {
    opacity: 0;
    animation: bootFadeIn 0.12s ease forwards;
    color: rgba(255, 255, 255, 0.70);
}

.boot__init {
    color: rgba(255, 255, 255, 0.38);
    margin-bottom: 0.2rem;
}

@keyframes bootFadeIn {
    to { opacity: 1; }
}

/* El fundido del arranque es solo opacidad (no es movimiento vestibular),
   así que lo mantenemos aunque el sistema pida "reducir movimiento".
   Gana a la regla global gracias a mayor especificidad + !important. */
@media (prefers-reduced-motion: reduce) {
    .boot__line {
        animation-duration: 0.25s !important;
    }
}

.boot__ok {
    color: #02c39a;
    font-weight: 700;
}

.boot__progress-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.boot__bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    overflow: hidden;
}

.boot__fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #028090, #02c39a);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.boot__pct {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.40);
    min-width: 3.5ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   PÁGINAS INTERNAS (Servicios, Blog, Artículos) — añadido en v4
   ============================================================ */

/* Migas de pan (breadcrumb) */
.breadcrumb {
    padding-top: 100px;
    padding-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}
.breadcrumb a {
    color: var(--secondary-color);
}
.breadcrumb a:hover {
    text-decoration: underline;
}

/* Encabezado de página interna */
.page-hero {
    padding: 24px 20px 48px;
    text-align: center;
}
.page-hero h1 {
    font-size: clamp(1.9rem, 5vw, 3rem);
    color: var(--text-dark);
    margin-bottom: 16px;
}
.page-hero__lead {
    max-width: 680px;
    margin: 0 auto 28px;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Reutiliza la grilla de skills para servicios; añade descripción */
.services {
    padding: 20px 20px 80px;
}
.services .skill-card p {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Banda de llamada a la acción */
.cta-band {
    background: var(--gradient);
    color: var(--white);
    text-align: center;
    padding: 64px 20px;
}
.cta-band h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 12px;
}
.cta-band p {
    margin-bottom: 24px;
    opacity: 0.95;
}
.cta-band .btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

/* Lista del blog */
.blog-list {
    padding: 20px 20px 80px;
}
.blog-list__grid {
    display: grid;
    gap: 24px;
    max-width: 760px;
    margin: 0 auto;
}
.post-card {
    background: var(--white);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.post-card__title {
    font-size: 1.4rem;
    margin-bottom: 8px;
}
.post-card__title a {
    color: var(--text-dark);
}
.post-card__title a:hover {
    color: var(--secondary-color);
}
.post-card__meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}
.post-card__excerpt {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}
.post-card__link {
    font-weight: 600;
    color: var(--secondary-color);
}

/* Artículo individual */
.post {
    max-width: 720px;
    padding-bottom: 80px;
}
.post__header {
    margin-bottom: 24px;
}
.post__header h1 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    color: var(--text-dark);
    line-height: 1.25;
    margin-bottom: 12px;
}
.post__meta {
    font-size: 0.9rem;
    color: var(--text-light);
}
.post__lead {
    font-size: 1.15rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 28px;
}
.post h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 32px 0 12px;
}
.post p,
.post li {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 12px;
}
.post ul,
.post ol {
    padding-left: 24px;
    margin-bottom: 16px;
}
.post code {
    background: rgba(2, 128, 144, 0.12);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}
.post__cta {
    margin-top: 32px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
}
.post__cta a {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Modo oscuro para las páginas internas */
[data-theme="dark"] .page-hero h1,
[data-theme="dark"] .post__header h1,
[data-theme="dark"] .post h2,
[data-theme="dark"] .post p,
[data-theme="dark"] .post li,
[data-theme="dark"] .post__lead,
[data-theme="dark"] .post-card__title a {
    color: #e2e8f0;
}
[data-theme="dark"] .post-card {
    background: #0b1f29;
    border-color: rgba(255, 255, 255, 0.08);
}
