/* ==========================================================================
   DESIGN TOKENS
   Change these to restyle the whole site later.
   ========================================================================== */
:root {
  /* Color — rich navy dark mode */
  --color-bg: #0d0f1e;
  --color-bg-alt: #141730;
  --color-surface: #171a35;
  --color-ink: #eef0f8;
  --color-ink-soft: #a3a6c4;
  --color-line: #2b2f52;

  --color-accent: #7c8cff;              /* primary accent — used for links, focus, games */
  --color-accent-soft: rgba(124, 140, 255, 0.18);
  --color-sound: #e0a35f;                /* category accent — sound design */
  --color-sound-soft: rgba(224, 163, 95, 0.18);
  --color-tech: #58d3a8;                 /* category accent — technical programming */
  --color-tech-soft: rgba(88, 211, 168, 0.18);

  /* Code syntax colors — separate from the 3 accents above so code blocks
     read with the same richness as an editor theme (One Dark-inspired). */
  --code-fg: #abb2bf;
  --code-comment: #5c6370;
  --code-keyword: #c678dd;
  --code-function: #61afef;
  --code-string: #98c379;
  --code-number: #d19a66;
  --code-type: #e5c07b;
  --code-tag: #e06c75;
  --code-cyan: #56b6c2;

  /* Type */
  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

  /* Layout */
  --content-width: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;
}

/* ==========================================================================
   RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; }
p { margin: 0; }

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

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

/* ==========================================================================
   CROSS-DOCUMENT VIEW TRANSITIONS
   Smooths the hard cut between page navigations into a cross-fade, natively,
   with no JS. Supported in Chrome/Edge 126+ and Safari 18.2+; browsers
   without support (e.g. current Firefox) just keep today's normal behavior.
   ========================================================================== */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
  animation-timing-function: ease;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

/* ==========================================================================
   LAYOUT PRIMITIVES
   ========================================================================== */
.wrap {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
}
.eyebrow::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  background: var(--color-accent);
  border-radius: 1px;
}

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
:root { --header-height: 4.25rem; }

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--color-bg);
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-line);
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

/* Transparent over the hero video; gains a solid backing once scrolled */
body.has-hero .site-header {
  background: transparent;
  border-bottom-color: transparent;
  color: #fff;
}
body.has-hero .site-header.is-scrolled {
  background: rgba(13, 15, 30, 0.85);
  backdrop-filter: blur(10px);
  color: var(--color-ink);
  border-bottom-color: var(--color-line);
}

/* Pages without a hero (e.g. /projects/) need top padding to clear the fixed header */
body:not(.has-hero) main { padding-top: var(--header-height); }

.site-header__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 4vw, 3rem);
}

.site-nav ul {
  display: flex;
  gap: 1.75rem;
}
.site-nav a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: currentColor;
  opacity: 0.72;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: opacity 0.5s ease, border-color 0.5s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-nav a.is-current {
  opacity: 1;
  border-color: var(--color-accent);
}
/* Fade the active link in on page load rather than having it snap on instantly */
.site-nav a[aria-current="page"] {
  animation: navLinkFadeIn 0.7s ease;
}
@keyframes navLinkFadeIn {
  from { opacity: 0; border-color: transparent; }
  to { opacity: 1; border-color: var(--color-accent); }
}

/* The reserved middle slot the hero name crossfades into on scroll.
   On pages without a hero (projects overview + detail pages) it's shown
   permanently instead of being tied to scroll position. */
.nav-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  opacity: 0;
  white-space: nowrap;
  min-width: 8ch;
  text-align: center;
}
body:not(.has-hero) .nav-name { opacity: 1; }

@media (max-width: 720px) {
  .nav-name { display: none; }
}

/* ==========================================================================
   HERO — full-bleed looping video, name centered, merges into nav on scroll
   ========================================================================== */
.hero {
  position: relative;
  height: 100svh;
  min-height: 22rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Gradient fallback: shows through if no video file has been added yet */
  background: linear-gradient(155deg, #0d0f1e, #23264a 45%, #0d0f1e);
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.45) 100%);
}

.hero-name-wrap {
  position: relative;
  text-align: center;
  color: #fff;
  padding-inline: 1.5rem;
  transition: opacity 0.05s linear;
  will-change: opacity, transform;
}
.hero-name {
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.hero-role {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}
.role-rotator {
  position: relative;
  display: inline-block;
  min-width: 9ch;
  height: 1.2em;
  vertical-align: top;
  text-align: center;
}
.role-word {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation-name: roleFade;
  animation-iteration-count: infinite;
  animation-timing-function: ease;
}
@media (prefers-reduced-motion: reduce) {
  .role-word { animation: none !important; opacity: 0; }
  .role-word:first-child { opacity: 1; }
}
.hero__scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  opacity: 0.7;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero__scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 1.75rem;
  background: currentColor;
  margin: 0.5rem auto 0;
  opacity: 0.6;
}

/* ==========================================================================
   PROJECT GRID + CARDS
   ========================================================================== */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 0 1.75rem;
  padding-top: clamp(2.5rem, 6vw, 4rem);
}
.section-heading h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.section-heading p { color: var(--color-ink-soft); max-width: 40ch; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-ink);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--color-ink-soft); }

.card__media {
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(135deg, var(--color-bg-alt), var(--color-bg-alt) 10px, var(--color-bg) 10px, var(--color-bg) 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--color-line);
}
.card__media span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-ink-soft);
  background: var(--color-surface);
  padding: 0.25em 0.6em;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
}
.card__media img,
.card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.card h3 { font-size: 1.1rem; }
.card p { color: var(--color-ink-soft); font-size: 0.92rem; }
.card__meta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-ink-soft);
}

/* ==========================================================================
   PROJECT DETAIL PAGE
   ========================================================================== */
.project-header { padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; }
.project-header h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-block: 0.6rem 0.8rem; }
.project-header__meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-ink-soft);
  margin-bottom: 1rem;
}
.project-header p.summary { font-size: 1.05rem; color: var(--color-ink-soft); max-width: 60ch; }

.stack-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block: 1.25rem; }
.stack-chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 0.25em 0.65em;
  color: var(--color-ink-soft);
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--color-ink);
  color: var(--color-ink);
  padding: 0.55em 1.1em;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--color-ink); color: var(--color-bg); }
.btn--cta { margin-block: 0.25rem 1.5rem; }

.project-body {
  padding-block: 2rem 3rem;
  max-width: 65ch;
}
.project-body p { margin-bottom: 1.1rem; color: var(--color-ink-soft); }

.divider {
  border: none;
  border-top: 1px solid var(--color-line);
  margin-block: 2rem;
}

.content-heading {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  margin-block: 2rem 1rem;
}

.bullet-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--color-ink-soft);
}
.bullet-list li { margin-bottom: 0.5rem; }

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-bg-alt);
  color: var(--color-accent);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--color-line);
}

.media-block {
  border: 1px dashed var(--color-line);
  border-radius: var(--radius);
  padding: 2.25rem 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--color-bg-alt);
}

.media-image,
.media-video {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  margin-bottom: 1.25rem;
  display: block;
}

.code-block {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--color-bg-alt);
}
.code-block__lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-surface);
}
.code-block pre {
  margin: 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
}
.code-block code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre;
  background: none;
}

/* highlight.js token colors — a dedicated syntax palette (One Dark-inspired)
   so code reads with the same richness as an editor, independent of the
   site's 3 category accent colors. */
.hljs { color: var(--code-fg); background: transparent; }
.hljs-comment, .hljs-quote { color: var(--code-comment); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-doctag { color: var(--code-keyword); }
.hljs-literal { color: var(--code-cyan); }
.hljs-built_in, .hljs-builtin-name, .hljs-type, .hljs-class .hljs-title { color: var(--code-type); }
.hljs-string, .hljs-template-tag, .hljs-template-variable, .hljs-addition, .hljs-regexp { color: var(--code-string); }
.hljs-number, .hljs-meta, .hljs-link, .hljs-attr, .hljs-attribute { color: var(--code-number); }
.hljs-symbol, .hljs-bullet { color: var(--code-cyan); }
.hljs-title, .hljs-title.function_, .hljs-section { color: var(--code-function); font-weight: 600; }
.hljs-name, .hljs-selector-id, .hljs-selector-class, .hljs-tag .hljs-name { color: var(--code-tag); }
.hljs-tag .hljs-attr { color: var(--code-number); }
.hljs-params, .hljs-variable, .hljs-tag { color: var(--code-fg); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }
.hljs-deletion { color: var(--code-tag); background: rgba(224, 108, 117, 0.12); }

.audio-block {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
  background: var(--color-surface);
}
.audio-block__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-ink-soft);
  margin-bottom: 0.6rem;
}
.audio-block audio {
  width: 100%;
  /* Tint native browser controls to fit the dark theme where supported */
  color-scheme: dark;
}
.waveform-placeholder {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 2.5rem;
}
.waveform-placeholder span {
  flex: 1;
  background: var(--color-line);
  border-radius: 1px;
  height: 40%;
}
.waveform-placeholder span:nth-child(4n+1) { height: 90%; }
.waveform-placeholder span:nth-child(4n+2) { height: 55%; }
.waveform-placeholder span:nth-child(4n+3) { height: 75%; }
.waveform-placeholder span:nth-child(5n)   { height: 30%; }

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-section {
  display: grid;
  grid-template-columns: minmax(0, 20rem) 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(4rem, 10vw, 7rem);
  scroll-margin-top: var(--header-height);
}
.about-section__media {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}
.headshot {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
}
.about-section__text h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-block: 0.6rem 1.1rem;
}
.about-section__text p {
  color: var(--color-ink-soft);
  max-width: 52ch;
  margin-bottom: 1rem;
}
.about-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 52ch;
  margin-top: 0.25rem;
}
.about-list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--color-ink-soft);
  font-size: 0.95rem;
}
.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4em;
  height: 0.4em;
  background: var(--color-accent);
  border-radius: 1px;
}

.icon-row { display: flex; gap: 0.75rem; }
.icon-link {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  color: var(--color-ink-soft);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-link:hover { color: var(--color-accent); border-color: var(--color-accent); }
.icon-link svg { width: 1.25rem; height: 1.25rem; }

@media (max-width: 720px) {
  .about-section { grid-template-columns: 1fr; }
  .about-section__media { align-items: center; text-align: center; }
  .headshot { width: 60%; max-width: 14rem; }
}

/* ==========================================================================
   FEATURED PROJECT
   ========================================================================== */
.featured-section { padding-bottom: clamp(3rem, 7vw, 5rem); }
.featured-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  margin-top: 1.25rem;
}
.featured-card__media {
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(135deg, var(--color-bg-alt), var(--color-bg-alt) 10px, var(--color-bg) 10px, var(--color-bg) 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--color-line);
}
.featured-card__media span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-ink-soft);
  background: var(--color-surface);
  padding: 0.3em 0.7em;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
}
.featured-card__media img,
.featured-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-card__body {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.featured-card__body h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
.featured-card__body p { color: var(--color-ink-soft); }
.featured-card__body .btn { width: fit-content; margin-top: 0.4rem; }

@media (max-width: 760px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card__media { border-right: none; border-bottom: 1px solid var(--color-line); }
}

/* ==========================================================================
   PROJECT CAROUSEL (horizontal scroll)
   ========================================================================== */
.carousel-section { padding-bottom: clamp(3rem, 7vw, 5rem); }
.carousel {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  max-width: 88rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.carousel-card {
  flex: 0 0 clamp(14rem, 32vw, 19rem);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
}
.carousel-card__media {
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(135deg, var(--color-bg-alt), var(--color-bg-alt) 10px, var(--color-bg) 10px, var(--color-bg) 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--color-line);
}
.carousel-card__media span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-ink-soft);
  background: var(--color-surface);
  padding: 0.25em 0.6em;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
}
.carousel-card__media img,
.carousel-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-card__body {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.carousel-card__body h3 { font-size: 1.05rem; }
.carousel-card__body p { color: var(--color-ink-soft); font-size: 0.9rem; }
.carousel-card .btn--small { margin-top: auto; align-self: flex-start; }

.btn--small { font-size: 0.78rem; padding: 0.45em 0.9em; }

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-line);
  scroll-margin-top: var(--header-height);
}
.contact-section__inner {
  padding-block: clamp(4rem, 10vw, 6rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.contact-section__inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.contact-section__inner p { color: var(--color-ink-soft); max-width: 40ch; }
.email-link {
  font-family: var(--font-mono);
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-block: 0.5rem 1rem;
}
.contact-section .icon-row { justify-content: center; }

/* ==========================================================================
   PREV/NEXT PROJECT SIDE NAV (project detail pages)
   ========================================================================== */
.project-side-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-ink-soft);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  max-width: 12rem;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.project-side-nav:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.project-side-nav--prev { left: clamp(0.75rem, 3vw, 2rem); }
.project-side-nav--next { right: clamp(0.75rem, 3vw, 2rem); }
.project-side-nav__arrow {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}
.project-side-nav__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Side buttons crowd a narrow viewport — collapse to arrow-only chips */
@media (max-width: 900px) {
  .project-side-nav__label { display: none; }
  .project-side-nav { padding: 0.65rem; }
}
@media (max-width: 560px) {
  /* Move off the sides entirely on small phones so they never sit over text */
  .project-side-nav {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
  .project-side-nav--prev { left: 1rem; }
  .project-side-nav--next { right: 1rem; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--color-line);
  padding-block: 2rem;
  margin-top: 2rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-ink-soft);
}
