/* Critchlow-inspired left-sidebar layout with dark/light toggle */

/* ─── Atmospheric Background ─── */
/* Subtle depth layers — navy/teal tones, NOT the Playground's crimson/gold */
.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 15% 25%, rgba(88, 166, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 75%, rgba(9, 105, 218, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(88, 166, 255, 0.03) 0%, transparent 70%),
    var(--bg);
  pointer-events: none;
}

[data-theme="light"] .background-overlay {
  background: none;
}

/* ─── Theme Variables ─── */
:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-sidebar: #0d1117;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --text-heading: #f0f6fc;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --border: #21262d;
  --sidebar-border: #30363d;
  --card-shadow: 0 2px 8px rgba(0,0,0,.3);
  --sidebar-width: 240px;
  /* Depth system — glow colors derived from accent */
  --glow-accent: rgba(88, 166, 255, 0.15);
  --glow-accent-strong: rgba(88, 166, 255, 0.25);
  --inner-border: rgba(88, 166, 255, 0.12);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-card: #f6f8fa;
  --bg-sidebar: #f6f8fa;
  --text: #24292f;
  --text-muted: #57606a;
  --text-heading: #1f2328;
  --accent: #0969da;
  --accent-hover: #0550ae;
  --border: #d0d7de;
  --sidebar-border: #d0d7de;
  --card-shadow: 0 2px 8px rgba(0,0,0,.08);
  --glow-accent: rgba(9, 105, 218, 0.1);
  --glow-accent-strong: rgba(9, 105, 218, 0.18);
  --inner-border: rgba(9, 105, 218, 0.1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s ease, color .3s ease;
  min-height: 100vh;
  display: flex;
}

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

h1, h2, h3, h4 { color: var(--text-heading); font-weight: 600; }

/* ─── Left Sidebar ─── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, var(--bg-sidebar) 0%, var(--bg-card) 100%);
  border-right: 1px solid var(--sidebar-border);
  border-top: 3px solid var(--accent);
  box-shadow: 2px 0 16px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem 1.5rem;
  transition: background .3s ease, border-color .3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  margin-bottom: 2rem;
}

.sidebar-brand a {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-heading);
  letter-spacing: -.02em;
  text-decoration: none;
  transition: color .15s, text-shadow .2s;
}

.sidebar-brand a:hover {
  color: var(--accent);
  text-shadow: 0 0 16px var(--glow-accent);
}

/* ─── Sidebar Nav Links ─── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  flex: 1;
}

.sidebar-link {
  display: block;
  padding: .45rem .6rem;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .15s, background .15s, box-shadow .2s;
  text-decoration: none;
}

.sidebar-link:hover {
  color: var(--text-heading);
  background: var(--bg-card);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--inner-border);
}

.sidebar-link.active {
  color: var(--text-heading);
  background: var(--bg-card);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--inner-border), 0 0 12px var(--glow-accent);
}

/* ─── Sidebar Sub-nav Groups ─── */
.sidebar-group {
  display: flex;
  flex-direction: column;
}

.sidebar-children {
  display: none;
  padding-left: .85rem;
  border-left: 2px solid var(--accent);
  margin-left: .6rem;
  margin-top: .1rem;
  margin-bottom: .1rem;
  box-shadow: -2px 0 8px -4px var(--glow-accent);
}

.sidebar-group.open > .sidebar-children {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.sidebar-child {
  font-size: .85rem;
  padding: .3rem .6rem;
}

.sidebar-parent::after {
  content: '▸';
  font-size: .7rem;
  margin-left: .4rem;
  opacity: .5;
  transition: transform .2s;
  display: inline-block;
}

.sidebar-group.open .sidebar-parent::after {
  transform: rotate(90deg);
}

/* ─── Sidebar Footer (toggle + social) ─── */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-top: 1.5rem;
  margin-top: auto;
  border-top: 1px solid var(--sidebar-border);
  box-shadow: 0 -2px 10px -4px rgba(0,0,0,.15);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .3rem .6rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.theme-toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--glow-accent);
}

.sidebar-social {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color .15s, text-shadow .2s;
}
.sidebar-social:hover {
  color: var(--text-heading);
  text-shadow: 0 0 10px var(--glow-accent);
}

/* ─── Main Content Area ─── */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem 4rem;
}

/* ─── Home Hero ─── */
.hero {
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.2rem;
  letter-spacing: -.03em;
  margin-bottom: .5rem;
  background: linear-gradient(135deg, var(--text-heading) 0%, var(--accent) 60%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1.65;
}

/* ─── Section Headings ─── */
.section-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 2.5rem 0 .75rem;
  padding-bottom: .4rem;
  padding-left: .6rem;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  box-shadow: -4px 0 12px var(--glow-accent);
}

/* ── Nested sub-nav ── */
.sidebar-nested {
  padding-left: 1rem;
}
.sidebar-nested .sidebar-child {
  font-size: 0.82rem;
  opacity: 0.75;
}
.sidebar-nested .sidebar-child:hover,
.sidebar-nested .sidebar-child.active {
  opacity: 1;
}

/* ── Sub-page card grid ── */
.subpage-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.subpage-card {
  display: block;
  padding: 1.2rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
  background: var(--bg-card);
}
.subpage-card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid var(--inner-border);
  border-radius: 4px;
  pointer-events: none;
}
.subpage-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,.15), 0 0 24px var(--glow-accent);
  transform: translateY(-3px);
}
.subpage-card h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.subpage-card p { margin: 0; font-size: 0.85rem; opacity: 0.7; }

/* ─── Writing List (Blog posts) ─── */
.writing-list { list-style: none; }

.writing-list li {
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.writing-list li:last-child { border-bottom: none; }

.writing-list .post-title {
  font-weight: 500;
  color: var(--text-heading);
  flex: 1;
}

.writing-list .post-date {
  font-size: .85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

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

/* ─── Project Cards ─── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: .75rem 0 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid var(--inner-border);
  border-radius: 4px;
  pointer-events: none;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(0,0,0,.2), 0 0 20px var(--glow-accent);
  transform: translateY(-3px);
  text-decoration: none;
}

.project-card h3 {
  font-size: 1rem;
  margin-bottom: .2rem;
  color: var(--text-heading);
}

.project-card p {
  font-size: .88rem;
  color: var(--text-muted);
}

/* ─── Sub-page Index Cards ─── */
.subpage-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .85rem;
  margin: 1.25rem 0;
}

.subpage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .85rem 1rem;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  text-decoration: none;
  position: relative;
}

.subpage-card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid var(--inner-border);
  border-radius: 4px;
  pointer-events: none;
}

.subpage-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,.15), 0 0 20px var(--glow-accent);
  transform: translateY(-3px);
  text-decoration: none;
}

.subpage-card h3 {
  font-size: .95rem;
  margin-bottom: .1rem;
  color: var(--text-heading);
}

.subpage-card p {
  font-size: .82rem;
  color: var(--text-muted);
}

/* ─── Page Content (single pages) ─── */
.page-content {
  max-width: 100%;
}

.page-content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.page-content h2 {
  font-size: 1.35rem;
  margin: 2rem 0 .6rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid var(--border);
}

.page-content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 .4rem;
}

.page-content p { margin: .6rem 0; }
.page-content ul, .page-content ol { margin: .6rem 0; padding-left: 1.5rem; }
.page-content code { background: var(--bg-card); padding: .15em .35em; border-radius: 4px; font-size: .9em; }
.page-content pre { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 1rem; overflow-x: auto; margin: 1rem 0; }
.page-content pre code { background: none; padding: 0; }
.page-content blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; color: var(--text-muted); margin: 1rem 0; }

/* ─── Footer (inside main content) ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
  font-size: .82rem;
  color: var(--text-muted);
}

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

/* ─── Mobile: hamburger toggle + overlay sidebar ─── */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--sidebar-border);
  padding: .75rem 1rem;
  align-items: center;
  justify-content: space-between;
  transition: background .3s ease;
}

.mobile-header .mobile-brand a {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-heading);
  text-decoration: none;
}

.hamburger {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .35rem .6rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text);
  line-height: 1;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
}

@media (max-width: 768px) {
  body { flex-direction: column; }

  .mobile-header { display: flex; }

  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    z-index: 300;
    width: 260px;
    min-width: 260px;
    height: 100vh;
    transition: left .3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.3);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay.visible {
    display: block;
  }

  .main-content {
    padding: 1.5rem 1rem 3rem;
    max-width: 100%;
  }

  .hero h1 { font-size: 1.6rem; }
  .hero .tagline { white-space: normal; font-size: .92rem; }
  .writing-list li { flex-direction: column; gap: .1rem; }
  .project-grid { grid-template-columns: 1fr; }
  .subpage-list { grid-template-columns: 1fr; }
  .tech-logos { gap: 1rem 1.25rem; padding: .85rem 1rem; }
  .tech-logo img { width: 26px; height: 26px; }
}

/* ─── Tech Stack Logo Strip ─── */
.tech-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  padding: 1.1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 1.5rem 0 0;
}

.tech-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  opacity: .6;
  transition: opacity .2s, transform .2s;
}

.tech-logo:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.tech-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, .92);
}

[data-theme="dark"] .tech-logo img {
  background: rgba(240, 240, 240, .92);
}

[data-theme="light"] .beyond-badge {
  background: rgba(9, 105, 218, .08);
  border-color: rgba(9, 105, 218, .2);
}

.tech-logo span {
  font-size: .67rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   ABOUT / RESUME PAGE STYLES
   ═══════════════════════════════════════════════ */

/* ─── Action Buttons (Playground-inspired depth) ─── */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
  border: 2px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .03em;
  transition: all .25s ease;
  position: relative;
  cursor: pointer;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border: 1px solid var(--inner-border);
  border-radius: 4px;
  pointer-events: none;
}

.action-btn:hover {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
  color: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(0,0,0,.25), 0 0 20px var(--glow-accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn .btn-arrow {
  transition: transform .2s ease;
}

.action-btn:hover .btn-arrow {
  transform: translateX(3px);
}

[data-theme="light"] .action-btn {
  background: linear-gradient(180deg, #f0f6fc 0%, #ffffff 100%);
  border-color: var(--accent);
  color: var(--accent);
}

[data-theme="light"] .action-btn:hover {
  background: linear-gradient(180deg, #f0f6fc 0%, #ffffff 100%);
  box-shadow: 0 4px 16px rgba(9, 105, 218,.12), 0 0 16px var(--glow-accent);
}

/* ─── Resume Name — enhanced gradient ─── */
.resume-hero {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.resume-name {
  font-size: 2.4rem;
  letter-spacing: -.03em;
  margin-bottom: .35rem;
  background: linear-gradient(135deg, var(--text-heading) 0%, var(--accent) 60%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.resume-tagline {
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: .85rem;
  line-height: 1.5;
}

.resume-summary {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.65;
  width: 100%;
  max-width: 100%;
}

/* Hero "beyond" block needs top margin inside hero */
.resume-hero .job-beyond {
  margin-top: 1.25rem;
}

/* ─── Section wrapper ─── */
.resume-section {
  margin-bottom: 2.5rem;
}

/* ─── Skills Grid ─── */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: .5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  position: relative;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid var(--inner-border);
  border-radius: 4px;
  pointer-events: none;
}

.skill-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,.15), 0 0 20px var(--glow-accent);
  transform: translateY(-2px);
}

.skill-card--beyond {
  border-style: dashed;
}

.skill-card--beyond:hover {
  border-color: var(--accent);
  border-style: dashed;
  box-shadow: 0 4px 20px rgba(0,0,0,.15), 0 0 20px var(--glow-accent);
  transform: translateY(-2px);
}

.beyond-badge {
  display: inline-block;
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  background: rgba(88, 166, 255, .08);
  border: 1px solid rgba(88, 166, 255, .2);
  border-radius: 4px;
  padding: .1rem .35rem;
  margin-left: .4rem;
  vertical-align: middle;
  line-height: 1;
}

.skill-card h3 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0 0 .5rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.skill-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-card li {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: .15rem 0;
  position: relative;
  padding-left: .85rem;
}

.skill-card li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

/* ─── Highlights ─── */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: .5rem;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  position: relative;
}

.highlight-card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid var(--inner-border);
  border-radius: 4px;
  pointer-events: none;
}

.highlight-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,.15), 0 0 20px var(--glow-accent);
  transform: translateY(-2px);
}

.highlight-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

.highlight-card p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.highlight-card strong {
  color: var(--text-heading);
}

/* ─── Job Entries ─── */
.job-entry {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.job-entry:last-of-type {
  border-bottom: none;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: .6rem;
}

.job-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0;
}

.job-role {
  font-size: .88rem;
  color: var(--accent);
  margin: .1rem 0 0;
  font-weight: 500;
}

.job-contractor {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 400;
}

.job-dates {
  font-size: .82rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: .25rem;
  font-variant-numeric: tabular-nums;
}

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

.job-details li {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: .2rem 0 .2rem 1rem;
  position: relative;
}

.job-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .65rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
}

/* ─── Job "What the resume doesn't say" Block ─── */
.job-beyond {
  margin-top: 1rem;
  padding: .85rem 1.1rem;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  box-shadow: inset 3px 0 12px -6px var(--glow-accent);
}

.job-beyond-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: .35rem;
}

.job-beyond p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.job-beyond em {
  color: var(--text);
  font-style: italic;
}

/* ─── Earlier Roles Table ─── */
.job-earlier {
  margin-top: 1rem;
}

.job-earlier h3 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 .75rem;
}

.job-table {
  width: 100%;
  border-collapse: collapse;
}

.job-table td {
  font-size: .85rem;
  color: var(--text-muted);
  padding: .45rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: baseline;
}

.job-table tr:last-child td {
  border-bottom: none;
}

.job-table .job-company {
  color: var(--text-heading);
  font-weight: 500;
  width: 42%;
}

.job-table .job-role-sm {
  width: 40%;
}

.job-table .job-date-sm {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-muted);
  opacity: .7;
}

/* ─── Global Table (markdown pipe tables) ─── */
.main-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .9rem;
}

.main-content table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-heading);
  padding: .5rem .75rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.main-content table td {
  padding: .45rem .75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: baseline;
}

.main-content table tr:last-child td {
  border-bottom: none;
}

.main-content table strong {
  color: var(--text-heading);
}

/* ─── Certification Grid ─── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: .5rem;
}

.cert-group h3 {
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0 0 .6rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--border);
}

.cert-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cert-group li {
  font-size: .82rem;
  color: var(--text-muted);
  padding: .3rem 0;
  line-height: 1.5;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .75rem;
  white-space: nowrap;
}

.cert-year {
  font-size: .75rem;
  color: var(--text-muted);
  opacity: .55;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
  padding-left: .5rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cert-group li {
    white-space: normal;
  }
  .cert-year {
    white-space: nowrap;
  }
}

/* ─── Beyond the Resume Divider ─── */
.beyond-divider {
  text-align: center;
  margin: 3rem 0 2rem;
  position: relative;
}

.beyond-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.beyond-divider span {
  position: relative;
  background: var(--bg);
  padding: 0 1.5rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
}

/* ─── Beyond Cards ─── */
.beyond-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: .5rem;
}

.beyond-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.35rem;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  position: relative;
}

.beyond-card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid var(--inner-border);
  border-radius: 6px;
  pointer-events: none;
}

.beyond-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(0,0,0,.15), 0 0 24px var(--glow-accent);
  transform: translateY(-3px);
}

.beyond-card h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0 0 .5rem;
}

.beyond-card p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.beyond-card em {
  color: var(--text);
  font-style: italic;
}

/* ─── Philosophy Block ─── */
.philosophy-block {
  margin-top: .5rem;
}

.philosophy-block blockquote {
  border-left: 3px solid var(--accent);
  padding: .75rem 1.25rem;
  margin: 0 0 1rem;
  background: var(--bg-card);
  border-radius: 0 6px 6px 0;
  box-shadow: inset 3px 0 12px -6px var(--glow-accent);
}

.philosophy-block blockquote p {
  font-size: .95rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}

.philosophy-block > p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ─── Responsive: About page ─── */
@media (max-width: 768px) {
  .resume-name {
    font-size: 1.8rem;
  }
  .resume-tagline {
    font-size: .92rem;
  }
  .job-header {
    flex-direction: column;
    gap: .2rem;
  }
  .job-dates {
    padding-top: 0;
  }
  .skill-grid,
  .highlights-grid,
  .beyond-grid {
    grid-template-columns: 1fr;
  }
  .cert-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════
   TAG CLOUD / CATEGORY FILTER (Blog page)
   ═══════════════════════════════════════════════ */

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

.tag-filter-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
  margin-bottom: .6rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.tag-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .7rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, box-shadow .2s;
  font-family: inherit;
}

.tag-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--glow-accent);
}

.tag-btn-active {
  color: var(--text-heading) !important;
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 16px var(--glow-accent-strong) !important;
}

[data-theme="light"] .tag-btn-active {
  color: #fff !important;
}

.tag-btn-active .tag-count {
  color: rgba(255,255,255,.8);
}

[data-theme="light"] .tag-btn-active .tag-count {
  color: rgba(255,255,255,.85);
}

.tag-count {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  opacity: .6;
}

.tag-clear-btn {
  display: inline-block;
  margin-top: .5rem;
  padding: .25rem .6rem;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  font-family: inherit;
}

.tag-clear-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Post items hidden/shown by tag filter */
.writing-list li.tag-hidden {
  display: none !important;
}

/* Responsive: tag cloud on mobile */
@media (max-width: 768px) {
  .tag-cloud {
    gap: .35rem;
  }
  .tag-btn {
    font-size: .76rem;
    padding: .25rem .55rem;
  }
}