@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/fonts/archivo-var-latin.woff2") format("woff2");
}

:root {
  --blue: #2236d9;
  --blue-deep: #1a2bb3;
  --on-blue: #f4f4ef;
  --on-blue-soft: #c8cdfb;
  --paper: #f6f6f2;
  --ink: #121318;
  --ink-soft: #4a4c57;
  --rule: #d9d9d2;
  --link: #2236d9;
  --gap: clamp(1.25rem, 3vw, 3rem);
  --pad: clamp(1rem, 4vw, 3rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue: #2a3fe6;
    --blue-deep: #1b2aa8;
    --paper: #0f1015;
    --ink: #ededE6;
    --ink-soft: #a3a5b2;
    --rule: #262833;
    --link: #9aa6ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --blue: #2a3fe6;
  --blue-deep: #1b2aa8;
  --paper: #0f1015;
  --ink: #ededE6;
  --ink-soft: #a3a5b2;
  --rule: #262833;
  --link: #9aa6ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--blue); color: var(--on-blue); }
.hero ::selection, .close ::selection { background: var(--on-blue); color: var(--blue); }

a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, p { margin: 0; }

.skip {
  position: absolute; left: 50%; top: .75rem; translate: -50% -200%;
  background: var(--on-blue); color: var(--blue); padding: .5rem .9rem; z-index: 10;
  font-weight: 600; text-decoration: none; transition: translate .3s var(--ease);
}
.skip:focus { translate: -50% 0; }

/* ---------- Axis ---------- */
.axis {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: currentColor; opacity: .35; pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: auto;
  background: var(--blue);
  color: var(--on-blue);
  display: grid;
  grid-template-rows: 1fr;
  padding: var(--pad);
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;
}
.mirror { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.domain {
  display: grid; grid-template-columns: 1fr var(--gap) 1fr;
  font-weight: 600; font-stretch: 112%; letter-spacing: -.01em; font-size: 1rem;
}
.domain .l { text-align: right; grid-column: 1; }
.domain .r { grid-column: 3; }

.hero-body {
  align-self: center;
  display: grid; justify-items: center; text-align: center;
  padding-block: clamp(.5rem, 2vw, 1.5rem);
}

.portrait {
  display: block; position: relative; z-index: 1;
  --size: clamp(10rem, 24vw, 15rem);
  width: var(--size); height: var(--size); max-width: none;
  object-fit: cover; object-position: 50% 40%;
  border-radius: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--on-blue) 55%, transparent);
  background: var(--blue-deep);
  margin-bottom: clamp(1.25rem, 3vh, 2rem);
}

.name {
  font-weight: 850; font-stretch: 125%;
  font-size: clamp(3.5rem, 12.5vw, 6rem);
  line-height: .9; letter-spacing: -.04em;
}
.role {
  margin-top: .9rem;
  font-weight: 560; font-stretch: 112%;
  font-size: clamp(1.05rem, 1rem + .6vw, 1.4rem);
}
.role a { text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.role a:hover { text-decoration-color: currentColor; }
.bio {
  margin-top: .9rem; max-width: 40ch;
  color: var(--on-blue-soft); text-wrap: balance;
}

.actions {
  margin-top: clamp(1.75rem, 4vh, 2.5rem);
  width: 100%;
  display: grid; grid-template-columns: 1fr var(--gap) 1fr; align-items: center;
}
.actions .l { grid-column: 1; justify-self: end; }
.actions .r { grid-column: 3; justify-self: start; }
.actions .pill { width: min(13.5em, 100%); white-space: nowrap; justify-content: center; }

.pill {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.15rem; border-radius: 999px;
  border: 1px solid var(--on-blue);
  font-weight: 600; text-decoration: none; line-height: 1;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
.pill svg { width: 1.05em; height: 1.05em; fill: currentColor; flex: none; }
.pill:hover { background: var(--on-blue); color: var(--blue); }
.pill.l { background: var(--on-blue); color: var(--blue); }
.pill.l:hover { background: transparent; color: var(--on-blue); }

.hint {
  justify-self: center; font-size: .8rem; letter-spacing: .02em;
  color: var(--on-blue-soft);
}
@media (hover: none) { .hint { display: none; } }

/* ---------- Axial blocks ---------- */
main { position: relative; }
main::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: var(--rule);
}

.block {
  position: relative;
  max-width: 76rem; margin-inline: auto;
  padding: clamp(2.25rem, 5vw, 3.5rem) var(--pad) 0;
}
.block:last-child { padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.label {
  width: calc(50% - var(--gap) / 2);
  text-align: right;
  font-weight: 800; font-stretch: 125%;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem);
  line-height: .95; letter-spacing: -.035em;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 1fr var(--gap) 1fr;
  padding-block: 1.1rem;
  border-top: 1px solid var(--rule);
}
.row:last-child { border-bottom: 1px solid var(--rule); }
.row-l { grid-column: 1; text-align: right; }
.row-r { grid-column: 3; max-width: 36rem; }

.row h3 {
  font-weight: 750; font-stretch: 115%;
  font-size: clamp(1.2rem, 1rem + .9vw, 1.65rem);
  line-height: 1.1; letter-spacing: -.02em;
}
.row h3 a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease); }
.row h3 a:hover, .row h3 a:focus-visible { background-size: 100% 1px; }
.row h3 a::after {
  content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .3em;
  vertical-align: .35em;
  border-top: 2px solid var(--link); border-right: 2px solid var(--link);
}
.code {
  margin-top: .35rem;
  font-size: .8rem; font-stretch: 100%; font-weight: 500; letter-spacing: .01em;
  color: var(--ink-soft);
}
.row-r p { color: var(--ink); max-width: 46ch; }
.links { margin-top: .75rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.links a { color: var(--link); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.links a:hover { text-decoration: underline; }
.arr { width: .7em; height: .7em; fill: none; stroke: currentColor; stroke-width: 1.6; }

.dense .row { padding-block: .85rem; }

.elsewhere .row { align-items: baseline; padding-block: .8rem; }
.elsewhere .row-l { font-weight: 600; font-stretch: 112%; color: var(--ink-soft); }
.elsewhere .row-r { color: var(--link); font-weight: 650; font-stretch: 108%; font-size: 1.15em; text-decoration: none; justify-self: start; }
.elsewhere .row-r:hover { text-decoration: underline; }

/* ---------- Close ---------- */
.close {
  position: relative; overflow: hidden;
  background: var(--blue); color: var(--on-blue);
  padding: clamp(4rem, 12vw, 9rem) var(--pad) 2rem;
  display: grid; justify-items: center; text-align: center;
}
.close-big {
  font-weight: 850; font-stretch: 125%;
  font-size: clamp(2.75rem, 10vw, 6rem); line-height: .9; letter-spacing: -.04em;
  background: var(--blue); padding-inline: .15em;
}
.close-sub { margin-top: 1rem; color: var(--on-blue-soft); }
.close .actions { margin-top: 2rem; }
.fine { margin-top: clamp(3rem, 8vw, 5rem); font-size: .8rem; color: var(--on-blue-soft); }

/* ---------- Narrow: axis moves to the left edge ---------- */
@media (max-width: 44rem) {
  main::before { left: var(--pad); }
  .row { grid-template-columns: 1fr; }
  .label { width: auto; text-align: left; padding-left: 1rem; }
  .row { padding-left: 1rem; }
  .row-l, .row-r { grid-column: 1; text-align: left; }
  .row-r { margin-top: .45rem; }
  .elsewhere .row-r { margin-top: .1rem; }
  .row h3 { font-stretch: 108%; }
}

@media (max-width: 26rem) {
  .actions { grid-template-columns: 1fr .75rem 1fr; }
  .pill { padding: .7rem .9rem; font-size: .95rem; }
}

/* ---------- Entrance: content visible by default ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-body > * { animation: rise .9s var(--ease) both; }
  .js .hero-body > :nth-child(2) { animation-delay: .06s; }
  .js .hero-body > :nth-child(3) { animation-delay: .12s; }
  .js .hero-body > :nth-child(4) { animation-delay: .18s; }
  .js .hero-body > :nth-child(5) { animation-delay: .24s; }
  @keyframes rise { from { opacity: .001; translate: 0 .6rem; filter: blur(4px); } }
}

/* The axis passes behind text lines, never through them */
.name, .role, .bio, .hint, .close-sub, .fine {
  background: var(--blue);
  padding-inline: .35em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
