/* ========================================
   Variables CSS - Sistema de Temas
   ======================================== */

:root {
    /* Colores Tema Oscuro (por defecto) */
    --bg-primary: #272822;
    --bg-secondary: #3a3a3a;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --accent: #f18661;
    --accent-hover: #ff9a75;
    --shadow: rgba(0, 0, 0, 0.3);
    --border: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    /* Colores Tema Claro */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #272822;
    --text-secondary: #666666;
    --accent: #f18661;
    --accent-hover: #e57553;
    --shadow: rgba(0, 0, 0, 0.1);
    --border: rgba(0, 0, 0, 0.1);
}

/* ========================================
   Reset y Estilos Base
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

/* ========================================
   Theme Toggle Button
   ======================================== */

.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 6px var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--accent);
    border-color: var(--accent);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

[data-theme="light"] .sun-icon {
    display: block;
}

[data-theme="light"] .moon-icon {
    display: none;
}

/* ========================================
   Container Principal
   ======================================== */

.container {
    max-width: 500px;
    width: 100%;
    animation: fadeIn 0.6s ease-out;
}

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

/* ========================================
   Profile Section
   ======================================== */

.profile {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.profile-image {
    width: 120px;
    height: auto;
    /* border-radius: 50%; */
    
    /* border: 4px solid var(--accent); */
    margin-bottom: 1.5rem;
    /* box-shadow: 0 8px 16px var(--shadow); */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/*
.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px var(--shadow);
} */

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.profile-bio {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   Social Links
   ======================================== */

.links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
    min-height: 60px;
}

.link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(241, 134, 97, 0.1), transparent);
    transition: left 0.5s ease;
}

.link-button:hover::before {
    left: 100%;
}

.link-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px var(--shadow);
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.link-button:active {
    transform: translateY(-2px) scale(1);
}

.link-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Animación de entrada escalonada para los links */
.link-button:nth-child(1) { animation: slideIn 0.5s ease-out 0.3s backwards; }
.link-button:nth-child(2) { animation: slideIn 0.5s ease-out 0.4s backwards; }
.link-button:nth-child(3) { animation: slideIn 0.5s ease-out 0.5s backwards; }
.link-button:nth-child(4) { animation: slideIn 0.5s ease-out 0.6s backwards; }
.link-button:nth-child(5) { animation: slideIn 0.5s ease-out 0.7s backwards; }
.link-button:nth-child(6) { animation: slideIn 0.5s ease-out 0.8s backwards; }
.link-button:nth-child(7) { animation: slideIn 0.5s ease-out 0.9s backwards; }
.link-button:nth-child(8) { animation: slideIn 0.5s ease-out 1s backwards; }

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

/* ========================================
   Footer
   ======================================== */

.footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    animation: fadeIn 0.6s ease-out 1.2s backwards;
}

.footer p {
    margin: 0;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablets */
@media (max-width: 768px) {
    body {
        padding: 1.5rem 1rem;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 2.75rem;
        height: 2.75rem;
    }

    .profile-image {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 1.75rem;
    }

    .profile-bio {
        font-size: 0.95rem;
    }

    .link-button {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    body {
        padding: 1rem 0.75rem;
    }

    .theme-toggle {
        width: 2.5rem;
        height: 2.5rem;
    }

    .theme-toggle svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .profile-image {
        width: 90px;
        height: 90px;
        border-width: 3px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-bio {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .link-button {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        min-height: 56px;
    }

    .link-icon {
        width: 20px;
        height: 20px;
    }

    .footer {
        font-size: 0.8rem;
        padding: 1.5rem 0 0.5rem;
    }
}

/* ========================================
   Accesibilidad
   ======================================== */

/* Focus visible para navegación con teclado */
.theme-toggle:focus-visible,
.link-button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

/* Reducir movimiento para usuarios con preferencias de accesibilidad */
@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;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .theme-toggle {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .link-button {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}
