/* ========================================
           1. CSS VARIABLES & RESET
        ======================================== */
:root {
    /* Color Palette */
    --primary-color: #E91E63;
    --primary-dark: #C2185B;
    --primary-light: #F06292;
    --secondary-color: #ffffff;
    --bg-dark: #0f0f14;
    --bg-darker: #07070a;
    --bg-card: #16161f;
    --bg-card-hover: #1a1a24;
    --text-light: #a0a0b0;
    --text-lighter: #707080;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --info-color: #2196F3;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;

    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.6s ease;

    /* Borders & Radius */
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.5rem;
    --border-radius-xl: 2rem;
    --border-radius-round: 50%;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    background-color: var(--bg-darker);
    color: var(--secondary-color);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========================================
           2. TYPOGRAPHY & COMMON ELEMENTS
        ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.8rem;
}

h4 {
    font-size: 1.4rem;
}

h5 {
    font-size: 1.2rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Section Base */
section {
    min-height: 100vh;
    padding: calc(var(--spacing-2xl) + 70px) var(--spacing-md) var(--spacing-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title h2 {
    margin-bottom: var(--spacing-sm);
}

.section-title h2 span {
    color: var(--primary-color);
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 14px 32px;
    border-radius: var(--border-radius-xl);
    font-size: var(--font-size-base);
    font-weight: 600;
    transition: var(--transition-base);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ========================================
           3. HEADER & NAVIGATION
        ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    position: relative;
    font-weight: 500;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-cta {
    background-color: var(--primary-color);
    color: white !important;
    padding: 10px 25px;
    border-radius: var(--border-radius-xl);
}

.nav-cta:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.3);
}

.nav-cta::after {
    display: none;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    transition: var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========================================
           4. HERO SECTION
        ======================================== */
#hero {
    background-color: var(--bg-darker);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(233, 30, 99, 0.1) 0%, transparent 70%);
    border-radius: var(--border-radius-round);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 40px 0;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-text h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-text h2 span {
    color: var(--primary-color);
}

.hero-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 600;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 2rem;
    background-color: var(--primary-color);
    margin-left: 5px;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.hero-description {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 45px;
    height: 45px;
    background-color: var(--bg-card);
    border-radius: var(--border-radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    border: 2px solid transparent;
}

.social-link svg {
    width: 22px;
    height: 22px;
    transition: var(--transition-base);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

/* Hero Image */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 450px;
    height: 450px;
}

.image-bg {
    position: absolute;
    inset: -20px;
    background: conic-gradient(from 0deg, transparent, var(--primary-color), transparent);
    border-radius: var(--border-radius-round);
    animation: rotate 10s linear infinite;
    opacity: 0.3;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.profile-img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-round);
    overflow: hidden;
    background-color: var(--bg-card);
    border: 4px solid var(--bg-darker);
    z-index: 1;
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
           5. ABOUT SECTION
        ======================================== */

#about {
    background-color: var(--bg-dark);
}

.about-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.about-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 50px;
}

/* Personal Info Card */
.personal-info-card {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.personal-info-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

.info-label {
    color: var(--text-lighter);
    font-size: 0.95rem;
}

.info-value {
    color: var(--secondary-color);
    font-size: 1.05rem;
    font-weight: 500;
}

.download-cv-btn {
    margin-top: 35px;
    background-color: var(--primary-color);
    color: white;
    padding: 14px 35px;
    border-radius: var(--border-radius-xl);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: var(--transition-base);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.download-cv-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.3);
}

.download-cv-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.stat-card {
    background-color: var(--bg-card);
    padding: 35px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(233, 30, 99, 0.05));
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* About Description */
.about-description {
    margin-top: 50px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.about-description h3 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.about-description p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* ========================================
           6. EXPERIENCE SECTION
        ======================================== */
#experience {
    background-color: var(--bg-darker);
    padding-bottom: 100px;
    /* Más espacio al final */
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0 60px;
    /* Más padding inferior */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% - 60px);
    /* Ajuste para el padding */
    background-color: var(--primary-color);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    padding: 50px 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
    /* Sin padding en el último elemento */
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 50%;
    padding-right: 50px;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 50%;
    padding-left: 50px;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50px;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-round);
    border: 5px solid var(--bg-darker);
    z-index: 1;
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.2);
}

.timeline-content {
    background-color: var(--bg-card);
    padding: 35px;
    border-radius: var(--border-radius-md);
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, rgba(233, 30, 99, 0.1), transparent);
    left: 0;
    border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: auto;
    right: 0;
    background: linear-gradient(-90deg, rgba(233, 30, 99, 0.1), transparent);
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.timeline-date {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 6px 18px;
    border-radius: var(--border-radius-lg);
    font-size: 0.85rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-xs);
    color: var(--secondary-color);
}

.timeline-content h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ========================================
           7. SKILLS SECTION
        ======================================== */
#skills {
    background-color: var(--bg-dark);
    padding-bottom: 100px;
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.skill-category {
    background-color: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: left;
}

.skill-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.skill-category:hover::before {
    transform: scaleX(1);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.15), rgba(233, 30, 99, 0.05));
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.category-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(233, 30, 99, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-category:hover .category-icon::before {
    opacity: 1;
}

.category-icon svg {
    width: 28px;
    height: 28px;
    z-index: 1;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.skill-tag {
    background-color: var(--bg-darker);
    padding: 10px 18px;
    border-radius: var(--border-radius-lg);
    font-size: 0.9rem;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(233, 30, 99, 0.2), transparent);
    transition: left 0.5s;
}

.skill-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.2);
}

.skill-tag:hover::before {
    left: 100%;
}



/* ========================================
           8. PROJECTS SECTION
======================================== */
#projects {
    background-color: var(--bg-darker);
    padding-bottom: 100px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.project-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(233, 30, 99, 0.05));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.project-card:hover::before {
    opacity: 1;
}

.project-image {
    position: relative;
    height: 250px;
    background-color: var(--bg-darker);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-md);
    opacity: 0;
    transition: var(--transition-base);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: var(--spacing-sm);
}

.project-links a {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition-base);
    /* FIX PARA ENLACES CLICKEABLES */
    pointer-events: auto !important;
    z-index: 999 !important;
    position: relative !important;
    cursor: pointer !important;
}

.project-links a svg {
    width: 20px;
    height: 20px;
}

.project-links a:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.project-content {
    padding: var(--spacing-lg);
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
}

.project-content p {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tech-tag {
    background-color: rgba(233, 30, 99, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: var(--border-radius-md);
    font-size: 0.85rem;
}

/* ========================================
           9. CONTACT SECTION
        ======================================== */
#contact {
    background-color: var(--bg-dark);
    padding-bottom: 100px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-card {
    background-color: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: var(--transition-base);
}

.contact-card:hover {
    transform: translateX(10px);
    background-color: var(--bg-card-hover);
}

.contact-card-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(233, 30, 99, 0.1);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.contact-card-icon svg {
    width: 24px;
    height: 24px;
}

.contact-card-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-card-text p {
    color: var(--text-light);
    margin: 0;
}

/* Contact Form */
.contact-form {
    background-color: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    background-color: var(--bg-darker);
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    color: var(--secondary-color);
    font-family: inherit;
    font-size: var(--font-size-base);
    transition: var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.02);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-submit {
    background-color: var(--primary-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius-xl);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.form-submit svg {
    width: 18px;
    height: 18px;
}

.form-submit:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.3);
}

/* ========================================
           10. FOOTER
        ======================================== */
footer {
    background-color: var(--bg-darker);
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-text a {
    color: var(--primary-color);
}

.footer-text a:hover {
    color: var(--primary-light);
}


/* ========================================
            11. RESPONSIVE DESIGN
   ======================================== */

/* Tablet View */
@media (max-width: 1024px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2.5rem;
        --spacing-2xl: 3rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .hero-text {
        max-width: none;
    }

    .hero-image {
        order: -1;
    }

    .image-wrapper {
        width: 350px;
        height: 350px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    /* About Section */
    .about-main-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .personal-info-card {
        max-width: 600px;
        margin: 0 auto;
    }

    .stats-grid {
        max-width: 600px;
        margin: 0 auto;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin: 0;
        padding: 0 0 0 60px;
        text-align: left;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-dot {
        left: 30px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* Mobile View */
@media (max-width: 768px) {
    /* Prevenir scroll horizontal */
    * {
        box-sizing: border-box;
    }
    
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Sections adjustment for mobile */
    section {
        padding: 90px 15px 60px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        max-width: 100%;
        padding: 0 10px;
        margin: 0 auto;
    }

    /* Navigation Mobile */
    nav ul {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-dark);
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: var(--spacing-lg);
        transition: left 0.3s;
    }

    nav ul.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    /* Typography Adjustments */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    .hero-text h2 {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Hero Adjustments */
    .hero-content {
        gap: 40px;
    }

    .image-wrapper {
        width: 280px;
        height: 280px;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* About Section - CORRECCIÓN PRINCIPAL */
    .about-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .about-main-content {
        grid-template-columns: 1fr;
        gap: 30px;
        width: 100%;
        max-width: 100%;
    }

    .personal-info-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 20px 15px;
        box-sizing: border-box;
    }

    .personal-info-card h3 {
        text-align: center;
        margin-bottom: 25px;
    }

    .info-row {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin-bottom: 15px;
        word-break: break-word;
    }

    .info-label {
        font-weight: bold;
        font-size: 0.9rem;
    }

    .info-value {
        font-size: 0.9rem;
        word-break: break-all;
        overflow-wrap: break-word;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .stat-card {
        padding: 15px 10px;
        text-align: center;
        box-sizing: border-box;
        min-width: 0;
    }

    .stat-value {
        font-size: 1.8rem;
        font-weight: bold;
        margin-bottom: 8px;
    }

    .stat-description {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .download-cv-btn {
        width: 100%;
        max-width: 250px;
        margin: 20px auto 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 20px;
        box-sizing: border-box;
    }

    /* About info adjustments */
    .about-info {
        grid-template-columns: 1fr;
        padding: 20px 15px;
        gap: 15px;
    }

    .info-item {
        padding: 12px;
        min-width: 0;
        word-break: break-word;
    }

    .about-text h3 {
        font-size: 1.6rem;
    }

    /* Grid Adjustments */
    .skills-categories,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        overflow-x: visible;
        overflow-y: visible;
    }

    .project-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
        min-width: 0;
    }

    /* Skills section corrections */
    .skills-category {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }

    .skills-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        overflow: visible;
    }

    .skill-item {
        flex: 0 0 auto;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }

    /* Projects section corrections */
    .projects-container {
        width: 100%;
        overflow: visible;
    }

    .projects-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        overflow: visible;
    }

    .project-card {
        position: relative;
        overflow: visible;
    }

    /* Si hay carrusel de proyectos, corregirlo */
    .projects-carousel {
        overflow: visible;
        width: 100%;
    }

    .projects-carousel .projects-grid {
        display: grid;
        grid-template-columns: 1fr;
        transform: none;
        overflow: visible;
    }
}

/* Small Mobile View */
@media (max-width: 480px) {
    section {
        padding: 60px 10px;
    }

    .container {
        padding: 0 5px;
    }

    .hero-text h2 {
        font-size: 2rem;
    }

    .image-wrapper {
        width: 250px;
        height: 250px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    /* About section para pantallas muy pequeñas */
    .personal-info-card {
        padding: 15px 10px;
    }

    .personal-info-card h3 {
        font-size: 1.2rem;
        margin-bottom: 20px;
        text-align: center;
    }

    .info-row {
        margin-bottom: 12px;
    }

    .info-label,
    .info-value {
        font-size: 0.85rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-description {
        font-size: 0.9rem;
    }

    .download-cv-btn {
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    .timeline-content {
        padding: var(--spacing-md);
    }

    .contact-form {
        padding: var(--spacing-md);
    }

    .project-card {
        min-width: unset;
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        overflow: visible;
        width: 100%;
    }

    /* Skills en pantallas pequeñas */
    .skills-categories {
        overflow: visible;
        width: 100%;
    }

    .skills-category {
        overflow: visible;
        width: 100%;
    }

    .skills-list {
        overflow: visible;
        width: 100%;
        flex-wrap: wrap;
    }
}

/* Medida extra para prevenir scroll horizontal */
@media (max-width: 768px) {
    /* Asegurar que ningún elemento se salga */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Prevenir que los textos largos causen overflow */
    p, span, div, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Asegurar que las imágenes no se salgan */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* ========================================
           MY EDUCATION SECTION
        ======================================== */
#education {
    background-color: var(--bg-dark);
    padding-bottom: 100px;
}

.education-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.education-section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}


.education-card {
    background-color: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.education-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(233, 30, 99, 0.2);
    border-color: rgba(233, 30, 99, 0.3);
}

.education-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.education-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.degree-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-xs);
}

.university-name {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.education-period {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.education-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* ========================================
           EDUCATION RESPONSIVE DESIGN
        ======================================== */
/* Tablet View */
@media (max-width: 1024px) {
    .education-section-title {
        font-size: 2.5rem;
        word-wrap: break-word;
    }

    .education-card {
        padding: var(--spacing-lg);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Mobile View */
@media (max-width: 768px) {
    .education-section-title {
        font-size: 2rem;
        word-wrap: break-word;
        padding: 0 10px;
    }

    .education-card {
        padding: var(--spacing-lg) 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0 auto 2rem;
    }

    .degree-title {
        font-size: 1.5rem;
        word-wrap: break-word;
        line-height: 1.3;
    }

    .university-name {
        font-size: 1.1rem;
        word-wrap: break-word;
    }

    .education-description {
        font-size: 1rem;
        word-wrap: break-word;
        line-height: 1.5;
    }
}

/* Small Mobile View */
@media (max-width: 480px) {
    .education-section-title {
        font-size: 1.8rem;
        word-wrap: break-word;
        padding: 0 5px;
    }

    .education-card {
        padding: var(--spacing-md) 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0 auto 1.5rem;
    }

    .degree-title {
        font-size: 1.3rem;
        word-wrap: break-word;
        line-height: 1.2;
    }

    .university-name {
        font-size: 1rem;
        word-wrap: break-word;
    }

    .education-description {
        font-size: 0.95rem;
        word-wrap: break-word;
        line-height: 1.4;
    }

    .education-icon {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    .education-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* Reglas adicionales para prevenir scroll horizontal */
@media (max-width: 768px) {

    /* Prevenir que cualquier elemento se salga */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Contenedores principales */
    .container,
    main,
    section,
    .hero-content,
    .about-content,
    .skills-content,
    .projects-content,
    .contact-content {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Prevenir overflow en imágenes */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Prevenir overflow en texto largo */
    p,
    span,
    div {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

/* ========================================
           12. UTILITY CLASSES
        ======================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: var(--spacing-xs);
}

.mt-2 {
    margin-top: var(--spacing-sm);
}

.mt-3 {
    margin-top: var(--spacing-md);
}

.mt-4 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-xs);
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.mb-4 {
    margin-bottom: var(--spacing-lg);
}

.hidden {
    display: none;
}

.visible {
    display: block;
}
