/* ==========================================================================
   harrison@portfolio — terminal-style file browser
   ========================================================================== */

:root {
  /* Core theme */
  --bg: #F7C52D;
  --fg: #0A0A0A;
  --fg-dim: #3A3A3A;
  --fg-faint: #6a5a12;
  --accent: #000000;
  --error: #B91C1C;

  /* Borders & overlays (opaque equivalents blended against --bg) */
  --rule: #c39c25;
  --rule-soft: #dfb22a;
  --hover-bg: #e4b62a;
  --spotlight-bg: #eabb2b;
  --overlay-subtle: #eebe2c;
  --overlay-light: #e4b62a;
  --overlay-medium: #dbaf29;
  --overlay-heavy: #c39c25;
  --overlay-dark: #26200e;

  /* Status shimmer colors */
  --status-green: #4ade80;
  --status-green-bright: #22ff77;
  --status-orange: #fb923c;
  --status-orange-bright: #ff7b00;
  --status-yellow: #fbbf24;
  --status-yellow-bright: #f59e0b;
  --status-blue-light: #a5d8ff;
  --status-blue: #4dabf7;
  --status-blue-dark: #1971c2;
  --status-purple: #d8b4fe;
  --status-purple-bright: #a855f7;

  /* Claude terminal colors */
  --claude-blue: #60a5fa;
  --claude-green: #4ade80;
  --claude-purple: #c084fc;
  --claude-err: #f87171;

  /* Layout */
  --max-width: 860px;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Consolas', 'Menlo', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  padding: 40px 24px 64px;
  padding: 40px max(24px, env(safe-area-inset-right)) 64px max(24px, env(safe-area-inset-left));
  overflow-x: hidden;
}

/* faint scanline overlay for subtle CRT feel */
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.018) 3px,
    rgba(0,0,0,0) 4px
  );
  z-index: 1;
  mix-blend-mode: multiply;
}

.screen {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: calc(100vh - 104px);
}

/* ---------- Typography and primitives ---------- */

a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { background: var(--accent); color: var(--bg); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--fg);
  border-radius: 2px;
  padding: 6px 12px;
  cursor: pointer;
}
button:hover { background: var(--fg); color: var(--bg); }

hr.rule {
  border: 0;
  border-top: 1px dashed var(--rule);
  margin: 18px 0;
}

.muted { color: var(--fg-dim); }
.faint { color: var(--fg-faint); }

/* ---------- Header / brand ---------- */

.header-wrap {
  position: relative;
}
a.brand-link { text-decoration: none; color: inherit; }
a.brand-link:hover { background: transparent; color: inherit; }
.corner-logo {
  line-height: 0;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 150ms ease;
  flex-shrink: 0;
  background: transparent !important;
}
a.corner-logo:hover { opacity: 1; color: inherit; }
.corner-logo .logo-svg {
  width: 44px;
  height: auto;
  color: var(--fg);
  transition: color 150ms ease;
}
.corner-logo:hover .logo-svg { color: var(--accent); }
.corner-logo .logo-svg.nudge {
  animation: logoNudge 0.6s ease-in-out;
}
@keyframes logoNudge {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  20% { transform: rotate(8deg) translateX(2px) translateY(-1px); }
  40% { transform: rotate(-3deg) translateX(-1px); }
  60% { transform: rotate(5deg) translateX(1px) translateY(-0.5px); }
  80% { transform: rotate(-1deg); }
}

.share-btn {
  position: absolute;
  top: 0;
  right: 0;
  /* match brand height: 3 lines × font-size × line-height (1.15) */
  width: calc(3 * 12px * 1.15);
  height: calc(3 * 12px * 1.15);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--fg);
  border-radius: 2px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.share-btn svg {
  display: block;
}
.share-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.brand {
  margin: 0 0 20px;
  white-space: pre;
  font-size: 12px;
  line-height: 1.15;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: 0;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.brand-sub {
  margin: 0 0 24px;
  color: var(--fg-dim);
  font-size: 13px;
}

/* ---------- Breadcrumb ---------- */

.crumbs {
  margin: 0 0 18px;
  font-size: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border: 1.5px solid var(--fg);
  border-radius: 3px;
  background: transparent;
  color: var(--fg);
  font-size: 12px;
  cursor: pointer;
  margin-right: 6px;
  line-height: 1;
}
.back-btn:hover {
  background: var(--fg);
  color: var(--bg);
}
.crumbs .crumb {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.crumbs .crumb:hover { background: var(--accent); color: var(--bg); text-decoration: none; }
.crumbs .sep { color: var(--fg-dim); }
.crumbs .current { text-decoration: none; cursor: default; }
.crumbs .current:hover { background: transparent; color: var(--fg); }

/* ---------- Terminal prompt ---------- */

.prompt-line {
  margin: 0 0 6px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
}
.prompt-prefix { font-weight: 700; }
.prompt-cmd { font-weight: 400; }

.cursor {
  display: inline-block;
  width: 0.6em;
  margin-left: 1px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* ---------- Panels & shared layout ---------- */

.panel {
  margin: 14px 0 22px;
  animation: fadein 220ms ease-out both;
}
@keyframes fadein {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 24px 0 8px;
}

/* ---------- Directory listing ---------- */

.dir {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  border-top: 1px dashed var(--rule-soft);
}
.dir li {
  border-bottom: 1px dashed var(--rule-soft);
}
.dir .row {
  display: grid;
  grid-template-columns: 34px minmax(140px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--fg);
  font-size: 14px;
  transition: background-color 80ms linear;
}
.dir .row .logo.sm { align-self: center; }
.dir .row:hover { background: var(--hover-bg); }
.dir .row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--hover-bg);
}
.dir .icon { font-size: 18px; line-height: 1; }
.dir .name { font-weight: 600; }
.dir .row-tags {
  grid-column: 2 / -1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: -4px;
}
.dir .row-tag {
  font-size: 11px;
  color: var(--fg-dim);
  opacity: 0.65;
  cursor: pointer;
  white-space: nowrap;
}
.dir .row-tag:hover {
  opacity: 1;
  color: var(--fg);
  text-decoration: underline;
}
.dir .desc {
  color: var(--fg-dim);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Pinned spotlight ---------- */

.pinned-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 10px;
}

.spotlight {
  border: 1px solid var(--fg);
  border-radius: 2px;
  padding: 18px 20px;
  background: var(--spotlight-bg);
  position: relative;
  min-height: 280px;
  overflow: visible;
}
.spotlight .sp-inner {
  display: flex;
  flex-direction: column;
}
.spotlight .sp-thumb {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 180px;
  height: 110px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--fg-dim);
  opacity: 0.85;
  background: var(--bg);
}
.spotlight .sp-inner {
  animation: spFade 300ms ease-out both;
}
@keyframes spFade {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}
.spotlight .sp-eyebrow {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0 0 6px;
}
.status-badge {
  font-weight: 700;
}
.status-live {
  color: var(--fg);
  background: linear-gradient(
    90deg,
    var(--fg) 0%,
    var(--fg) 35%,
    var(--status-green) 45%,
    var(--status-green-bright) 50%,
    var(--status-green) 55%,
    var(--fg) 65%,
    var(--fg) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-green 4s ease-in-out infinite;
}
@keyframes shimmer-green {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}
.status-beta {
  color: var(--fg);
  background: linear-gradient(
    90deg,
    var(--fg) 0%,
    var(--fg) 35%,
    var(--status-orange) 45%,
    var(--status-orange-bright) 50%,
    var(--status-orange) 55%,
    var(--fg) 65%,
    var(--fg) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-orange 4s ease-in-out infinite;
}
@keyframes shimmer-orange {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}
.status-wip {
  color: var(--fg);
  background: linear-gradient(
    90deg,
    var(--fg) 0%,
    var(--fg) 35%,
    var(--status-yellow) 45%,
    var(--status-yellow-bright) 50%,
    var(--status-yellow) 55%,
    var(--fg) 65%,
    var(--fg) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-yellow 4s ease-in-out infinite;
}
@keyframes shimmer-yellow {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}
.status-trial {
  color: var(--fg);
  background: linear-gradient(
    90deg,
    var(--fg) 0%,
    var(--fg) 30%,
    var(--status-blue-light) 40%,
    var(--status-blue) 48%,
    var(--status-blue-dark) 52%,
    var(--status-blue) 56%,
    var(--status-blue-light) 60%,
    var(--fg) 70%,
    var(--fg) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-ice 3s ease-in-out infinite;
}
@keyframes shimmer-ice {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}
.status-learning {
  color: var(--fg);
  background: linear-gradient(
    90deg,
    var(--fg) 0%,
    var(--fg) 35%,
    var(--status-purple) 45%,
    var(--status-purple-bright) 50%,
    var(--status-purple) 55%,
    var(--fg) 65%,
    var(--fg) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-purple 4s ease-in-out infinite;
}
@keyframes shimmer-purple {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}
.spotlight .sp-titlewrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 4px;
}
.spotlight .sp-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.spotlight .sp-tag {
  margin: 0 0 10px;
  color: var(--fg);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.spotlight .sp-cta {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  padding: 7px 14px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.spotlight .sp-cta:hover { background: var(--bg); color: var(--fg); }
.spotlight .sp-meta {
  position: absolute;
  right: 14px;
  top: 10px;
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
}

.pin-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.pin-list li {
  font-size: 13px;
}
.pin-list button {
  border: 1px solid var(--rule);
  padding: 4px 10px;
  background: transparent;
  color: var(--fg-dim);
  cursor: pointer;
  font: inherit;
  border-radius: 2px;
}
.pin-list button:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pin-list button.active {
  color: var(--fg);
  border-color: var(--fg);
  background: rgba(10,10,10,0.10);
  font-weight: 700;
}

/* ---------- Text-icon logo (fallback for projects w/o a real logo) ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--fg);
  border-radius: 2px;
  background: transparent;
  color: var(--fg);
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
  overflow: hidden;
  font-family: var(--font-mono);
}
.logo.sm { width: 30px; height: 30px; font-size: 16px; }
.logo.md { width: 44px; height: 44px; font-size: 22px; }
.logo.lg { width: 72px; height: 72px; font-size: 38px; }
.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #ffffff;
}
.logo.filled {
  background: var(--fg);
  color: var(--bg);
}

/* ---------- Project detail ---------- */

.project {
  margin-top: 8px;
}
.project .head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 8px 0 4px;
}
.project .head .head-text { min-width: 0; flex: 1 1 auto; }
.project h1 {
  font-size: 28px;
  margin: 0 0 4px;
  line-height: 1.15;
}
.project .tagline {
  font-size: 15px;
  color: var(--fg-dim);
  margin: 0 0 14px;
}
.project .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 16px;
}
.tag {
  display: inline-block;
  border: 1px solid var(--fg);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 2px;
  background: transparent;
}
.project .desc {
  font-size: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0 0 18px;
  max-width: 68ch;
}
.project .shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.project .shots a.shot {
  display: block;
  border: 1px solid var(--fg);
  border-radius: 2px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(10,10,10,0.04);
  cursor: zoom-in;
  transition: transform 120ms ease-out;
}
.project .shots a.shot:hover { transform: translateY(-1px); background: rgba(10,10,10,0.08); }
.project .shots a.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.project .shots a.shot.wide {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  max-height: 420px;
}
.project .shots a.shot.wide img {
  object-fit: contain;
  background: #000;
}
.project .shots .shot-video {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--rule);
}
.project .shots .shot.wide .shot-video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.project .shots .shot-missing {
  border: 1px dashed var(--rule);
  padding: 24px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 13px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  animation: fadein 160ms ease-out both;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border: 1px solid var(--bg);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(247, 197, 45, 0.2);
}
.project .links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 20px;
}
.btn {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--fg);
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  border-radius: 2px;
  cursor: pointer;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn.primary {
  background: var(--fg);
  color: var(--bg);
}
.btn.primary:hover { background: var(--bg); color: var(--fg); }

.badge {
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px dashed var(--fg);
  border-radius: 2px;
  background: transparent;
  opacity: 0.55;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  cursor: default;
}

/* ---------- Progress section ---------- */

.desc-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 0 0 18px;
}
.desc-row > .desc {
  flex: 1;
  margin: 0;
  min-width: 0;
}
.progress-section {
  width: 220px;
  flex-shrink: 0;
  padding: 12px 14px;
  border: 1px solid var(--fg-dim);
  border-radius: 2px;
  background: rgba(10, 10, 10, 0.08);
}
.progress-header {
  margin-bottom: 8px;
}
.progress-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: lowercase;
}
.progress-bar {
  height: 6px;
  background: rgba(10, 10, 10, 0.12);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.progress-fill {
  height: 100%;
  background: var(--fg);
  border-radius: 3px;
  opacity: 0.6;
  transition: width 0.6s ease;
}
.progress-breakdown {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: help;
}
.progress-cat {
  font-size: 10px;
  width: 72px;
  flex-shrink: 0;
  color: var(--fg-dim);
  text-transform: lowercase;
}
.progress-mini-bar {
  flex: 1;
  height: 3px;
  background: rgba(10, 10, 10, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.progress-mini-fill {
  height: 100%;
  background: var(--fg);
  border-radius: 2px;
  opacity: 0.4;
  transition: width 0.6s ease;
}
.progress-pct {
  font-size: 10px;
  width: 28px;
  text-align: right;
  color: var(--fg-dim);
  font-family: monospace;
}
@media (max-width: 600px) {
  .desc-row { flex-direction: column; }
  .progress-section { width: 100%; }
}

/* ---------- Reviews / quotes ---------- */

.reviews {
  margin: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.reviews .review {
  border-left: 3px solid var(--fg);
  padding: 8px 14px 8px 16px;
  background: rgba(10, 10, 10, 0.045);
  border-radius: 0 2px 2px 0;
  position: relative;
}
.reviews .review .mark {
  font-size: 28px;
  font-weight: 700;
  line-height: 0.7;
  color: var(--fg);
  margin-right: 4px;
  vertical-align: -4px;
}
.reviews .review .quote {
  display: inline;
  font-size: 14px;
  line-height: 1.55;
}
.reviews .review .author {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--fg-dim);
}
.reviews .review .author::before {
  content: '— ';
}

/* spotlight highlights — fallback when no review */
.spotlight .sp-highlights {
  list-style: none;
  padding: 0;
  margin: 2px 0 12px;
  font-size: 12.5px;
  color: var(--fg);
  line-height: 1.45;
}
.spotlight .sp-highlights li {
  padding-left: 14px;
  position: relative;
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spotlight .sp-highlights li::before {
  content: '›';
  position: absolute;
  left: 2px;
  top: 0;
  font-weight: 700;
  color: var(--fg);
}

/* spotlight review pill — single-line, truncates */
.spotlight .sp-review {
  margin: 10px 0 12px;
  font-size: 12px;
  color: var(--fg-dim);
  border-left: 2px solid var(--fg);
  padding: 2px 0 2px 10px;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-style: italic;
}

/* ---------- Interactive terminal ---------- */

.term {
  margin: 32px 0 10px;
  font-size: 15px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
}
.term-label {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.term-log {
  margin: 0 0 10px;
}
.term-log .entry {
  margin-bottom: 10px;
}
.term-log .echo {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.term-log .out {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 2px 0 0;
  color: var(--fg);
  font: inherit;
}
.term-log .out.err { color: var(--error); }
.term-input {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 12px 14px;
  border: 2px solid var(--fg);
  background: rgba(10, 10, 10, 0.08);
  border-radius: 2px;
  transition: background-color 100ms linear;
  cursor: text;
}
.term-input:hover { background: rgba(10, 10, 10, 0.12); }
.term-input:focus-within {
  background: rgba(10, 10, 10, 0.14);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--fg);
}
.term-input .prompt-prefix {
  font-weight: 700;
  color: var(--fg);
  flex: 0 0 auto;
}
.term-field {
  flex: 1 1 auto;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  caret-color: var(--fg);
  -webkit-appearance: none;
  appearance: none;
}
.term-field::selection { background: var(--fg); color: var(--bg); }
.term-field::placeholder { color: var(--fg-dim); opacity: 0.7; }
/* fake blinking cursor hint — only visible when input is empty AND focused */
.term-input .term-ghost {
  display: none;
  flex: 0 0 auto;
  color: var(--fg);
  margin-left: -0.6em;
  pointer-events: none;
  animation: blink 1.1s steps(1) infinite;
}
.term-input.is-empty .term-ghost { display: inline-block; }
.term-hint {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.03em;
}

/* ---------- Search results ---------- */

.out-html {
  font-size: 13px;
  line-height: 1.6;
  padding: 4px 0;
}
.out-html mark {
  background: rgba(245, 158, 11, 0.35);
  color: inherit;
  padding: 1px 2px;
  border-radius: 1px;
}
.search-header {
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 12px;
  color: var(--fg-dim);
}
.search-result {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.search-result:last-child { border-bottom: none; }
.search-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.search-name:hover { background: var(--fg); color: var(--bg); text-decoration: none; }
.search-match {
  font-size: 12px;
  color: var(--fg-dim);
  margin: 2px 0 2px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-field {
  color: var(--fg-dim);
  opacity: 0.6;
  margin-right: 4px;
}

/* ---------- Claude session ---------- */

.claude-session {
  font: 13px/1.7 var(--mono, monospace);
  padding: 4px 0;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.claude-line {
  opacity: 0;
  animation: claudeReveal 0.15s ease forwards;
}
@keyframes claudeReveal {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}
.claude-dim { color: var(--fg-dim); opacity: 0.6; }
.claude-blue { color: #60a5fa; font-weight: 700; }
.claude-green { color: #4ade80; font-weight: 600; }
.claude-purple { color: #c084fc; font-weight: 600; }
.claude-white { color: var(--fg); font-weight: 600; }
.claude-err { color: #f87171; }
.claude-thinking {
  color: var(--fg-dim);
  animation: claudePulse 1.2s ease-in-out infinite;
}
@keyframes claudePulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.claude-cursor {
  animation: claudeBlink 1s step-end infinite;
}
@keyframes claudeBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---------- Whoami ---------- */

.whoami {
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.6;
}
.whoami-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.whoami-role {
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 8px;
}
.whoami-bio {
  max-width: 100%;
  margin-bottom: 10px;
}
.whoami-stats {
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 4px;
}
.whoami-links {
  font-size: 12px;
  color: var(--fg-dim);
  display: flex;
  gap: 16px;
}
.whoami-links a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Found secrets (easter egg tracker) ---------- */

.secrets {
  margin: 24px 0 4px;
  padding: 10px 0 0;
  border-top: 1px dashed var(--rule-soft);
  font-size: 12px;
  color: var(--fg-dim);
}
.secrets-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.secrets-head .label {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}
.secrets-head .count { font-size: 11px; }
.secrets-body { margin: 4px 0 0; font-style: italic; }
.secrets-body .egg {
  font-style: normal;
  display: inline-block;
  margin: 2px 8px 2px 0;
  padding: 1px 7px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: rgba(10,10,10,0.05);
  color: var(--fg);
  font-weight: 600;
}
.secrets-body .egg::before { content: '✓ '; color: var(--fg); }

/* ---------- Footer ---------- */

.foot {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px dashed var(--rule);
  font-size: 12px;
  color: var(--fg-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.foot > .corner-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.foot a { color: var(--fg-dim); }
.foot a:hover { color: var(--bg); background: var(--accent); }

/* ---------- Boot screen ---------- */

.boot {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 104px);
  position: relative;
}

.boot-skip-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.6;
  transition: opacity 150ms;
  z-index: 2;
}
.boot-skip-toggle:hover { opacity: 1; }
.boot-skip-toggle input[type="checkbox"] {
  width: 12px;
  height: 12px;
  cursor: pointer;
  accent-color: var(--accent);
}

.boot-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 40px;
  clip-path: polygon(0 0, 0 0, 0 0);
  animation: bootReveal 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.boot-logo .logo-svg {
  width: 120px;
  height: auto;
  display: block;
  color: var(--fg);
}

.boot-logo-name {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--fg);
  margin-top: 14px;
  width: 120px;
  text-align: center;
  line-height: 1.3;
}

@keyframes bootReveal {
  0% {
    clip-path: polygon(0 0, 0 0, 0 0);
    opacity: 0.6;
  }
  40% {
    opacity: 1;
  }
  100% {
    clip-path: polygon(-20% -20%, 200% -20%, 200% 200%, -20% 200%);
    opacity: 1;
  }
}

.boot-fade-out {
  animation: bootFadeOut 0.5s ease-in forwards;
}

@keyframes bootFadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

.boot .boot-typing {
  width: 100%;
  max-width: 500px;
  font-size: 13px;
  color: var(--fg-dim);
}

.boot .prompt-line { font-size: 13px; }
.boot .boot-sub {
  margin-top: 8px;
  color: var(--fg-dim);
  font-size: 13px;
}

/* ---------- Error state ---------- */

.error-box {
  border: 1px solid var(--error);
  color: var(--error);
  padding: 14px 16px;
  margin: 16px 0;
  background: rgba(185, 28, 28, 0.06);
  border-radius: 2px;
}
.error-box code {
  background: rgba(185,28,28,0.08);
  padding: 1px 4px;
  border-radius: 2px;
}

/* ---------- Mobile ---------- */

@media (max-width: 620px) {
  body {
    padding: 28px 18px 56px;
    padding: 28px max(18px, env(safe-area-inset-right)) 56px max(18px, env(safe-area-inset-left));
    font-size: 14px;
  }

  /* Prevent iOS auto-zoom on input focus (requires >= 16px) */
  input, textarea, select, .term-field { font-size: 16px; }

  /* Scale ASCII brand art to fit viewport instead of overflowing */
  .brand { font-size: clamp(6.5px, 2.5vw, 9px); }
  .corner-logo { display: none; }

  /* Spotlight: stack layout on mobile */
  .spotlight { padding: 16px; min-height: auto; }
  .spotlight .sp-meta { position: static; margin-bottom: 6px; display: block; }
  .spotlight .sp-thumb {
    position: static;
    width: 100%;
    height: 140px;
    margin-top: 10px;
  }
  .spotlight .sp-cta { padding: 12px 18px; font-size: 14px; margin-top: 12px; }

  /* Share: match brand height on mobile (3 lines × clamp font × 1.15) */
  .share-btn {
    width: calc(3 * clamp(6.5px, 2.5vw, 9px) * 1.15);
    height: calc(3 * clamp(6.5px, 2.5vw, 9px) * 1.15);
  }

  /* Tap targets: minimum 44px for touch */
  .back-btn { width: 44px; height: 44px; font-size: 14px; }
  .pin-list button { padding: 10px 14px; }
  .tag { padding: 6px 10px; font-size: 13px; }
  .btn { padding: 12px 16px; }
  .dir .row-tag { font-size: 13px; padding: 4px 8px; }

  .project h1 { font-size: 22px; }
  .spotlight .sp-title { font-size: 18px; }

  /* Directory grid: match logo.sm width (30px), add breathing room */
  .dir .row {
    grid-template-columns: 30px 1fr;
    gap: 14px;
    padding: 12px 8px;
  }
  .dir .desc {
    grid-column: 2 / -1;
    text-align: left;
    white-space: normal;
    font-size: 12px;
    padding-top: 2px;
  }
  .foot { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; opacity: 1; }
  .panel, .spotlight .sp-inner { animation: none; }
}
