/* ==========================================
   VARIABLES CSS - TU PALETA DE COLORES
   ========================================== */
:root {
    --bg-primary: #161b22;
    --bg-secondary: #0d1117;
    --text-primary: #e2e8f0;
    --text-secondary: #8b949e;
    --terminal-green: #2aff61;
    --terminal-green-light: #5bff81; /* Para efectos de gradiente */
    --hover-purple: #cb6ce6;
    --card-bg: #1c2128;
    --border-color: #30363d;
}

/* ==========================================
   RESET Y BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Ubuntu', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================
   TIPOGRAFÍAS
   ========================================== */
h1, h2, h3 {
    font-family: 'Arial Black', sans-serif;
    font-weight: 900;
}

/* ==========================================
   HEADER - NAVEGACIÓN STICKY
   ========================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.5s ease;
}

header.show {
    opacity: 1;
    transform: translateY(0);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Major Mono Display', monospace;
    font-size: 1.3rem;
    color: var(--terminal-green);
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
    font-family: 'IBM Plex Mono', monospace;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--terminal-green);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--terminal-green);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
main {
    opacity: 0;
    transition: opacity 0.8s ease;
}

main.show {
    opacity: 1;
}

/* ==========================================
   SECCIONES - LAYOUT BASE
   ========================================== */
section {
    min-height: 100vh;
    padding: 6rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================
   HERO SECTION (#inicio)
   ========================================== */
#inicio {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    padding-top: 0;
}

/* Texto estilo terminal arriba */
.terminal-prompt {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--terminal-green);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* Contenedor del título */
.hero-title {
    position: relative;
    margin-bottom: 1rem;
}

/* Texto de fondo transparente */
.hero-bg-text {
    position: absolute;
    top: 50%;
    left: -2rem;
    transform: translateY(-50%);
    font-family: 'Major Mono Display', monospace;
    font-size: clamp(3rem, 10vw, 8rem);
    color: rgba(42, 255, 97, 0.03);
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.2s forwards;
}

.hero-name {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--text-primary);
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.4s forwards;
}

.hero-role {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.3rem;
    color: var(--terminal-green);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.6s forwards;
}

/* Botones de acción */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.8s forwards;
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
    padding: 0.9rem 1.8rem;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: 'IBM Plex Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--terminal-green);
    color: var(--bg-primary);
    font-weight: bold;
}

.btn-primary:hover {
    background: var(--hover-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(203, 108, 230, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--terminal-green);
    border: 2px solid var(--terminal-green);
}

.btn-secondary:hover {
    background: var(--terminal-green);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* ==========================================
   SOBRE MÍ
   ========================================== */
#sobre-mi {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--terminal-green);
    position: relative;
}

/* Texto de fondo decorativo para títulos de sección */
.section-title::before {
    content: attr(data-bg);
    position: absolute;
    top: 50%;
    left: -1rem;
    transform: translateY(-50%);
    font-family: 'Major Mono Display', monospace;
    font-size: 4rem;
    color: rgba(42, 255, 97, 0.03);
    z-index: -1;
    white-space: nowrap;
}

.about-content {
    max-width: 800px;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-content strong {
    color: var(--text-primary);
}

.profile-circle {
    margin-top: -25rem;
    margin-left: 55rem;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--terminal-green) 0%, var(--hover-purple) 100%);
    opacity: 80%;
    border: 2px solid var(--terminal-green);
}

.profile-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ==========================================
   PROYECTOS
   ========================================== */
#proyectos {
    text-align: center;
}

#proyectos .section-title {
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.8rem;
    transition: all 0.3s ease;
    text-align: left;
}

.project-card:hover {
    border-color: var(--terminal-green);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(42, 255, 97, 0.1);
}

.project-card h3 {
    color: var(--terminal-green);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

/* Contenedor de la imagen */
.project-image {
    width: 100%;
    height: 200px;  /* ✅ Altura fija */
    background: var(--bg-primary);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;  /* Importante: recorta lo que sobresalga */
    border: 1px solid var(--border-color);
}

/* La imagen dentro del contenedor */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* Recorta manteniendo proporciones */
    transition: transform 0.3s ease;
}

/* Efecto hover en la imagen */
.project-card:hover .project-image img {
    transform: scale(1.05);  /* Zoom suave al pasar el mouse */
}

/* Placeholder si no hay imagen */
.project-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    color: var(--terminal-green);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 3rem;
    opacity: 0.3;
}

.tech-tag {
    background: rgba(42, 255, 97, 0.1);
    color: var(--terminal-green);
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-family: 'IBM Plex Mono', monospace;
}

.project-link .icon{
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: currentColor;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    color: var(--terminal-green);
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.project-links a:hover {
    color: var(--hover-purple);
}

/* ==========================================
   CONTACTO
   ========================================== */
#contactame {
    text-align: center;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

/* ===== FORMULARIO ===== */
.contact-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: left;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--terminal-green);
    margin-bottom: 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--terminal-green);
    box-shadow: 0 0 0 3px rgba(42, 255, 97, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(226, 232, 240, 0.4);
}

/* Input con error */
.form-input.input-error,
.form-textarea.input-error {
    border-color: #ff4444;
}

.form-error {
    display: none;
    color: #ff4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Botón de envío */
.btn-submit {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1rem;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

/* Mensajes de estado */
.form-status {
    margin-top: 1.5rem;
}

.form-success,
.form-error-general {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: none;
}

.form-success {
    background: rgba(42, 255, 97, 0.1);
    border: 2px solid var(--terminal-green);
    color: var(--terminal-green);
}

.form-error-general {
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid #ff4444;
    color: #ff4444;
}
/* ==========================================
   FOOTER PROFESIONAL
   ========================================== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 1.5rem;
    font-family: 'IBM Plex Mono', monospace;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
}

/* ===== COLUMNA 1: BRANDING ===== */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid var(--terminal-green);
    padding: 0.3rem;
    background: var(--bg-primary);
}

.footer-name {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.footer-title {
    font-size: 0.85rem;
    color: var(--terminal-green);
}

/* ===== COLUMNA 2: REDES SOCIALES ===== */
.footer-social {
    text-align: center;
}

.footer-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-link img {
    width: 32px;
    height: 32px;
    filter: grayscale(100%) brightness(0.7);
    transition: all 0.3s ease;
}

.social-link span {
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--terminal-green);
}

.social-link:hover img {
    filter: grayscale(0%) brightness(1);
    transform: translateY(-3px);
}

.social-link:hover span {
    opacity: 1;
    transform: translateY(0);
}

/* ===== COLUMNA 3: CONTACTO ===== */
.footer-contact {
    text-align: right;
}

.footer-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.footer-icon {
    font-size: 1.1rem;
}

.footer-info a {
    color: var(--terminal-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-info a:hover {
    color: var(--hover-purple);
}

/* ===== COPYRIGHT ===== */
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.heart {
    color: var(--terminal-green);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        flex-direction: column;
        text-align: center;
    }

    .footer-contact {
        text-align: center;
    }

    .footer-info {
        justify-content: center;
    }

    .social-links {
        gap: 2rem;
    }
}
/* ==========================================
   ANIMACIONES BASE
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ==========================================
   MENÚ HAMBURGUESA (oculto por defecto)
   ========================================== */
.menu-toggle {
    display: none; /* Oculto en desktop */
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--terminal-green);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Animación del menú hamburguesa cuando está abierto */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================
   FIX: IMAGEN DE PERFIL RESPONSIVE
   ========================================== */
#sobre-mi {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.about-image {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.profile-circle {
    width: 250px;
    height: 250px;
    margin: 0; /* Quitar márgenes absolutos */
    border-radius: 50%;
    background: linear-gradient(135deg, var(--terminal-green) 0%, var(--hover-purple) 100%);
    opacity: 0.9;
    border: 3px solid var(--terminal-green);
    overflow: hidden;
    box-shadow: 0 0 30px rgba(42, 255, 97, 0.3);
}

.profile-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ==========================================
   RESPONSIVE - TABLETS (menos de 1024px)
   ========================================== */
@media (max-width: 1024px) {
    
    /* Navegación */
    nav {
        padding: 0 1.5rem;
    }
    
    .nav-links {
        gap: 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Secciones */
    section {
        padding: 5rem 1.5rem 3rem;
    }
    
    /* Hero */
    .hero-bg-text {
        font-size: clamp(2.5rem, 8vw, 6rem);
        left: -1rem;
    }
    
    .hero-name {
        font-size: clamp(1.8rem, 5vw, 3rem);
    }
    
    /* Proyectos */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .project-image {
        height: 180px;
    }
    
    /* Sobre mí con imagen al lado */
    #sobre-mi {
        grid-template-columns: 2fr 1fr;
        gap: 3rem;
        align-items: center;
    }
    
    .about-image {
        margin-top: 0;
    }
    
    .profile-circle {
        width: 200px;
        height: 200px;
    }
}

/* ==========================================
   RESPONSIVE - MÓVILES (menos de 768px)
   ========================================== */
@media (max-width: 768px) {
    
    /* ===== NAVEGACIÓN MÓVIL ===== */
    header {
        padding: 0.8rem 0;
    }
    
    nav {
        padding: 0 1rem;
        position: relative;
    }
    
    .logo {
        font-size: 1.2rem;
        z-index: 1001;
    }
    
    /* Mostrar menú hamburguesa */
    .menu-toggle {
        display: flex;
    }
    
    /* Menú móvil */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Oculto fuera de pantalla */
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-primary);
        border-left: 2px solid var(--terminal-green);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1000;
    }
    
    /* Menú abierto */
    .nav-links.active {
        right: 0;
    }
    
    /* Links del menú móvil */
    .nav-links li {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateX(50px);
        transition: all 0.3s ease;
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    /* Delay escalonado para animación */
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    
    .nav-links a {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
        border: 1px solid transparent;
        border-radius: 5px;
        transition: all 0.3s ease;
    }
    
    .nav-links a:hover,
    .nav-links a:focus {
        background: rgba(42, 255, 97, 0.1);
        border-color: var(--terminal-green);
    }
    
    .nav-links a::after {
        display: none;
    }
    
    /* Overlay oscuro cuando el menú está abierto */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }
    
    body.menu-open {
        overflow: hidden; /* Evita scroll cuando el menú está abierto */
    }
    
    /* ===== SECCIONES ===== */
    section {
        padding: 4rem 1rem 3rem;
        min-height: auto;
    }
    
    /* ===== HERO SECTION ===== */
    #inicio {
        padding-top: 6rem;
    }
    
    .terminal-prompt {
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-bg-text {
        display: none; /* Ocultar en móvil */
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-name {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .hero-role {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    /* ===== SOBRE MÍ ===== */
    #sobre-mi {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title::before {
        font-size: 3rem;
        left: -0.5rem;
    }
    
    .about-content p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .about-image {
        margin-top: 2rem;
    }
    
    .profile-circle {
        width: 200px;
        height: 200px;
    }
    
    /* ===== PROYECTOS ===== */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    .project-card h3 {
        font-size: 1.2rem;
    }
    
    .project-card p {
        font-size: 0.9rem;
    }
    
    .project-image {
        height: 180px;
    }
    
    .tech-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
    
    .project-links {
        flex-wrap: wrap;
    }
    
    .project-links a {
        flex: 1 1 45%;
        text-align: center;
        padding: 0.7rem 0.5rem;
        background: rgba(42, 255, 97, 0.1);
        border: 1px solid var(--terminal-green);
        border-radius: 5px;
    }
    
    /* ===== CONTACTO ===== */
    .contact-intro {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-input,
    .form-textarea {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 0.8rem;
    }
    
    .btn-submit {
        font-size: 1rem;
    }
    
    /* ===== FOOTER ===== */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        flex-direction: column;
        justify-content: center;
    }
    
    .footer-contact {
        text-align: center;
    }
    
    .footer-info {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* ==========================================
   MÓVILES PEQUEÑOS (menos de 480px)
   ========================================== */
@media (max-width: 480px) {
    
    /* Hero ultra compacto */
    .hero-name {
        font-size: 1.5rem;
    }
    
    .hero-role {
        font-size: 1rem;
    }
    
    /* Secciones más compactas */
    section {
        padding: 3rem 0.8rem 2rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-title::before {
        display: none;
    }
    
    /* Proyectos */
    .project-card {
        padding: 1.2rem;
    }
    
    .project-image {
        height: 150px;
    }
    
    /* Formulario */
    .contact-form {
        padding: 1.2rem;
    }
    
    /* Footer */
    footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-logo {
        width: 40px;
        height: 40px;
    }
    
    .social-link img {
        width: 28px;
        height: 28px;
    }
}

/* ==========================================
   LANDSCAPE MODE (móviles horizontales)
   ========================================== */
@media (max-width: 768px) and (orientation: landscape) {
    
    #inicio {
        min-height: auto;
        padding: 3rem 1rem;
    }
    
    .hero-name {
        font-size: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: row;
        gap: 1rem;
    }
    
    .btn {
        width: auto;
        padding: 0.7rem 1.5rem;
    }
    
    section {
        min-height: auto;
        padding: 3rem 1rem 2rem;
    }
    
    .nav-links {
        width: 50%;
        max-width: 250px;
    }
}

/* ==========================================
   PANTALLAS GRANDES (más de 1440px)
   ========================================== */
@media (min-width: 1440px) {
    
    section {
        max-width: 1400px;
    }
    
    .hero-name {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .project-image {
        height: 240px;
    }
    
    .profile-circle {
        width: 300px;
        height: 300px;
    }
}

/* ==========================================
   TOUCH DEVICES
   ========================================== */
@media (hover: none) and (pointer: coarse) {
    
    /* Botones más grandes */
    .btn {
        padding: 1.1rem 2rem;
        font-size: 1rem;
    }
    
    .nav-links a {
        padding: 1.2rem;
    }
    
    /* Quitar efectos hover */
    .project-card:hover {
        transform: none;
        border-color: var(--terminal-green);
    }
    
    .project-card:active {
        transform: scale(0.98);
    }
}

/* ==========================================
   REDUCIR ANIMACIONES (accesibilidad)
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .menu-toggle.active .hamburger-line {
        transition: none;
    }
}