/* ==========================================================================
   ShrinkOS — Core Terminal Design System & Shared Framework (css/main.css)
   STRICTLY Vanilla CSS3 — Zero External Libraries / CDNs
   ========================================================================== */

:root {
  --bg: #070a0f;
  --bg-alt: #0b1017;
  --surface: #101622;
  --surface-card: #131b28;
  --surface-hover: #192334;
  --surface-accent: rgba(122, 162, 247, 0.08);

  --text: #c0caf5;
  --text-bright: #e4edff;
  --text-muted: #5f6c8d;
  --text-dim: #3d4663;

  --accent: #7aa2f7;
  --accent-cyan: #7dcfff;
  --accent-green: #9ece6a;
  --accent-amber: #e0af68;
  --accent-red: #f7768e;
  --accent-purple: #bb9af7;

  --border: rgba(122, 162, 247, 0.22);
  --border-subtle: rgba(122, 162, 247, 0.12);
  --border-bright: rgba(122, 162, 247, 0.45);
  --border-green: rgba(158, 206, 106, 0.35);

  --glow: 0 0 16px rgba(122, 162, 247, 0.22);
  --glow-green: 0 0 16px rgba(158, 206, 106, 0.25);
  --glow-red: 0 0 16px rgba(247, 118, 142, 0.25);

  --mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

  --r: 8px;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
}

/* Matrix Neon Green Theme */
[data-theme="matrix"] {
  --bg: #040804;
  --bg-alt: #070e07;
  --surface: #0a150a;
  --surface-card: #0d1c0d;
  --surface-hover: #132713;
  --surface-accent: rgba(74, 222, 128, 0.08);
  --text: #86efac;
  --text-bright: #dcfce7;
  --text-muted: #4ade80;
  --text-dim: #166534;
  --accent: #4ade80;
  --accent-cyan: #22c55e;
  --accent-green: #4ade80;
  --accent-amber: #eab308;
  --accent-red: #ef4444;
  --border: rgba(74, 222, 128, 0.25);
  --border-subtle: rgba(74, 222, 128, 0.14);
  --border-bright: rgba(74, 222, 128, 0.55);
  --glow: 0 0 16px rgba(74, 222, 128, 0.3);
  --glow-green: 0 0 18px rgba(74, 222, 128, 0.4);
}

/* Cyberpunk Amber Mainframe Theme */
[data-theme="amber"] {
  --bg: #0b0702;
  --bg-alt: #130d04;
  --surface: #1a1106;
  --surface-card: #221708;
  --surface-hover: #2e1f0b;
  --surface-accent: rgba(245, 158, 11, 0.08);
  --text: #fde68a;
  --text-bright: #fef3c7;
  --text-muted: #d97706;
  --text-dim: #92400e;
  --accent: #f59e0b;
  --accent-cyan: #fbbf24;
  --accent-green: #84cc16;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --border: rgba(245, 158, 11, 0.25);
  --border-subtle: rgba(245, 158, 11, 0.14);
  --border-bright: rgba(245, 158, 11, 0.55);
  --glow: 0 0 16px rgba(245, 158, 11, 0.3);
  --glow-green: 0 0 18px rgba(132, 204, 22, 0.4);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 85% 5%, rgba(122, 162, 247, 0.07), transparent 32rem),
    radial-gradient(circle at 15% 45%, rgba(158, 206, 106, 0.04), transparent 28rem);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  position: relative;
  overflow-x: hidden;
}

/* Subtle background terminal grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(122, 162, 247, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 162, 247, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* CRT Scanline Glow Overlay */
body::after {
  content: " ";
  display: block;
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%),
              linear-gradient(90deg, rgba(255, 0, 0, 0.015), rgba(0, 255, 0, 0.008), rgba(0, 0, 255, 0.015));
  z-index: 9999;
  background-size: 100% 3px, 6px 100%;
  pointer-events: none;
  opacity: 0.75;
}

/* --------------------------------------------------------------------------
   Custom Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #1c2536;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   Layout Shell & Containers
   -------------------------------------------------------------------------- */
.shell {
  width: min(1140px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10000;
  transform: translateY(-250%);
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.75rem;
  text-decoration: none;
  border-radius: var(--r);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Top Status Bar (Persistent System Bar)
   -------------------------------------------------------------------------- */
.system-bar {
  background: rgba(5, 8, 12, 0.94);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  position: relative;
  z-index: 50;
}

.system-bar .shell {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  overflow-x: auto;
  white-space: nowrap;
}

.system-bar-left,
.system-bar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.system-bar b {
  color: var(--text-dim);
  font-weight: normal;
}

.system-bar strong {
  color: var(--accent-green);
  font-weight: 600;
}

.led {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: ledPulse 2s ease-in-out infinite;
}

.led.amber {
  background-color: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

@keyframes ledPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.9); }
}

/* --------------------------------------------------------------------------
   Persistent Navigation Header
   -------------------------------------------------------------------------- */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 13, 20, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-header .shell {
  min-height: 62px;
  display: flex;
  align-items: center;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-bright);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-badge {
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  background: rgba(122, 162, 247, 0.1);
  color: var(--accent-green);
  font-size: 0.78rem;
}

.brand em {
  font-style: normal;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  overflow-x: auto;
  padding: 0.25rem 0;
}

.nav-links a,
.nav-links button {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-links a:hover,
.nav-links button:hover {
  color: var(--text-bright);
  border-color: var(--border);
  background: var(--surface);
}

.nav-links a[aria-current="page"],
.nav-links a.active {
  color: var(--accent);
  background: rgba(122, 162, 247, 0.1);
  border-color: var(--border-bright);
  box-shadow: 0 0 10px rgba(122, 162, 247, 0.15);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-console {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-console:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.btn-console kbd {
  display: inline-block;
  padding: 0.1rem 0.3rem;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Typography & Shared Utilities
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--text-bright);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border-subtle);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
}

.section-head p {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 480px;
}

.buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.1rem;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.button.primary {
  background: var(--accent);
  color: #060b13;
  box-shadow: 0 4px 14px rgba(122, 162, 247, 0.35);
}

.button.primary:hover {
  background: var(--accent-cyan);
  box-shadow: 0 6px 20px rgba(125, 207, 255, 0.45);
  transform: translateY(-2px);
}

.button.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-bright);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.button.outline-green {
  background: transparent;
  border-color: var(--border-green);
  color: var(--accent-green);
}

.button.outline-green:hover {
  background: rgba(158, 206, 106, 0.1);
  box-shadow: var(--glow-green);
}

/* Filter Buttons */
.filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--accent-cyan);
  border-color: var(--accent);
  background: rgba(122, 162, 247, 0.1);
}

/* --------------------------------------------------------------------------
   Hero Section (index.html)
   -------------------------------------------------------------------------- */
.hero {
  padding: 4.5rem 0 3.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 1.05;
  margin: 0.8rem 0 1.2rem;
  letter-spacing: -0.05em;
}

.hero h1 span {
  display: block;
  font-size: 0.52em;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 0.2rem;
}

.hero-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  line-height: 1.65;
}

/* Academic Bio Grid */
.bio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.bio-card {
  padding: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r);
  background: var(--surface);
}

.bio-card dt {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bio-card dd {
  margin-top: 0.35rem;
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}

.bio-card small {
  display: block;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 400;
  margin-top: 0.2rem;
}

/* Interactive ASCII Cat Mascot Box */
.cat-box {
  width: 100%;
}

.cat-btn {
  position: relative;
  width: 100%;
  padding: 1.4rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: linear-gradient(135deg, rgba(122, 162, 247, 0.08), transparent 70%), var(--surface-card);
  color: var(--accent-green);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}

.cat-btn:hover {
  border-color: var(--accent-green);
  box-shadow: 0 0 20px rgba(158, 206, 106, 0.2);
  transform: translateY(-2px);
}

.cat-art {
  font-family: var(--mono);
  font-size: 1.1rem;
  line-height: 1.2;
  white-space: pre;
  color: var(--accent-green);
  text-shadow: 0 0 10px rgba(158, 206, 106, 0.3);
  animation: mascotIdleBreathe 4s ease-in-out infinite;
}

.cat-label {
  display: block;
  margin-top: 1rem;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.cat-bubble {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.8rem);
  width: 240px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-bright);
  border-radius: var(--r);
  background: var(--surface-hover);
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.7rem;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.cat-bubble.show {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Terminal Window Cards & Architecture Drawers
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.terminal-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.terminal-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), var(--glow);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  background: #090e15;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 0.32rem;
}

.terminal-dots i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background-color: var(--accent-red); }
.dot-amber { background-color: var(--accent-amber); }
.dot-green { background-color: var(--accent-green); }

.terminal-filename {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.terminal-status-dot {
  color: var(--accent-green);
  font-size: 0.65rem;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.card-body h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
}

/* Spec Tags */
.spec-tags {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.spec-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--accent-cyan);
  background: rgba(125, 207, 255, 0.08);
  border: 1px solid rgba(125, 207, 255, 0.18);
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tech-pills span {
  padding: 0.18rem 0.4rem;
  background: rgba(122, 162, 247, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: #b3c5ee;
  font-family: var(--mono);
  font-size: 0.62rem;
}

/* Architecture Drawer & Visual Pipeline */
.blueprint-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  transition: color 0.2s ease;
}

.blueprint-toggle:hover {
  color: var(--accent-cyan);
}

.blueprint-drawer {
  margin-top: 0.85rem;
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  background: #080c14;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Blueprint Tab Navigation */
.blueprint-tabs {
  display: flex;
  background: #06090e;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.blueprint-tab-btn {
  padding: 0.45rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.blueprint-tab-btn:hover {
  color: var(--text-bright);
  background: rgba(122, 162, 247, 0.05);
}

.blueprint-tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(122, 162, 247, 0.1);
}

.blueprint-tab-pane {
  padding: 0.9rem;
}

.blueprint-tab-pane[hidden] {
  display: none;
}

/* Visual Node Pipeline Flow */
.pipeline-flow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.2rem;
}

.pipeline-node {
  flex: 1;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
  transition: all 0.2s ease;
}

.pipeline-node:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.node-tag {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--accent);
  text-transform: uppercase;
}

.node-title {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.25;
}

.node-tensor {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--accent-green);
  background: rgba(158, 206, 106, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  display: inline-block;
  white-space: nowrap;
}

.node-metric {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

.pipeline-arrow {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding: 0 0.1rem;
  user-select: none;
  animation: arrowPulse 2s infinite ease-in-out;
}

@keyframes arrowPulse {
  0%, 100% { opacity: 0.5; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(3px); }
}

/* Blueprint Specs Grid */
.blueprint-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.spec-item {
  background: rgba(122, 162, 247, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.5rem 0.7rem;
}

.spec-item strong {
  display: block;
  color: var(--accent-cyan);
  font-size: 0.62rem;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.spec-item span {
  color: var(--text);
}

/* RHCSA Credential Badge & Highlights */
.rhcsa-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border-radius: 4px;
  padding: 0.18rem 0.45rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
}

.rhcsa-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

/* Status Bar Interactive Toggles */
.system-status-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.system-status-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--accent);
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
}

.card-link {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.card-link:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Tools Page Layout (tools.html)
   -------------------------------------------------------------------------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.tool-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tool-card.wide {
  grid-column: span 2;
}

.tool-card h3 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-preset-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tool-preset-bar button {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-preset-bar button:hover {
  color: var(--accent-cyan);
  border-color: var(--accent);
}

.terminal-textarea {
  width: 100%;
  min-height: 140px;
  padding: 0.75rem;
  background: #090e15;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  resize: vertical;
  outline: 0;
}

.terminal-textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.feedback {
  min-height: 1.3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-green);
}

.feedback.error {
  color: var(--accent-red) !important;
}

.output-box {
  background: #090e15;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent-green);
  white-space: pre-wrap;
  min-height: 80px;
}

/* Context Progress Bars */
.context-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.75rem;
}

.context-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.context-track {
  width: 100%;
  height: 6px;
  background: #090e15;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.context-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  border-radius: inherit;
  transition: width 0.2s ease;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  margin-top: auto;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 8, 12, 0.9);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.footer .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Command Palette & Full-Screen Terminal Console (⌘K Console)
   -------------------------------------------------------------------------- */
.terminal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(5, 8, 12, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.terminal-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.25rem;
  background: #090e15;
  border-bottom: 1px solid var(--border);
  color: var(--accent-green);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.terminal-close-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  transition: color 0.2s ease;
}

.terminal-close-btn:hover {
  color: var(--accent-red);
}

.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  width: min(960px, 100%);
  margin-inline: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
}

.terminal-log-line {
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-log-line.cmd {
  color: var(--accent-cyan);
  font-weight: 600;
}

.terminal-log-line.success {
  color: var(--accent-green);
}

.terminal-log-line.error {
  color: var(--accent-red);
}

.terminal-log-line.amber {
  color: var(--accent-amber);
}

.terminal-log-line.dim {
  color: var(--text-muted);
}

.terminal-input-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #090e15;
  border-top: 1px solid var(--border);
  width: min(960px, 100%);
  margin-inline: auto;
}

.terminal-prompt-sym {
  color: var(--accent-green);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
}

.terminal-cli-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Gated Resume Decryption Modal
   -------------------------------------------------------------------------- */
dialog#resume-modal {
  width: min(480px, calc(100% - 2rem));
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), var(--glow);
}

dialog#resume-modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
}

.resume-form-box {
  position: relative;
  padding: 1.75rem;
}

.modal-close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--accent-red);
}

.resume-form-box h2 {
  font-size: 1.25rem;
  margin: 0.4rem 0 1rem;
}

.resume-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.resume-input-field {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.85rem;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.resume-input-field:focus {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.resume-feedback {
  min-height: 1.4rem;
  margin: 0.75rem 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.resume-feedback.success {
  color: var(--accent-green);
}

.resume-feedback.error {
  color: var(--accent-red);
}

.resume-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.resume-request-btn {
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.resume-request-btn:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Pure Mascot Cinematic Bootloader (js/boot.js)
   -------------------------------------------------------------------------- */
#boot-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background-color: #07090e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  font-family: var(--mono);
  color: #c0caf5;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  padding: 2rem;
  text-align: center;
  user-select: none;
}

#boot-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-cat-art {
  font-family: var(--mono);
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(122, 162, 247, 0.6), 0 0 35px rgba(122, 162, 247, 0.3);
  white-space: pre;
  user-select: none;
  animation: bootCatPulse 2.2s ease-in-out infinite;
  margin: 0;
}

@keyframes bootCatPulse {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 0 10px rgba(122, 162, 247, 0.4));
  }
  50% {
    transform: translateY(-8px);
    filter: drop-shadow(0 0 25px rgba(122, 162, 247, 0.7));
  }
}

.boot-progress-shell {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.boot-progress-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(122, 162, 247, 0.25);
  background: rgba(255, 255, 255, 0.04);
  overflow: visible;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.boot-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-green));
  transition: width 0.08s linear;
  box-shadow: 0 0 12px rgba(122, 162, 247, 0.6);
}

.boot-progress-cat {
  position: absolute;
  top: -12px;
  left: -14px;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-green);
  line-height: 1;
  transition: left 0.08s linear;
  filter: drop-shadow(0 0 8px rgba(158, 206, 106, 0.7));
  white-space: nowrap;
  pointer-events: none;
}

.boot-progress-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Living Desktop Mascot Companion Widget (js/terminal.js)
   -------------------------------------------------------------------------- */
.mascot-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.mascot-bubble {
  background: rgba(14, 21, 32, 0.95);
  border: 1px solid rgba(122, 162, 247, 0.35);
  border-radius: var(--r);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--accent-purple);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), var(--glow);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 250px;
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.mascot-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mascot-art-box {
  pointer-events: auto;
  background: rgba(13, 20, 30, 0.92);
  border: 1px solid rgba(122, 162, 247, 0.25);
  border-radius: var(--r);
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: pre;
  color: var(--accent-green);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(158, 206, 106, 0.15);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(12px);
  animation: mascotIdleBreathe 4s ease-in-out infinite;
}

@keyframes mascotIdleBreathe {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.mascot-art-box:hover {
  transform: translateY(-4px) scale(1.08);
  border-color: var(--accent-green);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(158, 206, 106, 0.35);
}

.mascot-art-box:active {
  transform: translateY(-2px) scale(0.98);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .cat-box {
    max-width: 320px;
    margin-inline: auto;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .tool-card.wide {
    grid-column: auto;
  }
  .bio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-header .shell {
    min-height: auto;
    padding: 0.5rem 0;
  }
  .primary-nav {
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
  }
  .primary-nav .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.25rem 0;
    gap: 0.35rem;
  }
  .primary-nav .nav-links::-webkit-scrollbar {
    display: none;
  }
  .primary-nav .nav-links a,
  .primary-nav .nav-links button {
    font-size: 0.68rem;
    padding: 0.35rem 0.6rem;
  }
  .mascot-widget {
    bottom: 0.75rem;
    right: 0.75rem;
  }
  .mascot-bubble {
    max-width: 190px;
    font-size: 0.68rem;
  }
}

@media (max-width: 550px) {
  .shell {
    width: calc(100% - 1.5rem);
  }
  .hero {
    padding: 2.5rem 0 2rem;
  }
  .hero h1 {
    font-size: clamp(1.85rem, 8vw, 2.3rem);
    line-height: 1.15;
  }
  .hero-intro {
    font-size: 0.88rem;
  }
  .bio-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .buttons .button {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  .system-bar b {
    display: none;
  }
  .system-bar .shell {
    font-size: 0.65rem;
    gap: 0.5rem;
  }
  .terminal-modal {
    padding: 0;
  }
  .terminal-topbar {
    padding: 0.65rem 0.85rem;
    font-size: 0.72rem;
  }
  .terminal-body {
    padding: 0.85rem;
    font-size: 0.73rem;
  }
  .terminal-input-bar {
    padding: 0.65rem 0.85rem;
  }
  .spec-drawer-content {
    grid-template-columns: 1fr;
  }
  .pipeline-node {
    min-width: 130px;
  }
  .boot-cat-art {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
