/* ==========================================================================
   PHEE13 — www.phee13.com
   Theme derived from the logo: antique gold on near-black, diamond meander.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Noto+Serif+Thai:wght@300;400;500;600;700&display=swap');

:root {
  /* Gold ramp, taken from the logo artwork */
  --gold-deep: #8a6a1f;
  --gold-antique: #a67c1a;
  --gold: #d4af37;
  --gold-bright: #ffd700;
  --gold-pale: #f0dfa8;

  --gold-grad: linear-gradient(135deg, #a67c1a 0%, #d4af37 38%, #ffd700 58%, #d4af37 78%, #8a6a1f 100%);
  --gold-line: linear-gradient(90deg, transparent, var(--gold-antique) 18%, var(--gold-bright) 50%, var(--gold-antique) 82%, transparent);

  /* Near-black, warmed toward dark brown so the gold sits on it naturally */
  --bg: #0b0907;
  --bg-2: #100d0a;
  --surface: #16120d;
  --surface-2: #1d1811;
  --line: rgba(212, 175, 55, 0.22);
  --line-soft: rgba(212, 175, 55, 0.12);

  --text: #e8e2d6;
  --text-dim: #a89f8d;
  --text-faint: #7b7364;

  --serif-en: 'Cinzel', 'Noto Serif Thai', Georgia, serif;
  --serif-th: 'Noto Serif Thai', 'Cinzel', Georgia, serif;

  --nav-h: 68px;
  --wrap: 1180px;
  --radius: 3px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif-th);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.95;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif-en); font-weight: 600; line-height: 1.45; margin: 0; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.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;
}

/* Gold text fill, used for the big display headings */
.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- meander / decorative ---------- */
/* Diamond meander tile echoing the logo mark. */
.meander-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1.6' stroke-linecap='square'%3E%3Cpath d='M60 6 114 60 60 114 6 60Z'/%3E%3Cpath d='M60 24 96 60 60 96 24 60Z'/%3E%3Cpath d='M60 42 78 60 60 78 42 60Z'/%3E%3Cpath d='M60 54 66 60 60 66 54 60Z'/%3E%3Cpath d='M42 42h12v12'/%3E%3Cpath d='M78 78H66V66'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 120px;
}

.divider {
  --d-op: 0.5;
  position: relative;
  height: 46px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: var(--d-op);
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold-line);
}
.divider__mark {
  width: 62px;
  height: 26px;
  flex: none;
  margin: 0 0.9rem;
  background-repeat: repeat-x;
  background-position: center;
  background-size: 26px 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1.3'%3E%3Cpath d='M13 2 24 13 13 24 2 13Z'/%3E%3Cpath d='M13 8.5 17.5 13 13 17.5 8.5 13Z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 9, 7, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner {
  width: min(100% - 2.5rem, 1320px);
  margin-inline: auto;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav__brand { display: flex; align-items: center; gap: 0.6rem; flex: none; padding: 0.5rem 0; }
.nav__brand img { height: 34px; width: auto; }
.nav__brand-text {
  font-family: var(--serif-en);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.14em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav__links { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; }
.nav__link {
  position: relative;
  padding: 0.55rem 0.8rem;
  font-size: 0.94rem;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0.8rem; right: 0.8rem; bottom: 0.28rem;
  height: 1px;
  background: var(--gold-line);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.nav__link:hover { color: var(--gold-pale); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--gold-bright); }
.nav__link.is-active::after { transform: scaleX(1); }

.nav__toggle { display: none; padding: 0.5rem; margin-left: auto; color: var(--gold); }
.nav__toggle svg { width: 26px; height: 26px; }

@media (max-width: 940px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.38s var(--ease);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__link { padding: 0.85rem 0.2rem; border-bottom: 1px solid var(--line-soft); font-size: 1rem; }
  .nav__link::after { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0 5rem;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: url('../assets/images/hero-bg.jpg') center/cover no-repeat;
  filter: brightness(0.3) saturate(0.55) contrast(1.05);
  z-index: 0;
}
.hero__mesh {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: screen;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 60% 55% at 50% 42%, rgba(212, 175, 55, 0.09), transparent 70%),
    linear-gradient(180deg, rgba(11, 9, 7, 0.72) 0%, rgba(11, 9, 7, 0.4) 45%, var(--bg) 96%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 3; }
.hero__logo {
  width: min(340px, 62vw);
  margin: 0 auto 1.6rem;
  filter: drop-shadow(0 0 34px rgba(212, 175, 55, 0.28));
  animation: heroRise 1.1s var(--ease) both;
}
@keyframes heroRise {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.hero__tagline {
  font-family: var(--serif-th);
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 500;
  color: var(--gold-pale);
  letter-spacing: 0.04em;
  margin: 0 auto 0.7rem;
  max-width: 40ch;
  animation: heroRise 1.1s 0.15s var(--ease) both;
}
.hero__sub {
  color: var(--text-dim);
  max-width: 58ch;
  margin: 0 auto 2.2rem;
  font-size: 0.98rem;
  animation: heroRise 1.1s 0.28s var(--ease) both;
}
.hero__cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; animation: heroRise 1.1s 0.4s var(--ease) both; }
.hero__scroll {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--gold-antique);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--gold-antique);
  border-radius: var(--radius);
  color: var(--gold-pale);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  background: rgba(212, 175, 55, 0.05);
  transition: all 0.3s var(--ease);
}
.btn:hover {
  border-color: var(--gold-bright);
  color: #1a1409;
  background: var(--gold-grad);
  box-shadow: 0 0 26px rgba(212, 175, 55, 0.35);
}
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text-dim); }
.btn--ghost:hover { color: var(--gold-bright); background: rgba(212, 175, 55, 0.07); border-color: var(--gold); box-shadow: none; }

/* ---------- section furniture ---------- */
.section { padding: 4.5rem 0; }
.section--tight { padding: 3rem 0; }
.section__head { text-align: center; margin-bottom: 2.6rem; }
.section__eyebrow {
  font-family: var(--serif-en);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-antique);
  margin-bottom: 0.7rem;
}
.section__title {
  font-family: var(--serif-th);
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 600;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.6rem;
}
.section__desc { color: var(--text-dim); max-width: 62ch; margin: 0 auto; font-size: 0.97rem; }

/* ---------- page header ---------- */
.page-head {
  position: relative;
  padding: 3.4rem 0 2.2rem;
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
/* Faint meander wash behind page headers. The pattern lives on ::before so the
   section itself can stay unpainted — putting it on the element would render
   the motif at full strength. */
.page-head::before,
.search-hero::before,
.about-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.05;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 130px 130px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1.6' stroke-linecap='square'%3E%3Cpath d='M60 6 114 60 60 114 6 60Z'/%3E%3Cpath d='M60 24 96 60 60 96 24 60Z'/%3E%3Cpath d='M60 42 78 60 60 78 42 60Z'/%3E%3Cpath d='M60 54 66 60 60 66 54 60Z'/%3E%3Cpath d='M42 42h12v12'/%3E%3Cpath d='M78 78H66V66'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 50% 50%, transparent 12%, #000 78%);
  mask-image: radial-gradient(ellipse 75% 85% at 50% 50%, transparent 12%, #000 78%);
}
.page-head__inner { position: relative; z-index: 2; }
.page-head__title {
  font-family: var(--serif-th);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.01em;
}
.page-head__desc { color: var(--text-dim); max-width: 60ch; margin: 0.7rem auto 0; font-size: 0.97rem; }
.page-head__count { color: var(--text-faint); font-size: 0.85rem; margin-top: 0.8rem; letter-spacing: 0.08em; }

/* ---------- category cards ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.2rem 1.6rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-2) 100%);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  transition: opacity 0.4s var(--ease);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1.6'%3E%3Cpath d='M60 6 114 60 60 114 6 60Z'/%3E%3Cpath d='M60 24 96 60 60 96 24 60Z'/%3E%3Cpath d='M60 42 78 60 60 78 42 60Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  pointer-events: none;
}
.cat-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 215, 0, 0.18), 0 0 30px rgba(212, 175, 55, 0.14);
}
.cat-card:hover::before { opacity: 0.09; }
.cat-card__icon { width: 54px; height: 54px; margin: 0 auto 1.1rem; color: var(--gold); transition: transform 0.45s var(--ease); }
.cat-card:hover .cat-card__icon { transform: rotate(45deg) scale(1.06); }
.cat-card__title {
  font-family: var(--serif-th);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--gold-pale);
  margin-bottom: 0.55rem;
}
.cat-card__blurb { color: var(--text-dim); font-size: 0.9rem; line-height: 1.75; flex: 1; }
.cat-card__more {
  margin-top: 1.2rem;
  font-family: var(--serif-en);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-antique);
  transition: color 0.3s var(--ease);
}
.cat-card:hover .cat-card__more { color: var(--gold-bright); }

/* ---------- post cards ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.post-card:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(212, 175, 55, 0.12);
}
.post-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.post-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.45s var(--ease);
  filter: saturate(0.82) brightness(0.88);
}
.post-card:hover .post-card__media img { transform: scale(1.06); filter: saturate(1) brightness(1); }
.post-card__media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11, 9, 7, 0.75) 100%);
  pointer-events: none;
}
.post-card__body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.post-card__title {
  font-family: var(--serif-th);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0.55rem;
  transition: color 0.3s var(--ease);
}
.post-card:hover .post-card__title { color: var(--gold-bright); }
.post-card__excerpt {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.75;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}
.post-card__foot { display: flex; align-items: center; gap: 0.6rem; margin-top: 1rem; }
.post-card__read { margin-left: auto; color: var(--text-faint); font-size: 0.76rem; letter-spacing: 0.06em; }

.tag {
  display: inline-block;
  padding: 0.24rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.06);
  white-space: nowrap;
}
.tag--plain { border-color: var(--line-soft); color: var(--text-dim); background: none; }

/* ---------- pagination ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 0.4rem; margin-top: 3rem; flex-wrap: wrap; }
.pager__btn {
  min-width: 42px;
  height: 42px;
  padding: 0 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 0.9rem;
  font-family: var(--serif-en);
  transition: all 0.28s var(--ease);
}
.pager__btn:hover:not(:disabled):not(.is-active) { border-color: var(--gold); color: var(--gold-bright); }
.pager__btn.is-active {
  border-color: var(--gold);
  color: #1a1409;
  background: var(--gold-grad);
  font-weight: 700;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.3);
}
.pager__btn:disabled { opacity: 0.28; cursor: not-allowed; }
.pager__gap { color: var(--text-faint); padding: 0 0.2rem; }

/* ---------- filter chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2.2rem; }
.chip {
  padding: 0.42rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--text-dim);
  transition: all 0.28s var(--ease);
}
.chip:hover { border-color: var(--gold); color: var(--gold-pale); }
.chip.is-active { border-color: var(--gold); color: var(--gold-bright); background: rgba(212, 175, 55, 0.1); }

/* ---------- search ---------- */
.search-hero { position: relative; overflow: hidden; padding: 3.4rem 0 1rem; text-align: center; }
.search-hero > .wrap { position: relative; z-index: 2; }
.search-box { position: relative; max-width: 720px; margin: 2rem auto 0; }
.search-box__field {
  width: 100%;
  padding: 1.15rem 3.4rem 1.15rem 3.4rem;
  font-family: var(--serif-th);
  font-size: 1.08rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--gold-antique);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.search-box__field::placeholder { color: var(--text-faint); }
.search-box__field:focus {
  outline: none;
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.3), 0 0 34px rgba(212, 175, 55, 0.22);
}
.search-box__icon {
  position: absolute; left: 1.15rem; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--gold-antique); pointer-events: none;
}
.search-box__clear {
  position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: none;
  align-items: center; justify-content: center;
  color: var(--text-faint); border-radius: 50%;
}
.search-box__clear:hover { color: var(--gold-bright); }
.search-box__clear.is-shown { display: flex; }
.search-meta { text-align: center; color: var(--text-faint); font-size: 0.86rem; margin-top: 1.4rem; min-height: 1.4em; }
.search-hint { color: var(--text-dim); font-size: 0.88rem; margin-top: 1.2rem; }
.search-hint__row { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; margin-top: 0.7rem; }

.result-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.6rem; }
.result {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.2rem;
  padding: 0.9rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.result:hover {
  border-color: var(--gold);
  transform: translateX(4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.1);
}
.result__media { aspect-ratio: 4 / 3; border-radius: 2px; overflow: hidden; background: var(--surface-2); }
.result__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) brightness(0.9); }
.result__body { min-width: 0; padding: 0.2rem 0.3rem 0.2rem 0; }
.result__title { font-family: var(--serif-th); font-size: 1.04rem; font-weight: 600; margin: 0.35rem 0 0.4rem; transition: color 0.3s var(--ease); }
.result:hover .result__title { color: var(--gold-bright); }
.result__excerpt {
  color: var(--text-dim); font-size: 0.87rem; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden;
}
.result mark { background: rgba(255, 215, 0, 0.18); color: var(--gold-bright); border-radius: 2px; padding: 0 2px; }
@media (max-width: 620px) {
  .result { grid-template-columns: 92px 1fr; gap: 0.85rem; }
}

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 4rem 1rem; }
.empty__mark { width: 74px; height: 74px; margin: 0 auto 1.4rem; color: var(--gold-antique); opacity: 0.55; animation: pulseGlow 3.2s ease-in-out infinite; }
@keyframes pulseGlow { 0%,100% { opacity: 0.35; transform: rotate(0deg); } 50% { opacity: 0.7; transform: rotate(10deg); } }
.empty__title { font-family: var(--serif-th); font-size: 1.3rem; font-weight: 600; color: var(--gold-pale); margin-bottom: 0.6rem; }
.empty__text { color: var(--text-dim); font-size: 0.93rem; max-width: 44ch; margin: 0 auto; }

/* ---------- post page ---------- */
.post-hero { position: relative; height: clamp(280px, 46vh, 460px); overflow: hidden; }
.post-hero img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.62) saturate(0.85); }
.post-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 9, 7, 0.5) 0%, rgba(11, 9, 7, 0.35) 40%, var(--bg) 100%);
}
.post-head { position: relative; z-index: 2; margin-top: -7rem; text-align: center; padding-bottom: 1rem; }
.post-head__title {
  font-family: var(--serif-th);
  font-size: clamp(1.55rem, 4.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  max-width: 22ch;
  margin: 0.9rem auto 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8);
}
.post-head__meta { display: flex; align-items: center; justify-content: center; gap: 0.7rem; flex-wrap: wrap; color: var(--text-faint); font-size: 0.82rem; margin-top: 1rem; }
.post-lead {
  max-width: 68ch;
  margin: 1.8rem auto 0;
  padding: 1.2rem 1.5rem;
  border-left: 2px solid var(--gold-antique);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), transparent);
  color: var(--gold-pale);
  font-size: 1.02rem;
  line-height: 1.85;
}

.article { max-width: 68ch; margin: 0 auto; padding: 1rem 0 2rem; }
.article p { margin: 0 0 1.35rem; color: var(--text); }
.article h2 {
  font-family: var(--serif-th);
  font-size: clamp(1.2rem, 2.8vw, 1.5rem);
  font-weight: 600;
  color: var(--gold-pale);
  margin: 2.6rem 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.article h2::after {
  content: '';
  position: absolute; left: 0; bottom: -1px;
  width: 56px; height: 1px;
  background: var(--gold-line);
}
.article ul { margin: 0 0 1.35rem; padding-left: 0; list-style: none; }
.article li { position: relative; padding-left: 1.5rem; margin-bottom: 0.7rem; color: var(--text); }
.article li::before {
  content: '';
  position: absolute; left: 0.15rem; top: 0.85em;
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}
.article__figure { margin: 2.4rem 0; }
.article__figure img { width: 100%; border: 1px solid var(--line-soft); border-radius: var(--radius); }
.article__figure figcaption { text-align: center; color: var(--text-faint); font-size: 0.8rem; margin-top: 0.7rem; }

.post-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; max-width: 68ch; margin: 2rem auto 0; }
.post-nav { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin: 2.6rem auto 0; }
.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem;
  max-width: 68ch;
  margin: 2.4rem auto 0;
}
.post-gallery img { border: 1px solid var(--line-soft); border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }

/* ---------- about ---------- */
.about-hero { position: relative; overflow: hidden; text-align: center; padding: 3.6rem 0 1rem; }
.about-hero > .wrap { position: relative; z-index: 2; }
.about-logo { width: min(230px, 52vw); margin: 0 auto 1.6rem; filter: drop-shadow(0 0 26px rgba(212, 175, 55, 0.22)); }
.prose { max-width: 68ch; margin: 0 auto; }
.prose p { margin: 0 0 1.3rem; }
.prose h2 {
  font-family: var(--serif-th);
  font-size: 1.4rem;
  color: var(--gold-pale);
  margin: 2.4rem 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line-soft);
}
.prose ul { margin: 0 0 1.3rem; padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 1.5rem; margin-bottom: 0.7rem; }
.prose li::before {
  content: '';
  position: absolute; left: 0.15rem; top: 0.85em;
  width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg);
}
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; margin: 2rem 0; }
.pillar { padding: 1.5rem 1.3rem; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); transition: border-color 0.3s var(--ease); }
.pillar:hover { border-color: var(--gold); }
.pillar__n { font-family: var(--serif-en); font-size: 0.75rem; letter-spacing: 0.3em; color: var(--gold-antique); }
.pillar__t { font-family: var(--serif-th); font-size: 1.1rem; font-weight: 600; color: var(--gold-pale); margin: 0.5rem 0 0.5rem; }
.pillar__d { color: var(--text-dim); font-size: 0.88rem; line-height: 1.7; }
.figure-wide { max-width: 760px; margin: 2.6rem auto; }
.figure-wide img { border: 1px solid var(--line); border-radius: var(--radius); }
.figure-wide figcaption { text-align: center; color: var(--text-faint); font-size: 0.8rem; margin-top: 0.7rem; }
.note {
  max-width: 68ch;
  margin: 2.4rem auto 0;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--gold-antique);
  border-radius: var(--radius);
  background: rgba(212, 175, 55, 0.035);
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.8;
}
.note strong { color: var(--gold-pale); font-weight: 600; }

/* ---------- footer ---------- */
.footer {
  position: relative;
  margin-top: 4rem;
  padding: 3.2rem 0 2rem;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  text-align: center;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='1.6'%3E%3Cpath d='M60 6 114 60 60 114 6 60Z'/%3E%3Cpath d='M60 24 96 60 60 96 24 60Z'/%3E%3Cpath d='M60 42 78 60 60 78 42 60Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  pointer-events: none;
}
.footer__inner { position: relative; z-index: 2; }
.footer__logo { width: 128px; margin: 0 auto 1.4rem; opacity: 0.92; transition: filter 0.35s var(--ease); }
.footer__logo:hover { filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.4)); }
.footer__links { display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.footer__link { color: var(--text-dim); font-size: 0.9rem; transition: color 0.3s var(--ease); }
.footer__link:hover { color: var(--gold-bright); }
.footer__social { display: flex; gap: 0.7rem; justify-content: center; margin-bottom: 1.6rem; }
.footer__social a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  transition: all 0.3s var(--ease);
}
.footer__social a:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}
.footer__social svg { width: 19px; height: 19px; }
.footer__domain {
  font-family: var(--serif-en);
  font-size: 0.86rem;
  letter-spacing: 0.28em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.9rem;
}
.footer__copy { color: var(--text-faint); font-size: 0.78rem; line-height: 1.9; }
.footer__disclaimer { color: var(--text-faint); font-size: 0.74rem; max-width: 60ch; margin: 1rem auto 0; opacity: 0.8; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d='1'] { transition-delay: 0.08s; }
.reveal[data-d='2'] { transition-delay: 0.16s; }
.reveal[data-d='3'] { transition-delay: 0.24s; }
.reveal[data-d='4'] { transition-delay: 0.32s; }
.reveal[data-d='5'] { transition-delay: 0.4s; }

/* ---------- skeleton ---------- */
.skeleton { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.skeleton__media { aspect-ratio: 16/10; background: linear-gradient(90deg, var(--surface-2) 25%, #241d14 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton__line { height: 12px; margin: 1rem 1.25rem; border-radius: 2px; background: linear-gradient(90deg, var(--surface-2) 25%, #241d14 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton__line--short { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.error-box { text-align: center; padding: 3rem 1rem; color: var(--text-dim); }
.error-box strong { color: var(--gold-pale); display: block; margin-bottom: 0.6rem; font-size: 1.1rem; }
.error-box code { color: var(--gold); font-size: 0.85rem; background: var(--surface-2); padding: 0.15rem 0.4rem; border-radius: 2px; }

/* ---------- back to top ---------- */
.to-top {
  position: fixed;
  right: 1.2rem; bottom: 1.2rem;
  z-index: 50;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(22, 18, 13, 0.9);
  color: var(--gold);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all 0.35s var(--ease);
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--gold-bright); color: var(--gold-bright); box-shadow: 0 0 20px rgba(212, 175, 55, 0.3); }

@media (max-width: 700px) {
  body { font-size: 16px; }
  .section { padding: 3.2rem 0; }
  .post-head { margin-top: -5rem; }
  .footer__links { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
