/* ===== Design tokens ===== */
:root {
  --bg: #fbf7f2;
  --bg-soft: #f3ece3;
  --text: #2a211c;
  --text-soft: #8a7d72;
  --border: #e7ddd1;
  --accent: #c0562f;      /* warm terracotta / baked */
  --accent-2: #e08a5a;
  --accent-soft: #f7e7dd;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(42,33,28,.05), 0 12px 34px rgba(42,33,28,.08);
  --radius: 18px;
  --maxw: 1180px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}
html[data-theme="dark"] {
  --bg: #171310;
  --bg-soft: #201a15;
  --text: #f0e8e0;
  --text-soft: #a99c8f;
  --border: #2e251e;
  --accent: #e8895a;
  --accent-2: #f0a878;
  --accent-soft: #2a1f18;
  --card: #201a15;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 40px rgba(0,0,0,.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 66px; }
.nav__brand { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.nav__links { display: flex; gap: 22px; align-items: center; margin-left: auto; }
.nav__links a { color: var(--text-soft); font-weight: 500; font-size: .95rem; transition: color .2s; position: relative; }
.nav__links a:hover, .nav__links a.is-active { color: var(--accent); }
.nav__links a.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); border-radius: 2px;
}
.nav__toggle {
  border: 1px solid var(--border); background: var(--bg-soft);
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  display: grid; place-items: center; font-size: .95rem; transition: transform .2s, background .2s; flex-shrink: 0;
}
.nav__toggle:hover { transform: translateY(-1px); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: .95rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s, border-color .2s, color .2s; cursor: pointer; border: 1px solid transparent;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { transform: translateY(-2px); background: var(--accent-2); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Hero (home) ===== */
.hero { padding: clamp(44px, 7vw, 84px) 0 clamp(28px, 4vw, 46px); text-align: center; }
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__avatar {
  width: 108px; height: 108px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow), 0 0 0 3px var(--accent-soft);
  margin-bottom: 20px; overflow: hidden;
}
.hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero__title { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; line-height: 1.05; max-width: 16ch; }
.hero__bio { color: var(--text-soft); font-size: 1.1rem; margin-top: 10px; }
.hero__stats { display: flex; gap: 26px; margin-top: 20px; color: var(--text); }
.hero__stats b { font-family: var(--serif); font-weight: 600; }
.hero__stats span { color: var(--text-soft); font-size: .92rem; }
.hero__cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; justify-content: center; }

/* ===== Highlights (category filters) ===== */
.highlights {
  display: flex; gap: 18px; overflow-x: auto; padding: 10px 4px 24px; margin-top: 6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.highlights::-webkit-scrollbar { height: 6px; }
.highlights::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.hl {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; width: 80px; padding: 0; scroll-snap-align: start;
}
.hl__ring {
  width: 68px; height: 68px; border-radius: 50%; padding: 3px;
  background: linear-gradient(45deg, var(--accent-2), var(--accent));
  display: grid; place-items: center; transition: transform .15s ease;
}
.hl:hover .hl__ring { transform: translateY(-2px) scale(1.04); }
.hl__ring--all { background: var(--border); }
.hl__img, .hl__all {
  width: 100%; height: 100%; border-radius: 50%; background: var(--bg-soft) center/cover no-repeat;
  border: 2px solid var(--bg); display: grid; place-items: center;
}
.hl__all { color: var(--text-soft); font-weight: 700; font-size: .78rem; letter-spacing: .05em; }
.hl__label {
  font-size: .78rem; color: var(--text-soft); max-width: 80px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hl--active .hl__ring, .hl--active .hl__ring--all { background: var(--accent); }
.hl--active .hl__all { color: #fff; background: var(--accent); }
.hl--active .hl__label { color: var(--accent); font-weight: 600; }

/* category view: uniform portrait tiles (Instagram story shape) */
.gallery--cat { columns: 4 200px; }
.gtile--cat img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }

/* ===== Gallery ===== */
.gallery {
  columns: 4 260px; column-gap: 16px; margin-top: 20px;
}
.gtile {
  break-inside: avoid; margin-bottom: 16px; position: relative;
  border-radius: 14px; overflow: hidden; cursor: pointer; background: var(--bg-soft);
  box-shadow: var(--shadow); transition: transform .18s ease;
}
.gtile:hover { transform: translateY(-3px); }
.gtile img { width: 100%; height: auto; transition: filter .2s; }
.gtile__badge {
  position: absolute; top: 10px; right: 10px; color: #fff; font-size: .8rem;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}
.gtile__overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 14px;
  padding: 14px; color: #fff; font-weight: 600; font-size: .92rem;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%);
  opacity: 0; transition: opacity .2s;
}
.gtile:hover .gtile__overlay { opacity: 1; }
.gallery__sentinel { height: 40px; }
.gallery__loading { text-align: center; color: var(--text-soft); padding: 20px 0 60px; }

/* ===== Lightbox ===== */
.lb {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(20,14,10,.92); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.lb.open { display: flex; }
.lb__stage { max-width: 1100px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lb__img { max-height: 74vh; max-width: 100%; width: auto; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #000; }
.lb__meta { color: #f3ece3; text-align: center; max-width: 640px; }
.lb__counter { font-size: .82rem; color: #c9bcae; margin-bottom: 6px; }
.lb__caption { font-size: .98rem; line-height: 1.55; white-space: pre-wrap; max-height: 22vh; overflow: auto; }
.lb__info { display: flex; gap: 18px; justify-content: center; align-items: center; margin-top: 10px; font-size: .88rem; color: #c9bcae; flex-wrap: wrap; }
.lb__info a { color: var(--accent-2); font-weight: 600; }
.lb__close { position: fixed; top: 18px; right: 22px; background: rgba(255,255,255,.12); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; transition: background .2s; }
.lb__close:hover { background: rgba(255,255,255,.24); }
.lb__nav { background: rgba(255,255,255,.12); color: #fff; border: none; width: 52px; height: 52px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.lb__nav:hover { background: rgba(255,255,255,.26); }
.lb__nav--prev { margin-right: 10px; }
.lb__nav--next { margin-left: 10px; }

/* ===== Blog ===== */
.blogHero { padding: clamp(44px, 7vw, 84px) 0 clamp(24px, 3vw, 40px); text-align: center; }
.blogHero__eyebrow { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.blogHero__title { font-family: var(--serif); font-weight: 600; font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -.02em; margin: 10px 0 12px; }
.blogHero__sub { color: var(--text-soft); font-size: 1.1rem; max-width: 42ch; margin: 0 auto 22px; }

.blogGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; padding-bottom: 60px; }
.bcard {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column;
}
.bcard:hover { transform: translateY(-4px); box-shadow: 0 16px 44px rgba(42,33,28,.14); }
.bcard__thumb { aspect-ratio: 3/2; background: var(--bg-soft); overflow: hidden; }
.bcard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.bcard:hover .bcard__thumb img { transform: scale(1.04); }
.bcard__thumb--empty { display: grid; place-items: center; background: var(--accent-soft); }
.bcard__thumb--empty img { width: 72px; height: 72px; border-radius: 50%; opacity: .55; }
.bcard__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bcard__date { color: var(--accent); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.bcard__title { font-family: var(--serif); font-weight: 600; font-size: 1.32rem; line-height: 1.2; }
.bcard__excerpt { color: var(--text-soft); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard__more { color: var(--accent); font-weight: 600; font-size: .9rem; margin-top: auto; }

/* ===== Article reader ===== */
.reader { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(20,14,10,.6); backdrop-filter: blur(3px); }
.reader.open { display: block; }
.reader__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(760px, 100%);
  background: var(--bg); box-shadow: -20px 0 60px rgba(0,0,0,.3);
  overflow-y: auto; animation: slideIn .3s ease;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.reader__close { position: sticky; top: 14px; float: right; margin: 14px 18px 0 0; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1rem; z-index: 2; }
.reader__body { padding: 30px clamp(22px, 5vw, 56px) 70px; }
.reader__body .art__date { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
.reader__body h1.art__title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; margin: 8px 0 18px; }
.reader__body p { margin: 0 0 16px; color: var(--text); }
.reader__body ul, .reader__body ol { margin: 0 0 18px 22px; }
.reader__body li { margin-bottom: 6px; }
.reader__body img { border-radius: 12px; margin: 10px 0 20px; box-shadow: var(--shadow); width: 100%; height: auto; }
.reader__body figure { margin: 0 0 20px; }
.reader__body a { color: var(--accent); text-decoration: underline; }
.reader__wplink { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 600; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 26px 0; margin-top: 30px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; color: var(--text-soft); font-size: .88rem; flex-wrap: wrap; gap: 10px; }
.footer__inner a:hover { color: var(--accent); }

@media (max-width: 560px) {
  .nav__brand { font-size: .95rem; }
  .nav__links { gap: 14px; }
  .gallery { columns: 2 150px; column-gap: 12px; }
  .gtile { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .bcard, .gtile, .btn { transition: none; }
}
