@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,700;0,900;1,400&display=swap');

:root {
    --primary:   #222222;
    --secondary: #7B7B7B;
    --tertiary:  #F8F8F8;
    --white:     #FFFFFF;
    --border:    rgba(34, 34, 34, 0.09);

    --font: 'Inter', sans-serif;
    --nav-h: 64px;
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font);
    background-color: var(--tertiary);
    color: var(--primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   NAV — mobile base
   ============================================================ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background-color: rgba(248, 248, 248, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.nav-logo img { width: 24px; height: 24px; }

/* Center links — hidden on mobile */
.nav-center {
    display: none;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--secondary);
    transition: color 0.2s;
}

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

/* Right actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.nav-cta {
    display: none;
    font-size: 0.8125rem;
    font-weight: 500;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.nav-cta:hover { opacity: 0.5; }

.lang-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 10px;
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--secondary);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.lang-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Hamburger */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background-color: var(--primary);
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}

.nav-drawer.open { display: flex; }

.nav-drawer-link {
    display: block;
    padding: 14px 24px;
    font-size: 0.9375rem;
    color: var(--primary);
    transition: color 0.2s;
}

.nav-drawer-link:hover { color: var(--secondary); }

/* NAV — desktop (768px+) */
@media (min-width: 768px) {
    .nav { padding: 0 48px; }

    .nav-center { display: flex; }

    .nav-cta { display: block; }

    .nav-toggle { display: none; }
}

@media (min-width: 1200px) {
    .nav { padding: 0 72px; }
    .nav-center { gap: 40px; }
}

/* ============================================================
   HERO — mobile base (portrait as full background)
   ============================================================ */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: var(--nav-h);
}

.hero-sidebar { display: none; }

/* Portrait: fills the entire hero as a background layer */
.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: grayscale(100%);
}

/* Gradiente: sólido arriba (stats) → cara visible al centro → sólido abajo (texto) */
.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        var(--tertiary)              0%,
        var(--tertiary)              16%,
        rgba(248, 248, 248, 0)       36%,
        rgba(248, 248, 248, 0)       60%,
        rgba(248, 248, 248, 0.78)    78%,
        var(--tertiary)              92%
    );
    pointer-events: none;
}

/* Content sits above the portrait */
.hero-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px 40px;
}

.hero-stats {
    display: flex;
    gap: 28px;
}

.hero-bottom { margin-top: auto; }

.stat-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-desc {
    display: block;
    font-size: 0.6875rem;
    color: var(--secondary);
    margin-top: 3px;
    line-height: 1.3;
}

.hero-title {
    font-size: clamp(4.5rem, 17vw, 9.5rem);
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -0.04em;
    color: var(--primary);
    margin-bottom: 14px;
}

.hero-sub {
    font-size: 0.9375rem;
    color: var(--secondary);
    font-style: italic;
    margin-bottom: 32px;
    line-height: 1.5;
}

.hero-scroll {
    font-size: 0.8125rem;
    color: var(--secondary);
    letter-spacing: 0.02em;
    transition: color 0.2s;
    display: inline-block;
}

.hero-scroll:hover { color: var(--primary); }

/* HERO — desktop (768px+) */
@media (min-width: 768px) {
    .hero {
        flex-direction: row;
        align-items: stretch;
        height: 100vh;
        min-height: unset;
        overflow: hidden;
    }

    /* Narrow vertical sidebar */
    .hero-sidebar {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        width: 36px;
        flex-shrink: 0;
        padding: 28px 0 36px;
        border-right: 1px solid var(--border);
    }

    .hero-role,
    .hero-year {
        font-size: 0.625rem;
        font-weight: 500;
        letter-spacing: 0.1em;
        color: var(--secondary);
        text-transform: uppercase;
        writing-mode: vertical-lr;
        transform: rotate(180deg);
        white-space: nowrap;
    }

    /* Content: left column */
    .hero-content {
        flex: 1;
        padding: 36px 36px 44px 28px;
        min-width: 0;
    }

    /* Portrait: reset to flex column — right side */
    .hero-image {
        position: relative;
        inset: unset;
        width: 48%;
        height: auto;
        flex-shrink: 0;
        z-index: auto;
    }

    .hero-image img {
        height: 100%;
        object-position: center 8%;
    }

    /* Left + bottom fadeout: portrait blends into both sides */
    .hero-image::after {
        background:
            linear-gradient(to right, var(--tertiary) 0%, rgba(248, 248, 248, 0.5) 28%, rgba(248, 248, 248, 0) 55%),
            linear-gradient(to top, var(--tertiary) 0%, rgba(248, 248, 248, 0) 22%);
    }
}

@media (min-width: 1024px) {
    .hero-content { padding: 48px 48px 56px 36px; }
    .hero-image { width: 50%; }
}

@media (min-width: 1200px) {
    .hero-content { padding: 56px 64px 64px 44px; }
    .hero-sidebar { width: 44px; }
    .hero-image { width: 52%; }
}

/* ============================================================
   SECTIONS — mobile base
   ============================================================ */
.section {
    padding: 72px 24px;
    background-color: var(--white);
}

.section--alt { background-color: var(--tertiary); }

.section-inner {
    max-width: 880px;
    margin: 0 auto;
}

.section-num {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(2rem, 7vw, 3.75rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.section-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-body p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--secondary);
    font-weight: 300;
}

.section-body a {
    color: var(--primary);
    font-weight: 500;
    border-bottom: 1px solid currentColor;
    transition: opacity 0.2s;
}

.section-body a:hover { opacity: 0.5; }

.section-lead {
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 36px;
}

@media (min-width: 768px) {
    .section { padding: 104px 48px; }
}

@media (min-width: 1200px) {
    .section { padding: 144px 72px; }
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
}

.skill-tag {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--secondary);
    background-color: var(--white);
    letter-spacing: 0.02em;
}

/* ============================================================
   EXPERIENCE GRID
   ============================================================ */
.exp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .exp-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.exp-card {
    padding: 24px;
    background-color: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.exp-card:hover {
    border-color: rgba(34, 34, 34, 0.2);
}

.exp-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.exp-card-text {
    font-size: 0.875rem;
    color: var(--secondary);
    line-height: 1.75;
    font-weight: 300;
}

/* ============================================================
   CONTACT LIST
   ============================================================ */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background-color: var(--border);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 22px 24px;
    background-color: var(--white);
    transition: background-color 0.2s;
}

.contact-item:hover { background-color: var(--tertiary); }

.contact-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--secondary);
}

.contact-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--primary);
}

@media (min-width: 600px) {
    .contact-list { flex-direction: row; }
    .contact-item { flex: 1; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 24px;
    background-color: var(--primary);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8125rem;
}

@media (min-width: 768px) { .footer { padding: 20px 48px; } }
@media (min-width: 1200px) { .footer { padding: 20px 72px; } }
