/* ============================================================
   Security Research Blog — Clean Light Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f6f8fa;
  --bg-card: #ffffff;
  --bg-code: #f6f8fa;
  --bg-sidebar: #fafbfc;
  --accent: #4f46e5;
  --accent-dim: #4338ca;
  --accent-light: #eef2ff;
  --accent-glow: rgba(79, 70, 229, 0.08);
  --blue: #2563eb;
  --red: #dc2626;
  --orange: #ea580c;
  --yellow: #ca8a04;
  --green: #16a34a;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --sidebar-width: 290px;
  --radius: 10px;
  --radius-sm: 6px;
}

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

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

body {
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ============================================================
   Layout
   ============================================================ */

.layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 1.8rem 1.2rem;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Brand */
.sidebar-brand {
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand a {
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.sidebar-brand p {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 0.5rem;
  padding-left: 0;
  line-height: 1.4;
}

/* Search */
.search-box {
  margin-bottom: 1.2rem;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem 0.5rem 2.1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Nav links */
.sidebar-nav {
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.15s;
}

.sidebar-nav a svg {
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
}

.sidebar-nav a:hover svg,
.sidebar-nav a.active svg {
  opacity: 1;
  color: var(--accent);
}

/* Divider */
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.4rem 0 1rem;
}

/* Section title */
.sidebar-section-title {
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding: 0 0.7rem;
}

.sidebar-count {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 50px;
  margin-left: 0.3rem;
  letter-spacing: 0;
  text-transform: none;
}

/* Post list */
.sidebar-posts {
  list-style: none;
  margin-bottom: 1rem;
}

.sidebar-posts li {
  margin-bottom: 1px;
}

.sidebar-posts a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  line-height: 1.4;
  transition: all 0.15s;
}

.sidebar-posts a:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.sidebar-posts .post-date {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-family: var(--font-mono);
  font-weight: 400;
}

.sidebar-posts .post-title-text {
  display: block;
  line-height: 1.35;
}

.sidebar-posts .badge {
  align-self: flex-start;
  margin-top: 0.2rem;
}

/* Footer */
.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-footer p {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Mobile toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  z-index: 90;
}

/* ============================================================
   Main content area
   ============================================================ */

.content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 3rem;
  width: 100%;
  flex: 1;
}

/* ============================================================
   Home: Hero card (latest post)
   ============================================================ */

.hero-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 3rem;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
  background: var(--bg-card);
}

.hero-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.hero-image {
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-card:hover .hero-image img {
  transform: scale(1.03);
}

.hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-secondary) 100%);
}

.hero-body {
  padding: 1.8rem 2rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
}

.hero-label {
  background: var(--accent);
  color: white;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-date {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.hero-title {
  color: var(--text-primary);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.7rem;
  letter-spacing: -0.03em;
}

.hero-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.hero-tag {
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 500;
}

/* ============================================================
   Home: Section headers
   ============================================================ */

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ============================================================
   Home: Post grid cards
   ============================================================ */

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-bottom: 3rem;
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}

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

.card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg-secondary) 100%);
}

.card-body {
  padding: 1.2rem 1.3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.card-title {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card:hover .card-title {
  color: var(--accent);
}

.card-excerpt {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
  flex: 1;
}

/* ============================================================
   Severity badges
   ============================================================ */

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 50px;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.badge-critical { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.badge-high     { background: #fff7ed; color: var(--orange); border: 1px solid #fed7aa; }
.badge-medium   { background: #fefce8; color: var(--yellow); border: 1px solid #fef08a; }
.badge-low      { background: #eff6ff; color: var(--blue); border: 1px solid #bfdbfe; }

/* ============================================================
   Blog post header
   ============================================================ */

.post-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.post-info {
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

/* ============================================================
   Post layout: content + sticky TOC aside
   ============================================================ */

.post-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.post-content {
  flex: 1;
  min-width: 0;
}

.post-layout.no-toc {
  display: block;
}

/* ============================================================
   Sticky TOC aside
   ============================================================ */

.toc-aside {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.toc-aside::-webkit-scrollbar { width: 3px; }
.toc-aside::-webkit-scrollbar-track { background: transparent; }
.toc-aside::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.toc {
  border-left: 2px solid var(--border);
  padding-left: 0;
}

.toc-header {
  padding: 0 0 0.7rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item a {
  display: block;
  padding: 0.3rem 0 0.3rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.45;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all 0.15s;
}

.toc-item a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

.toc-item a.active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
}

.toc-sub a {
  padding-left: 1.8rem;
  font-size: 0.74rem;
}

/* ============================================================
   Blog post body
   ============================================================ */

article h2 {
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.8rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-light);
  letter-spacing: -0.02em;
}

article h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.6rem;
  letter-spacing: -0.01em;
}

article p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.85;
  overflow-wrap: anywhere;
  word-break: normal;
}

article a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

article a:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

article ul, article ol {
  margin: 0.5rem 0 1.4rem 1.5rem;
}

article li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

article strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ============================================================
   Code blocks
   ============================================================ */

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

p code, li code, td code {
  background: var(--accent-light);
  color: var(--accent-dim);
  padding: 0.18rem 0.45rem;
  border-radius: 5px;
  font-size: 0.83em;
  border: none;
  white-space: normal;
  word-break: break-word;
}

article a {
  overflow-wrap: anywhere;
}

div.highlighter-rouge,
figure.highlight {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.5rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

div.highlighter-rouge::before,
figure.highlight::before {
  content: attr(data-lang);
  display: block;
  background: var(--bg-secondary);
  padding: 0.5rem 1.1rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.5px;
  font-weight: 500;
}

div.language-python.highlighter-rouge::before { content: "python"; }
div.language-bash.highlighter-rouge::before { content: "bash"; }
div.language-javascript.highlighter-rouge::before,
div.language-js.highlighter-rouge::before { content: "javascript"; }
div.language-yaml.highlighter-rouge::before { content: "yaml"; }
div.language-json.highlighter-rouge::before { content: "json"; }
div.language-shell.highlighter-rouge::before { content: "shell"; }
div.language-c.highlighter-rouge::before { content: "c"; }
div.language-cpp.highlighter-rouge::before { content: "c++"; }
div.language-go.highlighter-rouge::before { content: "go"; }
div.language-rust.highlighter-rouge::before { content: "rust"; }
div.highlighter-rouge::before { content: "code"; }

pre {
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  line-height: 1.65;
  max-width: 100%;
}

pre code {
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 0;
}

/* ============================================================
   Images
   ============================================================ */

article img {
  max-width: 100%;
  width: auto;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.5rem 0;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-sm);
}

/* Force HTML images with width/height attrs to stay responsive */
article img[width],
article img[height] {
  max-width: 100% !important;
  height: auto !important;
}

article img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  position: relative;
}

.img-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: zoom-out;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.img-overlay.active { opacity: 1; }

.img-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.image-caption,
article img + em {
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: -0.6rem;
  margin-bottom: 1.5rem;
  font-style: normal;
}

/* ============================================================
   Tables
   ============================================================ */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

th, td {
  border: 1px solid var(--border);
  padding: 0.7rem 1rem;
  text-align: left;
}

th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

tr:nth-child(even) td { background: var(--bg-secondary); }
tr:hover td { background: var(--accent-light); }

/* ============================================================
   Blockquote
   ============================================================ */

blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.4rem;
  margin: 1.5rem 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
}

blockquote p:last-child { margin-bottom: 0; }

/* ============================================================
   Footer
   ============================================================ */

footer {
  border-top: 1px solid var(--border);
  padding: 1.8rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* ============================================================
   About page
   ============================================================ */

.about-content { max-width: 650px; }
.about-content h2 { border-bottom: none; margin-top: 2rem; }
.contact-links { list-style: none; margin: 0; padding: 0; }
.contact-links li { margin-bottom: 0.5rem; }
.contact-links a { color: var(--accent); text-decoration: none; }

/* ============================================================
   No results
   ============================================================ */

.no-results {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.5rem 0.7rem;
  display: none;
}

/* ============================================================
   Selection
   ============================================================ */

::selection {
  background: var(--accent-light);
  color: var(--accent-dim);
}

/* ============================================================
   Responsive
   ============================================================ */

/* ---- Tablet ---- */
@media (max-width: 1024px) {
  .post-grid {
    grid-template-columns: 1fr;
  }

  .toc-aside {
    display: none;
  }

  .post-layout {
    display: block;
  }

  main {
    max-width: 100%;
    padding: 2rem 2rem;
  }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 280px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
  .sidebar-overlay.active { display: block; }
  .content { margin-left: 0; }

  main {
    padding: 1.2rem 1rem;
    padding-top: 3.5rem;
  }

  /* Hero */
  .hero-image { height: 180px; }
  .hero-title { font-size: 1.2rem; }
  .hero-body { padding: 1rem 1.1rem; }
  .hero-excerpt { font-size: 0.88rem; }
  .hero-meta { gap: 0.5rem; }

  /* Cards */
  .card-image { height: 140px; }
  .card-body { padding: 1rem; }
  .card-title { font-size: 0.92rem; }
  .card-excerpt { font-size: 0.8rem; }

  /* Post header */
  .post-header h1 { font-size: 1.35rem; }
  .post-info { flex-direction: column; gap: 0.3rem; }

  /* Post body */
  article h2 { font-size: 1.15rem; margin: 2rem 0 0.8rem; }
  article h3 { font-size: 1rem; }
  article p { font-size: 0.92rem; line-height: 1.75; }
  article li { font-size: 0.92rem; }

  /* Prevent mobile zoom-out from long tokens/URLs */
  article, .post-content {
    overflow-x: hidden;
  }

  /* Code blocks: prevent horizontal overflow */
  pre {
    padding: 0.8rem 1rem;
    font-size: 0.78rem;
  }

  div.highlighter-rouge,
  figure.highlight {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  /* Tables: horizontal scroll */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.5rem 0.7rem;
  }

  /* Images */
  article img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 1rem 0;
    border-radius: var(--radius-sm);
  }

  article img:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  /* Section headers */
  .section-header h2 { font-size: 1.2rem; }
  .section-header p { font-size: 0.82rem; }

  /* Footer */
  footer { padding: 1.2rem 1rem; }
}

/* ---- Small phones ---- */
@media (max-width: 400px) {
  main {
    padding: 1rem 0.75rem;
    padding-top: 3.5rem;
  }

  .hero-image { height: 150px; }
  .hero-title { font-size: 1.1rem; }
  .hero-body { padding: 0.9rem; }

  .post-header h1 { font-size: 1.2rem; }

  pre { font-size: 0.72rem; }
}
