/* Víctor M. Torres-Vélez — speaker & scholar site
   Palette: añil (indigo), papel, tinta, flamboyán, piedra.
   Type: Archivo (variable width) for display, Newsreader for reading. */

:root {
  --anil: #1d2657;
  --anil-deep: #141b42;
  --anil-tint: #e6e8f3;
  --papel: #f6f7f4;
  --tinta: #17191f;
  --piedra: #575d6b;
  --flamboyan: #c0302a;
  --flamboyan-soft: #ff8a7a; /* for use on indigo only */
  --rule: #c9ccd6;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;

  --measure: 66ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wrap: 76rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--text);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  font-optical-sizing: auto;
}

a { color: var(--anil); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--flamboyan); }

:focus-visible { outline: 3px solid var(--flamboyan); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible, .site-head :focus-visible { outline-color: #ffd166; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: #fff; color: var(--anil); padding: 0.6rem 1rem; font-family: var(--display); font-weight: 600;
}
.skip:focus { top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-head {
  background: var(--anil);
  color: #fff;
  font-family: var(--display);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding-top: 1.1rem; padding-bottom: 1.1rem; flex-wrap: wrap;
}
.site-name {
  color: #fff; text-decoration: none; font-weight: 700; font-stretch: 100%;
  font-size: 1.05rem; letter-spacing: 0.005em;
}
.site-name:hover { color: #fff; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: #dfe3f5; text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.site-nav a:hover { color: #fff; text-decoration: underline; }
.site-nav .lang a {
  color: #fff; border: 1px solid rgba(255,255,255,0.55); padding: 0.15rem 0.6rem; border-radius: 999px;
}
.site-nav .lang a:hover { background: #fff; color: var(--anil); text-decoration: none; }

/* ---------- Hero: the question ---------- */
.hero {
  background: var(--anil);
  color: #fff;
  padding: clamp(3rem, 8vw, 7rem) 0 clamp(3.5rem, 8vw, 6.5rem);
  overflow: hidden;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 72%;
  font-size: clamp(4.25rem, 15vw, 13.5rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
}
.hero h1 .other {
  display: block;
  font-weight: 300;
  font-stretch: 100%;
  font-size: 0.26em;
  line-height: 1.2;
  letter-spacing: 0;
  color: #b9c0e4;
  margin-top: 0.9rem;
}
.decisions {
  list-style: none; margin: 0 0 clamp(2rem, 4vw, 3rem); padding: 0;
  font-family: var(--display); font-stretch: 88%;
  font-size: clamp(1.25rem, 1rem + 1.4vw, 2.1rem);
  line-height: 1.25; font-weight: 500;
  max-width: 34ch;
}
.decisions li {
  padding: 0.55rem 0 0.55rem 1.4rem;
  border-left: 3px solid var(--flamboyan-soft);
  margin-bottom: 0.35rem;
}
.hero-lede {
  max-width: 58ch; color: #e7e9f6; margin: 0 0 2rem;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem);
}
.hero-lede strong { color: #fff; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.btn {
  display: inline-block; font-family: var(--display); font-weight: 650; font-size: 1.02rem;
  text-decoration: none; padding: 0.8rem 1.35rem; border-radius: 4px; border: 2px solid transparent;
}
.btn-primary { background: #fff; color: var(--anil); }
.btn-primary:hover { background: var(--flamboyan-soft); color: var(--anil-deep); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-ghost:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.08); }

/* Only motion on the page: the decisions arrive once, in order. */
@media (prefers-reduced-motion: no-preference) {
  .decisions li { opacity: 0; transform: translateX(-0.6rem); animation: arrive 0.6s ease-out forwards; }
  .decisions li:nth-child(1) { animation-delay: 0.25s; }
  .decisions li:nth-child(2) { animation-delay: 0.6s; }
  .decisions li:nth-child(3) { animation-delay: 0.95s; }
  @keyframes arrive { to { opacity: 1; transform: none; } }
}

/* ---------- Sections ---------- */
main > section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
main > section + section { border-top: 1px solid var(--rule); }

h2 {
  font-family: var(--display); font-weight: 750; font-stretch: 80%;
  font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.8rem);
  line-height: 1; letter-spacing: -0.01em; margin: 0 0 1.25rem; color: var(--anil);
}
h3 {
  font-family: var(--display); font-weight: 650; font-stretch: 92%;
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.7rem); line-height: 1.2; margin: 0 0 0.6rem;
}
.intro { max-width: var(--measure); color: var(--piedra); margin: 0 0 2.5rem; font-size: 1.08em; }
p { margin: 0 0 1em; }
.prose { max-width: var(--measure); }

/* About: two columns on wide screens */
.about-grid { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) { .about-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4rem; } }
.roles { list-style: none; margin: 0; padding: 0; font-family: var(--display); font-size: 0.98rem; line-height: 1.4; }
.roles li { padding: 0.8rem 0; border-top: 1px solid var(--rule); }
.roles li:last-child { border-bottom: 1px solid var(--rule); }
.roles strong { display: block; font-weight: 650; color: var(--tinta); }
.roles span { color: var(--piedra); }
.roles-head { font-family: var(--display); font-weight: 650; font-size: 1.05rem; margin: 0 0 0.6rem; color: var(--anil); }
.note { font-size: 0.9rem; color: var(--piedra); margin-top: 1rem; }

/* Approach: lenses */
.lenses { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .lenses { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4rem; } }
.lenses li { padding: 1.4rem 0; border-top: 2px solid var(--anil); }
.lenses h3 { color: var(--anil); }
.lenses p { margin: 0; max-width: 52ch; }

/* Talk topics: a ruled list, title left, abstract right */
.topics { list-style: none; margin: 0; padding: 0; }
.topic { display: grid; gap: 0.8rem 3rem; padding: 2rem 0; border-top: 1px solid var(--rule); }
.topic:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 56rem) { .topic { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); } }
.topic h3 { font-size: clamp(1.45rem, 1.15rem + 1vw, 2rem); font-stretch: 84%; font-weight: 700; line-height: 1.1; color: var(--anil); }
.topic .body p { max-width: 60ch; }
.facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin: 0.8rem 0 0; padding: 0; font-family: var(--display); font-size: 0.9rem; color: var(--piedra); }
.facts dt { font-weight: 650; color: var(--tinta); }
.facts div { display: flex; gap: 0.4rem; }
.facts dd { margin: 0; }

/* Formats strip */
.formats { display: grid; gap: 1.5rem; margin-top: 3rem; padding: 2rem; background: var(--anil-tint); border-radius: 6px; }
@media (min-width: 48rem) { .formats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.formats h3 { font-size: 1.15rem; color: var(--anil); }
.formats p { font-size: 0.98rem; margin: 0; }

/* Speaking record: a dated sequence */
.record { margin: 0; padding: 0; list-style: none; }
.year { display: grid; gap: 0.5rem 2.5rem; padding: 1.75rem 0; border-top: 1px solid var(--rule); }
@media (min-width: 48rem) { .year { grid-template-columns: 7rem minmax(0, 1fr); } }
.year > h3 { font-stretch: 75%; font-weight: 800; font-size: 2.2rem; color: var(--flamboyan); margin: 0; line-height: 1; }
.year ol { list-style: none; margin: 0; padding: 0; }
.year li { padding: 0 0 1.1rem; max-width: 70ch; }
.year li:last-child { padding-bottom: 0; }
.talk-title { font-weight: 600; }
.talk-meta { display: block; color: var(--piedra); font-size: 0.95rem; font-family: var(--display); line-height: 1.45; margin-top: 0.15rem; }

/* Work: publications and projects */
.work-grid { display: grid; gap: 3rem; }
@media (min-width: 60rem) { .work-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4.5rem; } }
.biblio { list-style: none; margin: 0; padding: 0; }
.biblio li { padding: 0 0 1rem 1.1rem; text-indent: -1.1rem; max-width: 62ch; font-size: 0.98rem; }
.biblio .status { font-family: var(--display); font-size: 0.82rem; color: var(--piedra); white-space: nowrap; }
.project { padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.project:first-of-type { border-top: 2px solid var(--anil); }
.project p { font-size: 0.98rem; max-width: 60ch; }
.design-ideas { margin: 0.6rem 0 1rem; padding-left: 1.2rem; font-size: 0.98rem; }
.design-ideas li { margin-bottom: 0.35rem; }
.caveat { font-size: 0.9rem; color: var(--piedra); border-left: 3px solid var(--rule); padding-left: 0.9rem; }

/* Invite */
.invite { background: var(--anil); color: #fff; }
.invite h2 { color: #fff; }
.invite .intro { color: #d6daf0; }
.invite a { color: #fff; }
.invite-grid { display: grid; gap: 3rem; }
@media (min-width: 62rem) { .invite-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4.5rem; } }

form .field { margin-bottom: 1.1rem; }
form .row { display: grid; gap: 0 1.2rem; }
@media (min-width: 36rem) { form .row { grid-template-columns: 1fr 1fr; } }
label, legend { display: block; font-family: var(--display); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; }
.hint { font-weight: 400; color: #c3c9e8; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--tinta); background: #fff;
  border: 2px solid #fff; border-radius: 4px; padding: 0.65rem 0.75rem;
}
textarea { min-height: 9rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }
fieldset { border: 0; margin: 0 0 1.1rem; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-family: var(--display); font-size: 0.98rem; }
.choices label { display: flex; align-items: center; gap: 0.45rem; font-weight: 400; margin: 0; }
.choices input { width: 1.15rem; height: 1.15rem; accent-color: var(--flamboyan-soft); }
.hp { position: absolute; left: -9999px; }
button[type="submit"] { cursor: pointer; }
.form-note { font-size: 0.9rem; color: #c3c9e8; margin-top: 0.8rem; }

/* Speaker kit bios */
.kit h3 { color: #fff; font-size: 1.2rem; }
.bio { background: var(--anil-deep); border-radius: 6px; padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.bio p { font-size: 0.98rem; color: #e7e9f6; }
.bio-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.6rem; }
.copy {
  font-family: var(--display); font-size: 0.88rem; font-weight: 600; cursor: pointer;
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.55); border-radius: 999px; padding: 0.3rem 0.85rem;
}
.copy:hover { background: #fff; color: var(--anil); }

/* Footer */
.site-foot { background: var(--anil-deep); color: #c3c9e8; font-family: var(--display); font-size: 0.9rem; line-height: 1.5; }
.site-foot .wrap { padding-top: 2.25rem; padding-bottom: 2.25rem; display: grid; gap: 1rem; }
@media (min-width: 52rem) { .site-foot .wrap { grid-template-columns: 1fr 1.4fr; gap: 3rem; } }
.site-foot a { color: #fff; }
.site-foot p { margin: 0 0 0.5rem; }

/* Thank-you pages */
.thanks { min-height: 70vh; display: flex; align-items: center; }
.thanks .hero-lede { margin-bottom: 1.5rem; }

@media print {
  .site-nav, .actions, form, .copy { display: none !important; }
  .hero, .invite, .site-head, .site-foot { background: #fff !important; color: #000 !important; }
  .hero h1, .invite h2 { color: #000 !important; }
}

/* Utilities and portrait */
.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; }
.portrait { margin: 0 0 1.75rem; }
.portrait img { display: block; width: 100%; max-width: 15rem; height: auto; border-radius: 4px; box-shadow: 0.6rem 0.6rem 0 var(--anil); }

.roles strong span { color: inherit; }
