:root {
  --paper: #fff7dd;
  --paper-deep: #ffe9ad;
  --ink: #202020;
  --muted: #685f51;
  --accent: #24c9bc;
  --orange: #ff6b35;
  --pink: #ff7ac8;
  --blue: #4d7cff;
  --shadow: rgba(32, 32, 32, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 107, 53, 0.16), transparent 18rem),
    radial-gradient(circle at 86% 20%, rgba(36, 201, 188, 0.18), transparent 22rem),
    repeating-linear-gradient(0deg, rgba(32, 32, 32, 0.035) 0 1px, transparent 1px 28px),
    var(--paper);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(32, 32, 32, 0.11) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(32, 32, 32, 0.06) 1px, transparent 1.5px);
  background-position: 0 0, 13px 17px;
  background-size: 34px 34px;
  opacity: 0.34;
}

a {
  color: var(--ink);
  text-decoration-color: var(--orange);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  transition: transform 160ms ease, background-color 160ms ease;
}

.paper-edge {
  position: fixed;
  left: 0;
  right: 0;
  height: 16px;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(32, 32, 32, 0.12) 18px 21px);
}

.paper-edge-top {
  top: 0;
}

.paper-edge-bottom {
  bottom: 0;
}

.site-header,
.site-footer,
.site-main {
  width: min(1040px, calc(100% - 34px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 15px 18px;
  border: 4px solid var(--ink);
  border-radius: 22px 18px 26px 16px;
  background: rgba(255, 250, 230, 0.88);
  box-shadow: 8px 9px 0 var(--shadow);
  transform: rotate(-0.4deg);
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
}

.site-title img {
  width: 42px;
  height: 42px;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
}

.site-header nav a,
.hero-link,
.pagination a,
.post-source-link {
  display: inline-block;
  border: 3px solid var(--ink);
  border-radius: 999px 760px 820px 680px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 13px;
  box-shadow: 4px 5px 0 var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.site-header nav a:nth-child(2n) {
  transform: rotate(1.2deg);
}

.site-header nav a:hover,
.hero-link:hover,
.pagination a:hover,
.post-source-link:hover {
  background: var(--accent);
  transform: translate(-2px, -2px) rotate(-1deg);
}

.site-main {
  padding: 62px 0;
}

.hero {
  position: relative;
  min-height: 470px;
  padding: clamp(28px, 6vw, 66px);
  margin-bottom: 46px;
  border: 5px solid var(--ink);
  border-radius: 36px 24px 42px 28px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(255, 233, 173, 0.62)),
    var(--paper-deep);
  box-shadow: 13px 15px 0 var(--ink);
  overflow: hidden;
  transform: rotate(0.35deg);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border: 4px solid var(--ink);
  border-radius: 54% 46% 61% 39%;
  pointer-events: none;
}

.hero::before {
  right: 14%;
  top: 42px;
  width: 90px;
  height: 62px;
  background: var(--pink);
  transform: rotate(16deg);
}

.hero::after {
  right: 5%;
  bottom: 38px;
  width: 138px;
  height: 92px;
  background: var(--accent);
  transform: rotate(-9deg);
}

.hero-doodle {
  position: absolute;
  right: 5%;
  bottom: 24px;
  width: min(42vw, 410px);
  opacity: 0.94;
  transform: rotate(-3deg);
}

.eyebrow,
.section-kicker,
.post-date {
  margin: 0 0 12px;
  color: var(--orange);
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 650px;
  margin: 0 0 16px;
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
}

.hero p {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.hero-link {
  margin-top: 28px;
  background: var(--orange);
}

.section-kicker {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 6px 10px;
  border-bottom: 4px dashed var(--ink);
}

.post-card,
.empty-state {
  position: relative;
  margin: 24px 0;
  padding: 25px;
  border: 4px solid var(--ink);
  border-radius: 25px 34px 22px 38px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 8px 9px 0 var(--shadow);
}

.post-card:nth-child(2n) {
  transform: rotate(-0.45deg);
}

.post-card:nth-child(2n + 1) {
  transform: rotate(0.35deg);
}

.post-card::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 18px;
  width: 74px;
  height: 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--accent);
  transform: rotate(-8deg);
}

.post-card h2,
.empty-state h2 {
  max-width: 780px;
  margin: 8px 0 10px;
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.post-card p,
.empty-state p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.empty-state img {
  width: 170px;
  margin-bottom: 8px;
  transform: rotate(-8deg);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 30px;
  border-top: 4px dashed var(--ink);
}

.post-header {
  position: relative;
  padding: 10px 180px 30px 0;
  margin-bottom: 34px;
  border-bottom: 4px dashed var(--ink);
}

.post-header h1 {
  margin: 8px 0 14px;
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1;
}

.post-description {
  color: var(--muted);
  font-size: 20px;
}

.post-source-link {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  transform: rotate(2deg);
}

.post-content {
  max-width: 760px;
  font-size: 18px;
}

.post-content h2 {
  margin-top: 42px;
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-size: 34px;
  line-height: 1.12;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border: 5px solid var(--ink);
  border-radius: 26px 20px 34px 18px;
  box-shadow: 8px 10px 0 var(--shadow);
  transform: rotate(-0.6deg);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 48px;
  border-top: 4px dashed var(--ink);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 720px) {
  .site-header,
  .site-footer,
  .section-kicker,
  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 0;
  }

  .hero-doodle {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 26px;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  .post-header {
    padding: 0 0 30px;
  }

  .post-source-link {
    position: static;
    margin-bottom: 16px;
  }
}

.zine-rail {
  position: fixed;
  top: 132px;
  left: max(14px, calc((100vw - 1180px) / 2));
  z-index: 1;
  display: grid;
  gap: 14px;
  pointer-events: none;
}

.zine-rail span {
  display: inline-block;
  padding: 6px 10px;
  border: 3px solid var(--ink);
  border-radius: 14px 18px 12px 20px;
  background: var(--pink);
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-weight: 900;
  transform: rotate(-8deg);
}

.zine-rail span:nth-child(2) {
  background: var(--accent);
  transform: rotate(7deg);
}

.zine-rail span:nth-child(3) {
  background: var(--orange);
  transform: rotate(-3deg);
}

.zine-stage {
  width: min(1120px, calc(100% - 34px));
}

.zine-cover {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(260px, 0.72fr);
  gap: clamp(24px, 6vw, 64px);
  align-items: center;
  margin-bottom: 44px;
}

.cover-copy {
  position: relative;
  padding: clamp(28px, 6vw, 66px);
  border: 5px solid var(--ink);
  border-radius: 36px 24px 42px 28px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(255, 233, 173, 0.62)),
    var(--paper-deep);
  box-shadow: 13px 15px 0 var(--ink);
  transform: rotate(0.55deg);
}

.cover-copy::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: 32px;
  width: 130px;
  height: 82px;
  border: 4px solid var(--ink);
  border-radius: 51% 49% 61% 39%;
  background: var(--accent);
  transform: rotate(-10deg);
}

.cover-copy h1 {
  max-width: 720px;
  margin: 0 0 16px;
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
}

.cover-copy p:not(.eyebrow) {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.cover-art {
  margin: 0;
  padding: 18px;
  border: 4px solid var(--ink);
  border-radius: 22px 32px 20px 38px;
  background: #fff;
  box-shadow: 10px 12px 0 var(--shadow);
  transform: rotate(-2.3deg);
}

.cover-art img {
  display: block;
  width: 100%;
}

.cover-art figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-weight: 800;
}

.zine-layout {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: start;
}

.zine-sidebar {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 4px dashed var(--ink);
  border-radius: 28px 20px 32px 18px;
  background: rgba(255, 255, 255, 0.7);
  transform: rotate(-1.5deg);
}

.zine-sidebar strong {
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-size: 28px;
  line-height: 1;
}

.zine-feed {
  display: grid;
  gap: 22px;
}

.zine-note {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 18px;
  margin: 0;
}

.note-number {
  align-self: start;
  display: grid;
  min-height: 72px;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-deep);
  box-shadow: 5px 6px 0 var(--ink);
  font-family: "Comic Sans MS", "Marker Felt", "Bradley Hand", cursive;
  font-weight: 900;
  text-decoration: none;
}

.zine-empty {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
}

.zine-article {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 48px);
  background: transparent;
  box-shadow: none;
}

.article-meta-card,
.article-sheet {
  border: 4px solid var(--ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 8px 9px 0 var(--shadow);
}

.article-meta-card {
  align-self: start;
  position: sticky;
  top: 28px;
  padding: 18px;
  border-radius: 24px 18px 30px 20px;
  transform: rotate(-1.7deg);
}

.article-meta-card .post-source-link {
  position: static;
  margin-bottom: 18px;
}

.article-sheet {
  padding: clamp(24px, 5vw, 56px);
  border-radius: 26px 34px 22px 38px;
}

@media (max-width: 860px) {
  .zine-rail {
    display: none;
  }

  .zine-cover,
  .zine-layout,
  .zine-article,
  .zine-empty {
    grid-template-columns: 1fr;
  }

  .zine-sidebar,
  .article-meta-card {
    position: static;
  }

  .zine-note {
    grid-template-columns: 1fr;
  }
}
