:root {
    /* Rojo + tonos cálidos */
    --primary-color: #c41e1e;
    --primary-light: #e53935;
    --primary-dark: #9a1616;
    --secondary-color: #d32f2f;
    --accent-color: #ef5350;
    --accent-light: #ff8a80;
    --tertiary-color: #ffcdd2;
    
    --text-color: #1a1a1a;
    --text-light: #525252;
    --text-muted: #737373;
    
    --background: #fafafa;
    --background-section: #f0f0f0;
    --background-alt: #ffffff;
    --background-card: #ffffff;
    --background-glass: #ffffff;
    
    --border-color: #e0e0e0;
    --border-glow: #c41e1e;
    --content-width: 1320px;
    --page-padding: 2.5rem;
    --tech-line: rgba(196, 30, 30, 0.06);
    --tech-dot: rgba(196, 30, 30, 0.12);
    --cursor-glow-inner: rgba(196, 30, 30, 0.08);
    --cursor-glow-grid: rgba(196, 30, 30, 0.06);
    
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 8px 30px rgba(196, 30, 30, 0.1);
    --shadow-hover: 0 12px 40px rgba(196, 30, 30, 0.14);
    
    --card-radius: 10px;
    --transition: all 0.28s ease;
    --transition-fast: all 0.16s ease;
    
    --gradient-primary: linear-gradient(135deg, #c41e1e 0%, #e53935 100%);
    --gradient-accent: linear-gradient(135deg, #d32f2f 0%, #ef5350 100%);
    --gradient-hero: transparent;
}

[data-theme="dark"] {
    --primary-color: #ef5350;
    --primary-light: #ff8a80;
    --primary-dark: #e53935;
    --secondary-color: #ff8a80;
    --accent-color: #ffab91;
    --accent-light: #ffccbc;
    --tertiary-color: #ff8a80;
    
    --text-color: #f5f5f5;
    --text-light: #a3a3a3;
    --text-muted: #737373;
    
    --background: #121212;
    --background-section: #1a1a1a;
    --background-alt: #171717;
    --background-card: #222222;
    --background-glass: #171717;
    
    --border-color: #333333;
    --border-glow: #ef5350;
    --tech-line: rgba(239, 83, 80, 0.08);
    --tech-dot: rgba(239, 83, 80, 0.14);
    --cursor-glow-inner: rgba(239, 83, 80, 0.1);
    --cursor-glow-grid: rgba(239, 83, 80, 0.08);
    
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 8px 28px rgba(239, 83, 80, 0.15);
    --shadow-hover: 0 12px 36px rgba(239, 83, 80, 0.22);
    
    --gradient-hero: transparent;
}

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

html {
    scroll-behavior: smooth;
}

html.lenis,
html.lenis-smooth {
    scroll-behavior: auto !important;
}
  

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-color);
    background-color: var(--background);
    letter-spacing: 0.02em;
    min-height: 100vh;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    position: relative;
    z-index: 1;
}

main::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(72px 72px at var(--glow-x, -20%) var(--glow-y, -20%), var(--cursor-glow-inner), transparent 100%),
        radial-gradient(28px 28px at var(--glow-x, -20%) var(--glow-y, -20%), var(--cursor-glow-grid), transparent 100%),
        radial-gradient(circle, var(--tech-dot) 1px, transparent 1px),
        linear-gradient(var(--tech-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--tech-line) 1px, transparent 1px);
    background-size: auto, auto, 28px 28px, 56px 56px, 56px 56px;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    opacity: 0.85;
    transition: opacity 0.4s ease;
}

body.cursor-bg-active main::before {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    main::before {
        background-image:
            radial-gradient(circle, var(--tech-dot) 1px, transparent 1px),
            linear-gradient(var(--tech-line) 1px, transparent 1px),
            linear-gradient(90deg, var(--tech-line) 1px, transparent 1px);
        background-size: 28px 28px, 56px 56px, 56px 56px;
    }
}

header,
footer {
    position: relative;
    z-index: 1;
}

/* Header & Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 3000;
    background: var(--background-alt);
    border-bottom: none;
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
}

[data-theme="dark"] header {
    background: var(--background-alt);
}

body.mobile-menu-open header {
    z-index: 10000;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none;
}

body.mobile-menu-open header .mobile-menu-btn,
body.mobile-menu-open header .logo {
    pointer-events: auto;
}

body.mobile-menu-open header .logo {
    opacity: 0;
    visibility: hidden;
}

body.mobile-menu-open {
    overflow: hidden;
}

body.mobile-menu-open main::before {
    opacity: 0 !important;
}

[data-theme="dark"] body.mobile-menu-open header {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

nav {
    max-width: min(var(--content-width), calc(100% - var(--page-padding) * 2));
    margin: 0 auto;
    padding: 0.7rem var(--page-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    min-height: 4.25rem;
}

header .logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0;
}

header .logo a {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: normal;
    position: static;
    left: unset;
    margin-left: 0;
}

.logo {
    position: relative;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 42px;
    width: 42px;
    vertical-align: middle;
    border-radius: 8px;
    transition: var(--transition);
}

.logo:hover img {
    transform: rotate(-5deg);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    margin: 0;
    justify-content: flex-end;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition-fast);
    position: relative;
    padding: 0.35rem 0;
    border-radius: 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    transform: none;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 0;
}

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

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

/* Sections Common Styles */
section {
    padding: 2rem 0;
    min-height: unset;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
}

.about {
    background: var(--background);
    padding: 2rem 0;
}

section:nth-child(even) {
    background: none;
}

.section-content, .about-content, .contact-content, .curriculum-content {
    background: var(--background-glass);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem 1.5rem;
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    border: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    transition: none;
}

.experience-content, .education-content, .cursos-content {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
    padding: 1.5rem 0;
    max-width: min(var(--content-width), calc(100% - var(--page-padding) * 2));
    width: 100%;
    margin: 0 auto;
    display: flex;
    border: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    transition: none;
}

.section-content:hover, .about-content:hover, .contact-content:hover, .curriculum-content:hover {
    box-shadow: var(--shadow);
}

.experience-content:hover, .education-content:hover, .cursos-content:hover {
    box-shadow: none;
    transform: none;
}

h2 {
    font-size: 1.875rem;
    margin-bottom: 1.25rem;
    color: var(--text-color);
    font-weight: 800;
    letter-spacing: 0.03em;
    position: relative;
    display: inline-block;
    padding-left: 1rem;
    border-left: 4px solid var(--primary-color);
}

h2::after {
    display: none;
}

.section-header h2 {
    margin-bottom: 0.5rem;
    border-left: none;
    padding-left: 0;
}

.section-header h2::after {
    display: block;
    content: '';
    width: 48px;
    height: 3px;
    background: var(--primary-color);
    margin: 0.65rem auto 0;
}

h3 {
    font-size: 1.08rem;
    color: var(--text-color);
    margin: 1rem 0 0.4rem;
    font-weight: 700;
}

ul {
    list-style: none;
    padding-left: 0;
    color: var(--text-light);
    margin-bottom: 0.2rem;
}

li {
    margin-bottom: 0.2rem;
    position: relative;
    padding-left: 1em;
    font-size: 0.98rem;
}

li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 0.45em;
    height: 0.45em;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.35);
}

/* Hero Section */
.hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem var(--page-padding) 3rem;
    background: transparent;
    overflow: hidden;
    border-bottom: none;
}

.hero-scroll-arrow {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    animation: hero-arrow-bounce 1.6s ease-in-out infinite;
    transition: color 0.2s ease;
}

.hero-scroll-arrow:hover {
    color: var(--primary-dark);
    animation-play-state: paused;
}

.hero-scroll-arrow:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

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

.hero-arrow {
    display: none;
}

.hero-content {
    text-align: left;
    z-index: 1;
    max-width: min(var(--content-width), calc(100% - var(--page-padding) * 2));
    width: 100%;
    margin: 0 auto;
    color: var(--text-color);
    padding: 0;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.35rem, 4.8vw, 3.5rem);
    margin-bottom: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-color);
    background: none;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    display: block;
    visibility: visible;
    opacity: 1;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 1;
}

.hero h1 span,
.hero .subtitle strong {
    color: var(--primary-color);
}

.hero .subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    display: block;
    position: relative;
    z-index: 1;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    max-width: 36rem;
}

.hero-tagline {
    position: relative;
    font-size: 0.9375rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-color);
    margin: 0 0 1.15rem;
    padding: 0.5rem 0 0.5rem 0.85rem;
    max-width: 28rem;
    letter-spacing: 0.02em;
    border-left: 3px solid var(--primary-color);
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--primary-color) 9%, transparent) 0%,
        transparent 70%
    );
    border-radius: 0 6px 6px 0;
}

.code-icon {
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.hero-two-columns {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
    align-items: flex-start;
    width: 100%;
}

.hero-left {
    flex: 1;
    min-width: 0;
}

.hero-right {
    flex: 1;
    min-width: 0;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0 0 1.5rem 0;
    font-weight: 700;
    text-align: left;
}

.hero-left p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: left;
}

.hero-skills {
    width: 100%;
    background: var(--background-card);
    border-radius: var(--card-radius);
    padding: 1.35rem 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.hero-skills:hover {
    transform: none;
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

.hero-skills h3 {
    color: var(--primary-color);
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.hero-skills .skill-item {
    padding: 0.4rem 0;
    margin-bottom: 0;
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    column-gap: 0.65rem;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.hero-skills .skill-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hero-skills .skill-icon,
.hero-skills .skill-flag {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    width: 1.05rem;
    height: 1.05rem;
    flex: none;
}

.hero-skills .skill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    line-height: 1;
    color: var(--primary-color);
    opacity: 0.85;
    transition: var(--transition-fast);
}

.hero-skills .skill-flag {
    display: block;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: var(--transition-fast);
}

.hero-skills .skill-flag--rif {
    object-fit: contain;
    background: #00843d;
}

.hero-skills .skill-item:hover .skill-icon {
    opacity: 1;
}

.hero-skills .skill-item:hover .skill-flag {
    box-shadow: 0 0 0 2px rgba(196, 30, 30, 0.18);
}

.hero-skills .skill-item:hover > span {
    color: var(--primary-color);
}

.hero-skills .skill-item > span {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    font-size: 0.8125rem;
    color: var(--text-color);
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    transition: var(--transition-fast);
}

.hero-skills-two-columns,
.hero-skills-three-columns {
    display: flex;
    gap: 1.15rem;
    margin-top: 0;
    align-items: flex-start;
}

.hero-skills-three-columns {
    gap: 1.15rem;
}

.hero-skills-column {
    flex: 1;
    min-width: 0;
    padding: 0 0.75rem;
}

.hero-skills-column:first-child {
    padding-left: 0;
}

.hero-skills-column:last-child {
    padding-right: 0;
}

.hero-skills-column:not(:first-child) {
    border-left: 1px solid var(--border-color);
}

.hero-skills-column h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    height: auto;
    min-height: auto;
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    column-gap: 0.65rem;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(196, 30, 30, 0.14);
    position: relative;
    font-size: 0.9375rem;
}

.hero-skills-column h3 > i {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    width: 1.05rem;
    text-align: center;
    font-size: 0.8rem;
}

.hero-skills-column h3 > span {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.hero-skills-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 1.5rem;
    height: 2px;
    border-radius: 1px;
    background: var(--primary-color);
    opacity: 0.85;
}

.hero-skills-column:nth-child(3) h3 {
    justify-content: flex-start;
}

.hero-skills-column h4 {
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-skills-column h4:first-of-type {
    margin-top: 1rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(185, 28, 28, 0.1);
    border: 1px solid rgba(185, 28, 28, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.hero-badge:hover {
    background: rgba(185, 28, 28, 0.15);
    transform: translateY(-2px);
}

.hero-badge i {
    font-size: 0.9rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.4);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.3);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(185, 28, 28, 0.1);
    border: 1px solid rgba(185, 28, 28, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-background {
    display: none;
}

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

/* Experience Section */
.job {
    margin-bottom: 1.1rem;
    background: none;
    border-radius: 0;
    padding: 1.2rem 1.5rem;
    box-shadow: none;
}

.job h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--primary-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: left;
    width: 100%;
}

.job p {
    color: var(--text-light);
    margin-bottom: 0.2rem;
    line-height: 1.5;
    font-size: 0.97rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.job-period {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    margin-bottom: 0.8rem !important;
}

/* Contact Section */
.contact {
    background: var(--background);
    padding: 2rem 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 1.1rem;
    width: 100%;
}

.contact-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    background: var(--background-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.contact-item:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 0.5rem;
    transition: var(--transition-fast);
}

.contact-item:hover i {
    color: var(--primary-dark);
}

.contact-item p {
    color: var(--text-light);
    font-size: 0.97rem;
    margin: 0;
}

/* Footer */
footer {
    background: var(--background-alt);
    color: var(--text-light);
    padding: 2.5rem var(--page-padding) 1.25rem;
    border-top: none;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] footer {
    background: var(--background-alt);
    border-top: none;
}

footer::before {
    display: none;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 0.06em;
}

.logo-decoration {
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0;
    box-shadow: none;
}

.footer-bottom {
    max-width: min(var(--content-width), calc(100% - var(--page-padding) * 2));
    margin: 1.5rem auto 0;
    padding-top: 0;
    border-top: none;
    text-align: center;
    color: var(--text-muted);
}

[data-theme="dark"] .footer-bottom {
    border-top: none;
    color: var(--text-light);
}

.footer-content {
    max-width: min(var(--content-width), calc(100% - var(--page-padding) * 2));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.curriculum {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--background-alt);
}

.curriculum-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.download-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: none;
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

.download-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.about-content {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 2.2rem 2.5rem;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.skills-container {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    width: 100%;
}

.skills-column {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 0.5rem;
}

.skills-column ul {
    width: 100%;
}

.edu-exp-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: 3rem var(--page-padding);
    background: transparent;
    border-top: none;
    border-bottom: none;
}

.education-cursos-row {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 0.5rem;
    max-width: min(var(--content-width), calc(100% - var(--page-padding) * 2));
}

.education, .cursos-section {
    flex: 1 1 0;
    min-width: 0;
}

.experience {
    width: 100%;
    margin-top: -1.5rem;
}

.experience-content,
.experience-content .job,
.experience-content .job h3,
.experience-content .job p {
    text-align: left;
}

.experience-content > h2 {
    display: block;
    width: 100%;
    text-align: left;
}

.experience-content .job {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.experience-grid {
    display: flex;
    gap: 3rem;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    padding: 0;
    flex-wrap: wrap;
}

.education-content, .experience-content, .cursos-content {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 1.5rem 2rem;
    margin: 0;
    width: 100%;
    min-height: 320px;
}

.cursos-section {
    width: 100%;
}

.experience-content {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.job {
    margin-bottom: 0;
    background: none;
    border-radius: 0;
    padding: 1.2rem 1.5rem;
    box-shadow: none;
    border: none;
    transition: var(--transition);
    width: calc(50% - 1.5rem);
    flex: 0 0 calc(50% - 1.5rem);
    min-width: 0;
    max-width: calc(50% - 1.5rem);
}

.experience-grid > .job:only-child {
    width: calc(75% - 1.5rem);
    flex: 0 0 calc(75% - 1.5rem);
    max-width: calc(75% - 1.5rem);
}

@media (max-width: 900px) {
    .experience-grid > .job:only-child {
        width: 100% !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
}

.contact-curriculum-row {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    margin: 0 auto 1.5rem auto;
    max-width: 1200px;
}

.contact, .curriculum {
    flex: 1 1 0;
    min-width: 0;
}

.contact-content, .curriculum-content {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 2.2rem 2.5rem;
    margin: 0 auto;
    max-width: 800px;
    width: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Projects Section */
.projects {
    background: transparent;
    padding: 3rem var(--page-padding);
}

.projects-content {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    max-width: min(var(--content-width), calc(100% - var(--page-padding) * 2));
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    width: 100%;
    max-width: min(var(--content-width), calc(100% - var(--page-padding) * 2));
    margin: 1rem auto 0 auto;
    align-items: stretch;
}

.project-card {
    background: var(--background-card);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 240px;
    transition: var(--transition-fast);
}

.project-card::before {
    display: none;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.project-card:hover::before {
    opacity: 0;
}

.project-card:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.project-image {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    box-shadow: none;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.project-card:hover .project-image {
    transform: none;
    background: var(--primary-dark);
    box-shadow: none;
}

.project-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.project-info h3 {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.4rem 0;
}

.project-info h3 a {
    color: var(--primary-color) !important;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 700;
}

.project-info h3 a:hover {
    color: var(--secondary-color) !important;
    text-decoration: underline;
}

.project-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.7rem 0;
    flex: 1;
}

.project-info p a {
    color: var(--primary-color) !important;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.project-info p a:hover {
    color: var(--secondary-color) !important;
    text-decoration: underline;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.project-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
    width: 100%;
}

.project-contact-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.project-contact-item i {
    color: var(--primary-color);
    font-size: 1rem;
    width: 20px;
    flex-shrink: 0;
}

.project-contact-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.project-contact-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Contact Card Special Styles (mismo fondo que el resto de tarjetas; respeta tema claro/oscuro) */
.project-card-contact {
    background: var(--background-card);
    border: none;
}

.project-card-contact .project-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.project-contact-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.project-card-contact .project-image {
    margin-bottom: 0;
    width: 55px;
    height: 55px;
    flex-shrink: 0;
}

.project-image-contact {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.3) !important;
}

.project-card-contact:hover .project-image-contact {
    transform: scale(1.08) rotate(2deg) !important;
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.4) !important;
}

.project-card-contact .project-info h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0;
    text-align: center;
}

.project-card-contact .project-info p {
    text-align: center;
    margin-bottom: 0.5rem;
}

.project-card-contact .project-contact-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.tech-tag {
    background: transparent;
    color: var(--text-light);
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.tech-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

/* Language Selector Styles */
.language-selector {
    position: relative;
    margin-left: 1rem;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    border-radius: 8px;
}

.language-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

.language-btn i {
    font-size: 0.8rem;
}

.language-flag {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: block;
}

.language-flag-small {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background-alt);
    border: none;
    border-radius: 6px;
    box-shadow: var(--shadow);
    min-width: 140px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: var(--transition);
    margin-top: 0.25rem;
}

.language-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown li {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: none;
    margin: 0;
    padding-left: 0.75rem !important;
    font-size: 0.85rem;
}

.language-dropdown li:hover {
    background: var(--primary-color);
    color: white;
}

.language-dropdown li.active {
    background: var(--primary-color);
    color: white;
}

.language-dropdown li span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Botón de tema oscuro/claro */
.theme-toggle-wrapper {
    position: relative;
    padding-left: 0 !important;
    display: flex;
    align-items: center;
}

.theme-toggle-wrapper::before {
    display: none !important;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--background-card);
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1rem;
}

.theme-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: none;
}

.theme-toggle-btn:active {
    transform: rotate(15deg) scale(0.95);
}

/* Quitar el puntito de acento y padding solo del selector de idioma en el nav */
.nav-links .language-selector,
.nav-actions .language-selector {
    position: relative;
    padding-left: 0 !important;
    display: flex;
    align-items: center;
}
.nav-links .language-selector::before,
.nav-actions .language-selector::before {
    display: none !important;
}

header nav .nav-actions > li::before,
header nav .nav-links > li::before {
    display: none !important;
}

header nav .nav-actions > li,
header nav .nav-links > li {
    padding-left: 0;
}

/* También para móvil */
@media (max-width: 768px) {
    .nav-links .language-dropdown li::before {
        display: none !important;
    }
    
    .nav-links .language-dropdown li {
        padding-left: 0.75rem !important;
    }
}

/* --- MOBILE MENU --- */
.mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: var(--background);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    background: var(--background);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    pointer-events: none;
    overflow: hidden;
    isolation: isolate;
}

[data-theme="dark"] .mobile-menu,
[data-theme="dark"] .mobile-menu-overlay {
    background: var(--background);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    flex: 1;
    min-height: 100%;
    min-height: 100dvh;
    padding:
        calc(4.75rem + env(safe-area-inset-top, 0px))
        max(1.1rem, env(safe-area-inset-right, 0px))
        calc(1.1rem + env(safe-area-inset-bottom, 0px))
        max(1.1rem, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-header {
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-eyebrow {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-color);
}

.mobile-menu-sub {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.mobile-menu-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
    justify-content: flex-start;
}

.mobile-menu-nav li {
    margin: 0;
}

.mobile-menu-nav a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1rem;
    border-radius: 14px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mobile-menu-nav a i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 11px;
    background: rgba(196, 30, 30, 0.1);
    color: var(--primary-color);
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu-nav a:active {
    transform: scale(0.98);
}

.mobile-menu-nav a:hover {
    background: rgba(196, 30, 30, 0.06);
    border-color: rgba(196, 30, 30, 0.12);
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.mobile-menu-settings-label {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
}

.mobile-menu-settings-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.mobile-menu-theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    background: var(--background-card);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.mobile-menu-theme-btn i {
    color: var(--primary-color);
    font-size: 0.95rem;
}

.mobile-menu-theme-btn:hover,
.mobile-menu-theme-btn:active {
    border-color: rgba(196, 30, 30, 0.35);
    background: rgba(196, 30, 30, 0.08);
}

.mobile-lang-chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    justify-content: flex-end;
}

.mobile-lang-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--background-card);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 0 0 1px var(--border-color);
}

.mobile-lang-chip img {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-lang-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.mobile-lang-chip.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(196, 30, 30, 0.2);
}

.mobile-menu.active .mobile-menu-nav li {
    animation: mobile-nav-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.mobile-menu.active .mobile-menu-nav li:nth-child(1) { animation-delay: 0.04s; }
.mobile-menu.active .mobile-menu-nav li:nth-child(2) { animation-delay: 0.08s; }
.mobile-menu.active .mobile-menu-nav li:nth-child(3) { animation-delay: 0.12s; }
.mobile-menu.active .mobile-menu-nav li:nth-child(4) { animation-delay: 0.16s; }
.mobile-menu.active .mobile-menu-nav li:nth-child(5) { animation-delay: 0.2s; }
.mobile-menu.active .mobile-menu-nav li:nth-child(6) { animation-delay: 0.24s; }

@keyframes mobile-nav-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu,
    .mobile-menu-overlay,
    .mobile-menu-nav a,
    .mobile-menu-btn .bar {
        transition: none !important;
    }

    .mobile-menu.active .mobile-menu-nav li {
        animation: none !important;
    }
}

@media (max-width: 900px) {
    header nav {
        width: 100%;
        max-width: none;
        min-height: 4.25rem;
        padding:
            calc(0.7rem + env(safe-area-inset-top, 0px))
            max(1rem, env(safe-area-inset-right, 0px))
            0.7rem
            max(1rem, env(safe-area-inset-left, 0px));
        justify-content: flex-start;
        align-items: center;
        gap: 0.75rem;
    }

    header .logo a {
        gap: 0.55rem;
    }

    .mobile-menu-btn {
        display: flex !important;
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-left: auto;
        flex-shrink: 0;
        z-index: 1;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 12px;
        border: 1px solid var(--border-color);
        background: var(--background-card);
        box-shadow: var(--shadow);
        cursor: pointer;
        padding: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        transition: var(--transition-fast);
    }

    body.mobile-menu-open .mobile-menu-btn {
        z-index: 10001;
    }

    .mobile-menu-btn:hover,
    .mobile-menu-btn.active {
        border-color: rgba(196, 30, 30, 0.35);
        background: rgba(196, 30, 30, 0.08);
    }

    .mobile-menu-btn .bar {
        display: block;
        width: 1.15rem;
        height: 2px;
        margin: 2.5px 0;
        background: var(--primary-color);
        border-radius: 2px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    }

    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(5px) rotate(45deg);
    }

    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg);
    }

    .nav-actions {
        display: none !important;
    }
}

@media (min-width: 901px) {
    header nav {
        min-height: 4.25rem;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
        align-items: center;
    }

    .mobile-menu,
    .mobile-menu-overlay,
    .mobile-menu-btn {
        display: none !important;
    }

    .nav-actions {
        display: flex !important;
        align-items: center;
        align-self: center;
    }
}

/* Mobile Menu Button (base) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

/* Responsive Design */
@media (max-width: 900px) {
    .section-content, .about-content, .education-content, .contact-content, .curriculum-content, .projects-content {
        padding: 1rem 0.5rem;
        margin: 0 0.5rem;
        width: calc(100% - 1rem);
        max-width: none;
    }
    
    .experience-content {
        padding: 1rem 0.8rem !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .skills-container {
        flex-direction: column;
        gap: 0.7rem;
    }
    .edu-exp-row {
        flex-direction: column;
        gap: 1.5rem;
        max-width: 100%;
        margin: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    .education-cursos-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .education-content, .cursos-content {
        padding: 1rem 0.8rem;
        min-height: unset;
        width: 100%;
    }
    
    .experience-content {
        padding: 1rem 0.8rem !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: unset;
        gap: 1.5rem;
    }
    .experience-grid {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0;
        width: 100%;
    }
    .job {
        width: 100%;
        flex: 1 1 100%;
        max-width: 100%;
        padding: 1.2rem 1rem !important;
        margin-bottom: 0;
    }
    .contact-curriculum-row {
        flex-direction: column;
        gap: 1.5rem;
        max-width: 100%;
        margin: 0 0.5rem;
        width: calc(100% - 1rem);
    }
    .contact-content, .curriculum-content {
        padding: 1.2rem 0.5rem;
        min-height: unset;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-two-columns {
        flex-direction: column;
        align-items: stretch;
    }
    .hero {
        padding: 0;
        padding-top: 6.5rem;
        padding-bottom: 2rem;
        padding-left: 1rem;
        padding-right: 1rem;
        min-height: auto;
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        margin-top: 0;
    }
    .hero-content {
        text-align: center;
        padding: 0 1.5rem;
        width: 100%;
        position: relative;
        z-index: 1;
    }
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
        line-height: 1.2;
        text-align: center;
        width: 100%;
        display: block;
        visibility: visible;
        opacity: 1;
        position: relative;
        z-index: 2;
    }
    .hero .subtitle {
        font-size: 1.1rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
        justify-content: center;
        text-align: center;
    }
    .hero-tagline {
        margin-left: 0;
        margin-right: auto;
        margin-bottom: 1.25rem;
        max-width: 100%;
        font-size: 0.875rem;
    }
    .code-icon {
        font-size: 1.3rem;
        margin-right: 0.3rem;
    }
    .hero-two-columns {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 1.5rem;
        align-items: stretch;
    }
    .hero-left {
        width: 100%;
        text-align: center;
    }
    .hero-left h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    .hero-left p {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 0.3rem;
        text-align: center;
    }
    .hero-left p:last-child {
        margin-bottom: 0.5rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
        margin: 0 0 0.8rem 0;
        text-align: center;
    }
    .hero-right {
        margin-top: 2rem;
        width: 100%;
        align-self: stretch;
    }
    .hero-skills {
        padding: 1.15rem 1rem;
        margin-top: 0;
        width: 100%;
        box-sizing: border-box;
    }
    .hero-skills h3 {
        margin: 0;
        font-size: 0.9375rem;
    }
    .hero-skills-two-columns,
    .hero-skills-three-columns {
        flex-direction: column;
        gap: 0;
        margin-top: 0;
        align-items: stretch;
        width: 100%;
    }
    .hero-skills-column {
        margin-bottom: 0;
        text-align: left;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }
    .hero-skills-column:not(:first-child) {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-top: 1rem;
        margin-top: 1rem;
    }
    .hero-skills-column h3 {
        margin-top: 0;
        margin-bottom: 0.55rem;
        min-height: auto;
        padding-bottom: 0.45rem;
        justify-content: flex-start;
        width: 100%;
    }
    .hero-skills-column h3::after {
        left: 0;
        transform: none;
    }
    .hero-skills .skill-item {
        width: 100%;
        max-width: none;
        padding: 0.38rem 0;
        grid-template-columns: 1.25rem minmax(0, 1fr);
        column-gap: 0.65rem;
    }
    .hero-skills-column h3 {
        grid-template-columns: 1.25rem minmax(0, 1fr);
        column-gap: 0.65rem;
    }
    .hero-skills .skill-item > span {
        font-size: 0.8125rem;
        line-height: 1.35;
        text-align: left;
    }
    .hero-skills .skill-icon,
    .hero-skills .skill-flag {
        width: 1.05rem;
        height: 1.05rem;
    }
    .hero-skills .skill-icon {
        font-size: 0.68rem;
    }
    section {
        padding: 2rem 0 1rem 0;
    }
    h2 {
        font-size: 1.3rem;
    }
    h3 {
        font-size: 1rem;
    }
    .contact-info {
        flex-direction: column;
        gap: 0.7rem;
    }
    .hero-content {
        max-width: 100%;
        padding: 0 1rem;
    }
    .about-content {
        padding: 1rem 0.3rem;
        margin: 0 0.3rem;
        width: calc(100% - 0.6rem);
    }
    .skills-container {
        gap: 0.5rem;
    }
    .skills-column {
        min-width: 100%;
    }
    .job {
        padding: 1.3rem 1rem !important;
        margin-bottom: 0;
        background: var(--background-card) !important;
        border-radius: 12px !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: var(--shadow) !important;
    }
    .job h3 {
        font-size: 0.95rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin-bottom: 0.6rem;
    }
    .job p {
        font-size: 0.9rem;
        line-height: 1.7;
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin-bottom: 0.5rem;
    }
    li {
        font-size: 0.9rem;
    }
    .contact-item {
        padding: 0.5rem 0.4rem;
    }
    .contact-item p {
        font-size: 0.9rem;
    }
    .download-btn {
        padding: 0.4rem 1rem;
        font-size: 0.95rem;
    }
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-alt);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-links.mobile-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 0.75rem;
        border-radius: 4px;
        transition: var(--transition);
        font-size: 0.95rem;
    }
    
    .nav-links a:hover {
        background: var(--primary-color);
        color: white;
    }
    
    .language-selector {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .language-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
    }
    
    .language-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0.5rem;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
    
    .language-dropdown.open {
        display: block;
    }
    
    .language-dropdown li {
        text-align: center;
        padding: 0.75rem;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 0;
        padding-top: 6rem;
        padding-bottom: 2rem;
        padding-left: 1rem;
        padding-right: 1rem;
        min-height: auto;
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        margin-top: 0;
    }
    .hero-content {
        text-align: center;
        padding: 0 1rem;
        width: 100%;
    }
    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 0.6rem;
        line-height: 1.2;
        text-align: center;
        width: 100%;
        display: block;
        visibility: visible;
        opacity: 1;
        z-index: 10;
        position: relative;
    }
    .hero .subtitle {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        justify-content: center;
        text-align: center;
    }
    .code-icon {
        font-size: 1.2rem;
        margin-right: 0.3rem;
    }
    .hero-two-columns {
        gap: 1.2rem;
        margin-top: 1.2rem;
        align-items: stretch;
    }
    .hero-left {
        text-align: center;
    }
    .hero-left h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    .hero-subtitle {
        font-size: 1.2rem;
        margin: 0 0 1rem 0;
        text-align: center;
    }
    .hero-left p {
        font-size: 0.92rem;
        line-height: 1.6;
        margin-bottom: 0.3rem;
        text-align: center;
    }
    .hero-left p:last-child {
        margin-bottom: 0.5rem;
    }
    .hero-skills {
        padding: 1rem 0.9rem;
    }
    .hero-skills-column:not(:first-child) {
        padding-top: 0.85rem;
        margin-top: 0.85rem;
    }
    .hero-skills .skill-item {
        padding: 0.35rem 0;
    }
    section {
        padding: 2rem 0;
    }
    h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .section-header {
        margin-bottom: 1.5rem;
    }
    .section-header h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1rem;
    }
    .section-content, .about-content, .experience-content, .education-content, .contact-content, .curriculum-content, .projects-content {
        padding: 1rem 1rem;
        margin: 0;
        width: 100%;
    }
    .contact-item {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }
    .contact-item p {
        font-size: 0.9rem;
    }
    .download-btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
    .contact-curriculum-row {
        gap: 1rem;
        margin: 0;
        width: 100%;
        padding: 0 1rem;
    }
    .edu-exp-row {
        gap: 1.5rem;
        margin: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    .skills-container {
        gap: 0.8rem;
    }
    .job {
        margin-bottom: 1rem;
        padding: 1.2rem 1rem !important;
    }
    .job h3 {
        font-size: 0.92rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        margin-bottom: 0.5rem;
    }
    .job p {
        font-size: 0.88rem;
        line-height: 1.6;
        margin-bottom: 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    li {
        font-size: 0.9rem;
    }
    .about-content {
        padding: 1rem;
        margin: 0;
        width: 100%;
    }
    .education-content, .cursos-content {
        padding: 1rem;
        margin: 0;
        width: 100%;
    }
    
    .experience-content {
        padding: 1rem 0.8rem !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .contact-content, .curriculum-content {
        padding: 1rem;
        margin: 0;
        width: 100%;
    }
    .project-card {
        padding: 1rem;
        min-height: auto;
    }
    .education-card, .curso-card {
        padding: 1rem;
    }
    .education-grid, .cursos-grid {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        padding: 1rem;
    }
    
    .language-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .language-dropdown li {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .job {
        padding: 1.4rem 1rem !important;
        margin-bottom: 0;
        background: var(--background-card) !important;
        border-radius: 12px !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: var(--shadow) !important;
    }
    
    .job h3 {
        font-size: 0.9rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        margin-bottom: 0.7rem;
    }
    
    .job p {
        font-size: 0.85rem;
        line-height: 1.7;
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin-bottom: 0.5rem;
    }
    
    .job-period {
        font-size: 0.85rem !important;
        margin-bottom: 0.9rem !important;
    }
    
    .experience-grid {
        padding: 0;
    }
    
    .experience-content {
        padding: 1rem 0.8rem !important;
    }
}

.language-selector .language-dropdown li::before {
    display: none !important;
    content: none !important;
}

.project-info h3 a i {
    color: var(--primary-color) !important;
    font-size: 0.8em;
    margin-left: 5px;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.project-info h3 a:hover i {
    color: var(--secondary-color) !important;
    opacity: 1;
    transform: translateX(2px);
}

/* Animaciones mejoradas */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* Animación para el título del hero */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(241, 245, 249, 0.6);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    min-width: 120px;
    box-shadow: var(--shadow);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-glow);
    background: rgba(241, 245, 249, 0.8);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(185, 28, 28, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Services Section */
.services {
    background: var(--background-alt);
    padding: 2rem 0;
}

.services-content {
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 1.3rem 1.1rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    margin-top: 1rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--card-radius);
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(220, 38, 38, 0.1);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.4);
    background: rgba(255, 255, 255, 0.85);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.3);
}

.service-card h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Skills with Progress Bars */
.skill-item {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-item span {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 99px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.35);
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Efectos adicionales para el modo claro */
.job {
    margin-bottom: 1.5rem;
    background: var(--background-card);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

@media (max-width: 900px) {
    .job {
        padding: 1.2rem 1rem !important;
    }
}

@media (max-width: 600px) {
    .job {
        padding: 1.2rem 1rem !important;
    }
}

@media (max-width: 480px) {
    .job {
        padding: 1.3rem 1rem !important;
    }
}

.job:hover {
    transform: none;
    box-shadow: var(--shadow-hover);
    border-color: var(--border-color);
    border-left-color: var(--primary-light);
}

/* Education and Courses Cards */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.cursos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.education-card, .curso-card {
    background: var(--background-card);
    border-radius: var(--card-radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
}

.education-card:hover, .curso-card:hover {
    transform: none;
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.education-icon, .curso-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.education-card:hover .education-icon, .curso-card:hover .curso-icon {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.education-info, .curso-info {
    flex: 1;
}

.education-info h3, .curso-info h3 {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 0.3rem 0;
    line-height: 1.3;
}

.education-info p, .curso-info p {
    color: var(--text-light);
    font-size: 0.75rem;
    margin: 0 0 0.15rem 0;
    line-height: 1.3;
}

.education-centro {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    margin: 0 0 0.2rem 0 !important;
}

.curso-centro {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    margin-top: 0.3rem !important;
}

.education-period {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .hero-stats {
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .stat-item {
        padding: 1rem 1.5rem;
        min-width: 100px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .skill-item {
        margin-bottom: 0.8rem;
    }
    
    .skill-item span {
        font-size: 0.85rem;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .cursos-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .education-card, .curso-card {
        padding: 0.8rem;
        gap: 0.6rem;
    }
    
    .education-icon, .curso-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .education-info h3, .curso-info h3 {
        font-size: 0.9rem;
    }
    
    .education-info p, .curso-info p {
        font-size: 0.75rem;
    }
}

/* Experiencia compacta en escritorio: cabe en menos scroll */
@media (min-width: 901px) {
    .experience {
        margin-top: 0;
    }

    .experience-content {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        align-items: start;
        padding: 1rem 0;
        justify-items: stretch;
    }

    .experience-content > h2 {
        grid-column: 1 / -1;
        margin-bottom: 0.5rem;
        font-size: 1.75rem;
        text-align: left;
    }

    .experience-grid {
        display: contents;
    }

    .experience-content .job {
        width: 100% !important;
        flex: none !important;
        max-width: none !important;
        padding: 1rem 1.15rem !important;
        margin: 0 !important;
        text-align: left;
        align-self: stretch;
    }

    .experience-grid > .job:only-child {
        width: 100% !important;
        flex: none !important;
        max-width: none !important;
        grid-column: 1 / -1;
        max-width: calc(50% - 0.5rem);
        justify-self: start;
    }

    .experience-content .job h3 {
        font-size: 0.9375rem;
        line-height: 1.4;
        margin-bottom: 0.25rem;
        text-align: left;
    }

    .experience-content .job-period {
        font-size: 0.8125rem !important;
        margin-bottom: 0.45rem !important;
        text-align: left;
    }

    .experience-content .job p:not(.job-period) {
        font-size: 0.875rem;
        line-height: 1.55;
        margin-bottom: 0;
        text-align: left;
    }
}