:root {
  --bg: #f5efe6;
  --surface: rgba(255, 250, 244, 0.82);
  --surface-strong: #fffaf4;
  --text: #1f1a17;
  --muted: #6a5e57;
  --accent: #c96f3b;
  --accent-dark: #8f4722;
  --border: rgba(31, 26, 23, 0.12);
  --shadow: 0 24px 60px rgba(81, 47, 26, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(242, 179, 107, 0.28), transparent 30%),
    radial-gradient(circle at right center, rgba(176, 120, 78, 0.16), transparent 28%),
    linear-gradient(180deg, #f8f1e8 0%, #f1e6d7 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(31, 26, 23, 0.08);
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 32px;
}

.admin-header {
  align-items: center;
}

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

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 0.88rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #d9814f, #b55727);
  color: white;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.main-nav {
  display: inline-flex;
  gap: 28px;
  color: var(--muted);
}

.main-nav a:hover,
.story-card a:hover,
.secondary-link:hover,
.sidebar-card a:hover,
.post-nav-link:hover {
  color: var(--accent-dark);
}

.card-link {
  display: block;
}

.nav-button,
.subscribe-form button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  padding: 14px 20px;
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-button:hover,
.subscribe-form button:hover,
.primary-link:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: stretch;
  padding: 32px 0 48px;
}

.eyebrow,
.section-tag,
.card-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.hero h1,
.section-heading h2,
.about-copy h2,
.contact-section h2 {
  margin: 14px 0 16px;
  font-family: "Fraunces", serif;
  font-weight: 700;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.4rem);
  max-width: 9.5ch;
}

.hero-text,
.section-intro,
.about-copy p,
.story-card p,
.hero-card p,
.highlight-block p,
.contact-section p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  padding: 14px 8px;
  color: var(--muted);
  font-weight: 600;
}

.hero-card,
.story-card,
.about-panel,
.contact-section,
.highlight-block,
.post-summary-card,
.post-content,
.sidebar-card,
.post-nav-link {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(18px);
}

.hero-card {
  border-radius: 32px;
  padding: 28px;
  align-self: end;
}

.hero-card:hover,
.highlight-block:hover,
.story-card:hover {
  transform: translateY(-4px);
}

.hero-card h2 {
  margin: 16px 0 14px;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  line-height: 1.15;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 70px;
}

.highlight-block {
  border-radius: 26px;
  padding: 24px;
  min-height: 220px;
}

.highlight-block h3 {
  margin: 40px 0 12px;
  font-size: 1.5rem;
}

.active-filter {
  outline: 2px solid rgba(143, 71, 34, 0.32);
}

.sunrise {
  background:
    linear-gradient(180deg, rgba(255, 244, 230, 0.92), rgba(255, 231, 213, 0.9)),
    var(--surface);
}

.paper {
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.95), rgba(241, 229, 214, 0.9)),
    var(--surface);
}

.ink {
  background:
    linear-gradient(180deg, rgba(253, 242, 232, 0.95), rgba(229, 216, 203, 0.9)),
    var(--surface);
}

.stories-section,
.about-section {
  margin-bottom: 72px;
}

.section-heading,
.about-section {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.stories-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 20px;
  background: rgba(255, 250, 244, 0.78);
  border: 1px solid var(--border);
}

.filter-bar a {
  font-weight: 700;
  color: var(--accent-dark);
}

.story-card {
  border-radius: 28px;
  padding: 24px;
}

.story-card.featured {
  background: linear-gradient(180deg, rgba(211, 120, 67, 0.96), rgba(159, 74, 39, 0.96));
  color: #fff7ef;
}

.story-card.featured p,
.story-card.featured a,
.story-card.featured .story-index {
  color: rgba(255, 247, 239, 0.88);
}

.story-card h3 {
  margin: 34px 0 12px;
  font-size: 1.6rem;
  line-height: 1.2;
}

.story-index {
  color: var(--accent-dark);
  font-weight: 700;
}

.story-card a {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent-dark);
  font-weight: 700;
}

.read-more {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent-dark);
  font-weight: 700;
}

.about-panel {
  display: grid;
  gap: 18px;
  border-radius: 32px;
  padding: 26px;
}

.metric {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.metric:last-child {
  border-bottom: none;
}

.metric strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 2.4rem;
}

.metric span {
  color: var(--muted);
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  border-radius: 32px;
  padding: 30px;
  margin-bottom: 40px;
}

.contact-section-disabled {
  opacity: 0.6;
}

.contact-section-disabled .subscribe-form {
  pointer-events: none;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 24px;
}

.auth-panel,
.admin-hero,
.admin-table-wrap,
.editor-card {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 30px;
  opacity: 0;
  transform: translateY(18px);
}

.auth-copy,
.auth-form-wrap,
.admin-hero,
.admin-table-wrap,
.editor-card {
  padding: 30px;
}

.auth-copy h1,
.admin-hero h1,
.auth-form-wrap h2 {
  margin: 10px 0 14px;
  font-family: "Fraunces", serif;
  line-height: 1.08;
}

.editor-intro {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.admin-page {
  display: grid;
  gap: 22px;
}

.admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  font: inherit;
  color: var(--text);
}

.admin-form textarea {
  resize: vertical;
  min-height: 120px;
}

#content {
  min-height: 560px;
}

#excerpt {
  min-height: 120px;
}

.auth-submit {
  margin-top: 8px;
}

.alert {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.alert.success {
  background: rgba(108, 154, 112, 0.12);
  border-color: rgba(108, 154, 112, 0.22);
}

.alert.error {
  background: rgba(188, 94, 78, 0.12);
  border-color: rgba(188, 94, 78, 0.22);
}

.admin-list {
  display: grid;
  gap: 14px;
}

.admin-list-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.admin-list-item:last-child {
  border-bottom: none;
}

.admin-list-item strong {
  display: block;
  margin-bottom: 8px;
}

.admin-list-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.admin-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 110px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 26, 23, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-pill.published {
  background: rgba(108, 154, 112, 0.16);
}

.status-pill.draft {
  background: rgba(201, 111, 59, 0.16);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 320px);
  gap: 28px;
  align-items: start;
}

.editor-main,
.editor-side {
  display: grid;
  gap: 14px;
}

.editor-main {
  min-width: 0;
}

.editor-side {
  position: sticky;
  top: 24px;
}

.editor-side-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.72);
}

.editor-side-title {
  margin: 0 0 4px;
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
}

.editor-submit {
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
}

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

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

.subscribe-form input {
  min-width: 290px;
  padding: 15px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  font: inherit;
}

.subscribe-form input:disabled,
.subscribe-form button:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.single-page {
  padding-bottom: 36px;
}

.single-header {
  padding-bottom: 20px;
}

.single-back {
  display: inline-flex;
  align-items: center;
}

.post-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  margin: 18px 0 30px;
}

.post-hero h1,
.post-content h2,
.sidebar-card h3,
.post-nav-link strong {
  font-family: "Fraunces", serif;
}

.post-hero h1 {
  margin: 10px 0 16px;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  line-height: 1.05;
  max-width: 10ch;
}

.post-dek,
.summary-list,
.post-meta,
.post-content p,
.sidebar-card p {
  color: var(--muted);
  line-height: 1.8;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  font-size: 0.95rem;
}

.post-summary-card,
.post-content,
.sidebar-card,
.post-nav-link {
  border-radius: 30px;
}

.post-summary-card {
  padding: 24px;
  align-self: end;
}

.summary-list {
  margin: 18px 0 0;
  padding-left: 20px;
}

.summary-list li + li {
  margin-top: 12px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 320px;
  gap: 22px;
  align-items: start;
}

.post-content {
  padding: 26px;
}

.post-cover {
  display: flex;
  align-items: end;
  min-height: 340px;
  margin-bottom: 30px;
  padding: 24px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(241, 190, 143, 0.18), rgba(160, 92, 51, 0.54)),
    radial-gradient(circle at top left, rgba(255, 243, 228, 0.94), transparent 32%),
    linear-gradient(135deg, #d89b6b, #8f4e2c);
}

.cover-stamp {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.18);
  color: #fffaf4;
  border: 1px solid rgba(255, 250, 244, 0.24);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.lead {
  font-size: 1.14rem;
  color: var(--text) !important;
}

.post-content h2 {
  margin: 32px 0 12px;
  font-size: 2rem;
  line-height: 1.15;
}

.post-content blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 250, 244, 0.72);
  border-radius: 18px;
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  line-height: 1.6;
}

.inline-note {
  margin: 28px 0;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(217, 129, 79, 0.12);
  border: 1px solid rgba(201, 111, 59, 0.18);
  line-height: 1.75;
}

.post-sidebar {
  display: grid;
  gap: 18px;
}

.sidebar-card {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.sidebar-card a {
  font-weight: 600;
  color: var(--text);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 26px;
}

.post-nav-link {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.post-nav-link.accent {
  background: linear-gradient(180deg, rgba(243, 226, 207, 0.95), rgba(230, 205, 182, 0.9));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-visible {
  animation: rise 700ms ease forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .highlight-grid,
  .section-heading,
  .stories-grid,
  .about-section,
  .contact-section,
  .auth-layout,
  .post-hero,
  .post-layout,
  .post-nav,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none;
  }

  .contact-section {
    padding: 24px;
  }

  .subscribe-form {
    flex-direction: column;
    align-items: stretch;
  }

  .subscribe-form input {
    min-width: 0;
  }

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

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-hero,
  .admin-list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-meta {
    justify-items: start;
  }

  .editor-side {
    position: static;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 18px;
  }

  .site-header {
    flex-wrap: wrap;
    padding-bottom: 18px;
  }

  .hero {
    padding-top: 18px;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-card,
  .story-card,
  .highlight-block,
  .about-panel,
  .contact-section,
  .auth-panel,
  .admin-hero,
  .admin-table-wrap,
  .editor-card,
  .post-summary-card,
  .post-content,
  .sidebar-card,
  .post-nav-link {
    border-radius: 24px;
  }

  .nav-button,
  .primary-link,
  .subscribe-form button {
    width: 100%;
    text-align: center;
  }

  .post-content {
    padding: 20px;
  }

  .post-cover {
    min-height: 240px;
  }

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

  #content {
    min-height: 380px;
  }

  .editor-side-card {
    padding: 18px;
  }
}
