:root {
  --bg:          #0D0902;
  --card:        #1A1208;
  --orange:      #FF6D00;
  --amber:       #FFB300;
  --text:        #9B9088;
  --heading:     #E8E0D8;
  --muted:       #5C4A38;
  --border:      #2D1E0A;
}

* { box-sizing: border-box; }

body {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 60% at 20% 40%, rgba(255, 109, 0, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 75% 70%, rgba(255, 179, 0, 0.04) 0%, transparent 60%);
  color: var(--text);
}

::selection { background: #C24A00; color: #FFFFFF; }

/* Scanline overlay */
body::after {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
}

/* Cursor spotlight */
#spotlight {
  background: radial-gradient(600px at var(--x, 50%) var(--y, 50%), rgba(255, 109, 0, 0.07), transparent 80%);
}

/* Nav indicator line animation */
.nav-indicator {
  transition: width 0.2s ease, background-color 0.2s ease;
}
.nav-item.active .nav-indicator,
.nav-item:hover .nav-indicator {
  width: 4rem;
  background-color: var(--orange);
  box-shadow: 0 0 8px var(--orange);
}
.nav-item.active .nav-text,
.nav-item:hover .nav-text {
  color: var(--orange);
}
.nav-item.active .nav-text {
  font-weight: 700;
}

/* Full-screen backdrop when a card is hovered */
#card-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.25s ease;
}
#card-backdrop.active {
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* Card stacking context — whole card (content + glow) is one unit */
.card-item {
  position: relative;
  z-index: 1;
  cursor: pointer;
}
.card-item:hover {
  z-index: 11;
}

/* ── Unique per-card hover animations ────────────────────────────── */

/* Igloo – ML training heartbeat: amber spike → orange settle */
@keyframes ml-heartbeat {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(255,109,0,.3), 0 0 24px rgba(255,109,0,.35), 0 0 60px rgba(255,109,0,.15);
    border-color: rgba(255,109,0,.5);
  }
  30% {
    box-shadow: 0 0 0 1px rgba(255,179,0,.75), 0 0 42px rgba(255,179,0,.6), 0 0 90px rgba(255,179,0,.28);
    border-color: rgba(255,179,0,.85);
  }
  48% {
    box-shadow: 0 0 0 1px rgba(255,109,0,.4), 0 0 28px rgba(255,109,0,.42), 0 0 65px rgba(255,109,0,.2);
    border-color: rgba(255,109,0,.6);
  }
}
[data-card="igloo"]:hover .card-glow {
  animation: ml-heartbeat 1.4s ease-in-out infinite;
}

/* Frostbyte – cybersecurity scan: rapid glitch blink */
@keyframes cyber-scan {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(255,109,0,.3), 0 0 24px rgba(255,109,0,.35), 0 0 60px rgba(255,109,0,.15);
    opacity: 1;
  }
  10% { opacity: 0.55; box-shadow: 0 0 0 2px rgba(255,109,0,.6), 0 0 30px rgba(255,109,0,.5), 0 0 70px rgba(255,109,0,.25); }
  12% { opacity: 1; }
  22% { opacity: 0.65; }
  24% { opacity: 1; }
  50% { box-shadow: 0 0 0 1px rgba(255,109,0,.5), 0 0 32px rgba(255,109,0,.45), 0 0 72px rgba(255,109,0,.22); }
  52% { opacity: 0.5; }
  54% { opacity: 1; }
}
[data-card="frostbyte"]:hover .card-glow {
  animation: cyber-scan 2.2s linear infinite;
}

/* Kredo – compile flash: bright burst then settle */
@keyframes compile-flash {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(17,71,52,.5), 0 0 24px rgba(17,71,52,.6), 0 0 60px rgba(17,71,52,.3);
    border-color: rgba(17,71,52,.7);
  }
  4% {
    box-shadow: 0 0 0 1px rgba(17,71,52,1), 0 0 56px rgba(17,71,52,1), 0 0 110px rgba(17,71,52,.7);
    border-color: rgba(17,71,52,1);
  }
  14% {
    box-shadow: 0 0 0 1px rgba(17,71,52,.5), 0 0 24px rgba(17,71,52,.6), 0 0 60px rgba(17,71,52,.3);
    border-color: rgba(17,71,52,.7);
  }
}
[data-card="kredo"]:hover {
  animation: turbine-sway 3s ease-in-out infinite;
  transform-origin: bottom center;
}
[data-card="kredo"]:hover .card-glow {
  background: #0a1f18;
  border-color: rgba(17,71,52,.7);
  box-shadow: 0 0 0 1px rgba(17,71,52,.5), 0 0 24px rgba(17,71,52,.6), 0 0 60px rgba(17,71,52,.3);
  animation: compile-flash 2.8s ease-out infinite;
}

/* ETH Wind Farms – turbine sway: gentle oscillation */
@keyframes turbine-sway {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(0.35deg); }
  75%       { transform: rotate(-0.35deg); }
}
[data-card="eth-wind"]:hover {
  animation: turbine-sway 3s ease-in-out infinite;
  transform-origin: bottom center;
}

/* Proxmox – server heartbeat: lub-dub double beat */
@keyframes server-heartbeat {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(255,109,0,.3), 0 0 24px rgba(255,109,0,.35), 0 0 60px rgba(255,109,0,.15);
  }
  8% {
    box-shadow: 0 0 0 1px rgba(255,109,0,.75), 0 0 42px rgba(255,109,0,.65), 0 0 85px rgba(255,109,0,.32);
  }
  18% {
    box-shadow: 0 0 0 1px rgba(255,109,0,.3), 0 0 24px rgba(255,109,0,.35), 0 0 60px rgba(255,109,0,.15);
  }
  26% {
    box-shadow: 0 0 0 1px rgba(255,109,0,.55), 0 0 34px rgba(255,109,0,.5), 0 0 72px rgba(255,109,0,.24);
  }
  38% {
    box-shadow: 0 0 0 1px rgba(255,109,0,.3), 0 0 24px rgba(255,109,0,.35), 0 0 60px rgba(255,109,0,.15);
  }
}
[data-card="proxmox"]:hover .card-glow {
  animation: server-heartbeat 2s ease-in-out infinite;
}

/* Agentic AI – orbit: glow sweeps around the border */
@keyframes ai-orbit {
  0%   { box-shadow:  5px  0  32px rgba(255,109,0,.5), 0 0 24px rgba(255,109,0,.3),  0 0 60px rgba(255,109,0,.15); border-color: rgba(255,109,0,.65); }
  25%  { box-shadow:  0   5px 32px rgba(255,179,0,.5), 0 0 24px rgba(255,179,0,.3),  0 0 60px rgba(255,179,0,.15); border-color: rgba(255,179,0,.65); }
  50%  { box-shadow: -5px  0  32px rgba(255,109,0,.5), 0 0 24px rgba(255,109,0,.3),  0 0 60px rgba(255,109,0,.15); border-color: rgba(255,109,0,.65); }
  75%  { box-shadow:  0  -5px 32px rgba(255,179,0,.5), 0 0 24px rgba(255,179,0,.3),  0 0 60px rgba(255,179,0,.15); border-color: rgba(255,179,0,.65); }
  100% { box-shadow:  5px  0  32px rgba(255,109,0,.5), 0 0 24px rgba(255,109,0,.3),  0 0 60px rgba(255,109,0,.15); border-color: rgba(255,109,0,.65); }
}
[data-card="ai"]:hover .card-glow {
  animation: ai-orbit 2s linear infinite;
}

/* Polish – language shimmer: warm amber wave rolling through */
@keyframes language-shimmer {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(255,179,0,.35), 0 0 24px rgba(255,179,0,.3),  0 0 60px rgba(255,179,0,.12);
    border-color: rgba(255,179,0,.55);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(255,109,0,.5),  0 0 30px rgba(255,109,0,.42), 0 0 72px rgba(255,109,0,.2);
    border-color: rgba(255,109,0,.65);
  }
}
[data-card="polish"]:hover .card-glow {
  animation: language-shimmer 2.8s ease-in-out infinite;
}

/* Kill all card animations for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  [data-card]:hover .card-glow,
  [data-card="eth-wind"]:hover { animation: none; }
}

/* Education cards — no hover effect */
.card-item.no-hover { cursor: default; }
.card-item.no-hover:hover { z-index: 1; }
.card-item.no-hover:hover .card-glow {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* Card click — blue glow burst */
@keyframes card-click-glow {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(255,109,0,.3), 0 0 24px rgba(255,109,0,.35), 0 0 60px rgba(255,109,0,.15);
    border-color: rgba(255,109,0,.5);
    background: #1A1208;
  }
  40%, 60% {
    box-shadow: 0 0 0 1px rgba(96,165,250,.7), 0 0 32px rgba(96,165,250,.55), 0 0 80px rgba(96,165,250,.28);
    border-color: rgba(96,165,250,.8);
    background: #07101f;
  }
}
@keyframes kredo-click-glow {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(17,71,52,.5), 0 0 24px rgba(17,71,52,.6), 0 0 60px rgba(17,71,52,.3);
    border-color: rgba(17,71,52,.7);
    background: #0a1f18;
  }
  40%, 60% {
    box-shadow: 0 0 0 1px rgba(96,165,250,.7), 0 0 32px rgba(96,165,250,.55), 0 0 80px rgba(96,165,250,.28);
    border-color: rgba(96,165,250,.8);
    background: #07101f;
  }
}

/* Card hover glow bg */
.card-glow {
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  border-radius: 6px;
}
.card-item:hover .card-glow {
  background: #1A1208;
  border-color: rgba(255, 109, 0, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 109, 0, 0.3),
    0 0 24px rgba(255, 109, 0, 0.35),
    0 0 60px rgba(255, 109, 0, 0.15);
}

section {
  scroll-margin-top: 4rem;
}

/* Tech tag */
.tech-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background: rgba(255, 109, 0, 0.08);
  border: 1px solid rgba(255, 109, 0, 0.2);
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: var(--orange);
  letter-spacing: 0.03em;
}

/* Mobile section label */
.section-label {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: 1rem;
  padding: 1rem 0;
  background: rgba(13, 9, 2, 0.9);
  backdrop-filter: blur(8px);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
}
@media (min-width: 1024px) {
  .section-label { display: none; }
}

/* External link arrow animation */
.link-arrow {
  display: inline-block;
  transition: transform 0.15s ease;
}
a:hover .link-arrow {
  transform: translate(3px, -3px);
}

/* Glitch effect on name */
.glitch {
  position: relative;
}
.glitch:hover {
  animation: glitch 0.4s linear;
}
@keyframes glitch {
  0%   { text-shadow: none; transform: skewX(0deg); }
  10%  { text-shadow: -2px 0 #FF3333, 2px 0 var(--amber); transform: skewX(-1deg); }
  20%  { text-shadow: 2px 0 #FF3333, -2px 0 var(--amber); transform: skewX(0deg); }
  30%  { text-shadow: -2px 0 #FF3333, 2px 0 var(--amber); transform: skewX(1deg); }
  40%  { text-shadow: none; transform: skewX(0deg); }
  50%  { text-shadow: 2px 0 #FF3333, -2px 0 var(--amber); transform: skewX(-0.5deg); }
  60%  { text-shadow: none; transform: skewX(0deg); }
  70%  { text-shadow: -2px 0 #FF3333, 2px 0 var(--amber); transform: skewX(0.5deg); }
  80%  { text-shadow: none; transform: skewX(0deg); }
  90%  { text-shadow: 2px 0 #FF3333; transform: skewX(0deg); }
  100% { text-shadow: none; transform: skewX(0deg); }
}

/* Terminal cursor blink */
.terminal-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--orange);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 6px var(--orange);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Neon section headers */
.neon-label {
  color: var(--muted);
  text-shadow: none;
  letter-spacing: 0.15em;
}

/* Section titles */
.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  text-shadow: 0 0 10px rgba(255, 109, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: linear-gradient(to right, rgba(255, 109, 0, 0.4), transparent);
}

/* Profile photo glow */
.profile-glow {
  border: 2px solid rgba(255, 109, 0, 0.4);
  box-shadow: 0 0 16px rgba(255, 109, 0, 0.15), 0 0 4px rgba(255, 109, 0, 0.3) inset;
}

/* Profile image glitch — slice displacement + channel shift */
.profile-glitch-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

@keyframes profile-glitch {
  0% {
    transform: translate(0, 0) skewX(0deg);
    filter: brightness(1) saturate(1) hue-rotate(0deg);
  }
  10% {
    transform: translate(-5px, 0) skewX(-4deg);
    filter: brightness(1.3) saturate(2) hue-rotate(70deg)
            drop-shadow(0 0 6px #FF2244) drop-shadow(0 0 12px #FF6D00);
  }
  20% {
    transform: translate(5px, -2px) skewX(3deg);
    filter: brightness(0.85) hue-rotate(210deg) saturate(2)
            drop-shadow(0 0 8px #00E5FF) drop-shadow(0 0 14px #FF2244);
  }
  30% {
    transform: translate(-3px, 1px) skewX(-2deg);
    filter: brightness(1.2) hue-rotate(330deg) saturate(1.8)
            drop-shadow(0 0 8px #FF2244) drop-shadow(0 0 6px #00E5FF);
  }
  40% {
    transform: translate(4px, 0) skewX(2deg);
    filter: brightness(1.3) hue-rotate(130deg) saturate(1.5)
            drop-shadow(0 0 10px #FF6D00) drop-shadow(0 0 8px #00E5FF);
  }
  50% {
    transform: translate(0, 0) skewX(0deg);
    filter: brightness(1) saturate(1) hue-rotate(0deg);
  }
  65% {
    transform: translate(-4px, 0);
    filter: brightness(0.9) contrast(1.4) hue-rotate(55deg)
            drop-shadow(0 0 8px #FF6D00) drop-shadow(0 0 6px #FF2244);
  }
  75% {
    transform: translate(3px, 0);
    filter: brightness(1.15) hue-rotate(25deg)
            drop-shadow(0 0 6px #FF6D00) drop-shadow(0 0 8px #00E5FF);
  }
  100% {
    transform: translate(0, 0);
    filter: brightness(1) saturate(1);
  }
}

.profile-glitch-wrap.glitching img {
  animation: profile-glitch 0.8s ease 1;
}

@media (prefers-reduced-motion: reduce) {
  .profile-glitch-wrap img { animation: none; }
}

/* prefers-reduced-motion: kill all animations */
@media (prefers-reduced-motion: reduce) {
  .glitch:hover { animation: none; }
  .terminal-cursor { animation: none; opacity: 1; }
  body::after { display: none; }
}

/* ── Language toggle ─────────────────────────────────────────────── */
.lang-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 109, 0, 0.35);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.lang-btn:first-child {
  border-right: none;
  border-radius: 4px 0 0 4px;
}
.lang-btn:last-child {
  border-radius: 0 4px 4px 0;
}
.lang-btn[aria-pressed="true"] {
  background: rgba(255, 109, 0, 0.15);
  color: var(--orange);
  box-shadow: 0 0 6px rgba(255, 109, 0, 0.2);
}
.lang-btn[aria-pressed="false"] {
  background: transparent;
  color: var(--muted);
}
.lang-btn[aria-pressed="false"]:hover {
  color: var(--orange);
  background: rgba(255, 109, 0, 0.07);
}

/* ── Easter egg: chaos button ───────────────────────────────────────── */
.chaos-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--orange);
  background: transparent;
  border: 1px solid rgba(255, 109, 0, 0.35);
  padding: 0.45rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.chaos-btn:hover:not(:disabled) {
  background: rgba(255, 109, 0, 0.08);
  border-color: rgba(255, 109, 0, 0.65);
  box-shadow: 0 0 10px rgba(255, 109, 0, 0.2);
}
.chaos-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Easter egg: fake popup windows ─────────────────────────────────── */
.fake-popup {
  position: fixed;
  z-index: 10000;
  width: 280px;
  background: var(--card);
  border: 1px solid var(--orange);
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(255, 109, 0, 0.25),
    0 0 24px rgba(255, 109, 0, 0.3),
    0 0 60px rgba(255, 109, 0, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.7);
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  pointer-events: none;
  will-change: transform, opacity;
}
.fake-popup-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(255, 109, 0, 0.12);
  border-bottom: 1px solid rgba(255, 109, 0, 0.3);
}
.fake-popup-dots { display: flex; gap: 5px; flex-shrink: 0; }
.fake-popup-dot  { width: 10px; height: 10px; border-radius: 50%; }
.fake-popup-dot:nth-child(1) { background: var(--orange); box-shadow: 0 0 4px var(--orange); }
.fake-popup-dot:nth-child(2) { background: var(--amber);  box-shadow: 0 0 4px var(--amber);  }
.fake-popup-dot:nth-child(3) { background: var(--muted);  }
.fake-popup-title {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
  padding-right: 21px;
}
.fake-popup-body {
  padding: 12px 14px;
  font-size: 0.68rem;
  line-height: 1.55;
  color: var(--text);
}
.fake-popup-body strong { color: var(--heading); font-weight: 500; }

@keyframes popup-in {
  0%   { opacity: 0; transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(0.5); }
  65%  { opacity: 1; transform: translate(0px, 0px) scale(1.04); }
  100% { opacity: 1; transform: translate(0px, 0px) scale(1); }
}
@keyframes popup-out {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.6) translateY(20px); }
}

@media (prefers-reduced-motion: reduce) {
  .fake-popup { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ── Terminal window ──────────────────────────────────────────────── */
.terminal-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 10500;
  width: min(720px, 94vw);
  height: min(480px, 60vh);
  min-height: 300px;
  background: #080601;
  border: 1px solid rgba(255, 109, 0, 0.5);
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 109, 0, 0.15),
    0 0 48px rgba(255, 109, 0, 0.18),
    0 24px 64px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.terminal-window.terminal-open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 109, 0, 0.07);
  border-bottom: 1px solid rgba(255, 109, 0, 0.2);
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}
.terminal-dots { display: flex; gap: 6px; flex-shrink: 0; }
.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.terminal-dot-close {
  background: var(--orange);
  box-shadow: 0 0 4px rgba(255, 109, 0, 0.6);
  cursor: pointer;
  transition: filter 0.1s;
}
.terminal-dot-close:hover { filter: brightness(1.4); }
.terminal-dot-min  { background: var(--amber); box-shadow: 0 0 4px rgba(255, 179, 0, 0.4); }
.terminal-dot-max  { background: var(--muted); }
.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.63rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  padding-right: 30px;
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 4px;
  font-size: 0.74rem;
  line-height: 1.65;
  color: var(--text);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 109, 0, 0.25) transparent;
}
.terminal-output::-webkit-scrollbar       { width: 5px; }
.terminal-output::-webkit-scrollbar-track { background: transparent; }
.terminal-output::-webkit-scrollbar-thumb { background: rgba(255, 109, 0, 0.25); border-radius: 3px; }

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px 10px;
  border-top: 1px solid rgba(255, 109, 0, 0.1);
  flex-shrink: 0;
}
.terminal-prompt-display {
  font-size: 0.74rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.terminal-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--heading);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  caret-color: var(--orange);
  min-width: 0;
}

/* Terminal text color tokens */
.term-user   { color: var(--orange); }
.term-colon  { color: var(--muted); }
.term-path   { color: var(--amber); }
.term-dollar { color: var(--heading); }
.term-amber  { color: var(--amber); }
.term-cmd-echo { color: var(--heading); }
.term-err    { color: #ff5555; }
.term-warn   { color: var(--amber); }
.term-success{ color: #50fa7b; }
.term-muted  { color: var(--muted); font-size: 0.68rem; }
.term-heading{ color: var(--orange); font-weight: 500; }
.term-cmd-name { color: var(--amber); }
.term-cmd-desc { color: var(--text); }
.term-ls-dir  { color: var(--amber); }
.term-ls-file { color: var(--heading); }
.term-ls-exec { color: #50fa7b; }
.term-ls-perm { color: var(--muted); font-size: 0.68rem; }
.term-ls-size { color: var(--text); font-size: 0.68rem; }
.term-ls-total{ color: var(--muted); }
.term-git-hash{ color: var(--orange); }

.term-line { word-break: break-all; min-height: 1.1em; }
.term-pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  line-height: 1.65;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── Vim overlay ──────────────────────────────────────────────────── */
.vim-overlay {
  position: fixed;
  inset: 0;
  z-index: 10600;
  display: flex;
  flex-direction: column;
  background: #050402;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.vim-overlay.vim-open { opacity: 1; pointer-events: all; }

.vim-header {
  padding: 4px 12px;
  background: rgba(255, 109, 0, 0.06);
  border-bottom: 1px solid rgba(255, 109, 0, 0.15);
  font-size: 0.64rem;
  color: var(--muted);
  flex-shrink: 0;
}
.vim-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--heading);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.65;
  padding: 12px 16px;
  resize: none;
  caret-color: var(--orange);
}
.vim-statusline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  background: rgba(255, 109, 0, 0.08);
  border-top: 1px solid rgba(255, 109, 0, 0.2);
  font-size: 0.68rem;
  flex-shrink: 0;
}
#vim-mode-indicator { color: var(--orange); font-weight: 500; min-width: 100px; }
.vim-colon-cmd      { color: var(--heading); flex: 1; }
.vim-file-info      { color: var(--muted); }

/* ── Terminal toggle button ───────────────────────────────────────── */
.terminal-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10400;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--orange);
  background: rgba(13, 9, 2, 0.92);
  border: 1px solid rgba(255, 109, 0, 0.45);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 109, 0, 0.15);
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
  backdrop-filter: blur(6px);
}
.terminal-toggle-btn:hover {
  background: rgba(255, 109, 0, 0.1);
  border-color: rgba(255, 109, 0, 0.75);
  box-shadow: 0 0 20px rgba(255, 109, 0, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .terminal-window,
  .vim-overlay,
  .terminal-hint { transition: none; }
}

