/* ═══════════════════════════════════════════
   harsla.com — Terminal Aesthetic
   ═══════════════════════════════════════════ */

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

/* ── Variables ── */
:root {
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --accent: #e8811c;
  --accent-hover: #f09030;
  --accent-dim: rgba(232, 129, 28, 0.15);
  --green: #3fb950;
  --red: #f85149;
  --yellow: #d29922;
  --blue: #58a6ff;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-elevated: #1c2128;
  --border: #30363d;
  --border-subtle: #21262d;
  --text: #e6edf3;
  --text-muted: #7d8590;
  --text-faint: #484f58;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-surface: #f6f8fa;
  --bg-elevated: #eef1f5;
  --border: #d0d7de;
  --border-subtle: #e1e4e8;
  --text: #1f2328;
  --text-muted: #656d76;
  --text-faint: #b1bac4;
  --accent: #d06a10;
  --accent-hover: #b85a0a;
  --accent-dim: rgba(208, 106, 16, 0.12);
}

/* ── Base ── */
html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.75rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Scanlines overlay ── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Navigation ── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 1rem;
}

.nav-logo-link {
  line-height: 0;
  flex-shrink: 0;
}

.nav-logo {
  height: 36px;
  width: auto;
}

.is-home .nav-logo-link {
  visibility: hidden;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  margin-right: 1rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  transition: color 0.15s, background 0.15s;
}

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

.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ── Theme toggle ── */
.theme-toggle {
  color: var(--text-muted);
  line-height: 0;
  padding: 0.25rem;
  transition: color 0.15s;
}

.theme-toggle:hover {
  color: var(--accent);
}

[data-theme="dark"] .icon-sun { display: inline; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: inline; }

/* ── Logo theme toggle ── */
.logo-light { display: none; }
.icon-moon { display: none; }

[data-theme="dark"] .logo-dark { display: inline; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: inline; }

/* ── Hamburger menu ── */
.menu-toggle {
  display: none;
  color: var(--text-muted);
  line-height: 0;
  padding: 0.25rem;
  transition: color 0.15s;
}

.menu-toggle:hover {
  color: var(--accent);
}

.icon-close { display: none; }
.nav-open .icon-menu { display: none; }
.nav-open .icon-close { display: inline; }

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
  }

  .nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    right: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 0.5rem;
    min-width: 160px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .nav-open .nav-link {
    padding: 0.6rem 1rem;
    display: block;
  }

  .nav-bar {
    position: relative;
  }

  .nav-logo {
    height: 30px;
  }
}

/* ── Hero (homepage) ── */
.hero {
  text-align: center;
  padding: 4rem 0 2rem;
}

.hero-logo img {
  max-width: 220px;
  height: auto;
  margin: 0 auto;
}

.hero-tagline {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

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

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: cursor-blink 1s step-end infinite;
}

.cursor--hidden {
  visibility: hidden;
}

.hero-hint {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  height: 1.2em;
}

.hero-hint-cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  background: var(--text-faint);
  vertical-align: text-bottom;
  margin-left: 1px;
  opacity: 0;
}

.hero-hint-cursor--typing {
  opacity: 1;
  animation: cursor-blink 1s step-end infinite;
}

.hero-hint-cursor--done {
  animation: none;
  opacity: 0;
  transition: opacity 0.5s;
}

/* ── Section headings with prompt prefix ── */
.section-heading {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.section-heading .prompt {
  color: var(--accent);
  margin-right: 0.25rem;
}

/* ── Directory nav cards (homepage) ── */
.dir-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.dir-card {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: border-color 0.15s;
  text-decoration: none;
}

.dir-card:hover {
  border-color: var(--accent);
}

.dir-card-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.dir-card-name::before {
  content: "";
  color: var(--text-faint);
}

.dir-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

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

/* ── Shorts carousel (homepage feed zone 1) ── */
.shorts-carousel {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: visible;
}

.shorts-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  padding: 0;
  z-index: 2;
}

.shorts-nav--prev {
  border-right: none;
}

.shorts-nav--next {
  border-left: none;
}

.shorts-nav:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-elevated);
}

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

.shorts-nav:disabled {
  color: var(--text-faint);
  opacity: 0.3;
  cursor: default;
}

.shorts-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-width: 0;
  padding: 12px;
  margin: -12px 0;
}

.shorts-track::-webkit-scrollbar {
  display: none;
}

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

.short-card {
  display: block;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  flex: 0 0 calc(25% - 0.5625rem);
  min-width: 140px;
}

.short-card:hover,
.short-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.short-card:focus-visible {
  outline: none;
}

.short-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  transition: transform 0.3s;
}

.short-card:hover img {
  transform: scale(1.03);
}

.short-card-info {
  padding: 0.75rem;
}

.short-card-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.short-card time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ── Shorts carousel focus state ── */
.kb-nav .shorts-track:focus-visible .short-card {
  opacity: 0.4;
  transform: scale(0.97);
  transition: opacity 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s, filter 0.2s;
}

.kb-nav .shorts-track:focus-visible .short-card--current {
  opacity: 1;
  transform: translateY(-3px) scale(1);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(232, 129, 28, 0.5), 0 6px 24px rgba(0, 0, 0, 0.35);
  filter: brightness(1.15);
}

[data-theme="light"] .kb-nav .shorts-track:focus-visible .short-card--current {
  box-shadow: 0 0 20px rgba(208, 106, 16, 0.35), 0 6px 24px rgba(0, 0, 0, 0.12);
  filter: brightness(1.05);
}

/* Dim surrounding content when carousel is focused */
.kb-nav .shorts-carousel:has(.shorts-track:focus-visible) ~ .feed-log,
.kb-nav .shorts-carousel:has(.shorts-track:focus-visible) ~ .feed-more {
  opacity: 0.3;
  transition: opacity 0.2s;
}

.feed-log,
.feed-more {
  transition: opacity 0.2s;
}

/* ── Shorts carousel hint ── */
.shorts-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-align: center;
  height: 1.4em;
  margin: 0.75rem 0 1.5rem;
}

.shorts-hint-cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 1px;
  opacity: 0;
}

.shorts-hint-cursor--typing {
  opacity: 1;
  animation: cursor-blink 1s step-end infinite;
}

.shorts-hint-cursor--done {
  animation: none;
  opacity: 0;
  transition: opacity 0.5s;
}

.shorts-track {
  position: relative;
}

/* ── Activity log (homepage feed zone 2) ── */
.feed-log {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  margin-bottom: 0.75rem;
}

.feed-log-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
}

.feed-log-entry:last-child {
  border-bottom: none;
}

.feed-log-entry:hover {
  background: var(--bg-elevated);
}

.feed-log-entry time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  flex-shrink: 0;
}

.feed-log-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.feed-log-entry:hover .feed-log-title {
  color: var(--accent);
}

/* ── Feed badges ── */
.feed-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.feed-badge--youtube {
  background: rgba(248, 81, 73, 0.15);
  color: var(--red);
}

.feed-badge--blog {
  background: var(--accent-dim);
  color: var(--accent);
}

.feed-badge--github {
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
}

/* ── View more link ── */
.feed-more {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  text-align: right;
  margin-bottom: 2rem;
  transition: color 0.15s;
}

.feed-more:hover {
  color: var(--accent);
}

/* ── Feed page — full log with thumbnails ── */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feed-list-entry {
  display: flex;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--bg-surface);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.feed-list-entry:last-child {
  border-bottom: 1px solid var(--border);
}

.feed-list-entry:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.feed-list-entry:hover + .feed-list-entry {
  border-top-color: var(--accent);
}

.feed-list-entry--expandable {
  cursor: pointer;
}

.feed-list-entry--active {
  border-color: var(--accent);
  flex-wrap: wrap;
}

.feed-list-thumb {
  flex-shrink: 0;
  width: 140px;
  height: 79px;
  overflow: hidden;
  line-height: 0;
  position: relative;
}

.feed-list-thumb--short {
  width: 52px;
  height: 92px;
}

.feed-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.feed-list-entry:hover .feed-list-thumb img {
  transform: scale(1.05);
}

.feed-list-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
}

.feed-list-play svg {
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s;
}

.feed-list-entry:hover .feed-list-play {
  background: rgba(0, 0, 0, 0.35);
}

.feed-list-entry:hover .feed-list-play svg {
  transform: scale(1.15);
}

.feed-list-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.feed-list-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.feed-list-meta time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.feed-list-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-list-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.15rem;
}

/* ── Feed page inline player ── */
.feed-list-player {
  flex-basis: 100%;
  padding-top: 0.5rem;
}

.feed-list-player lite-youtube {
  max-width: 100%;
}

/* ── Feed page — month groups ── */
.feed-month {
  margin-bottom: 2rem;
}

.feed-month-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
  overflow: hidden;
  white-space: nowrap;
}

.feed-empty {
  font-family: var(--font-mono);
  color: var(--text-faint);
}

/* ── Feed responsive ── */
@media (max-width: 768px) {
  .short-card {
    flex: 0 0 calc(33.333% - 0.5rem);
  }
}

@media (max-width: 576px) {
  .short-card {
    flex: 0 0 calc(50% - 0.375rem);
    min-width: 120px;
  }

  .shorts-nav {
    width: 28px;
  }

  .feed-log-entry {
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }

  .feed-log-entry time {
    font-size: 0.7rem;
  }

  .feed-log-title {
    font-size: 0.8rem;
  }

  .feed-list-thumb {
    width: 100px;
    height: 56px;
  }

  .feed-list-thumb--short {
    width: 40px;
    height: 71px;
  }
}

/* ── Keyboard focus cursor ── */
.kb-cursor {
  position: absolute;
  width: 10px;
  height: 18px;
  background: var(--accent);
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  box-shadow: 0 0 6px var(--accent);
  transition: top 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              left 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.15s;
}

.kb-cursor--active {
  opacity: 1;
  animation: cursor-blink 1s step-end infinite;
}

/* ── Keyboard nav focus styles ── */
.kb-nav :focus {
  outline: none;
}

.kb-nav .nav-link:focus-visible {
  color: var(--accent);
  background: var(--accent-dim);
}

.kb-nav .dir-card:focus-visible,
.kb-nav .build-card:focus-visible,
.kb-nav .project-card:focus-visible,
.kb-nav .dash-card:focus-visible,
.kb-nav .stats-bar:focus-visible {
  border-color: var(--accent);
}

.kb-nav .stats-bar:focus-visible {
  box-shadow: 0 0 8px var(--accent-dim);
  outline: none;
}

.kb-nav .short-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.kb-nav .feed-log-entry:focus-visible {
  background: var(--bg-elevated);
}

.kb-nav .feed-log-entry:focus-visible .feed-log-title {
  color: var(--accent);
}

.kb-nav .feed-more:focus-visible,
.kb-nav .social-links a:focus-visible,
.kb-nav .theme-toggle:focus-visible,
.kb-nav .suggestion-chip:focus-visible {
  color: var(--accent);
}

.kb-nav .shorts-nav:focus-visible:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
}

.kb-nav .suggestion-chip:focus-visible {
  border-color: var(--accent);
}

.kb-nav .feed-list-entry:focus-visible {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.kb-nav .post-item-title a:focus-visible {
  color: var(--accent);
}

/* ── Section bar (vim command mode) ── */
.section-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 100;
  font-family: var(--font-mono);
}

.section-bar--active {
  display: flex;
}

.section-bar-prompt {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

.section-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

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

.section-btn--active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.section-bar-sep {
  color: var(--text-faint);
  font-size: 0.7rem;
  margin: 0 0.15rem;
}

.section-bar-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  animation: cursor-blink 1s step-end infinite;
  margin-left: 0.25rem;
  vertical-align: middle;
}

/* ── Find bar (/ fuzzy find) ── */
.find-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 100;
  font-family: var(--font-mono);
}

.find-bar--active {
  display: flex;
}

.find-bar-prompt {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  flex-shrink: 0;
}

.find-bar-input {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  min-width: 60px;
  max-width: 160px;
  flex-shrink: 0;
}

.find-bar-results {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.find-bar-results::-webkit-scrollbar {
  display: none;
}

.find-bar-count {
  font-size: 0.7rem;
  color: var(--text-faint);
  flex-shrink: 0;
  margin-left: auto;
}

.find-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.find-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.find-chip--active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Social links ── */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.social-links a {
  color: var(--text-faint);
  transition: color 0.15s;
  line-height: 0;
}

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

/* ── Blog list ── */
.post-list {
  list-style: none;
}

.post-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.post-item-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.post-item-title a {
  color: var(--text);
}

.post-item-title a:hover {
  color: var(--accent);
}

.post-item-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

.post-item-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  margin-bottom: 0;
}

/* ── Blog single post ── */
.post header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.post header h1 {
  margin-bottom: 0.5rem;
}

.post header time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
}

.post h2 {
  margin-top: 2.5rem;
}

.post h3 {
  margin-top: 2rem;
}

.post p {
  color: var(--text-muted);
  line-height: 1.7;
}

.post ul, .post ol {
  color: var(--text-muted);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.post li {
  margin-bottom: 0.25rem;
}

.post blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  background: var(--bg-surface);
}

.tags {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: var(--accent-dim);
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ── Code blocks — terminal window treatment ── */
pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  position: relative;
}

pre::before {
  content: "terminal";
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

pre code {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
}

code:not(pre code) {
  font-size: 0.875em;
  padding: 0.15rem 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
}

/* ── Projects ── */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 1.25rem;
  transition: border-color 0.15s;
}

.project-card:hover {
  border-color: var(--accent);
}

.project-card header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.project-card header h3 {
  margin: 0;
  font-size: 1rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-active {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-planned {
  background: rgba(125, 133, 144, 0.15);
  color: var(--text-muted);
}

/* ── Builds list ── */
.builds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.build-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 0.15s;
}

.build-card:hover {
  border-color: var(--accent);
}

.build-card-img {
  line-height: 0;
  overflow: hidden;
}

.build-card-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.build-card:hover .build-card-img img {
  transform: scale(1.03);
}

.build-card-body {
  padding: 1.25rem;
}

.build-card-body h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.build-card-body .build-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.build-card-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.build-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
}

.build-status-active {
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
}

.build-status-planned {
  background: rgba(125, 133, 144, 0.15);
  color: var(--text-muted);
}

/* ── Build single page ── */
.build-hero {
  margin: -0.5rem -1.5rem 2rem;
  line-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}

.build-hero img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.build-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.build-meta-item {
  display: flex;
  flex-direction: column;
}

.build-meta-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.build-meta-value {
  font-size: 0.9rem;
  color: var(--text);
}

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

.build-section h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.mod-list {
  list-style: none;
  padding: 0;
}

.mod-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.mod-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-right: 0.5rem;
}

.timeline {
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
  margin-left: 0.5rem;
}

.timeline-entry {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 0.25rem;
}

.timeline-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── About page — Claude Code terminal style ── */
.about-terminal {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
}

.about-terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

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

.terminal-dot-red { background: var(--red); }
.terminal-dot-yellow { background: var(--yellow); }
.terminal-dot-green { background: var(--green); }

.about-terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-left: 0.5rem;
}

.about-terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.terminal-line {
  margin-bottom: 0.5rem;
}

.terminal-line .prompt {
  color: var(--accent);
  user-select: none;
}

.terminal-line .cmd {
  color: var(--text);
}

.terminal-output {
  color: var(--text-muted);
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.terminal-output p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.about-suggestions {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.about-suggestions p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.suggestion-chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: default;
  transition: border-color 0.15s, color 0.15s;
}

.suggestion-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Uses page ── */
.uses-section {
  margin-bottom: 2rem;
}

.uses-section h2 {
  font-size: 1.1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
}

.uses-list {
  list-style: none;
  padding: 0;
}

.uses-list li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.uses-list li strong {
  color: var(--text);
  font-weight: 500;
}

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.site-footer small {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.hit-counter {
  font-family: var(--font-mono);
}

.hit-digits {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--border);
  padding: 3px;
  background: var(--bg-surface);
}

.hit-digit {
  display: inline-block;
  background: var(--accent-dim);
  padding: 0.15em 0.35em;
  min-width: 1.1em;
  text-align: center;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.8rem;
  line-height: 1;
}

/* ── Main spacing ── */
main.container {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* ── Dashboard stats bar ── */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.stats-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stats-link {
  text-decoration: none;
  cursor: pointer;
}

.stats-link:hover .stats-value {
  color: var(--accent);
}

.stats-label {
  color: var(--text-faint);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.stats-value {
  color: var(--text);
  font-weight: 500;
}

.stats-warn {
  color: var(--yellow);
}

.stats-crit {
  color: var(--red);
}

.dash-mem {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  margin-top: 0.3rem;
}

/* ── Analytics ── */
.analytics-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.analytics-section {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 0.6rem 0.75rem;
}

.analytics-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem 0;
}

.analytics-title .prompt {
  color: var(--accent);
}

.analytics-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.analytics-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.analytics-num {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.analytics-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.analytics-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.analytics-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.analytics-row-item:last-child {
  border-bottom: none;
}

.analytics-row-name {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 75%;
}

.analytics-row-val {
  color: var(--accent);
  flex-shrink: 0;
  margin-left: 0.5rem;
  font-weight: 500;
}

/* ── Defrag blocks ── */
.defrag-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.defrag-section {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 0.6rem 0.75rem;
}

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

.defrag-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.defrag-usage {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.defrag-grid {
  display: grid;
  grid-template-columns: repeat(50, 1fr);
  gap: 2px;
}

.defrag-block {
  height: 12px;
  display: block;
}

.defrag-empty {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.defrag-used {
  background: var(--accent);
}

.defrag-nas-used {
  background: var(--blue);
}

.defrag-warn {
  background: var(--yellow);
}

.defrag-crit {
  background: var(--red);
}

.defrag-legend {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  margin-top: 0.35rem;
}

/* ── Dashboard hint ── */
.dash-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  height: 1.2em;
  margin-bottom: 1rem;
}

.dash-hint-cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  background: var(--text-faint);
  vertical-align: text-bottom;
  margin-left: 1px;
  opacity: 0;
}

.dash-hint-cursor--typing {
  opacity: 1;
  animation: cursor-blink 1s step-end infinite;
}

.dash-hint-cursor--done {
  animation: none;
  opacity: 0;
  transition: opacity 0.5s;
}

/* ── Dashboard ── */
.dash-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 2rem;
}

.dash-category {
  margin-bottom: 2rem;
}

.dash-category-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dash-category-name .prompt {
  color: var(--accent);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.625rem;
}

.dash-card {
  display: block;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  text-decoration: none;
  transition: border-color 0.15s;
}

a.dash-card:hover {
  border-color: var(--accent);
}

.dash-card-offline {
  opacity: 0.7;
}

.dash-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.dash-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.dash-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-status-web {
  background: var(--green);
}

.dash-status-other {
  background: var(--text-faint);
}

.dash-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.dash-addr {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-top: 0.35rem;
}

/* ── Responsive ── */
@media (max-width: 576px) {
  .hero {
    padding: 2.5rem 0 1.5rem;
  }

  .hero-logo img {
    max-width: 160px;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }

  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.15rem; }

  .build-hero {
    margin: -0.5rem -1.5rem 1.5rem;
  }

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

  .stats-bar {
    font-size: 0.7rem;
    gap: 0.35rem 0.75rem;
    padding: 0.6rem 0.75rem;
  }

  .stats-label {
    font-size: 0.6rem;
  }

  .defrag-row {
    flex-direction: column;
  }

  .analytics-row {
    flex-direction: column;
  }
}
