:root {
    color-scheme: dark;
    --bg-dark: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-light: rgba(255, 255, 255, 0.1);
    --primary-color: #00ffcc;
    --secondary-color: #8a2be2;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base size for rem calculations */
    text-size-adjust: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-heading);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accesibilidad y Carga Optimizada */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Background Animated Blobs */
.blob-bg {
    position: fixed;
    top: -10rem;
    left: -10rem;
    width: 30rem;
    height: 30rem;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 60%);
    opacity: 0.15;
    filter: blur(5rem);
    z-index: -1;
    animation: float 15s infinite ease-in-out;
    will-change: transform; /* Hinting to GPU */
    pointer-events: none; /* No interactuar, evita recalculos de hover */
    transform: translateZ(0); /* Forzar GPU renderizado */
}

.blob-bg.blob-2 {
    top: auto;
    bottom: -10rem;
    left: auto;
    right: -10rem;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 60%);
    animation: float 20s infinite ease-in-out reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10rem, -5rem) scale(1.1); }
    66% { transform: translate(-5rem, 10rem) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Typography Links & Lists */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Layout Container */
.container {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    border: 0.0625rem solid var(--border-light);
    border-radius: 1rem;
    padding: 2rem;
    transition: var(--transition);
}

.hover-glow:hover {
    border-color: rgba(0, 255, 204, 0.4);
    box-shadow: 0 0 1.5rem rgba(0, 255, 204, 0.1);
    transform: translateY(-0.25rem);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(1rem);
    border-bottom: 0.0625rem solid var(--border-light);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05rem;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.lang-switcher {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1.5rem;
    border-left: 0.0625rem solid var(--border-light);
}

.lang-switcher a {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border: 0.0625rem solid transparent;
    border-radius: 0.25rem;
}

.lang-switcher a.active {
    border-color: var(--primary-color);
    background: rgba(0, 255, 204, 0.1);
}

.social-svg {
    vertical-align: text-bottom;
    margin-right: 0.5rem;
}

.award-icon {
    flex-shrink: 0;
    color: var(--primary-color);
}

/* Common Section Styles */
.section {
    padding: 8rem 0 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::after {
    content: "";
    height: 0.0625rem;
    flex-grow: 1;
    background: var(--border-light);
}

.section-title span {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
}

.hero-content {
    max-width: 45rem;
}

.greeting {
    font-family: var(--font-mono);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.name {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-muted);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

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

.hero-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.summary {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 40rem;
}

/* Buttons */
.cta-group {
    display: flex;
    gap: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-primary {
    background: transparent;
    color: var(--primary-color);
    border: 0.0625rem solid var(--primary-color);
}

.btn-primary:hover {
    background: rgba(0, 255, 204, 0.1);
    box-shadow: 0 0 1rem rgba(0, 255, 204, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 0.0625rem solid var(--border-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
}

/* About / Awards Grid */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.award {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 0.0625rem solid var(--border-light);
}

.award-icon {
    font-size: 1.5rem;
}

.award h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.award p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    border: 0.0625rem solid var(--border-light);
    border-radius: 1rem;
    padding: 2rem;
}

.category-title {
    font-family: var(--font-mono);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 0.0625rem solid var(--border-light);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-0.125rem);
}

/* Experience Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0.0625rem;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -2.3125rem;
    top: 1.5rem;
    width: 0.625rem;
    height: 0.625rem;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0.5rem var(--primary-color);
}

.timeline-content {
    padding: 2rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timeline-header h4 {
    font-size: 1.25rem;
    color: var(--text-main);
}

.timeline-header h5 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.highlight {
    color: var(--primary-color);
}

.date {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--primary-color);
    background: rgba(0, 255, 204, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.features-list {
    margin-top: 1.5rem;
    margin-left: 1.5rem;
    color: var(--text-muted);
}

.features-list li {
    margin-bottom: 0.5rem;
    position: relative;
}

.features-list li::before {
    content: '▹';
    position: absolute;
    left: -1.25rem;
    color: var(--primary-color);
}

/* Contact */
.contact-section {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto;
}

.contact-text {
    margin-bottom: 3rem;
    color: var(--text-muted);
    font-size: 1.125rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-icon {
    font-family: var(--font-mono);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border: 0.0625rem solid var(--border-light);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.social-icon:hover {
    border-color: var(--secondary-color);
    color: var(--text-main);
    box-shadow: 0 0 1rem rgba(138, 43, 226, 0.2);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 0.0625rem solid var(--border-light);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-note {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    opacity: 0.6;
}

/* Navigation Toggle (Pure CSS Mobile Menu) */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 2rem;
    height: 1.5rem;
    z-index: 101;
}

.nav-toggle-label span {
    display: block;
    height: 0.2rem;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 0.2rem;
    transition: var(--transition);
}

/* Responsive */
@media (max-width: 48rem) {
    .nav-toggle-label {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 99;
    }
    
    .nav-links a {
        font-size: 1.5rem;
    }

    .lang-switcher {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        gap: 1.5rem;
        margin-top: 1rem;
    }

    .lang-switcher a {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .nav-toggle:checked ~ .nav-links {
        transform: translateY(0);
    }
    
    /* Hamburger to X Animation */
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
        transform: translateY(0.65rem) rotate(45deg);
    }
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
        transform: translateY(-0.65rem) rotate(-45deg);
    }

    .hero {
        padding-top: 8rem;
    }
    .timeline::before {
        display: none;
    }
    .timeline {
        padding-left: 0;
    }
    .timeline-dot {
        display: none;
    }
    .cta-group {
        flex-direction: column;
    }
}
