/* Terminal-window theme. System monospace stack only — no font/CDN requests. */

:root {
  --bg: #0d1117;
  --bg-titlebar: #161b22;
  --bg-card: #11161d;
  --text: #c9d1d9;
  --text-dim: #8b949e;
  --accent: #58a6ff;
  --accent-green: #3fb950;
  --accent-red: #f85149;
  --accent-yellow: #d29922;
  --border: #30363d;
}

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

body {
  background: #010409;
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.6;
  padding: 32px 16px;
}

.terminal {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.titlebar {
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
}

.titlebar-text {
  color: var(--text-dim);
  font-size: 0.85em;
}
.titlebar-text::before {
  content: ">_ ";
  color: var(--accent-green);
}

.content {
  padding: 32px 28px 40px;
}

.topnav {
  color: var(--text-dim);
  font-size: 0.9em;
  margin-bottom: 28px;
}
.topnav a {
  color: var(--accent);
  text-decoration: none;
}
.topnav a:hover { text-decoration: underline; }

header.hero {
  margin-bottom: 36px;
}

header.hero h1 {
  font-size: 1.8em;
  color: var(--text);
}

header.hero h1 .cursor {
  display: inline-block;
  color: var(--accent-green);
  animation: blink 1s step-end infinite;
}

header.hero .subtitle {
  color: var(--text-dim);
  margin-top: 6px;
}

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

section {
  margin-bottom: 40px;
}

h2 {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.prompt {
  color: var(--accent-green);
  margin-right: 4px;
}

section p {
  color: var(--text-dim);
}

.project {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.project:hover {
  border-color: var(--accent);
  background: #151b23;
}

.project h3 {
  color: var(--text);
  font-size: 1.05em;
  margin-bottom: 6px;
}

.project .ext-icon {
  color: var(--accent);
  font-size: 0.85em;
}

.project p {
  margin-bottom: 0;
}

.ls-list {
  font-family: inherit;
  font-size: 0.88em;
  line-height: 1.7;
  color: var(--text-dim);
  white-space: pre;
  overflow-x: auto;
}

.ls-name-dir {
  color: var(--accent-green);
  text-decoration: none;
}
.ls-name-dir:hover { text-decoration: underline; }

.ls-name-file {
  color: var(--text-dim);
}

.ls-series-description {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.series-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 32px;
  font-size: 0.9em;
}
.series-nav a { color: var(--accent); text-decoration: none; }
.series-nav a:hover { text-decoration: underline; }
.series-nav-label { color: var(--text-dim); text-align: center; flex: 1; }
.series-nav-prev, .series-nav-next { flex-shrink: 0; }

.view-all {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9em;
}
.view-all:hover { text-decoration: underline; }

.contact-links {
  list-style: none;
}
.contact-links li { margin-bottom: 8px; }
.contact-links a {
  color: var(--accent);
  text-decoration: none;
}
.contact-links a:hover { text-decoration: underline; }
.contact-links .key { color: var(--text-dim); margin-right: 8px; }

footer.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  color: var(--text-dim);
  font-size: 0.85em;
}

/* article page content */
.article-body h2 { font-size: 1.3em; margin-top: 28px; }
.article-body h3 { font-size: 1.1em; margin-top: 20px; margin-bottom: 8px; }
.article-body p { color: var(--text); margin-bottom: 14px; }
.article-body ul, .article-body ol { color: var(--text); margin: 0 0 14px 24px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  border-left: 3px solid var(--border);
  color: var(--text-dim);
  padding-left: 14px;
  margin-bottom: 14px;
}
.article-body pre {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  overflow-x: auto;
  margin-bottom: 14px;
}
.article-body code {
  font-family: inherit;
  background: #010409;
  padding: 2px 5px;
  border-radius: 3px;
}
.article-body pre code {
  padding: 0;
  background: none;
}
.article-body a { color: var(--accent); }
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}
.article-meta {
  color: var(--text-dim);
  font-size: 0.9em;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  body { padding: 16px 8px; font-size: 15px; }
  .content { padding: 24px 18px 32px; }
  .titlebar-text { display: none; }
  .series-nav { flex-wrap: wrap; }
  .series-nav-label { order: 3; flex-basis: 100%; }
}

/* corner dancer easter egg — injected by js/dance-character.js, desktop only.
   js cycles the [data-move] attribute through a set of routines at random.
   Clicking it runs the character over to duck behind the terminal window
   (see .is-hidden-behind / .is-running) instead of dismissing it. */
.dance-guy {
  position: fixed;
  right: 26px;
  bottom: 0;
  width: 60px;
  height: 84px;
  z-index: 999;
  transform: translateY(115%);
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    right 0.6s ease-in-out,
    bottom 0.6s ease-in-out;
  pointer-events: none;
  cursor: pointer;
}
.dance-guy.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}
.dance-guy.is-hidden-behind {
  z-index: -1;
}

/* -- idle breathing/sway while parked peeking out from behind the wall —
   smooth easing (no steps()), unlike the snappy dance-beat animations, so
   it reads as a calm, alive idle rather than another dance move. -- */
.dance-guy.is-peeking .dance-guy-figure { animation: peek-sway 3.2s ease-in-out infinite; }
.dance-guy.is-peeking .dance-guy-torso { animation: peek-breathe 2.6s ease-in-out infinite; }
.dance-guy.is-peeking .dance-guy-head { animation: peek-head 2.8s ease-in-out infinite; }

@keyframes peek-sway {
  0%, 100% { transform: translateX(-50%) rotate(-1.5deg); }
  50% { transform: translateX(-50%) rotate(1.5deg); }
}
@keyframes peek-breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.05); }
}
@keyframes peek-head {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
}

/* -- salto: a tucked flip thrown in occasionally between dance moves (see
   nextMove/doSalto in js) — a jump arc with a full rotation on the figure,
   while arms/legs tuck in for the airborne portion and untuck on landing. -- */
.dance-guy.is-salto .dance-guy-figure { animation: salto-figure 0.75s cubic-bezier(0.45, 0, 0.55, 1) 1; }
.dance-guy.is-salto .dance-guy-arm--left { animation: salto-arm-left 0.75s ease-in-out 1; }
.dance-guy.is-salto .dance-guy-arm--right { animation: salto-arm-right 0.75s ease-in-out 1; }
.dance-guy.is-salto .dance-guy-leg--left { animation: salto-leg 0.75s ease-in-out 1; }
.dance-guy.is-salto .dance-guy-leg--right { animation: salto-leg 0.75s ease-in-out 1; }
.dance-guy.is-salto .dance-guy-leg--left .dance-guy-shin { animation: salto-shin 0.75s ease-in-out 1; }
.dance-guy.is-salto .dance-guy-leg--right .dance-guy-shin { animation: salto-shin 0.75s ease-in-out 1; }

@keyframes salto-figure {
  0% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  25% { transform: translateX(-50%) translateY(-26px) rotate(0deg); }
  75% { transform: translateX(-50%) translateY(-26px) rotate(360deg); }
  100% { transform: translateX(-50%) translateY(0) rotate(360deg); }
}
@keyframes salto-arm-left {
  0%, 100% { transform: rotate(0deg); }
  25%, 75% { transform: rotate(-120deg); }
}
@keyframes salto-arm-right {
  0%, 100% { transform: rotate(0deg); }
  25%, 75% { transform: rotate(120deg); }
}
@keyframes salto-leg {
  0%, 100% { transform: rotate(0deg); }
  25%, 75% { transform: rotate(70deg); }
}
@keyframes salto-shin {
  0%, 100% { transform: rotate(0deg); }
  25%, 75% { transform: rotate(-90deg); }
}

.dance-guy-shadow {
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 36px;
  height: 7px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  transform: translateX(-50%);
}

.dance-guy-figure {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 34px;
  height: 63px;
  transform: translateX(-50%);
}

.dance-guy-head {
  position: absolute;
  top: 0;
  left: 8px;
  width: 18px;
  height: 18px;
  background: var(--accent-green);
  transform-origin: bottom center;
}
.dance-guy-head::before,
.dance-guy-head::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 3px;
  height: 3px;
  background: var(--bg);
}
.dance-guy-head::before { left: 5px; }
.dance-guy-head::after { left: 10px; }

.dance-guy-torso {
  position: absolute;
  top: 18px;
  left: 7px;
  width: 20px;
  height: 24px;
  background: var(--accent-green);
  transform-origin: bottom center;
}

/* upper arm (shoulder joint) with a nested forearm (elbow joint) */
.dance-guy-arm {
  position: absolute;
  top: 19px;
  width: 6px;
  height: 11px;
  background: var(--accent-green);
  transform-origin: top center;
}
.dance-guy-arm--left { left: 0; }
.dance-guy-arm--right { right: 0; }
.dance-guy-forearm {
  position: absolute;
  top: 11px;
  left: 0;
  width: 6px;
  height: 11px;
  background: var(--accent-green);
  transform-origin: top center;
}

/* thigh (hip joint) with a nested shin (knee joint) */
.dance-guy-leg {
  position: absolute;
  top: 42px;
  width: 8px;
  height: 12px;
  background: var(--accent-green);
  transform-origin: top center;
}
.dance-guy-leg--left { left: 7px; }
.dance-guy-leg--right { right: 7px; }
.dance-guy-shin {
  position: absolute;
  top: 12px;
  left: 0;
  width: 8px;
  height: 12px;
  background: var(--accent-green);
  transform-origin: top center;
}

/* Tecktonik-style routine: a constant on-beat bounce (torso/head/knees)
   stays running underneath, while js swaps [data-move] every few seconds
   to change only the fast arm choreography on top of it — keeps every
   pattern reading as the same dance instead of jumping between unrelated
   ones. */
.dance-guy[data-move] .dance-guy-figure { animation: beat-figure 0.4s steps(2) infinite; }
.dance-guy[data-move] .dance-guy-head { animation: beat-head 0.4s steps(2) infinite; }
.dance-guy[data-move] .dance-guy-leg--left { animation: beat-thigh-left 0.4s steps(2) infinite; }
.dance-guy[data-move] .dance-guy-leg--right { animation: beat-thigh-right 0.4s steps(2) infinite; }
.dance-guy[data-move] .dance-guy-leg--left .dance-guy-shin { animation: beat-shin-left 0.4s steps(2) infinite; }
.dance-guy[data-move] .dance-guy-leg--right .dance-guy-shin { animation: beat-shin-right 0.4s steps(2) infinite; }

@keyframes beat-figure {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}
@keyframes beat-head { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes beat-thigh-left { 0%, 100% { transform: rotate(5deg); } 50% { transform: rotate(-3deg); } }
@keyframes beat-thigh-right { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(3deg); } }
@keyframes beat-shin-left { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(4deg); } }
@keyframes beat-shin-right { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(-4deg); } }

/* -- click-to-run: a quick sprint cycle while it dashes to/from hiding -- */
.dance-guy.is-running .dance-guy-figure { animation: run-figure 0.22s steps(2) infinite; }
.dance-guy.is-running .dance-guy-leg--left { animation: run-leg-left 0.22s steps(2) infinite; }
.dance-guy.is-running .dance-guy-leg--right { animation: run-leg-right 0.22s steps(2) infinite; }
.dance-guy.is-running .dance-guy-leg--left .dance-guy-shin { animation: run-shin-left 0.22s steps(2) infinite; }
.dance-guy.is-running .dance-guy-leg--right .dance-guy-shin { animation: run-shin-right 0.22s steps(2) infinite; }
.dance-guy.is-running .dance-guy-arm--left { animation: run-arm-left 0.22s steps(2) infinite; }
.dance-guy.is-running .dance-guy-arm--right { animation: run-arm-right 0.22s steps(2) infinite; }

@keyframes run-figure {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}
@keyframes run-leg-left { 0%, 100% { transform: rotate(45deg); } 50% { transform: rotate(-40deg); } }
@keyframes run-leg-right { 0%, 100% { transform: rotate(-40deg); } 50% { transform: rotate(45deg); } }
@keyframes run-shin-left { 0%, 100% { transform: rotate(-20deg); } 50% { transform: rotate(30deg); } }
@keyframes run-shin-right { 0%, 100% { transform: rotate(30deg); } 50% { transform: rotate(-20deg); } }
@keyframes run-arm-left { 0%, 100% { transform: rotate(-60deg); } 50% { transform: rotate(50deg); } }
@keyframes run-arm-right { 0%, 100% { transform: rotate(50deg); } 50% { transform: rotate(-60deg); } }

/* -- move: cross — forearms whip across the chest, alternating -- */
.dance-guy[data-move="cross"] .dance-guy-arm--left { animation: move-cross-arm-left 0.4s steps(2) infinite; }
.dance-guy[data-move="cross"] .dance-guy-arm--left .dance-guy-forearm { animation: move-cross-forearm-left 0.4s steps(2) infinite; }
.dance-guy[data-move="cross"] .dance-guy-arm--right { animation: move-cross-arm-right 0.4s steps(2) infinite; }
.dance-guy[data-move="cross"] .dance-guy-arm--right .dance-guy-forearm { animation: move-cross-forearm-right 0.4s steps(2) infinite; }

/* -- move: snap-up — one arm snaps overhead while the other pulls to the hip, then swap -- */
.dance-guy[data-move="snap-up"] .dance-guy-arm--left { animation: move-snap-arm-left 0.4s steps(2) infinite; }
.dance-guy[data-move="snap-up"] .dance-guy-arm--left .dance-guy-forearm { animation: move-snap-forearm-left 0.4s steps(2) infinite; }
.dance-guy[data-move="snap-up"] .dance-guy-arm--right { animation: move-snap-arm-right 0.4s steps(2) infinite; }
.dance-guy[data-move="snap-up"] .dance-guy-arm--right .dance-guy-forearm { animation: move-snap-forearm-right 0.4s steps(2) infinite; }

/* -- move: milky — a wide overhead sweep, alternating sides (the signature Tecktonik "milky move") -- */
.dance-guy[data-move="milky"] .dance-guy-arm--left { animation: move-milky-arm-left 0.6s steps(3) infinite; }
.dance-guy[data-move="milky"] .dance-guy-arm--left .dance-guy-forearm { animation: move-milky-forearm-left 0.6s steps(3) infinite; }
.dance-guy[data-move="milky"] .dance-guy-arm--right { animation: move-milky-arm-right 0.6s steps(3) infinite; }
.dance-guy[data-move="milky"] .dance-guy-arm--right .dance-guy-forearm { animation: move-milky-forearm-right 0.6s steps(3) infinite; }

/* -- move: chest-pop — both forearms snap to the chest and out, in unison -- */
.dance-guy[data-move="chest-pop"] .dance-guy-arm--left { animation: move-pop-arm-left 0.3s steps(2) infinite; }
.dance-guy[data-move="chest-pop"] .dance-guy-arm--left .dance-guy-forearm { animation: move-pop-forearm-left 0.3s steps(2) infinite; }
.dance-guy[data-move="chest-pop"] .dance-guy-arm--right { animation: move-pop-arm-right 0.3s steps(2) infinite; }
.dance-guy[data-move="chest-pop"] .dance-guy-arm--right .dance-guy-forearm { animation: move-pop-forearm-right 0.3s steps(2) infinite; }

/* -- move: point — sharp diagonal point, alternating sides -- */
.dance-guy[data-move="point"] .dance-guy-arm--left { animation: move-point-arm-left 0.4s steps(2) infinite; }
.dance-guy[data-move="point"] .dance-guy-arm--left .dance-guy-forearm { animation: move-point-forearm-left 0.4s steps(2) infinite; }
.dance-guy[data-move="point"] .dance-guy-arm--right { animation: move-point-arm-right 0.4s steps(2) infinite; }
.dance-guy[data-move="point"] .dance-guy-arm--right .dance-guy-forearm { animation: move-point-forearm-right 0.4s steps(2) infinite; }

@keyframes move-cross-arm-left { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(50deg); } }
@keyframes move-cross-forearm-left { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(-80deg); } }
@keyframes move-cross-arm-right { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(-50deg); } }
@keyframes move-cross-forearm-right { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(80deg); } }

@keyframes move-snap-arm-left { 0%, 100% { transform: rotate(-170deg); } 50% { transform: rotate(-10deg); } }
@keyframes move-snap-forearm-left { 0%, 100% { transform: rotate(-15deg); } 50% { transform: rotate(10deg); } }
@keyframes move-snap-arm-right { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(170deg); } }
@keyframes move-snap-forearm-right { 0%, 100% { transform: rotate(15deg); } 50% { transform: rotate(-10deg); } }

@keyframes move-milky-arm-left { 0%, 100% { transform: rotate(20deg); } 50% { transform: rotate(-170deg); } }
@keyframes move-milky-forearm-left { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-30deg); } }
@keyframes move-milky-arm-right { 0%, 100% { transform: rotate(-170deg); } 50% { transform: rotate(20deg); } }
@keyframes move-milky-forearm-right { 0%, 100% { transform: rotate(-30deg); } 50% { transform: rotate(0deg); } }

@keyframes move-pop-arm-left { 0%, 100% { transform: rotate(-30deg); } 50% { transform: rotate(-50deg); } }
@keyframes move-pop-forearm-left { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(150deg); } }
@keyframes move-pop-arm-right { 0%, 100% { transform: rotate(30deg); } 50% { transform: rotate(50deg); } }
@keyframes move-pop-forearm-right { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(-150deg); } }

@keyframes move-point-arm-left { 0%, 100% { transform: rotate(-20deg); } 50% { transform: rotate(-70deg); } }
@keyframes move-point-forearm-left { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(20deg); } }
@keyframes move-point-arm-right { 0%, 100% { transform: rotate(20deg); } 50% { transform: rotate(70deg); } }
@keyframes move-point-forearm-right { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(-20deg); } }
