/* ══════════════════════════════════════════════════════════════════════
   project.css — Project post page styles
   Inherits design tokens and nav/footer from style.css
   ══════════════════════════════════════════════════════════════════════ */


/* ── PROJECT HEADER ────────────────────────────────────────────────── */

.proj-header {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 480px;
  border-bottom: var(--line);
}

/* Left metadata column */
.proj-header-meta {
  padding: 3rem 3rem;
  border-right: var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.proj-back {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
  transition: color .2s;
}

.proj-back:hover {
  color: var(--black);
}

.proj-meta-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.proj-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: var(--line-thin);
}

.proj-meta-row:first-child {
  border-top: var(--line-thin);
}

.proj-meta-label {
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mid);
  width: 52px;
  flex-shrink: 0;
  padding-top: .1rem;
}

.proj-meta-value {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.4;
}

.proj-status-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border: var(--line-thin);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.proj-link-group {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.proj-ext-link {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--black);
  transition: color .15s;
  position: relative;
  display: inline-block;
}

.proj-ext-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--black);
  transition: right .2s ease;
}

.proj-ext-link:hover::after {
  right: 0;
}

/* Decorative dot cluster */
.proj-dot-cluster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  width: fit-content;
}

.proj-dot-cluster span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--black);
  display: block;
  opacity: .25;
}

/* Right title column */
.proj-header-title {
  padding: 3rem 3.5rem 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.proj-number {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.25rem;
}

.proj-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 7vw, 7.5rem);
  line-height: .9;
  letter-spacing: .02em;
  margin-bottom: 2rem;
}

.proj-title em {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  color: var(--mid);
}

.proj-tagline {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  line-height: 1.65;
  color: #333;
  max-width: 560px;
  margin-bottom: 2rem;
}

.proj-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.proj-tag {
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  border: var(--line-thin);
  cursor: default;
  transition: background .15s, color .15s;
}

.proj-tag:hover {
  background: var(--black);
  color: var(--white);
}


/* ── TABLE OF CONTENTS (mobile / top) ─────────────────────────────── */

.proj-toc {
  display: flex;
  align-items: stretch;
  border-bottom: var(--line);
  overflow-x: auto;
}

.proj-toc-label {
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 1rem 2rem;
  border-right: var(--line);
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.proj-toc-links {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.proj-toc-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1rem 1.75rem;
  border-right: var(--line-thin);
  text-decoration: none;
  color: var(--black);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.proj-toc-item:last-child {
  border-right: none;
}

.proj-toc-item:hover {
  background: var(--black);
  color: var(--white);
}

.proj-toc-item:hover .proj-toc-num {
  color: #aaa;
}

.proj-toc-num {
  font-family: 'DM Mono', monospace;
  font-size: .65rem;
  color: var(--mid);
}


/* TOC toggle button — hidden on desktop, shown on mobile */
.proj-toc-toggle {
  display: none;
}

/* ── BODY: SIDEBAR + ARTICLE ───────────────────────────────────────── */

.proj-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: start;
}

/* Sticky sidebar */
.proj-sidebar {
  position: sticky;
  top: 64px;
  border-right: var(--line);
  padding: 2.5rem 0;
  min-height: calc(100vh - 64px);
  align-self: start;
}

.proj-sidebar-label {
  font-family: 'DM Mono', monospace;
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 0 2rem 1rem;
  border-bottom: var(--line-thin);
  margin-bottom: .5rem;
}

.proj-sidebar-link {
  display: block;
  padding: .65rem 2rem;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

.proj-sidebar-link:hover {
  color: var(--black);
}

.proj-sidebar-link.active {
  color: var(--black);
  border-left-color: var(--black);
}


/* ── ARTICLE ───────────────────────────────────────────────────────── */

.proj-article {
  border-left: none;
}


/* ── SECTION ───────────────────────────────────────────────────────── */

.proj-section {
  border-bottom: var(--line);
}

/* Section header — mirrors portfolio .section-header exactly */
.proj-section-header {
  display: flex;
  align-items: stretch;
  border-bottom: var(--line);
}

.proj-section-num {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  color: var(--mid);
  padding: 1.25rem 2rem;
  border-right: var(--line);
  display: flex;
  align-items: center;
  min-width: 80px;
}

.proj-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  letter-spacing: .05em;
  padding: .6rem 3rem;
  flex: 1;
}


/* ── CONTENT AREA ──────────────────────────────────────────────────── */

.proj-content {
  padding: 3rem 3rem 3.5rem;
  max-width: 780px;
}

.proj-content p {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #222;
  margin-bottom: 1.4rem;
}

.proj-content p:last-child {
  margin-bottom: 0;
}


/* ── KEY STATS CALLOUT ─────────────────────────────────────────────── */

.proj-callout {
  margin: 2rem 0;
  border: var(--line);
}

.proj-callout-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.proj-stat {
  padding: 2rem 2rem;
  border-right: var(--line-thin);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.proj-stat:last-child {
  border-right: none;
}

.proj-stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: .02em;
}

.proj-stat-label {
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mid);
  line-height: 1.4;
}


/* ── BLOCKQUOTE ────────────────────────────────────────────────────── */

.proj-quote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--black);
  background: transparent;
}

.proj-quote p,
.proj-quote {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.65;
  color: #333;
  margin: 0 0 .5rem;
}

.proj-quote cite {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  font-style: normal;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: .75rem;
}


/* ── STEP LIST ─────────────────────────────────────────────────────── */

.proj-steps {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  border: var(--line);
}

.proj-step {
  display: flex;
  align-items: flex-start;
  gap: 0;
  border-bottom: var(--line-thin);
}

.proj-step:last-child {
  border-bottom: none;
}

.proj-step-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  line-height: 1;
  color: #ddd;
  padding: 1.5rem 1.75rem;
  border-right: var(--line-thin);
  min-width: 80px;
  text-align: center;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proj-step-body {
  padding: 1.5rem 2rem;
}

.proj-step-body strong {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.proj-step-body p {
  font-family: 'DM Serif Display', serif;
  font-size: .95rem;
  line-height: 1.65;
  color: #444;
  margin: 0;
}


/* ── CODE BLOCK ────────────────────────────────────────────────────── */

.proj-code-block {
  margin: 2rem 0;
  border: var(--line);
}

.proj-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 1.5rem;
  border-bottom: var(--line);
  background: var(--black);
}

.proj-code-lang {
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  opacity: .7;
}

.proj-code-file {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  color: var(--white);
}

.proj-code {
  margin: 0;
  padding: 1.75rem 1.5rem;
  overflow-x: auto;
  background: #0a0a0a;
}

.proj-code code {
  font-family: 'DM Mono', monospace;
  font-size: .82rem;
  line-height: 1.7;
  color: #e0e0d8;
  display: block;
}

/* Minimal syntax tints */
.proj-code .k {
  color: #aaa;
}

/* keywords */
.proj-code .n {
  color: #e0e0d8;
}

/* names */
.proj-code .c {
  color: #555;
  font-style: italic;
}

/* comments */


/* ── FIGURE / IMAGE PLACEHOLDER ────────────────────────────────────── */

.proj-figure {
  margin: 2rem 0;
}

.proj-figure-placeholder {
  width: 100%;
  aspect-ratio: 16 / 7;
  border: var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #f0f0eb;
}

.proj-figure-icon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.proj-figure-icon span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #bbb;
  display: block;
}

.proj-figure-caption-text {
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .08em;
  color: #aaa;
  text-align: center;
  margin: 0 !important;
}

.proj-figure-caption {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  line-height: 1.5;
  color: var(--mid);
  padding-top: .75rem;
  border-top: var(--line-thin);
  margin-top: .75rem;
  margin-bottom: 0 !important;
}

.proj-figure-caption code {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
}


/* ── RESULTS TABLE ─────────────────────────────────────────────────── */

.proj-table-wrap {
  margin: 2rem 0;
  overflow-x: auto;
  border: var(--line);
}

.proj-table {
  width: 100%;
  border-collapse: collapse;
}

.proj-table th {
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mid);
  padding: .9rem 1.5rem;
  text-align: left;
  border-bottom: var(--line);
  background: #f0f0eb;
}

.proj-table td {
  font-size: .88rem;
  font-weight: 500;
  padding: .85rem 1.5rem;
  border-bottom: var(--line-thin);
}

.proj-table tbody tr:last-child td {
  border-bottom: none;
}

.proj-table-highlight td {
  background: var(--black);
  color: var(--white);
}

.proj-table-highlight strong {
  color: var(--white);
}


/* ── CHALLENGES ────────────────────────────────────────────────────── */

.proj-challenges {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  border: var(--line);
}

.proj-challenge {
  padding: 1.5rem 2rem;
  border-bottom: var(--line-thin);
}

.proj-challenge:last-child {
  border-bottom: none;
}

.proj-challenge-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
}

.proj-challenge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--black);
  flex-shrink: 0;
}

.proj-challenge-header strong {
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.proj-challenge p {
  font-family: 'DM Serif Display', serif;
  font-size: .95rem;
  line-height: 1.65;
  color: #444;
  margin: 0 !important;
  padding-left: 1.5rem;
}


/* ── WHAT'S NEXT LIST ──────────────────────────────────────────────── */

.proj-next-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: var(--line);
}

.proj-next-list li {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #222;
  padding: 1rem 1.5rem 1rem 4rem;
  border-bottom: var(--line-thin);
  position: relative;
}

.proj-next-list li:last-child {
  border-bottom: none;
}

.proj-next-list li::before {
  content: attr(data-n);
  position: absolute;
  left: 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--mid);
  top: 50%;
  transform: translateY(-50%);
}


/* ── PROJECT FOOTER ────────────────────────────────────────────────── */

.proj-footer {
  border-top: var(--line);
}

.proj-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 3rem;
  gap: 3rem;
}

.proj-footer-back {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mid);
  transition: color .2s;
}

.proj-footer-back:hover {
  color: var(--black);
}

.proj-footer-nav {
  display: flex;
  gap: 3rem;
}

.proj-footer-sibling {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  font-weight: 600;
  position: relative;
}

.proj-footer-sibling::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--black);
  transition: right .2s ease;
}

.proj-footer-sibling:hover::after {
  right: 0;
}


/* ── LEAD PARAGRAPH ────────────────────────────────────────────────── */

.proj-content p.lead {
  font-size: 1.2rem;
  line-height: 1.75;
  color: #111;
  font-weight: 400;
}


/* ── BLOCK TITLE (used above lists / tables) ───────────────────────── */

.proj-block-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: .75rem;
  margin-top: 2rem;
}


/* ── BULLET LIST — SIMPLE (dash markers) ───────────────────────────── */

.proj-list--simple {
  list-style: none;
  margin: 1rem 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.proj-list--simple li {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #222;
  padding-left: 1.5rem;
  position: relative;
}

.proj-list--simple li::before {
  content: '—';
  position: absolute;
  left: 0;
  font-family: 'DM Mono', monospace;
  font-size: .8rem;
  color: var(--mid);
}


/* ── BULLET LIST — BOXED (bordered rows) ───────────────────────────── */

.proj-list--boxed {
  list-style: none;
  margin: 1rem 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: var(--line);
}

.proj-list--boxed li {
  font-family: 'DM Serif Display', serif;
  font-size: .98rem;
  line-height: 1.65;
  color: #222;
  padding: .9rem 1.5rem .9rem 3.5rem;
  border-bottom: var(--line-thin);
  position: relative;
}

.proj-list--boxed li:last-child {
  border-bottom: none;
}

.proj-list--boxed li::before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--black);
}


/* ── NUMBERED LIST — SIMPLE (inline mono numbers) ──────────────────── */

.proj-numbered--simple {
  list-style: none;
  margin: 1rem 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  counter-reset: proj-counter;
}

.proj-numbered--simple li {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #222;
  padding-left: 2.4rem;
  position: relative;
  counter-increment: proj-counter;
}

.proj-numbered--simple li::before {
  content: counter(proj-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--mid);
  top: .3rem;
}


/* ── NUMBERED LIST — BOXED (bordered rows with number column) ──────── */

.proj-numbered--boxed {
  list-style: none;
  margin: 1rem 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: var(--line);
  counter-reset: proj-counter;
}

.proj-numbered--boxed li {
  font-family: 'DM Serif Display', serif;
  font-size: .98rem;
  line-height: 1.65;
  color: #222;
  padding: .9rem 1.5rem .9rem 4.5rem;
  border-bottom: var(--line-thin);
  position: relative;
  counter-increment: proj-counter;
}

.proj-numbered--boxed li:last-child {
  border-bottom: none;
}

.proj-numbered--boxed li::before {
  content: counter(proj-counter, decimal-leading-zero);
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--mid);
}


/* ── NUMBERED LIST — NEXT (the "what's next" auto-number style) ─────── */
/* reuses .proj-next-list — no new CSS needed; rendered via same class */


/* ── IMAGE (real image with optional caption) ──────────────────────── */

.proj-image {
  margin: 2rem 0;
}

.proj-image img {
  width: 100%;
  display: block;
  border: var(--line);
}

.proj-image-caption {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  line-height: 1.5;
  color: var(--mid);
  padding-top: .75rem;
  border-top: var(--line-thin);
  margin-top: .75rem;
}

.proj-image-caption strong {
  color: var(--black);
  font-weight: 700;
}


/* ── GALLERY (horizontal scroll) ───────────────────────────────────── */

.proj-gallery {
  margin: 2rem 0;
}

.proj-gallery-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--mid) transparent;
}

.proj-gallery-track:focus-visible {
  outline: var(--line);
  outline-offset: 4px;
}

.proj-gallery-item {
  flex: 0 0 85%;
  margin: 0;
  scroll-snap-align: start;
}

.proj-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border: var(--line);
}

.proj-gallery-caption {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  line-height: 1.5;
  color: var(--mid);
  padding-top: .75rem;
}

.proj-gallery-caption strong {
  color: var(--black);
  font-weight: 700;
}

.proj-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  border-top: var(--line-thin);
}

.proj-gallery-count {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--mid);
}

.proj-gallery-current {
  color: var(--black);
  font-weight: 500;
}

.proj-gallery-buttons {
  display: flex;
  gap: .5rem;
}

.proj-gallery-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: var(--line);
  background: transparent;
  color: var(--black);
  font-family: 'DM Mono', monospace;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s, color .2s, opacity .2s;
}

.proj-gallery-btn:hover:not(:disabled) {
  background: var(--black);
  color: var(--white);
}

.proj-gallery-btn:disabled {
  opacity: .3;
  cursor: default;
}


/* ── RESPONSIVE ────────────────────────────────────────────────────── */

@media (max-width: 900px) {

  /* ── Header ── */
  .proj-header {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .proj-header-meta {
    border-right: none;
    border-bottom: var(--line);
    padding: 2rem 1.25rem;
    gap: 1.5rem;
  }

  .proj-header-title {
    padding: 2rem 1.25rem;
  }

  .proj-dot-cluster {
    display: none;
  }

  .proj-title {
    font-size: clamp(3rem, 13vw, 5rem);
    margin-bottom: 1.25rem;
  }

  .proj-tagline {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  /* ── TOC — hidden on mobile (hamburger menu serves this purpose) ── */
  .proj-toc {
    display: none;
  }

  /* ── Body layout — single column ── */
  .proj-body {
    grid-template-columns: 1fr;
  }

  .proj-sidebar {
    display: none;
  }

  /* ── Section headers ── */
  .proj-section-num {
    padding: 1rem 1rem;
    min-width: 52px;
  }

  .proj-section-title {
    padding: .55rem 1.25rem;
    font-size: clamp(1.8rem, 7vw, 2.8rem);
  }

  /* ── Content area ── */
  .proj-content {
    padding: 1.75rem 1.25rem;
    max-width: 100%;
  }

  .proj-content p {
    font-size: .98rem;
  }

  .proj-content p.lead {
    font-size: 1.05rem;
  }

  /* ── Stats callout — single column ── */
  .proj-callout-inner {
    grid-template-columns: 1fr !important;
  }

  .proj-stat {
    border-right: none;
    border-bottom: var(--line-thin);
    padding: 1.25rem 1.25rem;
  }

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

  /* ── Quote ── */
  .proj-quote {
    padding: 1.25rem 1.25rem;
  }

  /* ── Steps list — stack number above body ── */
  .proj-steps {
    margin: 1.25rem 0;
  }

  .proj-step {
    flex-direction: column;
  }

  .proj-step-num {
    border-right: none;
    border-bottom: var(--line-thin);
    padding: .75rem 1.25rem;
    font-size: 1.5rem;
    min-width: unset;
    width: 100%;
    text-align: left;
    justify-content: flex-start;
    align-self: auto;
  }

  .proj-step-body {
    padding: 1.25rem 1.25rem;
  }

  /* ── Code block — wraps naturally ── */
  .proj-code-block {
    margin: 1.25rem 0;
  }

  .proj-code-header {
    padding: .6rem 1rem;
  }

  .proj-code {
    padding: 1.25rem 1rem;
    overflow-x: hidden;
  }

  .proj-code code {
    font-size: .76rem;
    white-space: pre-wrap;
    word-break: break-all;
  }

  /* ── Images — scale to viewport ── */
  .proj-image img {
    width: 100%;
    height: auto;
  }

  .proj-figure-placeholder {
    aspect-ratio: 16 / 9;
  }

  .proj-gallery-item {
    flex-basis: 92%;
  }

  /* ── Table — text wraps, no horizontal scroll ── */
  .proj-table-wrap {
    margin: 1.25rem 0;
    overflow-x: hidden;
  }

  .proj-table th,
  .proj-table td {
    padding: .75rem .85rem;
    white-space: normal;
    word-break: break-word;
    font-size: .8rem;
  }

  /* ── Bullet lists ── */
  .proj-list--simple {
    margin: .75rem 0 1.25rem;
  }

  .proj-list--boxed {
    margin: .75rem 0 1.25rem;
  }

  .proj-list--boxed li {
    padding: .75rem 1rem .75rem 2.75rem;
  }

  .proj-list--boxed li::before {
    left: 1rem;
  }

  /* ── Numbered lists ── */
  .proj-numbered--simple {
    margin: .75rem 0 1.25rem;
  }

  .proj-numbered--simple li {
    padding-left: 2rem;
  }

  .proj-numbered--boxed {
    margin: .75rem 0 1.25rem;
  }

  .proj-numbered--boxed li {
    padding: .75rem 1rem .75rem 3.5rem;
  }

  .proj-numbered--boxed li::before {
    left: 1rem;
  }

  /* ── Next list ── */
  .proj-next-list {
    margin-top: 1rem;
  }

  .proj-next-list li {
    padding: .85rem 1rem .85rem 3.25rem;
  }

  .proj-next-list li::before {
    left: 1rem;
  }

  /* ── Challenges ── */
  .proj-challenges {
    margin: 1.25rem 0;
  }

  .proj-challenge {
    padding: 1.25rem 1.25rem;
  }

  .proj-challenge p {
    padding-left: 1.25rem;
  }

  /* ── Block title ── */
  .proj-block-title {
    margin-top: 1.25rem;
  }

  /* ── Footer ── */
  .proj-footer-inner {
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem 1.25rem;
    align-items: flex-start;
  }

  .proj-footer-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   project.css — Dark mode overrides
   ══════════════════════════════════════════════════════════════════════ */

/* ── text colours — all use !important to guarantee they beat
      hardcoded #222/#333/#444/#555 values regardless of specificity ── */
html[data-theme="dark"] .proj-tagline {
  color: #b8b8b0 !important;
}

html[data-theme="dark"] .proj-content p {
  color: #b8b8b0 !important;
}

html[data-theme="dark"] .proj-content p.lead {
  color: #d8d8d0 !important;
}

html[data-theme="dark"] .proj-quote {
  border-left-color: #e8e8e3;
}

html[data-theme="dark"] .proj-quote,
html[data-theme="dark"] .proj-quote p {
  color: #b8b8b0 !important;
}

html[data-theme="dark"] .proj-step-body p {
  color: #aaa !important;
}

html[data-theme="dark"] .proj-step-num {
  color: #383836;
}

html[data-theme="dark"] .proj-code-header {
  background: #272724;
}

html[data-theme="dark"] .proj-code {
  background: #161614;
}

html[data-theme="dark"] .proj-code code {
  color: #ccccc4;
}

html[data-theme="dark"] .proj-code .c {
  color: #555;
}

html[data-theme="dark"] .proj-figure-placeholder {
  background: #272724;
}

html[data-theme="dark"] .proj-figure-icon span {
  background: #484844;
}

html[data-theme="dark"] .proj-table th {
  background: #272724;
  color: #888 !important;
}

html[data-theme="dark"] .proj-table td {
  color: #b8b8b0 !important;
}

html[data-theme="dark"] .proj-challenge p {
  color: #aaa !important;
}

html[data-theme="dark"] .proj-list--simple li {
  color: #b8b8b0 !important;
}

html[data-theme="dark"] .proj-list--boxed li {
  color: #b8b8b0 !important;
}

html[data-theme="dark"] .proj-numbered--simple li {
  color: #b8b8b0 !important;
}

html[data-theme="dark"] .proj-numbered--boxed li {
  color: #b8b8b0 !important;
}

html[data-theme="dark"] .proj-next-list li {
  color: #b8b8b0 !important;
}

html[data-theme="dark"] .proj-stat-num {
  color: #e8e8e3;
}

html[data-theme="dark"] .proj-block-title {
  color: #777 !important;
}

html[data-theme="dark"] .proj-toc {
  background: #1c1c1a;
}

html[data-theme="dark"] .proj-toc-links {
  background: #1c1c1a;
}

html[data-theme="dark"] .proj-sidebar {
  background: #1c1c1a;
}