body {
  width: 100vw;
  height: max-content;
}

/* ── BACK NAV ── */
.back-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, gap .2s;
  font-size: 0.7rem;
}

.back-link:hover {
  color: var(--accent);
  gap: 12px;
}

.back-link svg {
  transition: transform .2s;
}

.back-link:hover svg {
  transform: translateX(-3px);
}

/* ── PROJECT HERO ── */
.project-hero {
  height: max-content;
  display: flex;
  padding-top: 10px;
  border-bottom: 1px solid var(--border);
  padding-top: 48px;
}

@media (min-width: 768px) {
  .project-hero {
    padding-top: 80px;
  }
}

.project-hero-inner {
  width: 100%;
}

.project-eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.project-title {
  font-family: var(--mono);
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}

.project-summary {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 28px;
  width: 100%;
}

.project-summary strong {
  color: var(--text);
}

.project-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 90%;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--text);
  padding: 10px 22px;
  text-decoration: none;
  border: 1.5px solid var(--text);
  transition: background .2s, border-color .2s;
  margin: 10px auto;
}

.project-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* ── VIZ CAROUSEL ── */
.viz-carousel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: 6/5;
  display: flex;
  flex-direction: column;
}

.viz-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.viz-tab {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--muted);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}

.viz-tab:hover {
  color: var(--text);
}

.viz-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.viz-panels {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.viz-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  padding: 20px;
}

.viz-panel.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 100;
}

.viz-panel iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.viz-caption {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .06em;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}



/* ── CONTENT SECTIONS ── */
.subpage-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.subpage-section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 32px;
}

.section-body {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 20px;
}

.section-body span {
  color: var(--text);
  font-weight: 600;
  background: linear-gradient(180deg, transparent 60%, hsla(11, 62%, 48%, 0.656) 30%);
}

.section-body a {
  color: var(--accent);
  text-decoration: none;
  transition: text-decoration .2s;
}

.section-body a:hover {
  text-decoration: underline 2px var(--accent);
}

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

/* ── METHODOLOGY ── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}

.method-item {
  background: var(--bg);
  padding: 24px;
}

.method-number {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -.03em;
}

.method-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.method-desc {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.method-desc strong {
  color: var(--text);
}


/* ── CODE BLOCK ── */
.code-block {
  background: var(--text);
  padding: 20px 24px;
  margin: 24px auto;
  overflow-x: auto;
  width: 60%;
  max-width: 500px;
}

.code-block pre {
  font-family: var(--mono);
  font-size: 12px;
  color: #E8E4DC;
  line-height: 1.7;
  margin: 0;
}

.code-block .code-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}


/* ── NOTEBOOK SCREENSHOT ── */
.notebook-img {
  width: 100%;
  border: 1px solid var(--border);
  display: block;
  margin: 24px 0;
}

/* ── SUBPAGE FOOTER NAV ── */
.subpage-footer-nav {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-nav-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.footer-nav-title {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}

.footer-nav-title:hover {
  color: var(--accent);
}