/* ============================================================
   NB.OS — styles
   Tokens first; everything derives from them.
   ============================================================ */

:root {
  /* neutrals (blue-tinted, never pure black/white) */
  --bg: #0a0c10;
  --bg-2: #0e1117;
  --surface: #12151d;
  --surface-2: #171b25;
  --surface-3: #1d2230;
  --line: rgba(232, 236, 241, 0.09);
  --line-strong: rgba(232, 236, 241, 0.18);
  --text: #e8ecf1;
  --muted: #8b94a3;
  --faint: #5c6472;

  /* theme accent — swapped at runtime by theme engine */
  --accent: #4cc3ff;
  --accent-2: #2563eb;
  --glow: rgba(76, 195, 255, 0.35);
  --on-accent: #06131c;

  /* type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  --r-tile: 16px;
  --r-win: 10px;
  --r-btn: 8px;

  --shadow-tile: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px rgba(0,0,0,.35);
  --shadow-win: 0 24px 60px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.4);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in: cubic-bezier(.6, 0, .8, .4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--on-accent); }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* thin dark scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

.mono { font-family: var(--font-mono); }

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   LANDING
   ============================================================ */

#landing {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 2.2vw, 28px);
  gap: var(--s3);
  position: relative;
  z-index: 1;
}

#landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
}

/* top bar */
.land-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s2) var(--s2) var(--s3);
}

.land-brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px var(--glow);
}

.brand-text { line-height: 1.2; }
.brand-text strong { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.brand-text span { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

.land-status {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 14px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3ddc97;
  box-shadow: 0 0 10px rgba(61,220,151,.8);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* bento grid */
.bento {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(148px, auto);
  gap: var(--s3);
}

.tile {
  position: relative;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  box-shadow: var(--shadow-tile);
  padding: var(--s5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
  transition: border-color .25s var(--ease-out), transform .25s var(--ease-out);
}

.tile-btn { text-align: left; }

.tile-btn:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.tile .label { margin-bottom: var(--s3); display: flex; align-items: center; gap: var(--s2); }
.tile .label svg { width: 13px; height: 13px; stroke: var(--accent); }

/* NB.OS is the main event — the hero slot belongs to the login screen */
.t-os       { grid-column: 1 / 7;  grid-row: 1 / 3; }
.t-travel   { grid-column: 7 / 10; grid-row: 1 / 3; }
.t-hero     { grid-column: 10 / 13; grid-row: 1 / 2; justify-content: flex-end; }
.t-time     { grid-column: 10 / 13; grid-row: 2 / 3; }
.t-theme    { grid-column: 1 / 7;  grid-row: 3 / 4; }
.t-contact  { grid-column: 7 / 13; grid-row: 3 / 4; }

/* tiles glow toward the accent on hover */
.tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-tile), 0 0 44px -16px var(--glow); }

/* hero (compact now — NB.OS took the big slot) */
.t-hero h1 {
  margin: 0 0 var(--s2);
  font-size: clamp(26px, 2.4vw, 38px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.t-hero #hero-tagline { font-size: 13px; }

.t-hero h1 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}

.t-hero .hero-role {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: var(--s3);
}

.t-hero p { margin: 0; color: var(--muted); max-width: 46ch; }

.t-hero .hero-role::after {
  content: '▮';
  margin-left: 6px;
  animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint) !important;
  margin-top: var(--s3) !important;
}

.hero-watermark {
  position: absolute;
  top: -0.18em;
  right: -0.05em;
  font-size: clamp(160px, 22vw, 320px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 26%, transparent);
  pointer-events: none;
  user-select: none;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 85% 10%, black, transparent 70%);
  pointer-events: none;
}

/* travel tile */
.t-travel { padding-bottom: var(--s3); }
.globe-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
}
.globe-wrap canvas { outline: none; }
.travel-count {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  justify-content: space-between;
}
.travel-count strong { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.travel-count span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* time tile (compact) */
.clock-row { display: flex; flex-direction: column; gap: var(--s2); flex: 1; justify-content: center; }
.clock {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}
.clock .who {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.clock .who b { color: var(--text); font-weight: 500; display: block; font-size: 10px; margin-top: 2px; }
.clock time {
  font-family: var(--font-mono);
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.clock time small { font-size: 0.5em; color: var(--muted); margin-left: 4px; }
.clock-diff {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: .08em;
}

/* NB.OS tile — a login screen */
.t-os { justify-content: flex-start; cursor: pointer; }
.os-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .85;
  background: var(--bg); /* never flash white if a frame is lost */
}
.t-os > :not(.os-preview) { position: relative; z-index: 1; }
.login {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
}
.login-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 26px;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 48px var(--glow), 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  margin-bottom: var(--s2);
}
.login-avatar img { width: 100%; height: 100%; object-fit: cover; }
.login-name { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.login-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.login-btn {
  margin-top: var(--s4);
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 14.5px;
  border-radius: 99px;
  padding: 11px 26px;
  transition: transform .2s var(--ease-out), filter .15s;
}
.login-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.t-os:hover .login-btn { filter: brightness(1.12); }
.login-hint {
  margin-top: var(--s3);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: .04em;
}

/* theme tile — mini terminal */
.t-theme { font-family: var(--font-mono); }
.term-lines { font-size: 12.5px; line-height: 1.8; color: var(--muted); }
.term-lines .prompt { color: var(--accent); }
.term-lines .out { color: var(--text); }
.theme-swatches { display: flex; gap: var(--s2); margin: var(--s3) 0; flex-wrap: wrap; }
.swatch {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  position: relative;
  transition: transform .15s var(--ease-out);
}
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1.5px solid var(--accent);
  border-radius: 11px;
}
.theme-input {
  display: flex;
  align-items: center;
  gap: var(--s2);
  border-top: 1px solid var(--line);
  padding-top: var(--s3);
  margin-top: auto;
  font-size: 12.5px;
}
.theme-input input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  outline: none;
}
.theme-input input::placeholder { color: var(--faint); }

/* contact tile */
.contact-actions { display: flex; flex-direction: column; gap: var(--s2); flex: 1; justify-content: center; }
.contact-btn {
  display: flex;
  align-items: center;
  gap: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, background .15s;
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}
.contact-btn:hover { border-color: var(--accent); background: var(--surface-2); }
.contact-btn svg { width: 16px; height: 16px; stroke: var(--accent); flex: none; }
.contact-btn span { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-left: auto; letter-spacing: .06em; }

.land-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: .08em;
  padding: var(--s2) var(--s2) 0;
}

/* ============================================================
   BOOT
   ============================================================ */

#boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #05070a;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(24px, 12vw, 160px);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
#boot.on { display: flex; }
#boot .line { line-height: 2; opacity: 0; animation: bootline .18s forwards; }
#boot .line .ok { color: var(--accent); }
@keyframes bootline { to { opacity: 1; } }

/* ============================================================
   DESKTOP (NB.OS)
   ============================================================ */

#desktop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  overflow: hidden;
}
#desktop.on { display: block; }

#wallpaper { position: absolute; inset: 0; }

/* desktop icons */
.desk-icons {
  position: absolute;
  top: 18px;
  left: 14px;
  bottom: 66px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  z-index: 1;
}

.dicon {
  text-decoration: none;
  width: 92px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
}
.dicon:hover { background: rgba(232,236,241,.07); border-color: rgba(232,236,241,.1); }
.dicon:active { background: rgba(232,236,241,.12); }
.dicon .ig {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.dicon .ig svg { width: 22px; height: 22px; stroke: var(--accent); }
.dicon .txt {
  font-size: 11.5px;
  line-height: 1.25;
  text-align: center;
  color: var(--text);
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
  font-family: var(--font-mono);
}

/* windows */
.window {
  position: absolute;
  min-width: 320px;
  min-height: 200px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-win);
  box-shadow: var(--shadow-win);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(14px);
  animation: winin .22s var(--ease-out);
}
@keyframes winin {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.window.closing { animation: winout .16s var(--ease-in) forwards; }
@keyframes winout {
  to { opacity: 0; transform: scale(.97) translateY(6px); }
}
.window.minimized { display: none; }
.window.maxed { border-radius: 0; }

.win-title {
  height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 6px 0 14px;
  background: color-mix(in srgb, var(--surface-2) 85%, transparent);
  border-bottom: 1px solid var(--line);
  user-select: none;
  cursor: grab;
  touch-action: none;
}
.win-title:active { cursor: grabbing; }
.win-title svg.wicon { width: 14px; height: 14px; stroke: var(--accent); flex: none; }
.win-title .tname {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-ctl { margin-left: auto; display: flex; }
.win-ctl button {
  width: 40px; height: 30px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--muted);
}
.win-ctl button:hover { background: rgba(232,236,241,.09); color: var(--text); }
.win-ctl button.close:hover { background: #e11d48; color: #fff; }
.win-ctl svg { width: 12px; height: 12px; }

.win-body {
  flex: 1;
  overflow: auto;
  position: relative;
  min-height: 0;
  container-type: inline-size;
}

/* app layouts adapt to their window, not the viewport */
@container (max-width: 620px) {
  .rc-hero { padding: 36px 24px 28px; }
  .rc-helmet { position: static; translate: none; width: 200px; margin-top: 20px; }
  .rc-stats { grid-template-columns: repeat(2, 1fr); }
  .rc-stats > div:nth-child(3) { border-left: none; }
  .rc-stats > div:nth-child(n+3) { border-top: 1px solid rgba(0,232,123,.16); }
  .rc-hall, .rc-cta { padding-left: 24px; padding-right: 24px; }
  .app-tools { flex-direction: column; }
  .tl-side {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .tl-cat { margin: 4px 6px; width: auto; }
  .tl-item { width: auto; }
  .app-travel { flex-direction: column; }
  .tv-side { border-left: none; border-top: 1px solid var(--line); }
}

/* taskbar */
#taskbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 52px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s3);
  background: color-mix(in srgb, var(--bg-2) 78%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.tb-start {
  height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: var(--s2);
  border-radius: var(--r-btn);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.tb-start:hover { filter: brightness(1.1); }

.tb-apps { display: flex; gap: 4px; flex: 1; overflow-x: auto; padding: 0 var(--s2); }
.tb-app {
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--r-btn);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
}
.tb-app svg { width: 14px; height: 14px; stroke: currentColor; }
.tb-app:hover { background: var(--surface-2); color: var(--text); }
.tb-app.active {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.tb-right {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.tb-clock { text-align: right; line-height: 1.3; font-variant-numeric: tabular-nums; }
.tb-clock b { color: var(--text); font-weight: 500; display: block; }
.tb-exit {
  height: 38px; padding: 0 12px;
  border-radius: var(--r-btn);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  border: 1px solid var(--line);
}
.tb-exit:hover { color: var(--text); border-color: var(--line-strong); }

/* start menu */
#startmenu {
  position: absolute;
  left: 12px;
  bottom: 62px;
  width: 300px;
  z-index: 60;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-win);
  backdrop-filter: blur(18px);
  padding: var(--s3);
  display: none;
  animation: winin .18s var(--ease-out);
}
#startmenu.on { display: block; }
#startmenu .sm-head {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2) var(--s2) var(--s3);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s2);
}
#startmenu .sm-head .brand-mark { width: 34px; height: 34px; font-size: 12px; }
#startmenu .sm-head div { line-height: 1.25; }
#startmenu .sm-head strong { font-size: 14px; }
#startmenu .sm-head span { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); display: block; }
.sm-item {
  width: 100%;
  display: flex; align-items: center; gap: var(--s3);
  padding: 9px 10px;
  border-radius: var(--r-btn);
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
}
.sm-item:hover { background: var(--surface-2); }
.sm-item svg { width: 16px; height: 16px; stroke: var(--accent); flex: none; }
.sm-item .ext { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--faint); }
.sm-sep { height: 1px; background: var(--line); margin: var(--s2) 0; }

/* ---------- taskbar pins (a shortcut to everything) ---------- */
.tb-pins {
  display: flex;
  gap: 2px;
  padding: 0 var(--s2);
  border-right: 1px solid var(--line);
}
.tb-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-btn);
  color: var(--muted);
  position: relative;
  transition: transform .18s var(--ease-out), background .15s, color .15s;
}
.tb-icon svg { width: 17px; height: 17px; stroke: currentColor; }
.tb-icon:hover { background: var(--surface-2); color: var(--text); }
.tb-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 4px 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.tb-icon:hover .tb-tip { opacity: 1; }

/* ---------- tray: colours · wallpaper · skin · tips ---------- */
.tb-tray { display: flex; align-items: center; gap: 2px; position: relative; }
.tray-pop {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  min-width: 150px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-win);
  backdrop-filter: blur(18px);
  padding: var(--s3);
  display: none;
}
.tray-pop.on { display: block; animation: winin .18s var(--ease-out); }
.pop-label {
  margin: 0 0 var(--s2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
}
.pop-swatches { display: grid; grid-template-columns: repeat(6, 26px); gap: 7px; }
.pop-swatches .swatch { width: 26px; height: 26px; border-radius: 7px; }
.pop-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: var(--r-btn);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.pop-item:hover { background: var(--surface-2); color: var(--text); }
.pop-item[aria-pressed="true"] { color: var(--accent); }
.pop-item[aria-pressed="true"]::after { content: ' ●'; font-size: 9px; }
.skin-seg {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  overflow: hidden;
  margin: 0 4px;
}
.skin-seg button {
  width: 34px; height: 32px;
  font-size: 14px;
  color: var(--muted);
  display: grid; place-items: center;
}
.skin-seg button:hover { color: var(--text); background: var(--surface-2); }
.skin-seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* ---------- guided tips toast ---------- */
#os-tip {
  position: absolute;
  right: 16px;
  bottom: 68px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: var(--s3);
  max-width: 360px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-win);
  backdrop-filter: blur(14px);
  font-size: 13px;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease-out);
}
#os-tip.show { opacity: 1; transform: none; pointer-events: auto; }
#os-tip .tip-ic svg { width: 16px; height: 16px; stroke: var(--accent); display: block; }
#os-tip .tip-txt b { color: var(--accent); font-weight: 600; }
#os-tip .tip-x {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--faint);
  flex: none;
}
#os-tip .tip-x:hover { background: var(--surface-2); color: var(--text); }
#os-tip .tip-x svg { width: 11px; height: 11px; }

/* ---------- mac-mode menu bar ---------- */
#menubar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30px;
  z-index: 55;
  display: none;
  align-items: center;
  gap: 2px;
  padding: 0 10px;
  background: color-mix(in srgb, var(--bg-2) 84%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.mb-item {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text);
}
.mb-brand { font-weight: 700; }
button.mb-item:hover { background: var(--surface-2); }
.mb-dim { color: var(--muted); }
.mb-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
#mb-clock { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ============================================================
   MAC SKIN — same OS, different outfit
   ============================================================ */

body[data-skin="mac"] #menubar { display: flex; }
body[data-skin="mac"] .desk-icons { top: 44px; left: auto; right: 14px; }

/* taskbar becomes a floating dock */
body[data-skin="mac"] #taskbar {
  left: 50%;
  right: auto;
  bottom: 10px;
  transform: translateX(-50%);
  width: auto;
  max-width: calc(100% - 24px);
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 0 10px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
}
body[data-skin="mac"] .tb-start,
body[data-skin="mac"] .tb-exit,
body[data-skin="mac"] .tb-clock { display: none; }
body[data-skin="mac"] .tb-pins { border-right: none; }
body[data-skin="mac"] .tb-apps { flex: none; border-left: 1px solid var(--line); padding-left: var(--s2); }
body[data-skin="mac"] .tb-app span { display: none; }
body[data-skin="mac"] .tb-app { padding: 0 10px; }
body[data-skin="mac"] .tb-icon:hover { transform: translateY(-8px) scale(1.22); background: transparent; color: var(--accent); }
body[data-skin="mac"] .tb-tip { bottom: calc(100% + 14px); }

/* traffic-light window controls, centered titles */
body[data-skin="mac"] .window { border-radius: 12px; }
body[data-skin="mac"] .win-title { justify-content: center; position: relative; }
body[data-skin="mac"] .win-title svg.wicon { display: none; }
body[data-skin="mac"] .win-ctl {
  position: absolute;
  left: 12px; top: 50%;
  translate: 0 -50%;
  margin: 0;
  gap: 8px;
}
body[data-skin="mac"] .win-ctl button {
  width: 13px; height: 13px;
  border-radius: 50%;
  padding: 0;
}
body[data-skin="mac"] .win-ctl svg { display: none; }
body[data-skin="mac"] .win-ctl [data-act="close"] { background: #ff5f57; order: -3; }
body[data-skin="mac"] .win-ctl [data-act="min"]   { background: #febc2e; order: -2; }
body[data-skin="mac"] .win-ctl [data-act="max"]   { background: #28c840; order: -1; }
body[data-skin="mac"] .win-ctl button:hover { filter: brightness(1.15); }
body[data-skin="mac"] .win-ctl button.close:hover { background: #ff5f57; }

/* maximized windows respect the menubar + floating dock */
body[data-skin="mac"] .window.maxed {
  top: 30px !important;
  height: calc(100% - 108px) !important;
  border-radius: 12px;
}

/* mac-flavoured desktop icons: squircles, system font labels */
body[data-skin="mac"] .dicon .ig {
  border-radius: 15px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--surface-3) 94%, transparent),
    color-mix(in srgb, var(--surface-2) 94%, transparent));
}
body[data-skin="mac"] .dicon .txt { font-family: var(--font-display); font-size: 11.5px; }

/* start menu docks under the  menu */
body[data-skin="mac"] #startmenu { bottom: auto; top: 38px; left: 8px; }

/* ============================================================
   APP CONTENT
   ============================================================ */

.pad { padding: var(--s5); }

/* terminal app */
.app-terminal {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 13px;
  background: #07090d;
}
.term-out { flex: 1; overflow: auto; padding: var(--s4); line-height: 1.75; }
.term-out .in-echo { color: var(--muted); }
.term-out .in-echo::before { content: '❯ '; color: var(--accent); }
.term-out .res { color: var(--text); white-space: pre-wrap; }
.term-out .err { color: #ff7a45; }
.term-in {
  display: flex; align-items: center; gap: var(--s2);
  border-top: 1px solid var(--line);
  padding: var(--s3) var(--s4);
}
.term-in .ps1 { color: var(--accent); }
.term-in input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font: inherit;
}

/* resume app */
.app-resume { max-width: 720px; margin: 0 auto; padding: var(--s6) var(--s6) var(--s7); }
.app-resume header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s5); }
.app-resume h1 { margin: 0; font-size: 30px; letter-spacing: -0.02em; }
.app-resume .r-role { font-family: var(--font-mono); font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; margin-top: 4px; }
.app-resume .r-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); text-align: right; line-height: 1.9; }
.app-resume .r-meta a { color: var(--muted); }
.app-resume h2 {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--s2);
  margin: var(--s6) 0 var(--s4);
}
.app-resume .xp { margin-bottom: var(--s4); }
.app-resume .xp-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.app-resume .xp-head strong { font-size: 15px; }
.app-resume .xp-head em { font-style: normal; color: var(--muted); font-size: 13px; }
.app-resume .xp-head span { font-family: var(--font-mono); font-size: 11px; color: var(--faint); white-space: nowrap; }
.app-resume ul { margin: var(--s2) 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.app-resume ul li { margin-bottom: 4px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.skill-chips span {
  font-family: var(--font-mono); font-size: 11.5px;
  border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 12px; color: var(--muted);
}
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 13.5px;
  border-radius: var(--r-btn);
  padding: 10px 16px;
  text-decoration: none;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn svg { width: 15px; height: 15px; }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn.ghost:hover { border-color: var(--accent); filter: none; }

/* projects app */
.app-projects { padding: var(--s5); }
.app-projects .intro { color: var(--muted); font-size: 14px; margin: 0 0 var(--s5); max-width: 52ch; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s3); }
.proj-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--s4);
  background: var(--surface-2);
  display: flex; flex-direction: column; gap: var(--s2);
  transition: border-color .15s, transform .2s var(--ease-out);
}
.proj-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.proj-card svg { width: 20px; height: 20px; stroke: var(--accent); }
.proj-card strong { font-size: 14.5px; }
.proj-card p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.proj-card .tag { font-family: var(--font-mono); font-size: 10px; color: var(--faint); letter-spacing: .1em; text-transform: uppercase; margin-top: auto; }

/* shape lab */
.app-shapelab { height: 100%; display: flex; flex-direction: column; }
.sl-stage { flex: 1; min-height: 0; position: relative; background: radial-gradient(ellipse at 50% 40%, #10141c, #07090d); }
.sl-stage canvas { display: block; }
.sl-drop {
  position: absolute; inset: 0;
  display: none; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 2px dashed var(--accent);
  font-family: var(--font-mono); font-size: 13px; color: var(--text);
  z-index: 2;
}
.sl-stage.dragover .sl-drop { display: grid; }
.sl-bar {
  flex: none;
  display: flex; align-items: center; gap: var(--s2);
  flex-wrap: wrap;
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.sl-shapes { display: flex; gap: 4px; flex-wrap: wrap; }
.sl-shape {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r-btn);
  border: 1px solid var(--line);
  color: var(--muted);
}
.sl-shape svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.sl-shape:hover { color: var(--text); border-color: var(--line-strong); }
.sl-shape.active { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.sl-ctl { display: flex; gap: var(--s2); margin-left: auto; align-items: center; }
.sl-btn {
  height: 34px; padding: 0 14px;
  border-radius: var(--r-btn);
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.sl-btn:hover { border-color: var(--accent); }
.sl-btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.sl-btn svg { width: 13px; height: 13px; }
.sl-file-name { font-family: var(--font-mono); font-size: 11px; color: var(--faint); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* converter */
.app-convert { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); height: 100%; }
.cv-drop {
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  min-height: 150px;
  display: grid; place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  padding: var(--s4);
}
.cv-drop:hover, .cv-drop.dragover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.cv-drop .big { font-size: 15px; color: var(--text); display: block; margin-bottom: 4px; }
.cv-drop img { max-width: 100%; max-height: 180px; border-radius: 8px; }
.cv-row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.cv-row .label { margin: 0; }
.seg { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r-btn); overflow: hidden; }
.seg button {
  padding: 8px 16px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--muted);
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.cv-note { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-top: auto; }

/* ---------- NB.SYS builder page (fixed phosphor-green PCB palette) ---------- */
.app-system {
  --ln: #00e87b;
  --sys: #00e87b;
  background: #090d0a;
  min-height: 100%;
}
.helmet-glare {
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.16), transparent 55%);
  pointer-events: none;
}
.rc-hero {
  position: relative;
  padding: 56px 40px 40px;
  overflow: hidden;
  perspective: 900px;
  border-bottom: 1px solid rgba(0,232,123,.18);
  background:
    radial-gradient(ellipse at 85% 20%, rgba(0,232,123,.13), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(0,232,123,.05) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(0,232,123,.05) 31px 32px),
    #090d0a;
}
.rc-kicker {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ln);
  margin: 0 0 14px;
}
.rc-hero h1 {
  margin: 0;
  font-size: clamp(52px, 9vw, 96px);
  line-height: .92;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: #e9f5ec;
  text-transform: uppercase;
}
.rc-sub { color: #8fa596; max-width: 34ch; font-size: 14.5px; }
.rc-helmet {
  position: absolute;
  right: 24px; top: 50%;
  width: min(300px, 38%);
  aspect-ratio: 1;
  translate: 0 -50%;
  transform-style: preserve-3d;
  transition: transform .12s linear;
  filter: drop-shadow(0 22px 34px rgba(0,0,0,.55));
  cursor: pointer;
}

/* two stacked layers: CPU chip and portrait; the swap looks like a BIOS scan */
.sys-layer {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  transition: opacity .16s linear;
}
.sys-layer svg, .sys-layer img { width: 100%; height: 100%; display: block; }
.sys-layer img {
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(0,232,123,.45);
  filter: saturate(.85) contrast(1.06);
}
.sys-layer--face { opacity: 0; }
.sys-layer--face::after { /* CRT scanline texture over the portrait */
  content: '';
  position: absolute; inset: 2px;
  border-radius: 12px;
  background: repeating-linear-gradient(0deg, rgba(0,232,123,.07) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.sys-swap.show-face .sys-layer--face { opacity: 1; }
.sys-swap.show-face .sys-layer--chip { opacity: 0; }

.sys-scan {
  position: absolute; left: -5%; right: -5%; top: 0;
  height: 3px;
  background: var(--sys);
  box-shadow: 0 0 18px 5px rgba(0,232,123,.5);
  opacity: 0;
  pointer-events: none;
}
.sys-swap.scanning .sys-scan { animation: sysScan .6s linear; }
.sys-swap.scanning .sys-layer { animation: sysGlitch .6s steps(3); }
@keyframes sysScan {
  0% { top: 0; opacity: 1; }
  100% { top: calc(100% - 3px); opacity: 1; }
}
@keyframes sysGlitch {
  30% { transform: translateX(2px); }
  55% { transform: translateX(-3px); }
  75% { transform: translateX(1px); }
}

/* the chip stays alive: current pulses along the pins + breathing core */
.sys-layer--chip svg g path {
  stroke-dasharray: 3 5;
  animation: sysTrace 1.4s linear infinite;
}
.sys-layer--chip svg > rect + rect { animation: sysCore 2.6s ease-in-out infinite; }
@keyframes sysTrace { to { stroke-dashoffset: -16; } }
@keyframes sysCore { 50% { opacity: .68; } }

@media (prefers-reduced-motion: reduce) {
  .sys-layer--chip svg g path, .sys-layer--chip svg > rect + rect,
  .sys-swap.scanning .sys-scan, .sys-swap.scanning .sys-layer { animation: none; }
}

.rc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid rgba(0,232,123,.16);
}
.rc-stats > div {
  padding: 22px 18px;
  text-align: center;
}
.rc-stats > div + div { border-left: 1px solid rgba(0,232,123,.16); }
.rc-stats strong { display: block; font-size: 30px; font-weight: 700; color: var(--ln); letter-spacing: -0.02em; }
.rc-stats span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #8fa596; }

.rc-about {
  padding: 34px 40px 8px;
  max-width: 76ch;
}
.rc-about h2 {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--ln);
}
.rc-about p { margin: 0 0 12px; color: #a8bfae; font-size: 14px; line-height: 1.75; }
.rc-about a { color: var(--ln); text-decoration-color: rgba(0,232,123,.4); }

.rc-hall { padding: 36px 40px; }
.rc-hall h2 {
  margin: 0 0 22px;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #e9f5ec;
}
.rc-hall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.rc-hcard {
  background: #0e130f;
  border: 1px solid rgba(0,232,123,.14);
  border-radius: 12px;
  padding: 18px 12px 14px;
  text-align: center;
  cursor: pointer;
  transition: transform .22s var(--ease-out), border-color .2s, background .2s;
}
.rc-hcard svg { width: 100%; filter: grayscale(1) brightness(.8); transition: filter .25s var(--ease-out), transform .25s var(--ease-out); }
.rc-hcard span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8fa596; transition: color .2s; }
.rc-hcard:hover, .rc-hcard:focus-visible {
  transform: translateY(-5px);
  border-color: var(--ln);
  background: #101710;
}
.rc-hcard:hover svg, .rc-hcard:focus-visible svg { filter: none; transform: scale(1.06) rotate(-3deg); }
.rc-hcard:hover span, .rc-hcard:focus-visible span { color: var(--ln); }

.rc-marquee {
  overflow: hidden;
  border-block: 1px solid rgba(0,232,123,.16);
  padding: 12px 0;
  background: #0b100c;
}
.rc-track {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--ln);
  animation: marquee 24s linear infinite;
  width: max-content;
}
@keyframes marquee { to { transform: translateX(-33.33%); } }

.rc-cta {
  padding: 28px 40px 40px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.rc-cta .btn { background: var(--ln); color: #0e130f; }

/* ---------- RAMPG showcase ---------- */
.app-rampg { display: flex; flex-direction: column; height: 100%; }
.rg-demo {
  position: relative;
  flex: none;
  height: 200px;
  background: radial-gradient(ellipse at 50% 20%, #10141c, #07090d);
  border-bottom: 1px solid var(--line);
}
.rg-demo canvas { display: block; width: 100%; height: 100%; }
.rg-badge {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 99px;
  padding: 4px 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.rg-info { padding: var(--s5) var(--s6); overflow: auto; }
.rg-info h1 { margin: 0; font-size: 30px; letter-spacing: -0.02em; }
.rg-tag { font-family: var(--font-mono); font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; margin: 4px 0 14px; }
.rg-info p { color: var(--muted); font-size: 14px; }
.rg-info ul { color: var(--muted); font-size: 13.5px; padding-left: 18px; }
.rg-info ul li { margin-bottom: 4px; }
.rg-info .skill-chips { margin-top: var(--s4); }
.rg-cta { margin-top: var(--s5); padding-bottom: var(--s2); }

/* ---------- Tools ---------- */
.tb-pin {
  height: 38px;
  padding: 0 14px;
  display: flex; align-items: center; gap: 8px;
  border-radius: var(--r-btn);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.tb-pin svg { width: 14px; height: 14px; stroke: var(--accent); }
.tb-pin:hover { color: var(--text); background: var(--surface-2); border-color: var(--line-strong); }

.app-tools { display: flex; height: 100%; }
.tl-side {
  width: 200px;
  flex: none;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: var(--s3);
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}
.tl-cat {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint);
  margin: var(--s4) var(--s2) var(--s1);
}
.tl-cat:first-child { margin-top: var(--s1); }
.tl-item {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: var(--r-btn);
}
.tl-item:hover { color: var(--text); background: var(--surface-2); }
.tl-item.active { color: var(--text); background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }

.tl-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.tl-head { padding: var(--s5) var(--s5) 0; }
.tl-head h2 { margin: 0 0 2px; font-size: 20px; letter-spacing: -0.01em; }
.tl-body { padding: var(--s4) var(--s5) var(--s5); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s3); }

.t-row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.t-field { display: flex; flex-direction: column; gap: 4px; }
.t-field label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}
.t-field output { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.t-in, .t-area {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 12px;
  min-width: 0;
}
.t-in:focus, .t-area:focus { outline: none; border-color: var(--accent); }
.t-area { width: 100%; resize: vertical; line-height: 1.6; }
.t-chip { width: 38px; height: 38px; border-radius: var(--r-btn); border: 1px solid var(--line-strong); flex: none; }
.t-out-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
.t-big { font-family: var(--font-mono); font-size: 30px; font-weight: 500; color: var(--accent); letter-spacing: -0.01em; }
.t-sample { border-radius: var(--r-btn); border: 1px solid var(--line); padding: var(--s4); font-size: 15px; }
.t-code {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: #07090d;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  padding: var(--s3);
  color: var(--text);
  overflow-x: auto;
  min-height: 20px;
}
.t-code mark { background: var(--accent); color: var(--on-accent); border-radius: 3px; padding: 0 1px; }
.t-pass { font-family: var(--font-mono); font-size: 12px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line-strong); }
.t-pass.ok { color: #3ddc97; border-color: rgba(61,220,151,.5); }
.t-pass.no { color: #ff7a45; border-color: rgba(255,122,69,.5); }
.t-palette { display: flex; gap: var(--s2); height: 120px; }
.pl-swatch {
  flex: 1;
  border-radius: var(--r-btn);
  border: 1px solid var(--line);
  position: relative;
  transition: flex .25s var(--ease-out);
}
.pl-swatch:hover { flex: 1.6; }
.pl-swatch span {
  position: absolute; bottom: 8px; left: 50%; translate: -50% 0;
  font-family: var(--font-mono); font-size: 10.5px;
  color: rgba(0,0,0,.75);
  background: rgba(255,255,255,.75);
  padding: 2px 7px; border-radius: 99px;
  opacity: 0; transition: opacity .15s;
}
.pl-swatch:hover span { opacity: 1; }
.df-add { color: #3ddc97; }
.df-del { color: #ff7a45; }

/* travel window */
.app-travel { height: 100%; display: flex; }
.tv-globe { flex: 1.4; min-width: 0; position: relative; background: radial-gradient(ellipse at 50% 50%, #0c1018, #07090d); display: grid; place-items: center; }
.tv-side { flex: 1; border-left: 1px solid var(--line); padding: var(--s5); overflow: auto; min-width: 220px; }
.tv-side h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -0.01em; }
.tv-side .sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--s4); }
.tv-list { display: flex; flex-direction: column; }
.tv-list li {
  list-style: none;
  display: flex; align-items: center; gap: var(--s3);
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.tv-list li .fl { font-size: 17px; }
.tv-list li .cc { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }
.tv-list { padding: 0; margin: 0; }

/* about app */
.app-about { padding: var(--s6); max-width: 620px; }
.app-about h1 { font-size: 26px; margin: 0 0 var(--s3); letter-spacing: -0.02em; }
.app-about p { color: var(--muted); font-size: 14.5px; }
.app-about .sig { font-family: var(--font-mono); color: var(--accent); font-size: 12.5px; margin-top: var(--s5); }

/* generic empty/note */
.note { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1023px) {
  .bento { grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(140px, auto); }
  .t-os { grid-column: 1 / 7; grid-row: 1 / 3; min-height: 320px; }
  .t-hero { grid-column: 1 / 4; grid-row: 3 / 4; }
  .t-time { grid-column: 4 / 7; grid-row: 3 / 4; }
  .t-travel { grid-column: 1 / 4; grid-row: 4 / 6; min-height: 300px; }
  .t-theme { grid-column: 4 / 7; grid-row: 4 / 5; }
  .t-contact { grid-column: 4 / 7; grid-row: 5 / 6; }
}

@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .t-hero, .t-travel, .t-time, .t-os, .t-theme, .t-contact { grid-column: 1 / 2; grid-row: auto; }
  .t-os { min-height: 340px; }
  .t-travel { min-height: 340px; }
  .desk-icons { bottom: 120px; }
  .app-travel { flex-direction: column; }
  .tv-side { border-left: none; border-top: 1px solid var(--line); }
  .window { min-width: 0; }
}

/* ============================================================
   MOTION SAFETY
   ============================================================ */

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

/* ============================================================
   PRINT (resume)
   ============================================================ */

@media print {
  body * { visibility: hidden; }
  .app-resume, .app-resume * { visibility: visible; }
  .app-resume {
    position: fixed; inset: 0;
    background: #fff; color: #111;
    max-width: none;
  }
  .app-resume .r-role, .app-resume h2 { color: #2563eb; }
  .app-resume p, .app-resume ul, .app-resume .xp-head em, .app-resume .r-meta, .app-resume .r-meta a { color: #444; }
  .app-resume .skill-chips span { color: #444; border-color: #ccc; }
  .app-resume .no-print { display: none; }
}
