:root {
  --paper: #f6f1e8;
  --ink: #1c1915;
  --muted: #6b645b;
  --line: rgba(28, 25, 21, 0.12);
  --accent: #c45c26;
  font-family: "Source Serif 4", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #111;
  color: var(--ink);
}

body.blog-page {
  overflow: hidden;
}

body.admin-page {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  background: var(--paper);
}

a {
  color: inherit;
}

.feed {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.page {
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.media {
  height: 40%;
  background: #1a1612;
  overflow: hidden;
  position: relative;
}

.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.media.empty {
  display: grid;
  place-items: center;
  color: #d7cfc3;
  font-family: "Source Sans 3", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.copy {
  height: 60%;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.25rem, 6vw, 8rem);
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.copy header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.15;
  font-weight: 600;
}

.copy p {
  margin: 0 0 1rem;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  max-width: 42rem;
  white-space: pre-wrap;
}

.nav-hint {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 5;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(28, 25, 21, 0.72);
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  pointer-events: none;
}

.empty-feed {
  height: 100vh;
  display: grid;
  place-items: center;
  background: var(--paper);
  text-align: center;
  padding: 2rem;
}

.empty-feed h1 {
  margin: 0 0 0.75rem;
}

.admin {
  min-height: 100vh;
  background: var(--paper);
  padding: 2rem 1.25rem 4rem;
}

.admin-wrap {
  max-width: 40rem;
  margin: 0 auto;
}

.admin h1 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
}

.admin .lede {
  color: var(--muted);
  margin: 0 0 2rem;
  font-family: "Source Sans 3", system-ui, sans-serif;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-top button {
  margin-top: 0;
}

.admin label {
  display: block;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.1rem 0 0.4rem;
}

.admin input,
.admin textarea,
.admin select {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  border-radius: 8px;
}

.admin textarea {
  min-height: 12rem;
  resize: vertical;
  line-height: 1.5;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

button {
  font-family: "Source Sans 3", system-ui, sans-serif;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 1.4rem;
}

button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.status {
  min-height: 1.4rem;
  margin-top: 0.75rem;
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--accent);
}

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

.existing h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.post-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-family: "Source Sans 3", system-ui, sans-serif;
}

.post-row button {
  margin: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .row {
    grid-template-columns: 1fr;
  }

  .copy {
    justify-content: flex-start;
  }
}
