@font-face {
  font-family: "JetBrainsMonoNL Nerd Font Mono";
  src: url("../assets/fonts/JetBrainsMonoNLNerdFontMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrainsMonoNL Nerd Font Mono";
  src: url("../assets/fonts/JetBrainsMonoNLNerdFontMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrainsMonoNL Nerd Font Mono";
  src: url("../assets/fonts/JetBrainsMonoNLNerdFontMono-Bold.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070d10;
  --bg-deep: #05090b;
  --surface: #0f191e;
  --surface-2: #152228;
  --fg: #e8f0f2;
  --muted: #9aafb6;
  --faint: #6d838c;
  --chrome: #c5d5dc;
  --chrome-bright: #eaf3f6;
  --leaf: #6baa88;
  --leaf-dim: #3f6f58;
  --teal: #5aa8a0;
  --amber: #d2a56f;
  --border: color-mix(in oklab, #e8f0f2 12%, transparent);
  --border-strong: color-mix(in oklab, #e8f0f2 22%, transparent);
  --focus: #9ee0d4;
  --shadow: 0 24px 70px color-mix(in oklab, #000 48%, transparent);
  --font: "JetBrainsMonoNL Nerd Font Mono", "JetBrains Mono", ui-monospace, monospace;
  --max: 72rem;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--fg);
  background:
    radial-gradient(ellipse 90% 52% at 50% -10%, color-mix(in oklab, var(--teal) 18%, transparent), transparent 62%),
    radial-gradient(circle at 88% 30%, color-mix(in oklab, var(--amber) 8%, transparent), transparent 28%),
    linear-gradient(180deg, var(--bg-deep), var(--bg) 48%, #091317);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(color-mix(in oklab, var(--chrome) 2.5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--chrome) 2.5%, transparent) 1px, transparent 1px);
  background-size: 3rem 3rem;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

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

a { color: inherit; }

::selection {
  color: var(--fg);
  background: color-mix(in oklab, var(--leaf) 40%, transparent);
}

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

main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--bg);
  background: var(--chrome-bright);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.text-max {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 760px) {
  .text-max { padding-inline: 2rem; }
}

.text-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg-deep) 84%, transparent);
  backdrop-filter: blur(18px);
}

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

.text-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: var(--chrome-bright);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  place-items: center;
  border: 1px solid color-mix(in oklab, var(--leaf) 38%, transparent);
  border-radius: 0.65rem;
  color: var(--leaf);
  background: color-mix(in oklab, var(--leaf) 8%, transparent);
}

.text-brand > span:last-child {
  display: grid;
  line-height: 1.15;
}

.text-brand strong {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.text-brand small {
  margin-top: 0.2rem;
  color: var(--faint);
  font-size: 0.61rem;
  letter-spacing: 0.05em;
}

.text-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.text-nav a {
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

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

.text-nav .back-link {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--chrome);
}

@media (max-width: 720px) {
  .text-nav a:not(.back-link) { display: none; }
}

.text-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 10vw, 8.5rem) 0 clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--border);
}

.text-hero::after {
  position: absolute;
  right: -0.03em;
  bottom: -0.34em;
  z-index: -1;
  content: "1337b";
  color: color-mix(in oklab, var(--chrome) 4.5%, transparent);
  font-size: clamp(8rem, 29vw, 28rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.11em;
  white-space: nowrap;
}

.hero-grid {
  display: grid;
  align-items: end;
  gap: 3rem;
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 19rem;
  }
}

.eyebrow {
  margin: 0;
  color: var(--leaf);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 13ch;
  margin: 1.1rem 0 0;
  color: var(--chrome-bright);
  font-size: clamp(2.8rem, 8vw, 6.4rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.hero-copy h1 span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--amber);
  font-size: 0.2em;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-lede {
  max-width: 47rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
}

.hero-cite {
  margin: 1.5rem 0 0;
  color: var(--faint);
  font-size: 0.72rem;
}

.coordinate-card {
  position: relative;
  display: grid;
  min-height: 15rem;
  align-content: space-between;
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--surface-2) 88%, transparent), color-mix(in oklab, var(--surface) 70%, transparent));
  box-shadow: var(--shadow);
}

.coordinate-card > span,
.coordinate-card > small {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coordinate-card strong {
  color: var(--chrome-bright);
  font-size: clamp(3.2rem, 7vw, 5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.08em;
}

.coordinate-card i {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 1.2rem var(--leaf);
}

.text-section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.text-section--tint {
  border-block: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 42%, transparent);
}

.contents-section {
  border-bottom: 1px solid var(--border);
}

.contents-layout {
  display: grid;
  align-items: start;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .contents-layout {
    grid-template-columns: minmax(16rem, 0.72fr) minmax(0, 1.28fr);
    gap: 5rem;
  }
}

.contents-head h2 {
  max-width: 12ch;
  margin: 0.6rem 0 0;
  color: var(--chrome-bright);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.contents-head > p:not(.eyebrow) {
  max-width: 44ch;
  margin: 1.25rem 0 0;
  color: var(--muted);
}

.contents-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--surface) 76%, transparent);
  box-shadow: var(--shadow);
  list-style: none;
}

.contents-list li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.contents-list li + li {
  border-top: 1px solid var(--border);
}

.contents-list li > span {
  padding-top: 0.12rem;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 600;
}

.contents-list h3 {
  margin: 0;
  color: var(--chrome-bright);
  font-size: 0.92rem;
  font-weight: 600;
}

.contents-list p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

@media (max-width: 520px) {
  .contents-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.passage-layout {
  display: grid;
  align-items: start;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .passage-layout {
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 2rem;
  }
}

.passage-card {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--surface) 84%, transparent);
  box-shadow: var(--shadow);
}

.passage-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
}

.passage-head h2,
.school-copy h2,
.plazir-panel h2,
.source-card h2 {
  margin: 0.6rem 0 0;
  color: var(--chrome-bright);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.greek-key {
  flex: 0 0 auto;
  color: var(--amber);
  font-size: 0.72rem;
}

.greek-excerpt {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
}

.greek-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.greek-line {
  margin: 0.85rem 0 0;
  color: var(--chrome);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.75;
  overflow-wrap: break-word;
}

blockquote {
  margin: 0;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in oklab, var(--amber) 12%, transparent), transparent 34%),
    color-mix(in oklab, var(--bg-deep) 72%, transparent);
}

blockquote p {
  max-width: 20ch;
  margin: 0;
  color: var(--chrome-bright);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.06em;
}

blockquote footer {
  margin-top: 1.5rem;
  color: var(--faint);
  font-size: 0.72rem;
}

.rendering {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.rendering-label {
  margin: 0 0 1.25rem;
  color: var(--leaf);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rendering p:not(.rendering-label) {
  max-width: 65ch;
  margin: 0;
  color: var(--muted);
}

.rendering p + p { margin-top: 1rem; }

.margin-stack {
  display: grid;
  gap: 0.8rem;
}

.margin-note {
  padding: 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--surface) 62%, transparent);
}

.margin-note > span {
  color: var(--faint);
  font-size: 0.65rem;
}

.margin-note h3 {
  margin: 1rem 0 0;
  color: var(--chrome);
  font-size: 1rem;
  font-weight: 600;
}

.margin-note p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.margin-note--accent {
  border-color: color-mix(in oklab, var(--leaf) 32%, transparent);
  background: color-mix(in oklab, var(--leaf-dim) 13%, var(--surface));
}

.school-grid {
  display: grid;
  align-items: start;
  gap: 3rem;
}

@media (min-width: 900px) {
  .school-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(26rem, 1.1fr);
    gap: 5rem;
  }
}

.school-copy h2 { max-width: 14ch; }

.school-copy > p:not(.eyebrow) {
  max-width: 58ch;
  margin: 1.35rem 0 0;
  color: var(--muted);
}

.school-copy em { color: var(--amber); }

.inline-source {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 1.5rem;
  color: var(--chrome);
  font-size: 0.78rem;
  text-underline-offset: 0.25em;
}

.inline-source span { color: var(--leaf); }

.sequence {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  list-style: none;
  background: color-mix(in oklab, var(--surface) 76%, transparent);
}

.sequence li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.5rem;
}

.sequence li + li { border-top: 1px solid var(--border); }

.sequence li > span {
  color: var(--faint);
  font-size: 0.7rem;
}

.sequence strong {
  color: var(--chrome-bright);
  font-size: 0.92rem;
}

.sequence p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.plazir-panel {
  display: grid;
  align-items: end;
  gap: 2rem;
  padding-block: clamp(2rem, 4vw, 3.5rem);
  border-block: 1px solid var(--border);
}

@media (min-width: 860px) {
  .plazir-panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.plazir-panel h2 { max-width: 18ch; }

.plazir-panel > div:first-child > p:not(.eyebrow) {
  max-width: 64ch;
  margin: 1.25rem 0 0;
  color: var(--muted);
}

.interpretive-note {
  color: var(--faint) !important;
  font-size: 0.72rem;
}

.plazir-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.button:hover { transform: translateY(-1px); }

.button--primary {
  color: #06100c;
  background: var(--leaf);
}

.button--ghost {
  border-color: var(--border-strong);
  color: var(--chrome);
  background: color-mix(in oklab, var(--surface) 62%, transparent);
}

.source-section {
  padding-top: 0;
}

.source-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .source-layout {
    grid-template-columns: minmax(0, 1fr) 22rem;
  }
}

.source-card,
.source-note {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--surface) 76%, transparent);
}

.source-card {
  display: grid;
  overflow: hidden;
}

.source-card > div {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.source-card h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }

.source-card > div > p:not(.eyebrow) {
  max-width: 64ch;
  margin: 1rem 0 0;
  color: var(--muted);
}

.source-card dl {
  display: grid;
  gap: 0.65rem;
  margin: 1.75rem 0 0;
}

.source-card dl > div {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1rem;
}

.source-card dt {
  color: var(--faint);
  font-size: 0.68rem;
}

.source-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--chrome);
  font-size: 0.7rem;
}

.outbound {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.5rem;
  padding: 1.25rem clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid color-mix(in oklab, var(--leaf) 35%, transparent);
  color: var(--chrome-bright);
  background: color-mix(in oklab, var(--leaf-dim) 18%, var(--surface));
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s var(--ease);
}

.outbound:hover {
  background: color-mix(in oklab, var(--leaf-dim) 28%, var(--surface));
}

.outbound b {
  color: var(--leaf);
  font-size: 1.2rem;
  font-weight: 400;
}

.source-note {
  padding: 1.5rem;
}

.source-note h3 {
  margin: 0.8rem 0 0;
  color: var(--chrome-bright);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
}

.source-note > p:not(.eyebrow) {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.text-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}

.footer-inner {
  display: flex;
  min-height: 7rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--faint);
  font-size: 0.7rem;
}

.footer-inner p { margin: 0; }

.footer-inner p:first-child {
  display: grid;
}

.footer-inner strong {
  color: var(--chrome);
  font-size: 0.76rem;
}

@media (max-width: 680px) {
  .passage-head {
    align-items: start;
    flex-direction: column;
  }

  .footer-inner {
    padding-block: 1.5rem;
    align-items: start;
    flex-direction: column;
    justify-content: center;
  }
}
