/* 
 * Tema: Purple Glassmorphism
 * Autor: Aline
 * Descripción: Hoja de estilos principal para el portafolio.
 */

/* =========================================
   Variables Globales (:root)
   ========================================= */
:root {
    /* Colores de Fondo */
    --bg-dark: #241235;
    /* Violeta oscuro profundo */
    --bg-light: rgba(255, 255, 255, 0.1);
    /* Blanco semitransparente para efectos */

    /* Tipografía */
    --text-primary: #ffffff;
    /* Blanco puro para texto principal */
    --text-secondary: #e2d9f3;
    /* Lavanda claro para texto secundario */

    /* Colores de Acento */
    --accent: #d8b4fe;
    /* Lavanda suave principal */
    --accent-glow: rgba(216, 180, 254, 0.5);
    /* Resplandor del acento */
    --primary-gradient: linear-gradient(135deg, #a78bfa 0%, #d8b4fe 100%);
    /* Degradado principal */
    --white: #ffffff;

    /* Fuentes y Configuraciones */
    --font-main: 'Outfit', sans-serif;
    /* Fuente principal importada de Google Fonts */
    --transition: all 0.3s ease;
    /* Transición suave estándar para hover */
    --nav-height: 80px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    /* Borde sutil para efecto cristal */
}

/* =========================================
   Reset y Estilos Base
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Asegura que padding no aumente el tamaño total */
}

html {
    scroll-behavior: smooth;
    /* Desplazamiento suave al navegar por anclas */
}

body {
    background-color: #1a0b2e;
    /* Color de fondo base muy oscuro */
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Evita scroll horizontal no deseado */
    position: relative;
    min-height: 100vh;
}

/* =========================================
   Fondo Animado (Blur Blobs)
   ========================================= */
/* Pseudo-elementos para crear las esferas de luz difuminadas de fondo */
body::before,
body::after {
    content: '';
    position: fixed;
    /* Fijo para que no se muevan al hacer scroll */
    border-radius: 50%;
    /* Forma circular */
    filter: blur(100px);
    /* Desenfoque fuerte para efecto ambiental */
    z-index: -1;
    /* Detrás del contenido */
    opacity: 0.6;
}

body::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #7c3aed, #4c1d95);
    /* Violeta */
    top: -100px;
    left: -100px;
    animation: floatBlob 10s infinite alternate;
    /* Animación de flotación */
}

body::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #ec4899, #db2777);
    /* Rosa */
    bottom: -100px;
    right: -100px;
    animation: floatBlob 12s infinite alternate-reverse;
    /* Animación inversa */
}

/* Animación de las esferas de fondo */
@keyframes floatBlob {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Enlaces generales */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* =========================================
   Clases de Utilidad
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    /* Centrado horizontal */
    padding: 0 20px;
}

.section {
    padding: 100px 0;
    /* Espaciado vertical amplio entre secciones */
}

.highlight {
    color: var(--accent);
    font-family: monospace;
    /* Fuente monoespaciada para destacar */
    font-size: 14px;
}

/* =========================================
   Botones (Estilo Cristal)
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: var(--glass-border);
    backdrop-filter: blur(5px);
    /* Desenfoque detrás del botón */
}

.btn-primary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    /* Se eleva al pasar el mouse */
    /* Resplandor intenso al hover */
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(167, 139, 250, 0.2);
    border-color: var(--accent);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    margin-left: 15px;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

/* =========================================
   Barra de Navegación (Navbar)
   ========================================= */
.navbar {
    position: fixed;
    /* Siempre visible arriba */
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    /* Centrado perfecto */
    width: 90%;
    max-width: 1200px;
    height: 70px;
    /* Efecto Glassmorphism */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: var(--glass-border);
    z-index: 1000;
    /* Siempre encima */
    display: flex;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
    /* Sombra de texto suave */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    /* Degradado en el texto */
    background: linear-gradient(to right, #fff, #d8b4fe);
    background-clip: text;
    /* Estándar */
    -webkit-background-clip: text;
    /* Webkit */
    -webkit-text-fill-color: transparent;
}

.logo .dot {
    color: var(--accent);
    /* Punto final de color */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--white);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Botón especial en el menú */
.btn-glow {
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.btn-glow:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px var(--accent-glow);
}

.mobile-menu-btn {
    display: none;
    /* Oculto en escritorio */
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

/* =========================================
   Sección Hero (Principal)
   ========================================= */
.hero-section {
    min-height: 100vh;
    /* Ocupa toda la altura de la pantalla */
    display: flex;
    align-items: center;
    padding-top: 0;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
}


.greeting {
    display: block;
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.hero-title {
    font-size: 80px;
    font-weight: 700;
    /* Texto con degradado */
    background: linear-gradient(to right, #fff, #d8b4fe);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1.1;
    /* Efecto de resplandor más sutil */
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.3),
        0 0 15px rgba(255, 255, 255, 0.25),
        0 0 25px rgba(216, 180, 254, 0.3),
        0 0 35px rgba(216, 180, 254, 0.25);
    filter: drop-shadow(0 0 8px rgba(216, 180, 254, 0.3));
    /* Animación de parpadeo */
    animation: glowPulse 2s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-subtitle .typewriter-text {
    transition: opacity 0.5s ease-out;
    opacity: 1;
}

.hero-subtitle .typewriter-text.fade-out {
    opacity: 0;
}

.hero-subtitle .cursor {
    display: inline-block;
    margin-left: 2px;
    color: var(--accent);
    animation: blinkCursor 1s infinite;
}

@keyframes blinkCursor {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}





.hero-text {
    max-width: 500px;
    color: var(--text-secondary);
    font-size: 20px;
    margin-bottom: 50px;
}

/* =========================================
   Sección Sobre Mí
   ========================================= */
.section-title {
    display: flex;
    align-items: center;
    font-size: 32px;
    color: var(--white);
    margin-bottom: 40px;
    white-space: nowrap;
}

.section-number {
    color: var(--accent);
    font-family: monospace;
    font-size: 24px;
    margin-right: 10px;
}

/* Línea horizontal después del título */
.section-title::after {
    content: "";
    display: block;
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin-left: 20px;
}

.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    /* Texto más ancho que imagen */
    gap: 50px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.img-placeholder {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1/1;
    /* Mantiene proporción cuadrada */
    background: rgba(255, 255, 255, 0.05);
    /* Efecto cristal */
    backdrop-filter: blur(10px);
    border-radius: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: var(--transition);
    border: var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

.img-placeholder:hover {
    transform: rotate(3deg);
    /* Leve rotación al hover */
    border-color: var(--accent);
}

/* =========================================
   Skills Grid (Habilidades)
   ========================================= */
.skills-grid {
    display: grid;
    /* Grid automático y responsive */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border: var(--glass-border);
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo (shine) al pasar el mouse */
.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card:hover {
    transform: translateY(-10px);
    /* Flota hacia arriba */
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

/* Animación de Moneda (Coin Spin) para iconos */
@keyframes coinSpin {
    0% {
        transform: rotateY(0);
    }

    100% {
        transform: rotateY(360deg);
    }
}

.skill-card:hover i {
    animation: coinSpin 0.8s ease-in-out;
    color: var(--white);
}

.skill-card i {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px var(--accent-glow));
    transition: var(--transition);
}

.skill-card h3 {
    font-size: 18px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

/* =========================================
   Proyectos
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(216, 180, 254, 0.2);
}

/* Preview de la imagen del proyecto */
.project-preview {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a0b2e 0%, #2d1b4e 100%);
}

.project-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-screenshot {
    transform: scale(1.1);
}

/* Overlay que aparece al hacer hover */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 11, 46, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-icon-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    transition: all 0.3s ease;
}

.project-icon-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Contenido de la card */
.project-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
}

.project-title {
    color: var(--white);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: var(--transition);
}

.project-card:hover .project-title {
    color: var(--accent);
}

.project-description {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Iconos de tecnologías */
.project-tech-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.project-tech-icons i {
    font-size: 28px;
    color: var(--accent);
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px var(--accent-glow));
}

.project-tech-icons i:hover {
    color: var(--white);
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

/* Botón de Visitar */
.project-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateX(5px);
}

.project-btn i {
    transition: transform 0.3s ease;
}

.project-btn:hover i {
    transform: translateX(5px);
}

/* =========================================
   Sección de Contacto (Formulario)
   ========================================= */
.contact-section {
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 100px;
}

.contact-title {
    font-size: 50px;
    color: var(--white);
    margin: 20px 0;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 20px;
    margin-bottom: 50px;
}

/* Estilos del Formulario */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: var(--glass-border);
    border-radius: 10px;
    color: var(--white);
    /* Fuente monoespaciada tipo programador */
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    outline: none;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

textarea.form-input {
    resize: vertical;
    /* Permite redimensionar solo verticalmente */
}

.big-btn {
    padding: 15px 40px;
    font-size: 18px;
    width: 100%;
}

/* =========================================
   Footer (Pie de página)
   ========================================= */
.footer {
    padding: 20px 0;
    text-align: center;
    background: transparent;
    border-top: var(--glass-border);
}

.social-links {
    margin-bottom: 20px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 20px;
    margin: 0 10px;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
    display: inline-block;
}

.credits {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 12px;
}

/* =========================================
   Responsive (Adaptable a móviles)
   ========================================= */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Oculto por defecto */
        position: absolute;
        top: 80px;
        right: 0;
        width: 100%;
        background: rgba(43, 20, 70, 0.95);
        /* Fondo sólido para legibilidad */
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0 0 20px 20px;
    }

    .nav-links.active {
        display: flex;
        /* Mostrar cuando está activo */
        animation: fadeIn 0.3s ease-in-out;
    }

    .mobile-menu-btn {
        display: block;
        /* Botón hamburguesa visible */
    }

    .hero-title {
        font-size: 50px;
    }


    /* Ajuste de Navbar en móvil */
    .navbar {
        width: 100%;
        left: 0;
        top: 0;
        transform: none;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .about-content {
        grid-template-columns: 1fr;
        /* Columna única */
    }

    .section-title::after {
        width: 100%;
        display: none;
    }

    .container {
        padding: 0 25px;
    }
}

/* Animación de entrada suave */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación de parpadeo con resplandor para el título principal */
@keyframes glowPulse {

    0%,
    100% {
        text-shadow:
            0 0 8px rgba(255, 255, 255, 0.3),
            0 0 15px rgba(255, 255, 255, 0.25),
            0 0 25px rgba(216, 180, 254, 0.3),
            0 0 35px rgba(216, 180, 254, 0.25);
        opacity: 1;
    }

    50% {
        text-shadow:
            0 0 4px rgba(255, 255, 255, 0.2),
            0 0 8px rgba(255, 255, 255, 0.15),
            0 0 12px rgba(216, 180, 254, 0.2),
            0 0 16px rgba(216, 180, 254, 0.15);
        opacity: 0.75;
    }
}