/* ============================================================
   Codegenome Homepage — Soft Warm Minimalist Theme
   Premium light-mode developer hub
   ============================================================ */

@import url('scrollbars.css');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-color:        #FBFBF9;     /* main content workspace */
  --bg-secondary:    #F5F3EE;     /* cards, sidebar, surfaces */
  --bg-hover:        #EFECE4;     /* hover state, active tint */
  --bg-inset:        #EAE7DF;     /* sunken areas, tables     */

  /* Text */
  --text-primary:    #2D3142;     /* deep charcoal            */
  --text-secondary:  #6B7280;     /* muted labels             */
  --text-subtle:     #9CA3AF;     /* hints, placeholders      */

  /* Brand Accent — Sage/Slate Teal */
  --accent-color:    #7A9E9F;
  --accent-dark:     #5C8283;
  --accent-glow:     rgba(122, 158, 159, 0.15);
  --accent-dim:      rgba(122, 158, 159, 0.10);
  --accent-bg:       rgba(122, 158, 159, 0.06);

  /* Borders */
  --border-color:    #E8E5DE;
  --border-hover:    rgba(122, 158, 159, 0.4);
  --border-faint:    rgba(0, 0, 0, 0.04);

  /* Typography */
  --font-sans:       'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:       'JetBrains Mono', 'Fira Mono', ui-monospace, monospace;

  /* Shadows */
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md:       0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:       0 8px 40px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-card:     0 4px 30px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.04);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Subtle Warm Grain Background ───────────────────────── */
.ambient-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(122,158,159,0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(196,182,145,0.06) 0%, transparent 55%);
  pointer-events: none;
  z-index: -2;
}

/* hide the dark canvas/grid entirely */
.grid-overlay { display: none; }
#bioCanvas    { display: none; }

/* ── Layout ──────────────────────────────────────────────── */
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/*/* ── Header ──────────────────────────────────────────────── */
/* ── Header ──────────────────────────────────────────────── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px; 
  padding: 0 2rem; 
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-color);
  width: 100%;
  box-sizing: border-box;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Fixes the wrapper link to keep image and text side-by-side without an underline */
.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;             /* Space between the icon and the word "Codegenome" */
  text-decoration: none !important; /* Forces the underline to disappear */
}

/* Keeps the logo icon small and perfectly centered with text */
.logo-img {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-family: var(--font-sans);
  font-size: 1.1rem; 
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none !important; /* Extra safety against underlines */
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: initial;
  background-clip: unset;
}

.docs-badge-mini {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: #F1EFEA; 
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  line-height: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover { 
  color: var(--text-primary);
  background: none; 
}

.dither-blink { display: none; }

.header-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.social-links { display: flex; gap: 0.75rem; }

.social-links a {
  color: var(--text-secondary);
  transition: color 0.18s ease;
  display: flex; align-items: center;
}

.social-links a:hover { color: var(--accent-dark); }

.icon { width: 1.15rem; height: 1.15rem; }

/* ── Hero Section ────────────────────────────────────────── */
.hero-section {
  padding: 4rem 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title-row {
  width: 100%;
  max-width: 1200px;
  text-align: center;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.hero-subtitle {
  margin-bottom: 0;
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.text-highlight {
  background: linear-gradient(120deg, rgba(122,158,159,0.15) 0%, rgba(122,158,159,0.06) 100%);
  color: var(--text-primary);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  font-weight: 500;
  border: 1px solid rgba(122,158,159,0.2);
}

.hero-content {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
}

.hero-text-col {
  flex: 6;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-visual-col {
  flex: 4;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.badge-container {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin-top: 1.5rem;
}

.hero-badge {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-secondary);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 0 1.5rem;
}

/* ── Installation Box ────────────────────────────────────── */
.installation-box {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-md);
}

.install-step { text-align: left; }

.install-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.step-label {
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-subtle);
}

.copy-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-subtle);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
}

.copy-btn:hover {
  color: var(--accent-dark);
  border-color: var(--accent-color);
  background: var(--accent-dim);
}

.install-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
  border-radius: 9px;
  color: #5C6AC4;
  overflow-x: auto;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.hero-docs-cta { margin-top: 1.5rem; }

.docs-cta-link {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(92,130,131,0.35);
  padding-bottom: 0.15rem;
  transition: color 0.18s, border-color 0.18s;
}

.docs-cta-link:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* ── 3-Step Mental Model Grid ────────────────────────────── */
.mental-model-section {
  padding: 3rem 0 1rem;
}

.mental-model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.mental-model-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.mental-model-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}

.mental-model-card.parse::before  { background: linear-gradient(90deg, #7A9E9F, #5C8283); }
.mental-model-card.map::before    { background: linear-gradient(90deg, #9B8BC3, #7A6AAA); }
.mental-model-card.stream::before { background: linear-gradient(90deg, #7AAB8F, #5A8C74); }

.mental-model-card:hover {
  box-shadow: 0 8px 32px rgba(122,158,159,0.12);
  transform: translateY(-2px);
}

.mental-model-step {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.6rem;
  border-radius: 5px;
  margin-bottom: 0.85rem;
}

.parse  .mental-model-step { background: rgba(122,158,159,0.10); color: #5C8283; border: 1px solid rgba(122,158,159,0.2); }
.map    .mental-model-step { background: rgba(155,139,195,0.10); color: #7A6AAA; border: 1px solid rgba(155,139,195,0.2); }
.stream .mental-model-step { background: rgba(122,171,143,0.10); color: #5A8C74; border: 1px solid rgba(122,171,143,0.2); }

.mental-model-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.mental-model-card p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ── Tree / Workflow section ─────────────────────────────── */
.tree-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.tree-title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.tree-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-subtle);
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-color);
}

/* TUI Process Tree Container */
.tui-tree-container {
  padding: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin: 4rem auto 1rem;
  font-family: var(--font-mono);
  max-width: 1000px;
  box-shadow: var(--shadow-card);
  width: 100%;
  overflow: visible;
}

.tui-tree {
  display: flex;
  justify-content: center;
  min-width: max-content;
}

.tui-tree ul {
  padding-top: 24px;
  position: relative;
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.tui-tree > ul { padding-top: 0; }

.tui-tree ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid var(--border-color);
  height: 24px;
  transform: translateX(-50%);
}

.tui-tree > ul::before { display: none; }

.tui-tree li {
  position: relative;
  padding: 24px 12px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tui-tree li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  height: 24px;
  border-left: 2px solid var(--border-color);
  transform: translateX(-50%);
}

.tui-tree li::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 2px solid var(--border-color);
}

.tui-tree li:first-child::after { left: calc(50% - 1px); }
.tui-tree li:last-child::after  { right: calc(50% - 1px); }
.tui-tree li:only-child::after  { display: none; }

.tui-tree > ul > li { padding-top: 0; }
.tui-tree > ul > li::before,
.tui-tree > ul > li::after { display: none; }

.tui-tree-node {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
}

.tui-tree-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122,158,159,0.15);
  border-color: var(--accent-color);
  background: var(--accent-dim);
}

.tree-icon {
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
  transition: color 0.25s ease;
}

.tui-tree-node:hover .tree-icon { color: var(--accent-dark); }

.tui-tree-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 5px 11px;
  border-radius: 7px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
  z-index: 10;
  pointer-events: none;
  letter-spacing: 0;
  text-transform: none;
}

.tui-tree-node:hover .tui-tree-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.tui-tree-node.recommended-path {
  border-color: rgba(122,158,159,0.35);
  background: var(--accent-dim);
}

.tui-tree-node.recommended-path .tree-icon { color: var(--accent-dark); }

.tui-tree-node.end-node {
  border: 1px dashed var(--border-color);
  background: var(--bg-secondary);
}

.tui-tree-node.end-node .tree-icon { color: var(--text-subtle); }
.tui-tree-node.end-node:hover .tree-icon { color: var(--accent-dark); }

.tui-tree li:hover > .tui-tree-node {
  border-color: var(--accent-color);
  box-shadow: 0 6px 20px rgba(122,158,159,0.15);
}
.tui-tree li:hover > .tui-tree-node .tree-icon { color: var(--accent-dark); }
.tui-tree li:hover > ::before,
.tui-tree li:hover > ::after,
.tui-tree li:hover > ul::before { border-color: var(--accent-color); }

/* ── Gallery Section ─────────────────────────────────────── */
.gallery-section { padding: 4rem 0 2rem; }

.gallery-heading { text-align: center; margin-bottom: 2.5rem; }

.gallery-desc {
  margin-top: 0.6rem;
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 28px rgba(122,158,159,0.12);
  outline: none;
}

.gallery-frame {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0;
}

.gallery-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s ease;
  opacity: 0.95;
}

.gallery-item:hover .gallery-frame img { transform: scale(1.03); }

.gallery-caption {
  display: block;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  transition: color 0.18s;
}

.gallery-item:hover .gallery-caption { color: var(--accent-dark); }

/* ── Lightbox ────────────────────────────────────────────── */
.gallery-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}

.gallery-lightbox[hidden] { display: none; }

.gallery-lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(45, 49, 66, 0.55);
  backdrop-filter: blur(10px);
}

.gallery-lightbox-dialog {
  position: relative; z-index: 1;
  width: min(1100px, 100%);
  max-height: 90vh;
  display: flex; align-items: center; gap: 0.5rem;
}

.gallery-lightbox-figure {
  flex: 1; min-width: 0; margin: 0;
  display: flex; flex-direction: column; align-items: center;
}

.gallery-lightbox-img {
  max-width: 100%; max-height: calc(90vh - 4rem);
  width: auto; height: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

.gallery-lightbox-caption {
  margin-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-dark);
  text-align: center;
}

.gallery-lightbox-close {
  position: absolute; top: -2.5rem; right: 0;
  background: transparent; border: none;
  color: var(--text-secondary);
  font-size: 2rem; line-height: 1;
  cursor: pointer; padding: 0.25rem 0.5rem;
  transition: color 0.18s;
}

.gallery-lightbox-close:hover { color: var(--text-primary); }

.gallery-lightbox-nav {
  flex-shrink: 0; width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-secondary);
  font-size: 1.75rem; line-height: 1;
  border-radius: 10px; cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.gallery-lightbox-nav:hover {
  border-color: var(--accent-color);
  background: var(--accent-dim);
  color: var(--accent-dark);
}

body.gallery-open { overflow: hidden; }

@media (max-width: 768px) {
  .gallery-lightbox-dialog { flex-direction: column; }
  .gallery-lightbox-nav    { order: 2; }
  .gallery-lightbox-prev,
  .gallery-lightbox-next   { position: absolute; bottom: -3rem; }
  .gallery-lightbox-prev   { left: 25%; }
  .gallery-lightbox-next   { right: 25%; }
  .gallery-lightbox-close  { top: -2rem; right: 50%; transform: translateX(50%); }
}

/* ── Demo Section ────────────────────────────────────────── */
.demo-section { padding: 4rem 0; }

.demo-header { margin-bottom: 1.25rem; }

.demo-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.terminal-window {
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.terminal-bar {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border-color);
}

.dots { display: flex; gap: 0.45rem; margin-right: 1rem; }

.dot {
  width: 10px; height: 10px; border-radius: 50%;
}

.dot.red    { background: #EC6A5E; }
.dot.yellow { background: #F4BF4F; }
.dot.green  { background: #61C454; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.terminal-body {
  padding: 1.5rem;
  height: 350px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-primary);
  overflow-y: auto;
  line-height: 1.6;
}

.terminal-body .command { color: var(--accent-dark); font-weight: 600; }

/* ── Features Section ────────────────────────────────────── */
.features-section { padding: 5rem 0; }

.section-heading { margin-bottom: 2rem; }

.section-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: 1.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 28px rgba(122,158,159,0.10);
}

.feature-icon {
  margin-bottom: 1.1rem;
  color: var(--accent-color);
  width: 32px; height: 32px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover .feature-icon {
  color: var(--accent-dark);
  transform: scale(1.1);
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.feature-desc code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-inset);
  border: 1px solid var(--border-color);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: #5C6AC4;
}

/* ── Integrations Section ────────────────────────────────── */
.integrations-section { padding: 4rem 0; }

.integrations-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.integration-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.integration-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.badge:hover {
  border-color: var(--accent-color);
  background: var(--accent-dim);
  color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(122,158,159,0.12);
}

.badge svg {
  width: 16px; height: 16px;
  color: var(--accent-dark);
  opacity: 0.75;
}

.badge:hover svg { opacity: 1; }

/* ── Stats / Community Section ───────────────────────────── */
.community-section {
  padding: 5rem 0;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 4rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.stat-icon {
  width: 28px; height: 28px;
  color: var(--accent-color);
  margin-bottom: 0.85rem;
  transition: transform 0.2s ease;
}

.stat-card:hover .stat-icon { transform: scale(1.12); }

.stat-value {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.contributors-container {
  max-width: 820px;
  margin: 0 auto;
}

.contributors-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.contributors-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.contributor-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 140px;
  max-width: 175px;
}

.contributor-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 4px 14px rgba(122,158,159,0.10);
}

.contributor-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.contributor-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.contributor-name {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contributor-commits {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.contributor-loading { color: var(--text-subtle); font-size: 0.88rem; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-col.align-right { align-items: flex-end; }

.footer-text, .footer-version, .footer-link, .footer-copy {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.footer-version { color: var(--accent-dark); font-weight: 600; }

.footer-link {
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s ease;
}

.footer-link:hover { color: var(--accent-dark); }

/* ── Fade-In Animations ──────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.215, 0.61, 0.355, 1),
              transform 0.7s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Progress Button ─────────────────────────────────────── */
.explore-progress {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: var(--text-secondary);
  padding: 0; outline: none;
}

.explore-progress:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(122,158,159,0.15);
  border-color: var(--accent-color);
  color: var(--accent-dark);
}

.progress-ring {
  position: absolute; top: -1px; left: -1px;
  transform: rotate(-90deg);
  width: 48px; height: 48px;
}

.progress-ring-bg { stroke: rgba(122,158,159,0.12); }

.progress-ring-circle {
  stroke: var(--accent-color);
  stroke-dasharray: 138.23;
  stroke-dashoffset: 138.23;
  transition: stroke-dashoffset 0.1s linear;
}

.progress-arrow {
  width: 18px; height: 18px;
  transition: transform 0.3s ease;
}

.explore-progress.is-bottom .progress-arrow { transform: rotate(180deg); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    gap: 2.5rem;
  }
  .hero-text-col {
    text-align: center;
    align-items: center;
  }
  .hero-desc { margin: 0 auto 1.5rem; }
  .badge-container { justify-content: center; }
  .mental-model-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }
  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
  }
  .footer-col.align-right { align-items: center; }
  .mental-model-grid { grid-template-columns: 1fr; }
}

/* ── Anatomy / inline tree sections (keep functional) ────── */
.inline-code {
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  padding: 0.12rem 0.38em;
  border-radius: 5px;
  color: #5C6AC4;
  font-size: 0.88em;
  border: 1px solid var(--border-color);
}

.anatomy-section { padding: 4rem 0; }

.anatomy-desc {
  margin: 0.75rem auto 0;
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 680px;
}

.anatomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.anatomy-card {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent-color);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 4px 12px 12px 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.anatomy-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(122,158,159,0.10);
}

.anatomy-file {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.anatomy-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.anatomy-terminal { max-width: 800px; margin: 3rem auto 0; }
.ps-terminal-body { position: relative; height: auto !important; overflow: visible !important; }

.tree-output {
  white-space: pre;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  padding-bottom: 80px;
  padding-right: 200px;
}

.tree-output p { margin: 0; }
.tree-output ul { list-style: none; padding-left: 20px; margin: 0; }
.tree-output > ul { padding-left: 0; }
.tree-output li { position: relative; margin: 0; padding-left: 5px; }
.tree-output ul ul li::before {
  content: '|__';
  position: absolute; left: -20px; top: 0;
  color: var(--text-subtle);
}

.tree-dir  { color: var(--accent-dark); font-weight: 700; }
.tree-row {
  display: block; position: relative; cursor: crosshair;
  padding: 0.1rem 0.5rem; margin-left: -0.5rem;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background 0.18s, border-color 0.18s;
  width: max-content;
}

.tree-row:hover {
  background: var(--accent-dim);
  border-color: rgba(122,158,159,0.2);
}

.tree-branch { color: var(--text-subtle); }
.tree-file   { color: var(--accent-dark); }

.hover-tooltip {
  position: absolute; opacity: 0; visibility: hidden;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 0.75rem; border-radius: 8px;
  z-index: 10;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  font-family: var(--font-sans);
  white-space: normal;
}

.tooltip-title {
  display: block; font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent-dark); text-transform: uppercase;
  margin-bottom: 0.25rem; font-weight: 700;
}

.tooltip-body { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.45; }

.hover-tooltip-top {
  bottom: 100%; left: 100%; width: 250px;
  transform: translateY(8px) translateX(-16px);
  margin-bottom: 10px; margin-left: 16px;
}

.hover-tooltip-bottom {
  top: 100%; left: 10%; width: 300px;
  transform: translateY(-8px); margin-top: 15px;
}

.tree-row:hover .hover-tooltip {
  opacity: 1; visibility: visible;
  transform: translateY(0) translateX(0);
}
