/* ==========================================================================
   lautarozarate.com.ar — Hoja de estilos principal
   Paleta: tinta (azul noche) sobre papel cálido, acento cobre.
   ========================================================================== */

:root {
    --paper: #F5F3EE;
    --paper-2: #ECE8E0;
    --ink: #0E1726;
    --ink-2: #1B2638;
    --muted: #5A6372;
    --line: #DAD5CB;
    --accent: #B0622B;
    --accent-soft: #E9D3C2;
    --on-dark: #E9E6DF;
    --on-dark-muted: #9AA3B2;
    --line-dark: #2A3547;

    --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --container: 1160px;
    --radius: 14px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 16px; top: -48px; z-index: 100;
    background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px;
    text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Header / navegación ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark {
    display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--ink); color: var(--paper);
    font-family: var(--font-serif); font-size: 15px; letter-spacing: .04em;
}
.brand__name { font-weight: 600; font-size: 15px; letter-spacing: .01em; }

.nav__menu { display: flex; align-items: center; gap: 30px; font-size: 14.5px; }
.nav__menu a {
    text-decoration: none; color: var(--muted);
    transition: color .2s;
}
.nav__menu a:hover, .nav__menu a.is-active { color: var(--ink); }
.nav__menu .nav__cta {
    color: var(--paper); background: var(--ink);
    padding: 9px 18px; border-radius: 999px;
    transition: background .2s;
}
.nav__menu .nav__cta:hover { color: var(--paper); background: var(--accent); }

.nav__toggle {
    display: none; background: none; border: 0; cursor: pointer;
    width: 44px; height: 44px; padding: 12px; flex-direction: column; justify-content: center; gap: 6px;
}
.nav__bar { display: block; height: 1.5px; width: 100%; background: var(--ink); transition: transform .3s var(--ease); }
.nav__toggle[aria-expanded="true"] .nav__bar:first-of-type { transform: translateY(3.75px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bar:last-of-type { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 26px; border-radius: 999px;
    font-size: 15px; font-weight: 500; text-decoration: none;
    transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
    display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 64px;
    padding-block: 72px 96px;
}
.eyebrow {
    font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 22px;
}
.hero__title {
    font-family: var(--font-serif);
    font-size: clamp(40px, 5.6vw, 74px);
    line-height: 1.04; letter-spacing: -.02em; font-weight: 400;
}
.hero__title em { font-style: italic; color: var(--accent); }
.hero__lead { margin-top: 28px; max-width: 54ch; color: var(--muted); font-size: 18.5px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__portrait { position: relative; margin: 0; justify-self: center; width: min(100%, 420px); aspect-ratio: 1; }
.hero__portrait img {
    position: absolute; inset: 12%;
    width: 76%; height: 76%; object-fit: cover;
    border-radius: 50%;
    filter: grayscale(.15) contrast(1.03);
    box-shadow: 0 30px 60px -30px rgba(14, 23, 38, .45);
}
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit__ring { fill: none; stroke: var(--line); stroke-width: 1; }
.orbit__ring--dashed { stroke: var(--accent-soft); stroke-dasharray: 2 7; }
.orbit__dot { fill: var(--accent); }
.orbit__dot--muted { fill: var(--ink); opacity: .55; }
.orbit__spin { transform-origin: 200px 200px; animation: spin 26s linear infinite; }
.orbit__spin--slow { animation-duration: 48s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__location {
    position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
    padding: 7px 16px; font-size: 13px; color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3E8E63; box-shadow: 0 0 0 4px rgba(62, 142, 99, .15); }

/* ---------- Datos clave ---------- */
.facts { border-block: 1px solid var(--line); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { display: flex; flex-direction: column; gap: 4px; padding: 30px 24px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact__value { font-family: var(--font-serif); font-size: 28px; line-height: 1.2; }
.fact__label { font-size: 13.5px; color: var(--muted); }

/* ---------- Secciones ---------- */
.section { padding-block: 120px; }
.section--tinted { background: var(--paper-2); }
.section--dark { background: var(--ink); color: var(--on-dark); }

.section__head { display: grid; grid-template-columns: 120px 1fr; column-gap: 24px; row-gap: 20px; margin-bottom: 64px; }
.section__index {
    font-family: var(--font-serif); font-size: 15px; color: var(--accent);
    padding-top: 14px; border-top: 1px solid currentColor; width: 48px;
}
.section__title { font-family: var(--font-serif); font-size: clamp(34px, 4vw, 52px); line-height: 1.1; letter-spacing: -.015em; font-weight: 400; }
.section__intro { grid-column: 2; max-width: 62ch; color: var(--muted); font-size: 18px; }
.section__intro a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.section--dark .section__intro { color: var(--on-dark-muted); }

/* ---------- Sobre mí ---------- */
.about { display: grid; grid-template-columns: 120px 1fr 1fr; column-gap: 24px; }
.about__quote {
    grid-column: 2; padding-right: 48px;
    font-family: var(--font-serif); font-size: 27px; line-height: 1.35; font-style: italic;
}
.about__body { grid-column: 3; display: grid; gap: 18px; color: var(--muted); }

/* ---------- Pilares (Qué hago hoy) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 32px 28px 36px;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.pillar:hover { transform: translateY(-4px); border-color: var(--accent-soft); box-shadow: 0 24px 40px -28px rgba(14, 23, 38, .35); }
.pillar__num { display: block; font-family: var(--font-serif); font-size: 15px; color: var(--accent); margin-bottom: 40px; }
.pillar h3 { font-size: 19px; font-weight: 600; margin-bottom: 12px; letter-spacing: -.005em; }
.pillar p { font-size: 15px; color: var(--muted); }

/* ---------- Trayectoria ---------- */
.career { display: grid; grid-template-columns: 1.6fr 1fr; gap: 72px; padding-left: 144px; }
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.timeline__item { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 0 0 40px 34px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
    content: ""; position: absolute; left: 0; top: 8px; width: 11px; height: 11px; border-radius: 50%;
    background: var(--paper); border: 1.5px solid var(--muted);
}
.timeline__item--current::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline__when { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.timeline__item--current .timeline__when { color: var(--accent); }
.timeline__item h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.timeline__item p { font-size: 15px; color: var(--muted); }

.skills { align-self: start; position: sticky; top: 100px; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.skills__title { font-family: var(--font-serif); font-size: 22px; margin-bottom: 22px; }
.skills__group + .skills__group { margin-top: 24px; }
.skills__label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 13.5px; padding: 6px 13px; border-radius: 999px; background: var(--paper-2); }

.built { margin-top: 96px; padding-left: 144px; }
.built__title { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.built__grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.built__item { display: flex; flex-direction: column; padding: 26px 32px 26px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.built__item:nth-child(even) { padding-left: 32px; padding-right: 0; border-left: 1px solid var(--line); }
.built__item h4 { font-family: var(--font-serif); font-size: 21px; margin-bottom: 8px; }
.built__item h4 span { color: var(--accent); display: inline-block; transition: transform .25s var(--ease); }
.built__item:hover h4 span { transform: translate(3px, -3px); }
.built__item p { font-size: 14.5px; color: var(--muted); }
.built__meta { margin-top: 14px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #8A919C; }
.built__meta--link { color: var(--accent); }

/* ---------- Repos públicos ---------- */
.repos__list { border-top: 1px solid var(--line); }
.repo a {
    display: grid; grid-template-columns: 72px 1fr 170px 24px; align-items: baseline; gap: 24px;
    padding: 22px 8px; border-bottom: 1px solid var(--line); text-decoration: none;
    transition: background .2s, padding .3s var(--ease);
}
.repo a:hover { background: var(--paper); padding-inline: 16px 8px; }
.repo__year { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.repo__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.repo__name {
    font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
    font-size: 16px; font-weight: 600; overflow-wrap: anywhere;
}
.repo__desc { font-size: 14.5px; color: var(--muted); }
.repo__lang { font-size: 13px; color: var(--muted); text-align: right; }
.repo__arrow { color: var(--accent); transition: transform .25s var(--ease); }
.repo a:hover .repo__arrow { transform: translate(3px, -3px); }
.repo.is-hidden { display: none; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 28px; }
.pager[hidden] { display: none; }
.pager__btn {
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 16px;
    transition: border-color .2s, background .2s;
}
.pager__btn:hover:not(:disabled) { border-color: var(--ink); background: var(--paper); }
.pager__btn:disabled { opacity: .35; cursor: default; }
.pager__status { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; }

/* ---------- Fuera de la oficina ---------- */
.hobbies { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-dark); }
.hobby { padding: 40px 28px 8px 0; }
.hobby + .hobby { padding-left: 28px; border-left: 1px solid var(--line-dark); }
.hobby__icon {
    width: 44px; height: 44px; margin-bottom: 28px;
    fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.hobby h3 { font-family: var(--font-serif); font-size: 26px; margin-bottom: 12px; color: #fff; }
.hobby p { font-size: 15px; color: var(--on-dark-muted); }

/* ---------- Contacto ---------- */
.contact__body { padding-left: 144px; }
.contact__lead { max-width: 46ch; font-size: 20px; color: var(--muted); }
.contact__mail {
    display: inline-block; margin-top: 28px;
    font-family: var(--font-serif); font-size: clamp(26px, 4.4vw, 56px); letter-spacing: -.02em;
    text-decoration: none; border-bottom: 1px solid var(--line);
    transition: color .2s, border-color .2s; word-break: break-word;
}
.contact__mail:hover { color: var(--accent); border-color: var(--accent); }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.contact__links a {
    display: inline-block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px;
    font-size: 14.5px; text-decoration: none; transition: border-color .2s, background .2s;
}
.contact__links a:hover { border-color: var(--ink); background: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; justify-content: space-between; padding-block: 28px; font-size: 13.5px; color: var(--muted); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Animación de aparición ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .orbit__spin { animation: none; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .pillars { grid-template-columns: repeat(2, 1fr); }
    .repo a { grid-template-columns: 56px 1fr 130px 20px; gap: 18px; }
    .hobbies { grid-template-columns: repeat(2, 1fr); }
    .hobby:nth-child(3) { padding-left: 0; border-left: 0; }
    .career, .built, .contact__body { padding-left: 0; }
    .about { grid-template-columns: 1fr 1fr; }
    .about__quote { grid-column: 1; }
    .about__body { grid-column: 2; }
}

@media (max-width: 820px) {
    body { font-size: 16px; }
    .nav__toggle { display: flex; }
    .nav__menu {
        position: absolute; top: 72px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--paper); border-bottom: 1px solid var(--line);
        padding: 8px 24px 24px;
        opacity: 0; visibility: hidden; transform: translateY(-8px);
        transition: opacity .25s, transform .25s var(--ease), visibility .25s;
    }
    .nav__menu.is-open { opacity: 1; visibility: visible; transform: none; }
    .nav__menu a { display: block; padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
    .nav__menu .nav__cta { margin-top: 16px; text-align: center; border-bottom: 0; }

    .hero { grid-template-columns: 1fr; gap: 48px; padding-block: 40px 72px; }
    .hero__portrait { order: -1; width: min(78%, 320px); }

    .facts__grid { grid-template-columns: repeat(2, 1fr); }
    .fact { padding: 22px 16px; }
    .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
    .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
    .fact__value { font-size: 23px; }

    .section { padding-block: 84px; }
    .section__head { grid-template-columns: 1fr; margin-bottom: 44px; }
    .section__intro { grid-column: 1; }

    .about { grid-template-columns: 1fr; row-gap: 28px; }
    .about__quote, .about__body { grid-column: 1; padding-right: 0; }
    .about__quote { font-size: 23px; }

    .career { grid-template-columns: 1fr; gap: 48px; }
    .skills { position: static; }
    .timeline__item { grid-template-columns: 1fr; gap: 4px; }

    .built { margin-top: 72px; }
    .built__grid { grid-template-columns: 1fr; }
    .built__item, .built__item:nth-child(even) { padding: 22px 0; border-left: 0; }

    .repo a { grid-template-columns: 1fr 20px; gap: 6px 16px; padding: 20px 0; }
    .repo a:hover { padding-inline: 0; background: transparent; }
    .repo__year { grid-column: 1; grid-row: 1; }
    .repo__main { grid-column: 1; }
    .repo__lang { grid-column: 1; text-align: left; font-size: 12.5px; }
    .repo__arrow { grid-column: 2; grid-row: 1; }
    .pager { justify-content: center; }

    .hobbies { grid-template-columns: 1fr; }
    .hobby, .hobby + .hobby { padding: 32px 0; border-left: 0; border-bottom: 1px solid var(--line-dark); }
    .hobby:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
    .pillars { grid-template-columns: 1fr; }
    .site-footer__inner { flex-direction: column; gap: 8px; }
}
