/* ─── RESET ───────────────────────────────────────────────── */

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

/* ─── DARK THEME (default) ───────────────────────────────── */

:root, [data-theme="dark"] {
  --bg: #0d0a14;
  --bg-nav: rgba(13, 10, 20, 0.82);
  --bg-surface: rgba(18, 14, 28, 0.5);
  --bg-gradient-a: rgba(80, 55, 130, 0.12);
  --bg-gradient-b: rgba(50, 35, 90, 0.1);
  --accent: #c4b5fd;
  --accent-dim: rgba(196, 181, 253, 0.1);
  --accent-mid: rgba(196, 181, 253, 0.25);
  --text-primary: #f0ebff;
  --text-secondary: #9d93b8;
  --text-tertiary: #6b6286;
  --border: rgba(196, 181, 253, 0.1);
  --border-hover: rgba(196, 181, 253, 0.22);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.55);
  --inset-glow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --hero-rule: rgba(196, 181, 253, 0.18);
  --tag-bg: rgba(196, 181, 253, 0.08);
  --tag-border: rgba(196, 181, 253, 0.14);
  --book-shadow: 4px 4px 16px rgba(0, 0, 0, 0.4);
  --kofi-color: var(--bg);
}

/* ─── LIGHT THEME ────────────────────────────────────────── */

[data-theme="light"] {
  --bg: #f5f3ff;
  --bg-nav: rgba(245, 243, 255, 0.9);
  --bg-surface: rgba(255, 255, 255, 0.7);
  --bg-gradient-a: rgba(124, 58, 237, 0.06);
  --bg-gradient-b: rgba(109, 40, 217, 0.04);
  --accent: #7c3aed;
  --accent-dim: rgba(124, 58, 237, 0.08);
  --accent-mid: rgba(124, 58, 237, 0.18);
  --text-primary: #1a1033;
  --text-secondary: #5b5279;
  --text-tertiary: #9585bb;
  --border: rgba(124, 58, 237, 0.12);
  --border-hover: rgba(124, 58, 237, 0.25);
  --shadow-card: 0 4px 24px rgba(124, 58, 237, 0.08);
  --shadow-hover: 0 12px 40px rgba(124, 58, 237, 0.14);
  --inset-glow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --hero-rule: rgba(124, 58, 237, 0.18);
  --tag-bg: rgba(124, 58, 237, 0.06);
  --tag-border: rgba(124, 58, 237, 0.14);
  --book-shadow: 4px 4px 16px rgba(124, 58, 237, 0.1);
  --kofi-color: #fff;
}

/* Respect system preference when no manual override */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f3ff;
    --bg-nav: rgba(245, 243, 255, 0.9);
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-gradient-a: rgba(124, 58, 237, 0.06);
    --bg-gradient-b: rgba(109, 40, 217, 0.04);
    --accent: #7c3aed;
    --accent-dim: rgba(124, 58, 237, 0.08);
    --accent-mid: rgba(124, 58, 237, 0.18);
    --text-primary: #1a1033;
    --text-secondary: #5b5279;
    --text-tertiary: #9585bb;
    --border: rgba(124, 58, 237, 0.12);
    --border-hover: rgba(124, 58, 237, 0.25);
    --shadow-card: 0 4px 24px rgba(124, 58, 237, 0.08);
    --shadow-hover: 0 12px 40px rgba(124, 58, 237, 0.14);
    --inset-glow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --hero-rule: rgba(124, 58, 237, 0.18);
    --tag-bg: rgba(124, 58, 237, 0.06);
    --tag-border: rgba(124, 58, 237, 0.14);
    --book-shadow: 4px 4px 16px rgba(124, 58, 237, 0.1);
    --kofi-color: #fff;
  }
}

/* ─── SHARED TOKENS ──────────────────────────────────────── */

:root {
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;
  --max-w: 1400px;
  --radius: 16px;
  --radius-sm: 10px;
}

/* ─── BASE ───────────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, var(--bg-gradient-a) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, var(--bg-gradient-b) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* ─── ANIMATIONS ─────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.7s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }

/* ─── LAYOUT ─────────────────────────────────────────────── */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
  position: relative;
  z-index: 1;
}

.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

/* ─── GLASS CARD ─────────────────────────────────────────── */

.glass-card {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--inset-glow), var(--shadow-card);
  border-radius: var(--radius);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--inset-glow), var(--shadow-hover);
  border-color: var(--border-hover);
}

/* ─── NAVIGATION ─────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(196, 181, 253, 0.04), 0 4px 24px rgba(0, 0, 0, 0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 12;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex-grow: 1;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text-primary);
  background: var(--accent-dim);
  outline: none;
}

.nav-links a.nav-active {
  color: var(--text-primary);
  background: var(--accent-dim);
}

.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-social a.kofi-pill {
  width: auto;
  height: auto;
}


.nav-social a:hover,
.nav-social a:focus-visible {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-social a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-social svg {
  width: 18px;
  height: 18px;
}

.kofi-pill {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--kofi-color);
  background: var(--accent);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 999px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.kofi-pill:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.kofi-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--accent);
  background: var(--accent-dim);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-hamburger:hover {
  background: var(--accent-dim);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: background 0.2s;
}

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 12px 0 16px;
  border-top: 1px solid var(--border);
  gap: 2px;
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile a {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-mobile a:hover {
  color: var(--text-primary);
  background: var(--accent-dim);
}

.nav-mobile-social {
  display: flex;
  gap: 4px;
  padding: 8px 16px 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.nav-mobile-social a {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 10px;
}

/* ─── HERO ───────────────────────────────────────────────── */

#hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
  width: 100%;
}

.hero-content {
  max-width: 600px;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.75;
  margin-bottom: 20px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-rule {
  width: 100%;
  max-width: 360px;
  height: 2px;
  background: var(--hero-rule);
  border: none;
  margin-bottom: 24px;
  border-radius: 2px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.hero-bio {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 58ch;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  backdrop-filter: blur(8px);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-social a:hover,
.hero-social a:focus-visible {
  color: var(--accent);
  border-color: var(--accent-mid);
  transform: translateY(-2px);
}

.hero-social a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero-social svg {
  width: 18px;
  height: 18px;
}

.hero-cv-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--kofi-color);
  background: var(--accent);
  text-decoration: none;
  padding: 14px 40px;
  border-radius: 999px;
  margin-bottom: 24px;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-cv-btn:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.hero-cv-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero-kofi {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--kofi-color);
  background: var(--accent);
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 999px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-kofi:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.hero-kofi:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-self: center;
}

.currently-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.currently-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.75;
  margin: 0;
}

.currently-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.currently-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.currently-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 3px;
}

.currently-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

/* ─── HERO VISUAL ────────────────────────────────────────── */

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hero-stat {
  padding: 28px 24px;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 400;
  line-height: 1.4;
}

.hero-stat-accent {
  color: var(--accent);
}

.hero-availability {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
}

.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 8px rgba(110, 231, 183, 0.5);
  flex-shrink: 0;
}

.availability-text {
  font-size: 14px;
  color: var(--text-secondary);
}

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

/* ─── PROJECTS ───────────────────────────────────────────── */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}

.project-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.project-card--large {
  grid-column: span 2;
  min-height: 280px;
}

.project-card--tall {
  grid-row: span 2;
}

.project-card-header {
  margin-bottom: 16px;
}

.project-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-icon {
  font-size: 20px;
  line-height: 1;
}

.project-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 52ch;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 4px 10px;
  border-radius: 999px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.7;
  margin-top: 20px;
  transition: opacity 0.2s ease, gap 0.2s ease;
}

.project-link:hover,
.project-link:focus-visible {
  opacity: 1;
  gap: 10px;
}

.project-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── RUMBLES ────────────────────────────────────────────── */

.rumbles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.rumble-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.rumble-quote-mark {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 0.8;
  color: var(--accent);
  opacity: 0.25;
  margin-bottom: 16px;
  font-weight: 800;
}

.rumble-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  line-height: 1.3;
}

.rumble-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  flex: 1;
  font-style: italic;
}

.rumble-source {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.rumble-source-date {
  font-size: 12px;
  color: var(--text-tertiary);
  opacity: 0.6;
}

/* ─── COMMONPLACE ────────────────────────────────────────── */

.commonplace-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cp-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.cp-status {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cp-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-evergreen .cp-status { color: #6ee7b7; }
.status-evergreen .cp-status-dot { background: #6ee7b7; }
.status-growing .cp-status { color: #86efac; }
.status-growing .cp-status-dot { background: #86efac; }
.status-seeding .cp-status { color: #fcd34d; }
.status-seeding .cp-status-dot { background: #fcd34d; }

.cp-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 10px;
  text-decoration: none;
}

.cp-snippet {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  flex: 1;
}

.cp-date {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.cp-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.65;
  margin-top: 14px;
  transition: opacity 0.2s ease, gap 0.2s ease;
}

.cp-link:hover { opacity: 1; gap: 9px; }

.cp-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── LIBRARY ────────────────────────────────────────────── */

.library-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.book-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
}

.book-cover {
  width: 80px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--book-shadow);
  flex-shrink: 0;
}

.book-cover-fallback {
  width: 80px;
  height: 120px;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--book-shadow);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
}

.book-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-status {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.book-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.book-status-evergreen { color: #6ee7b7; }
.book-status-evergreen .book-status-dot { background: #6ee7b7; }
.book-status-growing { color: #86efac; }
.book-status-growing .book-status-dot { background: #86efac; }
.book-status-seeding { color: #fcd34d; }
.book-status-seeding .book-status-dot { background: #fcd34d; }

.book-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.book-author {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.book-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  font-style: italic;
  flex: 1;
}

/* ─── SECTION FOOTER LINK ────────────────────────────────── */

.section-see-all {
  margin-top: 40px;
  text-align: right;
}

.see-all-link {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.65;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease, gap 0.2s ease;
}

.see-all-link:hover { opacity: 1; gap: 10px; }

.see-all-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── FOOTER ─────────────────────────────────────────────── */

footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-sitemap {
  display: flex;
  gap: 48px;
}

.footer-sitemap-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-sitemap-heading {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 4px;
}

.footer-sitemap-col a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-sitemap-col a:hover {
  color: var(--accent);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.footer-right-social {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-right-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.footer-right-social a:hover,
.footer-right-social a:focus-visible {
  color: var(--accent);
  background: var(--accent-dim);
}

.footer-right-social a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.footer-right-social svg {
  width: 17px;
  height: 17px;
}

.footer-kofi {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--kofi-color);
  background: var(--accent);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  margin-left: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.footer-kofi:hover { opacity: 0.85; }

.footer-kofi:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */

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

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .currently-card {
    width: 100%;
  }

  .hero-stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-card--large {
    grid-column: span 2;
  }

  .rumbles-grid {
    grid-template-columns: 1fr 1fr;
  }

  .commonplace-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  section {
    padding: 64px 0;
  }

  .hero-inner {
    gap: 40px;
  }

  .hero-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .project-card--large {
    grid-column: span 1;
  }

  .project-card--tall {
    grid-row: span 1;
  }

  .rumbles-grid {
    grid-template-columns: 1fr;
  }

  .commonplace-grid {
    grid-template-columns: 1fr;
  }

  .library-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-links,
  .nav-social,
  .kofi-pill {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .section-see-all {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .library-grid {
    grid-template-columns: 1fr;
  }

  .hero-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

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

/* ─── FOCUS & ACCESSIBILITY ──────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: var(--kofi-color);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  z-index: 200;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* ─── PAGE SECTION ───────────────────────────────────── */

.page-section {
  padding: 80px 0;
}

/* ─── POST DETAIL PAGE ───────────────────────────────── */

.post-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px clamp(20px, 5vw, 40px) 80px;
  position: relative;
  z-index: 1;
}

.post-page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.65;
  margin-bottom: 40px;
  transition: opacity 0.2s ease, gap 0.2s ease;
}

.post-page-back:hover { opacity: 1; gap: 10px; }
.post-page-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.post-page-header {
  margin-bottom: 48px;
}

.post-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.post-status-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.post-status-badge.status-evergreen { color: #6ee7b7; background: rgba(110, 231, 183, 0.08); border-color: rgba(110, 231, 183, 0.2); }
.post-status-badge.status-evergreen .post-status-badge-dot { background: #6ee7b7; }
.post-status-badge.status-growing { color: #86efac; background: rgba(134, 239, 172, 0.08); border-color: rgba(134, 239, 172, 0.2); }
.post-status-badge.status-growing .post-status-badge-dot { background: #86efac; }
.post-status-badge.status-seeding { color: #fcd34d; background: rgba(252, 211, 77, 0.08); border-color: rgba(252, 211, 77, 0.2); }
.post-status-badge.status-seeding .post-status-badge-dot { background: #fcd34d; }

.post-page-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.post-page-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.post-page-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  border: none;
  margin: 40px 0;
}

/* GFM dark-mode overrides */
.markdown-body {
  --color-fg-default: var(--text-secondary);
  --color-canvas-default: transparent;
  --color-border-default: var(--border);
  --color-neutral-muted: var(--bg-surface);
  --color-accent-fg: var(--accent);
  background-color: transparent !important;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  border-bottom-color: var(--border);
}

.markdown-body a { color: var(--accent); }
.markdown-body code { background: var(--bg-surface); border-color: var(--border); color: var(--accent); }
.markdown-body pre { background: var(--bg-surface) !important; border: 1px solid var(--border); }
.markdown-body blockquote { border-left-color: var(--accent); color: var(--text-tertiary); }
.markdown-body hr { background-color: var(--border); }
.markdown-body table tr { background-color: transparent; border-color: var(--border); }
.markdown-body table tr:nth-child(2n) { background-color: var(--bg-surface); }

/* ─── ME / CV PAGE ───────────────────────────────────── */

.me-header {
  padding: 80px 0 48px;
}

.me-header-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 16px;
}

.me-header-name {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.me-header-role {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.me-header-bio {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 62ch;
}

.me-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
  padding-bottom: 80px;
}

.me-section-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 20px;
}

.me-job {
  padding: 28px 32px;
  margin-bottom: 16px;
}

.me-job-company {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
  text-decoration: none;
  margin-bottom: 4px;
  display: inline-block;
}

.me-job-company:hover { opacity: 1; }

.me-job-period {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.me-job-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.me-job-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-style: italic;
}

.me-job-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.me-feature-box {
  padding: 14px 16px;
  background: var(--accent-dim);
  border-left: 3px solid var(--accent-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 12px;
}

.me-feature-box-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.me-feature-box-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.me-feature-box-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 2px 0;
  line-height: 1.5;
}

.me-feature-box-list li::before {
  content: "·";
  color: var(--accent);
  opacity: 0.6;
  margin-right: 6px;
}

.me-highlight {
  padding: 20px 24px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.me-highlight-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.me-highlight p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 10px;
}

.me-highlight ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.me-project-highlight {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.me-project-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.me-project-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.me-project-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
}

.me-project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.me-project-grid-item {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.me-edu {
  padding: 24px 28px;
  margin-top: 8px;
}

.me-edu-degree {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.me-edu-degree a {
  color: var(--accent);
  text-decoration: none;
}

.me-edu-degree a:hover { opacity: 0.8; }

.me-edu-period {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.me-edu-note {
  font-size: 14px;
  color: var(--text-secondary);
}

.me-skills-sidebar {
  position: sticky;
  top: 80px;
}

.me-skills-card {
  padding: 24px 28px;
}

.me-skills-group {
  margin-bottom: 24px;
}

.me-skills-group:last-child {
  margin-bottom: 0;
}

.me-skills-group-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.me-skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (max-width: 900px) {
  .me-grid {
    grid-template-columns: 1fr;
  }

  .me-skills-sidebar {
    position: static;
  }
}
