@font-face {
  font-family: 'Rinter';
  src: url('../assets/fonts/rinter-font/Rinter.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --color-bg: #0a0a0a;
  --color-text-primary: #f0ede8;
  --color-text-secondary: #a09e9b;
  --color-link: #c8c5c0;
  --color-link-hover: #f0ede8;
  --color-link-underline: #5a5855;
}

body {
  background-color: var(--color-bg);
  background-image: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    #1c1c1c 0%,
    transparent 70%
  );
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 2rem 3rem;
  gap: 3rem;
}

.hero__content {
  max-width: 832px;
  width: 100%;
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero__identity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.hero__photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.hero__name {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* Identity used as a link home (sub-pages) */
.identity-link {
  width: fit-content;
  text-decoration: none;
}

.identity-link .hero__name {
  transition: color 0.2s ease;
}

.identity-link:hover .hero__name {
  color: var(--color-text-primary);
}

.identity-link:focus-visible {
  outline: 2px solid var(--color-link-hover);
  outline-offset: 4px;
  border-radius: 4px;
}

.hero__title {
  font-family: 'Rinter', 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 4.5vw + 0.4rem, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
}

.hero__bio {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(0.9rem, 1.35vw + 0.45rem, 1.013rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
}

.ai-section {
  margin-bottom: 0;
}

.hero__offer {
  width: 100%;
  max-width: 832px;
}

.ai-section__title {
  font-family: 'Rinter', 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 3vw + 0.5rem, 2.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: 1.25rem;
}

.ai-section__body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(0.9rem, 1.35vw + 0.45rem, 1.013rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.gradient-word {
  background: linear-gradient(135deg, #E4F222 0%, #A8E6CF 60%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.ai-section__body + .ai-section__body {
  margin-top: 1.25rem;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 1.5rem 2rem 0;
  pointer-events: none;
}

.site-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4.5rem;
  background: linear-gradient(
    to bottom,
    #0a0a0a 15%,
    rgba(10, 10, 10, 0.85) 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: -1;
}

.site-nav__inner {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  width: 100%;
  max-width: 832px;
  pointer-events: none;
}

.site-nav .link {
  pointer-events: auto;
}

button.link {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-link-underline);
  cursor: pointer;
}

.link {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-link);
  text-decoration: none;
  border-bottom: 1px solid var(--color-link-underline);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.link:hover {
  color: var(--color-link-hover);
  border-bottom-color: var(--color-link-hover);
}

.link:focus-visible {
  color: var(--color-link-hover);
  border-bottom-color: var(--color-link-hover);
  outline: 2px solid var(--color-link-hover);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Current-page nav item: grayed out, not interactive */
.link--current,
.link--current:hover {
  color: #6b6966;
  border-bottom-color: transparent;
  cursor: default;
}

.email-dialog {
  background: #111111;
  border: 1px solid #242424;
  color: var(--color-text-secondary);
  padding: 2rem;
  max-width: 420px;
  width: calc(100% - 2rem);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.email-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.email-dialog[open] {
  animation: dialogFadeIn 0.2s ease both;
}

.email-dialog__text {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
}

.email-dialog__text + .email-dialog__text {
  margin-top: 1rem;
}

.email-dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  appearance: none;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.15s ease;
}

.email-dialog__close:hover {
  color: var(--color-text-primary);
}

@keyframes dialogFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .email-dialog[open] {
    animation: none;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

body.page-home {
  align-items: flex-start;
}

/* ---- Context Pipeline Diagram ---- */

.ctx-pipeline {
  --ctx-font-display: 'Space Grotesk', -apple-system, sans-serif;
  --ctx-font-mono: 'DM Mono', ui-monospace, monospace;

  /* Accent palette — Ramp yellow → mint, matches the site text gradient */
  --ctx-accent:   #E4F222;   /* Ramp yellow */
  --ctx-accent-2: #A8E6CF;   /* pale mint */
  --ctx-horizon-blue: var(--ctx-accent);    /* legacy name, now yellow */
  --ctx-ai-green:     var(--ctx-accent-2);  /* legacy name, now mint */

  /* Dark surfaces */
  --ctx-night-blue:    #141414;   /* MCP node surface (legacy name) */
  --ctx-bg-card:       #101010;
  --ctx-bg-light:      #1c1c1c;
  --ctx-border-subtle: #262626;
  --ctx-border-strong: #333333;

  /* Text on dark */
  --ctx-fg-1: #f0ede8;
  --ctx-fg-2: #b6b4b0;
  --ctx-fg-3: #8a8886;
  --ctx-fg-muted: #5f5d5a;

  /* width: 70%; — previous size, kept for revert */
  width: 100%;
  max-width: 832px;
  background: #0a0a0a;
  border-radius: 12px;
  overflow: hidden;
}

.ctx-pipeline__scaler {
  position: relative;
  overflow: hidden;
  min-width: 320px;
}

.ctx-canvas {
  position: relative;
  width: 1680px;
  height: 1000px;
  background: #0a0a0a;
  transform-origin: top left;
}

.ctx-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.ctx-wires {
  position: absolute;
  inset: 0;
  width: 1680px;
  height: 1000px;
  pointer-events: none;
}

/* Header */
.ctx-header {
  position: absolute;
  left: 72px;
  top: 48px;
  right: 72px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.ctx-eyebrow {
  font-family: var(--ctx-font-mono);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ctx-horizon-blue);
  font-weight: 400;
  margin: 0 0 10px;
}

.ctx-headline {
  font-family: var(--ctx-font-display);
  font-weight: 300;
  font-size: 34px;
  line-height: 42px;
  letter-spacing: -.01em;
  margin: 0;
  color: var(--ctx-fg-1);
}

.ctx-headline strong { font-weight: 500; }

.ctx-meta {
  text-align: right;
  font-family: var(--ctx-font-mono);
  font-size: 11px;
  line-height: 18px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ctx-fg-3);
}

.ctx-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--ctx-border-subtle);
  border-radius: 999px;
  background: var(--ctx-bg-card);
  color: var(--ctx-fg-2);
  margin-bottom: 8px;
}

.ctx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ea06e;
  animation: ctx-live 2.4s ease-out infinite;
}

@keyframes ctx-live {
  0%   { box-shadow: 0 0 0 0 rgba(46,160,110,.45); }
  70%  { box-shadow: 0 0 0 7px rgba(46,160,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,160,110,0); }
}

.ctx-meta-sub { display: block; }

/* Stage labels */
.ctx-stage-label {
  position: absolute;
  font-family: var(--ctx-font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ctx-fg-2);
  font-weight: 400;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ctx-stage-num  { color: var(--ctx-horizon-blue); font-weight: 500; }
.ctx-stage-rule { color: var(--ctx-fg-muted); }

/* Source group frame */
.ctx-src-frame {
  position: absolute;
  border: 1px dashed var(--ctx-border-strong);
  border-radius: 16px;
  background: rgba(255,255,255,.02);
}

/* Source cards */
.ctx-src {
  position: absolute;
  width: 296px;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: var(--ctx-bg-card);
  border: 1px solid var(--ctx-border-subtle);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}

.ctx-src-ico {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--ctx-bg-light);
  color: var(--ctx-horizon-blue);
}

.ctx-src-ico svg { width: 20px; height: 20px; }

.ctx-src-name {
  font-family: var(--ctx-font-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  color: var(--ctx-fg-1);
}

.ctx-src-sub {
  font-family: var(--ctx-font-mono);
  font-size: 10.5px;
  line-height: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ctx-fg-3);
  margin-top: 3px;
}

/* Process nodes */
.ctx-node {
  position: absolute;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 22px;
}

.ctx-node-ico {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-bottom: 16px;
  flex: none;
}

.ctx-node-ico svg { width: 28px; height: 28px; }

.ctx-node-eyebrow {
  font-family: var(--ctx-font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 8px;
  font-weight: 400;
}

.ctx-node-title {
  font-family: var(--ctx-font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 27px;
  margin: 0;
}

.ctx-node-desc {
  font-family: var(--ctx-font-display);
  font-size: 13px;
  line-height: 19px;
  margin: 12px 0 0;
  max-width: 220px;
}

/* MCP */
.ctx-node--mcp { background: var(--ctx-night-blue); border: 1px solid var(--ctx-night-blue); }
.ctx-node--mcp .ctx-node-ico { background: rgba(255,255,255,.08); color: var(--ctx-ai-green); }
.ctx-node--mcp .ctx-node-eyebrow { color: var(--ctx-ai-green); }
.ctx-node--mcp .ctx-node-title   { color: #ffffff; }
.ctx-node--mcp .ctx-node-desc    { color: rgba(255,255,255,.66); }

/* Claude */
.ctx-node--claude { background: var(--ctx-bg-card); border: 1px solid var(--ctx-horizon-blue); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.ctx-node--claude .ctx-node-ico { background: var(--ctx-horizon-blue); color: #0a0a0a; position: relative; }
.ctx-node--claude .ctx-node-ico::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 8px;
  border: 1.5px solid var(--ctx-horizon-blue);
  opacity: .35;
  animation: ctx-think 2.6s cubic-bezier(.22,1,.36,1) infinite;
}
@keyframes ctx-think {
  0%   { transform: scale(1);    opacity: .4; }
  70%  { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}
.ctx-node--claude .ctx-node-eyebrow { color: var(--ctx-horizon-blue); }
.ctx-node--claude .ctx-node-title   { color: var(--ctx-fg-1); }
.ctx-node--claude .ctx-node-desc    { color: var(--ctx-fg-2); }

/* Memory */
.ctx-node--memory {
  background: linear-gradient(135deg, #E4F222 0%, #A8E6CF 100%);
  border: none;
  box-shadow: 0 18px 44px rgba(228,242,34,.20);
  overflow: hidden;
}
.ctx-node--memory::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: ctx-sweep 4.5s ease-in-out infinite;
}
@keyframes ctx-sweep {
  0%, 22% { transform: translateX(-120%); }
  55%,100% { transform: translateX(120%); }
}
.ctx-node--memory .ctx-node-ico      { background: rgba(0,0,0,.14); color: #0a0a0a; }
.ctx-node--memory .ctx-node-eyebrow  { color: rgba(0,0,0,.68); position: relative; z-index: 1; }
.ctx-node--memory .ctx-node-title    { color: #0a0a0a; position: relative; z-index: 1; }
.ctx-node--memory .ctx-node-desc     { color: rgba(0,0,0,.82); position: relative; z-index: 1; }

.ctx-node-perm {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.12);
  font-family: var(--ctx-font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #0a0a0a;
}
.ctx-node-perm svg { width: 13px; height: 13px; }

.ctx-footnote {
  position: absolute;
  font-family: var(--ctx-font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ctx-fg-3);
}

@media (prefers-reduced-motion: reduce) {
  .ctx-dot,
  .ctx-node--claude .ctx-node-ico::after,
  .ctx-node--memory::after { animation: none; }
}

/* Work page */

body.page-work {
  display: block;
  padding: 5rem 2rem 6rem;
}

.work {
  max-width: 832px;
  margin: 0 auto;
}

.work__header {
  margin-bottom: 3.5rem;
}

.work__header .hero__title {
  margin-bottom: 1.5rem;
}

.work__intro {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(0.9rem, 1.35vw + 0.45rem, 1.013rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin: 0;
}

.work__list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Resource card */
.resource {
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  background: #0d0d0d;
  padding: 1.75rem;
  transition: border-color 0.2s ease;
}

.resource:hover {
  border-color: #2c2c2c;
}

.resource__title {
  font-family: 'Rinter', 'Space Grotesk', sans-serif;
  font-size: clamp(1.3rem, 2vw + 0.6rem, 1.6rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--color-text-primary);
  margin-bottom: 1.25rem;
}

.resource__title-link {
  color: inherit;
  text-decoration: none;
  transition: text-decoration-color 0.2s ease;
}

.resource__title-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--color-link-underline);
}

.resource__title-link:focus-visible {
  outline: 2px solid var(--color-link-hover);
  outline-offset: 4px;
  border-radius: 2px;
}

.resource__preview {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background-color: #111111;
  margin-bottom: 1.25rem;
}

.resource__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Placeholder shown until a real screenshot is dropped in */
.resource__preview--placeholder {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(135deg, #161616 0%, #0f0f0f 100%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
}

.resource__preview--placeholder::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3a3a3a;
}

.resource__desc {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin: 0 0 1.5rem;
}

.resource__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  text-decoration: none;
  padding: 0.7rem 1.25rem;
  border: 1px solid #2c2c2c;
  border-radius: 999px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.resource__cta:hover {
  border-color: var(--color-link-hover);
  background-color: rgba(240, 237, 232, 0.04);
}

.resource__cta:focus-visible {
  outline: 2px solid var(--color-link-hover);
  outline-offset: 3px;
}

.resource__cta-arrow {
  transition: transform 0.2s ease;
}

.resource__cta:hover .resource__cta-arrow {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .resource__cta-arrow {
    transition: none;
  }
}

/* Entry page (work sub-pages) */

body.page-entry {
  display: block;
  padding: 6rem 2rem 6rem;
}

.entry {
  max-width: 832px;
  margin: 0 auto;
}

.entry__header {
  margin-bottom: 1.75rem;
}

.entry__header .hero__title {
  margin-bottom: 0;
}

.entry__lead {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(0.9rem, 1.35vw + 0.45rem, 1.013rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin-bottom: 3.5rem;
}

.entry__section {
  margin-bottom: 3.5rem;
}

.entry__section:last-child {
  margin-bottom: 0;
}

.entry__heading {
  font-family: 'Rinter', 'Space Grotesk', sans-serif;
  font-size: clamp(1.3rem, 2.5vw + 0.5rem, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--color-text-primary);
  margin-bottom: 1.1rem;
}

.entry__body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin: 0;
}

.entry__steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
}

.entry__step {
  position: relative;
  padding-left: 2.75rem;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.entry__step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #2c2c2c;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--color-text-primary);
}

.entry__inline-code {
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
  color: var(--color-text-primary);
  background: #1a1a1a;
  border: 1px solid #262626;
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

/* Code block */

.codeblock {
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  background: #0d0d0d;
  overflow: hidden;
}

.codeblock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.7rem 0.7rem 1.25rem;
  border-bottom: 1px solid #1e1e1e;
  background: #0f0f0f;
}

.codeblock__label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.codeblock__copy {
  appearance: none;
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid #2c2c2c;
  border-radius: 8px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.codeblock__copy:hover {
  color: var(--color-link-hover);
  border-color: var(--color-link-hover);
  background-color: rgba(240, 237, 232, 0.04);
}

.codeblock__copy:focus-visible {
  outline: 2px solid var(--color-link-hover);
  outline-offset: 2px;
}

.codeblock__icon {
  width: 16px;
  height: 16px;
}

.codeblock__icon--check {
  display: none;
}

.codeblock__copy.is-copied {
  color: #a8e6cf;
  border-color: #a8e6cf;
}

.codeblock__copy.is-copied .codeblock__icon--copy {
  display: none;
}

.codeblock__copy.is-copied .codeblock__icon--check {
  display: inline-block;
}

.codeblock__pre {
  margin: 0;
  height: 60vh;
  overflow: auto;
  padding: 1.25rem 1.5rem;
  background: #0a0a0a;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}

.codeblock__pre::-webkit-scrollbar {
  width: 12px;
}

.codeblock__pre::-webkit-scrollbar-track {
  background: transparent;
}

.codeblock__pre::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 6px;
  border: 3px solid #0a0a0a;
}

.codeblock__pre::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

.codeblock__code {
  display: block;
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

/* Characters index list */

.character-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
}

.character-list__item {
  border-bottom: 1px solid #1a1a1a;
}

.character-list__item:last-child {
  border-bottom: none;
}

.character-list__link {
  display: block;
  padding: 1rem 0;
  font-family: 'Rinter', 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.character-list__link:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
  text-decoration-color: var(--color-link-underline);
  text-underline-offset: 4px;
}

.character-list__link:focus-visible {
  outline: 2px solid var(--color-link-hover);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Character sheet pages */

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.sheet-concept {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

.stat-section {
  margin-bottom: 3rem;
}

.stat-section:last-child {
  margin-bottom: 0;
}

.stat-section__title {
  font-family: 'Rinter', 'Space Grotesk', sans-serif;
  font-size: clamp(1.3rem, 2.5vw + 0.5rem, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--color-text-primary);
  margin-bottom: 1.25rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 2rem;
}

.stat-group__title {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #1a1a1a;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--color-text-secondary);
}

.stat-row:last-child {
  border-bottom: none;
}

.dots {
  display: inline-flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #3a3a3a;
  background: transparent;
}

.dot--filled {
  background: var(--color-text-primary);
  border-color: var(--color-text-primary);
}

.edges-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}

.edges-item {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text-secondary);
  padding: 0.9rem 1.1rem;
  border: 1px solid #1e1e1e;
  border-radius: 10px;
  background: #0d0d0d;
}

/* Off-screen field used by the clipboard fallback */
.visually-hidden-field {
  position: absolute;
  left: -9999px;
  top: 0;
  opacity: 0;
}

@media (max-width: 480px) {
  .site-nav {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .site-nav__inner {
    gap: 1.25rem;
  }

  body.page-work {
    padding: 3.5rem 1.25rem 4rem;
  }

  .resource {
    padding: 1.25rem;
  }

  body.page-entry {
    padding: 5rem 1.25rem 4rem;
  }

  .codeblock__pre {
    padding: 1rem 1.1rem;
  }
}

@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem 0;
  }
}
