:root {
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #78716c;
  --border: #e7e5e4;
  --card-bg: #ffffff;
  --accent: #292524;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / hero */
header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

header p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Site navigation */
.site-nav {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--fg);
}

/* Section titles */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

/* Essay list */
.essay-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

.essay-card {
  display: flex;
  gap: 1.5rem;
  text-decoration: none;
  color: inherit;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card-bg);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.essay-card:hover {
  border-color: var(--muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.essay-card img {
  width: 240px;
  height: 160px;
  object-fit: cover;
  border-radius: 0.375rem;
  flex-shrink: 0;
}

.essay-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.essay-card-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.essay-card-body time {
  font-size: 0.8125rem;
  color: var(--muted);
}

.essay-card-body p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}

/* Sightings — wall of evidence */
.wall-hero {
  max-width: 760px;
  margin: 0 0 2rem;
}

.wall-hero h2 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.wall-hero p {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.wall-tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #111;
  text-decoration: none;
}

.wall-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.wall-tile:hover .wall-img {
  transform: scale(1.05);
}

.wall-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.32) 38%,
    rgba(0, 0, 0, 0) 62%
  );
}

.wall-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 0.8rem 0.75rem;
  color: #fff;
}

.wall-outlet {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.wall-headline {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 0.78rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 0.2rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

.wall-tile:hover .wall-headline,
.wall-tile:focus-visible .wall-headline {
  max-height: 4.5em;
  opacity: 1;
}

@media (max-width: 900px) {
  .wall {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .wall {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .wall-hero h2 {
    font-size: 1.5rem;
  }
  /* No hover on touch: always reveal the headline. */
  .wall-headline {
    max-height: 4.5em;
    opacity: 1;
  }
}

/* Essay detail */
.essay {
  max-width: 720px;
  margin: 0 auto 3rem;
}

.essay-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.essay-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.essay-header time {
  font-size: 0.875rem;
  color: var(--muted);
}

.essay-author {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.essay-content img {
  width: 100%;
  border-radius: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}

.essay-content figure {
  margin: 1.5rem 0;
}

.essay-content figure img {
  margin: 0;
}

.essay-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.essay-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.essay-footer a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.essay-footer a:hover {
  color: var(--fg);
}

/* Site name links to home; render like plain header text. */
header h1 a {
  color: inherit;
  text-decoration: none;
}

/* Home masthead: bio merged into the header */
.masthead h1 {
  font-size: 1.1rem;
}

.masthead-bio {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.masthead-photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.masthead-tagline {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin-top: 0.35rem;
  max-width: 56ch;
}

.masthead-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.6rem;
}

.masthead-social a {
  font-size: 0.8125rem;
  font-weight: 600;
}

@media (max-width: 480px) {
  .masthead-bio {
    gap: 0.9rem;
  }
  .masthead-photo {
    width: 64px;
    height: 64px;
    align-self: flex-start;
  }
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--fg);
}

@media (max-width: 640px) {
  .essay-card {
    flex-direction: column;
  }

  .essay-card img {
    width: 100%;
    height: 200px;
  }
}
