/* ==========================================================================
   lpb-site — GitHub-themed portfolio
   Implemented from the Claude Design handoff (LPB.dc.html).
   ========================================================================== */

/* ---------- base ---------- */

/* Theme variables — default theme: tokyo night; main.js swaps them all on pick.

   Shell    --bg page, --bg1 surfaces, --bd every hairline (borders AND rules),
            --fg/--fg1/--fg2 text tones (all three clear WCAG AA on --bg).
   Accent   --ac = pal[4], --acMid = pal[2], --acDim = quiet accent that still
            clears AA (hashes, prompt path, quote mark),
            --l1..--l3 = graph levels 1-3 (level 0 = --bg1, level 4 = --ac).
   Chrome   --guide-* = design-tool blue (guides, handles, inspect chip); stays
            blue in every theme, darkened on light shells. --sk-hi = skeleton
            shimmer highlight.

   Scales   type    10 / 11 / 12 / 13 / 14 / 15 + display clamp
            leading 1.5 tight · 1.7 default · 1.9 relaxed
            space   layout on 8px, component padding on 4px
            radius  2 micro · 6 surfaces · 999 pills */
:root {
  --bg: #1a1b26;
  --bg0: #0e0f15;
  --bg1: #24283b;
  --term-w: 940px;
  --bd: #363b54;
  --fg: #e6edf3;
  --fg1: #9aa5ce;
  --fg2: #7b84a5;
  --ac: #a9c1fa;
  --acMid: #3d59a1;
  --acDim: #7685ae;
  --l1: #232e52;
  --l2: #3d59a1;
  --l3: #7aa2f7;
  --guide-rgb: 88 166 255;
  --guide-solid: #2f81f7;
  --guide-text: #58a6ff;
  --sk-hi: rgba(240, 244, 250, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg0);
  color: var(--fg);
  font-family: 'IBM Plex Mono', monospace;
}
a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--ac); }

/* ---------- keyframes ---------- */

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes cellIn { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
@keyframes kern { 0% { letter-spacing: 0.22em; filter: blur(10px); opacity: 0; } 100% { letter-spacing: -0.03em; filter: blur(0); opacity: 1; } }
@keyframes guideV { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes guideH { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes guideOut { to { opacity: 0; } }
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@property --wc { syntax: '<integer>'; inherits: false; initial-value: 0; }
@keyframes wtick { from { --wc: 0; } to { --wc: 860; } }
@keyframes loaderOut { to { opacity: 0; visibility: hidden; } }
@keyframes dragGrow {
  0% { width: 96px; transform: translate(-14px, -9px); }
  45% { width: calc(min(252px, 60vw) * 0.6); transform: translate(7px, 4px); }
  88% { width: calc(min(252px, 60vw) + 10px); transform: translate(-3px, -1px); }
  100% { width: min(252px, 60vw); transform: translate(0, 0); }
}
/* mobile variant: same grow, no drag offsets — the box stays centered */
@keyframes dragGrowM {
  0% { width: 96px; transform: none; }
  45% { width: calc(min(252px, 60vw) * 0.6); transform: none; }
  88% { width: calc(min(252px, 60vw) + 10px); transform: none; }
  100% { width: min(252px, 60vw); transform: none; }
}
@keyframes handlePulse {
  0%, 100% { transform: scale(1); box-shadow: none; }
  20%, 75% { transform: scale(1.9); box-shadow: 0 0 10px rgb(var(--guide-rgb) / 0.8); }
  48% { transform: scale(1.5); box-shadow: 0 0 6px rgb(var(--guide-rgb) / 0.55); }
}
@keyframes dimBadge { 0%, 100% { opacity: 0; } 15%, 85% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes whoIn { 0%, 45% { opacity: 0; transform: translateX(-8px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes wordIn { 0% { opacity: 0; } 55% { opacity: 0.35; } 100% { opacity: 1; } }
@keyframes shimmer { 0% { background-position: 180% 0; } 100% { background-position: -180% 0; } }

/* ---------- loader: frame drawn, dragged out to w:860, skeleton fills in ---------- */

.loader {
  position: fixed; inset: 0; background: var(--bg); z-index: 50;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  animation: loaderOut 0.6s ease 3.35s forwards;
}
.loader-frame {
  position: relative; width: min(252px, 60vw); aspect-ratio: 860 / 470;
  animation: dragGrow 1.25s cubic-bezier(0.3, 1, 0.35, 1) 1.5s both;
}
.lg { position: absolute; background: rgb(var(--guide-rgb) / 0.9); }
.lg-top { top: 0; left: 0; right: 0; height: 1px; transform-origin: left; animation: guideH 0.45s cubic-bezier(0.45, 0, 0.15, 1) 0.1s both; }
.lg-right { top: 0; bottom: 0; right: 0; width: 1px; transform-origin: top; animation: guideV 0.38s cubic-bezier(0.45, 0, 0.15, 1) 0.42s both; }
.lg-bottom { bottom: 0; left: 0; right: 0; height: 1px; transform-origin: right; animation: guideH 0.45s cubic-bezier(0.45, 0, 0.15, 1) 0.72s both; }
.lg-left { top: 0; bottom: 0; left: 0; width: 1px; transform-origin: bottom; animation: guideV 0.38s cubic-bezier(0.45, 0, 0.15, 1) 1.02s both; }
.lh { position: absolute; width: 5px; height: 5px; background: var(--bg); border: 1px solid var(--guide-solid); }
.lh-tl { top: -3px; left: -3px; animation: pop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1) 1.25s both; }
.lh-tr { top: -3px; right: -3px; animation: pop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1) 1.32s both; }
.lh-br { bottom: -3px; right: -3px; animation: pop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1) 1.39s both, handlePulse 1.2s ease 1.5s both; }
.lh-bl { bottom: -3px; left: -3px; animation: pop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1) 1.46s both; }
.loader-dim {
  position: absolute; bottom: -22px; right: -6px;
  font-size: 10px; letter-spacing: 0.08em; color: var(--guide-text);
  background: color-mix(in srgb, var(--bg) 90%, transparent); border: 1px solid rgb(var(--guide-rgb) / 0.45);
  border-radius: 2px; padding: 2px 8px;
  animation: dimBadge 1.5s ease 1.45s both;
}
.loader-dim::after { content: ' \00d7 470'; }
.loader-wcount {
  position: absolute; top: calc(100% + 16px); left: 0; right: 0; text-align: center;
  font-size: 11px; letter-spacing: 0.12em; color: rgb(var(--guide-rgb) / 0.8);
  counter-reset: wc var(--wc);
  animation: wtick 1.25s cubic-bezier(0.3, 1, 0.35, 1) 1.5s both, fadeIn 0.3s ease 0.1s both;
}
.loader-wcount::after { content: counter(wc); }
.sk { position: absolute; border-radius: 2px; background-size: 220% 100%; }
.sk-1 {
  top: 10%; left: 8%; width: 20%; height: 5%;
  background: linear-gradient(100deg, rgba(125, 133, 144, 0.22) 40%, rgba(125, 133, 144, 0.4) 50%, rgba(125, 133, 144, 0.22) 60%);
  background-size: 220% 100%;
  animation: fadeIn 0.45s ease 2.35s both, shimmer 2s linear 2.5s infinite;
}
.sk-2 {
  top: 24%; left: 8%; width: 46%; height: 11%;
  background: linear-gradient(100deg, rgba(125, 133, 144, 0.28) 40%, rgba(125, 133, 144, 0.48) 50%, rgba(125, 133, 144, 0.28) 60%);
  background-size: 220% 100%;
  animation: fadeIn 0.45s ease 2.45s both, shimmer 2s linear 2.5s infinite;
}
.sk-3 {
  top: 39%; left: 8%; width: 68%; height: 11%;
  background: linear-gradient(100deg, rgba(125, 133, 144, 0.28) 40%, rgba(125, 133, 144, 0.48) 50%, rgba(125, 133, 144, 0.28) 60%);
  background-size: 220% 100%;
  animation: fadeIn 0.45s ease 2.55s both, shimmer 2s linear 2.5s infinite;
}
.sk-stripes {
  top: 60%; left: 8%; right: 8%; height: 16%;
  background: linear-gradient(100deg, transparent 40%, var(--sk-hi) 50%, transparent 60%), repeating-linear-gradient(90deg, rgba(125, 133, 144, 0.3) 0, rgba(125, 133, 144, 0.3) 3px, transparent 3px, transparent 6px);
  background-size: 220% 100%, auto;
  animation: fadeIn 0.5s ease 2.65s both, shimmer 2s linear 2.5s infinite;
}
.sk-4 {
  top: 84%; left: 8%; width: 34%; height: 5%;
  background: linear-gradient(100deg, rgba(125, 133, 144, 0.19) 40%, rgba(125, 133, 144, 0.34) 50%, rgba(125, 133, 144, 0.19) 60%);
  background-size: 220% 100%;
  animation: fadeIn 0.45s ease 2.75s both, shimmer 2s linear 2.5s infinite;
}

/* ---------- resize wireframe overlay (toggled by JS) ---------- */

.wire { position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: 0; transition: opacity 0.3s ease; }
.wire.on { opacity: 1; }
.wire-l { position: absolute; top: 0; bottom: 0; left: max(4px, calc(50% - 484px)); width: 1px; background: rgb(var(--guide-rgb) / 0.32); }
.wire-r { position: absolute; top: 0; bottom: 0; right: max(4px, calc(50% - 484px)); width: 1px; background: rgb(var(--guide-rgb) / 0.32); }
.wire-t { position: absolute; left: 0; right: 0; top: 56px; height: 1px; background: rgb(var(--guide-rgb) / 0.22); }
.wire-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 10px; letter-spacing: 0.1em; color: var(--guide-text);
  background: color-mix(in srgb, var(--bg) 85%, transparent); border: 1px solid rgb(var(--guide-rgb) / 0.45);
  padding: 4px 12px; border-radius: 2px;
}

/* ---------- one-time layout guides after load ---------- */

.intro { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.intro-l {
  position: absolute; top: 0; bottom: 0; left: max(4px, calc(50% - 484px)); width: 1px;
  background: rgb(var(--guide-rgb) / 0.28); transform-origin: top;
  animation: guideV 1.1s cubic-bezier(0.16, 1, 0.3, 1) 3.5s both, guideOut 0.9s ease 5.8s forwards;
}
.intro-r {
  position: absolute; top: 0; bottom: 0; right: max(4px, calc(50% - 484px)); width: 1px;
  background: rgb(var(--guide-rgb) / 0.28); transform-origin: bottom;
  animation: guideV 1.1s cubic-bezier(0.16, 1, 0.3, 1) 3.6s both, guideOut 0.9s ease 5.8s forwards;
}
.intro-t {
  position: absolute; left: 0; right: 0; top: 56px; height: 1px;
  background: rgb(var(--guide-rgb) / 0.2); transform-origin: left;
  animation: guideH 1.3s cubic-bezier(0.16, 1, 0.3, 1) 3.7s both, guideOut 0.9s ease 5.8s forwards;
}
.intro-h { position: absolute; top: 52px; width: 7px; height: 7px; background: var(--bg); border: 1px solid var(--guide-solid); }
.intro-h1 { left: max(0px, calc(50% - 488px)); animation: pop 0.35s cubic-bezier(0.16, 1, 0.3, 1) 4.5s both, guideOut 0.9s ease 5.8s forwards; }
.intro-h2 { right: max(0px, calc(50% - 488px)); animation: pop 0.35s cubic-bezier(0.16, 1, 0.3, 1) 4.6s both, guideOut 0.9s ease 5.8s forwards; }
.intro-label {
  /* narrow windows: above the rule, right edge on the guide */
  position: absolute; right: max(24px, calc(50% - 484px)); top: 32px; text-align: right;
  white-space: nowrap;
  font-size: 10px; letter-spacing: 0.1em; color: rgb(var(--guide-rgb) / 0.75);
  animation: pop 0.4s ease 4.7s both, guideOut 0.9s ease 5.8s forwards;
}

/* Once there's room beside the window, the readout drops into the vertex's
   bottom-right quadrant — below the rule, right of the vertical guide. */
@media (min-width: 1400px) {
  .intro-label { left: calc(50% + 492px); right: auto; top: 64px; text-align: left; }
}

/* ---------- page layout ---------- */

.page {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 72px 24px 72px;
  position: relative;
}
/* ---------- terminal window ---------- */

.term {
  width: 100%; max-width: var(--term-w);
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.term-bar {
  display: flex; align-items: center; gap: 16px;
  height: 44px; padding: 0 16px;
  background: var(--bg1);
  border-bottom: 1px solid var(--bd);
  border-radius: 11px 11px 0 0;
}
.tl { display: flex; gap: 8px; }
.tl i { width: 12px; height: 12px; border-radius: 999px; display: block; }
.tl-r { background: #ff5f57; }
.tl-y { background: #febc2e; }
.tl-g { background: #28c840; }
.term-title { font-size: 12px; color: var(--fg1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the shell prompt that sits below the window */
.term-prompt {
  width: 100%; max-width: var(--term-w); margin-top: 24px;
  padding: 0 40px; font-size: 13px; color: var(--fg1);
  display: flex; gap: 8px; align-items: baseline;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 4.3s both;
}

.col { width: 100%; max-width: none; padding: 48px 40px 0; display: flex; flex-direction: column; gap: 112px; }
main { display: flex; flex-direction: column; gap: 112px; }

/* Sections rise in on load; during a live resize they get a dashed outline. */
.rise {
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--rise-d, 3.35s) both;
  outline: none; outline-offset: 14px;
}
.wire-mode .rise { outline: 1px dashed rgb(var(--guide-rgb) / 0.45); }

/* Hatched visualization of the 112px section gap, shown once during load. */
.hatch { position: relative; }
.hatch::before {
  content: ''; position: absolute; left: 0; right: 0; top: -96px; height: 80px; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgb(var(--guide-rgb) / 0.06) 0, rgb(var(--guide-rgb) / 0.06) 5px, transparent 5px, transparent 11px);
  border-top: 1px dashed rgb(var(--guide-rgb) / 0.14);
  border-bottom: 1px dashed rgb(var(--guide-rgb) / 0.14);
  animation: fadeIn 0.5s ease var(--hatch-d, 4.7s) both, guideOut 0.8s ease 5.8s forwards;
}

/* Design-tool hover chrome: frame outlines + inspect chip + guest cursor.
   Hover-capable pointers only — touch taps would leave them stuck on. */
@media (hover: hover) and (pointer: fine) {
  [data-frame]:hover { outline: 1px solid rgb(var(--guide-rgb) / 0.55); }
}
@media (hover: none) {
  .inspect-chip { display: none; }
}
.inspect-chip {
  position: fixed; left: 0; top: 0; z-index: 46; pointer-events: none;
  opacity: 0; transition: opacity 0.2s ease;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.05em;
  background: var(--guide-solid); color: #ffffff; padding: 4px 8px; border-radius: 2px; white-space: nowrap;
}
.mp-cursor {
  position: fixed; left: 0; top: 0; z-index: 45; pointer-events: none;
  transform: translate(-60px, 200px); opacity: 0;
  transition: transform 3.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.7s ease;
}
.mp-cursor svg { display: block; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55)); }
.mp-label {
  position: absolute; left: 16px; top: 20px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
  background: var(--ac); color: var(--bg); padding: 4px 8px; border-radius: 2px;
  white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* ---------- theme picker ---------- */

/* lives in the window titlebar, pinned right */
.theme-ctl { margin-left: auto; z-index: 30; }
.theme-wrap { position: relative; display: flex; flex-direction: column; align-items: flex-end; }
.theme-btn {
  display: flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); border: 1px solid var(--bd); border-radius: 6px;
  padding: 8px 12px; cursor: pointer;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--fg1); letter-spacing: 0.06em;
}
.theme-btn:hover { border-color: var(--ac); color: var(--fg); }
.theme-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--ac); display: inline-block; }
.theme-caret { font-size: 10px; color: var(--fg2); }
.theme-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 31; width: max-content;
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--bd); border-radius: 6px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.theme-menu[hidden] { display: none; }
.theme-item {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  background: transparent; border: none; padding: 8px 16px; cursor: pointer;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--fg); letter-spacing: 0.06em; text-align: left;
}
.theme-item:hover, .theme-item[aria-selected="true"] { background: var(--bg1); }
.theme-item .swatch { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* ---------- header ---------- */

header { display: flex; flex-direction: column; gap: 24px; }
.prompt { font-size: 13px; color: var(--fg1); display: flex; gap: 8px; align-items: baseline; }
.p-user { color: var(--ac); }
.p-path { color: var(--acDim); }
.p-cmd { color: var(--fg); }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--ac); animation: blink 1.1s step-end infinite; align-self: center; }
.cursor-sm { width: 7px; height: 13px; }
.name {
  margin: 0; font-size: clamp(34px, 9.5vw, 56px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.05;
  animation: kern 1.5s cubic-bezier(0.16, 1, 0.3, 1) 3.45s both;
}
.tagline { margin: 0; font-size: 15px; color: var(--fg1); line-height: 1.7; }
.tagline .hi { color: var(--fg); }
.maket { color: var(--ac); }

/* $ cat about.md — expandable intro, revealed word by word */
.about { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.about-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: lowercase; color: var(--fg1);
  display: flex; gap: 8px; align-items: baseline; align-self: flex-start;
}
.about-btn:hover { color: var(--fg); }
.about-body { font-size: 13px; color: var(--fg1); line-height: 1.9; width: 100%; }
.about-body p { margin: 0; }
.about-body .w { animation: wordIn 0.7s ease both; }

/* ---------- contribution graph ---------- */

.graph { display: flex; flex-direction: column; gap: 16px; }
.graph-grid {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); grid-auto-columns: 1fr;
  gap: clamp(1px, 0.47vw, 4px);
  width: 100%; aspect-ratio: 860 / 110;
}
/* fill-mode backwards (not both): once cellIn ends the transform is released,
   so the hover scale can take effect. */
.cell { border-radius: clamp(1px, 0.27vw, 2px); animation: cellIn 0.4s ease-out backwards; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.cell:hover { transform: scale(1.45); box-shadow: 0 0 10px color-mix(in srgb, var(--ac) 55%, transparent); }
.lv-0 { background: var(--bg1); }
.lv-1 { background: var(--l1); }
.lv-2 { background: var(--l2); }
.lv-3 { background: var(--l3); }
.lv-4 { background: var(--ac); }
.graph-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--fg1); flex-wrap: wrap; gap: 8px; }
.legend { display: flex; align-items: center; gap: 4px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw-0 { background: var(--bg1); }
.sw-1 { background: var(--l1); }
.sw-2 { background: var(--l2); }
.sw-3 { background: var(--l3); }
.sw-4 { background: var(--ac); }

/* ---------- experience ---------- */

.cmd { margin: 0 0 32px; font-size: 13px; font-weight: 500; color: var(--fg1); letter-spacing: 0.12em; text-transform: lowercase; }
.commits { display: flex; flex-direction: column; }
.commit {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px 16px;
  align-items: baseline; padding: 16px 0; position: relative;
}
.commit-rule {
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--bd);
  transform-origin: left;
  animation: guideH 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--line-d, 2.75s) both;
}
.commit-rule.static { animation: none; }
.hash { font-size: 13px; color: var(--acDim); }
.commit-mid { font-size: 14px; line-height: 1.5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.co-line { display: inline-flex; align-items: center; gap: 8px; }
.sep { color: var(--fg1); }
.co { font-weight: 600; }
.badge-acq {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em; color: var(--ac);
  border: 1px solid var(--acMid); background: color-mix(in srgb, var(--ac) 10%, transparent);
  border-radius: 999px; padding: 2px 8px;
}
.place { font-size: 12px; color: var(--fg1); text-align: right; }
/* muted one-liner: CV blurb under a role, and the side-quest descriptions */
.blurb, .repo-desc { font-size: 12px; line-height: 1.7; color: var(--fg1); }
.blurb { grid-column: 2 / -1; }

/* ---------- side quests ---------- */

.repo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.repo {
  border: 1px solid var(--bd); border-radius: 6px; padding: 24px;
  display: flex; flex-direction: column; gap: 8px; background: var(--bg);
  cursor: grab;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.repo:hover { border-color: var(--ac); }
.repo.dragging {
  border: 1px dashed color-mix(in srgb, var(--ac) 55%, transparent);
  background: color-mix(in srgb, var(--ac) 4%, var(--bg));
  transform: scale(0.98);
}
.repo-name, .repo-role, .repo-desc { transition: opacity 0.2s ease; }
.repo.dragging .repo-name, .repo.dragging .repo-role, .repo.dragging .repo-desc { opacity: 0.25; }
.repo-name { font-size: 14px; font-weight: 600; color: var(--ac); }
.repo-role { font-size: 12px; color: var(--fg); letter-spacing: 0.04em; }

.repo-lang { font-size: 11px; color: var(--fg2); display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac); display: inline-block; }

/* ---------- kind words (testimonials behind a toggle) ---------- */

.kind { display: flex; flex-direction: column; gap: 0; }
.kind-btn {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 500;
  color: var(--fg1); letter-spacing: 0.12em; text-transform: lowercase; text-align: left;
  display: flex; gap: 16px; align-items: center; align-self: flex-start;
}
.kind-btn:hover { color: var(--fg); }
.kind-track {
  width: 30px; height: 16px; box-sizing: border-box; border-radius: 999px;
  border: 1px solid var(--bd); background: var(--bg1);
  position: relative; display: inline-block;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.kind-knob {
  position: absolute; top: 50%; left: 2px; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 999px; background: var(--fg2); transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}
.kind-btn[aria-pressed="true"] .kind-track { background: color-mix(in srgb, var(--ac) 25%, transparent); border-color: var(--acMid); }
.kind-btn[aria-pressed="true"] .kind-knob { background: var(--ac); transform: translateX(14px); }
.kind-quotes {
  border-left: 1px solid color-mix(in srgb, var(--ac) 50%, transparent);
  padding-left: 24px; margin-top: 32px;
  display: flex; flex-direction: column; gap: 12px;
}
.kind-quotes[hidden] { display: none; }
.quote-box { min-height: 168px; opacity: 1; transition: opacity 0.45s ease; }
.quote-box.out { opacity: 0; }
.quote-text { margin: 0 0 16px; font-size: 15px; line-height: 1.9; color: var(--fg); font-style: italic; }
.quote-text .w { animation: wordIn 0.9s ease both; }
.quote-who { margin: 0; font-size: 12px; color: var(--fg1); animation: whoIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.q-arrow { color: var(--acDim); }
.qdots { display: flex; gap: 12px; }
/* keyboard focus — one visible treatment for every control */
.theme-btn:focus-visible, .theme-item:focus-visible, .about-btn:focus-visible,
.kind-btn:focus-visible, .qdot:focus-visible, a:focus-visible {
  outline: 2px solid var(--ac); outline-offset: 3px;
}
.qdot { width: 12px; height: 12px; border-radius: 2px; background: var(--bd); border: none; padding: 0; cursor: pointer; position: relative; }
/* 24x24 touch target without growing the dot (WCAG 2.5.8) */
.qdot::after { content: ''; position: absolute; inset: -6px; }
.qdot[aria-current="true"] { background: var(--ac); }

/* ---------- footer ---------- */

footer { display: flex; flex-direction: column; gap: 24px; border-top: 1px solid var(--bd); padding: 48px 0 64px; }
.foot-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px 32px; font-size: 13px; }
.foot-links a { color: var(--fg); }
.g { color: var(--ac); }
.mut { color: var(--fg1); }
.copyright { margin-left: auto; color: var(--fg2); }

/* ---------- mobile (design-native breakpoint: 640px) ---------- */

@media (max-width: 639px) {
  .page { padding: 24px 8px 40px; }
  .term { border-radius: 10px; }
  /* right padding trimmed so the toggle's inset matches its top/bottom gap */
  .term-bar { height: 40px; padding: 0 8px 0 12px; gap: 10px; border-radius: 9px 9px 0 0; }
  .term-title { display: none; }
  .tl i { width: 10px; height: 10px; }
  .col { padding: 24px 12px 0; }
  .term-prompt { padding: 0 12px; margin-top: 16px; }
  .col, main { gap: 72px; }
  /* Theme button: name written out, inline with the whoami row, right-aligned.
     The --theme= prefix stays hidden so it clears the prompt text. */
  .theme-prefix { display: none; }
  .theme-btn { padding: 6px 10px; font-size: 10px; }
  .theme-dot { width: 8px; height: 8px; }
  .theme-item { padding: 12px 16px; font-size: 12px; }
  .theme-item .swatch { width: 11px; height: 11px; }
  /* Loader box stays dead-center (no drag offsets at phone scale). */
  .loader-frame { animation-name: dragGrowM; }
  /* Guide/wire rule sits 14px above content top (52px), like desktop's 72/58. */
  /* only the side guides survive at phone width — the window carries the structure */
  .intro-t, .wire-t, .intro-h, .intro-label { display: none; }
  /* Graph abstraction: last 24 weeks only, so cells read larger than the legend. */
  .graph-grid { aspect-ratio: 24 / 7; gap: 3px; }
  .graph-grid .cell:nth-child(-n+203) { display: none; }
  /* Gap hatch is sized for the 112px desktop gap; refit it to the 72px one
     so it stays inside the gap instead of reaching into the section above. */
  .hatch::before { top: -60px; height: 48px; }
  /* Rows get a top rule so each log starts on a line. */
  .commits { border-top: 1px solid var(--bd); }
  /* Experience/education rows: company bold (badge beside it), role below,
     hash trailing the company line like a git ref so content runs full-width. */
  .commit { grid-template-columns: minmax(0, 1fr) auto; }
  .commit-mid { flex-direction: column; align-items: flex-start; gap: 6px; grid-column: 1; grid-row: 1; }
  .commit-mid .sep { display: none; }
  .commit-mid .co-line { order: -1; }
  .hash { grid-column: 2; grid-row: 1; text-align: right; }
  .place, .blurb { grid-column: 1 / -1; }
  .place { text-align: left; }
  /* Footer: commands become full-width chips in the card language;
     no separator rule above — the chips carry the structure. */
  .foot-links { flex-direction: column; align-items: stretch; gap: 8px; }
  .foot-links a { display: block; border: 1px solid var(--bd); border-radius: 6px; padding: 12px 16px; }
  .copyright { margin: 24px 0 0; align-self: center; } /* +8px flex gap = 32 above, matching the 32 below */
  footer { padding: 8px 0 32px; border-top: none; }
  .mp-cursor { display: none; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .loader, .intro { display: none; }
  .hatch::before { display: none; }
  .rise, .name, .cell, .commit-rule, .cursor, .theme-ctl, .quote-box, .quote-who, .w { animation: none; }
  .repo, .about-caret { transition: none; }
  .mp-cursor { display: none; }
}
