/* ── Blog Layout ── */
.blog-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.blog-container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 64px;
  width: 100%;
}

.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 64px 0 0;
}

.blog-logo {
  text-decoration: none;
}

.blog-logo img {
  width: 64px;
  height: auto;
}

.blog-header-right {
  display: flex;
  align-items: center;
}

/* ── Blog Body (content + sidebar) ── */
.blog-body {
  display: flex;
  gap: 40px;
}

.blog-main {
  flex: 1;
  min-width: 0;
}

.blog-sidebar {
  flex-shrink: 0;
  width: auto;
  padding-top: 4px;
}

.blog-sidebar .side-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
}

/* ── Sticky states ── */
.scroll-indicator.is-stuck {
  position: fixed !important;
  z-index: 10000;
}

.side-nav.is-stuck {
  position: fixed !important;
  z-index: 10000;
}

.sticky-placeholder {
  visibility: hidden;
  pointer-events: none;
}

/* ── Scroll Indicator (matches homepage) ── */
.blog-page .scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: 1.3px;
  color: #00FFCC;
}

.blog-page .scroll-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.25s;
}

.blog-page .scroll-btn:hover {
  opacity: 1;
}

.blog-page .scroll-value {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #00FFCC;
}

.blog-page .scroll-value .bracket {
  opacity: 0.45;
}

.blog-page #scrollPercent {
  min-width: 3ch;
  text-align: center;
}

/* ── Side Nav (matches homepage) ── */
.blog-page .side-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: 1.3px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}

.blog-page .side-nav a:hover {
  color: #fff;
}

/* ── Blog Footer ── */
.blog-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 64px 60px;
  width: 100%;
}


.blog-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 40px;
}

.blog-footer-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-footer-left img {
  width: 160px;
  height: auto;
}

.blog-copyright {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: 1.3px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.blog-footer-right {
  display: flex;
  gap: 24px;
}

.blog-footer-right a {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: color 0.25s ease;
}

.blog-footer-right a:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* ── News Index ── */
.news-page {
  padding-bottom: 80px;
}

.news-hero {
  padding: 80px 0 72px;
}

.news-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.news-page h1 {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 48px;
  line-height: 100%;
  letter-spacing: -1.92px;
  margin-bottom: 24px;
}

.news-subtitle {
  font-size: 18px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.18px;
  max-width: 580px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.news-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding-top: 24px;
  position: relative;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 0;
  border-top: 1px dashed rgba(221, 221, 221, 0.5);
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 28px;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 56px;
  height: 56px;
  background: #010101;
}

.news-card-img::before {
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 28px;
  height: 28px;
  border-right: 1px dashed rgba(255, 255, 255, 0.25);
  border-top: 1px dashed rgba(255, 255, 255, 0.25);
  z-index: 2;
}

.news-card-body {
  display: flex;
  flex-direction: column;
  gap: 21px;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.news-card-meta time {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: 1.3px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.news-card-topics {
  display: flex;
  gap: 6px;
}

.news-card-topics .badge {
  padding: 4px 12px;
  font-size: 10px;
}

.news-card h3 {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 21px;
  line-height: 120%;
  letter-spacing: -0.84px;
}

.news-card p {
  font-size: 16px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.16px;
}

.news-read-more {
  margin-top: 8px;
  font-size: 12px;
}

/* ── Single Post ── */
.post {
  padding-bottom: 80px;
}

.post-cover {
  margin: 60px 0 32px;
}

.post-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.post-author time {
  color: inherit;
}

.post-author-sep {
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.2);
}

.post-title {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 48px;
  line-height: 110%;
  letter-spacing: -1.92px;
  margin-bottom: 24px;
  max-width: 800px;
}

.post-author {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: 1.3px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  margin-bottom: 48px;
}

.post-cover {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  position: relative;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-cover::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 56px;
  height: 56px;
  background: #010101;
}

.post-meta {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  padding-top: 8px;
}

/* ── Post Body (Markdown content) ── */
.post-body {
  max-width: 720px;
}

.post-body h2 {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 28px;
  line-height: 120%;
  letter-spacing: -1.12px;
  margin-top: 56px;
  margin-bottom: 20px;
}

.post-body h3 {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 21px;
  line-height: 120%;
  letter-spacing: -0.84px;
  margin-top: 40px;
  margin-bottom: 16px;
}

.post-body p {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.18px;
  margin-bottom: 24px;
}

.post-body img {
  width: 100%;
  height: auto;
  display: block;
  margin: 32px 0;
}

.post-body ul,
.post-body ol {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.18px;
  margin-bottom: 24px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 8px;
}

.post-body blockquote {
  border-left: 2px dashed rgba(0, 255, 204, 0.4);
  padding-left: 24px;
  margin: 32px 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
}

.post-body pre {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(221, 221, 221, 0.15);
  border-radius: 8px;
  padding: 24px;
  margin: 32px 0;
  overflow-x: auto;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.post-body code {
  font-family: 'DM Mono', monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: #00FFCC;
}

.post-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

.post-body a {
  color: #00FFCC;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 255, 204, 0.3);
  transition: border-color 0.25s;
}

.post-body a:hover {
  border-color: #00FFCC;
}

.post-body hr {
  border: none;
  border-top: 1px dashed rgba(221, 221, 221, 0.15);
  margin: 48px 0;
}

/* ── Related Posts ── */
.post-related {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.post-related h3 {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 21px;
  line-height: 100%;
  letter-spacing: -0.84px;
  margin-bottom: 32px;
}

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

.post-related-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px dashed rgba(221, 221, 221, 0.15);
  border-radius: 8px;
  transition: border-color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-related-card:hover {
  border-color: rgba(0, 255, 204, 0.3);
  transform: translateY(-2px);
}

.post-related-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-related-card h4 {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 18px;
  line-height: 120%;
  letter-spacing: -0.72px;
}

.post-related-card p {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Back Link ── */
.post-back {
  margin-top: 56px;
}

/* ── Mobile Nav (Blog) ── */
.blog-mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 30000;
  background: rgba(1, 1, 1, 0.6);
  backdrop-filter: blur(8px);
  border: 1px dashed rgba(221, 221, 221, 0.5);
  border-radius: 111px;
  padding: 8px 16px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s, border-color 0.3s;
  white-space: nowrap;
}

.blog-mobile-nav-toggle:hover {
  color: #fff;
  border-color: rgba(221, 221, 221, 0.8);
}

.blog-mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40000;
  background: rgba(1, 1, 1, 0.92);
  backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.blog-mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.blog-mobile-nav-overlay a {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: 1.3px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}

.blog-mobile-nav-overlay a:hover {
  color: #fff;
}

.blog-mobile-nav-close {
  position: absolute;
  top: 32px;
  right: 32px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
}

.blog-mobile-nav-close:hover {
  color: #fff;
}

/* ════════════════════════════════════════════
   TABLET  (≤ 1024px)
   ════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .blog-container {
    padding: 0 40px;
  }

  .blog-header {
    padding: 40px 0 0;
  }

  .blog-footer {
    padding: 60px 40px 48px;
  }

  .news-page h1 {
    font-size: 40px;
    letter-spacing: -1.6px;
  }

  .post-title {
    font-size: 40px;
    letter-spacing: -1.6px;
  }
}

/* ════════════════════════════════════════════
   MOBILE  (≤ 768px)
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  .blog-container {
    padding: 0 24px;
  }

  .blog-header {
    padding: 24px 0 0;
  }

  .blog-page .scroll-indicator {
    position: fixed;
    top: 24px;
    right: 96px;
    z-index: 30000;
    flex-direction: row;
    gap: 6px;
    background: rgba(1, 1, 1, 0.6);
    backdrop-filter: blur(8px);
    border: 1px dashed rgba(221, 221, 221, 0.5);
    border-radius: 111px;
    padding: 8px 16px;
  }

  .blog-page .scroll-indicator .scroll-btn {
    padding: 2px;
  }

  .blog-page .scroll-indicator .scroll-btn img {
    width: 12px;
    height: 12px;
  }

  .blog-body {
    flex-direction: column;
  }

  .blog-sidebar {
    display: none;
  }

  .blog-mobile-nav-toggle {
    display: block;
  }

  .blog-mobile-nav-overlay {
    display: flex;
  }

  .blog-footer {
    padding: 48px 24px 36px;
  }

  .blog-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .blog-footer-right {
    flex-direction: column;
    gap: 12px;
  }

  .news-hero {
    padding: 48px 0 40px;
  }

  .news-page h1 {
    font-size: 32px;
    letter-spacing: -1.28px;
  }

  .news-subtitle {
    font-size: 16px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .news-card h3 {
    font-size: 18px;
  }

  .news-card p {
    font-size: 14px;
  }

  .post-cover {
    margin: 32px 0 24px;
    aspect-ratio: 16 / 9;
  }

  .post-title {
    font-size: 32px;
    letter-spacing: -1.28px;
    max-width: 100%;
  }

  .post-author {
    margin-bottom: 32px;
  }

  .post-body {
    max-width: 100%;
  }

  .post-body h2 {
    font-size: 24px;
    margin-top: 40px;
  }

  .post-body h3 {
    font-size: 18px;
    margin-top: 32px;
  }

  .post-body p,
  .post-body ul,
  .post-body ol {
    font-size: 16px;
  }

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

/* ════════════════════════════════════════════
   SMALL MOBILE  (≤ 480px)
   ════════════════════════════════════════════ */
@media (max-width: 480px) {
  .blog-container {
    padding: 0 16px;
  }

  .blog-footer {
    padding: 36px 16px 28px;
  }

  .news-page h1 {
    font-size: 28px;
    letter-spacing: -1.12px;
  }

  .post-title {
    font-size: 28px;
    letter-spacing: -1.12px;
  }

  .post-body pre {
    padding: 16px;
    font-size: 12px;
  }
}
