/* Global Reset & Variables */
:root {
    --bg-color: #050507;
    --bg-secondary: #0f1016;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-primary: #6d28d9;
    /* Deep Purple */
    --accent-secondary: #00d4ff;
    /* Cyan */
    --accent-glow: rgba(109, 40, 217, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(255, 255, 255, 0.06);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --transition-speed: 0.3s;
}

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

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

/* Background Effects */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
}

.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at center, var(--accent-glow), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -2;
    mix-blend-mode: screen;
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

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

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

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

/* Tachado para "Future" */
.strikethrough {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Components */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed);
}

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

.primary-btn:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    margin-left: 1rem;
}

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

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--card-hover);
}

/* Header & Nav */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 5%;
    background: rgba(5, 5, 7, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: padding 0.3s;
}

.glass-header.scrolled {
    padding: 1rem 5%;
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

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

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    font-weight: 500;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-secondary);
    transition: width 0.3s;
}

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

/* Language Select */
.lang-select {
    position: relative;
    user-select: none;
}

.lang-selected {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--glass-bg);
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: border-color 0.2s, background 0.2s;
    white-space: nowrap;
}

.lang-selected:hover {
    border-color: var(--accent-secondary);
    background: var(--card-hover);
}

.lang-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-code {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.lang-arrow {
    font-size: 0.65rem;
    color: var(--text-secondary);
    transition: transform 0.25s ease;
}

.lang-select.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-select.open .lang-selected {
    border-color: var(--accent-secondary);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    background: rgba(15, 16, 22, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.3rem;
    list-style: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
    overflow: hidden;
}

.lang-select.open .lang-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.lang-option span {
    font-size: 1.1rem;
}

.lang-option:hover {
    background: var(--card-hover);
    color: var(--text-primary);
}

.lang-option.active {
    color: var(--accent-secondary);
}

.mobile-menu-toggle {
    display: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.overline {
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
    font-weight: 600;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 480px;
}

/* Social Links (reutilizado para hero visual y footer) */
.social-links {
    margin-top: 2.5rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
}

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

/* Hero Visual con imagen de perfil + iconos debajo */
.hero-visual {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    flex-direction: column;
    /* apila imagen + redes */
    justify-content: flex-start;
    /* empieza arriba */
    align-items: center;
    /* centra horizontalmente */
    padding-top: 40px;
    /* imagen algo más arriba */
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-secondary);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.3);
    animation: float 6s ease-in-out infinite;
}

/* Esfera por si se quiere reutilizar */
.sphere {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-secondary), var(--accent-primary));
    filter: blur(80px);
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }

    100% {
        transform: translateY(0px) scale(1);
    }
}

/* Sections General */
.section {
    padding: 3rem 10%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Experience */
.timeline {
    position: relative;
    border-left: 2px solid var(--glass-border);
    margin-left: 20px;
    padding-left: 40px;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -49px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--accent-secondary);
    z-index: 1;
}

.timeline-date {
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: block;
}

.role-subtitle {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: left;
}

.timeline-content h3 {
    margin-bottom: 0.2rem;
    font-size: 1.5rem;
    text-align: left;
}

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

.timeline-content ul {
    margin-top: 1rem;
    padding-left: 1.2rem;
}

.timeline-content ul li {
    list-style-type: disc;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

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

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.skill-category h3 i {
    color: var(--accent-secondary);
}

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

.tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.tags span:hover {
    background: rgba(109, 40, 217, 0.2);
    border-color: var(--accent-primary);
    color: white;
}

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

.list-unstyled li {
    list-style: none;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.list-unstyled li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.list-unstyled strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.3rem;
}

.list-unstyled small {
    color: var(--text-secondary);
}

/* Footer */
footer {
    padding: 5rem 10% 2rem;
    background: var(--bg-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.social-links.large a {
    font-size: 2rem;
    margin: 0 0.5rem;
}

.copyright {
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.6;
}

.copyright i {
    color: #ff4757;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-cta {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .secondary-btn {
        margin-left: 0;
        margin-top: 1rem;
    }

    .hero-section {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: left;
        padding-top: 120px;
    }

    .hero-visual {
        margin-bottom: 2rem;
        width: 100%;
        height: 300px;
        padding-top: 0;
        align-items: center;
        justify-content: center;
    }

    .profile-image {
        width: 160px;
        height: 160px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .screen-hide {
        display: none;
    }

    .nav-left {
        gap: 0;
    }

    .nav-links {
        position: fixed;
        background: var(--bg-secondary);
        top: 80px;
        right: -100%;
        height: 100vh;
        width: 70%;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 4rem;
        transition: 0.4s;
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .lang-select {
        order: -1;
    }


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

    .section-title {
        font-size: 2rem;
        display: block;
        width: 100%;
        left: auto;
        transform: none;
        text-align: left;
    }
}

/* Certifications */
.cert-link {
    color: var(--accent-secondary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    transition: color var(--transition-speed);
}

.cert-link i {
    font-size: 1rem;
    min-width: 1.1rem;
    text-align: center;
}

.cert-link--plain {
    color: var(--text-secondary);
    cursor: default;
}

.cert-link--plain::after {
    display: none;
}

.cert-link--plain:hover {
    color: var(--text-secondary);
}

.cert-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--accent-secondary);
    transition: width 0.3s ease;
}

.cert-link:hover {
    color: #ffffff;
}

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

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

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