/* ============================================
   半日闲记 — Slow Living Editorial Design System
   Aesthetic: Kinfolk-inspired warm editorial
   Shared stylesheet for all pages
   ============================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=Ma+Shan+Zheng&family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Serif+SC:wght@300;400;500;600;700;900&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Warm paper palette */
  --bg:          #f6f1ea;
  --bg-alt:      #ece3d5;
  --bg-deep:     #e0d4c0;
  --surface:     #fffaf3;
  --surface-2:   #f9f4ec;

  /* Ink tones */
  --text:        #2a201a;
  --text-muted:  #6b5d4f;
  --text-light:  #a8988a;
  --text-faint:  #c4b6a6;

  /* Accents */
  --accent:      #a0522d;
  --accent-dark: #7a3e1f;
  --accent-soft: #c4805a;
  --sage:        #6b8e5a;
  --sage-soft:   #8fa97d;
  --gold:        #b89046;

  /* Lines & shadows */
  --border:      #ddd2c0;
  --border-soft: #ebe2d4;
  --shadow-sm:   0 1px 3px rgba(42,32,26,.06);
  --shadow-md:   0 4px 16px rgba(42,32,26,.08);
  --shadow-lg:   0 12px 40px rgba(42,32,26,.12);

  /* Typography */
  --f-serif:   "Noto Serif SC", "Songti SC", "STSong", serif;
  --f-sans:    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-brush:   "Ma Shan Zheng", "STKaiti", cursive;
  --f-latin:   "Fraunces", "Cormorant Garamond", serif;

  /* Metrics */
  --container: 1080px;
  --narrow:    720px;
  --radius:    10px;
  --radius-sm: 6px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
a:hover { color: var(--accent-dark); }

::selection { background: var(--accent-soft); color: #fff; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin-bottom: 1em; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }

.brush { font-family: var(--f-brush); font-weight: 400; }
.latin { font-family: var(--f-latin); font-style: italic; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: var(--narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  border: none;
  margin: 3rem 0;
}

/* Section heading with decorative accent */
.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-head h2 {
  position: relative;
  display: inline-block;
}
.section-head h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 1px;
}
.section-head .sub {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--f-latin);
  margin-bottom: 8px;
  display: block;
}

/* ---------- Header & Navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(246, 241, 234, 0);
  backdrop-filter: blur(0);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease),
              box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
  padding: 18px 0;
}
.site-header.scrolled {
  background: rgba(246, 241, 234, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border-soft);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-family: var(--f-brush);
  font-size: 1.6rem;
  color: var(--text);
  letter-spacing: 2px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-sub {
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 1px;
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav a {
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease), left 0.3s var(--ease);
}
.nav a:hover, .nav a.active {
  color: var(--accent);
}
.nav a:hover::after, .nav a.active::after {
  width: 100%;
  left: 0;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 60px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.78) saturate(0.9);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(42,32,26,0.55) 0%, rgba(122,62,31,0.3) 50%, rgba(42,32,26,0.6) 100%);
}
.hero-content {
  max-width: 640px;
}
.hero-content .hero-eyebrow {
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.hero-content h1 {
  font-family: var(--f-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.hero-content h1 .brush-accent {
  font-family: var(--f-brush);
  font-weight: 400;
  color: #f0c89e;
}
.hero-content p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.9;
  max-width: 500px;
  margin-bottom: 32px;
}

/* Hero on non-home pages (compact) */
.page-hero {
  padding: 140px 0 50px;
  text-align: center;
  position: relative;
}
.page-hero .eyebrow {
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--accent-soft);
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: block;
}
.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  margin-bottom: 16px;
}
.page-hero p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 0.88rem;
  font-family: var(--f-sans);
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  transition: all 0.35s var(--ease);
  cursor: pointer;
  letter-spacing: 0.5px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(160,82,45,0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
}
.btn-ghost:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}
.btn-light {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
}
.btn-light:hover {
  background: rgba(255,255,255,0.95);
  color: var(--accent-dark);
  border-color: #fff;
}

/* ---------- Gallery Grid ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-grid.col-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-grid.col-4 { grid-template-columns: repeat(4, 1fr); }

.g-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.g-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.g-item.tall { grid-row: span 2; }
.g-item.wide { grid-column: span 2; }

.g-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.g-item.tall .g-photo { aspect-ratio: 3/4.5; }
.g-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.g-item:hover .g-photo img {
  transform: scale(1.06);
}
.g-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(42,32,26,0.75) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.g-item:hover .g-overlay { opacity: 1; }
.g-caption {
  color: #fff;
  font-size: 0.85rem;
  transform: translateY(10px);
  transition: transform 0.4s var(--ease);
}
.g-item:hover .g-caption { transform: translateY(0); }
.g-caption .g-cat {
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 0.75rem;
  color: var(--accent-soft);
  display: block;
  margin-bottom: 4px;
}

/* Gallery filter buttons */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 6px 18px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  font-family: var(--f-sans);
}
.filter-btn:hover { border-color: var(--accent-soft); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Article Cards ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.article-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.article-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.article-card:hover .article-thumb img { transform: scale(1.05); }
.article-body {
  padding: 22px 24px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-meta {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-meta .tag {
  background: var(--bg-alt);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
}
.article-body h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.article-body h3 a { color: var(--text); }
.article-body h3 a:hover { color: var(--accent); }
.article-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
  flex: 1;
}
.article-more {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--accent);
  font-family: var(--f-latin);
  font-style: italic;
}
.article-more::after {
  content: ' →';
  transition: margin 0.3s var(--ease);
}
.article-card:hover .article-more::after { margin-left: 4px; }

/* Featured article (large) */
.article-featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.article-featured .article-thumb { aspect-ratio: auto; height: 100%; }
.article-featured .article-body { justify-content: center; padding: 36px; }
.article-featured h3 { font-size: 1.4rem; }

/* ---------- Home: Featured Gallery Preview ---------- */
.feat-gallery {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 16px;
}
.feat-gallery .fg-item { position: relative; overflow: hidden; border-radius: var(--radius); }
.feat-gallery .fg-item:nth-child(1) { grid-row: span 2; }
.feat-gallery .fg-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.feat-gallery .fg-item:hover img { transform: scale(1.05); }
.feat-gallery .fg-item .fg-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(42,32,26,0.7), transparent);
  color: #fff; font-size: 0.82rem;
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.feat-gallery .fg-item:hover .fg-label { opacity: 1; }

/* ---------- Profile / Sidebar Widgets ---------- */
.profile-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: #fff;
}
.profile-name {
  font-family: var(--f-serif);
  font-size: 1.1rem; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.profile-bio {
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.7;
}

.widget {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  margin-bottom: 20px;
}
.widget-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  font-family: var(--f-sans);
}
.widget-list { list-style: none; }
.widget-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-soft);
}
.widget-list li:last-child { border-bottom: none; }

.quote-block {
  font-family: var(--f-serif);
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.8;
  position: relative;
  padding: 12px 0 12px 24px;
  border-left: 3px solid var(--accent-soft);
}

/* ---------- About Page ---------- */
.about-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: center;
}
.about-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-lg);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo::after {
  content: '';
  position: absolute; inset: 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  pointer-events: none;
}
.about-text h2 { margin-bottom: 20px; }
.about-text p { color: var(--text-muted); margin-bottom: 1.2em; }

/* Interest cards */
.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.interest-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.interest-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.interest-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.interest-card h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.interest-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}
.timeline-item {
  position: relative;
  padding-bottom: 28px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--accent);
}
.timeline-item .tl-date {
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 4px;
}
.timeline-item h4 { font-size: 1rem; margin-bottom: 4px; }
.timeline-item p { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Contact ---------- */
.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: all 0.3s var(--ease);
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Two-Column Layout ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 3rem;
}
.pagination a, .pagination span {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
}
.pagination a:hover {
  border-color: var(--border);
  color: var(--accent);
}
.pagination .current {
  background: var(--accent);
  color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
  text-align: center;
  margin-top: 4rem;
}
.footer-brand {
  font-family: var(--f-brush);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 8px;
}
.footer-text {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 6px;
}
.footer-text a { color: var(--text-light); }
.footer-text a:hover { color: var(--accent); text-decoration: underline; }
.footer-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.3s var(--ease);
}
.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(42,32,26,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 85%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Scroll Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Stagger for grids */
.stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.stagger.visible > * { opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.33s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.47s; }
.stagger.visible > *:nth-child(8) { transition-delay: 0.54s; }
.stagger.visible > *:nth-child(9) { transition-delay: 0.61s; }

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s var(--ease);
  z-index: 900;
  box-shadow: var(--shadow-md);
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid.col-4 { grid-template-columns: repeat(3, 1fr); }
  .article-grid { grid-template-columns: 1fr; }
  .article-featured { grid-column: span 1; grid-template-columns: 1fr; }
  .article-featured .article-thumb { aspect-ratio: 16/10; }
  .feat-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 180px; }
  .feat-gallery .fg-item:nth-child(1) { grid-row: span 1; grid-column: span 2; }
  .about-section { grid-template-columns: 1fr; }
  .interest-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav {
    position: fixed;
    top: 0; right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: var(--surface);
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    gap: 1.5rem;
    transition: right 0.4s var(--ease);
    box-shadow: -4px 0 30px rgba(0,0,0,0.1);
    z-index: 1001;
  }
  .nav.open { right: 0; }
  .nav a { font-size: 1.1rem; }
  .nav-toggle { display: flex; z-index: 1002; }

  .gallery-grid, .gallery-grid.col-4 { grid-template-columns: 1fr 1fr; }
  .g-item.tall { grid-row: span 1; }
  .g-item.wide { grid-column: span 2; }
  .interest-grid { grid-template-columns: 1fr; }
  .feat-gallery { grid-template-columns: 1fr; grid-template-rows: auto; }
  .feat-gallery .fg-item { height: 200px; }
  .feat-gallery .fg-item:nth-child(1) { grid-column: span 1; }
  .hero { min-height: 60vh; }
  .section { padding: 2.5rem 0; }
}
