/* ════════════════════════════════════════════════════
   JOURNAL POST PAGE STYLES
   roopsibansal.com — journal-post.css
   Apple.com/os/ios/-inspired design system
   ════════════════════════════════════════════════════ */

/* ── Post body: light reading surface (Apple long-form article style) ── */
.post-body {
  background: var(--bg3);
  color: var(--near-black);
  min-height: 100vh;
}

/* ── Top Nav ── */
.post-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--pad);
  background: rgba(0,0,0,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-dark);
}
.post-nav-logo {
  font-family: var(--ff-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ivory);
  text-decoration: none;
  transition: color 0.2s;
}
.post-nav-logo:hover { color: var(--gold); }
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-secondary-dark);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}
.post-back:hover { color: var(--ivory); gap: 0.7rem; }
.post-back i { font-size: 0.75rem; transition: transform 0.2s; }
.post-back:hover i { transform: translateX(-3px); }

/* ── Hero ── */
.post-hero {
  position: relative;
  height: 90vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
}
.post-hero-img {
  position: absolute;
  inset: 0;
}
.post-hero-img picture,
.post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.94) 25%, rgba(0,0,0,0.4) 65%, rgba(0,0,0,0.15) 100%);
}
.post-hero-body {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) 4.5rem;
  max-width: 900px;
}
.post-tag {
  display: inline-block;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  color: var(--near-black);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.4rem;
}
.post-hero-body h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--ivory);
  margin-bottom: 1.6rem;
}
.post-hero-body h1 em {
  font-style: normal;
  color: var(--text-secondary-dark);
  font-weight: 500;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gray);
}
.post-meta i { color: var(--gold); font-size: 0.7rem; }

/* ── Content ── */
.post-content {
  padding: 6rem 0 5rem;
  background: var(--bg3);
}
.post-content-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
}
.post-inner {
  max-width: 100%;
  margin: 0;
  padding: 0;
}
.post-lead {
  font-family: var(--ff-display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 500;
  font-style: normal;
  color: var(--near-black);
  line-height: 1.55;
  letter-spacing: -0.005em;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.post-inner h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--near-black);
  margin: 3rem 0 1.2rem;
}
.post-inner p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--gray);
  margin-bottom: 1.6rem;
}
.post-inner a {
  color: var(--gold-dk);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-divider {
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold);
  margin: 3.5rem 0;
  opacity: 0.7;
}
.post-closing {
  font-family: var(--ff-display);
  font-style: normal;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--near-black);
  line-height: 1.6;
}

/* ── More Posts ── */
.post-more {
  background: var(--bg2);
  padding: 5rem 2rem;
}
.post-more-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.post-more-inner h3 {
  font-family: var(--ff-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gray);
  margin-bottom: 2.5rem;
}
.post-more-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.post-more-card {
  display: block;
  text-decoration: none;
  background: var(--bg3);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}
.post-more-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.post-more-card picture,
.post-more-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.post-more-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.post-more-card:hover img { transform: scale(1.05); }
.post-more-body {
  padding: 1.4rem 1.6rem 1.8rem;
}
.post-more-body h4 {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--near-black);
  line-height: 1.35;
  margin-top: 0.7rem;
}

/* ── Journal Archive (browse every post, grouped by year/month) ── */
.post-archive {
  background: var(--bg2);
  padding: 4.5rem 2rem;
}
.post-archive-inner {
  max-width: 740px;
  margin: 0 auto;
}
.post-archive-inner > h3 {
  font-family: var(--ff-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 2rem;
}
.archive-year { margin-bottom: 2rem; }
.archive-year:last-child { margin-bottom: 0; }
.archive-year-label {
  display: block;
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--near-black);
  margin-bottom: 0.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.archive-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  transition: gap 0.2s;
}
.archive-item:last-child { border-bottom: none; }
.archive-month {
  flex-shrink: 0;
  width: 38px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-dk);
}
.archive-title {
  flex: 1;
  font-size: 0.92rem;
  color: var(--near-black);
  line-height: 1.4;
}
.archive-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--gray);
}
a.archive-item:hover { gap: 1.3rem; }
a.archive-item:hover .archive-title { color: var(--gold-dk); }
.archive-item.is-current .archive-title { font-weight: 600; }
.archive-current-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--gold-dk);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.6rem;
}
@media (max-width: 480px) {
  .archive-tag { display: none; }
}

/* Sidebar variant — same archive-year/archive-item building blocks, laid
   out narrow and sticky alongside the article instead of a full-width
   band underneath it. */
.archive-sidebar {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: sticky;
  top: 100px;
}
.archive-sidebar h3 {
  font-family: var(--ff-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 1.3rem;
}
.archive-sidebar .archive-year { margin-bottom: 1.5rem; }
.archive-sidebar .archive-year:last-child { margin-bottom: 0; }
.archive-sidebar .archive-year-label {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
  padding-bottom: 0.5rem;
}
.archive-sidebar .archive-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.65rem 0;
}
.archive-sidebar .archive-month { width: auto; }
.archive-sidebar .archive-title { font-size: 0.85rem; line-height: 1.35; }

@media (max-width: 900px) {
  .post-content-grid { grid-template-columns: 1fr; }
  .archive-sidebar { position: static; margin-top: 1rem; }
}

/* ── Footer ── */
.post-footer {
  background: var(--bg3);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}
.post-footer p {
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--gray);
}
.post-footer a {
  color: var(--gold-dk);
  text-decoration: none;
}
.post-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .post-nav { padding: 1rem 1.5rem; }
  .post-hero-body { padding: 0 1.5rem 3.5rem; }
  .post-more-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .post-hero { height: 80vh; }
  .post-inner { padding: 0 1.2rem; }
}

/* ── Scroll-to-play video (Apple.com-style) ──
   Video shows its poster frame at rest, plays once it settles into
   view, pauses again once scrolled out. No user action needed. */
.scroll-play-video {
  transition: filter 0.3s ease;
}
