/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0c0f;
  --bg2: #10141a;
  --bg3: #161b24;
  --border: #1e2730;
  --border2: #2a3545;
  --text: #c8d8e8;
  --text-dim: #6a7f96;
  --text-muted: #8aa0b6;
  --text-bright: #eaf2ff;
  --accent: #00c8ff;
  --accent2: #0077cc;
  --accent-py: #3dc8a0;
  --accent-ps: #7b61ff;
  --accent-cmd: #f5a623;
  --accent-tips: #ff6b6b;
  --sidebar-w: 260px;
  --font-mono: 'JetBrains Mono', monospace;
  --font-ui: 'Ubuntu Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}

.logo-text {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 15px;
  color: var(--text-bright);
  line-height: 1.2;
}

.logo-sub {
  font-weight: 400;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Search in sidebar */
.sidebar-search {
  position: relative;
  padding: 16px 14px 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-search input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 32px 8px 10px;
  outline: none;
  transition: border-color 0.2s;
}

.sidebar-search input:focus { border-color: var(--accent); }
.sidebar-search input::placeholder { color: var(--text-dim); }

.search-icon {
  position: absolute;
  right: 24px; top: 50%;
  transform: translateY(-40%);
  color: var(--text-dim);
  font-size: 16px;
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% - 10px);
  left: 14px; right: 14px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  z-index: 200;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

.search-results.active { display: block; }

.search-result-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg2); }

.search-result-title {
  font-size: 13px;
  color: var(--text-bright);
  font-weight: 600;
}

.search-result-page {
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.search-result-snippet {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
}

/* Nav links */
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 18px 20px 6px;
  list-style: none;
}

.nav-links {
  list-style: none;
  padding: 8px 10px;
  flex: 1;
}

.nav-links li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: rgba(0, 200, 255, 0.08);
  color: var(--accent);
}

.nav-icon { font-size: 15px; }

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Toggle button (mobile) */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text);
  width: 38px; height: 38px;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 48px 56px;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.header-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0,200,255,0.08);
  border: 1px solid rgba(0,200,255,0.2);
  border-radius: 4px;
  padding: 3px 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-title {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 42px;
  color: var(--text-bright);
  line-height: 1.1;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 580px;
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 56px;
}

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 10px;
}

.card--python::before { background: radial-gradient(ellipse at top left, rgba(61,200,160,0.08), transparent 70%); }
.card--ps::before     { background: radial-gradient(ellipse at top left, rgba(123,97,255,0.08), transparent 70%); }
.card--cmd::before    { background: radial-gradient(ellipse at top left, rgba(245,166,35,0.08), transparent 70%); }
.card--tips::before   { background: radial-gradient(ellipse at top left, rgba(255,107,107,0.08), transparent 70%); }

.card:hover { transform: translateY(-2px); }
.card:hover::before { opacity: 1; }
.card--python:hover { border-color: var(--accent-py); }
.card--ps:hover     { border-color: var(--accent-ps); }
.card--cmd:hover    { border-color: var(--accent-cmd); }
.card--tips:hover   { border-color: var(--accent-tips); }

.card-icon { font-size: 26px; margin-bottom: 12px; }

.card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 14px;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.card--python .card-tag { color: var(--accent-py); }
.card--ps .card-tag     { color: var(--accent-ps); }
.card--cmd .card-tag    { color: var(--accent-cmd); }
.card--tips .card-tag   { color: var(--accent-tips); }

/* ===== CONTENT SECTIONS ===== */
.content-section {
  margin-bottom: 56px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0,200,255,0.08);
  border: 1px solid rgba(0,200,255,0.2);
  border-radius: 4px;
  padding: 2px 8px;
}

.prose p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 12px;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.info-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.info-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.info-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

/* Stack List */
.stack-list { display: flex; flex-direction: column; gap: 4px; }

.stack-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.stack-item:hover { border-color: var(--border2); }

.stack-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-py { background: var(--accent-py); box-shadow: 0 0 8px var(--accent-py); }
.dot-ps { background: var(--accent-ps); box-shadow: 0 0 8px var(--accent-ps); }

.stack-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  min-width: 200px;
}

.stack-desc {
  font-size: 13px;
  color: var(--text-dim);
}

/* ===== CODE BLOCKS ===== */
.code-block {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 20px 0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.copied { color: var(--accent-py); border-color: var(--accent-py); }

pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

/* Syntax highlighting */
.kw  { color: #ff79c6; }
.str { color: #f1fa8c; }
.cmt { color: #6272a4; font-style: italic; }
.fn  { color: #50fa7b; }
.num { color: #bd93f9; }
.var { color: #8be9fd; }
.cls { color: #ffb86c; }
.op  { color: #ff79c6; }

/* ===== COMMAND TABLE ===== */
.cmd-table-wrapper {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}

.cmd-filter-bar {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.cmd-filter-bar input {
  flex: 1;
  min-width: 200px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s;
}

.cmd-filter-bar input:focus { border-color: var(--accent); }

.filter-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(0,200,255,0.06); }

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

th {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 10px 16px;
  text-align: left;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

td:first-child {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
}

td:nth-child(2) { color: var(--text-dim); }
td:nth-child(3) { color: var(--text); font-family: var(--font-mono); font-size: 11px; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tag-vol  { background: rgba(0,200,255,0.12); color: var(--accent); }
.tag-snap { background: rgba(61,200,160,0.12); color: var(--accent-py); }
.tag-net  { background: rgba(123,97,255,0.12); color: var(--accent-ps); }
.tag-svm  { background: rgba(245,166,35,0.12); color: var(--accent-cmd); }
.tag-diag { background: rgba(255,107,107,0.12); color: var(--accent-tips); }

/* Tips cards */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.tip-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 18px 20px;
  transition: border-color 0.2s;
}

.tip-card.tip-warn  { border-left-color: var(--accent-cmd); }
.tip-card.tip-good  { border-left-color: var(--accent-py); }
.tip-card.tip-danger{ border-left-color: var(--accent-tips); }
.tip-card.tip-info  { border-left-color: var(--accent); }
.tip-card.tip-ps    { border-left-color: var(--accent-ps); }

.tip-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.tip-warn  .tip-label { color: var(--accent-cmd); }
.tip-good  .tip-label { color: var(--accent-py); }
.tip-danger .tip-label { color: var(--accent-tips); }
.tip-info  .tip-label { color: var(--accent); }
.tip-ps    .tip-label { color: var(--accent-ps); }

.tip-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.tip-body {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
}

.tip-body code {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  color: var(--accent);
}

/* ===== FOOTER ===== */
.page-footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.06em;
}

/* ===== HIGHLIGHT (search) ===== */
mark {
  background: rgba(0,200,255,0.2);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
  .main-content { margin-left: 0; padding: 56px 20px 24px; }
  .cards-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 28px; }
}

/* ===== COMMAND TABLE ENHANCEMENTS ===== */

.cmd-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.cmd-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.cmd-filter-bar input {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: border-color 0.2s;
}

.cmd-filter-bar input:focus {
  outline: none;
  border-color: var(--accent-cmd);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.1);
}

.result-count {
  display: inline-block;
  padding: 8px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--accent-cmd);
  color: var(--accent-cmd);
}

.filter-btn.active {
  background: var(--accent-cmd);
  border-color: var(--accent-cmd);
  color: var(--bg);
}

/* Command & Example Cell Styling */
.cmd-cell,
.example-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.cmd-cell code,
.example-cell code {
  flex: 1;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg2);
  padding: 4px 8px;
  border-radius: 4px;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  opacity: 0.6;
}

.copy-btn:hover {
  background: var(--bg2);
  opacity: 1;
  transform: scale(1.1);
}

.favorite-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* Table styling adjustments */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table thead tr {
  border-bottom: 2px solid var(--border);
  background: var(--bg2);
}

table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

table tbody tr:hover {
  background: var(--bg2);
  transition: background 0.2s;
}

/* Toast notification animation */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cmd-filter-bar {
    flex-direction: column;
  }
  
  .cmd-filter-bar input {
    width: 100%;
  }
  
  .result-count {
    width: 100%;
    text-align: center;
  }
  
  .filter-btn {
    flex: 1;
    min-width: 100px;
  }
  
  table {
    font-size: 12px;
  }
  
  table td {
    padding: 8px;
  }
  
  .cmd-cell code,
  .example-cell code {
    font-size: 11px;
  }
  
  .copy-btn,
  .favorite-btn {
    font-size: 14px;
  }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 5px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cmd);
}

/* Firefox scrollbar */
* {
  scrollbar-color: var(--border2) var(--bg);
  scrollbar-width: thin;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cmd);
}

.category-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 80px;
  text-align: center;
}

.tag-vol {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

.tag-snap {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid #10b981;
}

.tag-net {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid #a855f7;
}

.tag-svm {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid #f97316;
}

.tag-diag {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
  border: 1px solid #ec4899;
}

/* ===== HERO SEARCH ===== */
.hero-search {
  margin-bottom: 48px;
  padding: 32px 0;
}

.search-container {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.hero-search-input {
  width: 100%;
  padding: 18px 24px 18px 48px;
  font-size: 16px;
  background: var(--bg2);
  border: 2px solid var(--border2);
  border-radius: 12px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s ease;
}

.hero-search-input:focus {
  outline: none;
  border-color: var(--accent-cmd);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
  background: var(--bg);
}

.hero-search-input::placeholder {
  color: var(--text-muted);
}

.hero-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
}

.hero-search .search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.hero-search .search-results.active {
  display: block;
}

.hero-search .search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.hero-search .search-result-item:hover {
  background: var(--bg);
}

.hero-search .search-result-title {
  font-weight: 600;
  color: var(--accent-cmd);
  font-size: 14px;
  margin-bottom: 4px;
}

.hero-search .search-result-page {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== ANCHOR HIGHLIGHT ===== */
.highlight-section {
  animation: highlight-pulse 2s ease-in-out;
}

@keyframes highlight-pulse {
  0% {
    background-color: rgba(217, 119, 6, 0.3);
  }
  100% {
    background-color: transparent;
  }
}

/* ===== ABOUT PAGE SECTIONS ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent-cmd);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.1);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.feature-link {
  color: var(--accent-cmd);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: color 0.2s;
}

.feature-link:hover {
  color: var(--accent-py);
}

/* Audience Grid */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.audience-card {
  background: linear-gradient(135deg, var(--bg2), var(--bg));
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.audience-card:hover {
  border-color: var(--accent-py);
  transform: translateY(-2px);
}

.audience-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.audience-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.audience-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Tech Stack */
.tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.tech-category {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 20px;
}

.tech-category h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-py);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}

/* Usage Flow */
.usage-flow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  overflow-x: auto;
  padding: 20px 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.flow-step {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 20px;
  min-width: 220px;
  text-align: center;
  flex-shrink: 0;
}

.flow-number {
  background: linear-gradient(135deg, var(--accent-cmd), var(--accent-py));
  color: var(--bg);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-weight: 700;
  font-size: 18px;
}

.flow-step h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.flow-step p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.flow-arrow {
  font-size: 24px;
  color: var(--border2);
  flex-shrink: 0;
  align-self: center;
  min-width: 20px;
  text-align: center;
}

@media (max-width: 768px) {
  .usage-flow {
    flex-wrap: wrap;
  }
  
  .flow-arrow {
    display: none;
  }
  
  .flow-step {
    min-width: 100%;
  }
}

/* FAQ List */
.faq-list {
  margin-top: 24px;
  space-y: 16px;
}

.faq-item {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.faq-question {
  width: 100%;
  padding: 20px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: rgba(56, 189, 248, 0.05);
}

.faq-question i {
  transition: transform 0.3s ease;
  color: var(--accent-cmd);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(56, 189, 248, 0.02);
  border-top: 1px solid var(--border2);
}

.faq-answer p {
  padding: 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

.faq-item.active .faq-question {
  background: rgba(56, 189, 248, 0.05);
}

/* Creator Card */
.creator-card {
  background: linear-gradient(135deg, var(--bg2), rgba(56, 189, 248, 0.05));
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 32px;
  margin-top: 24px;
}

.creator-content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
}

.creator-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cmd), var(--accent-py));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ===== EXPERTISE GRID ===== */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.expertise-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.3s ease;
}

.expertise-card:hover {
  border-color: var(--accent-cmd);
  transform: translateY(-4px);
}

.expertise-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.expertise-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.expertise-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== TECH EXPERTISE ===== */
.tech-expertise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.tech-expertise .tech-category {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 20px;
}

/* ===== PHILOSOPHY CARDS ===== */
.philosophy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.philosophy-card {
  background: linear-gradient(135deg, var(--bg2), rgba(56, 189, 248, 0.05));
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid var(--accent-cmd);
}

.philosophy-card:hover {
  border-left-color: var(--accent-py);
}

.philosophy-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.philosophy-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== CONNECT SECTION ===== */
.connect-card {
  background: linear-gradient(135deg, var(--bg2), rgba(61, 200, 160, 0.05));
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 32px;
  margin-top: 24px;
  text-align: center;
}

.connect-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.connect-link {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 12px 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
}

.connect-link:hover {
  background: var(--bg2);
  border-color: var(--accent-cmd);
  transform: translateY(-2px);
}

.connect-icon {
  font-size: 18px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border2);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-section p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  font-size: 13px;
  color: var(--accent-py);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--accent-cmd);
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 6px;
  font-size: 18px;
  transition: all 0.2s;
  color: var(--text);
}

.footer-social a:hover {
  background: var(--accent-py);
  border-color: var(--accent-py);
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid var(--border2);
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.footer-bottom a {
  color: var(--accent-py);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--accent-cmd);
}

/* ===== PROFILE PICTURE SECTION ===== */
.profile-section {
  margin-top: 0 !important;
  margin-bottom: 60px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 60px;
  background: linear-gradient(135deg, var(--bg2), rgba(56, 189, 248, 0.05));
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 60px;
}

/* ===== POP-OUT PROFILE PICTURE EFFECT ===== */
.profile-picture-container {
  position: relative;
  width: 220px;
  height: 220px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  margin-top: 40px; /* Give room at the top for the floating head */
  flex-shrink: 0;
}

/* Background Circle with Gradient Fade */
.profile-picture-container::before {
  content: '';
  position: absolute;
  top: 0;  /* Back to full size */
  left: 0; 
  right: 0; 
  bottom: 0;
  background: var(--bg);
  border-radius: 50%; 
  box-shadow: 0 20px 50px rgba(61, 200, 160, 0.15), inset 0 -10px 20px rgba(0,0,0,0.5);
  border: 1px solid var(--border2);
  z-index: 0;

  /* MAGIC: Fades the entire circle (background, border, AND shadow) to transparent at the top */
  -webkit-mask-image: linear-gradient(to bottom, transparent 30%, black 55%);
  mask-image: linear-gradient(to bottom, transparent 30%, black 55%);
}

/* The transparent character image */
.profile-picture {
  position: absolute;
  bottom: 0;          /* Anchor to the exact bottom of the circle */
  left: 0;
  width: 100%;        /* Match the width of the circle exactly */
  height: auto;
  min-height: 100%;
  
  /* CRITICAL: This curves ONLY the bottom of the image to perfectly match the circle, 
     hiding the square cut-off, but leaving the head free to break the top border! */
  border-radius: 0 0 110px 110px !important; 
  
  z-index: 1; 
  transition: transform 0.3s ease;
  transform-origin: bottom center; /* Image will grow upwards on hover, not downwards */
}

.profile-picture:hover {
  transform: scale(1.05);
}

.profile-info {
  flex: 1;
}

.profile-info h3 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text);
}

.profile-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-py);
  margin: 0 0 8px 0;
}

.profile-bio {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 24px 0;
  line-height: 1.6;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-badge {
  background: rgba(61, 200, 160, 0.1);
  border: 1px solid rgba(61, 200, 160, 0.3);
  color: var(--accent-py);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s ease;
}

.profile-badge:hover {
  background: rgba(61, 200, 160, 0.2);
  border-color: rgba(61, 200, 160, 0.5);
}

/* Responsive */
@media (max-width: 1024px) {
  .profile-hero {
    padding: 40px;
    gap: 40px;
  }

  .profile-picture-container {
    width: 240px;
    height: 240px;
  }

  .profile-info h3 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .profile-hero {
    flex-direction: column;
    text-align: center;
    padding: 30px;
    gap: 30px;
  }

  .profile-picture-container {
    width: 220px;
    height: 220px;
  }

  .profile-info h3 {
    font-size: 24px;
  }

  .profile-title {
    font-size: 16px;
  }

  .profile-badges {
    justify-content: center;
  }
}

/* Technology Stack */
.tech-stack {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  padding: 16px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.tech-category {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 16px;
  flex: 1 1 280px;
  min-width: 220px;
  max-width: 350px;
}

.tech-category h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px 0;
  color: var(--text-dim);
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tech-tag:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-py);
}

@media (max-width: 1024px) {
  .tech-stack {
    gap: 20px;
  }
  
  .tech-category {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  .tech-stack {
    justify-content: stretch;
    gap: 16px;
  }
  
  .tech-category {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, var(--bg2), rgba(61, 200, 160, 0.05));
  border-bottom: 1px solid var(--border2);
  padding: 80px 40px;
  margin: -20px -40px 60px -40px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto 60px;
}

.hero-badge {
  display: inline-block;
  background: rgba(61, 200, 160, 0.1);
  border: 1px solid rgba(61, 200, 160, 0.3);
  color: var(--accent-py);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 0 40px 0;
  line-height: 1.6;
}

.hero-search {
  position: relative;
  margin-bottom: 40px;
}

.hero-search input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  background: var(--bg);
  border: 2px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s ease;
}

.hero-search input:focus {
  outline: none;
  border-color: var(--accent-py);
  box-shadow: 0 0 0 3px rgba(61, 200, 160, 0.1);
}

.hero-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 16px;
}

.hero-search .search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 100;
}

.hero-search .search-results.active {
  max-height: 400px;
  opacity: 1;
  overflow-y: auto;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border2);
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: var(--bg);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 600;
  color: var(--accent-py);
  font-size: 14px;
  margin-bottom: 4px;
}

.search-result-page {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.search-result-snippet {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
}

.btn {
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 15px;
  display: inline-block;
}

.btn-primary {
  background: var(--accent-py);
  color: var(--bg);
  border: 2px solid var(--accent-py);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent-py);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-py);
  border: 2px solid var(--accent-py);
}

.btn-secondary:hover {
  background: var(--accent-py);
  color: var(--bg);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-item {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-py);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
  .hero-section {
    padding: 60px 30px;
    margin: -20px -30px 40px -30px;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 40px 20px;
    margin: -20px -20px 30px -20px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .stat-item {
    padding: 16px 12px;
  }

  .stat-value {
    font-size: 24px;
  }
}

/* Highlight effect for search results */
.highlight-section {
  animation: highlight-pulse 1s ease-out;
}

@keyframes highlight-pulse {
  0% {
    background: rgba(61, 200, 160, 0.2);
  }
  100% {
    background: transparent;
  }
}


/* =========================================================
   📱 COMPREHENSIVE MOBILE OPTIMIZATION (max-width: 768px)
   ========================================================= */
   @media (max-width: 768px) {
    /* --- 1. Main Layout & Sidebar --- */
    .sidebar {
      transform: translateX(-100%);
      width: 280px;
      z-index: 1000; /* Float above content */
      box-shadow: 5px 0 25px rgba(0,0,0,0.5);
    }
  
    .sidebar.active {
      transform: translateX(0);
    }
  
    .main-content {
      margin-left: 0;        /* Remove desktop sidebar margin */
      padding: 90px 20px 40px; /* Extra top padding for the hamburger menu */
      width: 100vw;          /* Prevent horizontal overflow */
      overflow-x: hidden;
    }
  
    /* Hamburger Menu Button */
    .sidebar-toggle {
      display: flex;
      position: fixed;
      top: 15px;
      right: 20px; /* Put it on the top right */
      background: var(--bg2);
      color: var(--text);
      border: 1px solid var(--border2);
      border-radius: 6px;
      width: 40px;
      height: 40px;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      z-index: 1001;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }
  
    /* --- 2. Typography Adjustments --- */
    .page-title {
      font-size: 32px;
    }
  
    .page-subtitle {
      font-size: 16px;
    }
  
    .section-title {
      font-size: 22px;
    }
  
    /* --- 3. Grids & Flexboxes (Stack everything vertically) --- */
    .expertise-grid, 
    .philosophy-cards,
    .feature-grid,
    .quick-links {
      grid-template-columns: 1fr; /* 1 column instead of 2 or 3 */
      gap: 16px;
    }
  
    /* --- 4. Profile Section Overrides (From previous step) --- */
    .profile-hero {
      flex-direction: column;
      text-align: center;
      padding: 24px 16px;
    }
  
    .profile-picture-container {
      width: 180px;
      height: 180px;
      margin: 30px auto 0;
    }
    
    .profile-picture {
      border-radius: 0 0 90px 90px !important;
    }
  
    .profile-badges {
      justify-content: center;
      flex-wrap: wrap; /* Allow badges to wrap to next line */
    }
  
    /* --- 5. Code Blocks & Tables --- */
    .code-block {
      margin: 0 -20px; /* Break out of container to edge of screen */
      border-radius: 0;
      border-left: none;
      border-right: none;
    }
  
    pre {
      padding: 16px;
      font-size: 13px; /* Slightly smaller text for code */
    }
  
    .command-table-wrapper {
      overflow-x: auto; /* Allow horizontal swiping on data tables */
      -webkit-overflow-scrolling: touch;
      margin: 0 -20px;
      padding: 0 20px; /* Keep padding so it doesn't clip immediately */
    }
  
    /* --- 6. Footer Layout --- */
    .footer-content {
      flex-direction: column;
      gap: 30px;
      align-items: center;
      text-align: center;
    }
  
    .footer-links {
      justify-content: center;
      width: 100%;
    }
  
    .footer-bottom {
      flex-direction: column;
      text-align: center;
      gap: 16px;
    }
  
    /* --- 7. Search Bar & Connect Links --- */
    .connect-links {
      flex-direction: column;
    }
  
    .hero-search-input {
      font-size: 14px;
      padding-left: 40px;
    }
  }



/* =========================================================
   FINAL OVERRIDES / CLEANUP
   ========================================================= */

/* Invalid utility cleanup */
.faq-list {
  margin-top: 24px;
}

/* Ensure hidden overflow never causes sideways scroll */
html, body {
  overflow-x: hidden;
}

/* Safer command table wrapper typo support */
.command-table-wrapper,
.cmd-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Cheat sheet links should match theme */
.cheat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 22px;
}

.cheat-links a {
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--border2);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg2);
  font-size: 13px;
  transition: all 0.2s ease;
}

.cheat-links a:hover {
  border-color: var(--accent);
  background: rgba(0, 200, 255, 0.06);
}

/* Strong final cheat sheet overrides */
.cheat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.cheat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cheat-card:hover {
  border-color: var(--accent-cmd);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.10);
}

.cheat-card h3 {
  font-family: 'Syne', sans-serif;
  color: var(--accent-cmd);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245, 166, 35, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 20px;
}

.card-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border2);
  padding: 4px 8px;
  border-radius: 999px;
}

.cmd-item {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.cmd-item:last-child {
  margin-bottom: 0;
}

.cmd-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cmd-code {
  display: block;
  flex: 1;
  font-family: var(--font-mono);
  background: rgba(0,0,0,0.40);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-bright);
  overflow-x: auto;
  margin-bottom: 0;
}

.copy-command-btn {
  background: rgba(0,200,255,0.08);
  color: var(--accent);
  border: 1px solid rgba(0,200,255,0.25);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font-mono);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.copy-command-btn:hover {
  background: rgba(0,200,255,0.16);
  border-color: var(--accent);
  color: var(--text-bright);
}

.cmd-desc {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.cheat-search,
.cheat-filter {
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text-bright);
  border-radius: 8px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.cheat-filter option {
  background: var(--bg2);
  color: var(--text-bright);
}

.cheat-search::placeholder {
  color: var(--text-muted);
}

.cheat-search:focus,
.cheat-filter:focus {
  border-color: var(--border);
  box-shadow: none;
}

/* Mobile cleanup: override earlier conflicting blocks safely */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  }

  .sidebar.open,
  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-logo {
    padding: 24px 20px 20px;
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 14px;
    left: 14px;
    right: auto;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    z-index: 1001;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    padding: 80px 16px 32px;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .page-title {
    font-size: 30px;
    line-height: 1.15;
  }

  .page-subtitle {
    font-size: 15px;
    line-height: 1.6;
  }

  /* Cheat sheet */
  /* ===== CHEATSHEET FIXES ===== */

  .cheat-intro {
    margin-bottom: 34px;  /* already there */
    margin-top: 24px;     /* ADD THIS */
  }

  .cheat-toolbar {
    margin-top: 12px;
    margin-bottom: 36px;  /* increase from 28px */
  }

.cheat-filter-wrap {
  position: relative;
  display: inline-block;
}

.cheat-filter {
  background: var(--bg2);
  border: 1px solid var(--accent-cmd);
  color: var(--text-bright);
  border-radius: 10px;
  padding: 12px 40px 12px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.cheat-filter-wrap::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-bright);
  pointer-events: none;
  font-size: 14px;
}

.cheat-filter option {
  background: var(--bg2);
  color: var(--text-bright);
}