/* Portfolio styles — terminal folio */
.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 32px 80px;
  position: relative;
}
@media (max-width: 720px) {
  .app { padding: 16px 20px 60px; }
}

/* Top chrome — pill nav */
.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  margin-bottom: 24px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  position: sticky;
  top: 16px;
  z-index: 20;
}
.top-left { display: flex; align-items: baseline; gap: 12px; font-size: 13px; }
.top-left .logo { font-weight: 700; letter-spacing: -0.01em; }
.top-left .logo::before { content: "◆ "; color: var(--accent); }
.top-left .slash { color: var(--faint); display: none; }
.top-left .sub { color: var(--muted); display: none; }
.top-nav {
  display: flex; gap: 28px; font-size: 13px; color: var(--muted);
  justify-content: center;
}
.top-nav a { border: 0; }
.top-nav a:hover { color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.tt-hint { opacity: 0.6; }

.top-cta {
  padding: 8px 18px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 0;
  transition: opacity .15s;
}
.top-cta:hover { opacity: 0.85; }

@media (max-width: 720px) {
  .top-bar { grid-template-columns: 1fr auto; }
  .top-nav { display: none; }
}

/* Hero — split with visual on right */
.hero {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 56px 56px 40px;
  margin-bottom: 32px;
  overflow: hidden;
  min-height: 620px;
  display: grid;
  grid-template-rows: 1fr auto;
}
.hero-eyebrow {
  display: inline-flex; gap: 10px; align-items: center;
  padding: 6px 14px;
  font-size: 11px; color: var(--muted);
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  border: 1px solid var(--rule);
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 24px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.hero-eyebrow .dot-sep { opacity: 0.5; }
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}
.hero h1 {
  font-size: var(--headline-size, clamp(42px, 5.6vw, 72px));
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0 0 24px;
  font-family: 'Inter', system-ui, sans-serif;
}
.hero h1 .accent { color: var(--accent); }
.hero-role {
  font-size: clamp(14px, 1.4vw, 15px);
  color: var(--muted);
  margin: 0 0 22px;
  min-height: 1.4em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.hero-summary {
  max-width: 58ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 32px;
  text-wrap: pretty;
}
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta {
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.hero-cta.primary {
  background: var(--fg);
  color: var(--bg);
}
.hero-cta.primary:hover { opacity: 0.88; }
.hero-cta.secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--rule-strong);
}
.hero-cta.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Planet visual on the right */
.hero-visual {
  position: absolute;
  top: 50%;
  right: -18%;
  transform: translateY(-50%);
  width: 820px;
  height: 820px;
  max-width: 75%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.95;
}
.hero-visual::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent) 65%, transparent) 0%, color-mix(in oklab, var(--accent) 25%, transparent) 30%, transparent 65%),
    radial-gradient(circle at 50% 50%, color-mix(in oklab, var(--accent) 40%, var(--bg)) 0%, color-mix(in oklab, var(--accent) 12%, var(--bg)) 40%, var(--bg) 70%);
  filter: blur(1px);
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--fg) 25%, transparent) 1px, transparent 1.5px);
  background-size: 6px 6px;
  mask: radial-gradient(circle at 50% 50%, black 40%, transparent 70%);
  -webkit-mask: radial-gradient(circle at 50% 50%, black 40%, transparent 70%);
  mix-blend-mode: overlay;
  opacity: 0.6;
}
html[data-theme="light"] .hero-visual { opacity: 0.7; }
.hero-chibi {
  position: absolute;
  top: 50%;
  right: 4%;
  transform: translate(0, -50%);
  width: 320px;
  height: 320px;
  pointer-events: none;
  z-index: 2;
  animation: chibi-float 5s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px color-mix(in oklab, black 45%, transparent));
}
.hero-chibi img { width: 100%; height: 100%; object-fit: contain; }
@keyframes chibi-float {
  0%, 100% { transform: translate(0, -50%); }
  50% { transform: translate(0, calc(-50% - 10px)); }
}

/* Hero bottom strip */
.hero-footer {
  position: relative;
  z-index: 2;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
.hero-tag {
  font-size: 14px;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.55;
  text-wrap: pretty;
}
.hero-tag b { color: var(--fg); font-weight: 500; }
.hero-tag .accent { color: var(--accent); font-weight: 500; }
.hero-stats {
  display: flex;
  gap: 44px;
}
.hero-stat .val {
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--fg);
  font-family: 'Inter', sans-serif;
}
.hero-stat .val sup {
  font-size: 0.45em;
  color: var(--accent);
  margin-left: 2px;
  vertical-align: super;
  font-weight: 600;
}
.hero-stat .lbl {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.35;
  max-width: 16ch;
}

/* Backed-by strip */
.backed-by {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  padding: 20px 32px;
  margin-bottom: 64px;
  font-size: 12px;
  color: var(--muted);
}
.backed-by .label { line-height: 1.4; }
.backed-by .label b { color: var(--fg); font-weight: 500; display: block; margin-bottom: 2px; }
.backed-by .logos {
  display: flex;
  justify-content: space-around;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.backed-by .logos span {
  opacity: 0.7;
  transition: opacity .15s;
  font-weight: 500;
}
.backed-by .logos span:hover { opacity: 1; color: var(--fg); }

/* === Responsive breakpoints ===
   Monitor  ≥1440px — larger hero, roomier type
   Desktop  1024–1439px — default sizing
   Tablet   721–1023px — chibi shrinks, hero-footer stacks
   Mobile   ≤720px — chibi hides, single column
*/
@media (min-width: 1440px) {
  .app { max-width: 1360px; padding: 32px 48px 120px; }
  .hero { padding: 72px 72px 48px; min-height: 680px; }
  .hero h1 { font-size: var(--headline-size, clamp(64px, 5.4vw, 88px)); }
  .hero-chibi { width: 380px; height: 380px; right: 5%; }
  .hero-visual { width: 760px; height: 760px; }
  .hero-content { max-width: 720px; }
  section.sec { padding: 72px; }
}
@media (max-width: 1100px) {
  .hero-content { max-width: 58%; }
  .hero-chibi { width: 280px; height: 280px; right: 2%; }
  .hero-visual { width: 620px; height: 620px; right: -30%; }
}
@media (max-width: 860px) {
  .hero { padding: 40px 32px; min-height: auto; }
  .hero-content { max-width: 100%; }
  .hero-visual { right: -45%; width: 560px; height: 560px; opacity: 0.45; }
  .hero-chibi { position: relative; top: auto; right: auto; transform: none; width: 180px; height: 180px; margin: 24px 0 -8px; opacity: 0.95; animation: none; filter: drop-shadow(0 10px 24px color-mix(in oklab, black 35%, transparent)); }
  .hero-chibi img { animation: chibi-bob 4s ease-in-out infinite; }
  .hero-footer { grid-template-columns: 1fr; gap: 20px; margin-top: 32px; padding-top: 28px; }
  .hero-stats { gap: 28px; }
  .hero h1 { font-size: min(var(--headline-size, 52px), 52px); }
}
@media (max-width: 560px) {
  .app { padding: 16px 16px 60px; }
  .hero { padding: 28px 20px; border-radius: 20px; }
  .hero-visual { display: none; }
  .hero-chibi { width: 140px; height: 140px; margin: 16px 0 -4px; }
  .hero-eyebrow { font-size: 10px; padding: 5px 12px; flex-wrap: wrap; white-space: normal; }
  .hero-eyebrow .dot-sep { display: none; }
  .hero h1 { font-size: min(var(--headline-size, 38px), 38px); letter-spacing: -0.02em; }
  .hero-summary { font-size: 13px; }
  .hero-ctas { flex-wrap: wrap; gap: 10px; }
  .hero-cta { flex: 1; min-width: 140px; justify-content: center; text-align: center; }
  .hero-stats { flex-wrap: wrap; gap: 20px 32px; }
  .hero-stat { flex: 1 1 40%; }
  .hero-stat .lbl { white-space: normal; }
  .hero-stat .val { font-size: 40px; }
  section.sec { padding: 28px 20px; border-radius: 20px; margin-bottom: 20px; }
  .footer { padding: 28px 20px !important; border-radius: 20px; }
  .top-bar { padding: 10px 14px; }
  .top-left .logo { font-size: 12px; }
  .top-cta { padding: 6px 14px; font-size: 11px; }
}
@keyframes chibi-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--ok) 60%, transparent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--ok) 55%, transparent); }
  70% { box-shadow: 0 0 0 10px color-mix(in oklab, var(--ok) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--ok) 0%, transparent); }
}

.typewriter { color: var(--fg); }
.tw-caret {
  display: inline-block;
  width: 0.55ch; height: 1em;
  background: var(--accent);
  transform: translateY(2px);
  margin-left: 2px;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* Section headers */
.sec-header { margin-bottom: 32px; }
.sec-header-top {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
}
.sec-num { color: var(--accent); font-weight: 500; }
.sec-title { color: var(--fg); font-weight: 600; letter-spacing: -0.01em; }
.sec-kicker { color: var(--muted); font-size: 12px; }
.sec-rule { height: 1px; background: var(--rule); }
section.sec {
  scroll-margin-top: 80px;
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 56px;
  margin-bottom: 32px;
  background: var(--bg);
  overflow: hidden;
}
@media (max-width: 720px) {
  section.sec { padding: 32px 24px; border-radius: 20px; }
}

/* Meta row — used in about + experience */
.meta-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 6px 0;
  font-size: 13px;
}
.meta-label { color: var(--muted); font-size: 12px; }
.meta-value { color: var(--fg); }
.meta-value a { color: var(--fg); }

/* Tags */
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid var(--rule-strong);
  color: var(--muted);
  border-radius: 2px;
  line-height: 1.6;
  transition: all .15s;
  background: transparent;
}
.tag-btn { cursor: pointer; }
.tag-btn:hover { border-color: var(--fg); color: var(--fg); }
.tag-active { border-color: var(--accent); color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); }

/* Prompts */
.prompt { color: var(--muted); }
.prompt-arrow { color: var(--accent); margin-right: 6px; }
.prompt-cursor {
  display: inline-block; width: 0.6ch; height: 1em;
  background: var(--accent); margin-left: 4px; transform: translateY(2px);
  animation: caret 1s steps(1) infinite;
}

/* About grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; gap: 28px; } }
.about-card h3 {
  font-size: 12px; font-weight: 500; color: var(--muted);
  margin: 0 0 14px; letter-spacing: 0.02em;
}
.about-card h3::before { content: "└─ "; color: var(--accent); }
.edu-item { padding: 10px 0; border-top: 1px dashed var(--rule); }
.edu-item:first-of-type { border-top: 0; padding-top: 0; }
.edu-school { font-size: 13px; font-weight: 500; }
.edu-degree { font-size: 12px; color: var(--muted); margin: 2px 0; }
.edu-period { font-size: 11px; color: var(--faint); }
.edu-courses { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.6; }

.skill-group { padding: 10px 0; border-top: 1px dashed var(--rule); }
.skill-group:first-of-type { border-top: 0; padding-top: 0; }
.skill-group-label { font-size: 11px; color: var(--faint); margin-bottom: 6px; }
.skill-items { display: flex; flex-wrap: wrap; gap: 4px 6px; }

/* Work / experience */
.xp-list { display: flex; flex-direction: column; }
.xp-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.xp-item:last-child { border-bottom: 1px solid var(--rule); }
.xp-period { font-size: 12px; color: var(--muted); }
.xp-period .start { color: var(--fg); }
.xp-role { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 2px; }
.xp-company { font-size: 13px; color: var(--accent); margin-bottom: 2px; }
.xp-location { font-size: 11px; color: var(--muted); margin-bottom: 14px; }
.xp-bullets { list-style: none; padding: 0; margin: 0 0 14px; }
.xp-bullets li {
  font-size: 13px;
  color: var(--fg);
  padding: 5px 0 5px 18px;
  position: relative;
  line-height: 1.7;
  text-wrap: pretty;
}
.xp-bullets li::before {
  content: "─";
  position: absolute; left: 0; top: 5px;
  color: var(--accent);
}
.xp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 720px) {
  .xp-item { grid-template-columns: 1fr; gap: 8px; }
  .xp-period { order: 2; }
}

/* Projects */
.proj-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--rule);
  align-items: center;
}
.proj-filter-label { font-size: 11px; color: var(--muted); margin-right: 6px; }
.proj-count { margin-left: auto; font-size: 11px; color: var(--faint); }

.proj-grid { display: flex; flex-direction: column; }
.proj-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 20px;
  padding: 22px 8px;
  border-top: 1px solid var(--rule);
  cursor: pointer;
  position: relative;
  transition: background .15s, padding .15s;
  align-items: start;
}
.proj-row:last-child { border-bottom: 1px solid var(--rule); }
.proj-row:hover {
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}
.proj-row:hover .proj-arrow { transform: translateX(4px); color: var(--accent); }
.proj-idx { font-size: 11px; color: var(--faint); padding-top: 3px; }
.proj-main { min-width: 0; }
.proj-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.proj-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.proj-kind { font-size: 11px; color: var(--muted); }
.proj-year { font-size: 11px; color: var(--faint); }
.proj-blurb { font-size: 13px; color: var(--muted); margin: 4px 0 12px; text-wrap: pretty; max-width: 60ch; }
.proj-bottom { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.proj-metrics { display: flex; gap: 16px; flex-wrap: wrap; }
.proj-metric { font-size: 11px; color: var(--muted); }
.proj-metric b { color: var(--accent); font-weight: 600; }
.proj-arrow {
  align-self: center;
  font-size: 16px;
  color: var(--faint);
  transition: transform .2s, color .2s;
  padding-top: 2px;
}
@media (max-width: 720px) {
  .proj-row { grid-template-columns: 28px 1fr; gap: 10px; }
  .proj-arrow { display: none; }
}

/* Project detail overlay */
.overlay-backdrop {
  position: fixed; inset: 0;
  background: color-mix(in oklab, var(--bg) 70%, black 10%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  animation: fadeIn .2s ease;
}
html[data-theme="dark"] .overlay-backdrop {
  background: color-mix(in oklab, black 75%, transparent);
}
.overlay-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(720px, 92vw);
  background: var(--bg);
  border-left: 1px solid var(--rule-strong);
  overflow-y: auto;
  z-index: 101;
  animation: slideIn .25s cubic-bezier(.2,.8,.2,1);
  padding: 32px 40px 80px;
}
@media (max-width: 720px) { .overlay-panel { padding: 24px 20px 60px; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.overlay-close {
  display: inline-flex; gap: 8px; align-items: center;
  font-size: 12px; color: var(--muted);
  margin-bottom: 32px;
}
.overlay-close:hover { color: var(--accent); }
.overlay-eyebrow {
  font-size: 11px; color: var(--muted); margin-bottom: 10px;
}
.overlay-eyebrow .accent { color: var(--accent); }
.overlay-title {
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
}
.overlay-blurb {
  font-size: 14px; color: var(--muted); line-height: 1.7;
  margin: 0 0 28px; text-wrap: pretty;
}
.overlay-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 32px;
}
.ov-metric { }
.ov-metric .val { font-size: 26px; font-weight: 600; color: var(--accent); letter-spacing: -0.02em; }
.ov-metric .lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }

.overlay-placeholder {
  border: 1px dashed var(--rule-strong);
  padding: 24px;
  margin-bottom: 32px;
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
  background-image: repeating-linear-gradient(
    45deg,
    transparent, transparent 8px,
    color-mix(in oklab, var(--fg) 3%, transparent) 8px,
    color-mix(in oklab, var(--fg) 3%, transparent) 9px
  );
  font-size: 11px; color: var(--muted);
  text-align: center;
  line-height: 1.8;
}
.overlay-placeholder b { color: var(--fg); display: block; font-weight: 500; margin-bottom: 4px; }

.overlay-section { margin-bottom: 28px; }
.overlay-section h3 {
  font-size: 12px; color: var(--muted); font-weight: 500;
  margin: 0 0 10px; letter-spacing: 0.02em;
}
.overlay-section h3::before { content: "// "; color: var(--accent); }
.overlay-section p, .overlay-section li { font-size: 13px; line-height: 1.7; text-wrap: pretty; }
.overlay-section ul { list-style: none; padding: 0; margin: 0; }
.overlay-section ul li { padding: 4px 0 4px 18px; position: relative; }
.overlay-section ul li::before { content: "─"; position: absolute; left: 0; top: 4px; color: var(--accent); }

.stack-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; }

/* Footer */
.footer {
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 56px;
  background: var(--bg);
  margin-top: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) { .footer { grid-template-columns: 1fr; padding: 32px 24px; border-radius: 20px; } }
.footer-cta h2 {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  line-height: 1.15;
}
.footer-cta p { font-size: 13px; color: var(--muted); margin: 0 0 20px; max-width: 40ch; text-wrap: pretty; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.footer-links a {
  display: inline-flex; justify-content: space-between; align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--rule);
}
.footer-links a:hover { border-color: var(--accent); color: var(--accent); }
.footer-links .arr { color: var(--faint); transition: transform .2s; }
.footer-links a:hover .arr { transform: translateX(4px); color: var(--accent); }
.colophon {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--faint);
  padding-top: 32px;
  margin-top: 16px;
  border-top: 1px dashed var(--rule);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* Terminal easter egg */
.term {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: min(480px, 92vw);
  max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  box-shadow: 0 20px 60px -20px color-mix(in oklab, black 40%, transparent);
  z-index: 200;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  animation: termIn .2s ease;
  overflow: hidden;
}
@keyframes termIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in oklab, var(--fg) 4%, var(--surface));
  font-size: 11px;
  color: var(--muted);
}
.term-dots { display: flex; gap: 6px; }
.term-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rule-strong); }
.term-title { flex: 1; text-align: center; font-size: 11px; }
.term-close { color: var(--muted); }
.term-close:hover { color: var(--accent); }
.term-body { padding: 14px; overflow-y: auto; flex: 1; font-size: 12px; line-height: 1.6; }
.term-line { white-space: pre-wrap; }
.term-line.user { color: var(--fg); }
.term-line.out { color: var(--muted); }
.term-line.accent { color: var(--accent); }
.term-input-row { display: flex; gap: 8px; align-items: baseline; padding-top: 4px; }
.term-input-row .prompt-arrow { color: var(--accent); }
.term-input { flex: 1; background: none; border: 0; outline: none; color: var(--fg); font: inherit; padding: 2px 0; }
.term-hint { font-size: 10px; color: var(--faint); padding: 6px 12px; border-top: 1px solid var(--rule); }

/* Cursor crosshair on project rows */
.proj-row::after {
  content: "";
  pointer-events: none;
  position: absolute;
  width: 1px; height: 0;
  background: var(--accent);
  left: var(--mx, 0);
  top: 0; bottom: 0;
  opacity: 0;
  transition: opacity .12s;
}
.proj-row:hover::after { opacity: 0.3; height: 100%; }

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* === Tweaks === */
html.fatter-headline .hero h1 {
  font-weight: 800;
  letter-spacing: -0.035em;
}
html.hide-chibi .hero-chibi { display: none; }
html.hide-planet .hero-visual { display: none; }

.tweaks-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 300px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.08);
  z-index: 9999;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.tweaks-head { padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px dashed var(--rule); }
.tweaks-title { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
.tweaks-title::before { content: "◆ "; color: var(--accent); }
.tweaks-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }

.tweak-group { margin-bottom: 16px; }
.tweak-group:last-child { margin-bottom: 0; }
.tweak-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.tweak-val { float: right; color: var(--fg); font-weight: 500; text-transform: none; letter-spacing: 0; }

.tweak-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.tw-swatch {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--rule) inset;
  cursor: pointer;
  transition: transform .12s, border-color .12s;
}
.tw-swatch:hover { transform: scale(1.08); }
.tw-swatch.active { border-color: var(--fg); box-shadow: 0 0 0 1px var(--bg) inset; }

.tweaks-panel input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.tweaks-panel input[type="text"],
.tweaks-panel textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--fg);
  font: inherit;
  font-size: 11px;
  resize: vertical;
  outline: none;
}
.tweaks-panel input[type="text"]:focus,
.tweaks-panel textarea:focus { border-color: var(--accent); }

.tweak-checks { display: flex; flex-direction: column; gap: 8px; }
.tweak-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 11px; }
.tweak-check input { accent-color: var(--accent); }
