/* =========================================================================
   ACL — Álvaro Carpintero. One stylesheet for the whole site.
   Deep cobalt navy ground, Archivo, dominant surname with a cobalt bar.
   Motion is CSS-only and never leaves content hidden.
   ========================================================================= */

/* ---- fonts (self-hosted, variable Archivo, no third party) --------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- tokens ---------------------------------------------------------- */
:root {
  color-scheme: dark;

  --cobalt:     #2439FF;   /* solid shapes only: the bar, chip bg, buttons */
  --electric:   #8593FF;   /* link text — 4.7:1 on --ink, passes AA */
  --indigo:     #1B23A8;

  --ink:        #0A0E24;   /* deep navy ground */
  --ink-2:      #111634;   /* raised surface */
  --ink-3:      #171D42;   /* input / hover */
  --bone:       #F2F3FA;
  --bone-2:     #B9BEDB;
  --muted:      #7C82A8;

  --line:       rgba(224, 228, 255, .12);
  --line-2:     rgba(224, 228, 255, .22);

  --font:       'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --bar-h:      .09em;
  --bar-inset:  5%;

  --r-card:     10px;
  --r-chip:     5px;
  --r-bar:      2px;

  --maxw:       1140px;
  --pad:        clamp(1.1rem, 4vw, 2.6rem);
  --nav-h:      64px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--ink);
  color: var(--bone);
  overflow-x: hidden;
}

/* ---- ambient backdrop -------------------------------------------------
   Two fixed layers behind everything: a faint cobalt/indigo light on
   opposite corners so the navy is never flat, plus a low grain that kills
   gradient banding. Both static, no paint cost after first frame, gone in
   print and when the page is a prerender. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(115vw 80vh at 85% -25%, rgba(36, 57, 255, .11), transparent 55%),
    radial-gradient(100vw 75vh at -12% 118%, rgba(27, 35, 168, .16), transparent 52%);
}
body::after {
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root.motion-off body::after { opacity: .02; }

h1, h2, h3, h4 { line-height: 1.1; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
img, picture, video, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--cobalt); color: #fff; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.visually-hidden {
  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: 8px; top: -60px; z-index: 999;
  background: var(--cobalt); color: #fff; padding: .6rem 1rem;
  border-radius: var(--r-chip); font-weight: 800; font-size: .85rem;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

/* ---- shared primitives -------------------------------------------- */
.label {
  font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.label--c { color: var(--electric); }

.bar { position: relative; display: inline-block; }
.bar::after {
  content: ""; position: absolute; left: 0; right: var(--bar-inset);
  bottom: -.12em; height: var(--bar-h); background: var(--cobalt);
  border-radius: var(--r-bar);
}

.opener { width: 60px; height: 4px; background: var(--cobalt); border-radius: var(--r-bar); margin-bottom: 1.3rem; }

.chip {
  display: inline-block; background: rgba(36, 57, 255, .16);
  border: 1px solid rgba(36, 57, 255, .42); color: #C3C9FF;
  padding: .26rem .6rem; border-radius: var(--r-chip);
  font-size: .76rem; font-weight: 600;
}

.link-more {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: 1.6rem; font-weight: 700; font-size: .92rem; color: var(--bone);
}
.link-more::after { content: "→"; transition: transform .18s ease; }
.link-more:hover { color: var(--electric); }
.link-more:hover::after { transform: translateX(3px); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--cobalt); color: #fff; font-weight: 700;
  font-size: .9rem; padding: .7rem 1.3rem; border-radius: var(--r-chip);
  transition: background .15s ease;
}
.btn:hover { background: var(--electric); }
.btn--ghost { background: transparent; border: 1px solid var(--line-2); color: var(--bone); }
.btn--ghost:hover { background: var(--ink-2); border-color: var(--cobalt); }

/* =========================================================================
   NAV  (shared)
   ========================================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__in {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad);
  height: var(--nav-h); display: flex; align-items: center; gap: .9rem;
}
.brand { display: flex; align-items: center; }
.brand img { height: 26px; width: auto; }

.nav__links { margin-left: auto; display: flex; gap: 1.3rem; font-size: .82rem; font-weight: 500; }
.nav__links a { color: var(--bone-2); transition: color .15s ease; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--bone); }

.nav__lang { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .06em; padding: .2rem .4rem; }
.nav__lang:hover { color: var(--bone); }
.nav__cta {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--cobalt); color: #fff; font-weight: 700; font-size: .78rem;
  padding: .42rem .85rem; border-radius: var(--r-chip); white-space: nowrap;
}
.nav__cta:hover { background: var(--electric); }

.nav__toggle { display: none; margin-left: auto; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--bone); transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle span::before { position: absolute; transform: translateY(-6px); }
.nav__toggle span::after { position: absolute; transform: translateY(6px); }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); }

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__cta { display: none; }
  .nav__panel {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
    padding: 1.4rem var(--pad) 2rem;
    display: grid; gap: 1rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav__panel[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav__panel a { font-size: 1.1rem; font-weight: 700; color: var(--bone); }
  .nav__panel .nav__cta { display: inline-flex; align-self: start; }
}
@media (min-width: 721px) { .nav__panel { display: contents; } }

/* =========================================================================
   HERO  (home)
   ========================================================================= */
.hero {
  position: relative;
  overflow: clip;
  padding-top: clamp(2.4rem, 8vh, 4.5rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
  border-bottom: 1px solid var(--line);
}
/* oversized ACL logo, ghosted, bleeding off the right edge — the exact brand file */
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  right: clamp(-220px, -14vw, -90px);
  translate: 0 -50%;
  width: min(92vw, 860px);
  aspect-ratio: 176 / 97;
  background: url("/assets/brand/logo2.svg") center / contain no-repeat;
  opacity: .06;
  pointer-events: none;
}
@media (min-width: 940px) {
  .hero::before { right: clamp(-260px, -10vw, -120px); width: min(58vw, 780px); }
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1fr; gap: clamp(1.8rem, 5vw, 3rem); align-items: start; }
@media (min-width: 940px) { .hero__grid { grid-template-columns: minmax(0, 1fr) clamp(210px, 24vw, 300px); } }

.hero__mark {
  height: clamp(60px, 10vw, 96px); width: auto;
  margin-bottom: clamp(1.2rem, 3.5vw, 2rem);
  overflow: visible;
}
.hero__mark .l-a, .hero__mark .l-c, .hero__mark .l-l {
  transform-box: view-box;   /* WebKit mishandles fill-box on <g> */
  transform-origin: 88px 48px;
}

.hero__kicker { font-size: clamp(1rem, 2.6vw, 1.4rem); font-weight: 700; letter-spacing: -.015em; color: var(--bone); }
.hero__name {
  font-size: clamp(2.6rem, 11vw, 6.4rem); font-weight: 900; text-transform: uppercase;
  letter-spacing: -.04em; line-height: .86; margin-top: .06em;
}
.hero__name.bar::after { bottom: -.05em; height: .07em; }
.hero__sub {
  margin-top: clamp(1.3rem, 3.5vw, 2rem); color: var(--bone-2);
  font-size: clamp(.95rem, 1.7vw, 1.1rem); max-width: 44ch; line-height: 1.55;
}
.hero__actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .8rem; }

.hero__portrait {
  border: 1px solid var(--line-2); border-radius: var(--r-card); overflow: hidden;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  max-width: 300px; justify-self: end; align-self: start;
}
.hero__portrait img { width: 100%; height: auto; display: block; }
@media (max-width: 620px) { .hero__portrait { max-width: 220px; justify-self: start; } }

/* =========================================================================
   SECTION SHELL  (shared)
   ========================================================================= */
.section { padding-block: clamp(3rem, 8vw, 5rem); border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section__head { margin-bottom: clamp(1.6rem, 4vw, 2.4rem); }
.section__head h2 { font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; margin-top: .5rem; }
.section__head p { margin-top: .8rem; color: var(--bone-2); max-width: 54ch; }

.two-col { display: grid; grid-template-columns: 1fr; gap: clamp(1.6rem, 4vw, 2.6rem); }
@media (min-width: 820px) { .two-col { grid-template-columns: 1.5fr 1fr; } }

/* ---- home: about + experience summary ---------------------------- */
.summary p { color: var(--bone-2); max-width: 56ch; font-size: 1rem; }
.summary strong { color: var(--bone); font-weight: 700; }

.milestones { display: flex; flex-direction: column; gap: 1rem; }
.milestone { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; padding-top: .9rem; border-top: 1px solid var(--line); }
.milestone::before { content: ""; width: 8px; height: 8px; margin-top: .5em; background: var(--cobalt); border-radius: 1px; }
.milestone span { color: var(--bone-2); font-size: .95rem; }

/* =========================================================================
   PROJECT ROWS  (home + /proyectos)
   ========================================================================= */
.projects { display: flex; flex-direction: column; }
.projrow {
  display: grid; grid-template-columns: auto 1fr auto; gap: .4rem 1.1rem;
  align-items: baseline; padding: 1.4rem 0; border-top: 1px solid var(--line);
}
.projects .projrow:last-child { border-bottom: 1px solid var(--line); }
.projrow__n { color: var(--electric); font-weight: 800; font-size: .8rem; }
.projrow__title { font-weight: 800; font-size: clamp(1.15rem, 2.6vw, 1.65rem); letter-spacing: -.02em; font-style: italic; }
.projrow__year { color: var(--muted); font-size: .78rem; font-weight: 600; }
.projrow__role { grid-column: 2 / -1; color: var(--bone-2); font-size: .9rem; }
.projrow__figure { grid-column: 2 / -1; color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.projrow__figure strong { color: var(--electric); font-weight: 700; }
.projrow__stack { grid-column: 2 / -1; color: var(--muted); font-size: .74rem; letter-spacing: .04em; margin-top: .3rem; }
.projrow__desc { grid-column: 2 / -1; color: var(--bone-2); font-size: .92rem; margin-top: .5rem; max-width: 62ch; }

/* the video panel opens with a compositor-friendly grid-rows collapse */
.projrow__media {
  grid-column: 1 / -1;
  display: grid; grid-template-rows: 0fr;
  opacity: 0; margin-top: 0; overflow: hidden;
  transition: grid-template-rows .38s cubic-bezier(.16,1,.3,1), opacity .3s ease, margin-top .38s ease;
}
.projrow[data-hover-video]:hover .projrow__media,
.projrow[data-hover-video]:has(a:focus-visible) .projrow__media,
.projrow[data-hover-video][data-open="true"] .projrow__media {
  grid-template-rows: 1fr; opacity: 1; margin-top: 1rem;
}
.projrow__media video {
  width: 100%; min-height: 0; aspect-ratio: 16/9; object-fit: cover;
  border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--ink-2);
}
.projrow__cta { grid-column: 2 / -1; margin-top: .7rem; font-size: .82rem; font-weight: 700; color: var(--electric); }
.projrow__cta::after { content: " ↗"; }

/* shared page header (sobre / proyectos) */
.page { padding-top: clamp(2.5rem, 8vh, 4.5rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.page-h {
  font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 900; text-transform: uppercase;
  letter-spacing: -.038em; line-height: .92;
}
.page-intro { margin-top: 1rem; color: var(--bone-2); max-width: 52ch; }
.page .projects { margin-top: clamp(2rem, 5vw, 3rem); }

/* home: summary block headings + the closing CTA */
.summary h2 { font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; margin: .5rem 0 1rem; }
.home-cta__h { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.038em; line-height: .92; margin: .5rem 0 1rem; }
.home-cta__p { color: var(--bone-2); max-width: 44ch; }
.home-cta__actions { margin-top: 1.6rem; }
.section--flush { border-bottom: 0; }

/* =========================================================================
   /sobre — CV blocks
   ========================================================================= */
.cv-block { padding-block: clamp(2.4rem, 6vw, 3.6rem); border-top: 1px solid var(--line); }
.cv-block:first-of-type { border-top: 0; }
.cv-block > h2 { font-size: clamp(1.3rem, 3.4vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 1.4rem; }
.cv-block h3 { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 1.6rem 0 .9rem; }
.cv-block h3:first-of-type { margin-top: 0; }
.cv-block p { color: var(--bone-2); max-width: 60ch; margin-bottom: 1rem; }
.cv-block p strong { color: var(--bone); font-weight: 700; }

.entry { display: grid; grid-template-columns: 1fr; gap: .2rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.entry:first-of-type { border-top: 0; padding-top: 0; }
.entry__title { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.entry__org { color: var(--muted); font-size: .82rem; font-weight: 600; }
.entry__desc { color: var(--bone-2); font-size: .92rem; margin-top: .3rem; max-width: 60ch; }

.stack-list { display: flex; flex-direction: column; gap: 1.1rem; }
.stack-list .s__name { font-weight: 800; font-size: .95rem; }
.stack-list .s__items { color: var(--bone-2); font-size: .9rem; margin-top: .2rem; }

.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; }

.award-list { display: flex; flex-direction: column; gap: .7rem; }
.award-list li { display: grid; grid-template-columns: auto 1fr; gap: .7rem; color: var(--bone-2); font-size: .95rem; }
.award-list li::before { content: "★"; color: var(--cobalt); }

/* =========================================================================
   /contacto
   ========================================================================= */
.contact-page { padding-top: clamp(2.5rem, 9vh, 5rem); }
.contact-page__h { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.038em; line-height: .92; }
.contact-page__p { color: var(--bone-2); margin-top: 1rem; max-width: 46ch; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 6vw, 3.5rem); margin-top: clamp(2rem, 6vw, 3.5rem); }
@media (min-width: 820px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-direct { display: flex; flex-direction: column; gap: 1rem; }
.contact-direct .k { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.contact-direct a { color: var(--electric); font-size: 1rem; }

form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  background: var(--ink-3); border: 1px solid var(--line-2); border-radius: var(--r-chip);
  padding: .7rem .8rem; color: var(--bone); font-size: .95rem;
}
.field input:focus, .field textarea:focus { border-color: var(--electric); }
.field textarea { min-height: 130px; resize: vertical; }
form button[type="submit"] { align-self: flex-start; }
form button[type="submit"]:disabled { opacity: .6; cursor: progress; }
[data-feedback] { font-size: .88rem; padding: .7rem .9rem; border-radius: var(--r-chip); border: 1px solid var(--line-2); }
[data-feedback][data-state="success"] { color: #B9F5C9; border-color: rgba(80,255,140,.3); background: rgba(80,255,140,.08); }
[data-feedback][data-state="error"] { color: #FFB9B5; border-color: rgba(255,90,80,.3); background: rgba(255,90,80,.08); }

/* =========================================================================
   FOOTER  (shared)
   ========================================================================= */
.footer {
  position: relative; overflow: hidden;
  background: var(--ink-2); border-top: 1px solid var(--line);
  padding-top: clamp(3rem, 9vw, 5.5rem);
  display: flex; flex-direction: column;
}
.footer__ghost {
  position: absolute; left: 50%; bottom: -33%; transform: translateX(-50%);
  width: min(1300px, 120%); height: auto; color: var(--cobalt); opacity: .07;
  pointer-events: none;
}
.footer__in {
  position: relative; display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 6vw, 3rem);
  padding-bottom: clamp(2.4rem, 7vw, 4rem);
}
@media (min-width: 740px) { .footer__in { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.footer__word { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; letter-spacing: -.02em; color: var(--bone); }
.footer__word .dot { color: var(--cobalt); }
.footer__tag { margin-top: .5rem; color: var(--muted); font-size: .84rem; }
.footer__social { margin-top: 1.4rem; display: flex; gap: .8rem; }
.footer__social a {
  width: 38px; height: 38px; display: grid; place-content: center;
  border: 1px solid var(--line-2); border-radius: var(--r-chip); color: var(--bone-2);
  transition: color .15s ease, border-color .15s ease;
}
.footer__social a:hover { color: var(--bone); border-color: var(--cobalt); }
.footer__social svg { width: 17px; height: 17px; }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.footer__cols > div { display: flex; flex-direction: column; gap: .65rem; }
.footer__col-h { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.footer__cols a { color: var(--bone-2); font-size: .9rem; transition: color .15s ease; }
.footer__cols a:hover { color: var(--bone); }
.footer__base {
  position: relative; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  justify-content: space-between; padding-block: 1.4rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem;
}

/* =========================================================================
   /links — the link-list page
   ========================================================================= */
.linkspage {
  min-height: calc(100dvh - var(--nav-h));
  display: flex; flex-direction: column; align-items: center;
  padding-block: clamp(2.5rem, 8vh, 5rem);
}
.linkspage__mark { height: clamp(52px, 11vw, 76px); width: auto; margin-bottom: 1.1rem; color: var(--bone); }
.linkspage__name { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.linkspage__name .dot, .confirm__mark + h1 .dot { color: var(--cobalt); }
.linkspage__role { color: var(--muted); font-size: .85rem; margin-top: .2rem; margin-bottom: 2rem; }
.linkspage__list { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: .7rem; }
.link-btn {
  display: flex; align-items: center; gap: .9rem;
  padding: .9rem 1.1rem;
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: var(--r-card);
  color: var(--bone); font-weight: 600; font-size: .95rem;
  transition: border-color .15s ease, transform .12s ease, background .15s ease;
}
.link-btn:hover { border-color: var(--cobalt); transform: translateY(-1px); background: var(--ink-3); }
.link-btn svg { width: 20px; height: 20px; flex: none; color: var(--bone-2); }
.link-btn .lb { flex: 1; }
.link-btn .lb small { display: block; color: var(--muted); font-weight: 400; font-size: .78rem; margin-top: 1px; }
.link-btn .lb-arrow { color: var(--muted); font-size: .8rem; }
.linkspage__divider { width: 100%; max-width: 420px; height: 1px; background: var(--line); margin: 1.1rem 0 .4rem; }

/* /gracias — post-submit confirmation */
.confirm {
  min-height: calc(100dvh - var(--nav-h));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-block: clamp(2.5rem, 10vh, 6rem);
}
.confirm__mark { height: clamp(48px, 10vw, 72px); width: auto; color: var(--bone); margin-bottom: 1.6rem; }
.confirm h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 900; text-transform: uppercase;
  letter-spacing: -.038em; line-height: .95;
}
.confirm p { color: var(--bone-2); margin-top: .9rem; max-width: 36ch; }
.confirm .btn { margin-top: 1.8rem; }

/* =========================================================================
   MOTION — CSS only. Every hidden "from" state lives here, so
   :root.motion-off (background tab / crawler / reduced motion / ?motion=off)
   means fully visible with zero animation.
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  :root:not(.motion-off) {

    /* entrance. The LCP candidates (name, portrait) animate transform ONLY and
       stay opacity:1 — Chrome ignores opacity:0 elements for LCP, so fading
       them would cap LCP at ~1s no matter how fast the bytes arrive. */
    .hero__mark .l-a { opacity: 0; animation: place-in .45s cubic-bezier(.2,.9,.25,1) .06s both; }
    .hero__mark .l-c { opacity: 0; animation: place-in .45s cubic-bezier(.2,.9,.25,1) .16s both; }
    .hero__mark .l-l { opacity: 0; animation: place-in .45s cubic-bezier(.2,.9,.25,1) .26s both; }

    .hero__kicker    { opacity: 0; animation: rise .45s cubic-bezier(.16,1,.3,1) .30s forwards; }
    .hero__name      { animation: slide-up .5s cubic-bezier(.16,1,.3,1) .12s both; }
    .hero__name.bar::after {
      transform: scaleX(0); transform-origin: left;
      animation: bar-load .8s cubic-bezier(.7,0,.3,1) .9s both;
    }
    .hero__sub       { opacity: 0; animation: rise .5s cubic-bezier(.16,1,.3,1) .40s forwards; }
    .hero__actions   { opacity: 0; animation: rise .5s cubic-bezier(.16,1,.3,1) .50s forwards; }
    .hero__portrait  { animation: slide-up .55s cubic-bezier(.16,1,.3,1) .08s both; }

    @supports (animation-timeline: view()) {
      [data-reveal] {
        opacity: 0;
        animation: rise ease-out both;
        animation-timeline: view();
        animation-range: entry 2% entry 18%;
      }
    }
    @supports not (animation-timeline: view()) {
      [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
      [data-reveal].is-in { opacity: 1; transform: none; }
    }
  }

  /* home only: the hero mark fades out as you scroll, the nav mark fades in —
     a clean hand-off instead of two ACL logos on screen at once. */
  :root[data-page="home"]:not(.motion-off) {
    @supports (animation-timeline: scroll()) {
      .hero__mark {
        animation: hero-mark-out linear both;
        animation-timeline: scroll(root);
        animation-range: 0 60vh;
      }
      .brand img {
        opacity: 0;
        animation: nav-mark-in linear both;
        animation-timeline: scroll(root);
        animation-range: 32vh 60vh;
      }
    }
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slide-up {
  from { transform: translateY(18px); }
  to   { transform: translateY(0); }
}
@keyframes place-in {
  from { opacity: 0; transform: translateY(-16px) rotate(-7deg) scale(.88); }
  to   { opacity: 1; transform: none; }
}
@keyframes bar-load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hero-mark-out { to { opacity: 0; transform: translateY(-24px); } }
@keyframes nav-mark-in { to { opacity: 1; } }

/* =========================================================================
   PRINT — the screen theme is invisible on paper
   ========================================================================= */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #111; }
  .nav, .footer, .skip-link, form, .hero__portrait, .projrow__media,
  .footer__ghost, .nav__toggle,
  body::before, body::after, .hero::before { display: none !important; }
  a { color: #111; text-decoration: underline; }
  .hero__mark, .cv-block, .entry, .projrow { break-inside: avoid; }
  .hero__mark path { fill: #111 !important; }
  * { animation: none !important; opacity: 1 !important; box-shadow: none !important; }
}
