:root {
    --primary: #0A2540;
    --secondary: #1E6DEB;
    --accent: #1E6DEB;
    --bg-main: #FFFFFF;
    --bg-alt: #F8FAFC;
    --text-main: #111827;
    --text-sec: #6B7280;
    --border: #E5E7EB;

    --radius: 12px;
    --radius-img: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fadeInUp {
    opacity: 0;
}

.slideInRight {
    opacity: 0;
}

.visible .fadeInUp {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.visible .slideInRight {
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-left {
    animation-delay: 0.2s;
}

.hero-right {
    animation-delay: 0.4s;
}

@keyframes revealLine {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    color: var(--text-main);
    background-color: var(--bg-main);
    overflow-x: hidden;
}

body {
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 80px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

.bg-alternate {
    background-color: var(--bg-alt);
}

h1,
h2,
h3,
h4 {
    color: var(--primary);
    line-height: 1.2;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 56px;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    display: inline-block;
    padding-bottom: 8px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--secondary);
    width: 0;
    transition: var(--transition-smooth);
}

.visible .section-title::after {
    width: 100%;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 24px;
        margin-bottom: 40px;
    }
}

/* Navbar */
.navbar {
    padding: 24px 0;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid transparent;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger {
    display: none;
}

.logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-sec);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links .btn-secondary {
    color: var(--secondary);
    background: rgba(30, 109, 235, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-links .btn-secondary:hover {
    background: rgba(30, 109, 235, 0.15);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
        background: rgba(30, 109, 235, 0.05);
        border: 1px solid rgba(30, 109, 235, 0.1);
        padding: 8px;
        border-radius: 8px;
        cursor: pointer;
        color: var(--secondary);
    }

    .hamburger svg {
        width: 24px;
        height: 24px;
        fill: currentColor;
    }
}

/* Mobile Menu Overlay */
.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.nav-mobile.active {
    right: 0;
    opacity: 1;
}

.nav-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
}

.nav-mobile-links a {
    text-decoration: none;
    color: var(--primary);
    font-size: 24px;
    font-weight: 600;
}

.close-menu {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
}

.close-menu svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: #1557c0;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--text-sec);
    background-color: var(--bg-alt);
}

.btn-text {
    color: var(--secondary);
    padding: 0;
    font-weight: 600;
}

.btn-text:hover {
    color: #1557c0;
}

.btn-video {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 109, 235, 0.05);
    color: var(--secondary);
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: 1px solid rgba(30, 109, 235, 0.1);
    transition: var(--transition-smooth);
    width: 100%;
    justify-content: center;
}

.btn-video svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-video:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(30, 109, 235, 0.3);
    border-color: var(--secondary);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    padding-top: 80px;
    padding-bottom: 120px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(30, 109, 235, 0.08);
    color: var(--accent);
    border: 1px solid rgba(30, 109, 235, 0.2);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
}

.hero-text {
    font-size: 18px;
    color: var(--text-sec);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 56px;
}

.credentials {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 2px solid var(--border);
    padding-left: 24px;
}

.credential-item {
    font-size: 15px;
    color: var(--text-sec);
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}



.profile-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-img);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
    display: block;
    aspect-ratio: 4/5;
    object-fit: cover;
}

@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 40px;
        padding-bottom: 80px;
        text-align: center;
    }

    .hero-text {
        margin: 0 auto 40px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .credentials {
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 24px;
        align-items: center;
    }

    .hero-right {
        order: -1;
        margin-bottom: 40px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fadeInUp {
    opacity: 0;
}

.slideInRight {
    opacity: 0;
}

.visible .fadeInUp {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.visible .slideInRight {
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-left {
    animation-delay: 0.2s;
}

.hero-right {
    animation-delay: 0.4s;
}

@keyframes revealLine {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* Projects */
.proyectos {
    padding: 120px 0;
}

@media (max-width: 768px) {
    .proyectos {
        padding: 60px 0;
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.project-card {
    background: var(--bg-main);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: none;
    border: 1px solid var(--border);
    border-left: 4px solid var(--secondary);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: 0.5s;
    pointer-events: none;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: var(--shadow-lg);
}

@media (min-width: 769px) {
    .project-card:hover {
        transform: translateX(10px);
    }
}

.project-card:hover .project-title {
    color: var(--secondary);
}

.project-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.project-desc {
    color: var(--text-sec);
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tech-tag {
    background: var(--bg-alt);
    color: var(--text-sec);
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-weight: 500;
}

.project-footer {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: auto;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        padding: 24px;
    }
}

/* Philosophy */
.filosofia {
    padding: 120px 80px;
    max-width: 900px;
    margin: 0 auto;
}

.filosofia-content {
    font-size: 24px;
    color: var(--text-sec);
    line-height: 1.7;
    letter-spacing: -0.01em;
}

.filosofia-content p {
    margin-bottom: 24px;
}

.lead-text {
    font-weight: 500;
    color: var(--text-main);
}

.highlight-text {
    font-weight: 500;
    color: var(--primary);
    font-size: 24px;
    margin-top: 32px;
}

@media (max-width: 768px) {
    .filosofia {
        padding: 60px 24px;
    }

    .filosofia-content {
        font-size: 18px;
    }

    .highlight-text {
        font-size: 20px;
    }
}

/* Experience */
.experiencia {
    padding: 120px 0;
}

@media (max-width: 768px) {
    .experiencia {
        padding: 60px 0;
    }
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 7px;
    height: 100%;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 48px;
    margin-bottom: 48px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 2px solid var(--secondary);
    z-index: 2;
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}

.timeline-role {
    color: var(--text-sec);
    font-size: 16px;
}

/* Contact */
.contacto {
    padding: 120px 0;
    text-align: center;
}

@media (max-width: 768px) {
    .contacto {
        padding: 60px 0;
    }
}

.contacto-box {
    background: var(--primary);
    border-radius: 24px;
    padding: 80px 40px;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.contacto-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(10, 37, 64, 0) 70%);
    z-index: 1;
}

.contacto-box>* {
    position: relative;
    z-index: 2;
}

.contacto-box .section-title {
    color: white;
    margin-bottom: 24px;
}

.contacto-text {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contacto-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    position: relative;
    flex-wrap: wrap;
}

.copy-success {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #10B981;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.copy-success.show {
    opacity: 1;
}

.contacto-buttons .btn-outline {
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.contacto-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

@media (max-width: 768px) {
    .contacto-box {
        padding: 40px 24px;
    }
}

footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-sec);
    font-size: 14px;
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}