/* =====================================================
   Platform Theme — Light/Dark via CSS variables
   ===================================================== */

/* ---------- Color tokens (DARK is default) ---------- */
:root {
  --bg:           #161616;
  --bg-card:      #232323;
  --bg-card-2:    #2a2a2a;
  --bg-elev:      #303030;
  --border:       rgba(255,255,255,0.08);
  --border-strong:rgba(255,255,255,0.16);
  --text:         #ffffff;
  --text-muted:   rgba(255,255,255,0.62);
  --text-dim:     rgba(255,255,255,0.42);
  --accent:       #fad02c;
  --accent-on:    #1a1500;
  --shadow:       0 4px 32px rgba(0,0,0,0.35);
  --hero-fade:    linear-gradient(90deg, #232323 0%, rgba(35,35,35,0.92) 30%, rgba(35,35,35,0.4) 55%, transparent 75%);
  --hero-fade-v:  linear-gradient(0deg, #232323 10%, rgba(35,35,35,0.85) 45%, rgba(35,35,35,0.2) 80%, transparent 100%);
  --header-bg:    rgba(22,22,22,0.85);
  --avail-glow-1: rgba(250,208,44,0.22);
  --avail-glow-2: rgba(250,208,44,0.10);
  --no-thumb-bg:  linear-gradient(135deg,#2a2a2a,#1a1a1a);
  --no-thumb-fg:  rgba(255,255,255,0.2);
  --pre-fg:       rgba(255,255,255,0.9);
  --selection-fg: #1a1500;
}

/* ---------- LIGHT overrides ---------- */
html.light {
  --bg:           #f1f5f9;
  --bg-card:      #ffffff;
  --bg-card-2:    #ffffff;
  --bg-elev:      #f8fafc;
  --border:       rgba(0,0,0,0.08);
  --border-strong:rgba(0,0,0,0.18);
  --text:         #0a0a0a;
  --text-muted:   rgba(0,0,0,0.62);
  --text-dim:     rgba(0,0,0,0.42);
  --accent:       #b8860b;
  --accent-on:    #ffffff;
  --shadow:       0 4px 28px rgba(0,0,0,0.08);
  --hero-fade:    linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.92) 30%, rgba(255,255,255,0.5) 55%, transparent 75%);
  --hero-fade-v:  linear-gradient(0deg, #ffffff 10%, rgba(255,255,255,0.85) 45%, rgba(255,255,255,0.2) 80%, transparent 100%);
  --header-bg:    rgba(241,245,249,0.85);
  --avail-glow-1: rgba(184,134,11,0.22);
  --avail-glow-2: rgba(184,134,11,0.10);
  --no-thumb-bg:  linear-gradient(135deg,#e5e7eb,#cbd5e1);
  --no-thumb-fg:  rgba(0,0,0,0.2);
  --pre-fg:       rgba(0,0,0,0.85);
  --selection-fg: #1a1500;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-font-smoothing: antialiased; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  line-height: 1.2;
  transition: color 0.3s ease;
}

img, svg { display: block; max-width: 100%; }

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

/* ---------- Custom utility classes (override Tailwind) ---------- */
.bg-app        { background-color: var(--bg) !important; }
.bg-card       { background-color: var(--bg-card) !important; }
.bg-card2      { background-color: var(--bg-card-2) !important; }
.bg-elev       { background-color: var(--bg-elev) !important; }
.bg-accent     { background-color: var(--accent) !important; }
.bg-header     { background-color: var(--header-bg) !important; -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px); }

.text-app      { color: var(--text) !important; }
.text-muted    { color: var(--text-muted) !important; }
.text-dim      { color: var(--text-dim) !important; }
.text-accent   { color: var(--accent) !important; }

.border-app    { border-color: var(--border) !important; }
.border-strong { border-color: var(--border-strong) !important; }
.border-accent { border-color: var(--accent) !important; }

/* ---------- Tag pill ---------- */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-card-2);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.tag-pill:hover { background: var(--bg-elev); border-color: var(--border-strong); color: var(--text); }

.tag-pill-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border-color: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
}
html.light .tag-pill-overlay {
  background: rgba(255,255,255,0.85);
  color: #0a0a0a;
  border-color: rgba(0,0,0,0.08);
}

/* ---------- Card base ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.3s ease;
}
.card:hover { border-color: var(--border-strong); }

/* ---------- Article row (horizontal card) ---------- */
.article-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.3s ease;
}
.article-row:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.article-row-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16/10;
  background: var(--bg-elev);
}
.article-row-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.article-row:hover .article-row-thumb img { transform: scale(1.04); }
@media (max-width: 720px) {
  .article-row { grid-template-columns: 1fr; }
  .article-row-thumb { aspect-ratio: 16/9; }
}

/* ---------- Sidebar small row ---------- */
.mini-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 10px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s ease, background-color 0.3s ease;
}
.mini-row:hover { border-color: var(--border-strong); }
.mini-row-thumb {
  width: 64px; height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elev);
}
.mini-row-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hero ---------- */
.hero-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  min-height: 460px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.hero-image-wrap { position: absolute; inset: 0; }
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero-gradient { position: absolute; inset: 0; background: var(--hero-fade); transition: background 0.3s ease; }
.hero-content {
  position: relative;
  z-index: 2;
  padding: 32px 36px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 460px;
}
.hero-content h1, .hero-content p, .hero-content .tag-pill { color: var(--text); }
.hero-thumbs {
  position: absolute;
  bottom: 24px;
  right: 28px;
  z-index: 3;
  display: flex;
  gap: 6px;
}
.hero-thumbs a {
  width: 56px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  background: var(--bg-elev);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.hero-thumbs a:hover { transform: translateY(-3px); border-color: var(--accent); }
.hero-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .hero-card { min-height: 420px; }
  .hero-content { padding: 24px 22px; max-width: 100%; min-height: 420px; }
  .hero-gradient { background: var(--hero-fade-v); }
  .hero-thumbs { right: 16px; bottom: 16px; }
  .hero-thumbs a { width: 44px; height: 44px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--text); color: var(--bg); opacity: 0.88; transform: translateY(-1px); }

.btn-ghost { background: var(--bg-card-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-elev); border-color: var(--border-strong); color: var(--text); }

.btn-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-icon:hover { background: var(--bg-card-2); color: var(--accent); }

/* ---------- New badge ---------- */
.badge-new {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent);
  color: var(--accent-on);
  margin-left: 4px;
}

/* ---------- Section title ---------- */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

/* ---------- Author card ---------- */
.author-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.author-card h3, .author-card h4 { color: var(--text); }
.author-card-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 14px;
  background: var(--bg-elev);
}
.author-social { display: flex; gap: 8px; margin: 14px 0 18px; }
.author-social a {
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.author-social a:hover { color: var(--accent); border-color: var(--accent); }

.work-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.work-row:last-of-type { border-bottom: none; }
.work-row-company { font-size: 13px; font-weight: 600; color: var(--text); }
.work-row-role    { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.work-row-period  { font-size: 11px; color: var(--text-dim); white-space: nowrap; }

.avail-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent);
  padding: 8px 0;
}
.avail-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--avail-glow-1);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px var(--avail-glow-1); }
  50%      { box-shadow: 0 0 0 6px var(--avail-glow-2); }
}

/* ---------- Meta line ---------- */
.meta { display: inline-flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-dim); flex-wrap: wrap; }
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-sep  { width: 2px; height: 2px; border-radius: 50%; background: var(--text-dim); opacity: 0.6; }

/* ---------- Nav ---------- */
.site-nav ul.nav { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.site-nav ul.nav li { list-style: none; }
.site-nav ul.nav li a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease;
}
.site-nav ul.nav li.nav-current a,
.site-nav ul.nav li a:hover { color: var(--accent); }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link .chev { width: 12px; height: 12px; opacity: 0.6; }

/* ---------- Dropdown menu (Categories) ---------- */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  z-index: 50;
  box-shadow: var(--shadow);
}
.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-menu a:hover { background: var(--bg-card-2); color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
html.light .search-overlay { background: rgba(255,255,255,0.92); }
.search-overlay.open { opacity: 1; pointer-events: auto; }
.search-box { width: 100%; max-width: 680px; padding: 0 24px; }
.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 32px;
  font-weight: 300;
  padding: 14px 0;
  outline: none;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-results { margin-top: 22px; max-height: 60vh; overflow-y: auto; }
.search-result {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  border-radius: 10px;
  transition: background 0.2s ease;
}
.search-result:hover { background: var(--bg-card-2); }
.search-result img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; }
.search-result-title { color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.3; }
.search-result-date { color: var(--text-dim); font-size: 12px; margin-top: 3px; }

/* ---------- Mobile drawer ---------- */
.mobile-drawer {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 998;
  padding: 80px 24px 24px;
  transform: translateX(-100%);
  transition: transform 0.3s ease, background-color 0.3s ease;
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer ul.nav { list-style: none; padding: 0; margin: 0; }
.mobile-drawer ul.nav li { list-style: none; }
.mobile-drawer ul.nav li a {
  display: block;
  padding: 14px 0;
  font-size: 17px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-drawer a:not(.nav a) { color: var(--text); padding: 12px 0; display: block; border-bottom: 1px solid var(--border); font-size: 15px; }
.mobile-drawer .label-small { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin: 18px 0 4px; }

/* ---------- Reading progress ---------- */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 9999;
  width: 0;
  transition: width 0.1s linear;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
}
.pagination a, .pagination .current {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.2s ease;
}
.pagination a:hover { background: var(--bg-elev); border-color: var(--border-strong); }
.pagination .current { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Footer nav ---------- */
.footer-nav { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-nav li { list-style: none; }
.footer-nav li a { color: var(--text-muted); font-size: 13px; transition: color 0.2s ease; }
.footer-nav li a:hover { color: var(--accent); }

/* ---------- Prose / article content ---------- */
.prose-platform {
  max-width: 760px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  opacity: 0.92;
}
.prose-platform p { margin: 0 0 1.4em; color: inherit; }
.prose-platform h2 { font-size: 26px; font-weight: 700; margin: 2em 0 0.6em; color: var(--text); letter-spacing: -0.01em; }
.prose-platform h3 { font-size: 21px; font-weight: 700; margin: 1.8em 0 0.5em; color: var(--text); }
.prose-platform h4 { font-size: 18px; font-weight: 700; margin: 1.6em 0 0.4em; color: var(--text); }
.prose-platform a  { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose-platform strong { color: var(--text); font-weight: 700; }
.prose-platform ul, .prose-platform ol { margin: 0 0 1.4em 1.5em; padding: 0; }
.prose-platform ul { list-style: disc; }
.prose-platform ol { list-style: decimal; }
.prose-platform li { margin-bottom: 0.5em; }
.prose-platform blockquote {
  border-left: 3px solid var(--accent);
  margin: 2em 0;
  padding: 0.4em 1.5em;
  font-style: italic;
  color: var(--text);
}
.prose-platform code {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  background: var(--bg-card-2);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.88em;
  color: var(--accent);
  border: 1px solid var(--border);
}
.prose-platform pre {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  padding: 18px 22px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.8em 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--pre-fg);
}
.prose-platform pre code { background: transparent; border: none; padding: 0; color: inherit; }
.prose-platform img { border-radius: 12px; margin: 1.6em auto; }
.prose-platform hr  { border: none; border-top: 1px solid var(--border); margin: 3em 0; }
.prose-platform table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 14px; }
.prose-platform th, .prose-platform td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
  color: var(--text);
}
.prose-platform th { background: var(--bg-card-2); font-weight: 700; }
.prose-platform figcaption { font-size: 13px; color: var(--text-dim); text-align: center; margin-top: 6px; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

.no-thumb {
  background: var(--no-thumb-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--no-thumb-fg);
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-in { animation: fade-in-up 0.5s ease both; }

.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-elev); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ---------- Theme Switch (segmented) ---------- */
.theme-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.theme-switch-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.theme-switch-btn:hover { color: var(--text); }
.theme-switch-btn.is-active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
html.light .theme-switch-btn.is-active { box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

/* =====================================================
   Hero Slider — overrides old hero-thumbs static styles
   ===================================================== */
.hero-slider {
  position: relative;
}

.hero-track {
  position: relative;
  display: grid;
  grid-template-areas: "stack";
}
.hero-slide {
  grid-area: stack;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.985);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0s linear 0.55s;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* Arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.hero-arrow:hover { color: var(--text); background: var(--bg-card-2); }
.hero-arrow:active { transform: translateY(-50%) scale(0.94); }
.hero-arrow-prev { left: -52px; }
.hero-arrow-next { right: -52px; }

@media (max-width: 1100px) {
  .hero-arrow-prev { left: 8px; background: rgba(0,0,0,0.45); color: #fff; }
  .hero-arrow-next { right: 8px; background: rgba(0,0,0,0.45); color: #fff; }
  html.light .hero-arrow-prev,
  html.light .hero-arrow-next { background: rgba(255,255,255,0.85); color: #0a0a0a; }
  .hero-arrow-prev:hover, .hero-arrow-next:hover { background: rgba(0,0,0,0.65); }
  html.light .hero-arrow-prev:hover, html.light .hero-arrow-next:hover { background: rgba(255,255,255,1); }
}

/* Thumb navigation — replaces old static thumbs */
.hero-slider .hero-thumbs {
  position: absolute;
  bottom: 24px;
  right: 28px;
  z-index: 5;
  display: flex;
  gap: 6px;
}
.hero-thumb {
  position: relative;
  width: 64px;
  height: 56px;
  border-radius: 10px;
  overflow: visible;
  border: 2px solid transparent;
  background: var(--bg-elev);
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.25s ease;
}
.hero-thumb > img,
.hero-thumb > .no-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.hero-thumb:hover { transform: translateY(-3px); }
.hero-thumb.is-active {
  border-color: #ffffff;
}
html.light .hero-thumb.is-active { border-color: #0a0a0a; }

/* Tooltip on hover */
.hero-thumb-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  white-space: normal;
  width: 180px;
  text-align: left;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow);
  z-index: 10;
}
.hero-thumb:hover .hero-thumb-tip,
.hero-thumb:focus-visible .hero-thumb-tip {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .hero-slider .hero-thumbs { right: 16px; bottom: 16px; }
  .hero-thumb { width: 48px; height: 44px; }
  .hero-thumb-tip { display: none; }
}

/* ---------- Hero arrows — solid circular style (override) ---------- */
.hero-arrow {
  width: 44px;
  height: 44px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-arrow:hover {
  background: var(--bg-elev);
  color: var(--accent);
  border-color: var(--border-strong);
  transform: translateY(-50%) scale(1.06);
}
html.light .hero-arrow {
  background: #ffffff;
  color: var(--accent);
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
html.light .hero-arrow:hover {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.hero-arrow-prev { left: -22px; }
.hero-arrow-next { right: -22px; }

@media (max-width: 1100px) {
  .hero-arrow-prev { left: 10px; }
  .hero-arrow-next { right: 10px; }
}

/* =====================================================
   Article Row — exact-match style
   ===================================================== */
.article-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  align-items: stretch;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.3s ease;
}
.article-row:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.article-row-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 4 / 3;
  background: var(--bg-elev);
}
.article-row-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.article-row:hover .article-row-thumb img { transform: scale(1.04); }

.article-row-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 14px 6px 0;
  gap: 8px;
  min-width: 0;
}

.article-row-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}
.article-row-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: inherit;
  transition: color 0.2s ease;
}
.article-row-title a:hover { color: var(--accent); }

.article-row-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-row .meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
  gap: 12px;
}
.article-row .meta-item { gap: 6px; }
.article-row .meta-item svg { opacity: 0.85; }

/* Top-right gallery indicator badge */
.article-row-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

/* Accent (soft) tag pill — purple/accent soft on white-ish bg */
.tag-pill-accent {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  font-weight: 600;
  padding: 5px 12px;
  font-size: 11px;
  letter-spacing: 0.01em;
  backdrop-filter: blur(4px);
}
.tag-pill-accent:hover {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
/* Fallback for browsers without color-mix support */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .tag-pill-accent {
    background: rgba(250,208,44,0.18);
    border-color: rgba(250,208,44,0.28);
  }
  html.light .tag-pill-accent {
    background: rgba(184,134,11,0.10);
    border-color: rgba(184,134,11,0.25);
  }
}

@media (max-width: 720px) {
  .article-row { grid-template-columns: 1fr; gap: 14px; padding: 10px; }
  .article-row-thumb { aspect-ratio: 16/10; }
  .article-row-body { padding: 4px 8px 12px; }
  .article-row-title { font-size: 18px; }
}

/* =====================================================
   Author card — exact-match style
   ===================================================== */
.author-card {
  padding: 22px 22px 16px;
}

.author-photo {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 16px;
  background: var(--bg-elev);
  display: block;
}

.author-intro {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 18px;
}
.author-intro .author-name { color: var(--accent); }

/* Social icons with brand colors */
.author-socials {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.author-socials .social {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.author-socials .social:hover { transform: translateY(-2px); filter: brightness(1.1); color: #fff; }

.author-socials .social-youtube   { background: #ff0000; }
.author-socials .social-x         { background: #000000; }
html.light .author-socials .social-x { background: #111111; }
.author-socials .social-facebook  { background: #1877f2; }
.author-socials .social-instagram {
  background:
    radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

/* Work Experience */
.section-title.work-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}

/* Load More link */
.load-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 12px 0;
  margin: 4px 0 14px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.load-more:hover { color: var(--text); }
.load-more svg { opacity: 0.7; }

/* Get In Touch button */
.get-in-touch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}
.get-in-touch:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: translateY(-1px);
}
html.light .get-in-touch {
  background: #ffffff;
  border-color: var(--border-strong);
}
html.light .get-in-touch:hover {
  background: var(--text);
  color: var(--bg);
}
.get-in-touch svg { transition: transform 0.2s ease; }
.get-in-touch:hover svg { transform: translateX(2px); }

/* =====================================================
   Polished social icons (override prior style)
   ===================================================== */
.author-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.author-socials .social {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(.34,1.56,.64,1), box-shadow 0.22s ease, filter 0.22s ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 1px 3px rgba(0,0,0,0.2);
}
.author-socials .social svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.author-socials .social:hover {
  transform: translateY(-2px) scale(1.05);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 6px 14px rgba(0,0,0,0.35);
  filter: brightness(1.08) saturate(1.05);
}
.author-socials .social:active { transform: translateY(0) scale(0.96); }

/* Brand backgrounds — official colors */
.author-socials .social-youtube   { background: #FF0033; }
.author-socials .social-x         { background: #000000; }
.author-socials .social-facebook  { background: #0866FF; }
.author-socials .social-linkedin  { background: #0A66C2; }

/* Instagram authentic radial gradient */
.author-socials .social-instagram {
  background:
    radial-gradient(circle at 30% 110%,
      #FFDD55 0%,
      #FFDD55 5%,
      #FF543E 30%,
      #C837AB 60%,
      #4B0082 100%
    );
}

/* Light theme — X icon stays dark for brand integrity */
html.light .author-socials .social-x { background: #000000; }

/* Subtle ring on hover for refinement */
.author-socials .social::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
  pointer-events: none;
}

/* =====================================================
   Work rows — multi-line title + collapsible 3rd item
   ===================================================== */
.work-row { gap: 12px; }
.work-row > div:first-child { min-width: 0; flex: 1; }
.work-row-company {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.work-row-period { padding-top: 1px; }

.work-row-hidden { display: none; }
.work-expanded .work-row-hidden { display: flex; }

.load-more svg { transition: transform 0.22s ease; }
.work-expanded .load-more svg { transform: rotate(180deg); }

/* Hide the social icons row entirely when no socials are set */
.author-socials:empty,
.author-socials:not(:has(a)) {
  display: none;
  border: none;
  margin: 0;
  padding: 0;
}

/* =====================================================
   Sidebar Featured Slider — exact-match style
   ===================================================== */
.featured-slider {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 5 / 7;
}

.featured-slides {
  position: relative;
  display: grid;
  grid-template-areas: "stack";
  width: 100%;
  height: 100%;
}

.featured-slide {
  grid-area: stack;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
  pointer-events: none;
}
.featured-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.45s ease;
}

.featured-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.featured-slide:hover .featured-image { transform: scale(1.04); }

.featured-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.85) 92%);
}

.featured-content {
  position: absolute;
  left: 0; right: 0;
  bottom: 78px;     /* leaves room for the thumb strip */
  padding: 16px 18px;
  color: #fff;
  text-align: center;
  z-index: 2;
}
.featured-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}
.featured-meta {
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  gap: 10px;
}
.featured-meta .meta-sep { background: rgba(255,255,255,0.5); }
.featured-meta .meta-item svg { opacity: 0.9; }

/* Arrows */
.featured-arrow {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.featured-arrow:hover { background: rgba(0,0,0,0.8); }
.featured-arrow:active { transform: translateY(-50%) scale(0.94); }
.featured-arrow-prev { left: 8px; }
.featured-arrow-next { right: 8px; }

/* Thumb strip at bottom */
.featured-thumbs {
  position: absolute;
  bottom: 14px;
  left: 0; right: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
}
.featured-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  background: rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.7;
}
.featured-thumb > img,
.featured-thumb > .no-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.featured-thumb:hover { opacity: 1; transform: translateY(-2px); }
.featured-thumb.is-active {
  border-color: #ffffff;
  opacity: 1;
}

/* =====================================================
   Hamburger icon + Mega menu
   ===================================================== */
.hamburger-btn .hb-close { display: none; }
.hamburger-btn.is-open .hb-open  { display: none; }
.hamburger-btn.is-open .hb-close { display: block; }
.hamburger-btn { transition: background 0.2s ease, color 0.2s ease; }

/* Backdrop */
.mega-menu-backdrop {
  position: fixed;
  inset: 64px 0 0 0;
  background: rgba(0,0,0,0.45);
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.mega-menu-backdrop.open { opacity: 1; pointer-events: auto; }
html.light .mega-menu-backdrop { background: rgba(0,0,0,0.2); }

/* Mega menu container */
.mega-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 36;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.mega-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mega-menu-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 48px;
  padding: 32px 40px 40px;
}

.mega-col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0 0 18px;
}

/* Column 1 — navigation */
.mega-col-nav ul.nav,
.mega-col-nav .nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mega-col-nav ul.nav li,
.mega-col-nav .nav li { list-style: none; }
.mega-col-nav ul.nav li a,
.mega-col-nav .nav li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 0;
  transition: color 0.15s ease;
}
.mega-col-nav ul.nav li a:hover,
.mega-col-nav .nav li a:hover { color: var(--accent); }

/* Column 2 — categories list */
.mega-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mega-list li { list-style: none; }
.mega-list li a {
  display: block;
  padding: 10px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.15s ease;
}
.mega-list li a:hover { color: var(--accent); }

/* Column 3 — popular posts */
.mega-col-popular { padding-left: 12px; border-left: 1px solid var(--border); }
.mega-post {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 6px;
  transition: background 0.2s ease;
  align-items: center;
}
.mega-post:hover { background: var(--bg-card-2); }
.mega-post-thumb {
  width: 96px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elev);
}
.mega-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mega-post-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}
.mega-post:hover .mega-post-title { color: var(--accent); }
.mega-post .meta { font-size: 11px; gap: 8px; }

/* Body lock when open */
body.menu-open { overflow: hidden; }

/* Responsive */
@media (max-width: 1023px) {
  .mega-menu-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 20px 28px;
  }
  .mega-col-popular { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); padding-top: 24px; }
  .mega-post { grid-template-columns: 80px 1fr; }
  .mega-post-thumb { width: 80px; height: 58px; }
  .mega-post-title { font-size: 14px; }
}

/* Legacy mobile-drawer rules — neutralize since we replaced it */
.mobile-drawer { display: none !important; }

/* =====================================================
   Mega menu — contained dropdown (overrides earlier rules)
   ===================================================== */
.mega-menu {
  position: fixed;
  top: 72px;
  left: 24px;
  right: auto;
  bottom: auto;
  width: min(820px, calc(100vw - 48px));
  max-height: calc(100vh - 96px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  overflow: hidden;
}
html.light .mega-menu { box-shadow: 0 20px 40px rgba(0,0,0,0.18); }

.mega-menu-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  padding: 0;
  max-width: none;
  max-height: calc(100vh - 96px);
  overflow: hidden;
}

.mega-col {
  padding: 24px 26px;
  overflow-y: auto;
}
.mega-col-posts { border-right: 1px solid var(--border); }
.mega-col-tags  { background: var(--bg-card-2); }

.mega-col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0 0 16px;
}

/* Latest posts */
.mega-post {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 4px;
  transition: background 0.2s ease;
  align-items: center;
}
.mega-post:hover { background: var(--bg-card-2); }
.mega-col-tags .mega-post:hover { background: var(--bg-elev); }
.mega-post-thumb {
  width: 84px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elev);
}
.mega-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mega-post-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}
.mega-post:hover .mega-post-title { color: var(--accent); }
.mega-post .meta { font-size: 11px; gap: 8px; color: var(--text-dim); }

/* Tag list */
.mega-tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mega-tag-list li { list-style: none; }
.mega-tag-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease;
}
.mega-tag-list li a:hover { background: var(--bg-card); color: var(--accent); }
.mega-tag-list .tag-count {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .mega-menu {
    left: 12px;
    right: 12px;
    width: auto;
  }
  .mega-menu-inner { grid-template-columns: 1fr; }
  .mega-col-posts { border-right: 0; border-bottom: 1px solid var(--border); }
}

/* =====================================================
   Mega menu — position aligned with hamburger button
   (overrides previous left/width)
   ===================================================== */
.mega-menu {
  position: fixed;
  top: 70px;
  left: 20px;
  right: auto;
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - 90px);
}

@media (min-width: 1024px) {
  .mega-menu {
    top: 72px;
    /* Align left edge with the hamburger button:
       centered 1280px container + lg:px-8 (32px) padding */
    left: max(32px, calc((100vw - 1280px) / 2 + 32px));
    width: 760px;
  }
}
