/* ============================================================
   DESIGN SYSTEM — DevBlog
   Stack: Vanilla CSS + Custom Properties
   Grid: 8px base
   Font: Inter (system fallback)
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Dark mode — DEFAULT — 3-layer depth system */
  --bg:          #0B0F19;   /* base layer */
  --surface:     #111827;   /* card / surface layer */
  --elevated:    #1F2937;   /* hover / elevated layer */
  --border:      #1E2535;
  --border-strong:#2D3748;
  --nav-bg:      rgba(11,15,25,.92);

  --text-900:    #F1F5F9;
  --text-700:    #94A3B8;
  --text-500:    #64748B;
  --text-300:    #3E4C5E;

  --accent:      #6366F1;   /* indigo primary */
  --accent-dark: #4F46E5;
  --accent-light:#1e1b4b;
  --accent-text: #A5B4FC;   /* glow / hover */

  --btn-primary-bg:   #F1F5F9;
  --btn-primary-text: #0B0F19;
  --btn-primary-hover:#FFFFFF;

  --code-bg:   #0F1729;
  --code-text: #E2E8F0;

  --success:   #4ADE80;
  --danger:    #F87171;
  --warning:   #FCD34D;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow-sm: 0 2px 4px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.65), 0 4px 10px rgba(0,0,0,.4);
}

/* Light mode overrides */
[data-theme="light"] {
  --bg:          #FAFAF8;
  --surface:     #FFFFFF;
  --elevated:    #F3F4F6;
  --border:      #E8E8E4;
  --border-strong:#D1D1CB;
  --nav-bg:      rgba(250,250,248,.88);

  --text-900:    #171714;
  --text-700:    #3D3D38;
  --text-500:    #737370;
  --text-300:    #ADADAA;

  --accent:      #4F46E5;
  --accent-dark: #3730A3;
  --accent-light:#EEF2FF;
  --accent-text: #3730A3;

  --btn-primary-bg:   #171714;
  --btn-primary-text: #FFFFFF;
  --btn-primary-hover:#4F46E5;

  --code-bg:   #F4F4F5;
  --code-text: #18181B;

  --success:   #16A34A;
  --danger:    #DC2626;
  --warning:   #D97706;

  --shadow-xs: 0 1px 2px rgba(23,23,20,.04);
  --shadow-sm: 0 1px 3px rgba(23,23,20,.06), 0 1px 2px rgba(23,23,20,.04);
  --shadow-md: 0 4px 8px rgba(23,23,20,.06), 0 2px 4px rgba(23,23,20,.04);
  --shadow-lg: 0 12px 24px rgba(23,23,20,.08), 0 4px 8px rgba(23,23,20,.04);
}

:root {
  /* Color — Semantic (non-theme) */
  --white: #FFFFFF;

  /* Typography Scale */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  --text-xs:   0.6875rem;   /* 11px */
  --text-sm:   0.8125rem;   /* 13px */
  --text-base: 1rem;        /* 16px */
  --text-lg:   1.125rem;    /* 18px */
  --text-xl:   1.25rem;     /* 20px */
  --text-2xl:  1.5rem;      /* 24px */
  --text-3xl:  1.875rem;    /* 30px */
  --text-4xl:  2.25rem;     /* 36px */
  --text-5xl:  3rem;        /* 48px */

  --leading-tight:   1.2;
  --leading-snug:    1.35;
  --leading-normal:  1.55;
  --leading-relaxed: 1.7;
  --leading-prose:   1.8;   /* blog içerik okuma */

  /* Spacing — 8px grid */
  --s-1:  0.25rem;   /* 4  */
  --s-2:  0.5rem;    /* 8  */
  --s-3:  0.75rem;   /* 12 */
  --s-4:  1rem;      /* 16 */
  --s-5:  1.25rem;   /* 20 */
  --s-6:  1.5rem;    /* 24 */
  --s-8:  2rem;      /* 32 */
  --s-10: 2.5rem;    /* 40 */
  --s-12: 3rem;      /* 48 */
  --s-16: 4rem;      /* 64 */
  --s-20: 5rem;      /* 80 */
  --s-24: 6rem;      /* 96 */

  /* Shape */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;
  --radius-full:9999px;

  /* Layout */
  --container:     1200px;
  --content-width: 720px;   /* optimal reading line length */
  --sidebar-width: 260px;

  /* Transition */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-700);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }

/* ── LAYOUT ──────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

.container--narrow {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

.site-main {
  flex: 1;
  padding-block: var(--s-12);
}

/* ── NAVBAR ──────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  height: 56px;
  gap: var(--s-8);
}

.site-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}

.site-logo:hover { text-decoration: none; }

.logo-name {
  color: #E5E7EB;
  font-weight: 600;
}

.logo-tld {
  font-family: 'JetBrains Mono', var(--font-mono);
  font-size: 0.9em;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 1px;
  margin-left: 2px;
  align-self: flex-end;
  padding-bottom: 0.05em;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-left: auto;
}

.nav-links a {
  display: inline-block;
  padding: var(--s-2) var(--s-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-500);
  border-radius: var(--radius-md);
  transition: color var(--duration-fast) var(--ease),
              background var(--duration-fast) var(--ease);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text-900);
  background: var(--border);
  text-decoration: none;
}

/* ── THEME TOGGLE ────────────────────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-500);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease),
              background var(--duration-fast) var(--ease);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text-900);
  border-color: var(--border-strong);
  background: var(--surface);
}

.theme-toggle svg { pointer-events: none; }

/* Show correct icon per theme */
.icon-moon { display: block; }
.icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }

/* Smooth color transitions on theme switch */
html, body, .site-header, .post-card, .site-footer {
  transition: background-color 250ms var(--ease), color 250ms var(--ease),
              border-color 250ms var(--ease);
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--s-8);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.footer-copy {
  font-size: var(--text-sm);
  color: var(--text-300);
}

.footer-links {
  display: flex;
  gap: var(--s-4);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-300);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

.footer-links a:hover {
  color: var(--text-700);
  text-decoration: none;
}

.footer-version {
  font-size: var(--text-xs);
  color: var(--text-300);
  text-align: center;
  margin-top: var(--s-4);
}

/* ── HERO / FEATURED POST ────────────────────────────────────── */
.hero {
  padding-block: var(--s-16) var(--s-12);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-12);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-12);
  align-items: center;
}

.hero-media {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--border);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}

.hero-media:hover .hero-img {
  transform: scale(1.02);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.hero-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  color: var(--text-900);
}

.hero-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-base) var(--ease);
}

.hero-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.hero-excerpt {
  font-size: var(--text-lg);
  color: var(--text-500);
  line-height: var(--leading-relaxed);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  width: fit-content;
  transition: background var(--duration-fast) var(--ease),
              transform var(--duration-fast) var(--ease);
}

.hero-cta:hover {
  background: var(--btn-primary-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.hero-cta svg {
  transition: transform var(--duration-fast) var(--ease);
}

.hero-cta:hover svg {
  transform: translateX(3px);
}

/* ── SECTION HEADER ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-8);
}

.section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-500);
}

/* ── CATEGORY FILTER ─────────────────────────────────────────── */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-10);
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-500);
  background: transparent;
  text-decoration: none;
  transition: all var(--duration-base) var(--ease);
  cursor: pointer;
  letter-spacing: 0.01em;
}

.cat-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}

.cat-pill.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-text);
  box-shadow: none;
}

/* ── POST GRID ───────────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
  margin-bottom: var(--s-12);
}

/* ── POST CARD ───────────────────────────────────────────────── */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease),
              transform var(--duration-base) var(--ease),
              background var(--duration-base) var(--ease);
}

.post-card:hover {
  border-color: var(--border-strong);
  background: var(--elevated);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--border);
  flex-shrink: 0;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}

.post-card:hover .card-img {
  transform: scale(1.04);
}

/* Card without image: show accent line at top */
.post-card--no-image {
  border-top: 3px solid var(--accent);
}

.card-body {
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  flex: 1;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.card-title {
  font-size: var(--text-base);
  font-weight: 700;
  line-height: var(--leading-snug);
  letter-spacing: -0.01em;
  color: var(--text-900);
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

.card-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.card-excerpt {
  font-size: var(--text-sm);
  color: var(--text-500);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── BADGES ──────────────────────────────────────────────────── */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--s-2);
  background: var(--accent-light);
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease);
}

.category-badge:hover {
  background: var(--accent-light);
  text-decoration: none;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--s-1) var(--s-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-500);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease);
}

.tag-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ── POST META ───────────────────────────────────────────────── */
.post-meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  color: var(--text-300);
}

.post-meta time { color: var(--text-300); }

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-300);
  flex-shrink: 0;
}

/* ── PAGINATION ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding-block: var(--s-8);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-700);
  background: var(--surface);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease);
}

.page-btn:hover {
  border-color: var(--text-900);
  color: var(--text-900);
  text-decoration: none;
}

.page-info {
  font-size: var(--text-sm);
  color: var(--text-300);
  padding-inline: var(--s-2);
}

/* ── PAGE HEADING ────────────────────────────────────────────── */
.page-heading {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-900);
  line-height: var(--leading-tight);
  margin-bottom: var(--s-8);
}

/* ── BACK BUTTON ─────────────────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-500);
  background: transparent;
  text-decoration: none;
  margin-bottom: var(--s-8);
  transition: all var(--duration-fast) var(--ease);
}

.back-btn:hover {
  color: var(--text-900);
  border-color: var(--border-strong);
  background: var(--surface);
  text-decoration: none;
  transform: translateX(-2px);
}

.back-btn svg {
  transition: transform var(--duration-fast) var(--ease);
}

.back-btn:hover svg {
  transform: translateX(-3px);
}

/* ── POST DETAIL ─────────────────────────────────────────────── */
.post-detail {
  padding-block: var(--s-10);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  color: var(--text-300);
  margin-bottom: var(--s-8);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-300);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

.breadcrumb a:hover { color: var(--text-700); }

.breadcrumb-sep {
  color: var(--text-300);
  user-select: none;
}

.post-header {
  margin-bottom: var(--s-8);
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}

.post-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: -0.035em;
  color: var(--text-900);
  margin-bottom: var(--s-5);
}

.post-subtitle {
  font-size: var(--text-xl);
  color: var(--text-500);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--s-6);
}

.post-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-5);
  border-block: 1px solid var(--border);
}

.author-left {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.author-right {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-shrink: 0;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.author-info { display: flex; flex-direction: column; gap: 2px; }
.author-name { font-size: var(--text-sm); font-weight: 600; color: var(--text-900); }
.author-date { font-size: var(--text-sm); color: var(--text-300); }

.post-cover {
  width: 100%;
  border-radius: var(--radius-xl);
  margin-block: var(--s-8);
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* ── PROSE (blog content) ────────────────────────────────────── */
.prose {
  font-size: var(--text-lg);
  line-height: var(--leading-prose);
  color: var(--text-700);
}

.prose > * + * { margin-top: 1.5em; }

.prose h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-900);
  line-height: var(--leading-snug);
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border);
}

.prose h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-900);
  line-height: var(--leading-snug);
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.prose h4 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-900);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose p { margin-bottom: 1.5em; }
.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--duration-fast) var(--ease);
}

.prose a:hover { color: var(--accent-dark); }

.prose strong { font-weight: 700; color: var(--text-900); }
.prose em { font-style: italic; }

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

.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--text-300); }

.prose blockquote {
  margin-block: 2em;
  padding: var(--s-5) var(--s-6);
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-lg);
  color: var(--text-700);
  font-style: italic;
}

.prose blockquote p { margin: 0; }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--border);
  color: var(--text-900);
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.prose pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: var(--s-6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-block: 2em;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  tab-size: 2;
}

.prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
  font-weight: 400;
}

.prose img {
  border-radius: var(--radius-lg);
  margin-block: 2em;
  box-shadow: var(--shadow-md);
}

.prose figure {
  margin-block: 2em;
}

.prose figcaption {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-300);
  margin-top: var(--s-3);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 3em;
}

/* ── POST FOOTER ─────────────────────────────────────────────── */
.post-footer {
  margin-top: var(--s-12);
  padding-top: var(--s-8);
  border-top: 1px solid var(--border);
}

.post-tags-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: var(--s-6);
}

.post-tags-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── ABOUT / STATIC ──────────────────────────────────────────── */
.static-content {
  padding-block: var(--s-12);
}

/* ── MISC ────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding-block: var(--s-24);
  color: var(--text-300);
  font-size: var(--text-lg);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: var(--s-12);
}

/* ── ADMIN BAR ───────────────────────────────────────────────── */
.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #f59e0b;
  color: #1c1917;
  padding: 0.35rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  flex-wrap: wrap;
}

.admin-bar-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-bar-link {
  color: #1c1917;
  text-decoration: none;
  opacity: 0.8;
}
.admin-bar-link:hover { opacity: 1; text-decoration: underline; }

.admin-bar-btn {
  background: #1c1917;
  color: #fef3c7;
  padding: 0.2rem 0.625rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.75rem;
}
.admin-bar-btn:hover { background: #000; color: #fef3c7; text-decoration: none; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --s-6: 1.25rem; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--s-8);
  }

  .hero-media { order: -1; }

  .post-grid { grid-template-columns: 1fr; gap: var(--s-4); }

  .post-title { font-size: var(--text-3xl); }

  .prose { font-size: var(--text-base); }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .nav-links li:not(:last-child) { display: none; }
  .hero { padding-block: var(--s-10) var(--s-8); }
}

@media (max-width: 400px) {
  .container, .container--narrow { padding-inline: var(--s-4); }
}

/* ── FOCUS STYLES (a11y) ─────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── COMMENTS ────────────────────────────────────────────────── */
.comments-section { padding-block: var(--s-12); }

.comments-heading {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--s-8);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding-inline: 0.4rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 700;
}

/* Flash messages */
.comment-flash {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  margin-bottom: var(--s-6);
  font-size: var(--text-sm);
  font-weight: 500;
}
.comment-flash--success { background: color-mix(in srgb, #22c55e 15%, transparent); color: #16a34a; border: 1px solid #86efac; }
.comment-flash--error   { background: color-mix(in srgb, #ef4444 15%, transparent); color: #dc2626; border: 1px solid #fca5a5; }
[data-theme="light"] .comment-flash--success { color: #15803d; }
[data-theme="light"] .comment-flash--error   { color: #b91c1c; }

/* Comment list */
.comment-list { display: flex; flex-direction: column; gap: var(--s-6); margin-bottom: var(--s-12); }

.comment {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--s-4);
}

.comment--reply { margin-top: var(--s-4); }

.comment-replies {
  margin-top: var(--s-4);
  padding-left: var(--s-6);
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.comment-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-500);
  flex-shrink: 0;
}

.comment-avatar--admin {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
  flex-wrap: wrap;
}

.comment-author {
  font-weight: 600;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.comment-admin-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.comment-date {
  font-size: var(--text-xs);
  color: var(--text-300);
}

.comment-content {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-700);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-reply-btn {
  margin-top: var(--s-2);
  background: none;
  border: none;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.comment-reply-btn:hover { text-decoration: underline; }

/* Reply form */
.reply-form { margin-top: var(--s-4); }

.comment-empty {
  color: var(--text-300);
  font-size: var(--text-base);
  padding-block: var(--s-6);
  margin-bottom: var(--s-8);
}

/* Comment form */
.comment-form-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
}

.comment-form-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--s-5);
}

.comment-form { display: flex; flex-direction: column; gap: var(--s-4); }
.comment-form--reply { gap: var(--s-3); }

.comment-field { display: flex; flex-direction: column; gap: var(--s-1); }
.comment-field label { font-size: var(--text-sm); font-weight: 500; color: var(--text-700); }
.comment-field small { font-weight: 400; color: var(--text-300); }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }

.comment-input {
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-900);
  font-size: var(--text-base);
  font-family: inherit;
  transition: border-color 0.15s;
}
.comment-input:focus { outline: none; border-color: var(--accent); }

.comment-textarea {
  padding: var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-900);
  font-size: var(--text-base);
  font-family: inherit;
  resize: vertical;
  line-height: 1.65;
  transition: border-color 0.15s;
}
.comment-textarea:focus { outline: none; border-color: var(--accent); }

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.comment-notice { font-size: var(--text-xs); color: var(--text-300); }

.btn-comment {
  display: inline-block;
  padding: var(--s-2) var(--s-5);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-comment:hover { opacity: 0.88; }

.btn-comment-cancel {
  background: none;
  border: none;
  font-size: var(--text-sm);
  color: var(--text-300);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.btn-comment-cancel:hover { color: var(--text-700); }

.reply-form-fields { display: flex; flex-direction: column; gap: var(--s-2); }
.reply-form-actions { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-2); }

@media (max-width: 480px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .comment-form-footer { flex-direction: column; align-items: flex-start; }
}
