:root {
  --paper: #f4efe6;
  --paper-2: #fffaf4;
  --paper-3: #efe7da;
  --ink: #191512;
  --muted: #63584e;
  --line: rgba(34, 26, 21, 0.12);
  --line-strong: rgba(34, 26, 21, 0.18);
  --accent: #b7472d;
  --accent-2: #256d78;
  --accent-3: #c9a45d;
  --accent-4: #7f5b9a;
  --shadow: 0 24px 70px rgba(34, 26, 21, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1280px;
  --font-head: Georgia, "Times New Roman", serif;
  --font-body: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-ui: "Arial Narrow", Arial, Helvetica, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 12% 12%, rgba(183, 71, 45, 0.10), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(37, 109, 120, 0.12), transparent 20%),
    linear-gradient(180deg, #fbf7f0 0%, #f2eadf 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, rgba(183, 71, 45, 0.02), rgba(37, 109, 120, 0.02)),
    var(--paper);
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }

.site-shell {
  width: 100%;
}

.page-width {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(251, 247, 240, 0.84);
  border-bottom: 1px solid rgba(34, 26, 21, 0.08);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 54px;
  height: 54px;
  flex: none;
  filter: drop-shadow(0 12px 18px rgba(34, 26, 21, 0.10));
}

.brand-name {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.brand-tag {
  margin: 4px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.nav-link {
  color: var(--muted);
  border-color: rgba(34, 26, 21, 0.10);
  background: rgba(255, 255, 255, 0.66);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #d25f3c);
  box-shadow: 0 16px 30px rgba(183, 71, 45, 0.22);
}

.nav-link:hover,
.button:hover {
  transform: translateY(-1px);
}

.hero {
  padding: 48px 0 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(183, 71, 45, 0.08);
  border: 1px solid rgba(183, 71, 45, 0.14);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 5px rgba(37, 109, 120, 0.12);
}

.hero h1,
.article-title,
.template-title {
  margin: 14px 0 10px;
  font-family: var(--font-head);
  font-size: clamp(2.35rem, 4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy {
  max-width: 70ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 16px 0 54px;
}

.post-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 26, 21, 0.18);
  box-shadow: 0 26px 80px rgba(34, 26, 21, 0.16);
}

.comic-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, #e9e2d5, #f7f1e7);
  overflow: hidden;
}

.comic-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-title {
  margin: 0;
  padding: 18px 20px 20px;
  font-family: var(--font-head);
  font-size: clamp(1.22rem, 1.8vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.post-title span {
  display: inline;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  transition: background-size 160ms ease;
}

.post-card:hover .post-title span,
.post-card:focus-visible .post-title span {
  background-size: 100% 2px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
  padding: 30px 0 66px;
}

.article-hero {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.article-hero .comic-frame {
  aspect-ratio: 16 / 8.8;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.article-copy {
  padding-top: 20px;
}

.article-copy p,
.article-copy li {
  font-size: 1.02rem;
  color: #28211d;
}

.article-copy h2 {
  margin: 28px 0 10px;
  font-family: var(--font-head);
  font-size: 1.45rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.article-copy p {
  margin: 0 0 16px;
}

.article-copy ul {
  margin: 0 0 16px 20px;
  padding: 0;
}

.article-copy blockquote {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: rgba(183, 71, 45, 0.06);
  color: #372f2a;
  font-family: var(--font-head);
  font-size: 1.08rem;
}

.sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 44px rgba(34, 26, 21, 0.08);
}

.panel h2,
.panel h3 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  letter-spacing: -0.03em;
}

.panel p {
  margin: 0;
  color: var(--muted);
}

.ad-slot {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 20px;
  border-style: dashed;
  border-color: rgba(34, 26, 21, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.70));
}

.ad-slot .slot-label {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 109, 120, 0.08);
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.promo-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.promo-list a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(34, 26, 21, 0.10);
  background: rgba(255, 255, 255, 0.72);
}

.promo-list strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-ui);
}

.site-footer {
  border-top: 1px solid rgba(34, 26, 21, 0.08);
  background: rgba(255, 250, 244, 0.68);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 0 26px;
}

.footer-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
}

.template-grid {
  display: grid;
  gap: 18px;
  padding: 16px 0 62px;
}

.template-card {
  padding: 20px;
  border: 1px dashed rgba(34, 26, 21, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.template-card code {
  display: block;
  margin-top: 12px;
  padding: 18px;
  overflow-x: auto;
  border-radius: 16px;
  background: rgba(24, 20, 18, 0.95);
  color: #f7f1e7;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding-top: 30px;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .brand-tag {
    letter-spacing: 0.08em;
  }
}
