:root {
  --surface: #ffffff;
  --panel: #f5f5dc;
  --text: #333333;
  --muted: #6b6b5f;
  --accent: #000080;
  --accent-hover: #00006a;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius: 0.5rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.5rem;
  --section-gap: clamp(4rem, 8vw, 8rem);
  font-family: "Lora", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: "Lora", Georgia, serif;
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--accent);
  transition: color 200ms ease-out, box-shadow 200ms ease-out, transform 200ms ease-out;
}

a:hover {
  color: var(--accent-hover);
}

code,
pre,
.post-meta,
.eyebrow,
.post-nav-label,
.tag-count {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.container {
  width: min(1280px, calc(100vw - 3rem));
  margin: 0 auto;
  padding: var(--space-3) 0 var(--section-gap);
}

.page-stack {
  display: grid;
  gap: var(--section-gap);
}

header.site-header {
  display: grid;
  gap: var(--space-2);
  justify-content: space-between;
  align-items: flex-end;
  grid-template-columns: minmax(0, 1fr) auto;
}

nav {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.site-title {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
}

.nav-link {
  position: relative;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1px;
  background: transparent;
  transition: background-color 200ms ease-out, opacity 200ms ease-out;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  background: var(--accent);
}

.nav-link.is-active {
  color: var(--accent);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.post-list,
.year-group {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li,
.year-group li {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child,
.year-group li:last-child {
  border-bottom: none;
}

.post-list a,
.year-group a {
  color: var(--text);
  text-decoration: none;
}

.post-list a:hover,
.year-group a:hover {
  color: var(--accent);
}

.post-meta,
.eyebrow {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--card-shadow);
}

.content > :first-child,
.panel > :first-child {
  margin-top: 0;
}

.content > :last-child,
.panel > :last-child {
  margin-bottom: 0;
}

.content h1,
.content h2,
.section-title {
  line-height: 1.2;
}

.content h1 {
  margin: 0 0 var(--space-2);
  font-size: 2.25rem;
}

.content h2,
.section-title {
  margin: 0 0 var(--space-2);
  font-size: 1.5rem;
}

.content p,
.content ul,
.content ol,
.content blockquote,
.content pre {
  max-width: 72ch;
  line-height: 1.6;
}

.content blockquote {
  margin-left: 0;
  padding-left: var(--space-2);
  border-left: 1px solid var(--border);
}

.content pre {
  overflow-x: auto;
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #faf8ef;
  box-shadow: var(--shadow);
}

.content code {
  font-size: 0.95em;
}

.media-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-2);
  padding: 0;
  list-style: none;
  max-width: none;
}

.media-list a {
  display: block;
  min-height: 100%;
  padding: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.media-list a:hover,
.post-tags a:hover,
.tag-cloud a:hover {
  box-shadow: var(--card-shadow);
  transform: translateY(-1px);
}

.post-nav a:hover {
  color: var(--accent);
}

footer {
  color: var(--muted);
  font-size: 0.875rem;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}

.post-nav a {
  display: block;
  padding: var(--space-2);
  color: var(--text);
  text-decoration: none;
  max-width: 45%;
}

.post-nav-label {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.post-nav .post-nav-title {
  font-weight: 600;
}

.post-tags {
  margin: 0;
  font-size: 1rem;
}

.post-tags a {
  display: inline-block;
  margin: 0 var(--space-1) var(--space-1) 0;
  padding: 0.25rem 0.75rem;
  color: var(--text);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.tag-cloud {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.tag-cloud li {
  min-width: 0;
}

.tag-cloud a {
  display: flex;
  justify-content: space-between;
  gap: var(--space-1);
  padding: var(--space-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.tag-cloud .tag-count {
  color: var(--muted);
  font-size: 0.875rem;
}

.section-stack {
  display: grid;
  gap: var(--space-3);
}

.section-title {
  padding: var(--space-3) var(--space-3) 0;
}

.section-caption {
  margin: 0 0 var(--space-3);
}

.post-hero-link {
  margin: 0 0 var(--space-3);
}

.fade-rise,
.panel,
.content,
.post-list li,
.year-group li,
.tag-cloud li,
.media-list li {
  animation: fade-rise 420ms ease-out both;
}

.post-list li:nth-child(2),
.year-group li:nth-child(2),
.tag-cloud li:nth-child(2),
.media-list li:nth-child(2) {
  animation-delay: 80ms;
}

.post-list li:nth-child(3),
.year-group li:nth-child(3),
.tag-cloud li:nth-child(3),
.media-list li:nth-child(3) {
  animation-delay: 160ms;
}

.post-list li:nth-child(4),
.year-group li:nth-child(4),
.tag-cloud li:nth-child(4),
.media-list li:nth-child(4) {
  animation-delay: 240ms;
}

.post-list li:nth-child(5),
.year-group li:nth-child(5),
.tag-cloud li:nth-child(5),
.media-list li:nth-child(5) {
  animation-delay: 320ms;
}

.prototype-shell {
  gap: var(--section-gap);
}

.prototype-hero,
.prototype-columns {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.hero-copy,
.hero-visual,
.prototype-sidebars,
.gallery-card,
.archive-strip {
  min-width: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.button-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.button-link {
  color: var(--surface);
  background: var(--accent);
  border-color: var(--accent);
}

.button-link:hover {
  color: var(--surface);
  background: var(--accent-hover);
}

.button-link:active,
.ghost-link:active {
  transform: translateY(1px);
}

.ghost-link {
  color: var(--text);
  background: var(--surface);
}

.prototype-metrics,
.prototype-gallery,
.prototype-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.prototype-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.prototype-metrics li,
.prototype-summary-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-1);
}

.prototype-metrics li {
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.prototype-metrics strong {
  font-size: 1.5rem;
  line-height: 1.2;
}

.hero-visual {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
}

.hero-visual-copy {
  max-width: 48ch;
}

.mock-photo {
  display: grid;
  align-content: end;
  gap: var(--space-1);
  min-height: 24rem;
  padding: var(--space-3);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  aspect-ratio: 4 / 5;
}

.mock-photo strong,
.gallery-title,
.prototype-section-title {
  font-size: 1.5rem;
  line-height: 1.2;
}

.mock-photo-label,
.mock-photo-meta {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.mock-photo-meta {
  color: var(--muted);
}

.prototype-gallery {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-card {
  overflow: hidden;
}

.gallery-link {
  display: grid;
  gap: var(--space-2);
  color: inherit;
  text-decoration: none;
}

.gallery-copy {
  padding: 0 var(--space-3) var(--space-3);
}

.gallery-copy p {
  margin-bottom: 0;
}

.archive-strip {
  padding-bottom: var(--space-3);
}

.prototype-summary-list {
  display: grid;
  gap: var(--space-2);
  padding: 0 var(--space-3);
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100vw - 1.5rem, 1280px);
    padding-top: var(--space-2);
  }

  header.site-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .prototype-hero,
  .prototype-columns,
  .prototype-gallery,
  .prototype-metrics {
    grid-template-columns: 1fr;
  }

  .content,
  .post-list li,
  .year-group li,
  .section-title,
  .post-nav a {
    padding: var(--space-2);
  }

  .post-nav {
    flex-direction: column;
  }

  .post-nav a {
    max-width: 100%;
  }
}
