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

:root {
  --cream: #f9f6f1;
  --warm-white: #fdfcfa;
  --sand: #ede8df;
  --stone: #c9bfb0;
  --ink: #1a1814;
  --ink-light: #4a4540;
  --ink-muted: #8a8278;
  --accent: #c17f4a;
  --accent-light: #e8c99e;
}

html {
  scroll-behavior: smooth;
  background: var(--warm-white);
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--warm-white);
  overflow-x: hidden;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 220;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.1s linear;
}

.post-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 22px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(253, 252, 250, 0.92);
  border-bottom: 1px solid var(--sand);
  backdrop-filter: blur(12px);
}

.post-nav-logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}

.post-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 40px;
}

.post-nav-links a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-light);
  transition: color 0.2s;
}

.post-nav-links a:hover {
  color: var(--ink);
}

.post-nav-links .post-nav-cta {
  padding: 9px 22px;
  background: var(--ink);
  color: var(--warm-white);
}

.post-nav-links .post-nav-cta:hover {
  background: var(--accent);
  color: #fff;
}

.post-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.post-nav-toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.post-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.post-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.post-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.post-header {
  position: relative;
  overflow: hidden;
  padding: 160px 60px 80px;
}

.post-header-inner {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 38px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
}

.post-back:hover {
  color: var(--ink);
  gap: 12px;
}

.post-category {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.post-title {
  margin: 0 0 26px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(40px, 5.6vw, 70px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.post-title em {
  font-style: italic;
  color: var(--accent);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar,
.author-avatar-large {
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background-color: var(--sand);
  flex-shrink: 0;
}

.author-avatar {
  width: 38px;
  height: 38px;
}

.author-name {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
}

.author-role {
  font-size: 12px;
  color: var(--ink-muted);
}

.post-meta-divider {
  width: 1px;
  height: 32px;
  background: var(--stone);
}

.post-date,
.post-read {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.post-hero-image {
  position: relative;
  width: min(1240px, calc(100% - 120px));
  margin: 0 auto;
  aspect-ratio: 1200 / 630;
  min-height: 0;
  max-height: none;
  background: var(--sand);
  overflow: hidden;
  border-radius: 18px;
}

.post-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(1.01);
  transform-origin: center;
}

.post-hero-badge {
  position: absolute;
  left: 60px;
  bottom: 42px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.post-hero-pill {
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.post-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 60px 150px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 78px;
  align-items: start;
}

.post-body {
  min-width: 0;
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body p {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-light);
}

.post-body p:first-child {
  font-size: 20px;
  line-height: 1.72;
  color: var(--ink);
}

.post-body h2 {
  margin: 62px 0 22px;
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.post-body h2[id],
.post-body h3[id] {
  scroll-margin-top: 108px;
}

.post-body h3 {
  margin: 40px 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
}

.post-body blockquote {
  margin: 48px 0;
  padding: 32px 38px;
  background: var(--cream);
  border-left: 3px solid var(--accent);
  position: relative;
}

.post-body blockquote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 28px;
  font-family: "Cormorant Garamond", serif;
  font-size: 80px;
  line-height: 1;
  color: var(--accent-light);
  opacity: 0.5;
}

.post-body blockquote p {
  margin: 0;
  padding-top: 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink);
}

.post-body blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-style: normal;
}

.post-body ul {
  margin: 0 0 28px;
  padding-left: 0;
  list-style: none;
}

.post-body ul li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--sand);
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-light);
}

.post-body ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 14px;
}

.post-body .callout {
  margin: 48px 0;
  padding: 34px 38px;
  background: var(--ink);
  color: var(--cream);
}

.post-body .callout strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
}

.post-body .callout p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--stone);
}

.post-body .stat-row {
  margin: 48px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
}

.stat-box {
  padding: 32px 28px;
  background: var(--cream);
  text-align: center;
}

.stat-num {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 50px;
  line-height: 1;
  color: var(--accent);
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.post-body .image-caption {
  position: relative;
  margin: 40px 0;
  height: 280px;
  padding: 20px 24px;
  display: flex;
  align-items: flex-end;
  background: var(--sand);
  overflow: hidden;
}

.image-caption .image-placeholder-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-family: "Cormorant Garamond", serif;
  font-size: 80px;
  letter-spacing: -0.04em;
  color: var(--stone);
  opacity: 0.3;
}

.image-caption-inner {
  position: relative;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.shorts-embed {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  margin: 0 auto 24px;
  overflow: hidden;
  border-radius: 12px;
}

.shorts-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-share {
  margin-top: 46px;
  padding-top: 36px;
  border-top: 1px solid var(--sand);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.post-share p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.share-btn {
  border: 1px solid var(--stone);
  background: transparent;
  color: var(--ink-muted);
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  color: var(--cream);
  background: var(--ink);
  border-color: var(--ink);
}

.post-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-section {
  margin-bottom: 46px;
}

.sidebar-label {
  margin: 0 0 16px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: block;
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.45;
  padding: 9px 14px;
  border-left: 2px solid var(--sand);
  transition: color 0.2s, border-color 0.2s, padding-left 0.2s;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--ink);
  border-left-color: var(--accent);
  padding-left: 18px;
}

.sidebar-card,
.sidebar-author-card {
  background: var(--cream);
  padding: 26px 24px;
}

.sidebar-card p,
.sidebar-author-card p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.sidebar-author-card .author-avatar-large {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
}

.sidebar-author-card h4 {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", serif;
  font-size: 20px;
  font-weight: 400;
}

.sidebar-author-card .role {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.sidebar-card a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap 0.2s;
}

.sidebar-card a:hover {
  gap: 12px;
}

.related-posts {
  background: var(--cream);
  padding: 80px 60px;
}

.related-label {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.related-title {
  margin: 0 0 44px;
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  font-weight: 300;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
}

.related-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--warm-white);
  padding: 34px 30px;
  transition: background 0.25s;
}

.related-card:hover {
  background: var(--sand);
}

.related-cat {
  display: block;
  margin-bottom: 14px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.related-card h3 {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
}

.related-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.related-date {
  display: block;
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.12s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

@media (max-width: 1024px) {
  .post-nav {
    padding: 18px 24px;
  }

  .post-nav-links {
    gap: 24px;
  }

  .post-hero-image {
    width: calc(100% - 48px);
    border-radius: 14px;
  }

  .post-layout {
    gap: 46px;
    padding: 62px 24px 90px;
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    position: static;
  }

  .related-posts {
    padding: 64px 24px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .post-sidebar {
    display: none;
  }

  .post-nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 24px;
    min-width: 220px;
    padding: 14px 16px;
    flex-direction: column;
    gap: 12px;
    border-radius: 14px;
    background: rgba(253, 252, 250, 0.95);
    border: 1px solid var(--sand);
    backdrop-filter: blur(12px);
  }

  .post-nav-links.open { display: flex; }

  .post-nav-toggle { display: inline-flex; }

  .post-nav-links .post-nav-cta {
    padding: 0;
    background: transparent;
    color: inherit;
  }

  .post-nav-links .post-nav-cta:hover {
    background: transparent;
    color: var(--ink);
  }

  .post-header {
    padding: 120px 24px 56px;
  }

  .post-meta {
    align-items: flex-start;
    row-gap: 8px;
  }

  .post-meta-divider {
    display: none;
  }

  .post-author,
  .post-date,
  .post-read {
    width: 100%;
  }

  .post-date {
    margin-top: 6px;
  }

  .post-hero-image {
    width: calc(100% - 32px);
    border-radius: 12px;
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
  }

  .post-hero-image img {
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .post-hero-badge {
    left: 24px;
    bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .post-body .stat-row {
    grid-template-columns: 1fr;
  }

  .post-share {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .post-share p {
    width: 100%;
    margin-bottom: 2px;
  }

}

@media (min-width: 1024px) {
  .shorts-embed {
    width: min(100%, 300px);
  }
}
