/* ────────────────────────────────────────────────────────────────
   BESTATIC CONSOLE — TERMINAL NEOFETCH THEME
   Dracula palette (dark default) + Solarized Light (light mode)
   Pure CSS · CSS Grid · No Bootstrap
   ──────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ── Theme Variables — Dracula Dark (default) ─────────────────── */
:root {
  --bg:        #282a36;
  --bg-alt:    #1e1f29;
  --surface:   #313447;
  --border:    #44475a;
  --fg:        #f8f8f2;
  --comment:   #7586b9;
  --cyan:      #8be9fd;
  --green:     #50fa7b;
  --pink:      #ff70c1;
  --purple:    #bd93f9;
  --orange:    #ffb86c;
  --red:       #ff5555;
  --yellow:    #d2fa8c;

  --text-primary:   var(--fg);
  --text-secondary: var(--comment);
  --text-accent:    var(--cyan);
  --link:           var(--cyan);
  --link-hover:     var(--pink);
  --link-visited:   var(--purple);

  --nav-bg:         #1a1b26;
  --nav-text:       var(--fg);
  --nav-border:     var(--border);

  --footer-bg:      var(--bg-alt);
  --footer-text:    var(--comment);

  --card-bg:        var(--surface);
  --card-border:    var(--border);
  --code-bg:        var(--bg-alt);

  --tag-bg:         var(--border);
  --tag-text:       var(--cyan);

  --search-bg:      #21222c;
  --search-border:  var(--border);
  --search-hover:   var(--surface);

  --scrollbar-track: var(--bg-alt);
  --scrollbar-thumb: var(--border);

  --back-top-bg:    var(--green);
  --back-top-color: var(--bg);
}

/* ── Light mode (GitHub Light) ────────────────────────────────── */
html.light {
  --bg:        #ffffff;
  --bg-alt:    #f6f8fa;
  --surface:   #f0f2f5;
  --border:    #d0d7de;
  --fg:        #1f2328;
  --comment:   #57606a;
  --cyan:      #0969da;
  --green:     #1a7f37;
  --pink:      #df50dd;
  --purple:    #8250df;
  --orange:    #bc4c00;
  --red:       #cf222e;
  --yellow:    #9a6700;

  --text-primary:   #1f2328;
  --text-secondary: #57606a;
  --text-accent:    #0969da;
  --link:           #0969da;
  --link-hover:     #8250df;
  --link-visited:   #8250df;

  --nav-bg:         #24292f;
  --nav-text:       #f0f6fc;
  --nav-border:     #30363d;

  --footer-bg:      #24292f;
  --footer-text:    #8c959f;

  --card-bg:        #f6f8fa;
  --card-border:    #d0d7de;
  --code-bg:        #f6f8fa;

  --tag-bg:         #ddf4ff;
  --tag-text:       #0969da;

  --search-bg:      #ffffff;
  --search-border:  #d0d7de;
  --search-hover:   #f6f8fa;

  --scrollbar-track: #f6f8fa;
  --scrollbar-thumb: #d0d7de;

  --back-top-bg:    #0969da;
  --back-top-color: #ffffff;
}

/* ════════════════════════════════════════════════════════════════
   BASE RESET & TYPOGRAPHY
   ════════════════════════════════════════════════════════════════ */

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

/* Background-color on html, not body — this keeps body transparent so
   the fixed #bio-bg layer (z-index:-1) is visible behind page content. */
html {
  scroll-behavior: smooth;
  font-size: 105%;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%,  rgba(98,114,164,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%,  rgba(80,250,123,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 70% 20%,  rgba(139,233,253,0.07) 0%, transparent 50%);
  background-attachment: fixed;
  transition: background-color 0.25s;
}

html.light {
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%,  rgba(3,102,214,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%,  rgba(26,188,156,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 70% 20%,  rgba(100,150,250,0.05) 0%, transparent 50%);
}

body {
  background-color: transparent;
  background-image: none;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.95rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color 0.25s;
}

/* ── Biological figure background layer ──────────────────────── */
#bio-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bio-img {
  position: absolute;
  opacity: 0.26;
  mix-blend-mode: screen;
  filter: saturate(1.1) brightness(1.05);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

html.light .bio-img {
  opacity: 0.15;
  mix-blend-mode: multiply;
  filter: saturate(0.85) brightness(0.95);
}

/* Placement – corners and edges, partially cropped, gently rotated */
.bio-1 {
  width: min(26vw, 390px);
  top: -10%;
  left: -7%;
  transform: rotate(-8deg);
}
.bio-2 {
  width: min(20vw, 300px);
  top: -5%;
  right: -4%;
  transform: rotate(7deg);
}
.bio-3 {
  width: min(18vw, 280px);
  top: 36%;
  right: -5%;
  transform: rotate(14deg);
}
.bio-4 {
  width: min(26vw, 400px);
  bottom: -8%;
  left: -5%;
  transform: rotate(-5deg);
}
.bio-5 {
  width: min(28vw, 420px);
  bottom: -10%;
  right: -5%;
  transform: rotate(4deg);
}
.bio-6 {
  width: min(28vw, 420px);
  top: 42%;
  left: 34%;
  transform: translateX(-50%) rotate(2deg);
  opacity: 0.18;
}
html.light .bio-6 { opacity: 0.18; }

@media (max-width: 768px) {
  .bio-1 { width: 52vw; top: -6%; left: -10%; }
  .bio-2 { width: 42vw; top: -4%; right: -8%; }
  .bio-3 { width: 44vw; top: 40%; right: -10%; }
  .bio-4 { width: 44vw; bottom: -5%; left: -8%; }
  .bio-5 { width: 52vw; bottom: -6%; right: -8%; }
  .bio-6 { display: none; }
}

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--comment); }

/* ── Links ────────────────────────────────────────────────────── */
a { color: var(--link); text-decoration: none; transition: color 0.15s; }
/* a:visited { color: var(--link-visited); } */
a:hover   { color: var(--link-hover);   }

/* ── Container ────────────────────────────────────────────────── */
.container {
  max-width: 1210px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ── Utilities ────────────────────────────────────────────────── */
.hidden            { display: none !important; }
.text-center       { text-align: center; }
.text-muted        { color: var(--text-secondary); }
img                { max-width: 100%; height: auto; display: block; }

/* ── Headings ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}
h1 { color: var(--cyan);   font-size: 1.75rem; }
h2 { color: var(--green);  font-size: 1.45rem; }
h3 { color: var(--pink);   font-size: 1.2rem;  }
h4 { color: var(--purple); font-size: 1.05rem; }
h5 { color: var(--orange); font-size: 1rem;    }
h6 { color: var(--yellow); font-size: 0.9rem;  }

p { margin-bottom: 1rem; color: var(--text-primary); }

/* ── Cursor Blink Animation ───────────────────────────────────── */
@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: var(--green);
  animation: cursor-blink 1.1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 3px;
}

/* ── Subtitle cursor (JS typewriter appends this) ─────────────── */
.subtitle-cursor {
  display: inline-block;
  width: 2px;
  height: 0.8em;
  background: var(--green);
  animation: cursor-blink 1s step-end infinite;
  vertical-align: baseline;   /* bottom sits on baseline, extends up into text */
  margin-left: 2px;
}

/* ── Glow ─────────────────────────────────────────────────────── */
/* Slightly stronger resting glow so cyan pops on the dark purple header */
.glow-cyan   { text-shadow: 0 0 14px rgba(139,233,253,0.55), 0 0 30px rgba(139,233,253,0.18); }
.glow-green  { text-shadow: 0 0 10px rgba(80,250,123,0.45);  }
.glow-pink   { text-shadow: 0 0 10px rgba(255,121,198,0.45); }
.glow-purple { text-shadow: 0 0 10px rgba(189,147,249,0.45); }

/* ════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════ */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  transition: opacity 0.3s;
}

/* Full-width titlebar — no inner box */
.site-header-titlebar {
  background: var(--border);
  padding: 9px 1.5rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

.th-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}
.th-dot:hover { transform: scale(1.25); filter: brightness(1.3); }
.th-dot.r { background: #ff5f57; }
.th-dot.y { background: #febc2e; }
.th-dot.g { background: #28c840; }

.site-header-bar-label {
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
  /* Use fg color so it contrasts against the border-colored titlebar in both themes */
  color: var(--fg);
  opacity: 0.9;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}

.site-header-body {
  padding: 1.4rem 2rem 1.6rem;
  text-align: center;
  /* Dark mode: deep purple-indigo wash that complements the Dracula palette */
  background: linear-gradient(160deg, #505384e1 0%, #1a1b30 45%, #1e1f29 100%);
}

/* Light mode: blue-sky gradient so the header stands out from the white page */
html.light .site-header-body {
  background: linear-gradient(160deg, #d0e8ff 0%, #e8f3ff 45%, #f0f6fc 100%);
}
/* Adapt the name glow and hover-glow to look crisp on the light blue background */
html.light .term-header-name {
  text-shadow: 0 0 12px rgba(9, 105, 218, 0.3);
}
html.light .site-header-body a:hover .term-header-name {
  text-shadow: 0 0 18px rgba(9, 105, 218, 0.65), 0 0 40px rgba(9, 105, 218, 0.2);
}

/* Collapsed header: only titlebar strip remains */
.site-header.collapsed .site-header-body { display: none; }

/* Dimmed header — filter persists even while hovering */
.site-header.dimmed {
  filter: grayscale(0.9) brightness(0.45);
  transition: filter 0.25s;
}
/* Active ring on yellow dot using box-shadow (no pseudo-element oval) */
.site-header.dimmed .th-dot.y {
  box-shadow: 0 0 0 2px #febc2e, 0 0 6px rgba(254,188,46,0.6);
}

.term-header-prompt {
  font-size: 0.82rem;
  color: var(--comment);
  margin-bottom: 0.8rem;
  user-select: none;
}
.term-header-prompt .ph-user { color: var(--green); }
.term-header-prompt .ph-at   { color: var(--comment); }
.term-header-prompt .ph-host { color: var(--cyan); }
.term-header-prompt .ph-path { color: var(--purple); }
.term-header-prompt .ph-sym  { color: var(--pink); }

.term-header-name {
  font-size: 3rem;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
  margin-top: 0;
  line-height: 1.1;
  transition: text-shadow 0.35s;
}
/* Name glows brighter when hovered — no blinking cursor */
.site-header-body a:hover .term-header-name {
  text-shadow: 0 0 18px rgba(139,233,253,0.85), 0 0 40px rgba(139,233,253,0.35);
}

@media (max-width: 600px) {
  .term-header-name { font-size: 2rem; }
}

.term-header-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: var(--comment);
  /* JS typewriter populates this; allow natural wrapping on all screen sizes */
}

/* ════════════════════════════════════════════════════════════════
   NAVIGATION
   ════════════════════════════════════════════════════════════════ */
.site-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  z-index: 200;
  /* No overflow:hidden — that would clip the palette dropdown */
}

.site-nav-inner {
  max-width: 1210px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: stretch;   /* all direct children stretch to the full 56 px height */
  height: 56px;
  position: relative;
}

/* Full-height nav links: explicit height:100% anchors the stretch chain */
.nav-links {
  display: flex;
  align-items: stretch;
  height: 100%;
  flex: 1;
  list-style: none;
  gap: 0;
}

.nav-links li {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.nav-link {
  color: rgba(240, 246, 252, 0.75);
  text-decoration: none;
  padding: 0 0.9rem;
  height: 100%;
  display: flex;
  align-items: center;    /* text centred inside the full-height link */
  font-size: 0.95rem;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.15s, background 0.15s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.nav-link .nav-tilde {
  color: rgba(240,246,252,0.3);
  margin-right: 1px;
  font-size: 0.82rem;
}
.nav-link:hover { color: #8be9fd; border-bottom-color: #8be9fd; background: rgba(139,233,253,0.07); }
.nav-link:hover .nav-tilde { color: #50fa7b; }
a.nav-link:visited { color: rgba(240,246,252,0.75); }
a.nav-link:visited:hover { color: #8be9fd; }

.nav-actions {
  display: flex;
  align-items: center;   /* buttons centred vertically inside the stretched container */
  gap: 0.25rem;
  margin-left: auto;
  /* nav-actions itself stretches to 56 px via parent align-items:stretch,
     so centering its children is still correct */
}

.nav-icon-btn {
  background: none;
  border: none;
  color: var(--nav-text);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  font-size: 1rem;
  height: 36px;
  text-decoration: none;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--cyan); }
.nav-icon-btn:visited { color: var(--nav-text); }

.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--comment);
  background: transparent;
  cursor: pointer;
  height: 38px;
  font-family: 'JetBrains Mono', monospace;
  transition: border-color 0.15s, color 0.15s;
}
.nav-search-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.nav-search-btn kbd {
  background: var(--border);
  color: var(--comment);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.7rem;
}

/* Palette dropdown in nav */
.nav-palette-wrap {
  position: relative;
}
.nav-palette-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  display: flex;
  gap: 5px;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
/* Caret / arrow pointing up to button */
.nav-palette-panel::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
/* Slightly smaller swatches inside nav panel */
#nav-palette-panel .nf-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--nav-text);
  cursor: pointer;
  padding: 6px;
  font-size: 1.3rem;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  align-self: center;   /* keep hamburger vertically centred, not stretched */
}
.nav-hamburger i { pointer-events: none; }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    padding: 0.4rem 0;
    height: auto;
    z-index: 199;
  }
  .nav-links.open { display: flex; }
  .nav-link {
    width: 100%;
    padding: 0.65rem 1.5rem;
    height: auto;
    border-bottom: none;
    border-left: 2px solid transparent;
  }
  .nav-link:hover { border-left-color: var(--cyan); }
  .nav-search-btn .nav-search-text { display: none; }
}

/* ════════════════════════════════════════════════════════════════
   TERMINAL WINDOW COMPONENT
   ════════════════════════════════════════════════════════════════ */
.term-window {
  background: rgba(49, 52, 71, 0.28);
  border: 1px solid rgba(98, 114, 164, 0.35);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.3s, border-color 0.3s, background 0.3s;
}
.term-window:hover {
  background: rgba(49, 52, 71, 0.36);
  border: 2px solid var(--cyan);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.55),
    0 0 12px rgba(139, 233, 253, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
html.light .term-window {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(208, 215, 222, 0.55);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
html.light .term-window:hover {
  background: rgba(255, 255, 255, 0.38);
  border: 2px solid #0969da;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.13),
    0 0 12px rgba(9, 105, 218, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.term-titlebar {
  background: var(--border);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.td { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.td.r { background: #ff5f57; }
.td.y { background: #febc2e; }
.td.g { background: #28c840; }

.term-titlebar-label {
  font-size: 0.78rem;
  color: var(--comment);
  margin-left: 6px;
}

.term-body {
  padding: 1.25rem 1.75rem;
}

.term-prompt-line {
  font-size: 0.82rem;
  color: var(--comment);
  margin-bottom: 1rem;
  user-select: none;
}
.term-prompt-line .tp-user { color: var(--green); }
.term-prompt-line .tp-host { color: var(--cyan); }
.term-prompt-line .tp-path { color: var(--purple); }
.term-prompt-line .tp-cmd  { color: var(--fg); }

.term-prompt-line::after {
  content: '';
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  background: var(--green);
  vertical-align: text-bottom;
  margin-left: 0.18em;
  border-radius: 1px;
  animation: cursor-blink 1.1s step-start infinite;
  box-shadow: 0 0 6px var(--green);
}

/* ════════════════════════════════════════════════════════════════
   NEOFETCH PANEL
   ════════════════════════════════════════════════════════════════ */
.neofetch-panel {
  background: rgba(49, 52, 71, 0.28);
  border: 1px solid rgba(98, 114, 164, 0.35);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.83rem;
  line-height: 1.85;
  color: var(--fg);
  position: sticky;
  top: 72px;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.3s, border-color 0.3s, background 0.3s;
}
.neofetch-panel:hover {
  background: rgba(49, 52, 71, 0.30);
  border: 2px solid var(--cyan);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.55),
    0 0 12px rgba(139, 233, 253, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
html.light .neofetch-panel {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(208, 215, 222, 0.55);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
html.light .neofetch-panel:hover {
  background: rgba(255, 255, 255, 0.28);
  border: 2px solid #0969da;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.13),
    0 0 12px rgba(9, 105, 218, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.nf-photo-wrap {
  margin-bottom: 1.25rem;
  position: relative;
  border-radius: 8px;
  overflow: hidden;           /* clips hover-zoom and scanline overlay cleanly */
}

.nf-photo-wrap img {
  width: 100%;               /* fills the neofetch panel's content width */
  aspect-ratio: 3 / 4;      /* portrait proportion — adjust if photo is different */
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  border: 2px solid var(--border);
  filter: saturate(0.88) contrast(1.02);
  display: block;
  transition: filter 0.35s, transform 0.35s, border-color 0.3s;
}

.nf-photo-wrap img:hover {
  filter: saturate(1.12) brightness(1.04) contrast(1.03);
  transform: scale(1.03);
  border-color: var(--cyan);
}

/* On single-column layout: cap and centre the photo */
@media (max-width: 900px) {
  .nf-photo-wrap img {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* On phones: let the photo fill the (already capped) panel */
@media (max-width: 500px) {
  .nf-photo-wrap img {
    max-width: 100%;
  }
}

.nf-user-line { font-size: 0.95rem; margin-bottom: 0.15rem; }
.nf-user  { color: var(--green);   font-weight: 700; }
.nf-at    { color: var(--comment); }
.nf-host  { color: var(--cyan);    font-weight: 700; }

.nf-sep { color: var(--border); margin: 0.25rem 0 0.5rem; letter-spacing: -1px; }

/* Grid-based rows: column 1 is a fixed key column so every colon aligns */
.nf-row {
  display: grid;
  grid-template-columns: 8.2rem auto 1fr;
  column-gap: 0.2rem;
  align-items: baseline;
}
.nf-key   { color: var(--cyan);    font-weight: 600; white-space: nowrap; }
.nf-colon { color: var(--comment); }
.nf-val   { color: var(--fg);      word-break: break-word; }

.nf-swatches {
  display: flex;
  gap: 4px;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.nf-swatch {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ════════════════════════════════════════════════════════════════
   HOME PAGE LAYOUT
   ════════════════════════════════════════════════════════════════ */
.home-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  align-items: start;
}

.home-right-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem 0;
  }

  /* Centre the aside card and prevent it from stretching to full page width */
  .neofetch-panel {
    position: static;
    max-width: 528px;
    margin: 0 auto;
    font-size: 0.9rem;    /* slightly larger — easier to read on bigger viewport */
  }

  /* Keep nf-rows readable: increase key column and allow value to wrap */
  .nf-key {
    min-width: 8rem;
  }
}

/* ════════════════════════════════════════════════════════════════
   CONTENT / PAGE WRAPPER
   ════════════════════════════════════════════════════════════════ */
.page-wrapper {
  max-width: 946px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

/* ════════════════════════════════════════════════════════════════
   POST PAGE
   ════════════════════════════════════════════════════════════════ */
.post-wrapper {
  max-width: 902px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.post-meta { font-size: 0.8rem; margin-bottom: 0.75rem; }

.post-date { color: var(--comment); }
.post-date::before { content: '# '; color: var(--border); }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 1.5rem;
}

/* ════════════════════════════════════════════════════════════════
   TAG BADGES
   ════════════════════════════════════════════════════════════════ */
.tag-badge {
  display: inline-flex;
  align-items: center;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.76rem;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
}
.tag-badge::before { content: '--'; color: var(--comment); margin-right: 2px; }
.tag-badge:hover   { background: var(--cyan); color: var(--bg); border-color: var(--cyan); }
.tag-badge:visited { color: var(--tag-text); }

/* ════════════════════════════════════════════════════════════════
   POST NAVIGATION
   ════════════════════════════════════════════════════════════════ */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.83rem;
}

/* ════════════════════════════════════════════════════════════════
   BLOG LIST
   ════════════════════════════════════════════════════════════════ */
.post-list-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.post-list-item:last-child { border-bottom: none; }

.post-list-title { font-size: 1.05rem; margin-bottom: 0.25rem; margin-top: 0; }
.post-list-title a { color: var(--fg); }
.post-list-title a:hover { color: var(--cyan); }

.post-list-meta { font-size: 0.78rem; color: var(--comment); margin-bottom: 0.4rem; }
.post-list-summary { color: var(--text-secondary); font-size: 0.86rem; margin-bottom: 0.5rem; }

.read-more {
  font-size: 0.8rem;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.read-more::after { content: ' →'; }
.read-more:hover { color: var(--cyan); }

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font-size: 0.83rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}
.pagination-bar a { color: var(--cyan); }
.pagination-bar a:hover { color: var(--pink); }

/* ════════════════════════════════════════════════════════════════
   INLINE CONTENT ELEMENTS
   ════════════════════════════════════════════════════════════════ */

blockquote {
  border-left: 3px solid var(--purple);
  margin: 1.25rem 0;
  padding: 0.6rem 1.25rem;
  background: rgba(189,147,249,0.06);
  border-radius: 0 4px 4px 0;
  color: var(--text-secondary);
  font-style: italic;
}
blockquote p { color: var(--text-secondary); margin-bottom: 0.5rem; }
blockquote p:last-child { margin-bottom: 0; }
blockquote cite:before { content: '\2014 \0020'; }

/* Highlighted text */
mark {
  background-color: #9a927899;
  color: #cad5e0;
  padding: 0.2rem 0.4rem;
  border-radius: 0.2rem;
}
html.light mark {
  background-color: #fff5d6;
  color: #281f04;
}

/* Inline code */
code {
  background: var(--code-bg);
  color: var(--pink);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.87em;
  border: 1px solid var(--border);
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}
pre code { background: none; border: none; padding: 0; color: var(--fg); font-size: 0.87rem; }

/* Tables */
table { border-collapse: collapse; width: 100%; margin-bottom: 1.25rem; font-size: 0.86rem; }
th, td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
th { background: var(--surface); color: var(--cyan); font-weight: 600; }
tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* Lists */
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li:not(:last-child) { margin-bottom: 6px; }

/* Flashy tick marks inside terminal body lists */
.term-body ul {
  list-style: none;
  padding-left: 0;
}
.term-body li {
  list-style: none;
  padding-left: 1.5em;
  position: relative;
}
.term-body li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent), 0 0 12px var(--accent);
  font-size: 0.85em;
  top: 0.1em;
  transition: text-shadow 0.2s;
}

/* HR */
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* Figures / lightbox */
figure {
  display: block;
  border: 4px solid var(--cyan);
  background: var(--surface);
  border-radius: 8px;
  max-width: 100%;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
  transition: border-color 0.3s, box-shadow 0.3s;
  margin-bottom: 1.5rem;
}
figure:hover {
  border-color: var(--pink);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.35),
    0 0 14px rgba(139,233,253,0.3);
}
figure a {
  display: block;
  line-height: 0;
  cursor: zoom-in;
}
figure img {
  width: 100%;
  height: auto;
  display: block;
}
figure figcaption {
  padding: 0.55rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--cyan) 6%, var(--surface));
  line-height: 1.5;
}
figure figcaption p { margin: 0; }
html.light figure {
  border-color: #0969da;
}
html.light figure:hover {
  border-color: #8250df;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.12),
    0 0 14px rgba(9,105,218,0.2);
}
/* ── GLightbox theme overrides ─────────────────────────── */
.glightbox-clean .gslide-description {
  background: rgba(30, 31, 48, 0.96);
  /* Let description scroll if very long instead of overflowing onto image */
  overflow-y: auto;
  max-height: 30vh;
  flex-shrink: 0;
}
.glightbox-clean .gdesc-inner .gslide-title {
  color: var(--red);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}
.glightbox-clean .gdesc-inner .gslide-desc {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.6;
}
.glightbox-clean .gnext,
.glightbox-clean .gprev {
  background: rgba(49, 52, 71, 0.75);
}
html.light .glightbox-clean .gslide-description {
  background: rgba(246, 248, 250, 0.97);
}
html.light .glightbox-clean .gdesc-inner .gslide-title {
  color: #0969da;
}
html.light .glightbox-clean .gdesc-inner .gslide-desc {
  color: #57606a;
}

/* On small screens GLightbox uses position:absolute for the caption
   (gradient overlay). Switch to a grid so image stays centered and
   caption scrolls in a fixed band at the bottom. */
@media (max-width: 768px) {
  /* Grid: image row gets remaining space, caption row is auto (capped) */
  .glightbox-clean .ginner-container {
    display: grid !important;
    grid-template-rows: 1fr auto;
    height: 100vh !important;
    overflow: hidden;
    align-items: stretch;
  }
  /* Image cell — center image, allow overflow so pinch-zoom can expand it */
  .glightbox-clean .gslide-media {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 0;
    overflow: visible;
  }
  .glightbox-clean .gslide-media img {
    /* Don't hard-cap height here — GLightbox's zoom transform needs room */
    max-width: 100vw !important;
    width: auto !important;
    object-fit: contain;
    touch-action: pinch-zoom;
  }
  /* Caption cell — pull out of absolute overlay, make scrollable */
  .glightbox-clean .gslide-description {
    position: relative !important;
    bottom: auto !important;
    background: rgba(30, 31, 48, 0.97) !important;
    background-image: none !important;
    max-height: 28vh !important;
    overflow-y: auto !important;
    padding: 0.75rem 1rem 1rem !important;
  }
  html.light .glightbox-clean .gslide-description {
    background: rgba(246, 248, 250, 0.98) !important;
  }
}

/* Video wrapper */
.videowrapper { position: relative; overflow: hidden; height: 0; width: 100%; padding-bottom: 56.25%; margin-bottom: 1.25rem; }
.videowrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ════════════════════════════════════════════════════════════════
   ADMONITIONS
   ════════════════════════════════════════════════════════════════ */
/* ── Base box — admonition ext (div.admonition.note) AND
      customblocks ext (div.note only) both covered ──────────────────── */
div.admonition,
div.note, div.important,
div.warning, div.caution, div.attention,
div.danger, div.error,
div.hint, div.tip {
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 6px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  background: var(--surface);
}
div.admonition p,
div.note p, div.important p,
div.warning p, div.caution p, div.attention p,
div.danger p, div.error p,
div.hint p, div.tip p {
  margin: 0.5rem 1rem;
  padding: 0;
  color: var(--text-primary);
}
div.admonition p.admonition-title,
div.note p.admonition-title, div.important p.admonition-title,
div.warning p.admonition-title, div.caution p.admonition-title, div.attention p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.hint p.admonition-title, div.tip p.admonition-title {
  font-weight: 700;
  padding: 0.4rem 1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #282471;
  /* Light mode: make title color darker for light backgrounds */
  html.light & {
    color: #b7bfeb;
  }
}
div.admonition ul, div.admonition ol,
div.note ul, div.note ol, div.tip ul, div.tip ol,
div.warning ul, div.warning ol, div.danger ul, div.danger ol,
div.hint ul, div.hint ol, div.important ul, div.important ol {
  margin: 0.25rem 1rem 0.5rem 2rem;
  padding: 0;
}

/* ── note — cyan ─────────────────────────────────────────────────────── */
div.note, div.important {
  border-left-color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 8%, var(--surface));
}
div.note p.admonition-title,
div.important p.admonition-title           { background: var(--cyan); }
div.note p.admonition-title::before,
div.important p.admonition-title::before   { font-family: "bootstrap-icons"; content: "\f431"; }

/* ── warning — orange ───────────────────────────────────────────────── */
div.warning, div.caution, div.attention {
  border-left-color: var(--orange);
  background: color-mix(in srgb, var(--orange) 8%, var(--surface));
}
div.warning p.admonition-title,
div.caution p.admonition-title,
div.attention p.admonition-title           { background: var(--orange); }
div.warning p.admonition-title::before,
div.caution p.admonition-title::before,
div.attention p.admonition-title::before   { font-family: "bootstrap-icons"; content: "\f33a"; }

/* ── danger / error — red ───────────────────────────────────────────── */
div.danger, div.error {
  border-left-color: var(--red);
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
}
div.danger p.admonition-title,
div.error p.admonition-title               { background: var(--red); color: #fff; }
div.danger p.admonition-title::before,
div.error p.admonition-title::before       { font-family: "bootstrap-icons"; content: "\f31a"; }

/* ── hint — green ───────────────────────────────────────────────────── */
div.hint {
  border-left-color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
}
div.hint p.admonition-title               { background: var(--green); }
div.hint p.admonition-title::before       { font-family: "bootstrap-icons"; content: "\F468"; }

/* ── tip — pink ─────────────────────────────────────────────────────── */
div.tip {
  border-left-color: var(--purple);
  background: color-mix(in srgb, var(--purple) 8%, var(--surface));
}
div.tip p.admonition-title                { background: var(--purple); }
div.tip p.admonition-title::before        { font-family: "bootstrap-icons"; content: "\f7f6"; }

/* ════════════════════════════════════════════════════════════════
   FOOTER — 3-column grid
   ════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding: 1.75rem 1.5rem;
  font-size: 0.82rem;
  color: #adbac7;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem 2rem;
  max-width: 1210px;
  margin: 0 auto;
}

/* Column 1 — exit line + credits */
.footer-col-info {
  text-align: left;
}

.footer-exit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}
.footer-exit .fe-prompt { color: #50fa7b; }
.footer-exit .fe-cmd    { color: #f8f8f2; }
.footer-exit .fe-code   { color: #8be9fd; }

.footer-credits {
  color: #adbac7;
  font-size: 0.78rem;
  line-height: 1.6;
}
.footer-credits a                      { color: #8be9fd; text-decoration: none; }
.footer-credits a:visited              { color: #8be9fd; }
.footer-credits a:hover,
.footer-credits a:visited:hover        { color: #ff79c6; }

/* Column 2 — social icons */
.footer-col-social {
  text-align: center;
}

.footer-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6e7681;
  margin-bottom: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
}

.footer-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.1rem;
}
.footer-icons a {
  color: #adbac7;
  font-size: 1.5rem;
  transition: color 0.15s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: 1.5rem;
}
.footer-icons a:visited                { color: #adbac7; }
.footer-icons a:hover,
.footer-icons a:visited:hover          { color: #8be9fd; transform: translateY(-2px); }

/* Normalise Bootstrap Icons and Font Awesome to the same baseline */
.footer-icons i {
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
  font-size: 1.5rem;
}
/* Font Awesome's em-square is slightly taller — nudge it down 1px to match BI */
.footer-icons .fa-brands,
.footer-icons .fa-solid,
.footer-icons .fa-regular {
  font-size: 1.45rem;
  position: relative;
  top: 1px;
}

/* Column 3 — logos (2 × 2 grid) */
.footer-col-logos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 0.85rem 1.25rem;
}

.footer-col-logos a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-col-logos a:nth-child(2),
.footer-col-logos a:nth-child(4) { justify-self: start; }

.footer-col-logos img {
  height: 44px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  opacity: 0.55;
  filter: brightness(1.8) grayscale(0.2);
  transition: opacity 0.2s, transform 0.2s;
  display: block;
}
.footer-col-logos img:hover { opacity: 1; transform: scale(1.05); }

/* Stack to single column on mobile */
@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-col-info   { text-align: center; }
  .footer-col-logos  { justify-items: center; }
  .footer-exit       { white-space: normal; }
}

/* ════════════════════════════════════════════════════════════════
   BACK TO TOP
   ════════════════════════════════════════════════════════════════ */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--back-top-bg);
  color: var(--back-top-color);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.2s;
  z-index: 300;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { transform: translateY(-2px); filter: brightness(1.15); }

/* ════════════════════════════════════════════════════════════════
   SEARCH MODAL
   ════════════════════════════════════════════════════════════════ */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 1rem 1rem;
}
.search-modal.hidden { display: none; }

.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px);
}

.search-modal-box {
  position: relative;
  width: 100%;
  max-width: 682px;
  background: var(--search-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  z-index: 1;
}

.search-modal-header {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}

.search-modal-prompt {
  color: var(--green);
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
  user-select: none;
  flex-shrink: 0;
}

#search-modal-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  caret-color: var(--green);
}
#search-modal-input::placeholder { color: var(--comment); }

.search-modal-close {
  background: none;
  border: none;
  color: var(--comment);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 3px;
  font-size: 0.88rem;
  flex-shrink: 0;
  transition: color 0.15s;
  font-family: 'JetBrains Mono', monospace;
}
.search-modal-close:hover { color: var(--fg); }

.search-modal-shortcut {
  padding: 0.3rem 1rem;
  font-size: 0.7rem;
  color: var(--comment);
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}
.search-modal-shortcut kbd {
  background: var(--border);
  color: var(--fg);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.68rem;
}

.search-modal-results {
  max-height: 520px;
  overflow-y: auto;
  padding: 0.4rem 0;
}

.search-modal-empty {
  padding: 1.75rem 1rem;
  color: var(--comment);
  text-align: center;
  font-size: 0.86rem;
}

.search-result-item {
  display: block;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(68,71,90,0.5);
  transition: background 0.1s;
  text-decoration: none;
  color: inherit;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover, .search-result-item.active { background: var(--search-hover); }
.search-result-item:visited { color: inherit; }

.search-result-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 0.2rem;
}
.search-result-title b { background: rgba(80,250,123,0.25); color: var(--green); border-radius: 2px; font-weight: inherit; }

.search-result-preview {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-top: 0.25rem;
}
.search-result-preview b { color: var(--fg); background: rgba(80,250,123,0.12); border-radius: 2px; font-weight: inherit; }

/* ════════════════════════════════════════════════════════════════
   404 PAGE
   ════════════════════════════════════════════════════════════════ */
.error-wrapper {
  max-width: 660px;
  margin: 5rem auto;
  padding: 0 1.5rem;
  text-align: center;
}
.error-code {
  font-size: 5rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  margin-bottom: 1rem;
}

/* ════════════════════════════════════════════════════════════════
   TERMINAL WINDOW DOTS — INTERACTIONS
   Red   = collapse/expand body
   Yellow = dim/restore (send to background)
   Green  = maximize / reading overlay
   ════════════════════════════════════════════════════════════════ */

/* Make all dots interactive */
.td {
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}
.td:hover { transform: scale(1.25); filter: brightness(1.3); }

/* Red: collapsed state */
.term-window.collapsed .term-body { display: none; }

/* Yellow: dimmed state — filter persists even while hovering */
.term-window.dimmed {
  filter: grayscale(0.85) brightness(0.4);
  transition: filter 0.25s;
}
.term-window.dimmed .td.y {
  box-shadow: 0 0 0 2px #febc2e, 0 0 6px rgba(254,188,46,0.6);
}

/* Green: maximized / reading overlay */
.term-window-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 490;
}
html.light .term-window-overlay {
  background: rgba(0, 0, 0, 0.40);
}

.term-window.maximized {
  position: fixed;
  inset: 3rem;
  z-index: 500;
  overflow-y: auto;
  border-radius: 10px;
  max-width: none;
  width: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  /* Solid background so content is fully legible regardless of overlay */
  background: rgba(40, 42, 54, 0.97);
  backdrop-filter: blur(0px);
}
html.light .term-window.maximized {
  background: rgba(255, 255, 255, 0.98);
}

/* Escape hint shown when maximized */
.term-window.maximized .term-titlebar::after {
  content: 'press Esc or click green dot to restore';
  font-size: 0.7rem;
  color: var(--yellow);
  margin-left: auto;
  pointer-events: none;
}
html.light .term-window.maximized .term-titlebar::after {
  color: var(--comment);
}

@media (max-width: 768px) {
  .term-window.maximized {
    inset: 0;
    border-radius: 0;
  }
}

/* ════════════════════════════════════════════════════════════════
   NEOFETCH SWATCHES — ACCENT SWITCHER
   ════════════════════════════════════════════════════════════════ */
.nf-swatch {
  transition: transform 0.15s, box-shadow 0.15s;
}
.nf-swatch:hover {
  transform: scale(1.2);
  box-shadow: 0 0 6px rgba(255,255,255,0.3);
}
.nf-swatch.nf-swatch-active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg);
  outline: none;
}
.nf-swatch:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ════════════════════════════════════════════════════════════════
   PRINT
   ════════════════════════════════════════════════════════════════ */
@media print {
  .site-nav, .site-footer, #back-to-top, .search-modal { display: none; }
  body { background: white; color: black; }
}
