/*
 * careers.vestra.lol
 * Same family as vestracorp.com: black, hairlines, one cobalt signal, the horizon.
 * Display: Inter Display Bold (Latin subset). Text: Inter variable. Data: system mono.
 * Both fonts are SIL OFL 1.1; licences in ../fonts/OFL.txt and ../fonts/OFL-Inter.txt.
 */

@font-face {
  font-family: "Vestra Display";
  src: url("../fonts/InterDisplay-Bold-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Vestra Text";
  src: url("../fonts/Inter-latin-var.woff2") format("woff2-variations"),
       url("../fonts/Inter-latin-var.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #000;
  --bg-2: #07080a;
  --surface: #0d0f13;
  --surface-2: #14171c;
  --ink: #f2f4f7;
  --ink-2: #b9c0ca;
  --muted: #8c95a2;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.17);
  --accent: #2563eb;          /* fills: white text on it is 5.2:1 */
  --accent-hover: #1d4ed8;
  --signal: #8ab4ff;          /* accent as text on black: 10:1 */
  --glow: 96, 150, 255;

  --font-display: "Vestra Display", "Inter Display", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-text: "Vestra Text", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --max: 1360px;
  --gutter: clamp(1rem, 0.4rem + 3vw, 3rem);
  --col-gap: clamp(1rem, 0.5rem + 2vw, 2.5rem);
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));

  --space-s: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
  --space-m: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --space-l: clamp(2.5rem, 2rem + 2vw, 4rem);
  --space-xl: clamp(4.5rem, 3rem + 5vw, 8.5rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 64px;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ico {
  width: 1rem;
  height: 1rem;
  flex: none;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #000;
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------------------------------------------------------------- Nav */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
}

.nav.is-scrolled {
  background: rgba(0, 0, 0, 0.62);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 28px;
  height: auto;
}

.nav-links {
  display: none;
  gap: 2rem;
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.nav-links a {
  position: relative;
  padding-block: 0.4rem;
  transition: color 0.25s var(--ease-out);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-left: auto;
  padding: 0 1.1rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

@media (min-width: 720px) {
  .nav-links { display: flex; }
  .nav-cta { margin-left: 0.5rem; }
}

@media (hover: hover) {
  .nav-links a:hover { color: var(--ink); }
  .nav-cta:hover { background: var(--ink); border-color: var(--ink); color: #000; }
}

/* ---------------------------------------------------------- Shared type */

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.3rem + 3.8vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.042em;
  text-wrap: balance;
}

.section {
  position: relative;
  padding-block: var(--space-xl);
}

.section-head {
  display: grid;
  gap: 1.1rem;
  margin-bottom: var(--space-l);
}

.section-note {
  max-width: 34rem;
  color: var(--ink-2);
  text-wrap: pretty;
}

@media (min-width: 960px) {
  .section-head {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: end;
  }
  .section-head .h2 { grid-column: 1 / span 7; }
  .section-head .section-note { grid-column: 9 / span 4; padding-bottom: 0.4rem; }
  .section-head-wide .h2 { grid-column: 1 / span 8; }
}

/* Word mask used by the hero headline (CSS) and section titles (GSAP). */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.04em 0.14em 0;
  margin-bottom: -0.14em;
}

.w > span {
  display: inline-block;
}

/* Links */
.link-inline {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}

.link-arrow,
.link-quiet {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 500;
}

.link-arrow .ico,
.link-quiet .ico {
  transition: transform 0.35s var(--ease-out);
}

.link-quiet {
  min-height: 44px;
  color: var(--ink-2);
  transition: color 0.25s var(--ease-out);
}

@media (hover: hover) {
  .link-inline:hover { text-decoration-color: var(--signal); }
  .link-arrow:hover .ico { transform: translateX(4px); }
  .link-quiet:hover { color: var(--ink); }
  .link-quiet:hover .ico { transform: translate(2px, -2px); }
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.btn .ico {
  transition: transform 0.35s var(--ease-out);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--line-2);
  color: var(--ink);
}

.btn:active {
  filter: brightness(0.92);
}

@media (hover: hover) {
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-primary:hover .ico { transform: translateX(3px); }
  .btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #000; }
  .btn-ghost:hover .ico { transform: translate(2px, -2px); }
}

/* ---------------------------------------------------------------- Hero */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3rem, 1rem + 9vh, 9rem));
  overflow: clip;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-title {
  max-width: 11.5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.1rem + 6vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.048em;
  text-wrap: balance;
}

.hero-lede {
  max-width: 35rem;
  margin-top: clamp(1.25rem, 1rem + 1vw, 2rem);
  font-size: clamp(1.06rem, 0.98rem + 0.35vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: clamp(1.75rem, 1.4rem + 1.4vw, 2.75rem);
}

.horizon {
  position: relative;
  z-index: 1;
  height: 300px;
  margin-top: 1rem;
  pointer-events: none;
}

@media (min-width: 768px) {
  .horizon {
    height: auto;
    aspect-ratio: 1672 / 611;
    margin-top: -4vw;
  }
}

.horizon-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 0;
  transform-origin: 50% 19%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 58%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 58%, transparent 100%);
}

/* Positioned wrapper sits on the arc's apex; GSAP only touches the core inside it. */
.horizon-flare {
  position: absolute;
  left: 50%;
  top: 19%;
  width: min(64vw, 920px);
  aspect-ratio: 3 / 1;
  transform: translate(-50%, -50%);
}

.horizon-flare::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.6), rgba(var(--glow), 0.28) 45%, rgba(var(--glow), 0) 100%);
  mix-blend-mode: screen;
  opacity: var(--flare, 0.3);
  transform: scale(var(--flare-scale, 1));
}

/* Load-in: pure CSS, so nothing waits on JavaScript. */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .w > span {
    animation: word-up 1.15s var(--ease-expo) both;
    animation-delay: calc(0.1s + var(--i, 0) * 0.055s);
  }
  .rise {
    animation: rise 0.95s var(--ease-expo) both;
    animation-delay: var(--d, 0s);
  }
  .horizon {
    animation: dawn 2.2s var(--ease-expo) 0.2s both;
  }
}

@keyframes word-up {
  from { transform: translateY(108%); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

@keyframes dawn {
  from { opacity: 0; transform: translateY(9%); }
}

/* --------------------------------------------------- Careers: brand */

.brand small {
  margin-left: 0.15rem;
  font-family: var(--font-text);
  font-size: 0.9rem;
  font-weight: 450;
  letter-spacing: 0;
  color: var(--muted);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
}

/* ---------------------------------------------------- Careers: hero */

.hero-careers .hero-title {
  max-width: 9.5em;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 3rem;
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.hero-facts div {
  display: grid;
  gap: 0.2rem;
}

.hero-facts b {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.hero-facts span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The careers horizon sits lower and dimmer than the hub's. */
.hero-careers .horizon {
  opacity: 0.9;
}

/* Publications: a shorter hero. */
.hero-short .hero-title {
  max-width: 10em;
}

/* ------------------------------------------------- Careers: company */

.company {
  position: relative;
  z-index: 2;
  margin-top: clamp(-12rem, -9vw, -1rem);
  padding-top: 0;
}

.index {
  border-top: 1px solid var(--line);
}

.index > li {
  border-bottom: 1px solid var(--line);
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  grid-template-areas:
    "num name kind"
    ".   desc desc";
  column-gap: 0.75rem;
  row-gap: 0.4rem;
  align-items: baseline;
  padding-block: 1.3rem;
}

a.row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease-expo);
}

.row-num {
  grid-area: num;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  transition: color 0.3s var(--ease-out);
}

.row-name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  transition: transform 0.5s var(--ease-expo);
}

.row-kind {
  grid-area: kind;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.row-desc {
  grid-area: desc;
  max-width: 46ch;
  font-size: 0.98rem;
  color: var(--ink-2);
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .row {
    grid-template-columns: 3rem minmax(0, 4.5fr) minmax(0, 5fr) minmax(8rem, 2fr);
    grid-template-areas: "num name desc kind";
    column-gap: var(--col-gap);
    padding-block: 1.7rem;
  }
  .row-kind { text-align: right; }
}

@media (hover: hover) {
  a.row:hover::after { transform: scaleX(1); transform-origin: left; }
  a.row:hover .row-num { color: var(--signal); }
  a.row:hover .row-name { transform: translateX(0.4rem); }
}

a.row:focus-visible {
  outline-offset: 6px;
}

.tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: 0.45em;
  color: var(--ink-2);
  white-space: nowrap;
}

/* --------------------------------------------------- Careers: roles */

.roles-section {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.roles-bar {
  display: grid;
  gap: 1rem;
  padding-bottom: 1.25rem;
}

.roles-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.roles-count b {
  color: var(--ink);
  font-weight: 600;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter {
  min-height: 36px;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-2);
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #000;
}

@media (hover: hover) {
  .filter:not(.is-active):hover { border-color: var(--line-2); color: var(--ink); }
}

@media (min-width: 900px) {
  .roles-bar {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .filters { justify-content: flex-end; }
}

.roles-list {
  border-top: 1px solid var(--line);
}

.role {
  border-bottom: 1px solid var(--line);
}

.role[hidden] {
  display: none;
}

.role-trigger {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.5rem;
  grid-template-areas:
    "title toggle"
    "tags  tags";
  gap: 0.75rem 1rem;
  align-items: center;
  width: 100%;
  padding-block: 1.4rem;
  text-align: left;
}

.role-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease-expo);
}

.role-trigger:focus-visible {
  outline-offset: 4px;
}

.role-trigger > span:first-child {
  grid-area: title;
  display: grid;
  gap: 0.25rem;
}

.role-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  transition: transform 0.5s var(--ease-expo);
}

.role-dept {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.role-tags {
  grid-area: tags;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.role-tags .tag {
  margin: 0;
  vertical-align: 0;
}

.role-tags .tag-place.is-virtual {
  color: var(--signal);
  border-color: rgba(var(--glow), 0.35);
}

.role-toggle {
  grid-area: toggle;
  position: relative;
  justify-self: end;
  width: 1.1rem;
  height: 1.1rem;
}

.role-toggle::before,
.role-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink-2);
  transition: transform 0.45s var(--ease-expo), background-color 0.3s var(--ease-out);
}

.role-toggle::after {
  transform: rotate(90deg);
}

.role.is-open .role-toggle::after {
  transform: rotate(0deg);
}

.role.is-open .role-toggle::before,
.role.is-open .role-toggle::after {
  background: var(--signal);
}

@media (hover: hover) {
  .role-trigger:hover::after { transform: scaleX(1); transform-origin: left; }
  .role-trigger:hover .role-title { transform: translateX(0.35rem); }
}

@media (min-width: 760px) {
  .role-trigger {
    grid-template-columns: minmax(0, 1fr) auto 1.5rem;
    grid-template-areas: "title tags toggle";
  }
}

.role h3 {
  font: inherit;
}

.role-body {
  overflow: hidden;
}

.role-body-inner {
  display: grid;
  gap: 1.5rem;
  padding: 0.25rem 0 2rem;
}

.role-body-kicker {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
}

.role-copy p {
  max-width: 54ch;
  color: var(--ink-2);
}

.role-side {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.role-facts {
  display: grid;
  border-top: 1px solid var(--line);
}

.role-facts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.role-facts span {
  color: var(--muted);
}

.role-facts b {
  font-weight: 500;
  text-align: right;
}

.role-apply {
  justify-self: start;
}

@media (min-width: 900px) {
  .role-body-inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    column-gap: var(--space-l);
  }
}

.roles-empty,
.roles-note {
  margin-top: var(--space-m);
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ------------------------------------------------- Careers: process */

.steps {
  display: grid;
  gap: var(--space-m);
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding-top: 1.25rem;
}

.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-2);
  transform: scaleX(var(--draw, 1));
  transform-origin: left;
}

.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.step p {
  color: var(--ink-2);
  text-wrap: pretty;
}

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); }
}

@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------------------------------------------------- Careers: life */

.rules {
  display: grid;
  gap: var(--space-l);
}

.rule {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  max-width: 34rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.rule h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.rule p {
  color: var(--ink-2);
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .rules {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }
  .rule:nth-child(2) { transform: translateY(clamp(1.5rem, 4vw, 4rem)); }
  .rules { padding-bottom: clamp(1.5rem, 4vw, 4rem); }
}

.quote {
  display: grid;
  gap: 1.75rem;
  max-width: 58rem;
  margin-top: var(--space-xl);
  padding-top: var(--space-l);
  border-top: 1px solid var(--line);
}

.quote blockquote {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.quote blockquote::before {
  content: "\201C";
  color: var(--signal);
}

.quote blockquote::after {
  content: "\201D";
  color: var(--signal);
}

.quote figcaption {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.quote-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}

.quote figcaption span:last-child {
  display: grid;
  line-height: 1.35;
}

.quote figcaption em {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ------------------------------------------------- Careers: closing */

.closing {
  padding-top: 0;
}

.closing-panel {
  position: relative;
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  padding: clamp(1.75rem, 1rem + 4vw, 5rem);
  border: 1px solid var(--line-2);
  border-radius: clamp(16px, 2vw, 28px);
  background: var(--bg-2);
  overflow: hidden;
}

.closing-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--glow), 0), rgba(190, 215, 255, 0.85) 50%, rgba(var(--glow), 0));
}

.closing-panel::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 70%;
  height: 160px;
  transform: translate(-50%, -60%);
  background: radial-gradient(closest-side, rgba(var(--glow), 0.18), rgba(var(--glow), 0));
  pointer-events: none;
}

.closing-title {
  max-width: 12em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.5rem + 4.4vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.closing-panel > p:not(.overline) {
  max-width: 34rem;
  color: var(--ink-2);
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: 0.5rem;
}

/* ---------------------------------------------- Publications: shelf */

.shelf {
  position: relative;
  z-index: 2;
  margin-top: clamp(-12rem, -9vw, -1rem);
  padding-top: 0;
}

.publication {
  display: grid;
  gap: 1.5rem;
  padding-block: clamp(1.75rem, 1.2rem + 2vw, 3rem);
  border-block: 1px solid var(--line);
}

.publication-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--signal);
}

.publication-main {
  display: grid;
  gap: 0.6rem;
}

.publication h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.publication-description {
  max-width: 46ch;
  color: var(--ink-2);
}

.publication-meta {
  display: grid;
  align-content: start;
  border-top: 1px solid var(--line);
}

.publication-meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.publication-meta dt {
  color: var(--muted);
}

.publication-download {
  justify-self: start;
  align-self: start;
}

@media (min-width: 1000px) {
  .publication {
    grid-template-columns: 3rem minmax(0, 6fr) minmax(0, 3fr) auto;
    column-gap: var(--col-gap);
    align-items: start;
  }
}

.library-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
  margin-top: var(--space-m);
  color: var(--muted);
}

/* Inline links: an underline visible enough to tell links from text without colour. */
.link-inline {
  text-decoration-color: rgba(255, 255, 255, 0.42);
}

.nav-cta {
  white-space: nowrap;
}

@media (max-width: 400px) {
  .brand small { display: none; }
}
/* -------------------------------------------------------------- Footer */

.footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(4rem, 3rem + 6vw, 9rem);
}

/* The horizon again, setting this time: a vast circle whose top edge catches the light. */
.footer-horizon {
  position: absolute;
  top: clamp(2rem, 1rem + 4vw, 5rem);
  left: 50%;
  width: 240vw;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border-top: 1.5px solid rgba(175, 205, 255, 0.95);
  box-shadow:
    inset 0 10px 22px -12px rgba(var(--glow), 0.9),
    inset 0 40px 90px -40px rgba(var(--glow), 0.4);
  -webkit-mask-image: linear-gradient(90deg, transparent 26%, #000 42%, #000 58%, transparent 74%);
  mask-image: linear-gradient(90deg, transparent 26%, #000 42%, #000 58%, transparent 74%);
  opacity: var(--set, 0.8);
  pointer-events: none;
}

.footer .wrap {
  position: relative;
}

.footer-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 1rem + 22vw, 22rem);
  line-height: 0.82;
  letter-spacing: -0.065em;
  color: #1a1e25;
  user-select: none;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: clamp(1.5rem, 1rem + 2vw, 3rem);
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.footer-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  transition: color 0.25s var(--ease-out);
}

@media (hover: hover) {
  .footer-bar a:hover { color: var(--ink); }
}

/* ------------------------------------------------------ Reduced motion */

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