/* Dark-only surface: near-black canvas, hairline borders, DM Sans for display
   type, JetBrains Mono for labels. Colours live in the tokens only. */

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #09090b;
  --fg: #fafafa;
  --muted: #a1a1aa;
  --dim: #71717a;
  --line: #ffffff14;
  --line2: #ffffff24;
  --accent: oklch(0.72 0.16 150);

  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  /* Header and footer stay put; only <main> scrolls. */
  height: 100vh;
  height: 100dvh; /* mobile browser bars count towards the height */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-feature-settings: "ss01", "ss02";
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Film grain over everything — the flat near-black reads dead without it. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

h1,
h2,
p,
ul,
li {
  margin: 0;
}

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

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

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

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

/* --- Primitives ---------------------------------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.display {
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 24px;
  border: 0;
  border-radius: 11px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.18s, background 0.18s, border-color 0.18s,
    color 0.18s;
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}

.btn-primary:hover {
  background: #fff;
  transform: translateY(-1px);
}

.btn svg,
.nav-pill svg {
  flex: none;
}

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

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

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--gutter);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* The one green thing in the header: someone is actually behind this address. */
.nav-brand .dot {
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-brand .dot {
    animation: none;
  }
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff05;
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color 0.18s, border-color 0.18s;
}

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

main {
  flex: 1;
  overflow-y: auto;
}

/* Only the home page centres its single block in the remaining height.
   "safe" keeps the top from being cut off when the viewport is too short. */
.stage {
  display: flex;
  align-items: safe center;
}

.hero {
  display: grid;
  /* Wide enough to keep the discipline lines from wrapping. */
  grid-template-columns: 1fr 460px;
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 76px var(--gutter) 72px;
}

.intro h1 {
  margin: 16px 0 0;
  font-size: clamp(34px, 5vw, 58px);
}

.intro .lead {
  max-width: 42ch;
  margin: 20px 0 30px;
  color: var(--muted);
  font-size: 18px;
}

/* --- The card ------------------------------------------------------------ */

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(#ffffff08, #ffffff00);
  overflow: hidden;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid var(--line);
}

.portrait {
  flex: none;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: none;
  overflow: hidden;
  cursor: zoom-in;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-top .name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card-top .role {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.disciplines {
  padding: 0;
  list-style: none;
}

.disciplines li {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.disciplines li:last-child {
  border-bottom: 0;
}

.disciplines .code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.disciplines .what {
  display: block;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.disciplines .detail {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.4;
}

.dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

/* --- Footer -------------------------------------------------------------- */

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

.prose a,
.foot-inner a {
  text-decoration: underline;
  text-decoration-color: var(--line2);
  text-underline-offset: 3px;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px var(--gutter) 32px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.foot-inner a:hover {
  color: var(--fg);
  text-decoration-color: var(--fg);
}

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

/* --- Portrait viewer ----------------------------------------------------- */

.viewer {
  max-width: min(420px, 88vw);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0c0c0e;
  color: var(--fg);
  overflow: hidden;
}

.viewer::backdrop {
  background: #09090bcc;
  backdrop-filter: blur(4px);
}

.viewer img {
  width: 100%;
  height: auto;
}

.viewer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

/* Form controls do not inherit text-transform, so the button would drop out of
   the uppercase row. */
.viewer-bar button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-transform: inherit;
  color: var(--accent);
  cursor: pointer;
}

/* --- Legal pages --------------------------------------------------------- */

.page-head,
.prose {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.page-head {
  padding-top: 60px;
  padding-bottom: 36px;
}

.page-head h1 {
  margin-top: 16px;
  font-size: clamp(34px, 5vw, 58px);
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-bottom: 80px;
}

.prose section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 68ch;
}

.prose h2 {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
}

.prose a {
  color: var(--fg);
}

.prose a:hover {
  text-decoration-color: var(--fg);
}

.prose ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 18px;
}

.prose .note {
  color: var(--dim);
  font-size: 14px;
}

/* --- Narrow screens ------------------------------------------------------ */

@media (width <= 760px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 44px;
    padding-bottom: 48px;
  }
}

@media (width <= 520px) {
  .intro .cta .btn {
    width: 100%;
  }
}
