:root {
  --cream: #f4ead4;
  --cream-2: #ece0c4;
  --card: #faf4e6;
  --navy: #1c3a53;
  --navy-2: #16324a;
  --navy-soft: rgba(28, 58, 83, 0.55);
  --navy-faint: rgba(28, 58, 83, 0.12);
  --accent: #b5502e;
  --serif: "Bitter", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Deliberately repeats the light palette. Some mobile browsers (Samsung
   Internet in particular) auto-invert/darken any page that has no dark-mode
   CSS at all, ignoring the color-scheme meta tag. Declaring this block as a
   no-op tells them the site already handles dark mode, so they leave it alone. */
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #f4ead4;
    --cream-2: #ece0c4;
    --card: #faf4e6;
    --navy: #1c3a53;
    --navy-2: #16324a;
    --navy-soft: rgba(28, 58, 83, 0.55);
    --navy-faint: rgba(28, 58, 83, 0.12);
    --accent: #b5502e;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: light;
  background: var(--cream);
}

body {
  margin: 0;
  background: var(--cream);
  background-image:
    radial-gradient(circle at 1px 1px, var(--navy-faint) 1px, transparent 0);
  background-size: 22px 22px;
  color: var(--navy);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 234, 212, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--navy-faint);
}

.header-inner {
  max-width: 840px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.06em;
}

.brand-sub {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-soft);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--navy-faint);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--navy-soft);
}

.filter-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}

/* ---------- Hero ---------- */

.hero {
  max-width: 640px;
  margin: 64px auto 40px;
  padding: 0 24px;
  text-align: center;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 44px);
  margin: 0 0 14px;
}

.hero p {
  color: var(--navy-soft);
  font-size: 18px;
  margin: 0;
}

/* ---------- Feed / timeline ---------- */

.feed {
  position: relative;
  max-width: 720px;
  margin: 0 auto 80px;
  padding: 0 24px 0 56px;
}

.rail {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 24px;
  width: 2px;
  background: linear-gradient(to bottom, var(--navy-faint), var(--navy-faint) 96%, transparent);
}

.entry {
  position: relative;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.entry.in-view {
  opacity: 1;
  transform: translateY(0);
}

.entry::before {
  content: "";
  position: absolute;
  left: -41px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--navy);
}

.entry-card {
  background: var(--card);
  border: 1px solid var(--navy-faint);
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 1px 0 rgba(28, 58, 83, 0.04);
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.entry-date {
  font-size: 13px;
  color: var(--navy-soft);
  letter-spacing: 0.02em;
}

.entry-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(181, 80, 46, 0.1);
  border-radius: 999px;
  padding: 3px 10px;
}

.entry-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 14px;
}

.entry-body p {
  margin: 0 0 14px;
  color: #2a4864;
  font-size: 17px;
}

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

.entry-body .entry-heading {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  color: var(--navy);
  margin: 28px 0 14px;
}

.entry-body .entry-heading:first-child {
  margin-top: 0;
}

.entry-body .inline-image {
  margin: 20px 0;
}

.entry-body .inline-image img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--navy-faint);
}

.entry-body .inline-image.natural img {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.entry-body .inline-image figcaption {
  font-size: 13px;
  color: var(--navy-soft);
  margin-top: 6px;
}

.entry-body .entry-list {
  margin: 0 0 14px;
  padding-left: 22px;
  color: #2a4864;
  font-size: 17px;
}

.entry-body .entry-list li {
  margin-bottom: 6px;
}

.cheer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.cheer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--sans);
  color: var(--navy);
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cheer-btn:hover:not(:disabled) {
  background: var(--navy-faint);
}

.cheer-btn.cheered {
  background: rgba(28, 58, 83, 0.08);
}

.cheer-btn:disabled {
  cursor: default;
}

.cheer-icon {
  font-size: 14px;
}

.cheer-count {
  font-size: 13px;
  color: var(--navy-soft);
  min-width: 1em;
}

.entry-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.entry-images figure {
  margin: 0;
}

.entry-images img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--navy-faint);
}

.entry-images figcaption {
  font-size: 12px;
  color: var(--navy-soft);
  margin-top: 6px;
}

.entry-images.single {
  grid-template-columns: 1fr;
}

.empty-state {
  text-align: center;
  color: var(--navy-soft);
  padding: 40px 0;
  font-size: 14px;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 40px 24px 60px;
  color: var(--navy-soft);
  font-size: 13px;
}

.footer-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.7;
  margin-bottom: 10px;
}

.site-footer a {
  color: var(--navy-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: var(--navy);
}

@media (max-width: 560px) {
  .hero { margin: 28px auto 20px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15px; }
  .feed { padding-left: 40px; }
  .rail { left: 16px; }
  .entry::before { left: -29px; }
  .entry-card { padding: 20px; }
}
