@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap");


/* src/style.css — All styles for the terminal website */
/* Colors use CSS custom properties for theme switching */
/* ── Theme variables (defaults, overridden by themes.js) ── */
:root {
  --bg: #0a0e14;
  --fg: #b3b1ad;
  --terminal-bg: rgba(13, 17, 23, 0.75);
  --border: #21262d;
  --prompt: #7ee787;
  --command: #e6edf3;
  --highlight: #79c0ff;
  --accent: #d2a8ff;
  --warn: #d29922;
  --separator: #30363d;
  --cursor-color: #58a6ff;
  --bar-bg: #0d1117;
  --bar-accent: #58a6ff;
  --tmux-session-bg: #7ee787;
  --tmux-session-fg: #0d1117;
  --tmux-win-bg: #21262d;
  --tmux-win-fg: #8b949e;
  --tmux-win-active-bg: #30363d;
  --tmux-win-active-fg: #e6edf3;
  --tmux-host-bg: #58a6ff;
  --tmux-host-fg: #0d1117;
  --tmux-info-bg: #21262d;
  --tmux-hl: #d2a8ff;
}
/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}
/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* ── Body ── */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Fira Code", monospace;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}
/* ── Background canvas ── */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 0;
}
/* ── Terminal container ── */
.terminal {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 880px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom left;
}
.terminal.minimized {
  transform: scale(0.05);
  opacity: 0;
  pointer-events: none;
}
/* Hide overlay when terminal is minimized */
body.term-minimized .overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.overlay {
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ── Minimized terminal widget (bottom-left, mirrors audio-player) ── */
.term-widget {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 10;
  display: flex;
  align-items: stretch;
  height: 32px;
  background: var(--bar-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow:
    0 0 12px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.03);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  font-family: "Fira Code", monospace;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.term-widget.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.term-widget:hover {
  border-color: var(--bar-accent);
  box-shadow:
    0 0 16px rgba(88, 166, 255, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 0.03);
}
.tw-ws {
  background: var(--bar-accent);
  color: var(--bar-bg);
  padding: 0 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  letter-spacing: 0.5px;
}
.tw-mode {
  color: var(--prompt);
  padding: 0 8px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
}
.tw-title {
  color: var(--tmux-win-fg);
  padding: 0 10px;
  display: flex;
  align-items: center;
  font-size: 11px;
}
.terminal.dragging {
  transition: none;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.terminal.dragged {
  position: fixed;
}
/* ── Minimize button ── */
.i3-minimize {
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--tmux-win-fg);
  font-family: "Fira Code", monospace;
  font-size: 14px;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s;
  line-height: 1;
}
.i3-minimize:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--bar-accent);
}
/* ── i3 top bar ── */
.i3-bar {
  background: var(--bar-bg);
  padding: 0;
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid var(--bar-accent);
  font-family: "Fira Code", monospace;
  font-size: 12px;
  cursor: grab;
  user-select: none;
}
.i3-bar:active {
  cursor: grabbing;
}
.i3-bar select,
.i3-bar button {
  cursor: pointer;
}
.i3-left {
  display: flex;
  align-items: center;
}
.i3-ws {
  background: var(--bar-accent);
  color: var(--bar-bg);
  padding: 6px 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.i3-mode {
  color: var(--prompt);
  padding: 6px 10px;
  border-right: 1px solid var(--border);
}
.i3-title {
  color: var(--tmux-win-fg);
  padding: 6px 12px;
  font-size: 12px;
}
.i3-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.i3-stat {
  padding: 6px 10px;
  border-left: 1px solid var(--border);
  color: var(--tmux-win-fg);
}
.i3-stat .val {
  color: var(--accent);
}
.i3-theme-picker {
  padding: 0 6px;
  display: flex;
  align-items: center;
}
#theme-select {
  background: var(--bar-bg);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  padding: 2px 4px;
  cursor: pointer;
  outline: none;
}
#theme-select:hover,
#theme-select:focus {
  border-color: var(--bar-accent);
}
/* ── Terminal body ── */
.terminal-body {
  position: relative;
  height: 620px;
}
.terminal-pane {
  padding: 24px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}
.line {
  white-space: pre-wrap;
  word-break: break-all;
}
.input-line {
  display: flex;
  flex-wrap: wrap;
}
/* ── Text colors ── */
.prompt {
  color: var(--prompt);
}
.command {
  color: var(--command);
}
.output {
  color: var(--fg);
}
.highlight {
  color: var(--highlight);
}
.accent {
  color: var(--accent);
}
.warn {
  color: var(--warn);
}
.separator {
  color: var(--separator);
}
/* ── Cursor ── */
.cursor {
  display: inline-block;
  width: 0.6em;
  background: var(--cursor-color);
  animation: blink 1s step-end infinite;
}
/* In flex input-line, match text height */
.input-line .cursor {
  height: 1.4em;
  margin-top: -4px;
  align-self: center;
}
/* In non-flex context (typewriter), size to match text */
.line:not(.input-line) .cursor {
  height: 1.25em;
  vertical-align: text-top;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.typed-text {
  display: inline;
}
.input-text {
  white-space: pre;
}
/* ── ANSI art (tight line spacing) ── */
.ansi-art .line {
  line-height: 1.1;
}
/* ── Skill links (clickable in ls output) ── */
.skill-link {
  cursor: pointer;
}
.skill-link:hover .accent {
  text-decoration: underline;
}
/* ── cmatrix canvas ── */
.cmatrix-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}
/* ── Hidden input (for keystroke capture) ── */
#hidden-input {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: none;
  outline: none;
  padding: 0;
  font-size: 16px; /* prevents iOS zoom */
}
/* ── Tmux bottom bar ── */
.tmux-bar {
  background: var(--bar-bg);
  border-top: 1px solid var(--border);
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  color: var(--separator);
  overflow: hidden;
}
.tmux-left {
  display: flex;
  align-items: stretch;
}
.tmux-right {
  display: flex;
  align-items: stretch;
}
/* ── Tmux session badge ── */
.tmux-session {
  background: var(--tmux-session-bg);
  color: var(--tmux-session-fg);
  padding: 3px 18px 3px 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  position: relative;
}
.tmux-session::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 0;
  bottom: 0;
  width: 11px;
  background: var(--tmux-session-bg);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
/* ── Tmux windows ── */
.tmux-win {
  padding: 3px 18px;
  color: var(--tmux-win-fg);
  background: var(--tmux-win-bg);
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.tmux-win::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 0;
  bottom: 0;
  width: 11px;
  background: var(--tmux-win-bg);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.tmux-win.active {
  color: var(--tmux-win-active-fg);
  background: var(--tmux-win-active-bg);
}
.tmux-win.active::after {
  background: var(--tmux-win-active-bg);
}
.tmux-win-idx {
  color: var(--bar-accent);
}
/* ── Tmux info (clock) ── */
.tmux-info {
  padding: 3px 18px;
  color: var(--tmux-win-fg);
  background: var(--tmux-info-bg);
  display: inline-flex;
  align-items: center;
  position: relative;
}
.tmux-info::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 11px;
  background: var(--tmux-info-bg);
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}
.tmux-hl {
  color: var(--tmux-hl);
}
/* ── Tmux host badge ── */
.tmux-host {
  background: var(--tmux-host-bg);
  color: var(--tmux-host-fg);
  padding: 3px 10px 3px 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  position: relative;
}
.tmux-host::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 11px;
  background: var(--tmux-host-bg);
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}
/* ── Responsive ── */
@media (max-height: 820px) {
  .terminal-body {
    height: 440px;
  }
}
@media (max-width: 600px) {
  body {
    padding: 1rem;
    font-size: 13px;
  }

  .terminal-body {
    height: 400px;
  }

  .terminal-pane {
    padding: 16px;
  }

  .tmux-bar {
    font-size: 10px;
  }

  .anim-switcher {
    width: 280px;
  }

  .anim-lcd {
    font-size: 9px;
  }

  .audio-player {
    width: 240px;
  }

  .audio-wave {
    width: 240px;
  }

  .audio-title {
    font-size: 8px;
  }
}
/* ── Audio waveform ── */
.audio-wave {
  position: fixed;
  bottom: 54px;
  right: 16px;
  z-index: 10;
  width: 272px;
  height: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.audio-wave.active {
  opacity: 1;
}
/* ── Audio player ── */
.audio-player {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0;
  width: 272px;
  height: 36px;
  background: #0c0c0c;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow:
    0 0 12px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.03);
  overflow: hidden;
  user-select: none;
}
.audio-btn {
  flex: 0 0 32px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--tmux-win-fg);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s;
  font-family: "Fira Code", monospace;
}
.audio-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--bar-accent);
}
.audio-btn:active {
  background: rgba(255, 255, 255, 0.1);
}
.audio-prev,
.audio-next {
  flex: 0 0 26px;
  font-size: 8px;
  letter-spacing: -2px;
}
.audio-prev {
  border-right: 1px solid var(--border);
}
.audio-play {
  border-right: 1px solid var(--border);
}
.audio-play.playing {
  color: var(--matrix-trail, #0f0);
  text-shadow: 0 0 6px var(--matrix-glow, #0f0);
}
.audio-next {
  border-right: 1px solid var(--border);
}
.audio-vol {
  border-left: 1px solid var(--border);
}
.audio-lcd {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(0, 20, 0, 0.4) 0%,
    rgba(0, 10, 0, 0.6) 100%
  );
  height: 100%;
  overflow: hidden;
  padding: 4px 6px;
  gap: 2px;
}
.audio-title {
  font-family: "Fira Code", monospace;
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--matrix-trail, #0f0);
  text-shadow: 0 0 4px var(--matrix-glow, #0f0);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.2;
}
.audio-title .scroll-inner {
  display: inline-block;
  padding-right: 2em;
  animation: marquee 8s linear infinite;
}
.audio-title .no-scroll {
  display: inline-block;
}
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.audio-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}
.audio-progress {
  height: 100%;
  width: 0%;
  background: var(--matrix-trail, #0f0);
  box-shadow: 0 0 4px var(--matrix-glow, #0f0);
  border-radius: 2px;
  transition: width 0.1s linear;
}
/* ── Animation switcher LCD bar ── */
.anim-switcher {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0;
  width: 380px;
  height: 36px;
  background: #0c0c0c;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow:
    0 0 12px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.03);
  overflow: hidden;
  user-select: none;
}
.anim-btn {
  flex: 0 0 36px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--tmux-win-fg);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s;
  font-family: "Fira Code", monospace;
}
.anim-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--bar-accent);
}
.anim-btn:active {
  background: rgba(255, 255, 255, 0.1);
}
.anim-btn-prev {
  border-right: 1px solid var(--border);
}
.anim-btn-next {
  border-left: 1px solid var(--border);
}
/* ── SNES Overworld celestial (sun/moon) toggle ── */
.snes-celestial {
  position: fixed;
  top: 24px;
  right: 32px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 50;
  transition:
    background 1.5s ease,
    box-shadow 1.5s ease,
    opacity 1s ease;
  border: none;
  outline: none;
}
/* ── Minecraft controls (top-right) ── */
.mc-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  user-select: none;
}
.mc-daynight {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 10, 10, 0.75);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 10px;
  backdrop-filter: blur(6px);
}
.mc-dn-icon {
  font-size: 20px;
  line-height: 1;
  filter: none;
}
.mc-dn-track {
  position: relative;
  width: 48px;
  height: 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, #1a1a40, #0a0a20);
  cursor: pointer;
  padding: 0;
  transition: background 0.6s;
}
.mc-dn-track:hover {
  border-color: rgba(255, 255, 255, 0.3);
}
.mc-dn-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffd54f;
  box-shadow: 0 0 6px rgba(255, 200, 0, 0.6);
  transition:
    left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.4s,
    box-shadow 0.4s;
}
.mc-dn-thumb.is-day {
  left: 26px;
  background: #ffd54f;
  box-shadow: 0 0 6px rgba(255, 200, 0, 0.6);
}
.mc-dn-thumb.is-night {
  left: 2px;
  background: #b0bec5;
  box-shadow: 0 0 6px rgba(176, 190, 197, 0.5);
}
.mc-freelook-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 10, 10, 0.75);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px 12px 4px 8px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  color: var(--tmux-win-fg);
  font-family: "Fira Code", monospace;
  font-size: 11px;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.mc-freelook-btn:hover {
  background: rgba(30, 30, 30, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
}
.mc-freelook-btn.active {
  border-color: var(--bar-accent);
  background: rgba(20, 40, 20, 0.8);
}
.mc-freelook-btn.active .mc-fl-label {
  color: var(--bar-accent);
}
.mc-fl-icon {
  font-size: 14px;
  line-height: 1;
}
.mc-fl-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.7);
  font-family: "Fira Code", monospace;
  font-size: 12px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.mc-fl-hint.visible {
  opacity: 1;
}
.anim-lcd {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(0, 20, 0, 0.4) 0%,
    rgba(0, 10, 0, 0.6) 100%
  );
  height: 100%;
  overflow: hidden;
}
.anim-label {
  font-family: "Fira Code", monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--matrix-trail, #0f0);
  text-shadow: 0 0 6px var(--matrix-glow, #0f0);
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  padding: 0 6px;
}
