/* --- VARIABLES --- */
:root {
    --bg-main: #060D1F;
    --bg-surface: #3C3F5E;
    --primary-color: #0A36B4;
    --primary-hover: #0C40D6;
    --primary-text: #5B7FE8;
    --primary-text-on-surface: #9AB1F5;
    --hero-role: #4D7CFE;
    --secondary-color: #5E556F;
    --warm-accent: #56331E;
    --success: #4ade80;

    --text-main: #f8fafc;
    --text-muted: #BBB6C9;
    --border-color: #5E556F;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    --text-xs: 1.2rem;
    --text-sm: 1.4rem;
    --text-md: 1.6rem;
    --text-lg: 1.8rem;
    --text-xl: 2.4rem;
    --text-2xl: 3.2rem;
    --text-3xl: 4.8rem;

    --radius-md: 8px;
    --radius-lg: 14px;
    --transition: all 0.3s ease;
}

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

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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-size: var(--text-md);
    background-color: var(--bg-main);
    background: radial-gradient(circle at top left, #1a1f3d, var(--bg-main) 70%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
}

.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

:focus-visible {
    outline: 2px solid var(--primary-text);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 3000;
    padding: 10px 16px;
    background-color: var(--primary-color);
    color: var(--text-main);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 1rem;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
}

h2.h2 {
    font-size: var(--text-2xl);
    margin-bottom: 20px;
    text-align: center;
}

/* --- SCROLL REVEAL --- */
.js .reveal {
    opacity: 0;
    translate: 0 24px;
    transition: opacity 0.6s ease var(--reveal-delay, 0ms), translate 0.6s ease var(--reveal-delay, 0ms);
}

/* Las tarjetas conservan además sus propias transiciones de hover */
.js .proyecto.reveal {
    transition: opacity 0.6s ease var(--reveal-delay, 0ms), translate 0.6s ease var(--reveal-delay, 0ms),
        transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.js .reveal.is-visible {
    opacity: 1;
    translate: none;
}

/* --- HERO ENTRANCE --- */
@keyframes fade-up {
    from {
        opacity: 0;
        translate: 0 18px;
    }
}

@keyframes zoom-in {
    from {
        opacity: 0;
        scale: 0.92;
    }
}

@keyframes float {
    50% {
        translate: 0 -10px;
    }
}

@keyframes glow {
    50% {
        opacity: 0.55;
        scale: 0.9;
    }
}

.js .hero-texto > * {
    animation: fade-up 0.7s ease both;
}

.js .hero-texto > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-texto > :nth-child(3) { animation-delay: 0.16s; }
.js .hero-texto > :nth-child(4) { animation-delay: 0.24s; }
.js .hero-texto > :nth-child(5) { animation-delay: 0.32s; }
.js .hero-texto > :nth-child(6) { animation-delay: 0.40s; }
.js .hero-texto > :nth-child(7) { animation-delay: 0.48s; }

.js .hero-imagen {
    animation: zoom-in 0.9s ease 0.2s both;
}

/* --- LANGUAGE CHANGE (View Transitions) --- */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.35s;
}

/* --- HEADER / NAVIGATION --- */
#header-container {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Cuadrícula de puntos sutil detrás del hero, desvanecida hacia los bordes */
#header-container::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(rgba(154, 177, 245, 0.18) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 80%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 80%);
}

#nav {
    background: rgba(6, 13, 31, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    height: 7vh;
    min-height: 60px;
    position: fixed;
    z-index: 1000;
    border-bottom: 1px solid rgba(94, 85, 111, 0.25);
    display: flex;
    align-items: center;
}

/* Barra de progreso de lectura (solo navegadores con scroll-driven animations) */
@supports (animation-timeline: scroll()) {
    @keyframes read-progress {
        to {
            transform: scaleX(1);
        }
    }

    #nav::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, var(--primary-color), var(--primary-text-on-surface));
        transform: scaleX(0);
        transform-origin: left;
        animation: read-progress linear both;
        animation-timeline: scroll(root);
    }
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#nav #Logo img {
    display: block;
    width: 60px;
}

.hamburger {
    background: none;
    border: none;
    padding: 0;
}

.main-nav {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.main-nav__item a {
    display: inline-block;
    color: var(--text-main);
    font-size: var(--text-lg);
    font-family: var(--font-heading);
    font-weight: 500;
    padding: 5px 15px;
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.main-nav__item a:hover,
.main-nav__item a.active {
    color: var(--primary-text);
    border-bottom: 2px solid var(--primary-color);
}

@media screen and (max-width: 1024px) {
    .main-nav__item a {
        font-size: var(--text-md);
        padding: 5px 10px;
    }
}

/* --- HERO SECTION --- */
#titulo {
    min-height: 70vh;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: calc(7vh + 40px) 2rem 40px 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
}

.hero-texto {
    flex: 1 1 auto;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background-color: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: var(--text-main);
    font-size: var(--text-sm);
    font-weight: 500;
}

.hero-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.hero-texto h1 {
    font-size: var(--text-3xl);
    line-height: 1.15;
}

.hero-role {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    color: var(--hero-role);
    font-weight: 500;
    line-height: 1.3;
}

.hero-stack {
    color: var(--text-main);
    font-size: var(--text-md);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.hero-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.hero-location .icon {
    width: 16px;
    height: 16px;
    color: var(--primary-text);
}

.hero-imagen {
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-imagen::before {
    content: '';
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(10, 54, 180, 0.55), transparent 70%);
    filter: blur(40px);
    z-index: -1;
    animation: glow 6s ease-in-out infinite;
}

.hero-imagen img {
    max-width: 350px;
    width: 80%;
    border-radius: 50%;
    border: 2px solid rgba(94, 85, 111, 0.6);
    box-shadow: 0 10px 30px rgba(86, 51, 30, 0.45);
    animation: float 6s ease-in-out infinite;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.2rem;
    margin-top: 10px;
}

.hero-social {
    display: flex;
    gap: 8px;
}

.hero-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: var(--text-main);
    border: 1px solid var(--secondary-color);
    background-color: rgba(60, 63, 94, 0.4);
    transition: var(--transition);
}

.hero-social a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.hero-social .icon {
    width: 20px;
    height: 20px;
}

.btn-principal {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: var(--text-main);
    text-decoration: none;
    font-size: var(--text-lg);
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-principal:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(10, 54, 180, 0.5);
}

.btn-secundario {
    display: inline-block;
    padding: 12px 28px;
    background-color: transparent;
    color: var(--primary-text);
    border: 2px solid var(--primary-text);
    text-decoration: none;
    font-size: var(--text-lg);
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-secundario:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-main);
    transform: translateY(-2px);
}

/* --- TYPEWRITER --- */
.hero-quote {
    font-style: italic;
    color: var(--text-muted);
    font-size: var(--text-md);
    min-height: 2.6rem;
}

.typewriter-cursor {
    color: var(--primary-text);
    font-style: normal;
    font-weight: 300;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- LANGUAGE SWITCH --- */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background-color: rgba(60, 63, 94, 0.4);
    border: 1px solid var(--secondary-color);
    border-radius: 999px;
}

.lang-label {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-main);
    opacity: 0.6;
    padding: 0 4px;
    transition: opacity 0.3s ease;
    user-select: none;
}

.lang-label.active {
    opacity: 1;
}

.lang-toggle-track {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.lang-toggle-track input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.lang-toggle-thumb {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-color);
    border-radius: 22px;
    transition: background-color 0.3s ease;
}

.lang-toggle-thumb::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease;
}

.lang-toggle-track input:checked+.lang-toggle-thumb::before {
    transform: translateX(18px);
}

.lang-toggle-track input:focus-visible+.lang-toggle-thumb {
    outline: 2px solid var(--primary-text);
    outline-offset: 2px;
}

/* --- LAYOUT - SECTIONS --- */
#content-main {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
}

.secciones {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 5%;
    width: 100%;
}

.secciones hr {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border: none;
    margin: 10px auto 30px auto;
    border-radius: 2px;
}

/* --- PROJECTS --- */
#container-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin: 20px auto 0 auto;
    width: 100%;
    max-width: 1000px;
}

.proyecto {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.proyecto:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(86, 51, 30, 0.35);
    border-color: var(--primary-text-on-surface);
}

.proyecto-imagen {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.proyecto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s ease;
}

.proyecto-imagen--left img {
    object-position: top left;
}

.proyecto-imagen--center img {
    object-position: center;
}

.proyecto:hover .proyecto-imagen img {
    transform: scale(1.04);
}

.proyecto-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 24px 24px 24px;
    flex: 1;
}

.proyecto-tag {
    align-self: flex-start;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-text-on-surface);
    background-color: rgba(10, 54, 180, 0.25);
    padding: 4px 10px;
    border-radius: 999px;
}

.proyecto-titulo {
    font-size: var(--text-xl);
    line-height: 1.2;
}

.proyecto-desc {
    color: var(--text-muted);
    font-size: var(--text-md);
    line-height: 1.6;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-badges span {
    background-color: var(--bg-main);
    color: var(--primary-text-on-surface);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.proyecto-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.proyecto-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--secondary-color);
    background-color: rgba(6, 13, 31, 0.35);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.proyecto-link .icon {
    width: 18px;
    height: 18px;
}

.proyecto-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- EXPERIENCE (TIMELINE) --- */
.timeline {
    position: relative;
    max-width: 1000px;
    width: 100%;
    margin: 40px auto 0 auto;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 20px;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 100%;
    padding-left: 60px;
    padding-bottom: 40px;
    box-sizing: border-box;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border: 4px solid var(--bg-main);
    border-radius: 50%;
    left: 20px;
    top: 0;
    margin-left: -10px;
    z-index: 1;
    transition: var(--transition);
}

.timeline-content {
    background-color: var(--bg-surface);
    padding: 25px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary-text-on-surface);
    box-shadow: 0 10px 20px rgba(86, 51, 30, 0.35);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.timeline-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 4px;
    background-color: #fff;
    padding: 3px;
}

.timeline-logo--dark {
    background-color: var(--bg-main);
    border-radius: 8px;
    padding: 0;
}

.timeline-titles h3 {
    margin: 0 0 2px 0;
    color: var(--text-main);
    font-size: var(--text-xl);
    line-height: 1.25;
}

.timeline-titles h4 {
    margin: 0;
    color: var(--primary-text-on-surface);
    font-weight: 500;
}

.timeline-date {
    display: inline-block;
    background-color: rgba(10, 54, 180, 0.15);
    color: var(--primary-text-on-surface);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: var(--text-sm);
    margin-bottom: 15px;
    font-weight: 500;
}

.timeline-tasks {
    margin: 0;
    padding-left: 20px;
    padding-right: 10px;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: left;
}

.timeline-tasks li {
    margin-bottom: 8px;
}

.timeline-tech {
    margin-top: 14px;
}

/* --- SKILLS --- */
.skills-category-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 1000px;
    margin: 40px auto 0 auto;
}

.skills-category h3 {
    font-size: var(--text-xl);
    color: var(--primary-text);
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    grid-gap: 20px;
    justify-items: center;
}

.habilidad {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 240px;
    padding: 12px 20px;
    background-color: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.habilidad img {
    width: 30px;
    height: auto;
    object-fit: contain;
    transition: var(--transition);
}

.habilidad i {
    font-size: 30px;
    line-height: 1;
    transition: var(--transition);
}

.habilidad p {
    margin: 0;
    color: var(--text-main);
    font-size: var(--text-lg);
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.habilidad:hover {
    border-color: var(--secondary-color);
    background-color: rgba(94, 85, 111, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(86, 51, 30, 0.35);
}

.habilidad:hover img,
.habilidad:hover i {
    transform: scale(1.15);
}

/* --- ABOUT --- */
.about-text {
    max-width: 780px;
    color: var(--text-muted);
    font-size: var(--text-lg);
    line-height: 1.9;
    text-align: left;
    margin-top: 20px;
    background: var(--bg-surface);
    padding: 30px 35px;
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 8px 24px rgba(86, 51, 30, 0.25);
}

/* --- CERTIFICATES (CAROUSEL) --- */
.carousel-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    padding: 40px 0;
    width: 100%;
}

#container-certificate {
    display: flex;
    align-items: center;
    width: max-content;
}

.certificado {
    width: 260px;
    margin: 0 20px;
    flex-shrink: 0;
    transition: all 0.5s ease-in-out;
    opacity: 0.3;
    transform: scale(0.85);
    display: flex;
    justify-content: center;
}

.certificado img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.certificado.activo {
    opacity: 1;
    transform: scale(1.1);
    z-index: 10;
}

.certificado.activo img {
    box-shadow: 0 12px 25px rgba(10, 54, 180, 0.35);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(60, 63, 94, 0.8);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    width: 45px;
    height: 45px;
    cursor: pointer;
    z-index: 100;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-main);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* --- FOOTER / CONTACT --- */
#footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 70px 20px 24px 20px;
    background: linear-gradient(180deg, #060D1F 0%, #0B1528 100%);
    border-top: 1px solid rgba(94, 85, 111, 0.25);
}

.social {
    text-align: center;
    color: var(--text-main);
    font-size: var(--text-2xl);
    font-family: var(--font-heading);
    margin-bottom: 20px;
}

.social hr {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 2px;
    margin: 10px auto 0 auto;
}

.contact-intro {
    max-width: 560px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-lg);
}

#socialnet {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
    margin-bottom: 30px;
}

.sociales a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: rgba(60, 63, 94, 0.4);
    border: 1px solid var(--secondary-color);
    color: #FFFFFF;
    text-decoration: none;
    transition: var(--transition);
}

.sociales a .icon {
    width: 22px;
    height: 22px;
}

.sociales a:hover {
    transform: translateY(-3px);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.copy {
    text-align: center;
    width: 100%;
    max-width: 700px;
    color: var(--text-muted);
    font-size: var(--text-sm);
    line-height: 1.8;
}

.copy a {
    color: var(--primary-text-on-surface);
}

/* --- CONTACT FORM --- */
.contact-form {
    width: 100%;
    max-width: 600px;
    margin: 40px auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    background-color: rgba(60, 63, 94, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: var(--text-md);
    padding: 12px 16px;
    outline: none;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 54, 180, 0.3);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.contact-form .btn-principal {
    align-self: flex-start;
    cursor: pointer;
    border: none;
}

.contact-form .btn-principal:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-status {
    text-align: center;
    font-size: var(--text-md);
    font-weight: 500;
    min-height: 2.4rem;
}

.form-status.success {
    color: var(--success);
}

.form-status.error {
    color: #f87171;
}

/* --- CUSTOM MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(6, 13, 31, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s;
}

.modal-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 2.8rem;
    line-height: 1;
    padding: 4px 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-icon {
    margin-bottom: 20px;
    color: var(--text-main);
}

.modal-icon .icon {
    width: 48px;
    height: 48px;
}

.modal-content p {
    color: var(--text-main);
    font-size: var(--text-lg);
    margin-bottom: 25px;
}

.modal-content .btn-principal {
    border: none;
    cursor: pointer;
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .js .reveal {
        opacity: 1;
        translate: none;
    }

    #nav::after {
        display: none;
    }
}
