/* ═══════════════════════════════════════════════════
   JUSTICE UGO — PORTFOLIO CSS
   Warm editorial aesthetic: cream, orange, serif type
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  /* Retro brutalist monochrome */
  --cream: #F4F1EC;
  --cream-dark: #E8E4DC;
  --cream-darker: #D8D3C8;
  --orange: #000000;       /* primary accent = black */
  --orange-dark: #1a1a1a;
  --orange-light: #333333;
  --yellow: #E8E4DC;       /* yellow → off-white */
  --black: #0A0A0A;
  --brown: #3a3a3a;
  --brown-light: #777777;
  --white: #FFFFFF;
  --border: #BBBBBB;
  --border-dark: #333333;
  --text: #0A0A0A;
  --text-muted: #666666;
  --success: #1a7a3a;
  --danger: #cc0000;
  --sidebar-w: 220px;
  --header-h: 72px;
  --radius: 2px;
  --radius-lg: 3px;
  --shadow: 3px 3px 0px #0A0A0A;
  --shadow-lg: 5px 5px 0px #0A0A0A;
  font-size: 16px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  line-height: 1.2;
  color: var(--black);
}
.mono { font-family: 'Space Mono', monospace; }
.display { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }

/* ── Layout Shell ── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  min-height: 100vh;
}

/* ── Header / Topbar ── */
.topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  background: var(--white);
  border-bottom: 3px solid var(--black);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-logo {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-weight: 900;
  font-size: 22px;
  color: var(--black);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.topbar-logo span { color: var(--orange); }
.topbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: 10px 16px 10px 40px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search input:focus { border-color: var(--orange); }
.topbar-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brown-light);
  font-size: 16px;
  pointer-events: none;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: 6px 12px 6px 6px;
  transition: background 0.15s;
}
.topbar-profile:hover { background: var(--cream-dark); }
.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--orange);
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-weight: 700;
  font-size: 16px;
  color: var(--orange);
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 14px; font-weight: 600; color: var(--black); line-height: 1.2; }
.profile-title { font-size: 11px; font-family: 'Space Mono', monospace; color: var(--brown-light); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 18px;
  color: var(--black);
}

/* ── Sidebar ── */
.sidebar {
  grid-column: 1;
  grid-row: 2;
  background: var(--cream-dark);
  border-right: 2px solid var(--black);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-nav { padding: 0 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--brown);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  border: 2px solid transparent;
  white-space: nowrap;
}
.nav-item svg, .nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover {
  background: var(--cream);
  color: var(--black);
  border-color: var(--border);
}
.nav-item.active {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange-dark);
}
.nav-item.active svg { color: var(--white); }
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 24px;
}
.sidebar-section-label {
  font-size: 10px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brown-light);
  padding: 4px 26px;
  margin-top: 8px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── Main Content ── */
.main-content {
  grid-column: 2;
  grid-row: 2;
  overflow-y: auto;
  background: var(--cream);
}
.page-inner { padding: 32px 40px; max-width: 1100px; }

/* ── Section headers ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
}
.section-more {
  font-size: 13px;
  font-family: 'Space Mono', monospace;
  color: var(--orange);
  border-bottom: 1px solid var(--orange);
  transition: color 0.15s;
}
.section-more:hover { color: var(--orange-dark); }

/* ── Category Pill Tabs ── */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-tab {
  padding: 7px 18px;
  border: 2px solid var(--border-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brown);
  background: var(--white);
  transition: all 0.15s;
}
.cat-tab:hover { border-color: var(--orange); color: var(--orange); }
.cat-tab.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* ── Book / Project Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.book-card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--black);
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  display: block;
}
.book-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--orange);
}
.book-cover {
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 48px;
  font-weight: 900;
  color: var(--white);
  background: var(--black);
  letter-spacing: -2px;
}
.book-info { padding: 12px; }
.book-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
  margin-bottom: 4px;
}
.book-author {
  font-size: 12px;
  color: var(--brown-light);
  font-family: 'Space Mono', monospace;
}
.book-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--cream-dark);
}
.stars { color: var(--orange); font-size: 12px; }
.bookmark-btn {
  background: none;
  border: none;
  color: var(--brown-light);
  font-size: 16px;
  padding: 0;
  transition: color 0.15s;
}
.bookmark-btn:hover { color: var(--orange); }

/* ── Project Card (list view — inspired by image 2) ── */
.project-list { display: flex; flex-direction: column; gap: 0; }
.project-list-item {
  background: var(--white);
  border: 2px solid var(--black);
  border-bottom: none;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  align-items: start;
  transition: background 0.15s;
}
.project-list-item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.project-list-item:last-child { border-bottom: 2px solid var(--black); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.project-list-item:hover { background: var(--cream-dark); }
.project-cover {
  width: 80px;
  height: 100px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-weight: 900;
  font-size: 20px;
  color: var(--white);
  flex-shrink: 0;
}
.project-meta { display: flex; flex-direction: column; gap: 6px; }
.project-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--brown-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.project-name {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
}
.project-author {
  font-size: 13px;
  color: var(--orange);
  font-family: 'Space Mono', monospace;
  text-decoration: underline;
}
.project-excerpt {
  font-size: 13px;
  color: var(--brown);
  line-height: 1.6;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-overflow: hidden;
  overflow: hidden;
}
.pages-left {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--brown-light);
  margin-top: 8px;
}
.project-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-orange {
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--black);
  box-shadow: 3px 3px 0 var(--brown);
}
.btn-orange:hover { background: var(--white); color: var(--black); transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--black); }
.btn-outline {
  background: transparent;
  color: var(--black);
  border: 2px solid var(--black);
}
.btn-outline:hover { background: var(--black); color: var(--white); }
.btn-black {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.btn-black:hover { background: var(--brown); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* Read Preview button — big orange like image 2 */
.btn-read-preview {
  background: var(--orange);
  color: var(--white);
  border: 2px solid var(--orange-dark);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  text-align: center;
  transition: all 0.15s;
  display: block;
}
.btn-read-preview:hover { background: var(--orange-dark); transform: translateY(-1px); }

.btn-ghost {
  background: none;
  border: none;
  color: var(--brown);
  font-size: 13px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--orange); }

/* ── Detail Panel (right sidebar — like image 1) ── */
.detail-panel {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--black);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.detail-panel-cover {
  width: 100%;
  height: 200px;
  background: var(--cream-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-panel-body { padding: 20px; }
.detail-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}
.detail-author { font-size: 13px; color: var(--orange); font-family: 'Space Mono', monospace; margin-bottom: 16px; }
.detail-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.detail-meta { border-top: 1px solid var(--cream-dark); padding-top: 16px; }
.detail-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 13px;
}
.detail-meta-row:last-child { border-bottom: none; }
.detail-meta-label { color: var(--text-muted); }
.detail-meta-value { font-family: 'Space Mono', monospace; font-weight: 500; }
.detail-desc { font-size: 13px; line-height: 1.7; color: var(--brown); margin-top: 12px; border-top: 1px solid var(--cream-dark); padding-top: 12px; }

/* ── Blog Cards ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.blog-card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--black);
  overflow: hidden;
  transition: all 0.2s;
  display: block;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.blog-card-thumb {
  height: 160px;
  background: var(--cream-dark);
  overflow: hidden;
  position: relative;
}
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 60px;
  font-weight: 900;
  color: var(--cream-darker);
}
.blog-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--orange);
  color: var(--white);
  font-size: 10px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
}
.blog-card-body { padding: 20px; }
.blog-card-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--black);
}
.blog-card-excerpt { font-size: 13px; color: var(--brown); line-height: 1.6; margin-bottom: 12px; }
.blog-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  color: var(--brown-light);
  border-top: 1px solid var(--cream-dark);
  padding-top: 12px;
}

/* ── Stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--black);
  padding: 20px;
  text-align: center;
}
.stat-number {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 40px;
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  color: var(--brown-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ── Two-col layout ── */
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.two-col-wide { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 8px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--white);
  border: 2px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 15px;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--orange);
}
.form-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Cards (generic) ── */
.card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--black);
  overflow: hidden;
}
.card-header {
  padding: 14px 20px;
  border-bottom: 2px solid var(--black);
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 16px;
  font-weight: 700;
}
.card-body { padding: 20px; }

/* ── Profile hero card ── */
.profile-hero {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--black);
  overflow: hidden;
  margin-bottom: 32px;
}
.profile-hero-banner {
  height: 120px;
  background: var(--white);
  border-bottom: 3px solid var(--black);
  position: relative;
}
.profile-hero-body {
  padding: 0 24px 24px;
  position: relative;
}
.profile-photo-wrap {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--white);
  overflow: hidden;
  background: var(--cream-dark);
  margin-top: -50px;
  margin-bottom: 12px;
  position: relative;
}
.profile-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 36px;
  font-weight: 700;
  color: var(--white);
}
.profile-hero-name {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 26px;
  font-weight: 900;
  color: var(--black);
}
.profile-hero-title {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--orange);
  margin-bottom: 12px;
}
.profile-hero-bio {
  font-size: 14px;
  color: var(--brown);
  line-height: 1.7;
  max-width: 600px;
}

/* ── Cert / skill items ── */
.cert-list { display: flex; flex-direction: column; gap: 8px; }
.cert-item {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cert-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--white);
  flex-shrink: 0;
  border: 1px solid var(--orange-dark);
}
.cert-info { flex: 1; }
.cert-name { font-size: 14px; font-weight: 600; color: var(--black); }
.cert-org { font-size: 12px; color: var(--brown-light); font-family: 'Space Mono', monospace; }
.cert-year {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--white);
  background: var(--orange);
  padding: 2px 8px;
  border-radius: 2px;
}

/* ── Skill bars ── */
.skill-list { display: flex; flex-direction: column; gap: 12px; }
.skill-row { display: flex; flex-direction: column; gap: 4px; }
.skill-header { display: flex; justify-content: space-between; font-size: 13px; }
.skill-label { font-weight: 500; color: var(--black); }
.skill-pct { font-family: 'Space Mono', monospace; font-size: 12px; color: var(--orange); }
.skill-bar { height: 6px; background: var(--cream-dark); border-radius: 3px; overflow: hidden; }
.skill-fill { height: 100%; background: var(--orange); border-radius: 3px; transition: width 1s ease; }

/* ── Blog post content ── */
.post-content {
  font-size: 17px;
  line-height: 1.85;
  color: var(--brown);
}
.post-content h1, .post-content h2, .post-content h3 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  color: var(--black);
  margin: 2rem 0 1rem;
}
.post-content h2 { font-size: 24px; }
.post-content h3 { font-size: 20px; }
.post-content p { margin-bottom: 1.2em; }
.post-content a { color: var(--orange); text-decoration: underline; }
.post-content ul, .post-content ol { margin: 1em 0 1em 1.5em; }
.post-content li { margin-bottom: 0.5em; }
.post-content blockquote {
  border-left: 4px solid var(--orange);
  padding: 12px 20px;
  background: var(--cream-dark);
  margin: 1.5em 0;
  font-style: italic;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-content code {
  font-family: 'Space Mono', monospace;
  font-size: 0.875em;
  background: var(--cream-dark);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--orange-dark);
}
.post-content pre {
  background: var(--black);
  color: #e8d5b0;
  padding: 20px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 1.5em 0;
  border: 2px solid var(--brown);
}
.post-content pre code { background: none; color: inherit; padding: 0; font-size: 14px; }
.post-content img { border-radius: var(--radius-lg); border: 2px solid var(--border); margin: 1.5em 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.post-content th, .post-content td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.post-content th { background: var(--cream-dark); font-weight: 600; }

/* ── Badges / Tags ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 11px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}
.badge-orange { background: var(--orange); color: var(--white); }
.badge-yellow { background: var(--yellow); color: var(--black); }
.badge-black { background: var(--black); color: var(--white); }
.badge-outline { background: transparent; border: 1px solid var(--border-dark); color: var(--brown); }
.tag-chip {
  display: inline-block;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  color: var(--brown);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'Space Mono', monospace;
}

/* ── Flash messages ── */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  border: 2px solid;
  display: flex;
  align-items: center;
  gap: 10px;
}
.flash-success { background: #e8f5e9; border-color: var(--success); color: var(--success); }
.flash-error { background: #fce4e4; border-color: var(--danger); color: var(--danger); }

/* ── Audio player bar (like image 2 bottom) ── */
.player-bar {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  background: var(--yellow);
  border-top: 2px solid var(--black);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 90;
  transition: transform 0.3s;
}
.player-bar.hidden { transform: translateY(100%); }

/* ── Admin specific ── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: var(--yellow);
  border: 1px solid var(--border-dark);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brown);
}
.admin-table td {
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 14px;
  background: var(--white);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--cream-dark); }
.editor-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }

/* ── Contact page ── */
.contact-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.15s;
  font-size: 14px;
  color: var(--black);
  margin-bottom: 8px;
}
.social-link:hover { border-color: var(--orange); color: var(--orange); transform: translateX(4px); }
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--white);
  flex-shrink: 0;
}

/* ── Avail badge ── */
.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--success);
  color: var(--white);
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a8e6cf;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.3} }

/* ── Divider ── */
.divider { height: 2px; background: var(--black); margin: 32px 0; }
.divider-light { height: 1px; background: var(--border); margin: 20px 0; }

/* ── 404 ── */
.not-found { text-align: center; padding: 80px 24px; }
.not-found h1 { font-size: 120px; color: var(--orange); line-height: 1; }
.not-found h2 { font-size: 28px; margin-bottom: 12px; }
.not-found p { color: var(--brown); margin-bottom: 24px; }

/* ── Markdown editor ── */
.md-editor {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  line-height: 1.8;
  min-height: 400px;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.4s ease forwards; }
.fade-in-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-4 { animation-delay: 0.4s; opacity: 0; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 64px; }
  .nav-item span, .sidebar-section-label, .nav-item-label, .topbar-logo span:last-child { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .topbar-profile .profile-name, .topbar-profile .profile-title { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .two-col-wide { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .page-inner { padding: 24px 20px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; --header-h: 60px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--header-h);
    width: 260px;
    height: calc(100vh - var(--header-h));
    z-index: 99;
    transform: translateX(-100%);
    transition: transform 0.3s;
    border-right: 2px solid var(--black);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar .nav-item { justify-content: flex-start; padding: 10px 14px; }
  .sidebar .nav-item span, .sidebar-section-label { display: block; }
  .menu-toggle { display: flex; }
  .main-content { grid-column: 1; }
  .topbar-search { display: none; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .page-inner { padding: 20px 16px; }
  .project-list-item { grid-template-columns: 60px 1fr; }
  .project-actions { display: none; }
  .editor-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .topbar { padding: 0 16px; gap: 12px; }
  .topbar-logo { font-size: 18px; }
}

/* ── Utility ── */
.text-orange { color: var(--orange); }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: 'Space Mono', monospace; }
.text-serif { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.gap-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
