/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables de colores - Tema oscuro */
:root {
    --color-primary: #ffffff; /* Blanco */
    --color-secondary: #1a1a1a; /* Negro suave */
    --color-accent: #007bff; /* Azul */
    --color-muted: #b3b3b3; /* Gris claro para texto */
    --color-dark: #121212; /* Negro oscuro de fondo */
}

/* Fuentes */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1;
    color: var(--color-primary);
    background-color: var(--color-dark);
    overflow-x: hidden;
    position: relative;
}

/* Scroll snap para secciones y offset por navbar fija */
html,
body {
    scroll-behavior: smooth;
}

main {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 88px; /* altura aprox del navbar */
}

section {
    scroll-snap-align: start;
}

/* Esfera 1 - Izquierda inferior */
body::before {
    content: '';
    position: fixed;
    bottom: 10%;
    left: 15%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
    animation: float-sphere-1 18s ease-in-out infinite;
}

/* Esfera 2 - Derecha superior */
body::after {
    content: '';
    position: fixed;
    top: 20%;
    right: 20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(50px);
    animation: float-sphere-2 22s ease-in-out infinite;
}

@keyframes float-sphere-1 {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(30px, -40px);
    }
    50% {
        transform: translate(-20px, -60px);
    }
    75% {
        transform: translate(40px, -30px);
    }
}

@keyframes float-sphere-2 {
    0%, 100% {
        transform: translate(0, 0);
    }
    33% {
        transform: translate(-35px, 45px);
    }
    66% {
        transform: translate(25px, 30px);
    }
}

/* Esfera 3 - Centro */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(70px);
    animation: float-sphere-3 25s ease-in-out infinite;
}

@keyframes float-sphere-3 {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    20% {
        transform: translate(calc(-50% + 40px), calc(-50% - 30px));
    }
    40% {
        transform: translate(calc(-50% - 30px), calc(-50% + 40px));
    }
    60% {
        transform: translate(calc(-50% + 20px), calc(-50% + 50px));
    }
    80% {
        transform: translate(calc(-50% - 40px), calc(-50% - 20px));
    }
}

/* Asegurar que el header (navbar) quede por encima del resto */
header {
    position: relative;
    z-index: 2000;
}

main {
    position: relative;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--color-muted);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header y Navegación */
.navbar {
    padding: 1.5rem 0;
    background-color: transparent;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000; /* Sobre los contenidos del hero */
    border-bottom: 1px solid transparent; /* evita salto de layout */
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(18, 18, 18, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom-color: rgba(255, 255, 255, 0.06); /* borde sutil */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); /* sombra leve inferior */
}

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

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
}

.contact-title {
    color: var(--color-dark);
}

.contact-subtitle {
    color: var(--color-secondary);
}

.success-message {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(150px);
    max-width: 500px;
    width: 90%;
    padding: 1.2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.95) 0%, rgba(34, 139, 56, 0.95) 100%);
    color: #ffffff;
    border-left: 4px solid #28a745;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    text-align: left;
    z-index: 3000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transition: all 0.3s ease;
}

.success-message::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #28a745;
    border-radius: 0 0 8px 0;
    animation: progressBar 4s linear forwards;
}

.success-message.hide {
    animation: slideOutDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.error-message {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(150px);
    max-width: 500px;
    width: 90%;
    padding: 1.2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.95) 0%, rgba(189, 43, 58, 0.95) 100%);
    color: #ffffff;
    border-left: 4px solid #dc3545;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    text-align: left;
    z-index: 3000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transition: all 0.3s ease;
}

.error-message::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #dc3545;
    border-radius: 0 0 8px 0;
    animation: progressBar 4s linear forwards;
}

.error-message.hide {
    animation: slideOutDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(150px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(150px);
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.logo-typing {
    min-width: 120px; /* Ancho mínimo para "Fernando" */
    display: inline-block;
    color: var(--color-primary);
    position: relative;
    font-family: 'Roboto', sans-serif;
}

.logo-typing::after {
    content: '|';
    animation: blink 1s infinite;
    margin-left: 2px;
}

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

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--color-primary);
    font-weight: 500;
    position: relative;
    padding-bottom: 0.5rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary); /* Cambiado a blanco */
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}


.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-primary);
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 0 40px;
}

/* Estilos genéricos de secciones */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px; /* deja espacio para navbar */
}

.section h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section p {
    max-width: 800px;
}

.portfolio .portfolio-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* Estilos específicos para la sección About */
.about-card {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    color: #000000;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Animaciones on scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    animation-delay: var(--delay, 0s);
}

.about-card h2 {
    color: #000000;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: left;
}

.about-intro {
    color: #000000;
}

.journey-section h3 {
    color: #000000;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
}

.about-intro p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #000000;
    margin-bottom: 0;
    max-width: none;
}

.highlight {
    background: linear-gradient(180deg, transparent 60%, #ffeb3b 60%);
    font-weight: 600;
    padding: 0 2px;
}

.timeline-item {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    border-left: 3px solid #000000;
}

.timeline-item.animate-on-scroll {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: var(--delay, 0s);
}

.timeline-item.animate-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Timeline items sin animación automática */

.timeline-content h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #000000;
    font-weight: 600;
}

.timeline-content p {
    color: #333333;
    line-height: 1.6;
    margin: 0;
    max-width: none;
    font-size: 1rem;
}

.value-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.value-section h3 {
    color: #000000;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.value-section p {
    font-size: 1.125rem;
    line-height: 1.7;
    margin: 0;
    max-width: none;
    color: #000000;
}

/* --- Contact form styles --- */
.contact-card {
    max-width: 800px;
    margin: 1.5rem auto 0;
    background: #ffffff;
    color: #000000;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form .form-row {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #333333;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
    color: #000000;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    background: #ffffff;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.12);
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.form-actions .btn {
    min-width: 160px;
}

/* Ajustar estilo del botón de contacto dentro del formulario */
.contact-card .btn.btn-contact {
    background-color: var(--color-dark);
    border: 2px solid var(--color-dark);
    color: var(--color-primary);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.contact-card .btn.btn-contact:hover {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.contact-card .btn.btn-contact:active {
    transform: translateY(0);
}

/* Estado enviado del botón */
.contact-card .btn.btn-contact.btn-sent {
    background-color: #28a745;
    border-color: #28a745;
    color: #ffffff;
    animation: buttonSentPulse 0.4s ease-out;
}

@keyframes buttonSentPulse {
    0% {
        background-color: var(--color-dark);
        transform: scale(1);
    }
    50% {
        background-color: #28a745;
        transform: scale(1.05);
    }
    100% {
        background-color: #28a745;
        transform: scale(1);
    }
}

/* --- Form status overlay --- */
.form-status {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    backdrop-filter: blur(4px);
}

.form-status.visible {
    opacity: 1;
    visibility: visible;
}

.form-status-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    color: var(--color-primary);
    padding: 2.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.status-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.form-status h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.form-status p {
    margin-bottom: 1.5rem;
    color: var(--color-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.form-status-actions {
    display: flex;
    justify-content: center;
}

.form-status-actions .btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-primary);
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.form-status-actions .btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

/* Spinner y estados para botón de envío */
.btn--with-spinner {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn--spinner { /* el spinner dentro del botón */
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: var(--color-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Estado success para el botón (verde) */
.btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
}

.btn-success .btn-label { display: inline-block; }
.btn-success .btn-check { display: inline-block; margin-left: 8px; }
.btn-check { display: none; }
.btn-success .btn-check { display: inline-block; }

/* Transición suave */
.btn { transition: background-color 0.2s ease, transform 0.12s ease, box-shadow 0.12s ease; }

/* Toast de éxito temporal */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(12px);
    background: rgba(40,167,69,0.95);
    color: #fff;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.28s cubic-bezier(.2,.9,.2,1);
    z-index: 4000;
    font-weight: 600;
}

.toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .contact-card {
        padding: 2rem;
        margin: 0 1rem;
    }
    .form-actions { justify-content: center; }
}

/* Keyframes para animaciones de About */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive para About */
@media (max-width: 768px) {
    .about-card {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .about-card h2 {
        font-size: 2rem;
    }
    
    .journey-section h3,
    .value-section h3 {
        font-size: 1.5rem;
    }
    
    .timeline-item {
        padding-left: 1rem;
        border-left-width: 2px;
    }
}

@media (max-width: 480px) {
    .about-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .about-card h2 {
        font-size: 1.75rem;
    }
    
    .about-intro p,
    .value-section p {
        font-size: 1rem;
    }
    
    .timeline-content h4 {
        font-size: 1.125rem;
    }
    
    .timeline-content p {
        font-size: 0.95rem;
    }
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-content {
    text-align: left;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-content h2 {
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--color-muted);
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em;
}

.hero-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    color: var(--color-muted);
    margin-left: 0;
    margin-right: 0;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInFromLeft 1.2s ease-out 0.3s both;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.image-placeholder {
    width: 500px;
    height: 500px;
    border-radius: 8px;
    background: 
        linear-gradient(180deg, transparent 60%, rgba(18, 18, 18, 0.8) 100%),
        url('../assets/profile.png') center/cover no-repeat;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.btn.btn-cv {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    width: 200px;
    height: 52px;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    display: inline-block;
    position: relative;
    overflow: hidden;
    line-height: 48px;
    transition: background-color 0.4s ease, color 0.4s ease, transform 0.2s ease;
    cursor: pointer;
    border-radius: 4px;
}

.btn.btn-cv span {
    display: block;
    transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1);
}

.btn.btn-cv .text-hover {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
}

.btn.btn-cv:hover {
    background-color: var(--color-primary);
    color: var(--color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn.btn-cv:active {
    transform: translateY(0);
}

.btn.btn-cv:hover .text-original {
    transform: translateY(-100%);
}

.btn.btn-cv:hover .text-hover {
    transform: translateY(-100%);
}

.btn.btn-contact {
    background-color: var(--color-primary);
    border: 2px solid var(--color-primary);
    color: var(--color-dark);
    width: 200px;
    height: 52px;
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: background-color 0.4s ease, color 0.4s ease, transform 0.2s ease;
    cursor: pointer;
    border-radius: 4px;
}

.btn.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn.btn-contact:active {
    transform: translateY(0);
}

/* Nuevos estilos para el bloque de redes sociales en hero-content */
.hero-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.hero-social a {
  font-size: 1.5rem;
  color: inherit;
  transition: color 0.3s ease;
}

.hero-social a:hover {
  color: #0077b5;
}

/* Centrar hero-social en pantallas pequeñas */
@media (max-width: 768px) {
  .hero-social {
    justify-content: center;
    width: 100%;
  }
}

/* --- Media Queries --- */

/* Tablet */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%;
        height: 100vh;
        background-color: var(--color-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .hamburger {
        display: block;
    }

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

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

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

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

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

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .image-placeholder {
        width: 350px;
        height: 350px;
    }

    .btn.btn-cv {
        width: 180px;
        height: 48px;
        line-height: 44px;
        font-size: 0.95rem;
    }

    .btn.btn-contact {
        width: 180px;
        height: 48px;
        font-size: 0.95rem;
    }

    .hero-buttons {
        gap: 0.75rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .hero-layout {
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 2.25rem;
        letter-spacing: -0.01em;
    }

    .hero-content h2 {
        font-size: 1.25rem;
    }

    .hero-content p {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .image-placeholder {
        width: 250px;
        height: 250px;
    }

    .nav-links {
        width: 80%;
    }

    .btn.btn-cv {
        width: 170px;
        height: 46px;
        line-height: 42px;
        font-size: 0.9rem;
    }

    .btn.btn-contact {
        width: 170px;
        height: 46px;
        font-size: 0.9rem;
    }

    .hero-buttons {
        gap: 0.5rem;
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo-typing {
        min-width: 100px;
    }
}

/* Media queries para Contact en mobile */
@media (max-width: 480px) {
    .contact-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }

    .contact-title {
        font-size: 2rem;
    }

    .contact-subtitle {
        font-size: 0.95rem;
    }
}

/* Animación de borde cónico para imagen de perfil */
/**
 * @property es necesario para que la animación funcione correctamente.
 * Sin él, los valores de ángulo no se interpolan adecuadamente.
 */