:root {
  --bg: #0b0f17;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #7c3aed;
  --border: rgba(255,255,255,0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* layout */
.container {
  width: min(1100px, 92%);
  margin: auto;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(11,15,23,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.logo {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
  line-height: 1;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text small {
  font-size: 12px;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 18px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 22px;
  color: var(--text);
}

/* hero */
.hero {
  padding: 40px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

/* Mobile hero alignment */
@media (max-width: 768px) {

  .hero-content {
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

}

.hero h1 {
  font-size: 44px;
  line-height: 1.1;
}

.hero p {
  margin-top: 14px;
  color: var(--muted);
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
}

.primary {
  background: var(--accent);
  color: white;
}

.ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.hero-media img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
}

/* section */
.section {
  padding: 60px 0;
}

.section h2 {
  font-size: 28px;
}

.section > p {
  color: var(--muted);
  margin-top: 6px;
}

/* grid */
.grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

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

.card-body {
  padding: 14px;
}

.card h3 {
  margin-top: 6px;
  font-size: 16px;
}

.card p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
}

.site-footer a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-top: 6px;
}

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

.copyright {
  margin-top: 20px;
  color: var(--muted);
}

/* --- POST SPECIFIC STYLING --- */

.post {
  padding: 60px 0;
}

.article {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  max-width: 780px;
  margin: 0 auto;
}

/* Breadcrumbs & Meta (Added for consistency) */
.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.subtitle {
  font-size: 18px;
  color: var(--muted);
  margin: 14px 0;
  line-height: 1.5;
}

.meta {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

/* Typography spacing system */
.article h1 {
  font-size: 34px;
  line-height: 1.2;
}

.article h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.article h3 {
  font-size: 18px;
  margin-top: 14px;
  color: #f3f4f6;
}

.article p {
  margin: 14px 0;
  color: #d1d5db;
  font-size: 16px;
}

.article section {
  margin-top: 42px;
  padding-top: 6px;
}

.article ul,
.article ol {
  margin: 14px 0 14px 20px;
  color: #d1d5db;
}

.article li {
  margin: 8px 0;
}

/* TOC */
.toc {
  margin: 28px 0;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
}

.toc h2 {
  font-size: 16px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.toc a {
  color: var(--accent);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* In-post Grid Layout (Missing class from your HTML) */
.grid-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.grid-two div {
  background: rgba(255,255,255,0.02);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.grid-two h3 {
  margin-top: 0;
  color: var(--accent);
}

/* Post CTA */
.cta {
  margin-top: 40px;
  padding: 32px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  text-align: center;
  color: white;
}

.cta h2 {
  color: white;
}

.cta p {
  color: rgba(255,255,255,0.9);
}

.cta .btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 20px;
  background: white;
  color: #111827;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-toggle {
    display: block;
  }
  .nav {
    display: none;
    position: absolute;
    right: 20px;
    top: 60px;
    flex-direction: column;
    background: var(--panel);
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .nav.open {
    display: flex;
  }
}

@media (max-width: 600px) {
  .grid, .grid-two, .footer-grid {
    grid-template-columns: 1fr;
  }

  
  .hero h1, .article h1 {
    font-size: 32px;
  }
  .article {
    padding: 20px;
  }
}


/* --- 2-COLUMN HUB LAYOUT --- */
.hub-grid {
  margin-top: 20px;
  display: grid;
  /* Changed from 3 columns to 2 columns */
  grid-template-columns: repeat(2, 1fr);
  gap: 20px; 
}

.hub-column {
  display: flex;
  flex-direction: column;
  gap: 20px; 
}

.column-title {
  font-size: 22px;
  color: var(--text);
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 2px solid var(--border);
}

/* Itch.io Embed Styling */
.itch-embed {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  transition: transform 0.2s, border-color 0.2s;
  /* Ensure it takes full width of the new wider column */
  width: 100%; 
}

.itch-embed:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* --- Itch.io Embed Mobile Image Fix --- */
.itch-wrapper {
  /* Tells CSS to track the width of this wrapper */
  container-type: inline-size;
  width: 100%;
  /* Locks the height proportion perfectly */
  aspect-ratio: 552 / 167; 
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  transition: transform 0.2s, border-color 0.2s;
}

.itch-wrapper:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.itch-wrapper iframe {
  /* Force it to desktop size so Itch.io NEVER hides the image */
  width: 552px;
  height: 167px;
  border: none;
  transform-origin: top left;
  /* Scales the 552px iframe down dynamically to exactly fit the phone screen */
  transform: scale(calc(100cqi / 552));
}

.itch-link {
  text-align: center;
  display: block;
  margin-top: 10px;
}

/* Update Mobile Breakpoints for the 2-col Hub */
@media (max-width: 900px) {
  .hub-grid {
    grid-template-columns: 1fr; /* Stacks to 1 column on mobile */
    gap: 50px;
  }
}


/* --- HERO AUTO CAROUSEL (SMOOTH FADE) --- */
.hero-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Base slide */
.hero-carousel .slide {
  position: absolute;
  inset: 0;
  opacity: 0;

  animation: heroFade 15s infinite;
  -webkit-animation: heroFade 15s infinite;
}
@-webkit-keyframes heroFade {
  0% { opacity: 0; }
  6% { opacity: 1; }
  20% { opacity: 1; }
  26% { opacity: 0; }
  100% { opacity: 0; }
}

/* Stagger slides (5 total now) */
.hero-carousel .slide-1 { animation-delay: 0s; }
.hero-carousel .slide-2 { animation-delay: 3s; }
.hero-carousel .slide-3 { animation-delay: 6s; }
.hero-carousel .slide-4 { animation-delay: 9s; }
.hero-carousel .slide-5 { animation-delay: 12s; }

/* Image styling */
.hero-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

/* Only zoom active slide (not all images) */
.hero-carousel .slide:hover img {
  transform: scale(1.05);
}

/* Smooth crossfade timeline */
@keyframes heroFade {
  0% {
    opacity: 0;
  }

  6% {
    opacity: 1;
  }

  20% {
    opacity: 1;
  }

  26% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

/* Add this anywhere in your css */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.page-hero {
  padding: 60px 0 30px;
}

.page-hero h1 {
  font-size: 38px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--muted);
  max-width: 720px;
}
.index-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}


/* =========================
   MODERN PAGE LAYOUT
========================= */

.page-hero {
  padding: 4rem 0 2rem;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.meta {
  opacity: 0.6;
  font-size: 0.9rem;
}

/* Card-style content block */
.content-card {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding: 2rem;

  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 16px;

  backdrop-filter: blur(10px);
}

.content-card h2 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.content-card p {
  line-height: 1.6;
  opacity: 0.9;
}