/* ─────────────────────────────────────────
   sahil.exe · styles
   Dark theme (default) + Light theme
   ───────────────────────────────────────── */

/* ══════════════════════════════════════
   THEME TOKENS
══════════════════════════════════════ */

/* DARK (default) */
:root,
[data-theme="dark"] {
  --bg:           #03090b;
  --desktop-bg:   radial-gradient(circle at 75% 25%, #124c4e 0, #0a3034 30%, #061c21 75%);
  --terminal-bg:  #050906;
  --terminal-fg:  #a8ff9c;
  --terminal-dim: #4b914d;
  --terminal-bar: #1d4722;
  --terminal-top: #65b960;
  --bar-bg:       rgba(4,13,16,.92);
  --bar-border:   #356367;
  --win-bg:       rgba(5,18,22,.96);
  --win-border:   #dce7df;
  --win-title-bg: #dce7df;
  --win-title-fg: #071216;
  --statusbar-c:  #89a7a5;
  --line-c:       #315057;
  --skill-track:  #0e2e33;
  --dock-bg:      rgba(4,13,16,.85);
  --dock-border:  #527479;
  --noise-color:  rgba(170,255,140,.035);
  --body-bg:      #03090b;
  --ink:          #071216;
  --paper:        #dce7df;
  --muted:        #89a7a5;
  --cyan:         #39f0c4;
  --amber:        #f3bd62;
  --red:          #ff6659;
  --line:         #315057;
  --debug-bg:     radial-gradient(circle at 75% 25%, #3f176b 0, #151a55 35%, #061c21 75%);
  --theme-icon:   "☾";
  --shadow:       rgba(0,0,0,.45);
}

/* LIGHT */
[data-theme="light"] {
  --bg:           #e8ede9;
  --desktop-bg:   radial-gradient(circle at 75% 25%, #c8e6e3 0, #d4e8e5 35%, #e2eeeb 75%);
  --terminal-bg:  #f0f5f0;
  --terminal-fg:  #1a5c1a;
  --terminal-dim: #3a8c3a;
  --terminal-bar: #9ccf9c;
  --terminal-top: #2d6b2d;
  --bar-bg:       rgba(220,235,225,.95);
  --bar-border:   #8ab8b4;
  --win-bg:       rgba(245,252,248,.97);
  --win-border:   #1a3a3e;
  --win-title-bg: #1a3a3e;
  --win-title-fg: #e8ede9;
  --statusbar-c:  #3a6060;
  --line-c:       #8ab8b4;
  --skill-track:  #c8dede;
  --dock-bg:      rgba(200,228,224,.9);
  --dock-border:  #5fa8a4;
  --noise-color:  rgba(20,80,60,.025);
  --body-bg:      #e2eeeb;
  --ink:          #0d2424;
  --paper:        #0d2424;
  --muted:        #2a5a58;
  --cyan:         #0d8c6e;
  --amber:        #b07a10;
  --red:          #cc2a1e;
  --line:         #8ab8b4;
  --debug-bg:     radial-gradient(circle at 75% 25%, #d4c0f0 0, #c8cce8 35%, #e2eeeb 75%);
  --theme-icon:   "☀";
  --shadow:       rgba(0,0,0,.18);
}

/* ══════════════════════════════════════
   BASE
══════════════════════════════════════ */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--paper);
  font-family: "Space Grotesk", sans-serif;
  transition: background .35s, color .35s;
}

button { font: inherit; color: inherit; }
a { text-decoration: none; color: inherit; }

/* ══════════════════════════════════════
   THEME TOGGLE BUTTON
══════════════════════════════════════ */
.theme-toggle {
  border: 1px solid var(--bar-border);
  background: transparent;
  color: var(--cyan);
  font: 11px "DM Mono", monospace;
  padding: 3px 8px;
  cursor: pointer;
  letter-spacing: .05em;
  transition: background .2s, color .2s;
  border-radius: 2px;
  white-space: nowrap;
}
.theme-toggle:hover {
  background: var(--cyan);
  color: var(--ink);
}

/* ══════════════════════════════════════
   TERMINAL BOOT SCREEN
══════════════════════════════════════ */
.terminal-screen {
  min-height: 100vh;
  background: var(--terminal-bg);
  color: var(--terminal-fg);
  font-family: "DM Mono", monospace;
  position: relative;
  overflow: hidden;
  transition: background .35s, color .35s;
}

.terminal-screen::after,
.desktop-noise {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    var(--noise-color) 0,
    var(--noise-color) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: screen;
}

.terminal-topbar {
  height: 42px;
  border-bottom: 1px solid var(--terminal-bar);
  color: var(--terminal-top);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 14px;
  font-size: 12px;
}

.traffic-lights { display: flex; gap: 6px; margin-right: 8px; }
.traffic-lights i {
  height: 8px; width: 8px; border-radius: 50%;
  background: #356f37; display: block;
}
.traffic-lights i:first-child  { background: #d26754; }
.traffic-lights i:nth-child(2) { background: #b89a47; }

.topbar-status { margin-left: auto; color: #4d9b50; font-size: 10px; }

.terminal-body {
  padding: 10vh 9vw;
  max-width: 960px;
  font-size: clamp(14px, 1.5vw, 19px);
  line-height: 1.9;
  position: relative;
  z-index: 1;
}

.muted {
  color: var(--terminal-dim);
  font-size: 11px;
  letter-spacing: .1em;
  margin-bottom: 44px;
}

.line {
  margin: 2px 0;
  opacity: 0;
  transform: translateY(6px);
  animation: appear .5s forwards;
}
.line:nth-child(2) { animation-delay: .2s; }
.line:nth-child(3) { animation-delay: .5s; }
.line:nth-child(4) { animation-delay: .8s; }
.line:nth-child(5) { animation-delay: 1.1s; }
.line:nth-child(6) { animation-delay: 1.5s; }

.error { color: #ff5346; }

.secret-hint {
  color: var(--terminal-dim);
  font-size: 12px;
  opacity: 0;
  animation: appear .5s 1.5s forwards;
  letter-spacing: .06em;
}

.dots { animation: blink 1.2s steps(2) infinite; }

.cursor {
  display: inline-block;
  background: var(--terminal-fg);
  width: 9px; height: 18px;
  margin-left: 7px;
  vertical-align: -3px;
  animation: blink 1s steps(2) infinite;
}

.prompt-row {
  display: none;
  margin-top: 76px;
  color: var(--terminal-fg);
}
.prompt-row.visible { display: block; }
.prompt-row #promptHint { color: var(--terminal-dim); margin-left: 12px; }

.countdown {
  margin-top: 25px;
  color: var(--cyan);
  font-size: clamp(14px, 1.5vw, 19px);
  line-height: 1.9;
}

.boot-error {
  display: none;
  color: var(--red);
  font-size: clamp(14px, 1.5vw, 19px);
  line-height: 1.9;
}

.terminal-screen.shake { animation: shake .45s linear 2; }
.terminal-screen.lag .terminal-body {
  filter: blur(.3px);
  animation: lag .12s steps(2) 8;
}
.terminal-screen.done { display: none; }

/* ══════════════════════════════════════
   DESKTOP
══════════════════════════════════════ */
.desktop {
  display: none;
  min-height: 100vh;
  background: var(--desktop-bg);
  position: relative;
  overflow: hidden;
  transition: background .35s;
}
.desktop.visible { display: block; }

/* ── System Bar ── */
.system-bar {
  height: 34px;
  background: var(--bar-bg);
  border-bottom: 1px solid var(--bar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  font: 12px "DM Mono", monospace;
  position: relative;
  z-index: 10;
  backdrop-filter: blur(8px);
  transition: background .35s, border-color .35s;
}

.system-menu, .system-status {
  display: flex;
  gap: 18px;
  align-items: center;
}
.system-menu strong { color: var(--cyan); }
.apple { color: var(--cyan); font-size: 18px; }
.system-status { color: var(--muted); gap: 10px; }

.uptime-badge {
  font: 9px "DM Mono", monospace;
  color: var(--muted);
  letter-spacing: .04em;
  white-space: nowrap;
}

.konami-badge {
  color: var(--amber);
  font-size: 11px;
  cursor: default;
  animation: pulse 3s ease-in-out infinite;
}

/* ── Desktop Area ── */
.desktop-area {
  min-height: calc(100vh - 100px);
  position: relative;
  padding: 28px;
}

/* ── Desktop Icons ── */
.desktop-icons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: absolute;
  right: 28px; top: 28px;
  width: 100px;
  z-index: 2;
}

.desktop-icon {
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  font: 11px "DM Mono", monospace;
  text-shadow: 1px 1px var(--shadow);
  transition: transform .15s;
  color: var(--paper);
}
.desktop-icon:hover { transform: scale(1.09); }
.desktop-icon strong { font-weight: 400; text-align: center; }

.icon {
  width: 53px; height: 43px;
  display: grid; place-items: center;
  font-size: 34px;
  filter: drop-shadow(2px 3px 0 var(--shadow));
}
.folder-icon   { color: var(--amber); font-size: 43px; }
.document-icon { color: var(--paper); font-size: 41px; }
.computer-icon { color: var(--cyan);  font-size: 42px; }
.mail-icon     { color: var(--red);   font-size: 40px; }

/* ── Windows ── */
.window {
  position: absolute;
  background: var(--win-bg);
  border: 1px solid var(--win-border);
  box-shadow: 8px 8px 0 var(--shadow);
  z-index: 3;
  transition: background .35s, border-color .35s, box-shadow .35s;
}
/* open animate */
.window.open,
.main-window {
  animation: winAppear .2s ease-out;
}

/* minimize animation */
.window.minimizing {
  animation: winMinimize .22s ease-in forwards;
  pointer-events: none;
}

@keyframes winAppear {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes winMinimize {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(.2) translateY(300px); }
}

.main-window {
  left: 7%; top: 7%;
  width: min(850px, calc(100% - 190px));
  min-height: 570px;
}

.window-titlebar {
  height: 34px;
  background: var(--win-title-bg);
  color: var(--win-title-fg);
  display: flex;
  align-items: center;
  padding: 0 11px;
  font: 11px "DM Mono", monospace;
  letter-spacing: .05em;
  user-select: none;
  transition: background .35s, color .35s;
}

.window-titlebar .traffic-lights { margin-right: 12px; }
.window-titlebar .traffic-lights i { height: 8px; width: 8px; background: #75918c; }
.window-titlebar .traffic-lights i:first-child  { background: var(--red); }
.window-titlebar .traffic-lights i:nth-child(2) { background: var(--amber); }

.window-tools {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: 15px "DM Mono", monospace;
  letter-spacing: 2px;
  cursor: pointer;
}
.window-tools:hover { color: var(--red); }

.window-menu {
  height: 28px;
  border-bottom: 1px solid var(--line-c);
  padding: 7px 12px;
  color: var(--muted);
  font: 10px "DM Mono", monospace;
}
.window-menu span { margin-left: 22px; }

.window-body { padding: 34px; }

.computer-body {
  display: grid;
  grid-template-columns: 1fr .85fr;
  gap: clamp(18px, 3vw, 30px);
  align-items: center;
  min-height: 465px;
}

.prompt { font: 11px "DM Mono", monospace; color: var(--cyan); }

.computer-copy h1,
.text-body h2 {
  font-size: clamp(39px, 5vw, 69px);
  line-height: .9;
  letter-spacing: -.08em;
  margin: 19px 0;
  color: var(--paper);
}

.computer-copy h1 em,
.text-body h2 em { color: var(--red); font-style: normal; }

.computer-copy p,
.text-body p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
  max-width: 450px;
}

.actions { display: flex; gap: 9px; margin-top: 25px; }
.actions button {
  background: var(--red);
  border: 0;
  color: #fff;
  padding: 10px 12px;
  font: 10px "DM Mono", monospace;
  cursor: pointer;
  transition: opacity .15s;
}
.actions button:hover { opacity: .82; }
.actions button + button {
  background: transparent;
  border: 1px solid var(--win-border);
  color: var(--paper);
}

/* AWS hosted badge */
.hosted-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 10px "DM Mono", monospace;
  color: var(--cyan);
  margin-top: 18px;
  letter-spacing: .06em;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

/* Computer art */
.computer-art {
  margin: 0;
  background: var(--skill-track);
  border: 1px solid var(--line-c);
  padding: 10px;
  transform: rotate(2deg);
  box-shadow: 7px 7px 0 var(--shadow);
  transition: transform .3s;
  overflow: hidden;
  position: relative;
}
.computer-art:hover { transform: rotate(0deg) scale(1.02); }

/* scan-line flicker on hover */
.computer-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(57,240,196,.06) 0,
    rgba(57,240,196,.06) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  z-index: 1;
}
.computer-art:hover::before { opacity: 1; }

.screen-label {
  background: var(--shadow);
  color: var(--paper);
  padding: 7px;
  font: 10px "DM Mono", monospace;
}
.computer-art img {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
  filter: saturate(.75);
}
.computer-art figcaption {
  font: 10px "DM Mono", monospace;
  color: var(--cyan);
  padding-top: 8px;
  text-transform: uppercase;
}

.statusbar {
  height: 28px;
  border-top: 1px solid var(--line-c);
  display: flex;
  justify-content: space-between;
  padding: 7px 11px;
  color: var(--muted);
  font: 9px "DM Mono", monospace;
}

.hidden-window {
  display: none;
  left: 14%; top: 12%;
  width: min(650px, calc(100% - 210px));
}
.hidden-window.open { display: block; }

.wide-window    { width: min(850px, calc(100% - 210px)); }
.small-window   { width: min(390px, calc(100% - 210px)); }
.contact-window { left: 22%; top: 15%; width: min(550px, calc(100% - 240px)); }
.skills-window  { left: 18%; top: 10%; width: min(620px, calc(100% - 210px)); }

.text-body { min-height: 280px; }
.text-body h2 { font-size: 48px; }

.muted-copy {
  font: 11px "DM Mono", monospace !important;
  color: var(--cyan) !important;
  letter-spacing: .08em;
}

/* ── Skill Bars ── */
.skill-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }

.skill-row {
  display: grid;
  grid-template-columns: 160px 1fr 36px;
  align-items: center;
  gap: 10px;
  font: 11px "DM Mono", monospace;
}

.skill-name { color: var(--paper); letter-spacing: .04em; }

.skill-track {
  height: 10px;
  background: var(--skill-track);
  border: 1px solid var(--line-c);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--cyan);
  transition: width .9s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.skill-bar-fill::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
  background: rgba(255,255,255,.55);
  filter: blur(1px);
}
.aws-bar { background: linear-gradient(90deg, var(--cyan), var(--amber)); }
.skill-pct { color: var(--muted); text-align: right; }

/* ── Projects ── */
.file-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
  padding: 22px;
}
.file-grid article {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: 13px "DM Mono", monospace;
  color: var(--paper);
}
.file-grid small { color: var(--muted); font-size: 10px; }

.file-preview {
  height: 145px;
  display: grid;
  place-items: center;
  font: bold 55px "DM Mono", monospace;
  border: 1px solid var(--win-border);
  color: var(--ink);
}
.cyan-preview  { background: var(--cyan); }
.amber-preview { background: var(--amber); }
.red-preview   { background: var(--red); }

.project-link {
  display: inline-block;
  font: 10px "DM Mono", monospace;
  color: var(--amber);
  border-bottom: 1px solid var(--amber);
  padding-bottom: 2px;
  width: max-content;
  transition: color .15s;
}
.project-link:hover { color: var(--cyan); border-color: var(--cyan); }

.project-links {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.live-link {
  color: var(--cyan);
  border-bottom: 1px solid var(--cyan);
  font-weight: 500;
}
.live-link:hover { color: var(--amber); border-color: var(--amber); }

/* ── Documents ── */
.file-list { padding: 12px; }
.file-list button {
  display: grid;
  grid-template-columns: 35px 1fr auto;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-c);
  background: transparent;
  text-align: left;
  padding: 13px 4px;
  align-items: center;
  cursor: pointer;
  font: 12px "DM Mono", monospace;
  color: var(--paper);
  transition: background .12s;
}
.file-list button:hover { background: rgba(57,240,196,.07); }
.file-list small { color: var(--muted); font-size: 10px; }
.mini-icon { color: var(--cyan); font-size: 23px; }

/* ── Contact ── */
.email-link {
  display: block;
  color: var(--cyan);
  font: 18px "DM Mono", monospace;
  border-bottom: 1px solid var(--cyan);
  padding-bottom: 9px;
  width: max-content;
}
.social-links { display: flex; gap: 20px; margin-top: 24px; }
.social-links a {
  color: var(--amber);
  font: 13px "DM Mono", monospace;
  border-bottom: 1px solid var(--amber);
  padding-bottom: 4px;
}

/* ── Dock ── */
.dock {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  height: 52px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--dock-bg);
  border: 1px solid var(--dock-border);
  box-shadow: 0 4px 20px var(--shadow);
  z-index: 8;
  backdrop-filter: blur(10px);
  transition: background .35s, border-color .35s;
}

.dock button {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  font-size: 24px;
  transition: transform .15s;
  color: var(--paper);
}
.dock button:hover { transform: translateY(-4px) scale(1.14); }
.dock button small { font: 8px "DM Mono", monospace; color: var(--muted); }
.dock button:first-child span { color: var(--cyan); }
.dock button:nth-child(2)     span { color: var(--amber); }
.dock button:nth-child(3)     span { color: var(--paper); }
.dock button:nth-child(4)     span { color: var(--red); }
.dock i { height: 30px; border-left: 1px solid var(--line-c); }

.dock-caption, .creative-hint {
  font: 10px "DM Mono", monospace;
  color: var(--muted);
  white-space: nowrap;
}
.creative-hint {
  color: var(--amber);
  border-left: 1px solid var(--line-c);
  padding-left: 14px;
}

/* ── Debug / creative toggle ── */
.creative-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.creative-toggle:hover { color: var(--red); }

.debug-mode {
  background: var(--debug-bg) !important;
}
.debug-mode .window {
  box-shadow:
    8px 8px 0 rgba(255,102,89,.35),
    0 0 24px rgba(57,240,196,.22);
}

/* ── Cursor trail canvas ── */
#cursor-trail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
}

/* ══════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════ */
@keyframes appear {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes shake {
  0%,100% { transform: translate(0); }
  25%  { transform: translate(-9px, 3px); }
  50%  { transform: translate(8px, -2px); }
  75%  { transform: translate(-5px, 1px); }
}
@keyframes lag {
  50% { transform: translateX(6px); opacity: .45; }
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .35; }
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 700px) {
  .system-menu span:not(.apple), .uptime-badge { display: none; }
  .system-status span:not(:last-child):not(.theme-toggle):not(.konami-badge) { display: none; }

  .desktop-area { padding: 12px; }
  .desktop-icons { right: 7px; top: 15px; gap: 12px; width: 65px; }
  .icon { transform: scale(.75); }
  .desktop-icon { font-size: 8px; }

  .main-window { left: 10px; top: 12px; width: calc(100% - 90px); min-height: 520px; }
  .computer-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    min-height: 470px;
  }
  .computer-copy h1 { font-size: 43px; }
  .computer-copy p  { font-size: 14px; }
  .computer-art     { width: 75%; align-self: center; }

  .hidden-window, .wide-window, .small-window, .contact-window {
    left: 10px; top: 35px; width: calc(100% - 90px);
  }
  .file-grid { grid-template-columns: 1fr; }
  .file-preview { height: 100px; }
  .dock-caption { display: none; }
  .dock { gap: 9px; }
  .window-menu { font-size: 9px; }
  .skill-row { grid-template-columns: 110px 1fr 30px; font-size: 9px; }
  .creative-hint { display: none; }
}

/* ══════════════════════════════════════
   DINO GAME WINDOW
══════════════════════════════════════ */
.dino-window {
  left: 10%;
  top: 8%;
  width: min(740px, calc(100% - 120px));
}

.dino-container {
  background: var(--skill-track);
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#dino-canvas {
  display: block;
  width: 100%;
  max-width: 700px;
  height: auto;
  image-rendering: pixelated;
  background: transparent;
}

.dino-ui {
  position: absolute;
  top: 8px;
  right: 14px;
  display: flex;
  gap: 18px;
  font: 11px "DM Mono", monospace;
  color: var(--muted);
  letter-spacing: .08em;
  pointer-events: none;
}

.dino-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font: 13px "DM Mono", monospace;
  color: var(--cyan);
  letter-spacing: .1em;
  pointer-events: none;
  text-align: center;
  margin: 0;
  animation: blink 1.1s steps(2) infinite;
}

.dino-launcher {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: 18px;
  color: var(--cyan);
  transition: transform .2s, color .15s;
}
.dino-launcher:hover {
  transform: scale(1.25) rotate(15deg);
  color: var(--amber);
}

.dino-icon { font-size: 30px !important; }

@media (max-width: 700px) {
  .dino-window {
    left: 10px; top: 35px;
    width: calc(100% - 90px);
  }
}

/* ══════════════════════════════════════
   TERMINAL WINDOW
══════════════════════════════════════ */
.term-window {
  left: 8%;
  top: 9%;
  width: min(680px, calc(100% - 120px));
}

.term-icon { color: var(--cyan) !important; font-size: 36px !important; }

.term-body {
  background: #020c0e;
  min-height: 340px;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  font: 13px "DM Mono", monospace;
  padding: 0;
  overflow: hidden;
}

[data-theme="light"] .term-body { background: #0d1f22; }

.term-output {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scroll-behavior: smooth;
}

/* scrollbar */
.term-output::-webkit-scrollbar { width: 4px; }
.term-output::-webkit-scrollbar-track { background: transparent; }
.term-output::-webkit-scrollbar-thumb { background: var(--line-c); border-radius: 2px; }

.term-line {
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-cmd   { color: #c5ffc0; }
.term-ok    { color: var(--cyan); }
.term-err   { color: var(--red); }
.term-warn  { color: var(--amber); }
.term-dim   { color: #4a7a6a; }
.term-highlight { color: var(--amber); }
.term-bold  { color: #e0f5f0; font-weight: 500; }
.term-muted { color: #3a6a5a; }
.term-link  {
  color: var(--cyan);
  border-bottom: 1px solid var(--cyan);
  cursor: pointer;
  text-decoration: none;
}
.term-link:hover { color: var(--amber); border-color: var(--amber); }

.term-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 12px;
  border-top: 1px solid #0e2e30;
  background: #020c0e;
  flex-shrink: 0;
}
[data-theme="light"] .term-input-row { background: #0d1f22; }

.term-prompt {
  color: var(--cyan);
  white-space: nowrap;
  font: 12px "DM Mono", monospace;
  flex-shrink: 0;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #c5ffc0;
  font: 13px "DM Mono", monospace;
  caret-color: var(--cyan);
  min-width: 0;
}

.term-input::placeholder { color: #2a5a4a; }

@media (max-width: 700px) {
  .term-window {
    left: 10px; top: 35px;
    width: calc(100% - 90px);
  }
  .term-body { min-height: 280px; max-height: 320px; }
  .term-input-row { padding: 8px 12px; }
  .term-output { padding: 10px 12px 6px; }
}

/* ══════════════════════════════════════
   FINDER MENU DROPDOWN (Matrix trigger)
══════════════════════════════════════ */
.finder-menu-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.finder-menu-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font: 12px "DM Mono", monospace;
  padding: 0 4px;
  cursor: pointer;
  letter-spacing: .03em;
  transition: color .15s;
  white-space: nowrap;
}
.finder-menu-btn:hover,
.finder-menu-item.open .finder-menu-btn {
  color: var(--cyan);
}

.finder-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  background: var(--bar-bg);
  border: 1px solid var(--bar-border);
  box-shadow: 4px 8px 24px var(--shadow);
  z-index: 999;
  backdrop-filter: blur(12px);
  padding: 4px 0;
  animation: dropdownAppear .12s ease-out;
}
.finder-menu-item.open .finder-dropdown {
  display: block;
}

@keyframes dropdownAppear {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.finder-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  font: 11px "DM Mono", monospace;
  color: var(--paper);
  cursor: pointer;
  transition: background .1s;
  white-space: nowrap;
}
.finder-dropdown-item:hover {
  background: var(--cyan);
  color: var(--ink);
}
.finder-dropdown-item.disabled {
  color: var(--muted);
  cursor: default;
  font-size: 10px;
}
.finder-dropdown-item.disabled:hover {
  background: transparent;
  color: var(--muted);
}

.finder-item-icon {
  font-size: 13px;
  flex-shrink: 0;
}
.finder-item-key {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .04em;
}
.finder-dropdown-item:hover .finder-item-key {
  color: var(--ink);
}

.finder-dropdown-divider {
  height: 1px;
  background: var(--bar-border);
  margin: 4px 0;
}

@media (max-width: 700px) {
  .finder-menu-item { display: none; }
}
