/* =================================
   Variables y Reset
   ================================= */
:root {
    --primary: #3b82f6;
    --secondary: #1d4ed8;
    --accent: #60a5fa;
    --text-primary: #f0f9ff;
    --text-secondary: #bfdbfe;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --glass-bg: rgba(59, 130, 246, 0.05);
    --glass-border: rgba(59, 130, 246, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode / Modo Claro */
body.light-mode {
    --primary: #2563eb;
    --secondary: #1e40af;
    --accent: #3b82f6;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --bg-dark: #f1f5f9;
    --bg-darker: #ffffff;
    --glass-bg: rgba(37, 99, 235, 0.08);
    --glass-border: rgba(37, 99, 235, 0.2);
}

body.light-mode .cursor {
    background: var(--primary);
    mix-blend-mode: normal;
}

body.light-mode .cursor-follower {
    background: transparent;
    border: 2px solid var(--primary);
    mix-blend-mode: normal;
}

body.light-mode .project-image {
    background: #FFF;
}

body.light-mode .glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-mode .nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

body.light-mode .nav-link {
    color: #1e293b;
}

body.light-mode .nav-link:hover {
    color: var(--primary);
}

body.light-mode .nav-link::after {
    background: var(--primary);
}

body.light-mode .menu-toggle span {
    background: #1e293b;
}

body.light-mode .theme-btn,
body.light-mode .language-btn {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
    color: #1e293b;
}

body.light-mode .theme-btn:hover,
body.light-mode .language-btn:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--primary);
}

body.light-mode .theme-btn svg,
body.light-mode .language-btn svg {
    stroke: var(--primary);
}

body.light-mode .code-keyword { color: #d97706; }
body.light-mode .code-variable { color: #2563eb; }
body.light-mode .code-property { color: #059669; }
body.light-mode .code-string { color: #dc2626; }

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
}

/* =================================
   Cursor Personalizado
   ================================= */
.cursor,
.cursor-follower {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.2s ease;
    mix-blend-mode: difference;
}

.cursor {
    background: #fff;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease;
}

a:hover ~ .cursor-follower,
button:hover ~ .cursor-follower {
    transform: translate(-50%, -50%) scale(1.5);
}

/* =================================
   Fondo Animado
   ================================= */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary), var(--secondary));
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent), var(--primary));
    bottom: -10%;
    right: -10%;
    animation-delay: -7s;
}

.blob-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--secondary), var(--accent));
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -50px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* =================================
   Utilidades
   ================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 4rem;
    font-weight: 700;
}

.title-number {
    color: var(--primary);
    font-size: 1.2rem;
    margin-right: 1rem;
}

/* =================================
   Navegación
   ================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.8rem 0;
    background: rgba(6, 6, 19, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-btn,
.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
}

.theme-btn {
    padding: 0.6rem;
}

.theme-btn:hover,
.language-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.theme-btn svg,
.language-btn svg {
    stroke: var(--primary);
    transition: var(--transition);
}

.theme-btn:hover svg {
    transform: rotate(20deg);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
}

.logo-image {
    height: 100px;
    width: auto;
    margin: -15px 0;
    transition: var(--transition);
}

.logo:hover .logo-image {
    transform: translateY(-2px);
}

.nav-menu {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* =================================
   Hero Section
   ================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 8rem 0 4rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.2;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-name {
    font-size: clamp(2.2rem, 5.5vw, 5rem);
    font-weight: 800;
    letter-spacing: -2px;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-border);
    transform: translateY(-3px);
}

.hero-visual {
    position: relative;
}

.floating-card {
    padding: 2rem;
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.code-header {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-content {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary);
    overflow-x: auto;
}

.code-keyword {
    color: #c792ea;
}

.code-variable {
    color: #82aaff;
}

.code-property {
    color: #f07178;
}

.code-string {
    color: #c3e88d;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: bounce 2s infinite;
}

.scroll-line {
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, var(--primary), transparent);
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* =================================
   About Section
   ================================= */
.about {
    padding: 8rem 0;
}

.about-text {
    padding: 3rem;
    max-width: 800px;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--glass-border);
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
}

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

/* =================================
   Projects Section
   ================================= */
.projects {
    padding: 8rem 0;
}

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

.project-card {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.3);
    border-color: var(--primary);
}

.project-image {
    position: relative;
    height: 200px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.4s ease;
    filter: brightness(1);
}

.project-card:hover .project-img {
    filter: brightness(1.1);
}

/* Imagen de WuichoKun más grande */
.project-card:nth-child(1) .project-img {
    object-fit: cover;
}

/* Imagen de FunnyNoiseClub más grande */
.project-card:nth-child(2) .project-img {
    object-fit: contain;
    transform: scale(1.3);
}

/* Imagen de MAYDAY más grande */
.project-card:nth-child(3) .project-img {
    object-fit: cover;
}

/* Imagen de Jersix */
.project-card:nth-child(4) .project-img {
    object-fit: contain;
}

/* Imagen de Capitán Financiero */
.project-card:nth-child(5) .project-img {
    object-fit: contain;
}

/* Imagen de Thermal Coatings */
.project-card:nth-child(6) .project-img {
    object-fit: contain;
}

/* Imagen de Pymera */
.project-card:nth-child(7) .project-img {
    object-fit: contain;
}

/* Imagen de Python Adventure */
.project-card:nth-child(8) .project-img {
    object-fit: contain;
}

/* Imagen de Grateksa */
.project-card:nth-child(9) .project-img {
    object-fit: contain;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(29, 78, 216, 0.05));
    opacity: 0;
    transition: all 0.4s ease;
}

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

.project-placeholder {
    position: relative;
    z-index: 1;
    color: var(--text-secondary);
    transition: var(--transition);
}

.project-card:hover .project-placeholder {
    transform: scale(1.1) rotate(5deg);
    color: var(--primary);
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.4rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1.5rem;
    margin-top: auto;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Efecto Tilt 3D */
.project-card[data-tilt] {
    transform-style: preserve-3d;
}

/* =================================
   Skills Section
   ================================= */
.skills {
    padding: 8rem 0;
}

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

.skill-category {
    padding: 2.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.skill-category:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.skill-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    transition: var(--transition);
}

.skill-category:hover .skill-icon {
    transform: rotate(10deg) scale(1.1);
}

.skill-category h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 0.7rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-list li:hover {
    color: var(--primary);
    padding-left: 10px;
}

/* =================================
   Contact Section
   ================================= */
.contact {
    padding: 8rem 0;
}

.contact-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-text h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
}

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

.contact-card {
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
}

.contact-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    transition: var(--transition);
}

.contact-card:hover .contact-icon {
    transform: rotate(360deg) scale(1.1);
}

.contact-card h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-secondary);
}

/* =================================
   Footer
   ================================= */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.footer p {
    color: var(--text-secondary);
}

/* =================================
   Animaciones de Entrada
   ================================= */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    animation: revealText 0.8s ease forwards;
}

.reveal-text:nth-child(1) {
    animation-delay: 0.2s;
}

.reveal-text:nth-child(2) {
    animation-delay: 0.4s;
}

.reveal-text:nth-child(3) {
    animation-delay: 0.6s;
}

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

/* =================================
   Responsive Design
   ================================= */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .nav-menu {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        position: relative;
        justify-content: space-between;
    }

    .menu-toggle {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        z-index: 10;
    }

    .logo {
        display: none;
    }

    .nav-actions {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
    }

    .theme-btn,
    .language-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .theme-btn {
        padding: 0.5rem;
    }

    .scroll-indicator {
        display: none;
    }

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

    .contact-methods {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        text-align: center;
        justify-content: center;
    }
}

/* Soporte para dispositivos táctiles */
@media (hover: none) {
    body {
        cursor: auto;
    }

    .cursor,
    .cursor-follower {
        display: none;
    }
}

