/* ================================================================
   Packet & Profit  main.css  v2026.5.0
   ================================================================ */

/* ── TOKENS ── */
:root {
  --bg:          #f4f4f0;
  --bg-surface:  #fefefe;
  --bg-subtle:   #eeecea;
  --bg-muted:    #e3e1db;
  --text:        #1a1a17;
  --text-2:      #64645e;
  --text-3:      #aeada7;
  --accent:      #3d7a6c;
  --accent-h:    #2d6157;
  --accent-lt:   #edf4f2;
  --accent-bd:   #aecdc7;
  --red:         #a05050;  --red-lt:    #f9f0f0;
  --amber:       #8c7040;  --amber-lt:  #faf6ec;
  --purple:      #6b5b8a;  --purple-lt: #f3f1f8;
  --teal:        #4a7a8a;  --teal-lt:   #f0f5f7;
  --gold:        #b5922a;  --gold-lt:   #fdf7e8;
  --border:      #dcdbd5;
  --border-2:    #c2c1ba;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.05);
  --shadow-md:   0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:   0 12px 36px rgba(0,0,0,.12);
  --shadow-xl:   0 24px 64px rgba(0,0,0,.16);
  --r-sm:  4px;  --r-md: 8px;  --r-lg: 12px;  --r-xl: 18px;  --r-full: 999px;
  --font-sans:  'Plus Jakarta Sans', system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono:  'JetBrains Mono', monospace;
  --nav-h: 60px;
  --max-w: 1120px;
  --prose-w: 720px;
  --t: 0.18s ease;
  --t-slow: 0.35s ease;
  --mh-wave-1:   rgba(61,122,108,0.16);
  --mh-wave-2:   rgba(61,122,108,0.09);
  --mh-wave-3:   rgba(61,122,108,0.05);
}

[data-theme="dark"] {
  --bg:          #0f0f0e;
  --bg-surface:  #181816;
  --bg-subtle:   #202020;
  --bg-muted:    #2a2a28;
  --text:        #e8e8e4;
  --text-2:      #888882;
  --text-3:      #484844;
  --accent:      #6db0a3;
  --accent-h:    #84bfb4;
  --accent-lt:   #0e201e;
  --accent-bd:   #1c3a36;
  --red:         #c08080;  --red-lt:    #231515;
  --amber:       #c4a84a;  --amber-lt:  #221c08;
  --purple:      #9585c0;  --purple-lt: #181228;
  --teal:        #70b0c0;  --teal-lt:   #081c26;
  --gold:        #d4aa42;  --gold-lt:   #1e1808;
  --border:      #272725;
  --border-2:    #363632;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.5);
  --shadow-md:   0 4px 16px rgba(0,0,0,.55);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.65);
  --shadow-xl:   0 24px 64px rgba(0,0,0,.75);
  --mh-wave-1:   rgba(109,176,163,0.10);
  --mh-wave-2:   rgba(109,176,163,0.06);
  --mh-wave-3:   rgba(109,176,163,0.03);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.65; min-height: 100vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; padding-top: var(--nav-h); transition: background var(--t), color var(--t); }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-serif); line-height: 1.15; color: var(--text); font-weight: 600; }

/* ── SUBTLE GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.018; pointer-events: none; z-index: 9998;
}

/* ── LAYOUT ── */
.container  { max-width: var(--max-w);   margin: 0 auto; padding: 0 1.5rem; }
.prose-wrap { max-width: var(--prose-w); margin: 0 auto; padding: 0 1.5rem; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  background: rgba(254,254,254,0.88);
  transition: background var(--t), border-color var(--t);
}
[data-theme="dark"] .nav { background: rgba(24,24,22,0.90); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo { display: flex; align-items: center; gap: 0.65rem; cursor: pointer; user-select: none; flex-shrink: 0; max-width: 260px; }
.nav-logo-mark { width: 28px; height: 28px; flex-shrink: 0; display: block; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1; }
.nav-logo-name { font-family: var(--font-serif); font-size: 0.975rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; white-space: nowrap; }
.nav-logo-tag  { font-family: var(--font-mono); font-size: 0.54rem; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 0; list-style: none; }
.nav-link { font-size: 0.835rem; font-weight: 500; color: var(--text-2); padding: 0.35rem 0.75rem; border-radius: var(--r-full); background: none; border: none; transition: color var(--t), background var(--t); cursor: pointer; }
.nav-link:hover { color: var(--text); background: var(--bg-subtle); }
.nav-link.active { color: var(--accent); background: var(--accent-lt); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.theme-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border); border-radius: var(--r-full); font-size: 0.875rem; color: var(--text-3); transition: all var(--t); }
.theme-btn:hover { color: var(--text); border-color: var(--border-2); background: var(--bg-subtle); }
.coffee-btn { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.775rem; font-weight: 600; background: #fef3c7; color: #78350f; padding: 0.4rem 0.9rem; border-radius: var(--r-full); border: 1px solid #fde68a; white-space: nowrap; transition: opacity var(--t), transform var(--t); }
.coffee-btn:hover { opacity: 0.82; transform: translateY(-1px); }
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 8px; background: none; border: none; border-radius: var(--r-md); cursor: pointer; flex-shrink: 0; transition: background var(--t); }
.hamburger:hover { background: var(--bg-subtle); }
.hamburger span { display: block; width: 20px; height: 1.5px; background: var(--text-2); border-radius: 2px; transition: transform 0.22s ease, opacity 0.15s ease; transform-origin: center; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mobile-nav { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--bg-surface); border-bottom: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.1); z-index: 299; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: transform 0.18s ease, opacity 0.18s ease; }
.mobile-nav.open { display: block; transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-nav-links { list-style: none; display: flex; flex-direction: column; padding: 0.5rem 0.75rem; gap: 0.1rem; }
.mobile-nav-links .nav-link { width: 100%; text-align: left; padding: 0.75rem 0.85rem; font-size: 0.97rem; border-radius: var(--r-md); display: block; }
.mobile-nav-bottom { display: flex; gap: 0.6rem; align-items: center; padding: 0.75rem 1.35rem 1rem; border-top: 1px solid var(--border); }

/* ── PAGE SYSTEM ── */
.page { display: none; }
.page.active { display: block; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.855rem; font-weight: 600; padding: 0.6rem 1.3rem; border-radius: var(--r-full); border: none; transition: all var(--t); cursor: pointer; letter-spacing: -0.01em; }
.btn-primary   { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(61,122,108,.28); }
.btn-primary:hover { background: var(--accent-h); box-shadow: 0 4px 16px rgba(61,122,108,.38); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-subtle); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-muted); border-color: var(--border-2); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent-bd); }
.btn-ghost:hover { background: var(--accent-lt); }
.btn-sm { font-size: 0.775rem; padding: 0.38rem 0.85rem; }
.btn-danger { background: var(--red-lt); color: var(--red); border: 1px solid rgba(160,80,80,.2); }
.btn-danger:hover { border-color: var(--red); }

/* ── HERO MASTHEAD ── */
.hero-masthead {
  position: relative;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(145deg, var(--bg-surface) 0%, var(--accent-lt) 55%, var(--bg) 100%);
  padding: 4.5rem 0 0;
  overflow: hidden;
}
/* Subtle grid background */
.hero-masthead::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.3;
  pointer-events: none;
}
/* Radial vignette to fade grid */
.hero-masthead::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 75% 85% at 28% 40%, transparent 35%, var(--bg-surface) 100%);
  pointer-events: none;
}
.masthead-bg { position: absolute; bottom: 0; left: 0; right: 0; pointer-events: none; z-index: 1; }
.masthead-wave { display: block; width: 100%; height: 220px; }
.masthead-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 230px;
  gap: 2rem; align-items: end; padding-bottom: 3.5rem;
}
.masthead-kicker {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent);
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem;
}
.masthead-kicker::before { content: ''; display: inline-block; width: 20px; height: 1.5px; background: var(--accent); flex-shrink: 0; }
.masthead-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -0.04em; color: var(--text);
  margin-bottom: 1.35rem; max-width: 540px;
}
.masthead-body { font-size: 0.97rem; line-height: 1.82; color: var(--text-2); max-width: 500px; margin-bottom: 1.5rem; }
.masthead-sig {
  display: flex; align-items: center; gap: 0.85rem;
  margin-bottom: 1.75rem; padding: 0.8rem 1.1rem;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(61,122,108,0.16);
  border-radius: var(--r-xl);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  max-width: 380px; box-shadow: 0 2px 16px rgba(61,122,108,0.08);
}
[data-theme="dark"] .masthead-sig { background: rgba(24,24,22,0.72); }
.masthead-avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; outline: 2px solid var(--accent-bd); outline-offset: 2px; }
.masthead-name { display: block; font-family: var(--font-serif); font-size: 0.95rem; font-weight: 600; color: var(--text); }
.masthead-alias { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); }
.masthead-cta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.btn-ghost-light {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.855rem; font-weight: 600;
  background: rgba(255,255,255,0.75); color: var(--text-2);
  border: 1px solid var(--border);
  padding: 0.6rem 1.1rem; border-radius: var(--r-full);
  transition: all var(--t); backdrop-filter: blur(4px);
  letter-spacing: -0.01em;
}
.btn-ghost-light:hover { background: var(--bg-surface); color: var(--text); transform: translateY(-1px); }
[data-theme="dark"] .btn-ghost-light { background: rgba(24,24,22,0.6); }

/* Stats panel */
.masthead-stats {
  display: flex; flex-direction: column; gap: 0;
  background: rgba(255,255,255,0.62);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden; backdrop-filter: blur(10px);
  align-self: center; margin-bottom: 3.5rem;
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .masthead-stats { background: rgba(24,24,22,0.65); }
.mstat { padding: 1.35rem 1.6rem; border-bottom: 1px solid var(--border); text-align: center; }
.mstat:last-of-type { border-bottom: none; }
.mstat-num { display: block; font-family: var(--font-serif); font-size: 2.1rem; font-weight: 700; letter-spacing: -0.05em; color: var(--accent); line-height: 1; margin-bottom: 0.2rem; }
.mstat-label { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); }
.mstat-tags { padding: 1rem 1.25rem; display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; border-top: 1px solid var(--border); }
.mstat-tags span { font-family: var(--font-mono); font-size: 0.57rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.18rem 0.52rem; background: var(--accent-lt); border: 1px solid var(--accent-bd); color: var(--accent); border-radius: var(--r-sm); }

/* ── SECTION TITLES ── */
.section { padding: 3rem 0; }
.sec-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.sec-title h2 { font-size: 1rem; font-weight: 700; white-space: nowrap; letter-spacing: -0.01em; font-family: var(--font-sans); }
.sec-line { flex: 1; height: 1px; background: var(--border); }
.sec-label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; font-size: 0.63rem; font-weight: 600; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.07em; padding: 0.22rem 0.6rem; border-radius: var(--r-full); border: 1px solid transparent; }
.badge-Infrastructure { background: var(--accent-lt);  color: var(--accent); border-color: var(--accent-bd); }
.badge-Security       { background: var(--red-lt);     color: var(--red);    border-color: rgba(160,80,80,.25); }
.badge-DevOps         { background: var(--purple-lt);  color: var(--purple); border-color: rgba(107,91,138,.25); }
.badge-Cloud          { background: var(--teal-lt);    color: var(--teal);   border-color: rgba(74,122,138,.25); }
.badge-Finance-Tech   { background: var(--amber-lt);   color: var(--amber);  border-color: rgba(140,112,64,.25); }
.badge-Data-Engineering { background: var(--gold-lt);  color: var(--gold);   border-color: rgba(181,146,42,.25); }
.badge-link { cursor: pointer; transition: opacity var(--t), transform var(--t); font-family: var(--font-mono); }
.badge-link:hover { opacity: 0.75; transform: translateY(-1px); }
.badge-Personal { background: var(--bg-subtle); color: var(--text-3); border-color: var(--border); }

/* ── AUTHOR INTRO STRIP ── */
.intro-strip { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.35rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-xl); margin-bottom: 2rem; box-shadow: var(--shadow-sm); }
.intro-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; outline: 2px solid var(--accent-bd); outline-offset: 2px; }
.intro-text p { font-size: 0.855rem; color: var(--text-2); line-height: 1.65; margin: 0; }
.intro-alias { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); }

/* ── FILTER BAR ── */
.filter-bar { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-btn { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; padding: 0.3rem 0.8rem; border-radius: var(--r-full); border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-3); cursor: pointer; transition: all var(--t); }
.filter-btn:hover { border-color: var(--accent-bd); color: var(--accent); background: var(--accent-lt); }
.filter-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }

/* ── HOME LEAD ── */
.home-lead {
  display: grid; grid-template-columns: 1fr 310px;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden; background: var(--bg-surface);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--t-slow);
}
.home-lead:hover { box-shadow: var(--shadow-lg); }
.lead-img-wrap { position: relative; overflow: hidden; background: var(--bg-subtle); cursor: pointer; min-height: 340px; }
.lead-img-wrap img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; transition: transform 0.6s ease, opacity 0.3s ease; display: block; }
.lead-img-wrap:hover img { transform: scale(1.04); opacity: 1; }
.lead-img-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.16) 0%, transparent 40%); pointer-events: none; }
.lead-badge { position: absolute; top: 16px; left: 16px; z-index: 2; font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: var(--accent); color: #fff; padding: 0.3rem 0.7rem; border-radius: var(--r-full); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.lead-right { display: flex; flex-direction: column; border-left: 1px solid var(--border); min-width: 0; }
.lead-body { padding: 1.85rem; display: flex; flex-direction: column; gap: 0.65rem; cursor: pointer; transition: background var(--t); border-bottom: 1px solid var(--border); flex: 1; }
.lead-body:hover { background: var(--bg-subtle); }
.lead-label { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.lead-title { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; line-height: 1.22; letter-spacing: -0.025em; color: var(--text); }
.lead-excerpt { font-size: 0.875rem; color: var(--text-2); line-height: 1.75; flex: 1; }
.lead-meta { font-family: var(--font-mono); font-size: 0.67rem; color: var(--text-3); }
.sidebar-posts { display: flex; flex-direction: column; }
.sidebar-post { padding: 1.1rem 1.45rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--t); display: flex; flex-direction: column; gap: 0.35rem; position: relative; flex: 1; overflow: hidden; }
.sidebar-post:last-child { border-bottom: none; }
.sidebar-post:hover { background: var(--bg-subtle); }
.sidebar-post::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform 0.22s ease; }
.sidebar-post:hover::before { transform: scaleY(1); }
.sidebar-post-title { font-family: var(--font-serif); font-size: 0.92rem; font-weight: 600; line-height: 1.35; color: var(--text); }
.sidebar-post-meta { font-family: var(--font-mono); font-size: 0.64rem; color: var(--text-3); }

/* ── ARCHIVE GRID ── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.blog-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); cursor: pointer;
  display: flex; flex-direction: column;
  transition: border-color var(--t-slow), box-shadow var(--t-slow), transform var(--t-slow);
  overflow: hidden; position: relative;
}
/* Animated top accent bar on hover */
.blog-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.blog-card:hover { border-color: var(--accent-bd); box-shadow: 0 8px 28px rgba(61,122,108,.14); transform: translateY(-4px); }
.blog-card:hover::before { transform: scaleX(1); }
.card-img { display: none; }
.card-badge { display: none; }
.card-body { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; padding: 1.2rem 1.3rem; }
.card-top { margin-bottom: 0.2rem; }
.card-title { font-family: var(--font-serif); font-size: 0.98rem; font-weight: 600; line-height: 1.35; color: var(--text); letter-spacing: -0.01em; }
.card-excerpt { font-size: 0.82rem; color: var(--text-2); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1.3rem; border-top: 1px solid var(--border); background: var(--bg-subtle); }
.card-author { display: flex; align-items: center; gap: 0.4rem; }
.card-author-name { font-size: 0.74rem; font-weight: 500; color: var(--text-2); }
.card-rt { font-size: 0.67rem; color: var(--text-3); font-family: var(--font-mono); }
.av    { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.5rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.av-lg { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.meta-dot { width: 2px; height: 2px; background: currentColor; border-radius: 50%; display: inline-block; }

/* ── POST PAGE ── */
.post-header {
  padding: 2.5rem 0 2rem; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--accent-lt) 0%, transparent 100%);
}
.post-back { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--text-2); margin-bottom: 2rem; background: var(--bg-surface); border: 1px solid var(--border); padding: 0.42rem 1rem; border-radius: var(--r-full); transition: all var(--t); cursor: pointer; letter-spacing: -0.01em; box-shadow: var(--shadow-sm); }
.post-back:hover { color: var(--accent); border-color: var(--accent-bd); background: var(--accent-lt); transform: translateX(-2px); }
.post-title { font-size: clamp(1.7rem, 4vw, 2.9rem); line-height: 1.1; margin: 0.9rem 0; letter-spacing: -0.04em; }
.post-author-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1.1rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin: 1.35rem 0 2.5rem; box-shadow: var(--shadow-sm); }
.post-author-info strong { display: block; font-size: 0.86rem; font-weight: 600; }
.post-author-info span { font-size: 0.75rem; color: var(--text-2); }
.post-hero-img { width: 100%; height: 380px; object-fit: cover; border-radius: var(--r-xl); margin: 0 0 2.5rem; border: 1px solid var(--border); box-shadow: var(--shadow-md); }

/* Post body typography */
.post-body { padding-bottom: 4rem; }
.post-body p  { font-size: 1.05rem; line-height: 1.92; color: var(--text-2); margin-bottom: 1.65rem; letter-spacing: 0.005em; }
.post-body h2 {
  font-size: 1.5rem; margin: 3rem 0 0.9rem;
  letter-spacing: -0.025em; color: var(--text);
  position: relative; padding-left: 1rem;
}
.post-body h2::before {
  content: ''; position: absolute; left: 0; top: 0.2em; bottom: 0.2em;
  width: 3px; background: var(--accent); border-radius: 2px;
}
.post-body h3 { font-size: 1.12rem; margin: 2rem 0 0.65rem; }
.post-body strong { color: var(--text); font-weight: 600; }
.post-body code { font-family: var(--font-mono); font-size: 0.83em; background: var(--bg-subtle); border: 1px solid var(--border); padding: 0.14em 0.42em; border-radius: 4px; color: var(--accent); }
.post-body pre { background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.35rem 1.5rem; overflow-x: auto; margin: 1.75rem 0; box-shadow: var(--shadow-sm); }
.post-body pre code { background: none; border: none; padding: 0; font-size: 0.875rem; color: var(--text); line-height: 1.76; }
.post-body blockquote {
  border-left: 3px solid var(--accent); margin: 2.5rem 0;
  padding: 1rem 1.75rem; background: var(--accent-lt);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  font-style: italic; color: var(--text);
  font-family: var(--font-serif); font-size: 1.12rem;
  line-height: 1.78; box-shadow: var(--shadow-sm);
}
.post-body ul { padding-left: 1.35rem; margin: 0.85rem 0 1.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.post-body li { color: var(--text-2); font-size: 1.02rem; line-height: 1.76; }
.post-body li::marker { color: var(--accent); }
.post-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.85rem; padding: 2rem 0; border-top: 1px solid var(--border); }
.post-cta-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-3); margin-bottom: 0.5rem; font-family: var(--font-mono); }

/* Reading progress */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  z-index: 9999; opacity: 0;
  transition: width 0.08s linear, opacity 0.3s ease;
}
.reading-progress.visible { opacity: 1; }

/* ── POST AUTHOR CARD ── */
.post-author-card {
  display: flex; align-items: flex-start; gap: 1.35rem;
  background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--accent-lt) 100%);
  border: 1px solid var(--accent-bd); border-radius: var(--r-xl);
  padding: 1.65rem; margin: 2.5rem 0; box-shadow: var(--shadow-sm);
}
.post-author-card-img { width: 68px; height: 68px; border-radius: 50%; flex-shrink: 0; outline: 3px solid var(--accent-bd); outline-offset: 2px; }
.post-author-card-name { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.post-author-card-alias { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); }
.post-author-card-bio { font-size: 0.875rem; color: var(--text-2); line-height: 1.75; margin-bottom: 0.9rem; }
.post-author-card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.post-author-card-tags span { font-family: var(--font-mono); font-size: 0.62rem; padding: 0.22rem 0.58rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-full); color: var(--text-3); text-transform: uppercase; }

/* ── RELATED POSTS ── */
.related-posts { padding: 2.5rem 0 3rem; border-top: 1px solid var(--border); margin-top: 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.related-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); cursor: pointer; transition: border-color var(--t), box-shadow var(--t), transform var(--t); display: flex; flex-direction: column; overflow: hidden; }
.related-card:hover { border-color: var(--accent-bd); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.related-img { width: 100%; height: 130px; object-fit: cover; opacity: 0.85; display: block; transition: opacity var(--t); }
.related-card:hover .related-img { opacity: 1; }
.related-body { padding: 1rem 1.1rem; flex: 1; }
.related-title { font-family: var(--font-serif); font-size: 0.92rem; font-weight: 600; line-height: 1.35; color: var(--text); margin-bottom: 0.4rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.related-meta { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-3); }

/* ── ABOUT ── */
.about-layout { display: grid; grid-template-columns: 240px 1fr; gap: 3.5rem; padding: 3.5rem 0 5rem; align-items: start; }
.profile-sticky { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.profile-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 1.75rem; text-align: center; box-shadow: var(--shadow-md); }
.profile-av { width: 80px; height: 80px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; color: #fff; margin: 0 auto 1rem; overflow: hidden; outline: 3px solid var(--accent-bd); outline-offset: 2px; }
.profile-name  { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.2rem; }
.profile-alias { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent); margin-bottom: 0.5rem; }
.profile-loc   { font-size: 0.775rem; color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 0.3rem; margin-bottom: 1.25rem; }
.profile-tags  { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; margin-bottom: 1.25rem; }
.ptag { font-family: var(--font-mono); font-size: 0.59rem; font-weight: 500; padding: 0.22rem 0.55rem; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-full); color: var(--text-2); text-transform: uppercase; transition: all var(--t); }
.ptag:hover { background: var(--accent-lt); border-color: var(--accent-bd); color: var(--accent); }
.coffee-full { display: flex; align-items: center; justify-content: center; gap: 0.45rem; width: 100%; padding: 0.65rem; background: #fef3c7; color: #78350f; font-weight: 700; font-size: 0.8rem; border-radius: var(--r-full); border: 1px solid #fde68a; transition: opacity var(--t), transform var(--t); }
.coffee-full:hover { opacity: 0.85; transform: translateY(-1px); }
.about-body h2 { font-size: 2rem; margin-bottom: 0.3rem; letter-spacing: -0.04em; }
.about-sub { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.85rem; }
.about-body p { font-size: 0.96rem; color: var(--text-2); line-height: 1.82; margin-bottom: 1rem; }
.about-body h3 { font-size: 0.95rem; font-weight: 600; margin: 2rem 0 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-sans); color: var(--text-3); }
.stack-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(96px,1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; margin: 0.65rem 0 1.5rem; }
.stack-item { background: var(--bg-surface); padding: 0.6rem 0.55rem; text-align: center; font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-2); text-transform: uppercase; transition: all var(--t); }
.stack-item:hover { background: var(--accent-lt); color: var(--accent); }
.timeline { margin: 0.65rem 0 1.5rem; border-left: 2px solid var(--border); padding-left: 1.5rem; }
.tl-item { position: relative; margin-bottom: 1.75rem; }
.tl-item::before { content:''; position:absolute; left:-1.88rem; top:0.32rem; width:8px; height:8px; background:var(--accent); border-radius:50%; border:2px solid var(--bg); box-shadow: 0 0 0 2px var(--accent-bd); }
.tl-year  { font-family: var(--font-mono); font-size: 0.63rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 0.22rem; font-weight: 600; }
.tl-title { font-family: var(--font-serif); font-size: 0.96rem; font-weight: 600; margin-bottom: 0.3rem; }
.tl-desc  { font-size: 0.835rem; color: var(--text-2); line-height: 1.64; }

/* ── CONTACT FIELDS ── */
.fg { display: flex; flex-direction: column; gap: 0.32rem; }
.fl { font-size: 0.66rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); }
.fi { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); font-family: var(--font-sans); font-size: 0.875rem; padding: 0.55rem 0.85rem; outline: none; width: 100%; transition: border-color var(--t), box-shadow var(--t); }
.fi:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-lt); }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── ADMIN ── */
.admin-page { min-height: calc(100vh - var(--nav-h)); }
.gate-wrap { max-width: 380px; margin: 5rem auto; padding: 0 1.5rem; text-align: center; }
.gate-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 2.5rem 2rem; box-shadow: var(--shadow-lg); }
.gate-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-lt); border: 1px solid var(--accent-bd); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin: 0 auto 1.15rem; }
.gate-card h2 { font-size: 1.25rem; margin-bottom: 0.55rem; }
.gate-card p { font-size: 0.855rem; color: var(--text-2); line-height: 1.7; margin-bottom: 1.65rem; }
.btn-auth0 { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: #635dff; color: #fff; font-weight: 600; font-size: 0.855rem; padding: 0.7rem 1.4rem; border-radius: var(--r-full); border: none; width: 100%; transition: opacity var(--t); }
.btn-auth0:hover { opacity: 0.88; }
.gate-note { font-size: 0.67rem; color: var(--text-3); margin-top: 0.85rem; font-family: var(--font-mono); }
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - var(--nav-h)); }
.admin-sidebar { background: var(--bg-surface); border-right: 1px solid var(--border); padding: 1.35rem 0.85rem; display: flex; flex-direction: column; gap: 0.15rem; position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto; }
.sidebar-section-label { font-family: var(--font-mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); padding: 0.55rem 0.6rem 0.2rem; margin-top: 0.5rem; }
.sidebar-link { display: flex; align-items: center; gap: 0.55rem; font-size: 0.83rem; font-weight: 500; color: var(--text-2); padding: 0.45rem 0.65rem; border-radius: var(--r-md); background: none; border: none; width: 100%; text-align: left; cursor: pointer; transition: all var(--t); }
.sidebar-link:hover { color: var(--text); background: var(--bg-subtle); }
.sidebar-link.active { color: var(--accent); background: var(--accent-lt); }
.sidebar-user { margin-top: auto; padding: 0.85rem 0.65rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 0.55rem; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name  { font-size: 0.775rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: 0.65rem; color: var(--text-3); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout { font-size: 0.68rem; color: var(--text-3); background: none; border: none; cursor: pointer; flex-shrink: 0; padding: 0.2rem; transition: color var(--t); }
.sidebar-logout:hover { color: var(--red); }
.admin-content { padding: 2rem; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-panel-title { font-size: 1.45rem; font-weight: 600; margin-bottom: 0.3rem; }
.admin-panel-sub { font-size: 0.86rem; color: var(--text-2); margin-bottom: 2rem; }
.dash-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 2rem; }
.dash-stat { background: var(--bg-surface); padding: 1.25rem 1.35rem; }
.dash-stat-val   { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.dash-stat-label { font-size: 0.72rem; color: var(--text-3); margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 0.07em; font-family: var(--font-mono); }
.dash-stat-sub   { font-size: 0.72rem; color: var(--accent); margin-top: 0.2rem; font-family: var(--font-mono); }
.dash-recent-title { font-size: 0.86rem; font-weight: 600; margin-bottom: 0.85rem; }
.dash-post-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 0.5rem; cursor: pointer; transition: all var(--t); }
.dash-post-row:hover { border-color: var(--border-2); background: var(--bg-subtle); }
.dash-post-title { font-size: 0.855rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-post-meta  { font-size: 0.68rem; color: var(--text-3); font-family: var(--font-mono); margin-top: 0.12rem; }
.editor-form { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 2rem; }
.editor-toolbar { display: flex; gap: 0.25rem; flex-wrap: wrap; padding: 0.6rem 1rem; background: var(--bg-subtle); border-bottom: 1px solid var(--border); }
.tb { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; padding: 0.26rem 0.55rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text-2); transition: all var(--t); text-transform: uppercase; }
.tb:hover { border-color: var(--accent-bd); color: var(--accent); background: var(--accent-lt); }
.editor-fields { padding: 1.1rem; display: flex; flex-direction: column; gap: 0.85rem; }
.field-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.85rem; }
.fi-ta { font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.76; min-height: 360px; resize: vertical; }
.editor-actions { display: flex; gap: 0.55rem; padding: 0.85rem 1.1rem; background: var(--bg-subtle); border-top: 1px solid var(--border); }
.posts-table-wrap { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.posts-table-head { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.posts-table-title { font-size: 0.84rem; font-weight: 600; }
.posts-table-count { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-3); }
.pt-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1rem; padding: 0.82rem 1.2rem; border-bottom: 1px solid var(--border); transition: background var(--t); }
.pt-row:last-child { border-bottom: none; }
.pt-row:hover { background: var(--bg-subtle); }
.pt-title { font-size: 0.855rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-meta  { font-size: 0.68rem; color: var(--text-3); font-family: var(--font-mono); margin-top: 0.1rem; }
.pt-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
.auth-user-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; background: var(--accent-lt); border: 1px solid var(--accent-bd); border-radius: var(--r-md); margin-bottom: 2rem; }
.auth-user-info strong { display: block; font-size: 0.855rem; font-weight: 600; }
.auth-user-info span { font-size: 0.735rem; color: var(--text-2); font-family: var(--font-mono); }
.auth-logout { font-size: 0.7rem; color: var(--text-2); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0.28rem 0.62rem; margin-left: auto; flex-shrink: 0; transition: all var(--t); }
.auth-logout:hover { color: var(--red); border-color: var(--red); }
.settings-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.4rem; margin-bottom: 1.15rem; }
.settings-card h3 { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.85rem; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: none; }
.settings-row-label strong { display: block; font-size: 0.855rem; font-weight: 600; }
.settings-row-label span { font-size: 0.775rem; color: var(--text-2); }
.version-badge { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; padding: 0.25rem 0.6rem; background: var(--accent-lt); color: var(--accent); border: 1px solid var(--accent-bd); border-radius: var(--r-full); }

/* ── TOAST ── */
.toast { position: fixed; bottom: 1.35rem; right: 1.35rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 0.8rem 1.15rem; font-size: 0.82rem; font-weight: 500; box-shadow: var(--shadow-xl); z-index: 999; transform: translateY(80px); opacity: 0; transition: all 0.28s cubic-bezier(0.34,1.56,0.64,1); display: flex; align-items: center; gap: 0.45rem; max-width: 290px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(61,122,108,.3); color: var(--accent); }
.toast.error   { border-color: rgba(160,80,80,.3); color: var(--red); }

/* ── FOOTER ── */
.footer {
  background: var(--bg-surface); border-top: 1px solid var(--border);
  padding: 2.5rem 0; position: relative; overflow: hidden;
}
/* Gradient top border */
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--teal), var(--accent));
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; text-align: center; }
.footer-copy { font-size: 0.775rem; color: var(--text-3); line-height: 1.6; }
.footer-copy a { color: var(--accent); }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 0.35rem; flex-wrap: wrap; }
.footer-link { font-size: 0.775rem; color: var(--text-3); background: none; border: none; cursor: pointer; padding: 0.3rem 0.5rem; border-radius: var(--r-full); transition: color var(--t), background var(--t); text-decoration: none; display: inline-block; }
.footer-link:hover { color: var(--accent); background: var(--accent-lt); }
.footer-sep { color: var(--border-2); font-size: 0.7rem; user-select: none; }

/* ── ARCHIVE HEADER ── */
.archive-header { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 2.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.archive-header .sec-title { flex: 1; min-width: 0; margin-bottom: 0; }

/* ── SEARCH ── */
.search-wrap { position: relative; flex-shrink: 0; }
.search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-3); pointer-events: none; }
.search-input { font-family: var(--font-sans); font-size: 0.825rem; color: var(--text); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-full); padding: 0.44rem 1rem 0.44rem 2.15rem; width: 200px; outline: none; transition: border-color var(--t), box-shadow var(--t), width 0.22s ease; -webkit-appearance: none; }
.search-input:focus { border-color: var(--accent-bd); box-shadow: 0 0 0 3px var(--accent-lt); width: 240px; }
.search-input::placeholder { color: var(--text-3); }

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed; bottom: 1.75rem; right: 1.75rem;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(61,122,108,.4);
  opacity: 0; transform: translateY(12px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease, background var(--t);
  z-index: 200; pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { background: var(--accent-h); transform: translateY(-2px) scale(1.06); }

/* ── CARD ENTRANCE ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.blog-card { animation: fadeUp 0.42s ease both; }
.blog-card:nth-child(1) { animation-delay: 0.04s; }
.blog-card:nth-child(2) { animation-delay: 0.09s; }
.blog-card:nth-child(3) { animation-delay: 0.14s; }
.blog-card:nth-child(4) { animation-delay: 0.19s; }
.blog-card:nth-child(5) { animation-delay: 0.24s; }
.blog-card:nth-child(6) { animation-delay: 0.29s; }
.blog-card:nth-child(n+7) { animation-delay: 0.34s; }

/* ── RESPONSIVE ── */
@media (min-width: 641px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .footer-links { justify-content: flex-end; }
}
@media (max-width: 1024px) {
  .masthead-inner { grid-template-columns: 1fr 200px; gap: 1.5rem; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .home-lead { grid-template-columns: 1fr 270px; }
  .related-grid { grid-template-columns: repeat(2,1fr); }
  .about-layout { grid-template-columns: 210px 1fr; gap: 2.5rem; }
  .dash-stats { grid-template-columns: repeat(2,1fr); }
  .admin-layout { grid-template-columns: 195px 1fr; }
}
@media (max-width: 768px) {
  :root { --nav-h: 54px; }
  .nav-links, .nav-actions .coffee-btn { display: none; }
  .hamburger { display: flex; }
  .masthead-inner { grid-template-columns: 1fr; padding-bottom: 2.5rem; }
  .masthead-stats { display: none; }
  .home-lead { grid-template-columns: 1fr; }
  .lead-img-wrap { min-height: 200px; max-height: 240px; }
  .lead-right { border-left: none; border-top: 1px solid var(--border); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .about-layout { grid-template-columns: 1fr; }
  .profile-sticky { position: static; }
  .post-hero-img { height: 220px; }
  .section { padding: 2.5rem 0; }
  .field-row-2, .field-row-3 { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 0.6rem; gap: 0.15rem; border-right: none; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .sidebar-section-label { display: none; }
  .sidebar-link { padding: 0.38rem 0.6rem; font-size: 0.78rem; width: auto; }
  .sidebar-user { display: none; }
  .admin-content { padding: 1.25rem; }
  .dash-stats { grid-template-columns: repeat(2,1fr); }
  .post-author-card { flex-direction: column; align-items: center; text-align: center; }
  .post-author-card-tags { justify-content: center; }
  .related-grid { grid-template-columns: 1fr; }
  .post-body h2::before { display: none; }
  .post-body h2 { padding-left: 0; }
}
@media (max-width: 480px) {
  .archive-header { flex-direction: column; align-items: flex-start; }
  .search-input { width: 100%; }
  .search-input:focus { width: 100%; }
  .search-wrap { width: 100%; }
  .blog-grid { grid-template-columns: 1fr; }
  .masthead-title { font-size: 1.7rem; }
  .masthead-cta { flex-direction: column; }
  .masthead-cta .btn { width: 100%; justify-content: center; }
  .post-cta { flex-direction: column; }
  .toast { left: 1rem; right: 1rem; max-width: none; }
  .pt-row { grid-template-columns: 1fr; }
  .pt-actions { justify-content: flex-start; }
  .intro-strip { flex-direction: column; align-items: center; text-align: center; }
}
