:root {
  --bg: #f5f3ef;
  --surface: #fff;
  --ink: #171717;
  --muted: #68645f;
  --line: #d8d4cd;
  --accent: #8a4d35;
  --shadow: 0 16px 50px rgba(27, 24, 20, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #d6c2b5; color: var(--ink); }

a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

img { height: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(23, 23, 23, 0.12);
  background: rgba(245, 243, 239, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.admin-bar .site-header { top: 32px; }

.site-header__inner {
  min-height: 76px;
  padding: 0 24px;
}

.site-wordmark a {
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 780;
  letter-spacing: -0.055em;
}

.site-wordmark a::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.28em;
  border-radius: 50%;
  background: var(--accent);
}

.site-nav { font-size: 0.88rem; font-weight: 620; }
.site-nav .wp-block-navigation-item__content { text-decoration: none; }

.site-intro {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 4vw, 3.5rem) 24px 0;
  border-bottom: 0;
  background: var(--ink);
  color: var(--bg);
}

.site-intro::before {
  content: "";
  position: absolute;
  top: -13rem;
  right: -10rem;
  width: 32rem;
  height: 32rem;
  border: 1px solid rgba(245, 243, 239, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 5rem rgba(245, 243, 239, 0.025), 0 0 0 10rem rgba(245, 243, 239, 0.018);
  pointer-events: none;
}

.eyebrow,
.taxonomy-category a,
.wp-block-post-terms a {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.home-hero-grid {
  position: relative;
  z-index: 1;
  min-height: clamp(480px, 45vw, 560px);
  gap: clamp(2.5rem, 7vw, 7rem);
}

.site-intro h1 {
  max-width: 800px;
  margin-top: 0.55rem;
  margin-bottom: 0;
  color: var(--bg);
  font-size: clamp(4rem, 9vw, 8rem);
  letter-spacing: -0.07em;
  line-height: 0.88;
}

.site-intro h1 em {
  color: #b98771;
  font-family: var(--wp--preset--font-family--serif);
  font-weight: 400;
}

.site-intro .wp-block-site-tagline {
  max-width: 520px;
  color: rgba(245, 243, 239, 0.72);
  font-family: var(--wp--preset--font-family--serif);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.6;
}

.hero-aside {
  padding-bottom: 0.4rem;
}

.hero-aside__label {
  margin-bottom: 1rem;
  color: var(--bg);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-aside .wp-block-buttons { margin-top: 1.75rem; }
.hero-primary .wp-block-button__link { background: var(--bg); color: var(--ink); }
.hero-secondary .wp-block-button__link { border-color: rgba(245, 243, 239, 0.35); color: var(--bg); }

.archive-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(245, 243, 239, 0.18);
}

.archive-stats div { display: flex; flex-direction: column; }
.archive-stats strong { color: var(--bg); font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1; }
.archive-stats span { margin-top: 0.35rem; color: rgba(245, 243, 239, 0.55); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }

.category-rail {
  position: relative;
  z-index: 1;
  gap: 0 !important;
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid rgba(245, 243, 239, 0.16);
}

.category-rail p { margin: 0; }
.category-rail p:first-child,
.category-rail a {
  display: block;
  padding: 1.1rem 1.3rem;
  color: rgba(245, 243, 239, 0.72);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.category-rail p:first-child { padding-left: 0; color: #b98771; text-transform: uppercase; }
.category-rail a:hover { background: rgba(245, 243, 239, 0.07); color: var(--bg); }

.archive-shell,
.home-shell,
.page-shell,
.single-shell,
.search-shell,
.not-found-shell {
  padding-right: 24px;
  padding-left: 24px;
}

.home-shell { padding-top: clamp(4.5rem, 8vw, 7rem); padding-bottom: 6rem; }
.section-kicker { margin-bottom: 1.7rem; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; }

.section-heading { margin-bottom: 2.25rem; }
.section-heading h2 { margin: 0; font-size: clamp(2.5rem, 5vw, 4.8rem); }
.section-heading p { max-width: 330px; margin: 0; color: var(--muted); font-family: var(--wp--preset--font-family--serif); }

.journal-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
  margin: 0;
  padding: 0;
}

.journal-grid > .wp-block-post { grid-column: span 4; margin: 0; }
.home-grid .journal-grid > .wp-block-post:first-child { grid-column: span 8; }

.journal-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.journal-card:hover { transform: translateY(-4px); border-color: #bbb5ab; box-shadow: var(--shadow); }

.journal-card .wp-block-post-featured-image { margin: 0; overflow: hidden; background: #dedad3; }
.journal-card .wp-block-post-featured-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 500ms ease; }
.journal-card:not(:has(.wp-block-post-featured-image))::before {
  content: "";
  display: block;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 78% 22%, transparent 0 18%, rgba(245, 243, 239, 0.08) 18.2% 18.6%, transparent 18.8% 28%, rgba(245, 243, 239, 0.05) 28.2% 28.6%, transparent 28.8%),
    linear-gradient(135deg, #2a2927, #171717);
}
.journal-card:hover .wp-block-post-featured-image img { transform: scale(1.025); }
.home-grid .journal-grid > .wp-block-post:first-child .wp-block-post-featured-image img { aspect-ratio: 16 / 8.5; }
.home-grid .journal-grid > .wp-block-post:first-child .journal-card:not(:has(.wp-block-post-featured-image))::before,
.archive-grid .journal-grid > .wp-block-post:first-child .journal-card:not(:has(.wp-block-post-featured-image))::before { aspect-ratio: 16 / 8.5; }
.home-grid .journal-grid > .wp-block-post:nth-child(2) .journal-card { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.home-grid .journal-grid > .wp-block-post:nth-child(2) .journal-card h2 a,
.home-grid .journal-grid > .wp-block-post:nth-child(2) .journal-card .wp-block-post-excerpt__more-link { color: var(--bg); }
.home-grid .journal-grid > .wp-block-post:nth-child(2) .journal-card .wp-block-post-excerpt,
.home-grid .journal-grid > .wp-block-post:nth-child(2) .journal-card .wp-block-post-date { color: rgba(245, 243, 239, 0.67); }

.journal-card__body { padding: clamp(1.2rem, 2.6vw, 2rem); }
.journal-card h2 { margin-top: 0.6rem; margin-bottom: 0.8rem; font-size: clamp(1.35rem, 2.5vw, 2rem); }
.home-grid .journal-grid > .wp-block-post:first-child h2 { max-width: 760px; font-size: clamp(2rem, 4.5vw, 4.1rem); }
.journal-card h2 a { text-decoration: none; }
.journal-card .wp-block-post-excerpt { color: var(--muted); font-family: var(--wp--preset--font-family--serif); }
.journal-card .wp-block-post-excerpt__more-link { display: inline-block; margin-top: 0.5rem; color: var(--ink); font-family: var(--wp--preset--font-family--sans); font-size: 0.82rem; font-weight: 700; }
.journal-card .wp-block-post-date { padding-top: 0.25rem; color: var(--muted); font-size: 0.78rem; }

.wp-block-query-pagination { margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-weight: 650; }
.wp-block-query-pagination a { text-decoration: none; }

.home-discovery {
  margin-top: clamp(5rem, 10vw, 9rem);
  padding: clamp(2rem, 6vw, 5rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #e8e4dd;
}
.home-discovery h2 { max-width: 760px; margin-top: 0.35rem; font-size: clamp(2.2rem, 5vw, 4.8rem); }
.home-discovery .wp-block-search { max-width: 720px; margin-top: 2rem; }

.archive-shell,
.search-shell { padding-bottom: 6rem; }

.subpage-hero {
  position: relative;
  width: auto;
  max-width: none !important;
  margin-right: -24px !important;
  margin-left: -24px !important;
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
}

.subpage-hero::before {
  content: "";
  position: absolute;
  right: -11rem;
  bottom: -15rem;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(245, 243, 239, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 5rem rgba(245, 243, 239, 0.024), 0 0 0 10rem rgba(245, 243, 239, 0.016);
  pointer-events: none;
}

.subpage-hero__inner,
.article-hero__inner,
.not-found-hero__inner {
  position: relative;
  z-index: 1;
  padding-right: 24px;
  padding-left: 24px;
}

.archive-hero .subpage-hero__inner,
.search-hero .subpage-hero__inner { padding-top: clamp(4rem, 9vw, 7.5rem); padding-bottom: clamp(4rem, 8vw, 6.5rem); }

.subpage-hero .eyebrow,
.subpage-hero .taxonomy-category a,
.subpage-hero .wp-block-post-terms a { color: #c78f76; }

.subpage-hero h1,
.subpage-hero .wp-block-query-title,
.subpage-hero .wp-block-post-title { color: var(--bg); }

.archive-hero .wp-block-query-title,
.search-hero .wp-block-query-title,
.archive-hero h1 {
  max-width: 1000px;
  margin-top: 0.55rem;
  margin-bottom: 1.25rem;
  font-size: clamp(3.2rem, 8vw, 7.2rem);
  line-height: 0.94;
}

.category .archive-hero .wp-block-query-title {
  max-width: 820px;
  font-size: clamp(2.9rem, 6.2vw, 5.6rem);
}

.subpage-hero__note {
  max-width: 600px;
  margin: 0;
  color: rgba(245, 243, 239, 0.64);
  font-family: var(--wp--preset--font-family--serif);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.archive-grid { margin-top: clamp(3.5rem, 7vw, 6rem); }
.archive-grid .journal-grid > .wp-block-post:first-child { grid-column: span 8; }
.archive-grid .journal-grid > .wp-block-post:first-child .wp-block-post-featured-image img { aspect-ratio: 16 / 8.5; }
.archive-grid .journal-grid > .wp-block-post:first-child h2 { max-width: 720px; font-size: clamp(2rem, 4.2vw, 3.8rem); }
.archive-grid .journal-grid > .wp-block-post:nth-child(2) .journal-card { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.archive-grid .journal-grid > .wp-block-post:nth-child(2) .journal-card h2 a,
.archive-grid .journal-grid > .wp-block-post:nth-child(2) .journal-card .wp-block-post-excerpt__more-link { color: var(--bg); }
.archive-grid .journal-grid > .wp-block-post:nth-child(2) .journal-card .wp-block-post-excerpt,
.archive-grid .journal-grid > .wp-block-post:nth-child(2) .journal-card .wp-block-post-date { color: rgba(245, 243, 239, 0.67); }

.search-hero .hero-search,
.not-found-hero .hero-search { max-width: 720px; margin-top: 2rem; }
.subpage-hero .wp-block-search__inside-wrapper { border-color: rgba(245, 243, 239, 0.2); }
.subpage-hero .wp-block-search__input { color: var(--ink); }
.subpage-hero .wp-block-search__button { background: #b9795f; color: #fff; }

.empty-state {
  max-width: 760px;
  padding: clamp(2.5rem, 6vw, 5rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #e8e4dd;
  text-align: center;
}
.empty-state h2 { margin-top: 0; font-size: clamp(2.4rem, 6vw, 5rem); }
.empty-state p { max-width: 540px; margin-right: auto; margin-left: auto; color: var(--muted); font-family: var(--wp--preset--font-family--serif); }

.article-hero__inner { padding-top: clamp(4rem, 9vw, 7.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.article-hero .wp-block-post-title { max-width: 1080px; margin-top: 0.7rem; margin-bottom: 1.4rem; font-size: clamp(3rem, 8vw, 7.5rem); line-height: 0.94; }
.article-meta { color: rgba(245, 243, 239, 0.6); font-size: 0.82rem; }
.article-meta p { margin: 0; }
.article-hero .wp-block-post-featured-image { margin-top: clamp(2.5rem, 6vw, 5rem); margin-bottom: clamp(-8rem, -8vw, -5rem); }
.article-hero .wp-block-post-featured-image img { width: 100%; max-height: 720px; border: 8px solid var(--bg); object-fit: cover; }
.article-hero:has(.wp-block-post-featured-image) ~ .reading-content { padding-top: clamp(7rem, 12vw, 11rem); }
.article-hero ~ .reading-content { padding-top: clamp(4rem, 8vw, 7rem); }

.article-hero:has(.wp-block-post-featured-image) + .archive-notice { margin-top: clamp(7rem, 12vw, 11rem); }

.archive-notice {
  display: grid;
  grid-template-columns: minmax(110px, 0.3fr) minmax(0, 1fr);
  gap: 1rem 2rem;
  max-width: 760px;
  margin: clamp(4rem, 8vw, 7rem) auto 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid #cfc4b9;
  border-radius: 12px;
  background: #ebe5dc;
  color: var(--muted);
  font-family: var(--wp--preset--font-family--serif);
}
.archive-notice strong { color: var(--accent); font-family: var(--wp--preset--font-family--sans); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.archive-notice + .reading-content { padding-top: clamp(2.5rem, 5vw, 4rem) !important; }

.reading-content { padding-right: 24px; padding-left: 24px; }
.reading-content > p:first-of-type { font-size: 1.34em; line-height: 1.68; }
.reading-content h2,
.reading-content h3 { margin-top: 2.2em; }
.reading-content blockquote { margin: 2.5rem 0; padding: 0.3rem 0 0.3rem 1.5rem; border-left: 3px solid var(--accent); font-size: 1.25em; }
.reading-content img { border-radius: 2px; }

.post-navigation-wrap { margin-top: 4.5rem; padding: 2rem 24px 0; border-top: 1px solid var(--line); }
.post-navigation-wrap a { font-weight: 700; text-decoration: none; }

.comments-shell { margin-top: 4rem; padding: 3rem 24px 5rem; border-top: 1px solid var(--line); }
.comments-shell .wp-block-comment-template { padding: 0; }
.comments-shell .wp-block-columns { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }

.page-shell { padding-bottom: 6rem; }
.page-hero .subpage-hero__inner { padding-top: clamp(4rem, 9vw, 7.5rem); padding-bottom: clamp(3.5rem, 8vw, 6rem); }
.page-hero .wp-block-post-title { max-width: 1050px; margin-top: 0.6rem; margin-bottom: 0; font-size: clamp(3.2rem, 8vw, 7.2rem); line-height: 0.94; }
.page-body { margin-top: clamp(3rem, 7vw, 6rem); padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.page-body .wp-block-post-featured-image { margin-top: 0; margin-bottom: clamp(2rem, 5vw, 4rem); }
.page-body .reading-content { padding-right: 0; padding-left: 0; }

.not-found-shell { padding-bottom: 0; }
.not-found-hero { min-height: 70vh; display: grid; align-items: center; }
.not-found-hero__inner { padding-top: 6rem; padding-bottom: 7rem; }
.not-found-shell h1 { max-width: 1100px; margin-top: 0.4rem; margin-bottom: 1.4rem; font-size: clamp(4rem, 12vw, 10rem); line-height: 0.84; }
.not-found-home { margin-top: 2rem; }
.not-found-home a { color: var(--bg); font-weight: 700; text-decoration: none; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner { padding: clamp(3rem, 7vw, 5rem) 24px; }
.footer-wordmark a { font-size: 1.5rem; font-weight: 780; text-decoration: none; }
.footer-note { max-width: 520px; color: var(--muted); font-family: var(--wp--preset--font-family--serif); }
.footer-links { font-size: 0.84rem; font-weight: 650; }
.footer-links a { text-decoration: none; }

.wp-block-search__inside-wrapper { border: 1px solid var(--line); background: var(--surface); }
.wp-block-search__input { background: transparent; }
.wp-block-search__button { border-radius: 0; }

@media (max-width: 900px) {
  .journal-grid > .wp-block-post,
  .home-grid .journal-grid > .wp-block-post:first-child,
  .archive-grid .journal-grid > .wp-block-post:first-child { grid-column: span 6; }
  .home-hero-grid { min-height: auto; padding-bottom: 4rem; }
  .site-intro h1 { font-size: clamp(3.6rem, 16vw, 7rem); }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .site-header__inner { min-height: 66px; padding-right: 18px; padding-left: 18px; }
  .site-intro,
  .archive-shell,
  .home-shell,
  .page-shell,
  .search-shell,
  .single-shell,
  .not-found-shell { padding-right: 18px; padding-left: 18px; }
  .subpage-hero { margin-right: -18px !important; margin-left: -18px !important; }
  .subpage-hero__inner,
  .article-hero__inner,
  .not-found-hero__inner { padding-right: 18px; padding-left: 18px; }
  .journal-grid > .wp-block-post,
  .home-grid .journal-grid > .wp-block-post:first-child,
  .archive-grid .journal-grid > .wp-block-post:first-child { grid-column: 1 / -1; }
  .home-grid .journal-grid > .wp-block-post:first-child .wp-block-post-featured-image img { aspect-ratio: 4 / 3; }
  .archive-grid .journal-grid > .wp-block-post:first-child .wp-block-post-featured-image img { aspect-ratio: 4 / 3; }
  .home-grid .journal-grid > .wp-block-post:first-child .journal-card:not(:has(.wp-block-post-featured-image))::before,
  .archive-grid .journal-grid > .wp-block-post:first-child .journal-card:not(:has(.wp-block-post-featured-image))::before { aspect-ratio: 4 / 3; }
  .site-intro::before { opacity: 0.5; }
  .home-hero-grid { gap: 3rem; }
  .site-intro h1 { font-size: clamp(3.5rem, 17vw, 5.7rem); }
  .category-rail { padding-bottom: 0.8rem; }
  .category-rail p:first-child,
  .category-rail a { padding: 0.65rem 0.8rem; }
  .category-rail p:first-child { width: 100%; padding-left: 0; }
  .archive-stats { max-width: 480px; }
  .section-heading { align-items: flex-start; }
  .section-heading p { max-width: none; }
  .article-hero .wp-block-post-title { font-size: clamp(2.55rem, 13vw, 4.5rem); }
  .category .archive-hero .wp-block-query-title { font-size: clamp(2.75rem, 13vw, 4.25rem); }
  .article-hero .wp-block-post-featured-image img { border-width: 4px; }
  .archive-notice { grid-template-columns: 1fr; }
  .page-body { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .comments-shell, .post-navigation-wrap { display: none !important; }
  body { background: #fff; color: #000; }
  .reading-content { max-width: none; font-size: 11pt; }
}
