/* =========================================================
   Lio Fernández Roca · token system v3
   Paper editorial ground, ink type, cobalt-blue accent
   (sampled from his own jacket), cutout portrait signature.

   v3 changes from v2:
   - Display face swapped to Piazzolla (named for Astor Piazzolla,
     the Buenos Aires tango composer) in place of Bodoni Moda /
     Fraunces / Frank Ruhl Libre. It is an editorial serif with real
     character and a personal tie to Lio's Buenos Aires roots,
     rather than a font picked for looking "designed."
   - --accent-bright split into a light-background use (unchanged
     hue) and a dedicated dark-background text tone, because the
     old value only hit ~3.5:1 against --ink (fails WCAG AA for
     text; fine for large text/UI only). New value verified by hand
     against the WCAG relative-luminance formula at ~4.6:1.
   - --ink-faint darkened from #8A8D8F to #6B6E71 for the same
     reason (old value was ~3:1 on paper, used for captions/dates).
   - Logo wall rebuilt as a typographic client index (no hotlinked
     icon-only marks, no bordered pills).
   - Header now carries a role/location tagline next to the
     wordmark instead of sitting flat with just a name.
   - Added a skip link, tightened focus states, and an extra
     small-phone breakpoint.
   ========================================================= */

:root {
  --paper: #F5F3EF;
  --paper-alt: #ECE8E0;
  --ink: #1A1C1E;
  --ink-soft: #55585D;
  --ink-faint: #6B6E71;       /* darkened for AA contrast on paper */
  --rule: #DAD5C9;
  --accent: #0C3F97;          /* cobalt, for light backgrounds + large UI */
  --accent-bright: #1D68ED;   /* for large text / icons / UI on dark bg (>=3:1) */
  --accent-on-dark: #3D7EFF;  /* for body-size text on dark bg (>=4.5:1 AA) */
  --accent-soft: #DDE3EE;

  --font-display: "Piazzolla", Georgia, serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-w: 1180px;
  --gutter: clamp(1.5rem, 4vw, 4rem);
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--accent);
  margin: 0 0 0.7rem;
}

.contact .eyebrow { color: var(--accent-on-dark); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.contact a:focus-visible, .contact button:focus-visible {
  outline-color: var(--accent-on-dark);
}

/* Skip link: visually hidden until focused */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7em 1.1em;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

.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;
}

/* =========================================================
   Header / nav
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem var(--gutter);
  background: rgba(245, 243, 239, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.brand-block {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  min-width: 0;
}

.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ink);
  white-space: nowrap;
}

.brand-tagline {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 0.9rem;
  border-left: 1px solid var(--rule);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.1rem);
  font-size: 0.92rem;
}

.main-nav a {
  position: relative;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--ink); }

.main-nav a.nav-cta {
  color: var(--paper);
  background: var(--ink);
  padding: 0.5em 1.05em;
  border-radius: 2px;
}
.main-nav a.nav-cta:hover { background: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1px;
  width: 18px;
  margin: 0 auto;
  background: var(--ink);
}

/* Language toggle (EN / ES): plain text, subtle divider, no box */
.lang-toggle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: none;
  border: none;
  border-left: 1px solid var(--rule);
  padding-left: clamp(1rem, 2vw, 2.1rem);
  margin-left: 0.35rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.lang-toggle:hover, .lang-toggle:focus-visible { color: var(--ink); }

/* =========================================================
   Layout helpers
   ========================================================= */

.section-inner, .hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section-alt { background: var(--paper-alt); }

.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-intro {
  color: var(--ink-soft);
  margin-top: 0.9rem;
  text-wrap: pretty;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  padding: clamp(2.5rem, 7vw, 5rem) 0 0;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  align-items: end;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.hero-text { padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  margin-bottom: 1.3rem;
}

.hero-lede {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--ink);
  max-width: 36ch;
  margin-bottom: 1.3rem;
}

.hero-body {
  color: var(--ink-soft);
  max-width: 52ch;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.4rem;
  margin-top: 1.8rem;
}

.hero-location {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.btn {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.85em 1.4em;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); }

.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Cutout portrait: bleeds to the bottom edge of the hero, no frame/box */
.hero-media {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  height: 100%;
}

.hero-portrait {
  width: 100%;
  max-width: clamp(480px, 46vw, 860px);
  height: auto;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 18px 30px rgba(20, 22, 24, 0.16));
}

/* =========================================================
   About
   ========================================================= */

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.about-grid .section-head { margin-bottom: 0; }

.section-body p { color: var(--ink-soft); }
.section-body strong { color: var(--ink); font-weight: 600; }
.section-body a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--ink-faint);
  transition: border-color 0.2s ease;
}
.section-body a:hover, .section-body a:focus-visible { border-color: var(--accent); }

/* =========================================================
   Clients: typographic index (no hotlinked icon marks)
   ========================================================= */

.client-index { border-bottom: 1px solid var(--rule); margin-bottom: 1.75rem; }

.client-tier {
  padding: 1.75rem 0;
}
.client-tier:first-child { padding-top: 0; }
.client-tier + .client-tier {
  border-top: 1px dashed var(--rule);
}

.client-tier-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
}

.client-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 0.6rem;
}

.client-list-primary li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  color: var(--ink);
}
.client-list-primary li:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 1.1rem;
  vertical-align: middle;
}

.client-list-secondary li {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink-soft);
}
.client-list-secondary li:not(:last-child)::after {
  content: "\00b7";
  color: var(--ink-faint);
  margin: 0 0.85rem;
}

.geo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
}

.geo-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent);
  margin: 0 0.6rem 0 0;
}

.geo-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.geo-tags li:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 0.9rem;
  vertical-align: middle;
}

/* =========================================================
   Focus / what I do
   ========================================================= */

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.focus-card {
  background: var(--paper);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  border-top: 3px solid var(--accent);
}

.focus-card h3 {
  font-size: clamp(1.3rem, 2.1vw, 1.6rem);
  font-weight: 600;
  margin-bottom: 0.7rem;
  line-height: 1.15;
}
.focus-card p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

/* =========================================================
   Writing & speaking
   ========================================================= */

.writing-speaking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.ws-heading {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
}

.writing-list, .speaking-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.writing-list li, .speaking-list li { border-bottom: 1px solid var(--rule); }

.writing-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0;
}
.writing-list a:hover .writing-title,
.writing-list a:focus-visible .writing-title { color: var(--accent); }

.speaking-list a {
  display: block;
  padding: 1.1rem 0;
}
.speaking-list a:hover .writing-title,
.speaking-list a:focus-visible .writing-title { color: var(--accent); }

.writing-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.2s ease;
}

.writing-date {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

.speaking-desc {
  display: block;
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-top: 0.4rem;
}

.ws-more { color: var(--ink-soft); font-size: 0.95rem; }
.ws-more a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.ws-more a:hover { border-color: var(--accent); }

/* =========================================================
   Contact
   ========================================================= */

.contact { background: var(--ink); color: var(--paper); }
.contact h2 { color: var(--paper); font-size: clamp(2.2rem, 4.5vw, 3.4rem); }

.contact-lede {
  color: rgba(245, 243, 239, 0.82);
  max-width: 44ch;
  margin-top: 1rem;
  font-size: 1.03rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(245, 243, 239, 0.25);
}

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(245, 243, 239, 0.25);
  transition: opacity 0.2s ease;
}
a.contact-link:hover { opacity: 0.75; }

.contact-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--accent-on-dark);
}

.contact-value { font-family: var(--font-display); font-size: 1.15rem; }

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.6rem var(--gutter);
  background: var(--ink);
  color: rgba(245, 243, 239, 0.75);
  font-size: 0.82rem;
  border-top: 1px solid rgba(245, 243, 239, 0.15);
}
.site-footer .footer-roots {
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(245, 243, 239, 0.55);
}
.site-footer a:hover { color: var(--paper); }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-text { order: 1; padding-bottom: 0; }
  .hero-media { order: 2; margin-top: 2.5rem; justify-content: center; }
  .hero-portrait { max-width: 600px; margin: 0 auto; }
  .about-grid, .contact-grid, .writing-speaking-grid { grid-template-columns: 1fr; }
  .focus-grid { grid-template-columns: 1fr; }
  .brand-tagline { display: none; }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1.2rem;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 0.8rem 0; width: 100%; }
  .main-nav a.nav-cta { margin-top: 0.5rem; text-align: center; }
  .lang-toggle {
    border-left: none;
    border-top: 1px solid var(--rule);
    padding: 0.8rem 0 0;
    margin: 0.6rem 0 0;
    width: 100%;
    text-align: left;
  }
  .nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  .site-header { padding: 0.9rem 1.25rem; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 2.8rem); }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .client-list-primary li,
  .client-list-secondary li { width: 100%; }
  .client-list-primary li::after,
  .client-list-secondary li::after { display: none; }
  .client-list { flex-direction: column; gap: 0.5rem; }
}
