/* ==========================================================================
   SUHANI SINGHANIA — SDE PORTFOLIO SYSTEM STYLES (v2.4)
   ========================================================================== */

/* ------------ THEME TOKENS: DARK CYBERPUNK IDE (DEFAULT) ------------ */
:root, body.theme-dark {
  --bg: #0B0F19;                  /* Obsidian background */
  --bg-alt: #111827;              /* Deep slate alt section */
  --surface: #1E293B;             /* Panel surface */
  --surface-hover: #334155;
  --border: #334155;              /* Border line */
  --border-soft: #1E293B;
  
  --text: #F8FAFC;                /* Bright crisp text */
  --text-muted: #94A3B8;          /* Slate secondary text */
  --text-dim: #64748B;            /* Muted tan/dim text */

  --accent: #38BDF8;              /* Electric cyan key */
  --accent-dim: #0284C7;
  --accent-2: #F472B6;            /* Neon pink / strings */
  --accent-soft: rgba(56, 189, 248, 0.12);
  --amber-soft: rgba(251, 191, 36, 0.15);
  
  --type: #4ADE80;                /* Emerald green — types/keys */
  --danger: #F87171;              /* Crimson danger */
  --warning: #FBBF24;

  --sidebar-bg: #0F172A;          /* Dark navy sidebar */
  --sidebar-text: #F8FAFC;
  --sidebar-muted: #64748B;
  --sidebar-border: #1E293B;

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --sidebar-w: 240px;
  --topbar-h: 56px;
  --statusbar-h: 32px;
  --radius: 10px;
}

/* ------------ THEME TOKENS: SOFT CREAM LIGHT MODE ------------ */
body.theme-cream {
  --bg: #FEFAE0;                  /* Soft cream background */
  --bg-alt: #FBF2CE;              /* Deeper cream alt section */
  --surface: #FFFEF6;             /* Near-white surface */
  --surface-hover: #F8F3DB;
  --border: #E7D9A6;              /* Tan border */
  --border-soft: #EFE3B8;

  --text: #283618;                /* Dark olive green */
  --text-muted: #5C6B3B;          /* Olive secondary */
  --text-dim: #A08F5E;            /* Dim tan */

  --accent: #BC6C25;              /* Rust key */
  --accent-dim: #A15C1E;
  --accent-2: #DDA15E;            /* Tan accent */
  --accent-soft: rgba(188, 108, 37, 0.12);
  --amber-soft: rgba(221, 161, 94, 0.20);

  --type: #606C38;                /* Dark olive type */
  --danger: #B3402A;
  --warning: #D97706;

  --sidebar-bg: #283618;          /* Dark green sidebar */
  --sidebar-text: #FEFAE0;
  --sidebar-muted: #A9B98C;
  --sidebar-border: #35461F;
}

/* ------------ RESET & BASE ------------ */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; overflow-x:hidden; width:100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  transition: background 0.3s ease, color 0.3s ease;
}

::selection { background: var(--accent); color: #000; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }
ul { list-style: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

/* Background Canvas */
#bgCanvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

/* Syntax tokens */
.kw { color: var(--accent); font-weight: 600; }
.type { color: var(--type); font-weight: 600; }
.str { color: var(--accent-2); }
.key { color: var(--type); }
.punct { color: var(--text-dim); }
.comment { color: var(--text-dim); font-style: italic; }

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { width: min(380px, 85vw); text-align: left; }
.boot-logo { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.preloader-inner p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.progress-track {
  width: 100%; height: 4px; background: var(--border);
  border-radius: 2px; overflow: hidden; margin-bottom: 12px;
}
.progress-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent);
  transition: width 0.15s ease;
}
.boot-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-dim); }
.progress-pct { color: var(--accent); font-weight: 600; }

/* ============ IDE SHELL LAYOUT ============ */
.ide-shell {
  min-height: 100vh; position: relative; z-index: 10;
  opacity: 0; transition: opacity 0.5s ease;
}
.ide-shell.ready { opacity: 1; }

/* ---- SIDEBAR ---- */
.sidebar {
  position: fixed; top:0; left:0; bottom:0; width: var(--sidebar-w);
  background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column;
  z-index: 100; transition: transform 0.3s ease;
}
.sidebar-top {
  padding: 16px 18px; font-size: 0.82rem; color: var(--sidebar-muted);
  border-bottom: 1px solid var(--sidebar-border);
  display: flex; align-items: center; justify-content: space-between;
}
.folder-icon { color: var(--accent-2); margin-right: 4px; }

.file-tree { display: flex; flex-direction: column; padding: 10px 0; flex: 1; overflow-y: auto; }
.file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--sidebar-muted); border-left: 2px solid transparent;
  transition: all 0.15s ease;
}
.file-icon { font-size: 0.65rem; font-weight: 700; width: 18px; display: inline-block; }
.file-icon.md-icon { color: #38BDF8; }
.file-icon.js-icon { color: #FBBF24; }
.file-icon.json-icon { color: #4ADE80; }
.file-icon.sim-icon { color: #F472B6; }
.file-icon.game-icon { color: #A855F7; }
.file-icon.yaml-icon { color: #FB923C; }
.file-icon.sh-icon { color: #34D399; }

.file-item:hover { background: rgba(255,255,255,0.05); color: var(--sidebar-text); }
.file-item.active {
  background: rgba(56, 189, 248, 0.15); color: var(--accent);
  border-left-color: var(--accent); font-weight: 600;
}

/* Sidebar Widgets */
.sidebar-widgets { padding: 14px 16px; border-top: 1px solid var(--sidebar-border); }
.system-health-card {
  background: rgba(0,0,0,0.25); border: 1px solid var(--sidebar-border);
  border-radius: 6px; padding: 10px 12px; font-size: 0.7rem;
}
.health-header { display: flex; align-items: center; justify-content: space-between; color: var(--sidebar-muted); margin-bottom: 6px; }
.health-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 8px #4ADE80; }
.health-bar { width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.health-fill { height: 100%; background: #4ADE80; }
.health-meta { display: flex; justify-content: space-between; color: var(--sidebar-muted); font-size: 0.65rem; }

.sidebar-footer {
  padding: 14px 18px; display: flex; gap: 16px;
  border-top: 1px solid var(--sidebar-border); font-size: 0.76rem;
}
.sidebar-footer a { color: var(--sidebar-muted); display: flex; align-items: center; gap: 5px; }
.sidebar-footer a:hover { color: var(--accent); }
.social-svg { width: 14px; height: 14px; }

/* ---- MAIN COLUMN ---- */
.main-col {
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-height: 100vh;
}

/* ---- TOPBAR / TOOLBAR ---- */
.topbar {
  position: sticky; top:0; z-index: 90;
  height: var(--topbar-h);
  background: rgba(11, 15, 25, 0.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center;
  padding: 0 14px; gap: 10px;
  transition: background 0.3s ease;
}
body.theme-cream .topbar { background: rgba(254, 250, 224, 0.90); }

.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 34px; height: 34px; background: none; border: none; cursor: pointer;
  flex-shrink: 0;
}
.hamburger span { width: 100%; height: 2px; background: var(--text-muted); border-radius: 2px; }

.tabbar {
  flex: 1; display: flex; overflow-x: auto; scrollbar-width: none; height: 100%;
}
.tabbar::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 0 16px; height: 100%; font-size: 0.78rem; color: var(--text-dim);
  border-right: 1px solid var(--border-soft); border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); transition: background 0.15s ease; }
.tab:hover { color: var(--text-muted); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.tab.active .tab-dot { background: var(--accent); }
.tab-highlight { color: #A855F7; font-weight: 600; }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ctrl-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 6px; font-size: 0.72rem; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-muted);
  background: var(--surface); transition: all 0.15s ease;
}
.ctrl-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.ctrl-primary { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.ctrl-primary:hover { background: var(--accent); color: #000; }

.run-btn {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0; background: linear-gradient(135deg, #A855F7, #EC4899); color: #FFF;
  font-size: 0.76rem; font-weight: 700; padding: 7px 16px; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35); transition: all 0.2s ease;
}
.run-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(168, 85, 247, 0.5); }

/* ============ EDITOR CONTENT ============ */
.editor-scroll { flex: 1; }
.code-section {
  padding: 80px 56px 80px;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}
.code-section:nth-of-type(even) { background: var(--bg-alt); }

.eyebrow { font-size: 0.8rem; margin-bottom: 14px; }
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.01em; margin-bottom: 24px; max-width: 760px;
}
.section-subtitle { color: var(--text-muted); font-size: 1.02rem; max-width: 700px; margin-bottom: 36px; }

/* ---- HERO (welcome.md) ---- */
.hero {
  display: flex; gap: 32px; padding-top: 90px; padding-bottom: 90px; min-height: 88vh; align-items: center;
}
.gutter {
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-dim);
  padding-top: 4px; user-select: none;
}
.code-content { flex: 1; max-width: 820px; }
.code-content .ln { font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.9; color: var(--text-muted); }

.hero-status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 20px; font-size: 0.74rem; color: var(--accent);
  margin-bottom: 16px;
}
.status-pulse { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 10px #4ADE80; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

.hero-name-block { margin: 18px 0 22px 22px; padding-left: 20px; border-left: 2px solid var(--border); }
.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.cursor { color: var(--accent); animation: blink 1.1s step-end infinite; }
@keyframes blink { 50%{opacity:0;} }
.hero-role { font-size: 0.9rem; margin-bottom: 18px; }
.hero-desc { max-width: 580px; color: var(--text-muted); font-size: 1.05rem; margin-bottom: 28px; line-height: 1.7; }

/* Metrics Bar */
.hero-metrics {
  display: flex; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 16px 22px; border-radius: var(--radius);
  margin-bottom: 30px; flex-wrap: wrap;
}
.metric-item { display: flex; flex-direction: column; }
.metric-val { font-size: 1.35rem; font-weight: 800; color: var(--accent); }
.metric-lbl { font-size: 0.7rem; color: var(--text-muted); }
.metric-divider { width: 1px; height: 32px; background: var(--border); }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 7px; font-weight: 600; font-size: 0.86rem;
  font-family: var(--font-mono); transition: all 0.2s ease; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #000; font-weight: 700; }
.btn-primary:hover { background: var(--accent-dim); color: #FFF; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3); }
.btn-arcade { background: linear-gradient(135deg, #A855F7, #EC4899); color: #FFF; font-weight: 700; }
.btn-arcade:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(168, 85, 247, 0.45); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 8px 14px; font-size: 0.78rem; }
.btn-lg { padding: 14px 28px; font-size: 0.95rem; }

/* ---- ABOUT ---- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.about-text { color: var(--text-muted); font-size: 1.02rem; line-height: 1.7; }
.about-highlights { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; font-size: 0.78rem; }
.badge-tag { background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 20px; color: var(--text); display: flex; align-items: center; gap: 6px; }

.edu-cards { display: flex; flex-direction: column; gap: 16px; }
.edu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.edu-year { font-size: 0.78rem; margin-bottom: 8px; }
.edu-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 6px; }
.edu-sub { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 10px; }
.edu-meta { font-size: 0.75rem; color: var(--text-dim); border-top: 1px solid var(--border); padding-top: 8px; }

/* ---- EXPERIENCE ---- */
.obj-list { display: flex; flex-direction: column; gap: 22px; }
.obj-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 28px; position: relative; overflow: hidden;
}
.card-corner-badge {
  position: absolute; top: 18px; right: 22px;
  font-size: 0.7rem; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 4px 10px; border-radius: 4px; border: 1px solid var(--accent);
}
.obj-line { font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.9; color: var(--text-muted); }
.obj-line.indent { padding-left: 22px; }
.badge { display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; margin-left: 6px; }
.badge-active { background: rgba(74, 222, 128, 0.15); color: #4ADE80; border: 1px solid #4ADE80; }
.badge-amber { background: var(--amber-soft); color: var(--warning); border: 1px solid var(--warning); }
.badge-accent { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.badge-hot { background: linear-gradient(135deg, #EC4899, #EF4444); color: #FFF; }
.badge-purple { background: rgba(168, 85, 247, 0.15); color: #C084FC; border: 1px solid #C084FC; }
.badge-info { background: rgba(56, 189, 248, 0.15); color: #38BDF8; border: 1px solid #38BDF8; }

.highlight-list { padding: 10px 0 10px 44px; display: flex; flex-direction: column; gap: 9px; }
.highlight-list li { color: var(--text-muted); font-size: 0.94rem; position: relative; padding-left: 16px; }
.highlight-list li::before { content: "–"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.hl { color: var(--text); font-weight: 600; }

/* ---- PROJECTS ---- */
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; transition: all 0.25s ease;
  display: flex; flex-direction: column; justify-content: space-between;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 16px 36px -20px rgba(56, 189, 248, 0.3); }
.project-card.featured { grid-column: 1 / -1; background: linear-gradient(155deg, var(--surface), var(--bg-alt)); }
.project-id { font-size: 0.72rem; margin-bottom: 12px; }
.project-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.project-head h3 { font-family: var(--font-display); font-size: 1.2rem; }
.project-link { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); }
.project-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 18px; line-height: 1.6; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); border: 1px solid var(--border); padding: 4px 10px; border-radius: 5px; background: var(--bg); }

/* ---- SYSTEM SIMULATORS SECTION ---- */
.simulators-wrapper { display: flex; flex-direction: column; gap: 28px; }
.sim-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 28px;
}
.sim-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.sim-title-group { display: flex; align-items: center; gap: 12px; }
.sim-badge { font-size: 0.7rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 4px; }
.sim-header h3 { font-family: var(--font-display); font-size: 1.25rem; }
.sim-status { font-size: 0.75rem; color: #4ADE80; font-weight: 600; }
.sim-desc { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 20px; }

.sim-controls { margin-bottom: 20px; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1.2fr; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; }
.ctrl-group { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; color: var(--text-muted); }
.ctrl-group.btn-group { display: flex; flex-direction: row; gap: 10px; align-items: flex-end; }
.sim-input, .sim-select {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 10px 14px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.84rem; width: 100%;
}
.sim-input:focus, .sim-select:focus { outline: 2px solid var(--accent); }

/* Bucket visualizer */
.bucket-visual { margin-bottom: 14px; }
.bucket-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.bucket-meter { width: 100%; height: 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.bucket-fill { height: 100%; background: linear-gradient(90deg, #38BDF8, #4ADE80); transition: width 0.3s ease; }
.sim-log {
  background: #000; border: 1px solid var(--border); border-radius: 6px;
  padding: 12px 16px; font-size: 0.78rem; max-height: 110px; overflow-y: auto; color: #4ADE80;
}
.log-line { margin-bottom: 4px; }
.log-line.warn { color: #FBBF24; }
.log-line.error { color: #F87171; }
.log-line.info { color: #38BDF8; }

/* Latency Comparison */
.search-input-group { display: flex; gap: 10px; margin-bottom: 18px; }
.latency-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.latency-card { background: var(--bg); border: 1px solid var(--border); padding: 16px; border-radius: 8px; }
.lat-title { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.lat-value { font-size: 1.6rem; font-weight: 800; color: var(--danger); margin-bottom: 8px; }
.latency-card.optimized .lat-value { color: #4ADE80; }
.lat-bar { width: 100%; height: 8px; background: var(--surface); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.lat-bar-fill { height: 100%; background: var(--danger); }
.latency-card.optimized .lat-bar-fill { background: #4ADE80; }
.lat-sub { font-size: 0.72rem; color: var(--text-dim); }
.hl-green { color: #4ADE80; font-weight: 700; }

/* ATS Score Circle */
.resume-score-output { display: flex; align-items: center; gap: 28px; background: var(--bg); border: 1px solid var(--border); padding: 18px; border-radius: 8px; }
.score-circle {
  width: 90px; height: 90px; border-radius: 50%; border: 4px solid var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
}
.score-num { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.score-lbl { font-size: 0.55rem; color: var(--text-muted); }
.score-breakdown { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 0.78rem; }
.breakdown-item { display: flex; flex-direction: column; gap: 4px; color: var(--text-muted); }
.mini-bar { width: 100%; height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.mini-fill { height: 100%; background: var(--accent); transition: width 0.4s ease; }

/* spaCy NER output */
.ner-output-box { background: var(--bg); border: 1px solid var(--border); padding: 16px; border-radius: 8px; display: flex; flex-direction: column; gap: 8px; font-size: 0.82rem; }
.ner-item { display: flex; gap: 10px; align-items: center; }
.ner-label { color: var(--text-dim); font-weight: 700; width: 160px; flex-shrink: 0; }
.ner-val.high { color: var(--danger); font-weight: 700; }
.ner-entity { padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.ner-entity.org { background: rgba(56, 189, 248, 0.2); color: #38BDF8; }
.ner-entity.tech { background: rgba(244, 114, 182, 0.2); color: #F472B6; }
.ner-action { color: #4ADE80; font-weight: 600; }

/* ---- GAMES SECTION & ARCADE ---- */
.arcade-title-block { margin-bottom: 24px; }
.arcade-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 0.76rem; font-weight: 700; color: #A855F7; background: rgba(168, 85, 247, 0.15); border: 1px solid #A855F7; padding: 4px 12px; border-radius: 20px; margin-bottom: 12px; }
.arcade-subtitle { color: var(--text-muted); font-size: 1.05rem; }

.arcade-nav { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px; overflow-x: auto; }
.arcade-tab { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 6px; font-size: 0.84rem; color: var(--text-muted); border: 1px solid transparent; transition: all 0.2s ease; }
.arcade-tab:hover { color: var(--text); background: var(--surface); }
.arcade-tab.active { background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2)); border-color: #A855F7; color: #FFF; font-weight: 700; }

.arcade-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.game-view { display: none; flex-direction: column; gap: 14px; }
.game-view.active { display: flex; }

/* HUD */
.game-hud { display: flex; align-items: center; justify-content: space-between; background: var(--bg); border: 1px solid var(--border); padding: 12px 20px; border-radius: 8px; }
.hud-stat { display: flex; flex-direction: column; }
.hud-lbl { font-size: 0.65rem; color: var(--text-dim); }
.hud-val { font-size: 1.2rem; font-weight: 800; color: var(--accent); }
.hud-val.green { color: #4ADE80; }
.hud-val.amber { color: #FBBF24; }

.game-canvas-wrapper { position: relative; width: 100%; border-radius: 8px; overflow: hidden; background: #050811; border: 1px solid var(--border); }
canvas#loadBalancerCanvas, canvas#bugSmasherCanvas { display: block; width: 100%; height: 420px; }

.game-overlay {
  position: absolute; inset: 0; background: rgba(5, 8, 17, 0.92);
  display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center;
}
.game-overlay.hidden { display: none; }
.overlay-card { max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.overlay-card h3 { font-family: var(--font-display); font-size: 1.4rem; color: #A855F7; }
.overlay-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.controls-guide { font-size: 0.78rem; color: var(--accent); background: rgba(56, 189, 248, 0.1); padding: 8px 14px; border-radius: 6px; border: 1px solid var(--accent); }

.game-controls-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Quiz Card */
.quiz-card { background: var(--bg); border: 1px solid var(--border); padding: 28px; border-radius: 8px; display: flex; flex-direction: column; gap: 18px; }
.quiz-header { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.quiz-question { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.5; color: var(--text); }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt-btn {
  text-align: left; padding: 12px 18px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 0.88rem; transition: all 0.15s ease;
}
.quiz-opt-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt-btn.correct { background: rgba(74, 222, 128, 0.2); border-color: #4ADE80; color: #4ADE80; font-weight: 700; }
.quiz-opt-btn.wrong { background: rgba(248, 113, 113, 0.2); border-color: #F87171; color: #F87171; }
.quiz-feedback { font-size: 0.88rem; font-weight: 600; min-height: 24px; }

/* ---- RESEARCH ---- */
.paper-list { display: flex; flex-direction: column; gap: 20px; }
.paper-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 28px; border-left: 3px solid var(--type);
}
.paper-header-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.paper-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.4; margin-bottom: 8px; }
.paper-authors { color: var(--text-dim); font-size: 0.82rem; margin-bottom: 16px; }

/* ---- SKILLS ---- */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.skill-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.skill-panel-title { font-size: 0.8rem; margin-bottom: 14px; }
.skill-bar-list { display: flex; flex-direction: column; gap: 10px; font-size: 0.78rem; color: var(--text-muted); }
.skill-item { display: flex; flex-direction: column; gap: 4px; }
.skill-meter { width: 100%; height: 5px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.skill-fill { height: 100%; background: var(--accent); }

/* ---- LEADERSHIP ---- */
.lead-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.lead-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; border-top: 3px solid var(--accent); }
.lead-card h3 { font-family: var(--font-display); font-size: 1.08rem; margin-bottom: 8px; }
.lead-org { color: var(--accent); font-size: 0.8rem; margin-bottom: 4px; }
.lead-year { color: var(--text-dim); font-size: 0.72rem; margin-bottom: 12px; }
.lead-desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

/* ---- CONTACT & SHELL ---- */
.contact-sub { color: var(--text-muted); margin-bottom: 28px; font-size: 1.02rem; }
.shell-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; max-width: 600px; margin-bottom: 26px;
}
.shell-block p { font-size: 0.86rem; color: var(--text-muted); line-height: 1.95; }
.shell-out { padding-left: 18px; color: var(--text) !important; font-weight: 600; }
.shell-out a:hover { color: var(--accent); }
.cursor-static { color: var(--accent); animation: blink 1.1s step-end infinite; }
.contact-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ STATUS BAR ============ */
.statusbar {
  height: var(--statusbar-h); background: var(--accent); color: #000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; font-size: 0.72rem; font-weight: 700;
  position: sticky; bottom:0; z-index: 95;
}
.status-left, .status-right { display: flex; align-items: center; gap: 10px; }
.dot-sep { opacity: 0.5; }
.status-sfx { background: rgba(0,0,0,0.15); padding: 2px 6px; border-radius: 4px; }

/* ============ CLI TERMINAL MODAL ============ */
.terminal-modal {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: all 0.25s ease;
}
.terminal-modal.open { opacity: 1; visibility: visible; }
.terminal-window {
  width: min(820px, 92vw); height: 500px; background: #0D1117;
  border: 1px solid #30363D; border-radius: 10px; box-shadow: 0 25px 60px rgba(0,0,0,0.6);
  display: flex; flex-direction: column; overflow: hidden;
}
.terminal-topbar {
  background: #161B22; padding: 10px 16px; border-bottom: 1px solid #30363D;
  display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; color: #8B949E;
}
.window-buttons { display: flex; gap: 8px; }
.window-buttons span { width: 12px; height: 12px; border-radius: 50%; display: inline-block; cursor: pointer; }
.btn-close { background: #FF5F56; }
.btn-min { background: #FFBD2E; }
.btn-max { background: #27C93F; }
.terminal-body {
  flex: 1; padding: 18px; overflow-y: auto; color: #C9D1D9; font-size: 0.86rem; line-height: 1.7;
}
.term-line { margin-bottom: 6px; }
.term-cmd { color: #58A6FF; font-weight: 700; }
.term-prompt { color: #7EE787; font-weight: 700; margin-right: 8px; }
.term-input-line { display: flex; align-items: center; margin-top: 8px; }
#termInput {
  flex: 1; background: none; border: none; outline: none; color: #FFF;
  font-family: var(--font-mono); font-size: 0.86rem;
}

/* ============ MOBILE SCRIM ============ */
.scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 98;
  opacity: 0; visibility: hidden; transition: all 0.25s ease;
}
.scrim.open { opacity: 1; visibility: visible; }

/* ============ RESPONSIVE BREAKPOINTS ============ */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .latency-compare-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 40px rgba(0,0,0,0.5); width: min(var(--sidebar-w), 85vw); }
  .sidebar.open { transform: translateX(0); }
  .main-col { margin-left: 0; }
  .hamburger { display: flex; margin-right: 4px; }
  .tabbar { display: none; }
  .mobile-file { display: flex; color: var(--text); }
  .hero { padding-top: 70px; padding-bottom: 70px; min-height: auto; flex-direction: column; align-items: flex-start; }
  .gutter { display: none; }
  .lead-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: auto; }
}

@media (max-width: 640px) {
  .code-section { padding: 56px 20px; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero-name-block { margin-left: 6px; padding-left: 12px; }
  .hero-metrics { flex-direction: column; align-items: flex-start; gap: 12px; }
  .metric-divider { display: none; }
  .ctrl-text { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .resume-score-output { flex-direction: column; align-items: flex-start; }
}
