/* ============================================================
   BLOG  (blog.css)  —  archive + single post.
   ============================================================ */
:root {
  --bg: #0E0E0E;
  --ink: #0E0E0E;
  --accent: #6FBEF0;
  --accent-soft: rgba(111, 190, 240, .12);
  --line: rgba(14, 14, 14, .08);
  --muted: #5b5b62;
  --shadow: 0 30px 80px -30px rgba(14, 14, 14, .25);
}


.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* --- Hero (archive + single share this) --- */
.hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  padding: 140px 0 80px;
  background: #0E0E0E;
}

.hero-orb {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 190, 240, .3), transparent 70%);
  filter: blur(50px);
  top: -150px;
  left: -100px;
  animation: float 12s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(60px, 40px); }
}

.eyebrow {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px);
  border-radius: 40px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  position: relative;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: 20px;
  position: relative;
  max-width: 880px;
}

.hero h1 .a {
  color: var(--accent);
  font-style: italic;
}

.hero-sub {
  font-size: 18px;
  color: rgba(255, 255, 255, .78);
  max-width: 620px;
  position: relative;
}


/* --- Featured post (archive) --- */
.feat {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: center;
  background: #fafafa;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: all .5s;
  margin-bottom: 80px;
}

.feat:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.feat-img {
  aspect-ratio: 5 / 4;
  overflow: hidden;
  position: relative;
}

.feat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s;
}

.feat:hover .feat-img img {
  transform: scale(1.08);
}

.feat-text {
  padding: 50px;
}

.feat-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 18px;
}

.feat-meta .cat {
  color: var(--accent);
  font-weight: 700;
}

.feat-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

.feat-text h2 .a {
  color: var(--accent);
  font-style: italic;
}

.feat-text p {
  color: var(--muted);
  margin-bottom: 24px;
}

.read {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 600;
  transition: gap .3s;
}

.feat:hover .read {
  gap: 16px;
}


/* --- Post grid (archive + single related) --- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.bl {
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  transition: all .5s;
  display: flex;
  flex-direction: column;
}

.bl:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.bl-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.bl-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s;
}

.bl:hover .bl-img img {
  transform: scale(1.08);
}

.bl-body {
  padding: 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bl-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 14px;
}

.bl-meta .cat {
  color: var(--accent);
  font-weight: 700;
}

.bl h3 {
  font-family: 'Playfair Display', serif;
  font-size: 21px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.bl p {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 18px;
  flex: 1;
}

.bl .read {
  font-size: 14px;
}


/* --- Title links inherit theme color (not browser blue/purple) --- */
.feat-text h2 a,
.bl h3 a {
  color: var(--ink);
  text-decoration: none;
  transition: color .3s;
}

.feat-text h2 a:hover,
.bl h3 a:hover {
  color: var(--accent);
}

.feat-text h2 a:visited,
.bl h3 a:visited {
  color: var(--ink);
}


/* --- Newsletter --- */
.newsletter {
  margin-top: 90px;
  background: #0E0E0E;
  color: #fff;
  border-radius: 28px;
  padding: 60px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.newsletter::before {
  content: "";
  position: absolute;
  top: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 190, 240, .3), transparent 70%);
  filter: blur(40px);
}

.nl-left {
  position: relative;
}

.nl-left h2 {
  font-family: 'Playfair Display', serif;
  font-size: 38px;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -.02em;
}

.nl-left h2 .a {
  color: var(--accent);
  font-style: italic;
}

.nl-left p {
  color: rgba(255, 255, 255, .7);
}

.nl-form {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(14px);
  border-radius: 60px;
  padding: 6px;
}

.nl-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 15px;
}

.nl-form input::placeholder {
  color: rgba(255, 255, 255, .5);
}

.nl-form button {
  padding: 14px 26px;
  background: var(--accent);
  color: #0E0E0E;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .3s;
}

.nl-form button:hover {
  background: #fff;
}


/* --- Single post hero variant --- */
.post-hero {
  min-height: 45vh;
}


/* --- Single post body --- */
.post-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
}

.post-thumb {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.post-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.post-content {
  font-size: 17px;
  line-height: 1.8;
  color: #2a2a2e;
}

.post-content > * + * {
  margin-top: 24px;
}

.post-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin-top: 48px;
  margin-bottom: 0;
}

.post-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 23px;
  margin-top: 36px;
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content ul,
.post-content ol {
  padding-left: 24px;
}

.post-content li {
  margin-top: 8px;
}

.post-content img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 24px;
  margin-left: 0;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-style: italic;
  color: var(--ink);
}

.post-content code {
  background: #f4f4f6;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 15px;
}


/* --- Tags --- */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 50px;
}

.post-tag {
  padding: 8px 16px;
  background: var(--accent-soft, rgba(111, 190, 240, .12));
  border: 1px solid rgba(111, 190, 240, .3);
  color: var(--accent);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  transition: all .3s;
}

.post-tag:hover {
  background: var(--accent);
  color: #0E0E0E;
}


/* --- Prev / Next --- */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.pn {
  flex: 1;
  min-width: 220px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-weight: 600;
  font-size: 14.5px;
  transition: all .3s;
}

.pn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.pn-next {
  text-align: right;
}


/* --- Pagination --- */
.archive-pagination {
  margin-top: 60px;
  text-align: center;
}

.archive-pagination .nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.archive-pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 50px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: all .3s;
}

.archive-pagination .page-numbers:hover {
  background: rgba(111, 190, 240, .1);
  color: var(--accent);
  border-color: var(--accent);
}

.archive-pagination .page-numbers.current {
  background: #0E0E0E;
  color: #fff;
  border-color: #0E0E0E;
}

.archive-pagination .page-numbers.dots {
  border: none;
  background: transparent;
}


/* --- Single post layout with right TOC rail --- */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr);
  align-items: start;
  gap: 0;
}

.post-layout .post-wrap {
  grid-column: 2;
  width: 100%;
  margin: 0;
}

.post-layout.no-toc .post-wrap {
  grid-column: 2;
}

.toc-wrap {
  grid-column: 3;
  padding-left: 40px;
}

.toc {
  position: sticky;
  top: 110px;
  max-width: 280px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
}


.toc-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.toc-list li {
  margin: 0;
}

.toc-list a {
  display: block;
  padding: 8px 0 8px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  transition: all .25s;
}

.toc-list a:hover {
  color: var(--ink);
}

.toc-list a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* Mobile toggle button — hidden on desktop */
.toc-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.toc-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform .3s;
}

.toc.open .toc-toggle svg {
  transform: rotate(180deg);
}


/* --- Reveal animation --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(.2, .8, .2, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }


/* --- Responsive --- */
@media (max-width: 900px) {
  .grid,
  .feat,
  .newsletter {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feat-text,
  .newsletter {
    padding: 30px;
  }

  section {
    padding: 60px 0;
  }

  .post-nav {
    flex-direction: column;
  }

  .pn-next {
    text-align: left;
  }
}

/* TOC rail folds into a tappable box once the column + rail no longer fit */
@media (max-width: 1080px) {
  .post-layout {
    display: block;
  }

  .post-layout .post-wrap {
    width: min(760px, 100%);
    margin: 0 auto;
  }

  .toc-wrap {
    padding-left: 0;
    width: min(760px, 100%);
    margin: 0 auto 28px;
  }

  .toc {
    position: static;
    max-width: none;
  }

  .toc-toggle {
    display: flex;
  }

  .toc-head {
    display: none;
  }

  .toc-list {
    display: none;
    margin-top: 14px;
    border-left: none;
  }

  .toc.open .toc-list {
    display: block;
  }

  .toc-list a {
    border-left: 2px solid var(--line);
  }
}