@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans-Latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Medium-Latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Fallbacks tuned to the web fonts' metrics so the swap causes no layout shift. */
@font-face {
  font-family: "Plus Jakarta Sans Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 109.3%;
  ascent-override: 95%;
  descent-override: 20.3%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "JetBrains Mono Fallback";
  src: local("Menlo"), local("Consolas"), local("Courier New");
  size-adjust: 99.7%;
  ascent-override: 102.3%;
  descent-override: 30.1%;
  line-gap-override: 0%;
}

:root {
  --bg: #0a0e14;
  --surface: #0f151d;
  --border: #1e2a36;
  --text: #e6edf3;
  --muted: #9aa7b5;
  --accent: #22d3ee;
  --accent-ink: #04212a;
  --font-sans: "Plus Jakarta Sans", "Plus Jakarta Sans Fallback", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, monospace;
  --gutter: 1.25rem;
  --radius: 10px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.875rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: 6px;
  transform: translateY(-200%);
}

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

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark-mark {
  flex: none;
}

.site-nav ul {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.nav-optional {
  display: none;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-motif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to bottom left, #000 0%, transparent 70%);
  mask-image: linear-gradient(to bottom left, #000 0%, transparent 70%);
}

.motif-links {
  opacity: 0.14;
}

.motif-nodes {
  opacity: 0.32;
}

.motif-pulse {
  opacity: 0.85;
  stroke-dasharray: 4 96;
  stroke-dashoffset: 100;
  animation: pulse-travel 9s linear infinite;
}

@keyframes pulse-travel {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .motif-pulse {
    display: none;
    animation: none;
  }
}

.hero-inner {
  position: relative;
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
}

.hero-name {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-tagline {
  display: block;
  max-width: 14ch;
  font-size: clamp(2.5rem, 9vw, 4.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero-sub {
  max-width: 38rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.375rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  background: #67e8f9;
}

.button-secondary {
  border-color: var(--border);
  background: rgba(10, 14, 20, 0.6);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
}

/* Sections */

.section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-index {
  color: var(--accent);
}

.section-title {
  max-width: 34rem;
  margin-top: 1rem;
  font-size: clamp(1.625rem, 5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

.card-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-title {
  margin: 0.75rem 0 0.5rem;
  color: var(--text);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.card-pending {
  border-style: dashed;
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Principles */

.principles {
  display: grid;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.principle {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.principle-index {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.9;
}

.principle-title {
  margin-bottom: 0.375rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
}

/* Subnets */

.subnets {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.subnet {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

.subnet-id {
  justify-self: start;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
}

.subnet-name {
  margin-bottom: 0.25rem;
  color: var(--text);
  font-size: 1.1875rem;
  font-weight: 600;
}

/* Contact */

.section-contact {
  border-bottom: 0;
}

.contact-lede {
  max-width: 36rem;
  margin-top: 1rem;
  color: var(--muted);
}

.contact-email {
  display: inline-block;
  margin-top: 2rem;
  font-size: clamp(1.375rem, 6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 1.5rem;
}

.contact-links li {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
}

.contact-links a {
  display: inline-block;
  padding: 0.5rem 0;
}

.contact-links-label {
  margin-right: 0.375rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* 404 */

.not-found {
  display: flex;
  min-height: calc(100vh - 4rem - 1px);
  align-items: center;
}

.not-found .hero-sub {
  margin-bottom: 0;
}

@media (min-width: 640px) {
  :root {
    --gutter: 2rem;
  }

  .grid-research {
    grid-template-columns: repeat(2, 1fr);
  }

  .principles {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2.5rem;
  }

  .subnet {
    grid-template-columns: 6rem 1fr;
    gap: 1.5rem;
    align-items: start;
  }
}

@media (min-width: 960px) {
  :root {
    --gutter: 2.5rem;
  }

  .nav-optional {
    display: list-item;
  }

  .hero-motif {
    -webkit-mask-image: linear-gradient(to right, transparent 25%, #000 70%);
    mask-image: linear-gradient(to right, transparent 25%, #000 70%);
  }

  .hero-inner {
    padding-top: 9rem;
    padding-bottom: 9rem;
  }

  .hero-sub {
    font-size: 1.1875rem;
  }

  .section {
    padding: 7rem 0;
  }

  .grid-3,
  .grid-research {
    grid-template-columns: repeat(3, 1fr);
  }

  .subnets {
    grid-template-columns: repeat(2, 1fr);
  }
}
