/* ============================================
   POCKET OF SUNLIGHT v3 — Main Stylesheet
   ============================================ */

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

:root {
  --cream:  #FAF7F2;
  --brown:  #8B7355;
  --ink:    #2C2C2C;
  --muted:  #A89880;
  --border: #E3D9CC;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.9;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(250,247,242,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 64px;
  height: 70px;
  display: flex; align-items: center; justify-content: space-between;
  transition: box-shadow 0.4s;
}
.site-header.scrolled { box-shadow: 0 2px 24px rgba(44,44,44,0.06); }

.site-branding a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px; font-weight: 400;
  color: var(--ink); letter-spacing: 0.04em;
}

/* ── Primary Nav (horizontal) ── */
.header-right {
  display: flex; align-items: center; gap: 40px;
}

.main-navigation {
  display: flex; /* always flex on desktop */
}
.main-navigation ul {
  list-style: none;
  display: flex;
  flex-direction: row; /* HORIZONTAL */
  gap: 32px;
  margin: 0; padding: 0;
}
.main-navigation li { position: relative; }
.main-navigation a {
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink);
  padding-bottom: 3px; position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}
.main-navigation a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--brown);
  transition: width 0.3s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--brown); }
.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after { width: 100%; }

/* ── Lang Switch ── */
.lang-switch {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
}
.lang-switch .sep { color: var(--border); }
.lang-switch button {
  background: none; border: none; cursor: pointer;
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); font-family: 'Be Vietnam Pro', sans-serif;
  transition: color 0.2s; padding: 0;
}
.lang-switch button:hover,
.lang-switch button.active { color: var(--brown); }

/* ── Hamburger (mobile only) ── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center;
  gap: 5px; width: 28px; height: 28px;
  background: none; border: none; cursor: pointer; padding: 0;
}
.hamburger span {
  display: block; width: 100%; height: 1px;
  background: var(--ink); transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile Menu Overlay ── */
.mobile-menu {
  display: none;
  position: fixed; inset: 0; z-index: 199;
  background: var(--cream);
  padding-top: 70px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 36px;
  animation: fadeIn 0.2s ease;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 400;
  color: var(--ink); transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--brown); }
.mobile-menu .mobile-lang {
  display: flex; gap: 16px; margin-top: 16px;
  border-top: 1px solid var(--border); padding-top: 28px;
}
.mobile-menu .mobile-lang button {
  background: none; border: none; cursor: pointer;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); font-family: 'Be Vietnam Pro', sans-serif;
}
.mobile-menu .mobile-lang button.active { color: var(--brown); }

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  padding-top: 70px;
}
.hero-left {
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 56px 80px 64px;
  animation: fadeInLeft 1s ease both;
}
.hero-kicker {
  font-size: 10px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 16px; margin-bottom: 32px;
}
.hero-kicker::before { content: ''; width: 32px; height: 1px; background: var(--border); display: block; }
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 4.5vw, 60px);
  font-weight: 400; line-height: 1.2; margin-bottom: 32px;
}
.hero-title em { font-style: italic; color: var(--brown); }
.hero-desc {
  font-size: 15px; line-height: 2; color: var(--muted);
  max-width: 400px; margin-bottom: 52px;
  border-left: 1px solid var(--border); padding-left: 24px;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 16px;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cream); background: var(--brown);
  padding: 15px 36px; align-self: flex-start;
  transition: background 0.3s;
}
.hero-cta::after { content: '→'; transition: transform 0.2s; }
.hero-cta:hover { background: var(--ink); }
.hero-cta:hover::after { transform: translateX(4px); }

.hero-right { position: relative; overflow: hidden; animation: fadeIn 1.4s ease both; }
.hero-right img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.9) saturate(0.75); transition: transform 10s ease;
}
.hero-right:hover img { transform: scale(1.04); }
.hero-right::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to right, var(--cream) 0%, transparent 18%);
}

/* ══════════════════════════════
   SECTION HEAD
══════════════════════════════ */
.section-head {
  padding: 80px 64px 48px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.section-label {
  font-size: 10px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 14px;
}
.section-label::before { content: '✦'; font-size: 8px; color: var(--brown); }
.section-view-all {
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--brown);
  display: flex; align-items: center; gap: 8px; transition: gap 0.2s;
}
.section-view-all::after { content: '→'; }
.section-view-all:hover { gap: 14px; }

/* ══════════════════════════════
   POSTS GRID
══════════════════════════════ */
.posts-grid-wrap {
  border-top: 1px solid var(--border);
  padding: 0 64px 100px;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.post-card {
  display: flex; flex-direction: column;
  padding: 40px 32px 40px 0;
  border-right: 1px solid var(--border);
  animation: fadeInUp 0.7s ease both;
}
.post-card:nth-child(3n)   { border-right: none; padding-right: 0; padding-left: 32px; }
.post-card:nth-child(3n+2) { padding-left: 32px; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.2s; }

.post-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px; color: var(--border); letter-spacing: 0.1em; margin-bottom: 20px;
}
.post-thumb { width: 100%; aspect-ratio: 3/2; overflow: hidden; margin-bottom: 24px; }
.post-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.92) saturate(0.75);
  transition: transform 0.7s, filter 0.4s;
}
.post-card:hover .post-thumb img { transform: scale(1.05); filter: brightness(0.86) saturate(0.88); }
.post-meta-line {
  font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.post-card .entry-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px; font-weight: 400; line-height: 1.45;
  color: var(--ink); margin-bottom: 14px; transition: color 0.2s;
}
.post-card:hover .entry-title { color: var(--brown); }
.post-excerpt-text {
  font-size: 14px; line-height: 1.8; color: var(--muted); flex: 1; margin-bottom: 20px;
}
.post-read-more {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brown); display: inline-flex; align-items: center; gap: 8px;
  transition: gap 0.2s;
}
.post-read-more::after { content: '→'; }
.post-card:hover .post-read-more { gap: 14px; }

/* ══════════════════════════════
   JOURNAL PAGE
══════════════════════════════ */
.journal-header {
  padding: 140px 64px 60px;
  border-bottom: 1px solid var(--border);
  animation: fadeInUp 0.8s ease both;
}
.page-kicker {
  font-size: 10px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.page-kicker::before { content: '✦'; font-size: 8px; color: var(--brown); }
.journal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 400; line-height: 1.2;
}
.journal-title em { font-style: italic; color: var(--brown); }

/* ── Filter ── */
.filter-bar {
  display: flex; border-bottom: 1px solid var(--border); padding: 0 64px;
}
.filter-btn {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); background: none; border: none;
  padding: 18px 24px; cursor: pointer; position: relative; transition: color 0.2s;
}
.filter-btn::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 1px; background: var(--brown); transform: scaleX(0); transition: transform 0.3s;
}
.filter-btn.active { color: var(--ink); }
.filter-btn.active::after { transform: scaleX(1); }

/* ══════════════════════════════
   SINGLE POST
══════════════════════════════ */
.single-post-wrap {
  max-width: 720px; margin: 0 auto;
  padding: 130px 40px 100px;
  animation: fadeInUp 0.9s ease both;
}
.single-post-meta {
  font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 16px; margin-bottom: 28px;
}
.single-post-meta::before { content: '✦'; font-size: 8px; color: var(--brown); }
.single-post-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400; line-height: 1.25; margin-bottom: 48px;
}
.single-post-featured { width: 100%; aspect-ratio: 16/9; overflow: hidden; margin-bottom: 52px; }
.single-post-featured img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.92) saturate(0.78); }

/* Language tabs on single post */
.post-lang-tabs {
  display: flex; gap: 0; margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.post-lang-tab {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); background: none; border: none;
  padding: 12px 20px; cursor: pointer; position: relative; transition: color 0.2s;
  font-family: 'Be Vietnam Pro', sans-serif;
}
.post-lang-tab::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 1px; background: var(--brown); transform: scaleX(0); transition: transform 0.3s;
}
.post-lang-tab.active { color: var(--ink); }
.post-lang-tab.active::after { transform: scaleX(1); }

.post-content-en, .post-content-vi { display: none; }
.post-content-en.active, .post-content-vi.active { display: block; }

.single-post-content { font-size: 16px; line-height: 2; color: var(--ink); }
.single-post-content p { margin-bottom: 28px; }
.single-post-content p:first-child::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 68px; font-weight: 400;
  float: left; line-height: 0.75; margin: 8px 14px 0 0; color: var(--brown);
}
.single-post-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; font-weight: 400; margin: 44px 0 18px;
}
.single-post-content blockquote {
  border-left: 2px solid var(--brown); padding: 4px 0 4px 28px;
  margin: 36px 0; font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 19px; color: var(--brown); line-height: 1.7;
}
.single-post-content img { width: 100%; margin: 36px 0; }
.post-closing {
  margin-top: 56px; padding-top: 44px; border-top: 1px solid var(--border);
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 16px; color: var(--muted);
}

/* ══════════════════════════════
   ABOUT PAGE
══════════════════════════════ */
.about-wrap {
  max-width: 760px; margin: 0 auto;
  padding: 150px 40px 120px;
  animation: fadeInUp 0.9s ease both;
}
.about-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 400; line-height: 1.2; margin-bottom: 60px;
}
.about-title em { font-style: italic; color: var(--brown); display: block; }
.about-content { display: none; }
.about-content.active { display: block; }
.about-content p { font-size: 16px; line-height: 2; color: var(--ink); margin-bottom: 28px; }
.about-content p.lead {
  font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 400; line-height: 1.7;
  border-left: 2px solid var(--brown); padding-left: 28px; margin-bottom: 40px;
}
.text-divider {
  display: flex; align-items: center; gap: 20px; margin: 52px 0;
}
.text-divider::before, .text-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.text-divider span { font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); }
.about-closing {
  margin-top: 56px; padding-top: 44px; border-top: 1px solid var(--border);
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 18px; color: var(--brown); line-height: 1.6;
}

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border); padding: 32px 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-brand { font-family: 'Cormorant Garamond', serif; font-size: 15px; }
.footer-copy { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 960px) {
  .site-header { padding: 0 24px; }
  .main-navigation { display: none; } /* hidden — replaced by mobile overlay */
  .lang-switch { display: none; }    /* hidden — inside mobile overlay */
  .hamburger { display: flex; }

  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-right { height: 65vw; }
  .hero-left { padding: 60px 24px 48px; }
  .hero-right::before { background: linear-gradient(to bottom, var(--cream) 0%, transparent 20%); }

  .section-head { padding: 60px 24px 36px; }
  .posts-grid-wrap { padding: 0 24px 80px; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .post-card { border-right: none !important; border-bottom: 1px solid var(--border); padding: 32px 0 !important; }
  .post-card:last-child { border-bottom: none; }

  .journal-header { padding: 110px 24px 48px; }
  .filter-bar { padding: 0 24px; overflow-x: auto; }

  .single-post-wrap { padding: 110px 24px 80px; }
  .about-wrap { padding: 120px 24px 80px; }
  .site-footer { padding: 28px 24px; flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════
   FONT REFINEMENTS v3
   Cormorant Garamond + Be Vietnam Pro
══════════════════════════════ */

/* Cormorant needs slightly larger sizes to shine */
.hero-title { font-size: clamp(44px, 5vw, 68px); font-weight: 300; letter-spacing: -0.01em; }
.journal-title { font-size: clamp(38px, 5vw, 56px); font-weight: 300; }
.about-title { font-size: clamp(38px, 5vw, 58px); font-weight: 300; }
.single-post-title { font-size: clamp(34px, 4vw, 52px); font-weight: 300; }
.post-card .entry-title { font-size: 21px; font-weight: 300; letter-spacing: 0.01em; }
.about-content p.lead { font-size: 22px; font-weight: 300; }

/* Be Vietnam Pro — navigation & labels */
.main-navigation a,
.lang-switch button,
.filter-btn,
.post-meta-line,
.hero-kicker,
.page-kicker,
.section-label,
.post-read-more,
.hero-cta,
.section-view-all,
.post-num,
.single-post-meta,
.footer-copy { font-family: 'Be Vietnam Pro', sans-serif; }

/* Body text — Be Vietnam Pro reads beautifully in Vietnamese */
.single-post-content,
.about-content p,
.post-excerpt-text,
.hero-desc { font-family: 'Be Vietnam Pro', sans-serif; font-weight: 300; }

/* Vietnamese specific — extra breathing room for diacritics */
.post-content-vi,
.about-content[data-lang="vi"] p,
[data-vi] {
  line-height: 2.05;
  word-spacing: 0.02em;
}

/* Drop cap with Cormorant */
.single-post-content p:first-child::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 80px;
  font-weight: 300;
  float: left;
  line-height: 0.72;
  margin: 10px 14px 0 0;
  color: var(--brown);
}
