/* ================================================================
   EarthFlow — shared site shell
   Design tokens, top nav, footer, and typography used by every page.
   Geometry follows EarthFlow.fig (1280 grid); 1rem = 10 design-px
   @1280, so the page scales uniformly the way a Figma zoom does.
   ================================================================ */

/* ---------------- GT Alpina (licensed, self-hosted) ---------------- */
@font-face {
  font-family: "GT Alpina Fine";
  src: url("fonts/GT-Alpina-Fine-Standard-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "GT Alpina Fine";
  src: url("fonts/GT-Alpina-Fine-Standard-Regular-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "GT Alpina";
  src: url("fonts/GT-Alpina-Standard-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --bg: #f9f7e6;            /* A1 frame fill */
  --ink: #161514;           /* text / txt-primary */
  --muted: #8da4a8;         /* section label circle */
  --line: rgba(22, 21, 20, 0.28);
  --hairline: rgba(22, 21, 20, 0.14);
  --serif: "GT Alpina Fine", "GT Alpina", Georgia, "Times New Roman", serif;
  --sans: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { font-size: 10px; }
@media (min-width: 900px)  { html { font-size: calc(100vw / 128); } }
@media (min-width: 1920px) { html { font-size: 15px; } }

body {
  background: var(--bg); color: var(--ink);
  font-family: var(--serif); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
footer { flex-shrink: 0; }
a { color: inherit; }

/* Keyboard focus ring — visible without affecting mouse users. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(22, 21, 20, 0.55);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link for keyboard and screen-reader users. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  font: 1.4rem var(--sans); padding: 1rem 1.6rem;
  background: var(--ink); color: var(--bg); text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------------- Top nav (fig: TopNav 1280x96) ---------------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  background: linear-gradient(to bottom, #faf8e7 40%, rgba(250, 248, 231, 0));
}
.nav-inner {
  max-width: 192rem; margin: 0 auto; height: 9.6rem;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4rem;
}
.logo { display: flex; align-items: center; gap: 1rem; text-decoration: none; white-space: nowrap; }
.logo svg { width: 2.6rem; height: 2.6rem; display: block; }
.logo span { font-family: var(--sans); font-weight: 700; font-size: 2.2rem; letter-spacing: -0.01em; }
nav { display: flex; gap: 0.8rem; }
nav a {
  font-family: var(--sans); font-weight: 500; font-size: 2.1rem;
  text-decoration: none; padding: 0 2rem; min-width: 8.8rem; height: 4.8rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; transition: background 0.25s ease;
}
nav a:hover { background: rgba(22, 21, 20, 0.07); }
/* Current page gets a persistent tint instead of a hover-only one. */
nav a[aria-current="page"] { background: rgba(22, 21, 20, 0.09); }

/* ---------------- Footer (fig v2: 1280x88, papaya) ---------------- */
/* Editorial footer: small-print copyright and contact. */
footer { padding-top: 12rem; }
footer .foot-row {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  min-height: 3.4rem; padding: 0 4rem 2rem;
  font-family: var(--sans); font-size: 1.2rem; letter-spacing: 0.06em;
  color: rgba(22, 21, 20, 0.55);
}
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ================================================================
   Interior pages (Career / Paper / Contact)
   Single measured column, generous leading, editorial rhythm.
   ================================================================ */
.sheet {
  max-width: 96rem; margin: 0 auto;
  padding: 16rem 4rem 6rem;
}
.eyebrow {
  font-family: var(--sans); font-size: 1.2rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(22, 21, 20, 0.5);
  margin-bottom: 2.4rem;
}
.page-title {
  font-family: var(--serif); font-weight: 400;
  font-size: 6.4rem; line-height: 1.08; letter-spacing: -0.01em;
  margin-bottom: 2.4rem;
}
.lede {
  font-family: var(--serif); font-size: 2.4rem; line-height: 1.45;
  max-width: 62rem; color: rgba(22, 21, 20, 0.78);
}
.rule { height: 1px; background: var(--hairline); border: 0; margin: 6rem 0; }

/* Inline text link with a restrained underline. */
.link {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.1em;
  transition: border-color 0.2s ease;
}
.link:hover { border-color: var(--ink); }

/* ---------------- Publication list ---------------- */
.pub-list { list-style: none; padding: 0; }
.pub {
  display: block; text-decoration: none;
  padding: 3.2rem 0;
  border-top: 1px solid var(--hairline);
  transition: opacity 0.2s ease;
}
.pub:last-child { border-bottom: 1px solid var(--hairline); }
/* A .rule already sits above the list, so the first entry drops its own
   top border to avoid a double line. The closing border stays. */
.pub-list li:first-child .pub { border-top: 0; padding-top: 0; }
.pub:hover { opacity: 0.62; }
/* An entry with no link yet: same typography, but no interactive cues. */
.pub-static { cursor: default; }
.pub-static:hover { opacity: 1; }
.pub-meta {
  font-family: var(--sans); font-size: 1.2rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(22, 21, 20, 0.5);
  display: flex; flex-wrap: wrap; gap: 1.6rem;
  margin-bottom: 1.2rem;
}
.pub-title {
  font-family: var(--serif); font-weight: 400;
  font-size: 3rem; line-height: 1.24; letter-spacing: -0.005em;
  margin-bottom: 1rem;
}
.pub-authors {
  font-family: var(--sans); font-size: 1.5rem; line-height: 1.55;
  color: rgba(22, 21, 20, 0.62);
}
.pub-authors em { font-style: normal; color: var(--ink); }

/* ---------------- Role cards (Career) ---------------- */
.roles { display: flex; flex-direction: column; gap: 0; }
.role {
  padding: 4rem 0;
  border-top: 1px solid var(--hairline);
}
.role:last-of-type { border-bottom: 1px solid var(--hairline); }
.role-kicker {
  font-family: var(--sans); font-size: 1.2rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(22, 21, 20, 0.5);
  margin-bottom: 1.4rem;
}
.role-title {
  font-family: var(--serif); font-weight: 400;
  font-size: 3.6rem; line-height: 1.2; margin-bottom: 1.6rem;
}
.role-body {
  font-family: var(--serif); font-size: 1.9rem; line-height: 1.55;
  max-width: 58rem; color: rgba(22, 21, 20, 0.78);
  margin-bottom: 2.4rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.8rem; list-style: none; padding: 0; }
.tag {
  font-family: var(--sans); font-size: 1.3rem;
  padding: 0.7rem 1.4rem; border-radius: 999px;
  border: 1px solid var(--hairline);
  color: rgba(22, 21, 20, 0.72);
}

/* ---------------- Mobile ---------------- */
@media (max-width: 899.98px) {
  .nav-inner { padding: 0 2rem; }
  .logo span { font-size: 1.8rem; }
  nav { gap: 0.2rem; }
  nav a { font-size: 1.6rem; min-width: 0; padding: 0 1.2rem; height: 4.4rem; }
  footer .foot-row {
    flex-direction: column; align-items: flex-start; gap: 0.8rem;
    padding: 0 2rem 2.4rem;
  }
  .sheet { padding: 13rem 2rem 4rem; }
  .page-title { font-size: clamp(32px, 9vw, 46px); }
  .lede { font-size: clamp(17px, 4.4vw, 20px); }
  .pub-title { font-size: clamp(20px, 5.4vw, 26px); }
  .role-title { font-size: clamp(22px, 6vw, 30px); }
  .role-body { font-size: clamp(16px, 4.2vw, 18px); }
  .rule { margin: 4rem 0; }
}

/* Respect the OS "reduce motion" preference: drop transitions for
   users who get motion sickness from animated interfaces. */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
