/* =========================================
   VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    /* Paleta de Colores (Blanco, Negro, Cyan Neón / Morado) */
    --clr-bg: #050505;
    /* Negro casi puro para el fondo */
    --clr-bg-alt: #0a0a0c;
    /* Negro un poco más claro para secciones alternas */
    --clr-text: #e0e0e0;
    /* Blanco roto para el texto general (mejor lectura) */
    --clr-text-light: #ffffff;
    /* Blanco puro para títulos */
    --clr-accent: #00f0ff;
    /* Cyan Neón vibrante */
    --clr-accent-hover: #00d2df;
    /* Cyan ligeramente más oscuro para hovers */
    --clr-glow: rgba(0, 240, 255, 0.4);
    /* Brillo para el Hero */

    /* Variables de Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    /* Fondo semi-transparente muy sutil */
    --glass-border: rgba(255, 255, 255, 0.08);
    /* Borde ligero */
    --glass-blur: blur(12px);

    /* Tipografía */
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* Espaciados y Tamaños */
    --section-padding: 8rem 0;
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
    font-family: var(--font-sans);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: none;
    /* Oculta el cursor por defecto */
}

/* =========================================
   CURSOR PERSONALIZADO
   ========================================= */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--clr-accent);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--clr-accent);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

/* Estilo al pasar sobre enlaces/botones */
.cursor-outline.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.5);
}

/* =========================================
   TIPOGRAFÍA GENERAL
   ========================================= */
h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    color: var(--clr-text-light);
    font-weight: 400;
    line-height: 1.2;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--clr-text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.accent-text {
    color: var(--clr-accent);
    font-style: italic;
}

.white-text {
    color: var(--clr-text-light);
}

.highlight {
    color: var(--clr-text-light);
    font-weight: 500;
}

.large-text {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--clr-text);
    margin-bottom: 2rem;
}

/* =========================================
   UTILIDADES Y LAYOUT
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: var(--section-padding);
}

.bg-darker {
    background-color: var(--clr-bg-alt);
}

/* Estilos de Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--clr-accent);
    color: var(--clr-bg);
    /* Texto oscuro en botón naranja */
}

.btn-primary:hover {
    background-color: var(--clr-accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--clr-text-light);
}

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

.btn-round {
    padding: 1rem;
    border-radius: 50%;
}

/* Elementos Glassmorphism Generales */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.glass-card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    /* Brillo cyan al pasar el mouse */
    transform: translateY(-5px);
}

/* =========================================
   NAVEGACIÓN (GLASSMORPHISM)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.7);
    /* Ligeramente más opaco que glass estándar pero tono claro */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: padding var(--transition-fast), background var(--transition-fast);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    background: rgba(5, 5, 5, 0.9);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--clr-text-light);
    letter-spacing: -1px;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-text);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--clr-accent);
    transition: width var(--transition-fast);
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--clr-text-light);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    color: var(--clr-text-light);
    cursor: pointer;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    /* Para compensar navbar */
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-content {
    max-width: 800px;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 90%;
    aspect-ratio: 4/5;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    z-index: 2;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.2) contrast(1.1);
    /* Realza los colores de la imagen abstracta */
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--clr-glow) 0%, transparent 70%);
    z-index: 1;
    filter: blur(40px);
    opacity: 0.6;
    animation: pulseGlow 4s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: var(--clr-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(4rem, 8vw, 8rem);
    /* Texto gigantesco responsive */
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.hero-description {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    max-width: 600px;
    margin-bottom: 3rem;
    color: var(--clr-text);
}

/* Indicador de Scroll */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 5%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
}

.scroll-indicator p {
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background-color: var(--clr-text);
    position: relative;
    overflow: hidden;
}

.scroll-indicator .line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--clr-accent);
    animation: scrollLine 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scrollLine {
    0% {
        top: -100%;
    }

    50% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

/* =========================================
   SECCIÓN: ACERCA DE MÍ
   ========================================= */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.section-title-wrapper {
    position: sticky;
    top: 150px;
    height: fit-content;
}

.section-title {
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.about-details p {
    font-size: 1rem;
    color: #a0a0a0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.stat-item {
    padding: 2rem;
    text-align: center;
}

.stat-number {
    font-family: var(--font-sans);
    font-size: 3rem;
    font-weight: 700;
    color: var(--clr-text-light);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-accent);
    margin: 0;
}

/* =========================================
   SECCIÓN: HABILIDADES
   ========================================= */
.section-header {
    margin-bottom: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-subtitle {
    max-width: 400px;
    margin-bottom: 0;
    color: #a0a0a0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    padding: 2.5rem;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.style-icon {
    font-size: 2rem;
    color: var(--clr-accent);
}

.skill-header h3 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    margin: 0;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-list li {
    font-size: 1.1rem;
    color: var(--clr-text);
    position: relative;
    padding-left: 1.5rem;
}

.skill-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--clr-accent);
}

/* =========================================
   SECCIÓN: PROYECTOS
   ========================================= */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    /* Espacio entre cada proyecto completo */
}

.project-item {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 450px;
    /* Reduje un poco la altura para que encaje mejor en la columna */
    width: 100%;
    padding: 0;
    border-radius: 12px;
    cursor: pointer;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%) brightness(0.7);
    /* Oscurecemos las imágenes para que peguen con el tema oscuro */
    transition: filter var(--transition-slow), transform var(--transition-slow);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.project-image:hover img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.05);
}

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

.project-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-tags {
    list-style: none;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.project-tags li {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--clr-accent);
}

.project-title {
    font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    margin-top: 0.5rem;
}

.project-desc {
    font-size: 1.1rem;
    color: #a0a0a0;
    max-width: 90%;
}

/* =========================================
   SECCIÓN: SERVICIOS
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-card .style-icon {
    font-size: 3rem;
    color: var(--clr-accent);
}

.service-card h3 {
    font-size: 1.6rem;
    font-family: var(--font-sans);
    letter-spacing: -0.5px;
}

.service-card p {
    color: #a0a0a0;
    margin: 0;
    font-size: 1rem;
    line-height: 1.8;
}

/* =========================================
   SECCIÓN: CONTACTO Y FOOTER
   ========================================= */
.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-text {
    font-size: 1.2rem;
    color: #a0a0a0;
    margin-bottom: 3rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 300;
}

.contact-link i {
    font-size: 1.5rem;
    color: var(--clr-accent);
}

.contact-link:hover {
    color: var(--clr-accent);
    transform: translateX(10px);
}

.contact-form {
    padding: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a0a0a0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: var(--clr-text-light);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--clr-accent);
}

.w-100 {
    width: 100%;
    justify-content: center;
}

footer {
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    background-color: var(--clr-bg);
    /* Fondo claro base para el footer */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
}

.copyright {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    font-size: 1.5rem;
    color: #a0a0a0;
}

.footer-social a:hover {
    color: var(--clr-accent);
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media (max-width: 968px) {
    .section-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title-wrapper {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

    .project-item,
    .project-item.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-item.reverse .project-info {
        order: 1;
        /* Vuelve al orden normal en móvil */
    }

    .project-image {
        height: 400px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        padding-top: 4rem;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-image {
        max-width: 400px;
        aspect-ratio: 1/1;
        margin-top: 2rem;
    }

    .hero-title {
        font-size: clamp(3rem, 10vw, 4.5rem);
    }
}

@media (max-width: 768px) {

    /* Desactivar cursor personalizado en móviles para mejor UX táctil */
    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    /* Menú móvil */
    .nav-links,
    .navbar .btn-outline {
        display: none;
        /* Por ahora lo ocultamos en móvil hasta añadir JS */
    }

    .hamburger {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 2rem;
    }
}