/* Hallmark · shape: Index-First (a poster hero, then the practice as rows and a weighted index) · genre: editorial · theme: brand · redesign: full · job: hire · draw: 78aa1f
 * paper: #f2f6f5 · accent: #4da8a5 · display: DM Sans · body: DM Sans · hero: Poster · nav: edge-aligned, the lockup and the language switch · footer: colophon inside the night close · signature: the name at poster scale resting on the base of the neural field, the mark turning beside it
 * axes: light/geometric-sans/cool · posture: Committed (the night field carries the hero and the close, the teal mark is field, the accent stays a signal) · imagery: the brand's own neural field and mark, one portrait · contrast: pass · fold: pass · hero-review: in-thread · 1 finding (the pause control sat over the mark) · 1 resolved · finish-review: in-thread · 0 open · v2.0.0 */
/* Hallmark · pre-emit critique: P3 H4 E4 S4 R4 V3 · weakest: P, a practice page states no thesis; moved the page's one claim out of the hero and set it as the statement that opens the page below the fold */
/* Hallmark · waive 78 · legal.html is a long document, its h2 are inline heads at the title size · the home page sets every section head at --text-section, the legal notice reads as one continuous text */
/* Hallmark · answered F20 · the index holds the owner's own terms, 50 of them in five groups; the count per row follows the words, not a grid */
/* Hallmark · dismissed 77 · legal.html is a legal notice, one document under a head, never a landing page */
/* Hallmark · dismissed 25 · the contact line beside the address is two short sentences, set as a lede from 28ch */
/* Hallmark · dismissed render · the fallback face only shows when the files are opened from disk, where the font request is blocked; the served pages load DM Sans */
/* tokens.css and base.css are linked from each page before this file, so the three load in parallel. */

/* Newsreader sets the heads, Public Sans the text, DM Mono (the logo's face) the name. Latin subsets. */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
/* Italic only for foreign terms in heads; optical size pinned at 24 to keep it small. */
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 400 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
/* Local fallbacks scaled to the web faces' metrics, so the swap barely moves text. */
@font-face {
  font-family: "Public Sans Fallback";
  src: local("Arial");
  size-adjust: 99.1%;
  ascent-override: 95.8%;
  descent-override: 22.7%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia");
  size-adjust: 96%;
  ascent-override: 76.6%;
  descent-override: 27.6%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
}

.skip {
  position: absolute;
  left: var(--space-md);
  top: calc(-1 * var(--space-3xl));
  z-index: var(--z-toast);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-ink);
  color: var(--color-paper);
}
.skip:focus-visible {
  top: var(--space-md);
  /* It appears over the night hero, where the default focus colour is too dark. */
  outline-color: var(--color-on-night-link);
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The 4 | 8 split every section hangs from. */
.cols {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap-columns);
  row-gap: var(--space-lg);
}
.cols > .side {
  grid-column: 1 / span 4;
}
.cols > .main {
  grid-column: 5 / -1;
}

/* ── Night field: the hero, the header over it and the close ─────── */

.on-dark,
.hero,
.close,
.site-footer {
  --color-ink: var(--color-on-night);
  --color-muted: var(--color-on-night-muted);
  --color-link: var(--color-on-night-link);
  --color-rule: var(--color-night-rule);
  --color-focus: var(--color-on-night-link);
  color: var(--color-on-night);
}

/* ── Header ──────────────────────────────────────────────────────── */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--nav-h);
}

.site-header.on-dark {
  position: absolute;
  inset: 0 0 auto;
  z-index: var(--z-raised);
}

/* Proportions measured on the original logo: the mark stands 1.06 times the
   wordmark's height, centred on it, with 0.31 of that height between them.
   mark.svg's ink fills 84% of its box, hence the larger box and smaller gap. */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.546875rem;
  min-height: var(--hit);
  text-decoration: none;
}

.lockup-mark {
  width: 3.125rem;
  height: 3.125rem;
  background: var(--color-accent);
  -webkit-mask: url("../img/mark.svg") center / contain no-repeat;
  mask: url("../img/mark.svg") center / contain no-repeat;
}

/* Original wordmark, traced from the logo so it keeps its typeface. The viewBox is cropped to the ink. */
.wordmark {
  height: 2.5rem;
  width: auto;
}
.wm-ink {
  fill: var(--color-ink);
}
.wm-s {
  fill: var(--color-accent);
}

.lang {
  display: flex;
  gap: var(--space-2xs);
  font-size: var(--text-md);
}

.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--hit);
  min-height: var(--hit);
  padding-inline: var(--space-sm);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out);
}
.lang a:hover {
  color: var(--color-ink);
}
.lang a:active {
  transform: translateY(1px);
}
.lang a[aria-current="page"] {
  background: var(--color-night-chip);
  color: var(--color-ink);
}

/* ── Hero: a poster. The name rests on the base of the field ─────── */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: flex;
  min-height: min(100svh, 68rem);
  padding-block: calc(var(--nav-h) + var(--space-xl)) var(--space-2xl);
  background: var(--color-night);
  color: var(--color-on-night);
}

/* The neural background from the previous site, slowly drifting. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, var(--color-scrim-near) 30%, var(--color-scrim-far)),
    url("../img/background.jpg") center top / cover no-repeat;
  animation: drift 40s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    background-position:
      0 0,
      center top;
  }
  to {
    background-position:
      0 0,
      center bottom;
  }
}

.hero .wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-mark {
  position: absolute;
  z-index: -1;
  top: 46%;
  right: -14rem;
  width: min(52rem, 85%);
  aspect-ratio: 1;
  background: var(--color-mark);
  -webkit-mask: url("../img/mark.svg") center / contain no-repeat;
  mask: url("../img/mark.svg") center / contain no-repeat;
  --t: translateY(-50%);
  --o: 1;
  opacity: var(--o);
  transform: var(--t);
  animation: unfurl 1.8s cubic-bezier(0.2, 0.7, 0.1, 1) both;
  pointer-events: none;
}

@keyframes unfurl {
  from {
    opacity: 0;
    transform: var(--t) rotate(-50deg) scale(0.85);
  }
  to {
    opacity: var(--o);
    transform: var(--t);
  }
}

/* The drift holds still until the script starts it, and stops off screen. */
[data-loop]:not(.is-running)::before {
  animation-play-state: paused;
}

.hero h1 {
  max-width: none;
  font-family: var(--font-outlier);
  font-size: var(--text-poster);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  /* A mono space is a full cell wide; narrow it so the surnames read as one name. */
  word-spacing: -0.28em;
}
.hero h1 span {
  display: block;
}

/* Name and role share the logo's mono, as in the logo itself. */
.role {
  max-width: none;
  margin-top: var(--space-lg);
  font-family: var(--font-outlier);
  font-size: var(--text-lead);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--color-on-night);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-h);
  padding: 0 var(--space-lg);
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}
.btn:hover {
  background: var(--color-night-chip);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--color-ink);
  color: var(--color-night);
}
.btn-primary:hover {
  background: var(--color-link);
  border-color: var(--color-link);
}

/* ── Statement: the one claim, set large ─────────────────────────── */

.statement-sec {
  padding-block: var(--space-3xl);
}

/* In dark mode the paper matches the night field; a hairline gives the hero its lower edge. */
@media (prefers-color-scheme: dark) {
  .statement-sec {
    border-top: var(--rule-hair) solid var(--color-night-rule);
  }
}

.statement {
  max-width: 18em;
  margin-left: auto;
  text-align: right;
  font-family: var(--font-display);
  font-size: var(--text-statement);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ── About: a tinted well ────────────────────────────────────────── */

.about-sec {
  padding-block: var(--section-gap-s);
  background: var(--color-paper-2);
}

.portrait {
  flex: none;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  outline: 1px solid var(--color-accent);
  outline-offset: 3px;
  /* Deterrent only: no drag, no long-press menu, right-click falls through. */
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* Portrait beside the paragraph on wide screens, above it once the columns stack. */
.about {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}
@media (max-width: 60rem) {
  .about {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
  }
}

/* A rem measure, so the larger lead and the body end at the same edge. */
.about p {
  max-width: 38rem;
  font-size: var(--text-prose);
  color: var(--color-ink-2);
}
.about p + p {
  margin-top: var(--space-md);
}
.about p:first-child {
  font-size: var(--text-lead);
  line-height: 1.45;
  color: var(--color-ink);
}
.about a,
.legal a,
.close a {
  color: var(--color-link);
}

/* ── Knowledge: a compact weighted index. Size says how often a term is used ─ */

.kw-sec {
  padding-block: var(--section-gap-s);
}

.kw-index {
  margin-top: var(--space-xl);
}

.kw-group {
  padding-block: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.kw-group h3 {
  padding-top: var(--space-2xs);
  font-size: var(--text-lead);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* One line of context per capability, above its terms. */
.kw-intro {
  max-width: 38rem;
  margin-bottom: var(--space-xs);
  font-size: var(--text-prose);
  color: var(--color-ink-2);
}

.kw-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.kw {
  padding: var(--space-xs) 0;
  border: 0;
  background: none;
  color: var(--color-ink-2);
  font-size: var(--text-md);
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  text-decoration: underline dotted var(--color-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  cursor: pointer;
  transition: color var(--dur-short) var(--ease-out);
}
.kw:hover {
  color: var(--color-link);
  text-decoration-style: solid;
  text-decoration-color: var(--color-accent);
}
.kw:active {
  transform: translateY(1px);
}

.kw[data-w="1"] {
  font-size: 0.8125rem;
  color: var(--color-muted);
}
.kw[data-w="3"] {
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--color-ink);
}
.kw[data-w="4"] {
  font-size: 1.4375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-ink);
}
.kw[data-w="1"]:hover,
.kw[data-w="3"]:hover,
.kw[data-w="4"]:hover {
  color: var(--color-link);
}

/* ── Collaboration: one paragraph before the close ───────────────── */

/* Sections alternate paper and well: expertise (paper), teaching (well),
   collaboration (paper), then the dark close band. */
.teach-sec,
.collab-sec {
  padding-block: var(--space-3xl);
}

.teach-sec {
  background: var(--color-paper-2);
}

.collab-sec {
  background: var(--color-paper);
}

.teach,
.collab {
  max-width: 38rem;
  font-size: var(--text-lead);
  line-height: 1.5;
  color: var(--color-ink);
}

/* Keyword explanation dialog */

.kw-dialog {
  width: min(30rem, calc(100% - var(--space-xl)));
  padding: var(--space-xl);
  border: 0;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: 0 1.5rem 3rem -1rem var(--color-shadow);
}

.kw-dialog[open] {
  animation: rise var(--dur-short) var(--ease-out);
}

.kw-dialog::backdrop {
  background: var(--color-backdrop);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.kw-dialog h3 {
  margin: 0 var(--space-3xl) var(--space-sm) 0;
}

.kw-dialog p {
  color: var(--color-muted);
}

.kw-dialog form {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  margin: 0;
}

.kw-close {
  min-height: var(--hit);
  padding: 0 var(--space-md);
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out);
}
.kw-close:hover {
  background: var(--color-paper-2);
}
.kw-close:active {
  transform: translateY(1px);
}

/* ── Close: contact on the night field, then the colophon ────────── */

.close {
  padding-block: var(--section-gap-s);
  background: var(--color-band);
}

.close .side p {
  max-width: 28ch;
  margin-top: var(--space-lg);
  font-size: var(--text-lead);
  line-height: 1.45;
  color: var(--color-muted);
}

.contact-mail {
  display: inline-block;
  max-width: 100%;
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
  overflow-wrap: break-word;
  transition: color var(--dur-short) var(--ease-out);
}
.close .contact-mail {
  color: var(--color-ink);
}
.close .contact-mail:hover {
  color: var(--color-link);
}

.contact-more {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  margin-top: var(--space-lg);
  font-size: var(--text-lead);
}

.contact-note {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.site-footer {
  background: var(--color-band);
  color: var(--color-on-night);
  font-size: var(--text-sm);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* The rule sits inside the container, so it lines up with the columns above.
   max-width: none lets both children grow, so the rule never breaks between them. */
.site-footer .wrap > * {
  flex: 1 1 auto;
  max-width: none;
  padding-block: var(--space-lg) var(--space-xl);
  border-top: var(--rule-hair) solid var(--color-rule);
  color: var(--color-muted);
}
.site-footer .wrap > :last-child {
  text-align: right;
}

.site-footer a {
  display: inline-block;
  padding-block: var(--space-sm);
  margin-block: calc(-1 * var(--space-sm));
  color: var(--color-muted);
  transition: color var(--dur-short) var(--ease-out);
}
.site-footer a:hover {
  color: var(--color-ink);
}

/* The short 404 page keeps its footer at the bottom of the viewport. */
.err-page {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
.err-page main {
  flex: 1;
}
/* The English line on the Spanish page is foreign text, so it goes in italics. */
.err-page p[lang="en"] {
  font-style: italic;
}

/* ── Legal page: a plain document ────────────────────────────────── */

.legal-page .site-header {
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.legal {
  padding-block: var(--space-3xl) var(--section-gap);
}

.legal h1 {
  font-size: var(--text-display-s);
}

.legal .updated {
  margin-top: var(--space-sm);
  color: var(--color-muted);
}

.legal .main > :first-child {
  margin-top: 0;
}

.legal p,
.legal ul {
  max-width: 62ch;
  font-size: var(--text-prose);
  line-height: 1.65;
}
.legal p + p,
.legal p + ul,
.legal ul + p {
  margin-top: var(--space-md);
}
.legal ul {
  margin-bottom: 0;
  padding-left: var(--space-lg);
}

.legal h2 {
  max-width: none;
  margin: var(--space-2xl) 0 var(--space-sm);
  font-size: var(--text-title);
  letter-spacing: -0.015em;
}

.legal li + li {
  margin-top: var(--space-xs);
}

/* ── Narrow screens ──────────────────────────────────────────────── */

/* Between tablet and wide desktop the full-size mark would run under the name and
   role; lift and shrink it so the solid mark never sits behind text. */
@media (min-width: 60.0625rem) and (max-width: 80rem) {
  .hero-mark {
    width: min(38rem, 62%);
    top: 34%;
    right: -10rem;
  }
}

@media (max-width: 60rem) {
  .cols > .side,
  .cols > .main {
    grid-column: 1 / -1;
  }

  .hero-mark {
    --o: 0.5;
    right: -22rem;
  }

  /* The translucent mark can pass behind the language links here. */
  .on-dark .lang a {
    color: var(--color-on-night);
  }

  .kw-group h3 {
    padding-top: 0;
  }

  .close .side p {
    max-width: 40ch;
  }
}

@media (max-width: 40rem) {
  .hero {
    padding-bottom: var(--space-xl);
  }

  /* Raised behind the header and capped by the screen height, so it clears the
     role line even on short phones and can stay fairly solid: measured 360×640
     to 640×900, the role keeps ≥5.3:1 and the name (large text) ≥3:1. */
  .hero-mark {
    --t: translate(0, 0);
    --o: 0.7;
    top: calc(-2 * var(--space-lg));
    right: -25%;
    width: min(100%, 45svh);
  }

  /* Sized so "González Seoane" stays on one line, keeping the two-line poster name. */
  .hero h1 {
    font-size: min(10.2vw, 3.5rem);
  }

  .portrait {
    width: 8rem;
    height: 8rem;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    justify-content: center;
  }

  .site-footer .wrap > * {
    flex-basis: 100%;
  }
  .site-footer .wrap > :last-child {
    padding-top: 0;
    border-top: 0;
    text-align: left;
  }
}

@media (forced-colors: active) {
  .btn {
    border-color: ButtonText;
  }
  .lang a[aria-current="page"] {
    outline: 2px solid CanvasText;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero-mark,
  .kw-dialog[open] {
    animation: none;
  }
  .btn,
  .lang a,
  .kw,
  .kw-close,
  .site-footer a,
  .contact-mail {
    transition: none;
  }
}
