:root {
    --bg-dark: #0f172a;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --secondary-accent: #818cf8;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

/* Language Toggle Logic */
html[lang="es"] [data-lang="en"] { display: none !important; }
html[lang="en"] [data-lang="es"] { display: none !important; }

.lang-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: all 0.3s ease;
}
.lang-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Typography */
h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
}

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

/* Background Shapes */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.4) 0%, transparent 70%);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.3) 0%, transparent 70%);
    animation-duration: 15s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

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

section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
}

.glass-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: var(--accent-glow);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    padding-top: 10rem;
    padding-bottom: 4rem;
}

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

.greeting {
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

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

.title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary-accent);
    margin-bottom: 3rem;
    font-weight: 400;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-pill {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-pill svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.contact-pill:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--accent);
}

/* Profile Section */
.profile-card p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}
.profile-card p:last-child {
    margin-bottom: 0;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border-glass);
}

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

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.4rem;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--accent);
    z-index: 1;
    transition: background 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-content {
    padding: 2rem;
}

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

.timeline-header h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.timeline-header h4 {
    font-size: 1rem;
    color: var(--secondary-accent);
    font-weight: 500;
}

.date-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
}

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

.task-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.task-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 1;
}

.award {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(167, 139, 250, 0.1);
    border-left: 3px solid var(--secondary-accent);
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.award svg {
    width: 24px;
    height: 24px;
    color: #fbbf24;
    flex-shrink: 0;
}

/* Grid & Cards */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.edu-card {
    margin-bottom: 1.5rem;
}

.edu-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.edu-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cert-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.tag {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.languages {
    max-width: 600px;
}

.languages h3 {
    margin-bottom: 1.5rem;
}

.lang-item {
    margin-bottom: 1.5rem;
}

.lang-item:last-child {
    margin-bottom: 0;
}

.lang-name {
    font-weight: 500;
    display: inline-block;
    width: 100px;
}

.lang-level {
    color: var(--text-secondary);
    font-size: 0.85rem;
    float: right;
}

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--secondary-accent));
    border-radius: 3px;
    transform-origin: left;
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Footer */
footer {
    padding: 2rem 0;
    margin-top: 4rem;
}

.text-center {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations (Reveal via JS) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-slide {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-slide.active {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .name {
        font-size: clamp(2.5rem, 6vw, 4rem);
    }
}

@media (max-width: 768px) {
    .nav-actions {
        gap: 1rem;
    }

    .menu-toggle {
        display: flex;
        z-index: 101;
    }
    
    .hero {
        padding-top: 7rem;
        padding-bottom: 2rem;
    }
    
    .glass-card {
        padding: 1.5rem;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 100;
        border-left: 1px solid var(--border-glass);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline::before {
        left: 0.5rem;
    }
    
    .timeline-dot {
        left: -1.9rem;
        width: 12px;
        height: 12px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .contact-pill {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}



@media (max-width: 480px) {
    .name {
        font-size: 2.2rem;
    }
    
    .title {
        font-size: 1.2rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .nav-links {
        width: 100%;
    }
}
