:root,
:root[data-theme="dark"] {
  --bg: #05060a;
  --bg-elev: #0a0c13;
  --bg-elev-2: #101320;
  --border: #1a1f2e;
  --border-glow: #2a3450;
  --text: #d7deec;
  --text-muted: #7a849e;
  --text-dim: #4a5068;
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.45);
  --magenta: #ff3ec8;
  --magenta-glow: rgba(255, 62, 200, 0.45);
  --green: #5cff9e;
  --amber: #ffb454;
  --red: #ff5370;
  --violet: #a78bfa;

  --body-gradient-1: radial-gradient(ellipse at 15% 0%, rgba(0, 240, 255, 0.07), transparent 55%);
  --body-gradient-2: radial-gradient(ellipse at 85% 100%, rgba(255, 62, 200, 0.06), transparent 55%);
  --scanline-color: rgba(0, 0, 0, 0.12);
  --scanline-opacity: 0.6;
  --noise-opacity: 0.04;
  --vignette: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.45) 100%);
  --kbd-shadow: 0 1px 0 rgba(0,0,0,0.4);

  --tint-cyan: rgba(0, 240, 255, 0.05);
  --tint-cyan-strong: rgba(0, 240, 255, 0.14);
  --tint-cyan-border: rgba(0, 240, 255, 0.22);
  --tint-cyan-border-strong: rgba(0, 240, 255, 0.35);
  --tint-magenta: rgba(255, 62, 200, 0.06);
  --tint-magenta-strong: rgba(255, 62, 200, 0.14);
  --tint-magenta-border: rgba(255, 62, 200, 0.24);
  --tint-violet: rgba(167, 139, 250, 0.06);
  --tint-violet-border: rgba(167, 139, 250, 0.26);
  --tint-green: rgba(92, 255, 158, 0.06);
  --tint-green-border: rgba(92, 255, 158, 0.22);
  --topbar-gradient: linear-gradient(180deg, rgba(0,240,255,0.04), transparent);
  --section-gradient: linear-gradient(180deg, rgba(0,240,255,0.025), transparent 40%);
  --section-head-bg: rgba(0, 240, 255, 0.05);
  --prompt-gradient: linear-gradient(180deg, transparent, rgba(0,240,255,0.02));

  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="light"] {
  --bg: #f2f5fa;
  --bg-elev: #e9edf4;
  --bg-elev-2: #dde3ec;
  --border: #c8d1de;
  --border-glow: #a8b5c9;
  --text: #0e1322;
  --text-muted: #4f5a73;
  --text-dim: #7a8397;
  --cyan: #0072a3;
  --cyan-glow: rgba(0, 114, 163, 0.35);
  --magenta: #b8127a;
  --magenta-glow: rgba(184, 18, 122, 0.32);
  --green: #148a4d;
  --amber: #a85c00;
  --red: #c81e3a;
  --violet: #6138c9;

  --body-gradient-1: radial-gradient(ellipse at 15% 0%, rgba(0, 114, 163, 0.08), transparent 55%);
  --body-gradient-2: radial-gradient(ellipse at 85% 100%, rgba(184, 18, 122, 0.07), transparent 55%);
  --scanline-color: rgba(14, 19, 34, 0.045);
  --scanline-opacity: 0.5;
  --noise-opacity: 0.025;
  --vignette: radial-gradient(ellipse at center, transparent 65%, rgba(14,19,34,0.08) 100%);
  --kbd-shadow: 0 1px 0 rgba(14,19,34,0.12);

  --tint-cyan: rgba(0, 114, 163, 0.08);
  --tint-cyan-strong: rgba(0, 114, 163, 0.16);
  --tint-cyan-border: rgba(0, 114, 163, 0.35);
  --tint-cyan-border-strong: rgba(0, 114, 163, 0.55);
  --tint-magenta: rgba(184, 18, 122, 0.08);
  --tint-magenta-strong: rgba(184, 18, 122, 0.18);
  --tint-magenta-border: rgba(184, 18, 122, 0.38);
  --tint-violet: rgba(97, 56, 201, 0.08);
  --tint-violet-border: rgba(97, 56, 201, 0.38);
  --tint-green: rgba(20, 138, 77, 0.09);
  --tint-green-border: rgba(20, 138, 77, 0.34);
  --topbar-gradient: linear-gradient(180deg, rgba(0,114,163,0.05), transparent);
  --section-gradient: linear-gradient(180deg, rgba(0,114,163,0.035), transparent 40%);
  --section-head-bg: rgba(0, 114, 163, 0.07);
  --prompt-gradient: linear-gradient(180deg, transparent, rgba(0,114,163,0.035));
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  background:
    var(--body-gradient-1),
    var(--body-gradient-2),
    var(--bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
  overscroll-behavior: none;
}

/* CRT scanlines */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    var(--scanline-color) 2px,
    var(--scanline-color) 3px
  );
  opacity: var(--scanline-opacity);
}

/* subtle grain */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 101;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.8'/></svg>");
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background: var(--vignette);
}

/* top bar */
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  background: var(--topbar-gradient);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-glow), var(--magenta-glow), transparent);
  opacity: 0.75;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  user-select: none;
}
.brand-bracket { color: var(--text-dim); }
.brand-glyph {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-glow);
  font-size: 14px;
}
.brand-name {
  color: var(--text);
  letter-spacing: 0.02em;
}
.brand-version {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
}

.menu {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.menu-item {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 4px 10px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  border-radius: 2px;
  transition: color .15s, background .15s, border-color .15s, text-shadow .15s;
  letter-spacing: 0.02em;
  position: relative;
}
.menu-item:hover,
.menu-item:focus-visible {
  color: var(--cyan);
  border-color: var(--tint-cyan-border);
  background: var(--tint-cyan);
  text-shadow: 0 0 8px var(--cyan-glow);
  outline: none;
}
.menu-item.active {
  color: var(--cyan);
  background: var(--tint-cyan-strong);
  border-color: var(--tint-cyan-border-strong);
  text-shadow: 0 0 6px var(--cyan-glow);
}

.status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 11.5px;
  white-space: nowrap;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

/* terminal */
.terminal {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 20px 0;
  min-height: 0;
}

.transcript {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 4px 20px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-glow) transparent;
}
.transcript::-webkit-scrollbar { width: 8px; }
.transcript::-webkit-scrollbar-track { background: transparent; }
.transcript::-webkit-scrollbar-thumb {
  background: var(--border-glow);
  border-radius: 4px;
}
.transcript::-webkit-scrollbar-thumb:hover { background: var(--cyan-glow); }

.entry { margin-bottom: 10px; }
.entry:last-child { margin-bottom: 16px; }

/* command echo */
.echo {
  color: var(--text-muted);
  margin: 10px 0 4px;
  font-size: 13.5px;
}
.echo .echo-glyph {
  color: var(--magenta);
  text-shadow: 0 0 6px var(--magenta-glow);
}
.echo .echo-cmd {
  color: var(--cyan);
  font-weight: 500;
  text-shadow: 0 0 4px var(--cyan-glow);
}

/* Claude-style section block */
.section {
  border: 1px solid var(--border);
  background: var(--section-gradient);
  border-radius: 3px;
  margin: 6px 0 6px;
  overflow: hidden;
  position: relative;
}
.section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background: linear-gradient(180deg, var(--cyan), var(--magenta));
  opacity: 0.9;
}
.section-head {
  padding: 7px 14px;
  background: var(--section-head-bg);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.section-head .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
}
.section-body { padding: 14px 16px; }

/* key-value */
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  font-size: 13.5px;
  margin: 0;
}
.kv dt {
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
}
.kv dd {
  margin: 0;
  color: var(--text);
}
.kv dd a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px dashed var(--tint-cyan-border-strong);
}
.kv dd a:hover { text-shadow: 0 0 6px var(--cyan-glow); }

/* timeline */
.timeline { display: flex; flex-direction: column; gap: 14px; }
.job {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
}
.job-meta {
  color: var(--text-muted);
  font-size: 12px;
  padding-top: 2px;
}
.job-meta .job-dates { color: var(--violet); display: block; }
.job-meta .job-dur   { color: var(--text-dim); display: block; font-size: 11px; }
.job-meta .job-loc   { color: var(--text-dim); display: block; font-size: 11px; font-style: italic; }
.job-body {
  border-left: 1px solid var(--border);
  padding-left: 14px;
  position: relative;
}
.job-body::before {
  content: "";
  position: absolute;
  left: -4px; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* current position highlight */
.job.is-current .job-body {
  border-left-color: var(--green);
}
.job.is-current .job-body::before {
  background: var(--green);
  box-shadow: 0 0 12px var(--green), 0 0 24px rgba(92, 255, 158, 0.35);
  animation: currentPulse 2s ease-in-out infinite;
}
.job.is-current .job-company {
  color: var(--green);
  text-shadow: 0 0 8px rgba(92, 255, 158, 0.6);
}
.job.is-current .job-dates {
  color: var(--green);
}
@keyframes currentPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.25); opacity: 0.75; }
}

.job-active {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 2px 7px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--tint-green);
  border: 1px solid var(--tint-green-border);
  border-radius: 2px;
  width: fit-content;
  font-weight: 500;
}
.job-active .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 1.6s ease-in-out infinite;
}
.job-title {
  color: var(--text);
  font-weight: 600;
}
.job-company {
  color: var(--magenta);
  text-shadow: 0 0 4px var(--magenta-glow);
}
.job-desc {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 4px;
  font-style: italic;
}
.job ul { margin: 6px 0 0; padding-left: 0; list-style: none; }
.job ul li {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 3px;
  padding-left: 16px;
  position: relative;
}
.job ul li::before {
  content: "▸";
  color: var(--cyan);
  position: absolute;
  left: 0;
  opacity: 0.7;
}

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 2px 9px;
  font-size: 11.5px;
  background: var(--tint-cyan);
  border: 1px solid var(--tint-cyan-border);
  color: var(--cyan);
  border-radius: 2px;
  transition: background .15s, box-shadow .15s;
  letter-spacing: 0.02em;
}
.tag:hover {
  background: var(--tint-cyan-strong);
  box-shadow: 0 0 10px var(--cyan-glow);
}
.tag.tag-m { background: var(--tint-magenta); border-color: var(--tint-magenta-border); color: var(--magenta); }
.tag.tag-m:hover { background: var(--tint-magenta-strong); box-shadow: 0 0 10px var(--magenta-glow); }
.tag.tag-v { background: var(--tint-violet); border-color: var(--tint-violet-border); color: var(--violet); }
.tag.tag-g { background: var(--tint-green); border-color: var(--tint-green-border); color: var(--green); }
.tag.tag-g:hover { box-shadow: 0 0 10px var(--tint-green-border); }

.skill-group { margin-bottom: 12px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group-title {
  color: var(--text-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 6px;
}

/* bullets */
.bullets { list-style: none; padding: 0; margin: 0; }
.bullets li {
  padding: 3px 0 3px 18px;
  position: relative;
  font-size: 13px;
}
.bullets li::before {
  content: "▸";
  color: var(--magenta);
  position: absolute;
  left: 0;
  text-shadow: 0 0 4px var(--magenta-glow);
}

.language-row {
  display: flex;
  gap: 14px;
  padding: 3px 0;
  align-items: baseline;
}
.language-row .lang-name {
  color: var(--cyan);
  min-width: 110px;
  font-weight: 500;
}
.language-row .lang-level { color: var(--text-muted); font-size: 12.5px; }

.edu-item { margin-bottom: 12px; }
.edu-item:last-child { margin-bottom: 0; }
.edu-school-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.edu-school {
  color: var(--cyan);
  font-weight: 600;
  font-size: 14px;
  text-shadow: 0 0 6px var(--cyan-glow);
}
.edu-degree { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.edu-degree .dim { color: var(--text-dim); margin: 0 2px; }
.edu-link-row { margin-top: 6px; }
.edu-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  font-size: 11.5px;
  color: var(--cyan);
  background: var(--tint-cyan);
  border: 1px solid var(--tint-cyan-border);
  border-radius: 2px;
  transition: background .15s, box-shadow .15s;
}
.edu-link:hover {
  background: var(--tint-cyan-strong);
  box-shadow: 0 0 8px var(--cyan-glow);
  text-shadow: 0 0 4px var(--cyan-glow);
}
.edu-link .ext { opacity: 0.7; }
.edu-link:hover .ext { opacity: 1; }

/* Arabic script */
.ar {
  font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Amiri", "Tahoma", sans-serif;
  font-size: 1.15em;
  letter-spacing: 0;
}

/* ongoing / status badge (re-used across education, learning) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  font-weight: 500;
  width: fit-content;
}
.badge .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}
.badge-ongoing {
  color: var(--amber);
  background: rgba(255, 180, 84, 0.08);
  border: 1px solid rgba(255, 180, 84, 0.28);
}
.badge-ongoing .pulse {
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber);
}

/* learning / research cards */
.learning { display: flex; flex-direction: column; gap: 12px; }
.learn-item {
  border-left: 2px solid var(--border-glow);
  padding: 4px 0 4px 12px;
  position: relative;
}
.learn-item::before {
  content: "";
  position: absolute;
  left: -4px; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 8px var(--magenta-glow);
}
.learn-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.learn-title {
  color: var(--text);
  font-weight: 600;
  font-size: 13.5px;
}
.learn-at {
  color: var(--magenta);
  text-shadow: 0 0 4px var(--magenta-glow);
  font-weight: 500;
}
.learn-area {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 4px;
  line-height: 1.55;
}

/* utilities */
.muted { color: var(--text-muted); }
.accent { color: var(--cyan); }
.magenta { color: var(--magenta); }
.green { color: var(--green); }
.amber { color: var(--amber); }
.violet { color: var(--violet); }
.dim { color: var(--text-dim); }
.strong { font-weight: 700; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-shadow: 0 0 6px var(--cyan-glow); }

/* bismillah — opening invocation */
.bismillah {
  text-align: left;
  margin: 4px 0 18px;
  padding: 10px 0 12px;
  max-width: 720px;
  animation: bismillah-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes bismillah-in {
  from { opacity: 0; transform: translateY(-6px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0);   filter: blur(0); }
}

.bismillah-frame {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  color: var(--cyan);
  line-height: 1;
}
.bismillah-dot {
  font-size: 9px;
  text-shadow: 0 0 8px var(--cyan-glow);
  opacity: 0.55;
  animation: bismillah-pulse 3.2s ease-in-out infinite;
}
.bismillah-line {
  flex: 1;
  max-width: 220px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-glow) 50%, transparent);
  opacity: 0.7;
}
@keyframes bismillah-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

.bismillah-ar {
  font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Amiri", "Traditional Arabic", serif;
  font-size: 26px;
  line-height: 1.75;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow), 0 0 24px rgba(0, 240, 255, 0.18);
  letter-spacing: 0;
  margin: 10px 0 4px;
  font-weight: 400;
}

.bismillah-en {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 2px 0 8px;
}

@media (max-width: 540px) {
  .bismillah-ar { font-size: 22px; }
  .bismillah-en { font-size: 9px; letter-spacing: 0.18em; }
  .bismillah-line { max-width: 100px; }
}

/* boot banner */
.banner {
  font-size: 11.5px;
  color: var(--cyan);
  line-height: 1.35;
  white-space: pre;
  margin: 2px 0 10px;
  text-shadow: 0 0 8px var(--cyan-glow);
  opacity: 0.95;
  overflow-x: auto;
  padding-bottom: 4px;
}

/* prompt */
.prompt-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--border);
  background: var(--prompt-gradient);
  position: relative;
  flex-shrink: 0;
}
.prompt-form::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-glow), transparent);
  opacity: 0.6;
}
.prompt-glyph {
  color: var(--magenta);
  font-weight: 700;
  text-shadow: 0 0 8px var(--magenta-glow);
}
.prompt-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 0;
  caret-color: var(--cyan);
}
.prompt-input::placeholder { color: var(--text-dim); }
.caret {
  color: var(--cyan);
  animation: blink 1s steps(2) infinite;
  text-shadow: 0 0 8px var(--cyan-glow);
  font-size: 14px;
}
@keyframes blink { 50% { opacity: 0; } }

/* bottom status bar */
.statusbar {
  display: flex;
  gap: 18px;
  padding: 6px 18px;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--text-muted);
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.status-seg { white-space: nowrap; }
.push-right { margin-left: auto; }
kbd {
  display: inline-block;
  padding: 0 5px;
  font: inherit;
  font-size: 10px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  margin: 0 1px;
  box-shadow: var(--kbd-shadow);
}

/* fade in on append */
@keyframes fadein {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadein 0.25s ease; }

/* projects list */
.projects { display: flex; flex-direction: column; gap: 12px; }
.project {
  border: 1px solid var(--border);
  background: var(--section-gradient);
  border-radius: 3px;
  padding: 10px 12px;
  transition: border-color .15s, background .15s;
}
.project:hover {
  border-color: var(--tint-cyan-border);
  background: var(--tint-cyan);
}
.project-head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.project-name {
  color: var(--cyan);
  font-weight: 600;
  font-size: 14px;
  text-shadow: 0 0 6px var(--cyan-glow);
  border-bottom: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.project-name .ext { opacity: 0.6; font-size: 12px; }
.project-name:hover .ext { opacity: 1; }
.project-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.project-stars {
  color: var(--amber);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
.project-desc {
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
  margin: 2px 0 6px;
}
.project-topics { display: flex; flex-wrap: wrap; gap: 4px; }
.project-owner { color: var(--text-muted); font-weight: 400; }

.project-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed var(--border-glow);
  border-radius: 2px;
  transition: color .15s, border-color .15s, background .15s, text-shadow .15s;
}
.project-more:hover,
.project-more:focus-visible {
  color: var(--cyan);
  border-color: var(--tint-cyan-border-strong);
  background: var(--tint-cyan);
  text-shadow: 0 0 6px var(--cyan-glow);
  outline: none;
}
.project-more .ext { font-size: 12px; }

/* certifications */
.certs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cert-item {
  border-left: 2px solid var(--border-glow);
  padding: 4px 0 4px 12px;
  position: relative;
}
.cert-item::before {
  content: "";
  position: absolute;
  left: -4px; top: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
}
.cert-name {
  color: var(--text);
  font-weight: 600;
  font-size: 13.5px;
}
.cert-meta {
  color: var(--text-muted);
  font-size: 11.5px;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.cert-meta .dim { color: var(--text-dim); margin: 0 2px; }
.cert-detail {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
  font-style: italic;
}
.cert-skills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

/* inline bio highlights */
.bio { max-width: 72ch; }
.bio .hl {
  color: var(--cyan);
  font-weight: 600;
  text-shadow: 0 0 6px var(--cyan-glow);
  letter-spacing: 0.01em;
}

/* whoami card */
.whoami-card {
  padding: 4px 0;
}
.whoami-name {
  color: var(--cyan);
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 0 10px var(--cyan-glow);
  letter-spacing: 0.02em;
}
.whoami-role { color: var(--magenta); text-shadow: 0 0 6px var(--magenta-glow); margin-top: 2px; }
.whoami-tag { color: var(--violet); margin-top: 2px; }
.whoami-meta { color: var(--text-muted); font-size: 12px; margin-top: 6px; }

/* responsive — tablet and narrower */
@media (max-width: 820px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 8px 10px;
    row-gap: 6px;
  }
  .brand { font-size: 12.5px; gap: 5px; }
  .brand-version { font-size: 10.5px; }

  .status { order: 2; margin-left: auto; }
  .theme-toggle { order: 3; padding: 4px 7px; font-size: 11.5px; }

  /* horizontally scrolling menu strip */
  .menu {
    order: 4;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 2px 4px 4px 0;
    margin: 0 -2px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 14px, black calc(100% - 14px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, black 14px, black calc(100% - 14px), transparent 100%);
  }
  .menu::-webkit-scrollbar { display: none; }
  .menu-item {
    scroll-snap-align: start;
    flex-shrink: 0;
    font-size: 12px;
    padding: 7px 11px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
  }

  .terminal { padding: 10px 12px 0; }
  .transcript { padding-bottom: 12px; }

  .section-body { padding: 12px 12px; }

  /* timeline collapses and aligns vertically */
  .job { grid-template-columns: 1fr; gap: 6px; }
  .job-meta {
    display: flex;
    gap: 4px 10px;
    flex-wrap: wrap;
    padding-top: 0;
  }
  .job-meta .job-dates,
  .job-meta .job-dur,
  .job-meta .job-loc { display: inline; }
  .job-body { border-left: 2px solid var(--border); padding-left: 12px; }
  .job-body::before { left: -5px; }
  .job ul li { font-size: 12.5px; }

  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { font-size: 11px; margin-top: 8px; letter-spacing: 0.08em; }
  .kv dt:first-child { margin-top: 0; }

  /* larger input font on mobile to stop iOS auto-zoom */
  .prompt-input { font-size: 16px; }
  .prompt-form { padding: 10px 0 max(12px, env(safe-area-inset-bottom)); }

  .statusbar {
    font-size: 10px;
    gap: 8px 12px;
    padding: 5px 10px max(5px, env(safe-area-inset-bottom));
  }
  .push-right { display: none; }

  /* reduce effect intensity for perf + readability */
  .scanlines { opacity: calc(var(--scanline-opacity) * 0.6); }
  .noise { opacity: calc(var(--noise-opacity) * 0.6); }
}

/* phone */
@media (max-width: 540px) {
  html, body { font-size: 13.5px; }
  .brand-bracket { display: none; }
  .status-text { display: none; }
  .banner { font-size: 9.5px; line-height: 1.3; }
  .section-head { font-size: 10.5px; padding: 6px 12px; }
  .whoami-name { font-size: 16px; }
  .bio { font-size: 13px; }
  .timeline { gap: 18px; }
}

/* tiny phone */
@media (max-width: 380px) {
  .brand-version { display: none; }
  .banner { font-size: 8.5px; }
  .statusbar { font-size: 9.5px; }
  .statusbar .status-seg:nth-child(3) { display: none; }
  .menu-item { font-size: 11.5px; padding: 7px 9px; }
}

/* landscape phone — short viewport: hide banner to save space */
@media (max-height: 480px) and (orientation: landscape) {
  .banner { display: none; }
  .scanlines, .vignette { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in, .status-dot, .caret { animation: none; }
}

/* theme toggle */
.theme-toggle {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 4px 8px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  border-radius: 2px;
  transition: color .15s, background .15s, border-color .15s, text-shadow .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--magenta);
  border-color: var(--tint-magenta-border);
  background: var(--tint-magenta);
  text-shadow: 0 0 8px var(--magenta-glow);
  outline: none;
}
.theme-toggle .theme-glyph {
  font-size: 13px;
  line-height: 1;
}
.theme-toggle .theme-label { font-size: 11.5px; }
:root[data-theme="dark"]  .theme-toggle .theme-glyph::before { content: "☾"; }
:root[data-theme="light"] .theme-toggle .theme-glyph::before { content: "☀"; }
:root[data-theme="dark"]  .theme-toggle .theme-label::before { content: "light"; }
:root[data-theme="light"] .theme-toggle .theme-label::before { content: "dark"; }

/* typed-char reveal */
.tc { opacity: 0; }
.tc.tc-on { opacity: 1; }

/* smooth theme swap */
body, .topbar, .terminal, .statusbar,
.section, .section-head, .menu-item,
.tag, .prompt-form, kbd, .theme-toggle {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
