/* ==========================================================================
   Mango Ghost Theme - Bento Style
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */

:root {
  /* Colors */
  --primary: #ccff00;
  --primary-hover: #ddeb49;
  --bg-main: #f5f5f5;
  --tile-main: #ffffff;
  --text-main: #191314;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-main: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.3);
  --background-dark: #1f230f;

  /* Typography */
  --font-display: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-title: 'Doto', 'Geist', sans-serif;
  --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Martian Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Border Radius */
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-2xl: 2.5rem;
  --radius-3xl: 3rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Layout */
  --container-max: 1400px;
  --content-max: 720px;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background-color: var(--primary);
  color: black;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a1a1aa;
}

/* --------------------------------------------------------------------------
   3. Grid Background Pattern
   -------------------------------------------------------------------------- */

.grid-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image:
    linear-gradient(var(--text-main) 1px, transparent 1px),
    linear-gradient(90deg, var(--text-main) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* --------------------------------------------------------------------------
   4. Layout Container
   -------------------------------------------------------------------------- */

.site-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

@media (min-width: 768px) {
  .site-wrapper {
    padding: 1.5rem 2rem;
  }
}

/* Wider container for post pages */
.post-template .site-wrapper {
  max-width: 1600px;
}

.main-content {
  flex-grow: 1;
}

/* --------------------------------------------------------------------------
   5. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
  h1 { font-size: 4rem; }
  h2 { font-size: 3rem; }
}

p {
  margin-bottom: 1rem;
  line-height: 1.625;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

strong { font-weight: 600; }

.text-mono {
  font-family: var(--font-mono);
}

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 50;
  gap: 2rem;
}

@media (min-width: 768px) {
  .site-header {
    margin-bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  .site-header {
    margin-bottom: 3rem;
  }
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.site-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.site-logo-icon .material-symbols-outlined {
  font-size: 1.5rem;
}

.site-logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

/* Navigation */
.nav-main {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex: 1;
  position: relative;
  z-index: 10;
}

@media (min-width: 1024px) {
  .nav-main {
    display: flex;
  }
}

.nav-main a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s ease;
  cursor: pointer;
  pointer-events: auto !important;
  position: relative;
  z-index: 100;
  padding: 0.75rem 0.5rem;
  display: inline-block;
}

.nav-main a:hover,
.nav-main a.active {
  color: var(--text-main);
}

/* Header Actions */
.header-actions {
  display: none;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .header-actions {
    display: flex;
  }
}

.header-back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

.header-back-link:hover {
  color: var(--text-main);
}

.header-back-link .material-symbols-outlined {
  font-size: 1rem;
}

.header-subscribe-link {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  transition: text-decoration 0.2s ease;
}

.header-subscribe-link:hover {
  text-decoration: underline;
}

.header-signin-btn {
  background-color: var(--text-main);
  color: var(--tile-main);
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: background 0.2s ease;
}

.header-signin-btn:hover {
  background-color: #333;
}

.site-logo-img {
  height: 32px;
  width: auto;
}

/* Header Button */
.header-btn {
  background-color: var(--tile-main);
  border: 1px solid var(--border-main);
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.header-btn:hover {
  background-color: var(--bg-main);
}

/* Mobile Menu */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--tile-main);
  border: 1px solid var(--border-main);
  border-radius: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--tile-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 0.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 100;
}

.nav-mobile.is-open {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  border-radius: 0.5rem;
  pointer-events: auto !important;
  cursor: pointer;
}

.nav-mobile a:hover {
  background: var(--bg-main);
  color: var(--text-main);
}

.nav-mobile-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-main);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-mobile-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--border-main);
  border-radius: 0.5rem;
}

.nav-mobile-back:hover {
  color: var(--text-main);
  background: var(--bg-main);
}

.nav-mobile-back .material-symbols-outlined {
  font-size: 1rem;
}

.nav-mobile-subscribe {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  background: none;
  border: 1px solid var(--border-main);
  border-radius: 0.5rem;
  cursor: pointer;
}

.nav-mobile-signin {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--text-main);
  color: var(--tile-main);
  border-radius: 0.5rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   7. Bento Grid
   -------------------------------------------------------------------------- */

.bento-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .bento-grid {
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   8. Bento Cards (Tiles)
   -------------------------------------------------------------------------- */

.bento-card {
  background-color: var(--tile-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.bento-card:hover {
  border-color: var(--border-hover);
}

/* Card Sizes */
.bento-card-lg {
  padding: 2rem;
}

@media (min-width: 768px) {
  .bento-card-lg {
    padding: 3rem;
  }
}

/* Span variations */
.col-span-2 {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .col-span-2 {
    grid-column: span 2;
  }
}

.row-span-2 {
  grid-row: span 2;
}

/* Card with hover lift */
.bento-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Card with primary border on hover */
.bento-card-accent:hover {
  border-color: var(--primary);
}

/* --------------------------------------------------------------------------
   9. Post Cards
   -------------------------------------------------------------------------- */

.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 280px;
}

.post-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.post-card-badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-main);
  border: 1px solid var(--border-main);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.post-card-icon {
  width: 3rem;
  height: 3rem;
  background: var(--bg-main);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-icon .material-symbols-outlined {
  font-size: 1.5rem;
  color: var(--text-main);
}

.post-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.post-card-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, var(--border-main), transparent);
  margin-bottom: 0.75rem;
}

.post-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.post-card-tag a {
  color: var(--text-muted);
}

.post-card-tag a:hover {
  color: var(--text-main);
}

.post-card-title {
  font-family: var(--font-title);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.post-card-title a:hover {
  color: var(--text-secondary);
}

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.post-card-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-card-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.post-card-status-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-main);
  background: rgba(204, 255, 0, 0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}

/* --------------------------------------------------------------------------
   10. Featured Post Card
   -------------------------------------------------------------------------- */

.featured-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 400px;
}

@media (min-width: 1024px) {
  .featured-card {
    min-height: auto;
  }
}

.featured-card-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  background: transparent;
  border: 1px solid var(--border-main);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 700;
}

.featured-card-content {
  position: relative;
  z-index: 10;
}

.featured-card-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.featured-card-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .featured-card-title {
    font-size: 4rem;
  }
}

.featured-card-excerpt {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 28rem;
  line-height: 1.5;
  font-weight: 500;
}

.featured-card-excerpt strong {
  color: var(--text-main);
  font-weight: 700;
}

.featured-card-actions {
  margin-top: 2rem;
}

/* Decorative elements */
.featured-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16rem;
  height: 16rem;
  background: linear-gradient(to top left, rgba(0,0,0,0.03), transparent);
  border-radius: 100% 0 0 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   11. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-main);
}

.btn-primary:hover {
  transform: scale(1.05);
}

.btn-secondary {
  background-color: var(--tile-main);
  color: var(--text-main);
  border: 1px solid var(--border-main);
}

.btn-secondary:hover {
  background-color: var(--bg-main);
}

.btn-dark {
  background-color: var(--text-main);
  color: var(--tile-main);
}

.btn-dark:hover {
  background-color: var(--primary);
  color: var(--text-main);
}

.btn .material-symbols-outlined {
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   12. Tag Chips
   -------------------------------------------------------------------------- */

.tag-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-main);
  border: 1px solid transparent;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.tag-chip:hover {
  border-color: var(--primary);
  background: var(--tile-main);
  color: var(--text-main);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   13. Section Headers
   -------------------------------------------------------------------------- */

.section-header {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.section-line {
  height: 1px;
  flex-grow: 1;
  background: var(--border-main);
  margin-bottom: 0.375rem;
}

/* --------------------------------------------------------------------------
   14. Pagination
   -------------------------------------------------------------------------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-main);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  background: var(--tile-main);
  border: 1px solid var(--border-main);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.pagination-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
}

.pagination-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pagination-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: 6rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--border-main);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .footer-left {
    justify-content: flex-start;
  }
}

.footer-copyright {
  color: var(--text-main);
}

.footer-separator {
  color: var(--text-muted);
}

.footer-tagline {
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-nav {
    justify-content: flex-end;
  }
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--text-main);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-status-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #22c55e;
}

.footer-status-text {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  color: #22c55e;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* --------------------------------------------------------------------------
   16. Single Post - New Layout
   -------------------------------------------------------------------------- */

/* Post Article Container */
.post-article {
  max-width: 100%;
  overflow-x: hidden;
}

/* Post Header Section */
.post-header-section {
  margin-bottom: 1.5rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1rem;
}

@media (min-width: 768px) {
  .post-header-section {
    margin-bottom: 2rem;
    padding-top: 2rem;
  }
}

@media (min-width: 1024px) {
  .post-header-section {
    margin-bottom: 3rem;
    padding-top: 3rem;
  }
}

.post-header-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .post-header-grid {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 3rem;
  }
}

.post-header-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-header-image {
  flex-shrink: 0;
  width: 100%;
  max-width: 280px;
  display: flex;
  align-items: stretch;
}

@media (min-width: 768px) {
  .post-header-image {
    width: 240px;
  }
}

@media (min-width: 1024px) {
  .post-header-image {
    width: 300px;
  }
}

@media (min-width: 1280px) {
  .post-header-image {
    width: 360px;
  }
}

.post-header-image img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow);
}

.post-meta-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.post-category-badge {
  background: var(--text-main);
  color: var(--tile-main);
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 700;
}

.post-category-badge:hover {
  background: #333;
}

.post-meta-item {
  font-weight: 700;
}

.post-meta-separator {
  color: var(--text-muted);
}

.post-main-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  max-width: 56rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .post-main-title {
    font-size: 6rem;
  }
}

@media (min-width: 1024px) {
  .post-main-title {
    font-size: 6rem;
  }
}

.post-main-excerpt {
  font-size: 1.25rem;
  color: #6b7280;
  font-weight: 500;
  line-height: 1.4;
  max-width: 48rem;
}

@media (min-width: 768px) {
  .post-main-excerpt {
    font-size: 1.875rem;
  }
}

/* Post Grid Layout - 12 Column */
.post-grid-12 {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .post-grid-12 {
    grid-template-columns: 1fr 7fr 3fr;
    gap: 2rem;
  }
}

@media (min-width: 1200px) {
  .post-grid-12 {
    grid-template-columns: 2fr 7fr 3fr;
    gap: 2rem;
  }
}

/* Left Sidebar - 2 columns */
.post-sidebar-left {
  display: none;
  position: sticky;
  top: 3rem;
  padding-right: 1rem;
}

@media (min-width: 1024px) {
  .post-sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }
}

/* Content Area - 10 columns split into 6+4 */
.post-content-area {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1024px) {
  .post-content-area {
    grid-template-columns: 6fr 4fr;
    gap: 3rem;
  }
}

/* Article Content - 6 columns */
.post-article-content {
  min-width: 0;
  background: var(--tile-main);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.1);
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .post-article-content {
    padding: 4rem;
  }
}

/* Right Sidebar - 3 columns */
.post-sidebar-right {
  display: none;
  flex-direction: column;
  gap: 2rem;
  padding-left: 1rem;
}

@media (min-width: 1024px) {
  .post-sidebar-right {
    display: flex;
  }
}

/* Legacy Post Grid (kept for compatibility) */
.post-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1024px) {
  .post-grid {
    grid-template-columns: 180px 1fr;
    gap: 3rem;
  }
}

.post-nav {
  /* Navigation container */
}

.post-nav-title {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.post-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-nav-list li a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding-left: 1rem;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.post-nav-list li a:hover {
  color: var(--text-main);
}

.post-nav-list li a.active {
  color: var(--text-main);
  border-left-color: var(--primary);
}

.post-nav-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-main);
  transition: color 0.2s ease;
}

.post-nav-back:hover {
  color: var(--text-main);
}

.post-nav-back .material-symbols-outlined {
  font-size: 0.875rem;
}

.post-reading-info {
  /* Reading info container */
}

/* Author Box */
.post-author-box {
  /* Author info container */
}

.post-author-info {
  display: flex;
  gap: 0.75rem;
}

.post-author-avatar-link {
  flex-shrink: 0;
}

.post-author-avatar-link img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.post-author-name-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  margin-bottom: 0.25rem;
}

.post-author-name-link:hover {
  text-decoration: underline;
}

.post-author-bio {
  font-size: 0.625rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Tags Box */
.post-tags-box {
  /* Tags container */
}

.post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tag-link {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.post-tag-link:hover {
  background: var(--primary);
  color: var(--text-main);
}

/* Glossary Box */
.post-glossary-box {
  /* Container for glossary items */
}

.post-glossary-item {
  margin-bottom: 1rem;
}

.post-glossary-item:last-child {
  margin-bottom: 0;
}

.post-glossary-term {
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.post-glossary-desc {
  font-size: 0.625rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Diagram Cards (Right Sidebar) */
.post-diagram-card {
  background: var(--tile-main);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.post-diagram-card-dark {
  background: #1a1314;
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.post-diagram-card-light {
  background: rgba(248, 248, 245, 0.5);
  border: none;
  box-shadow: none;
}

.post-diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.post-diagram-title {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.post-diagram-card-dark .post-diagram-title {
  color: rgba(255, 255, 255, 0.4);
}

.post-diagram-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Flowchart/Lifecycle Diagram */
.diagram-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.diagram-flow-node {
  width: 100%;
  height: 3rem;
  background: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
}

.diagram-flow-node-dark {
  background: var(--text-main);
  color: var(--primary);
  border-color: rgba(0, 0, 0, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.diagram-flow-connector {
  width: 1px;
  height: 1.5rem;
  background: rgba(0, 0, 0, 0.1);
}

.diagram-flow-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.diagram-flow-box {
  background: rgba(204, 255, 0, 0.05);
  border: 1px solid rgba(204, 255, 0, 0.2);
  padding: 1rem;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.diagram-flow-box .material-symbols-outlined {
  font-size: 1.5rem;
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 0.5rem;
}

.diagram-flow-box span:last-child {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 900;
}

/* Code Snippet Card */
.post-code-card {
  background: #1a1314;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.post-code-card .post-diagram-header {
  margin-bottom: 1rem;
}

.post-code-card .post-diagram-title {
  color: rgba(255, 255, 255, 0.4);
}

.post-code-card .code-lang {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--primary);
}

.post-code-card pre {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.6;
  color: #d1d5db;
  overflow-x: auto;
  margin: 0;
}

.post-code-card pre .keyword { color: var(--primary); }
.post-code-card pre .string { color: var(--primary); }
.post-code-card pre .function { color: #ffffff; }

/* Performance Chart Card */
.post-perf-card {
  background: rgba(248, 248, 245, 0.5);
  border-radius: 1rem;
  padding: 1.5rem;
  border: none;
}

.post-perf-card .post-diagram-header {
  margin-bottom: 2rem;
}

.perf-bars {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.perf-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.perf-bar-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 900;
}

.perf-bar-track {
  height: 0.75rem;
  background: #e5e7eb;
  border-radius: 0.125rem;
  overflow: hidden;
}

.perf-bar-fill {
  height: 100%;
  border-radius: 0.125rem;
}

.perf-bar-fill-dark { background: rgba(0, 0, 0, 0.2); }
.perf-bar-fill-primary { background: var(--primary); }
.perf-bar-fill-black { background: var(--text-main); }

.perf-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.perf-footer p {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

.post-diagram-img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Tags Grid in Card */
.post-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tag-pill {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: rgba(204, 255, 0, 0.1);
  padding: 0.375rem 0.625rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.post-tag-pill:hover {
  background: var(--primary);
  color: var(--text-main);
}

/* Author Card */
.post-author-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-author-card-img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.post-author-card-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

.post-author-card-name:hover {
  text-decoration: underline;
}

.post-author-card-location {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main Content Area */
.post-main-content {
  min-width: 0;
}

/* Feature Image */
.post-feature-figure {
  margin-bottom: 2rem;
}

.post-feature-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-main);
}

.post-feature-caption {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

/* Prose Content Styles */
.prose {
  max-width: none;
  color: #374151;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  overflow-x: hidden;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: -0.025em;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  padding-bottom: 0.25rem;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.75;
  color: #374151;
}

.prose strong {
  color: var(--text-main);
  font-weight: 700;
}

.prose a {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 2px;
}

.prose a:hover {
  text-decoration-color: var(--text-main);
}

.prose ul,
.prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }

.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.prose blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.prose img {
  border-radius: var(--radius);
  margin: 2rem 0;
  max-width: 100%;
  height: auto;
}

.prose figure {
  margin: 2rem 0;
}

.prose figcaption {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border-main);
  margin: 3rem 0;
}

/* Code Blocks in Prose */
.prose pre {
  background: #1a1314;
  color: #d1d5db;
  padding: 1.5rem;
  border-radius: 1rem;
  overflow-x: auto;
  margin: 2rem 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 100%;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* Syntax Highlighting */
.prose pre .keyword,
.prose pre .hljs-keyword { color: var(--primary); }
.prose pre .string,
.prose pre .hljs-string { color: var(--primary); }
.prose pre .function,
.prose pre .hljs-title { color: #ffffff; }
.prose pre .comment,
.prose pre .hljs-comment { color: #6b7280; }

/* Code Block Wrapper (added by JS) */
.code-block {
  margin: 2rem 0;
  border-radius: 1rem;
  overflow: hidden;
  background: #1a1314;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 100%;
}

.code-block pre {
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-block-language {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.code-copy-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.code-copy-btn:hover {
  color: var(--tile-main);
  background: rgba(255, 255, 255, 0.1);
}

.code-copy-btn.copied {
  color: var(--primary);
}

/* Tables in Prose - Analysis Table Style */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.75rem;
  background: var(--tile-main);
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prose table tbody,
.prose table thead {
  display: table;
  width: 100%;
  min-width: 600px;
}

.prose thead {
  background: var(--text-main);
  color: var(--tile-main);
}

.prose th {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-align: left;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: rgba(255, 255, 255, 0.4);
}

.prose thead th {
  color: rgba(255, 255, 255, 0.4);
}

.prose td {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: top;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.prose tr:last-child td {
  border-bottom: none;
}

.prose tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Table Tags */
.tag-high {
  display: inline-block;
  background: #fee2e2;
  color: #b91c1c;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.tag-medium {
  display: inline-block;
  background: #ffedd5;
  color: #c2410c;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.tag-low {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.5625rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Table wrapper for full-width tables */
.prose .table-wrapper {
  margin: 2.5rem -2rem;
  background: rgba(249, 250, 251, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.prose .table-wrapper table {
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.prose .table-header {
  background: var(--text-main);
  color: var(--tile-main);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prose .table-header h3 {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0;
  color: var(--tile-main);
}

.prose .table-header p {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0.25rem 0 0 0;
  text-transform: uppercase;
}

.prose .table-header span {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--primary);
  font-weight: 700;
}

/* Legacy Post Styles (kept for compatibility) */
.post-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.post-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.post-content ul { list-style-type: disc; }
.post-content ol { list-style-type: decimal; }

.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.post-content a {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 2px;
}

.post-content a:hover {
  text-decoration-color: var(--text-main);
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.post-content figure {
  margin: 2rem 0;
}

.post-content figcaption {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border-main);
  margin: 2rem 0;
}

/* Code Blocks */
.post-content pre {
  background: var(--background-dark);
  color: #f8f8f2;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.post-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-content p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.post-content ul { list-style-type: disc; }
.post-content ol { list-style-type: decimal; }

.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.post-content a {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 2px;
}

.post-content a:hover {
  text-decoration-color: var(--text-main);
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.post-content figure {
  margin: 2rem 0;
}

.post-content figcaption {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border-main);
  margin: 2rem 0;
}

/* Code Blocks */
.post-content pre {
  background: var(--background-dark);
  color: #f8f8f2;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
}

.post-content pre code {
  background: none;
  padding: 0;
}

/* Post page header adjustment */
.post-template .site-header {
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .post-template .site-header {
    margin-bottom: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .post-template .site-header {
    margin-bottom: 2rem;
  }
}

/* --------------------------------------------------------------------------
   17. Table of Contents
   -------------------------------------------------------------------------- */

.toc {
  position: sticky;
  top: 6rem;
  background: var(--tile-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}

.toc-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-list a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--text-main);
  border-left-color: var(--primary);
}

.toc-list a.toc-h3 {
  padding-left: 1.5rem;
  font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   18. Related Posts
   -------------------------------------------------------------------------- */

.related-posts {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-main);
}

.related-posts .section-header {
  margin-bottom: 2rem;
}

.related-posts .section-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  text-transform: uppercase;
}

.related-posts-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   19. Archive Pages (Tag, Author)
   -------------------------------------------------------------------------- */

.archive-header {
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 2rem;
  background: var(--tile-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-2xl);
}

.archive-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.archive-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.archive-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.6;
}

.archive-count {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Author */
.author-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem;
  margin-bottom: 2rem;
  background: var(--tile-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-2xl);
}

.author-avatar {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 3px solid var(--primary);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.author-location {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.author-bio {
  max-width: 500px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.author-social {
  display: flex;
  gap: 0.75rem;
}

.author-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border-main);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.author-social a:hover {
  border-color: var(--primary);
  background: var(--primary);
}

/* --------------------------------------------------------------------------
   20. Error Page
   -------------------------------------------------------------------------- */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  color: var(--primary);
  margin-bottom: 1rem;
}

.error-title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  margin-bottom: 1rem;
}

.error-description {
  color: var(--text-secondary);
  max-width: 400px;
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   21. Ghost Card Styles (KG Cards)
   -------------------------------------------------------------------------- */

/* Bookmark */
.kg-bookmark-card {
  margin: 1.5rem 0;
}

.kg-bookmark-container {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-main);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.kg-bookmark-container:hover {
  border-color: var(--primary);
}

@media (min-width: 768px) {
  .kg-bookmark-container {
    flex-direction: row;
  }
}

.kg-bookmark-content {
  flex: 1;
  padding: 1rem;
}

.kg-bookmark-title {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.kg-bookmark-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kg-bookmark-icon {
  width: 1rem;
  height: 1rem;
}

.kg-bookmark-thumbnail {
  flex-shrink: 0;
  width: 100%;
  max-height: 200px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .kg-bookmark-thumbnail {
    width: 200px;
    max-height: none;
  }
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Callout */
.kg-callout-card {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  display: flex;
  gap: 0.75rem;
}

.kg-callout-card-grey { background: rgba(0,0,0,0.03); }
.kg-callout-card-white { background: var(--tile-main); border: 1px solid var(--border-main); }
.kg-callout-card-blue { background: rgba(59, 130, 246, 0.1); }
.kg-callout-card-green { background: rgba(34, 197, 94, 0.1); }
.kg-callout-card-yellow { background: rgba(251, 191, 36, 0.1); }
.kg-callout-card-red { background: rgba(239, 68, 68, 0.1); }
.kg-callout-card-pink { background: rgba(236, 72, 153, 0.1); }
.kg-callout-card-purple { background: rgba(139, 92, 246, 0.1); }
.kg-callout-card-accent { background: rgba(204, 255, 0, 0.15); }

.kg-callout-emoji {
  font-size: 1.25rem;
  line-height: 1.4;
}

.kg-callout-text {
  line-height: 1.6;
}

.kg-callout-text p:last-child {
  margin-bottom: 0;
}

/* Image */
.kg-image-card {
  margin: 1.5rem 0;
}

.kg-image-card img {
  border-radius: var(--radius);
}

/* Wide Images */
.kg-width-wide {
  max-width: calc(var(--content-max) + 200px);
  width: calc(100vw - 4rem);
  margin-left: calc(50% - 50vw + 2rem);
  margin-right: calc(50% - 50vw + 2rem);
}

.kg-width-wide img {
  width: 100%;
  border-radius: var(--radius);
}

/* Full Width Images */
.kg-width-full {
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.kg-width-full img {
  width: 100%;
  border-radius: 0;
}

/* Gallery */
.kg-gallery-card {
  margin: 1.5rem 0;
}

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kg-gallery-row {
  display: flex;
  gap: 0.5rem;
}

.kg-gallery-image {
  flex: 1;
}

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Button */
.kg-button-card {
  margin: 1.5rem 0;
  text-align: center;
}

.kg-button-card.kg-align-left {
  text-align: left;
}

.kg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  background: var(--text-main);
  color: var(--tile-main);
  transition: all 0.2s ease;
}

.kg-btn:hover {
  background: var(--primary);
  color: var(--text-main);
}

.kg-btn-accent {
  background: var(--primary);
  color: var(--text-main);
}

/* Toggle */
.kg-toggle-card {
  margin: 1.5rem 0;
  border: 1px solid var(--border-main);
  border-radius: var(--radius);
}

.kg-toggle-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  cursor: pointer;
}

.kg-toggle-heading h4 {
  flex: 1;
  margin: 0;
  font-size: 1rem;
}

.kg-toggle-card-icon {
  transition: transform 0.2s ease;
}

.kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon {
  transform: rotate(180deg);
}

.kg-toggle-content {
  padding: 0 1rem 1rem;
  display: none;
}

.kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-content {
  display: block;
}

/* --------------------------------------------------------------------------
   22. Utilities
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

/* Material Symbols */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

/* Glass Panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* --------------------------------------------------------------------------
   23. Homepage Hero
   -------------------------------------------------------------------------- */

.hero-section {
  background: var(--tile-main);
  border-radius: var(--radius-3xl);
  overflow: hidden;
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
  transition: border-color 0.3s ease;
}

.hero-section:hover {
  border-color: var(--border-hover);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 400px;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
    min-height: 420px;
  }
}

.hero-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 2.5rem 3rem;
  }
}

.hero-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

.hero-excerpt {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 32rem;
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .hero-excerpt {
    font-size: 1.125rem;
  }
}

.hero-image {
  background: var(--bg-main);
  position: relative;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-image {
    padding: 2rem;
  }
}

.hero-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-xl);
  position: relative;
  z-index: 1;
}

.hero-image img.hero-image-fit {
  object-fit: contain;
  background: var(--primary);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-xl);
  max-height: 350px;
  max-width: calc(100% - 1rem);
  padding: 1rem;
}

@media (min-width: 768px) {
  .hero-image img.hero-image-fit {
    max-height: 320px;
    padding: 1.5rem;
  }
}

.hero-dot-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.hero-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}

.hero-image-placeholder span {
  font-family: var(--font-title);
  font-size: 8rem;
  color: rgba(0, 0, 0, 0.1);
  line-height: 1;
}

@media (min-width: 768px) {
  .hero-image-placeholder span {
    font-size: 10rem;
  }
}

/* Dot Matrix Background */
.dot-matrix-bg {
  background-image: radial-gradient(var(--text-main) 20%, transparent 20%), radial-gradient(var(--text-main) 20%, transparent 20%);
  background-position: 0 0, 2px 2px;
  background-size: 4px 4px;
}

/* --------------------------------------------------------------------------
   Featured Posts Section (Dark)
   -------------------------------------------------------------------------- */
.featured-dark-section {
  background: var(--text-main);
  color: var(--tile-main);
  border-radius: var(--radius-3xl);
  padding: 2.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .featured-dark-section {
    padding: 3.5rem;
  }
}

.featured-dark-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 16rem;
  height: 16rem;
  background: rgba(204, 255, 0, 0.1);
  filter: blur(100px);
  pointer-events: none;
}

.featured-dark-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.featured-dark-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.featured-dark-line {
  width: 2rem;
  height: 1px;
  background: var(--primary);
}

.featured-dark-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--primary);
}

.featured-dark-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  display: none;
}

@media (min-width: 768px) {
  .featured-dark-label {
    display: block;
  }
}

.featured-dark-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .featured-dark-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.featured-dark-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

@media (min-width: 480px) {
  .featured-dark-card {
    grid-template-columns: auto 1fr;
  }
}

.featured-dark-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.featured-dark-card-icon {
  width: 5rem;
  height: 5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.featured-dark-card-dot {
  position: absolute;
  inset: 0;
  opacity: 0.1;
}

.featured-dark-card-icon .material-symbols-outlined {
  font-size: 1.875rem;
  color: var(--primary);
  position: relative;
  z-index: 1;
}

.featured-dark-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.featured-dark-card-tag {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.featured-dark-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tile-main);
  transition: color 0.2s ease;
}

.featured-dark-card:hover .featured-dark-card-title {
  color: var(--primary);
}

.section-view-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.section-view-all:hover {
  color: var(--text-main);
}

.section-view-all .material-symbols-outlined {
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   24. Main Content Layout
   -------------------------------------------------------------------------- */

.main-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1024px) {
  .main-grid {
    grid-template-columns: 3fr 1fr;
  }
}

.sidebar {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* --------------------------------------------------------------------------
   25. Article Cards (Magazine Style)
   -------------------------------------------------------------------------- */

.articles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.articles-title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.articles-view-toggle {
  display: flex;
  gap: 0.5rem;
}

.view-toggle-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid var(--border-main);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.view-toggle-btn:hover {
  background: var(--tile-main);
}

.view-toggle-btn.active {
  background: var(--tile-main);
}

.view-toggle-btn:not(.active) {
  opacity: 0.4;
}

.view-toggle-btn .material-symbols-outlined {
  font-size: 0.875rem;
}

.articles-grid {
  display: grid;
  gap: 2rem 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 2rem;
  }
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-card-image {
  aspect-ratio: 4 / 3;
  background: var(--text-main);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card-image-placeholder .dot-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.1;
}

.article-card-image-number {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
}

.article-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.article-card-meta .separator {
  color: var(--text-muted);
}

.article-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.article-card:hover .article-card-title {
  text-decoration: underline;
}

.article-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Line Clamp Utility */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Image Variants */
.article-card-image.bg-primary {
  background: var(--primary);
}

.article-card-image.bg-white {
  background: var(--tile-main);
}

.article-card-image.bg-gray {
  background: var(--bg-main);
}

/* --------------------------------------------------------------------------
   26. Sidebar
   -------------------------------------------------------------------------- */

.sidebar-subscribe {
  background: var(--primary);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-subscribe-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.sidebar-subscribe-text {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.sidebar-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-subscribe-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.sidebar-subscribe-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.sidebar-subscribe-btn {
  width: 100%;
  background: var(--text-main);
  color: var(--tile-main);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sidebar-subscribe-btn:hover {
  background: #333;
}

/* --------------------------------------------------------------------------
   27. Section Styles
   -------------------------------------------------------------------------- */

.section-divider {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 4rem;
  margin-top: 4rem;
}

.section-header-flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
}

.section-title-large {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}

@media (min-width: 768px) {
  .section-title-large {
    font-size: 2.5rem;
  }
}

.section-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  border-bottom: 1px solid var(--text-main);
  padding-bottom: 0.25rem;
  transition: color 0.2s ease;
}

.section-link:hover {
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   28. Deep Dive Cards
   -------------------------------------------------------------------------- */

.deep-dive-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .deep-dive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.deep-dive-card {
  background: var(--tile-main);
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-main);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.deep-dive-card:hover {
  border-color: var(--border-hover);
}

.deep-dive-card.dark {
  background: #1a1a1a;
  color: white;
  border-color: rgba(255, 255, 255, 0.05);
}

.deep-dive-image {
  height: 14rem;
  margin-bottom: 2rem;
  background: var(--bg-main);
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.deep-dive-card.dark .deep-dive-image {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.deep-dive-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.deep-dive-card:hover .deep-dive-title {
  text-decoration: underline;
}

.deep-dive-card.dark:hover .deep-dive-title {
  color: var(--primary);
  text-decoration: none;
}

.deep-dive-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 28rem;
}

.deep-dive-card.dark .deep-dive-excerpt {
  color: rgba(255, 255, 255, 0.6);
}

.deep-dive-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.deep-dive-tag {
  background: var(--text-main);
  color: var(--tile-main);
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
}

.deep-dive-card.dark .deep-dive-tag {
  background: var(--primary);
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   29. Knowledge Base Grid
   -------------------------------------------------------------------------- */

.knowledge-section {
  padding: 3rem 2rem;
  background: var(--bg-main);
  border-radius: var(--radius-3xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .knowledge-section {
    padding: 3rem;
  }
}

.knowledge-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 1024px) {
  .knowledge-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.knowledge-card {
  background: var(--tile-main);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.knowledge-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.knowledge-card-icon {
  font-size: 1.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

.knowledge-card:hover .knowledge-card-icon {
  color: var(--primary);
}

.knowledge-card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.knowledge-card:hover .knowledge-card-title {
  text-decoration: underline;
}

.knowledge-card-subtitle {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   30. Updates Grid
   -------------------------------------------------------------------------- */

.updates-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .updates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .updates-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.updates-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.updates-column-title {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.updates-item {
  display: block;
}

.updates-item-date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.updates-item-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
}

.updates-item:hover .updates-item-title {
  text-decoration: underline;
}

/* Quote Card */
.quote-card {
  grid-column: span 1;
  background: var(--tile-main);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

@media (min-width: 768px) {
  .quote-card {
    grid-column: span 2;
  }
}

.quote-content {
  max-width: 300px;
}

.quote-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.quote-text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.4;
}

.quote-author {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.quote-icon {
  width: 6rem;
  height: 6rem;
  background: var(--primary);
  border-radius: var(--radius);
  transform: rotate(12deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.quote-icon .material-symbols-outlined {
  font-size: 2rem;
}

/* --------------------------------------------------------------------------
   31. Community Updates Section
   -------------------------------------------------------------------------- */

.community-section {
  padding: 3rem 0;
}

.community-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.community-title-line {
  height: 1px;
  flex-grow: 1;
  background: var(--border-main);
}

.community-grid {
  column-count: 1;
  column-gap: 1.5rem;
}

@media (min-width: 768px) {
  .community-grid {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .community-grid {
    column-count: 3;
  }
}

.community-card {
  break-inside: avoid;
  background: var(--tile-main);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.community-card:hover {
  box-shadow: var(--shadow);
}

.community-card.highlight {
  background: var(--primary);
}

.community-card.dark {
  background: var(--text-main);
  color: var(--tile-main);
}

.community-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.community-card-type {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.community-card.highlight .community-card-type {
  color: rgba(0, 0, 0, 0.6);
}

.community-card.dark .community-card-type {
  color: var(--primary);
}

.community-card-icon {
  font-size: 1.125rem;
  color: var(--border-main);
}

.community-card.highlight .community-card-icon {
  color: rgba(0, 0, 0, 0.4);
}

.community-card.dark .community-card-icon {
  color: rgba(255, 255, 255, 0.4);
}

.community-card-text {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
}

.community-card-text a:hover {
  text-decoration: underline;
}

.community-card-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--text-main);
  color: var(--tile-main);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-align: center;
  border-radius: 0.5rem;
  letter-spacing: 0.1em;
  transition: background 0.2s ease;
}

.community-card-btn:hover {
  background: #333;
}

.community-card-time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.community-card-version {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--primary);
  border-radius: 0.25rem;
}

/* --------------------------------------------------------------------------
   32. Footer Mobile Fixes
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .site-footer {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding-bottom: 2rem;
  }

  .footer-left {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-separator {
    display: none;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
  }
}
