/* ==========================================
   VARIABLES & RESET
   ========================================== */

:root {
    /* Colores - Branding Blanco */
    --color-white: #FFFFFF;
    --color-off-white: #F8FAFB;
    --color-light-gray: #E8EDF2;
    --color-gray: #B8C5D0;
    --color-dark-gray: #647987;
    --color-charcoal: #2C3E50;
    --color-navy: #1A2332;
    
    /* Azules elegantes */
    --color-blue-50: #EBF5FF;
    --color-blue-100: #D6EBFF;
    --color-blue-500: #2B7DE9;
    --color-blue-600: #1B5FCF;
    --color-blue-700: #154AB5;
    
    /* Tipografía */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(26, 35, 50, 0.05);
    --shadow-md: 0 4px 16px rgba(26, 35, 50, 0.08);
    --shadow-lg: 0 8px 32px rgba(26, 35, 50, 0.12);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-charcoal);
    background-color: #FFFFFF;
    overflow-x: hidden;
}

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

/* ==========================================
   TIPOGRAFÍA
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--color-navy);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 4.5rem;
    letter-spacing: -2px;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -1px;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.1rem;
}

p {
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ==========================================
   CURSOR PERSONALIZADO
   ========================================== */

.cursor,
.cursor-follower {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor {
    width: 10px;
    height: 10px;
    background-color: var(--color-blue-500);
    transform: translate(-50%, -50%);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-blue-500);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

/* ==========================================
   NAVEGACIÓN
   ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--color-light-gray);
    padding: 1.2rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(26, 35, 50, 0.03);
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(26, 35, 50, 0.08);
}

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

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-navy);
    letter-spacing: -0.5px;
}

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

.nav-link {
    color: var(--color-dark-gray);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-blue-500);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--color-blue-600);
}

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

.nav-link.active {
    color: var(--color-blue-600);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--color-navy);
    transition: 0.3s ease;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    background-color: #FFFFFF;
}

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

.hero-greeting {
    font-size: 1.1rem;
    color: var(--color-blue-600);
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.hero-name {
    font-family: var(--font-serif);
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.hero-title {
    font-size: 2rem;
    color: var(--color-dark-gray);
    font-weight: 400;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-dark-gray);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    letter-spacing: 0.3px;
    display: inline-block;
}

.btn-primary {
    background-color: var(--color-blue-600);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-blue-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-blue-600);
    border-color: var(--color-blue-600);
}

.btn-outline:hover {
    background-color: var(--color-blue-50);
}

.hero-social {
    display: flex;
    gap: 1.5rem;
}

.hero-social a {
    color: var(--color-dark-gray);
    transition: all 0.3s ease;
}

.hero-social a:hover {
    color: var(--color-blue-600);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--color-blue-500));
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ==========================================
   SECCIONES
   ========================================== */

section {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
    background-color: inherit;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.section-header.centered {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 1rem;
}

.section-number {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--color-blue-600);
    font-weight: 600;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--color-navy);
    font-weight: 600;
    letter-spacing: -1px;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--color-blue-200), transparent);
}

/* ==========================================
   SOBRE MÍ
   ========================================== */

.about {
    background-color: var(--color-off-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.about-text {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.about-text.will-animate {
    opacity: 0;
    transform: translateX(-60px);
}

.about-text.animate {
    opacity: 1;
    transform: translateX(0);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-text .lead {
    font-size: 1.3rem;
    color: var(--color-navy);
    font-weight: 500;
    line-height: 1.6;
}

.about-skills {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.2s;
}

.about-skills.will-animate {
    opacity: 0;
    transform: translateX(60px);
}

.about-skills.animate {
    opacity: 1;
    transform: translateX(0);
}

.about-skills h3 {
    font-size: 1.2rem;
    color: var(--color-navy);
    margin-bottom: 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skill-item {
    padding: 0.75rem 1.25rem;
    background-color: var(--color-white);
    border: 1px solid var(--color-light-gray);
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-charcoal);
    transition: all 0.3s ease;
}

.skill-item:hover {
    border-color: var(--color-blue-500);
    color: var(--color-blue-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================
   EXPERIENCIA
   ========================================== */

.experience {
    background-color: #FFFFFF;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-blue-500), var(--color-blue-200));
}

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

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    background-color: var(--color-blue-600);
    border: 3px solid var(--color-white);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--color-blue-100);
}

.timeline-date {
    display: inline-block;
    padding: 0.3rem 1rem;
    background-color: var(--color-blue-50);
    color: var(--color-blue-700);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    font-size: 1.4rem;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--color-blue-600);
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--color-dark-gray);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.timeline-achievements {
    list-style: none;
    padding-left: 0;
}

.timeline-achievements li {
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    color: var(--color-dark-gray);
}

.timeline-achievements li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-blue-500);
}

/* ==========================================
   PROYECTOS
   ========================================== */

.projects {
    background-color: #FFFFFF;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-light-gray);
    border-radius: 8px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, var(--color-blue-500), var(--color-blue-300));
    transition: height 0.5s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-card:hover::before {
    height: 100%;
}

.project-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--color-blue-100);
    font-weight: 700;
    margin-bottom: 1rem;
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--color-navy);
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--color-dark-gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    padding: 0.4rem 1rem;
    background-color: var(--color-blue-50);
    color: var(--color-blue-700);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
}

.project-link {
    color: var(--color-blue-600);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--color-blue-700);
    letter-spacing: 0.5px;
}

/* ==========================================
   CONTACTO
   ========================================== */

.contact {
    background-color: #FFFFFF;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-dark-gray);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background-color: var(--color-off-white);
    border-radius: 8px;
    border: 1px solid var(--color-light-gray);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--color-blue-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-blue-600);
}

.contact-method h3 {
    font-size: 1.1rem;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.contact-method a,
.contact-method p {
    color: var(--color-dark-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-method a:hover {
    color: var(--color-blue-600);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-charcoal);
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 1px solid var(--color-light-gray);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-charcoal);
    background-color: var(--color-white);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-blue-500);
    box-shadow: 0 0 0 3px var(--color-blue-50);
}

.form-group textarea {
    resize: vertical;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background-color: var(--color-navy);
    color: var(--color-gray);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-year {
    color: var(--color-blue-300);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 968px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2rem; }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-name {
        font-size: 3.5rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }

    /* Nav mobile - Menú lateral elegante */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background-color: #FFFFFF;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 0;
        z-index: 998;
        box-shadow: -4px 0 20px rgba(26, 35, 50, 0.1);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .nav-links.active {
        display: flex;
        transform: translateX(0);
    }

    .nav-links li {
        width: 100%;
        opacity: 0;
        transform: translateX(30px);
        transition: all 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }

    .nav-link {
        font-size: 1.1rem;
        padding: 1rem 0;
        width: 100%;
        border-bottom: 1px solid var(--color-light-gray);
        display: block;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        padding-left: 0.5rem;
    }

    /* Overlay oscuro */
    .nav-links.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 280px;
        bottom: 0;
        background-color: rgba(26, 35, 50, 0.5);
        z-index: -1;
        animation: fadeIn 0.3s ease;
    }

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

    .menu-toggle {
        display: flex;
        z-index: 1001;
        position: relative;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(20px);
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    h1 { font-size: 2.5rem; letter-spacing: -1px; }
    h2 { font-size: 1.8rem; }

    .hero {
        padding-top: 100px;
        min-height: calc(100vh - 60px);
        padding-bottom: 2rem;
    }
    
    .hero-name {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .hero-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .btn {
        text-align: center;
        padding: 0.9rem 2rem;
    }

    .scroll-indicator {
        display: none;
    }

    /* Sections */
    section {
        padding: 5rem 0;
        min-height: auto;
    }

    .section-header {
        gap: 1rem;
        margin-bottom: 3rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-line {
        display: none;
    }

    /* About */
    .about-text .lead {
        font-size: 1.1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    /* Timeline */
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline-item {
        padding-left: 2rem;
        margin-bottom: 2.5rem;
    }

    .timeline-marker {
        left: -1.3rem;
        width: 14px;
        height: 14px;
    }

    .timeline-content h3 {
        font-size: 1.2rem;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    /* Projects */
    .project-card {
        padding: 2rem;
    }

    .project-number {
        font-size: 2.5rem;
    }

    .project-content h3 {
        font-size: 1.3rem;
    }

    /* Contact */
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-intro {
        font-size: 1.05rem;
    }
    
    /* Cursor */
    .cursor,
    .cursor-follower {
        display: none;
    }

    /* Navbar */
    .navbar {
        padding: 1rem 0;
    }

    .logo {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    html {
        scroll-padding-top: 65px;
    }

    .container {
        padding: 0 1.25rem;
    }
    
    h1 { font-size: 2rem; letter-spacing: -0.5px; }
    h2 { font-size: 1.4rem; }

    .hero {
        padding-top: 90px;
        min-height: calc(100vh - 80px);
    }

    .hero-name {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 1.15rem;
    }

    .hero-greeting {
        font-size: 0.95rem;
    }

    section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-number {
        font-size: 0.9rem;
    }

    .about-text .lead {
        font-size: 1rem;
    }

    .skill-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-number {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .project-content h3 {
        font-size: 1.15rem;
    }

    .project-tech span {
        font-size: 0.8rem;
        padding: 0.3rem 0.75rem;
    }

    .contact-method {
        padding: 1.5rem;
        gap: 1rem;
    }

    .contact-icon {
        width: 42px;
        height: 42px;
    }

    .btn {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .navbar {
        padding: 0.9rem 0;
    }

    /* Menú más compacto en móviles pequeños */
    .nav-links {
        width: 260px;
        padding: 4rem 1.5rem 2rem;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.85rem 0;
    }
}
