/* ============================================================
   Aa OS — Portfolio of Aa Reyes
   Interactive desktop-OS portfolio. Vanilla CSS, no build step.
   ============================================================ */

:root {
  --bg:        #07080c;
  --bg-2:      #0c0e15;
  --surface:   #14161f;
  --surface-2: #1b1e2b;
  --surface-3: #232636;
  --border:    rgba(255, 255, 255, 0.09);
  --border-2:  rgba(255, 255, 255, 0.16);
  --text:      #e9eaf0;
  --text-dim:  #9a9db0;
  --text-mute: #6b6e80;
  --accent:    #ff8159;
  --accent-2:  #7c8bff;
  --green:     #56d98a;
  --radius:    14px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --font:      'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --menubar-h: 38px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body.is-stacked { overflow: auto; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; color: var(--text); }
em { font-style: normal; color: var(--accent); font-weight: 500; }
::selection { background: var(--accent); color: #1a0e08; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
[hidden] { display: none !important; }

/* ============================================================
   BOOT SCREEN
   ============================================================ */
.boot {
  position: fixed; inset: 0; z-index: 10000;
  background: radial-gradient(ellipse at 50% 40%, #12141d, #07080c 75%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px;
  transition: opacity 0.6s var(--ease);
}
.boot.hidden { opacity: 0; pointer-events: none; }
.boot__logo {
  font-family: var(--font-head); font-size: 3.4rem; font-weight: 700;
  letter-spacing: -0.02em;
}
.boot__logo span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.boot__log {
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.9;
  color: var(--text-dim); min-height: 150px; width: min(420px, 86vw);
}
.boot__log .ok { color: var(--green); }
.boot__hint {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-mute);
  animation: pulseFade 2s infinite;
}
@keyframes pulseFade { 50% { opacity: 0.35; } }

/* ============================================================
   MENU BAR
   ============================================================ */
.menubar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--menubar-h); z-index: 5000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: rgba(10, 11, 16, 0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
}
.menubar__left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.menubar__logo { font-family: var(--font-head); font-weight: 600; }
.menubar__logo b {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.menubar__sep { color: var(--text-mute); }
.menubar__app { font-weight: 600; }
.menubar__hint {
  color: var(--text-mute); font-size: 0.78rem; padding-left: 11px;
  border-left: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.menubar__right { display: flex; align-items: center; gap: 14px; flex: none; }
.menubar__btn {
  font-size: 0.78rem; color: var(--text-dim);
  padding: 5px 11px; border-radius: 7px; border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.menubar__btn:hover { color: var(--text); border-color: var(--accent); background: var(--surface); }
.menubar__clock { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); }

/* ============================================================
   DESKTOP
   ============================================================ */
.desktop {
  position: fixed; top: var(--menubar-h); left: 0; right: 0; bottom: 0;
  overflow: hidden;
}
.desktop__bg { position: absolute; inset: 0; z-index: 0; }
.desktop__blob { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.4; }
.desktop__blob--1 {
  width: 520px; height: 520px; top: -150px; left: -100px;
  background: radial-gradient(circle, var(--accent), transparent 68%);
  animation: float1 20s ease-in-out infinite;
}
.desktop__blob--2 {
  width: 560px; height: 560px; bottom: -200px; right: -120px;
  background: radial-gradient(circle, var(--accent-2), transparent 68%);
  animation: float2 24s ease-in-out infinite;
}
@keyframes float1 { 50% { transform: translate(60px, 50px) scale(1.12); } }
@keyframes float2 { 50% { transform: translate(-50px, -40px) scale(1.08); } }
.desktop__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* desktop icons */
.desktop__icons {
  position: absolute; top: 22px; left: 22px; z-index: 1;
  display: flex; flex-direction: column; gap: 6px;
}
.dicon {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 88px; padding: 12px 6px; border-radius: 12px;
  transition: background 0.18s var(--ease);
}
.dicon:hover { background: rgba(255, 255, 255, 0.06); }
.dicon__img {
  width: 50px; height: 50px; border-radius: 13px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700;
  color: var(--text);
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-2);
  box-shadow: 0 6px 18px -8px rgba(0,0,0,0.7);
}
.dicon__label { font-size: 0.74rem; color: var(--text-dim); text-align: center; }

.desktop__tip {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 1; font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--text-mute); white-space: nowrap;
  transition: opacity 0.4s var(--ease);
}
.desktop__tip.hidden { opacity: 0; }

/* the window layer spans the desktop but must let clicks fall through to
   the desktop icons in its empty areas; real windows re-enable pointer events */
.desktop__windows { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

/* ============================================================
   WINDOWS
   ============================================================ */
.win {
  position: absolute;
  pointer-events: auto;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  min-width: 280px; min-height: 200px;
  animation: winIn 0.26s var(--ease);
}
@keyframes winIn { from { opacity: 0; transform: scale(0.97) translateY(8px); } }
.win.focused { border-color: rgba(255, 129, 89, 0.42); }
.win.minimized { display: none; }
.win.maximized {
  inset: 8px 8px 8px 8px !important;
  width: auto !important; height: auto !important;
  border-radius: 12px;
}

.win__bar {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 13px; flex: none;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  cursor: grab; user-select: none;
}
.win__bar:active { cursor: grabbing; }
.win__lights { display: flex; gap: 8px; flex: none; }
.win__light {
  width: 13px; height: 13px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.6rem; color: rgba(0,0,0,0.55); line-height: 1;
}
.win__light--close { background: #ff5f57; }
.win__light--min   { background: #febc2e; }
.win__light--max   { background: #28c840; }
.win__light span { opacity: 0; transition: opacity 0.15s; }
.win__bar:hover .win__light span { opacity: 1; }
.win__title {
  font-family: var(--font-head); font-size: 0.88rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.win__icon { font-family: var(--font-mono); color: var(--accent); margin-left: 4px; }
.win__body {
  flex: 1; overflow: auto; position: relative;
}
.win__body::-webkit-scrollbar { width: 10px; }
.win__body::-webkit-scrollbar-thumb {
  background: var(--surface-3); border-radius: 8px;
  border: 3px solid var(--surface);
}

/* ============================================================
   DOCK
   ============================================================ */
.dock {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%);
  z-index: 4000;
  display: flex; gap: 8px; padding: 9px 12px;
  background: rgba(20, 22, 31, 0.78);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-2);
  border-radius: 18px;
  box-shadow: 0 16px 44px -14px rgba(0, 0, 0, 0.8);
}
.dock__item {
  width: 48px; height: 48px; border-radius: 13px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700;
  color: var(--text);
  background: linear-gradient(150deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}
.dock__item:hover { transform: translateY(-8px) scale(1.06); border-color: var(--accent); }
.dock__item.running::after {
  content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}

/* ============================================================
   SHARED CONTENT (panes)
   ============================================================ */
.pane { padding: 26px 28px 30px; }
.pane__lead { color: var(--text-dim); font-size: 0.97rem; margin-bottom: 22px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(86, 217, 138, 0.08);
  border: 1px solid rgba(86, 217, 138, 0.28);
  font-size: 0.76rem; font-weight: 500; color: #a9e9c2;
}
.badge__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(86, 217, 138, 0.6); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(86,217,138,0.55); }
  70% { box-shadow: 0 0 0 11px rgba(86,217,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(86,217,138,0); }
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.btn--primary {
  background: linear-gradient(110deg, var(--accent), #ff9d6e); color: #1a0e08;
  box-shadow: 0 8px 26px -10px rgba(255, 129, 89, 0.6);
}
.btn--primary:hover { transform: translateY(-2px); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span {
  font-family: var(--font-mono); font-size: 0.73rem;
  padding: 4px 10px; border-radius: 7px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text-dim);
}

/* ---------- ABOUT ---------- */
.about__head { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.about__mono {
  width: 76px; height: 76px; border-radius: 18px; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: #1a0e08;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.about__name { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; }
.about__title { color: var(--accent); font-size: 0.92rem; margin-bottom: 9px; }
.about__body p { color: var(--text-dim); font-size: 0.97rem; margin-bottom: 13px; }

.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 22px 0;
}
.metric {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 11px; padding: 14px 10px; text-align: center;
}
.metric__num {
  font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.metric__label { font-size: 0.72rem; color: var(--text-mute); margin-top: 6px; }

.facts { list-style: none; margin-bottom: 22px; }
.facts li {
  display: flex; flex-direction: column; gap: 1px;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.facts li:first-child { border-top: 0; }
.facts span {
  font-family: var(--font-mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-mute);
}
.facts strong { font-size: 0.92rem; }

/* ---------- FINDER / PROJECTS ---------- */
.finder { display: flex; height: 100%; min-height: 420px; }
.finder__list {
  width: 230px; flex: none; overflow-y: auto;
  background: var(--bg-2); border-right: 1px solid var(--border);
  padding: 10px 8px;
}
.finder__group {
  font-family: var(--font-mono); font-size: 0.64rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute);
  padding: 12px 8px 6px;
}
.finder__item {
  display: flex; flex-direction: column; gap: 1px; width: 100%;
  text-align: left; padding: 9px 10px; border-radius: 8px;
  transition: background 0.16s var(--ease);
}
.finder__item:hover { background: var(--surface-2); }
.finder__item.active { background: var(--surface-3); box-shadow: inset 2px 0 0 var(--accent); }
.finder__item strong { font-size: 0.88rem; }
.finder__item span { font-size: 0.73rem; color: var(--text-mute); }
.finder__detail { flex: 1; overflow-y: auto; padding: 26px 28px; }

.proj__tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent);
  padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 129, 89, 0.09); border: 1px solid rgba(255, 129, 89, 0.24);
  margin-bottom: 13px;
}
.proj__tag--venture {
  color: var(--accent-2);
  background: rgba(124, 139, 255, 0.1); border-color: rgba(124, 139, 255, 0.3);
}
.proj h2 { font-family: var(--font-head); font-size: 1.55rem; font-weight: 700; margin-bottom: 11px; }
.proj__lead { color: var(--text-dim); font-size: 0.96rem; margin-bottom: 20px; }
.proj__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px;
}
.proj__stats--inline { grid-template-columns: repeat(2, max-content); gap: 28px; }
.proj__stats > div { border-left: 2px solid var(--accent); padding-left: 11px; }
.proj__stats strong {
  display: block; font-family: var(--font-head); font-size: 1.15rem;
  font-weight: 700; color: var(--text);
}
.proj__stats span { font-size: 0.74rem; color: var(--text-mute); }
.proj__list { list-style: none; margin-bottom: 20px; }
.proj__list li {
  position: relative; padding-left: 21px; margin-bottom: 8px;
  font-size: 0.9rem; color: var(--text-dim);
}
.proj__list li::before { content: '▹'; position: absolute; left: 0; color: var(--accent-2); }

/* ---------- TERMINAL ---------- */
.term {
  display: flex; flex-direction: column; height: 100%; min-height: 320px;
  background: #0a0b10; padding: 16px 18px;
  font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.75;
}
.term__out { flex: 1; overflow-y: auto; white-space: pre-wrap; color: var(--text-dim); }
.term__out .ok { color: var(--green); }
.term__out .ac { color: var(--accent); }
.term__out .ac2 { color: var(--accent-2); }
.term__out .dim { color: var(--text-mute); }
.term__out .err { color: #ff6b6b; }
.term__out .cmd { color: var(--text); }
.term__line { display: flex; align-items: center; gap: 8px; padding-top: 6px; }
.term__ps { color: var(--green); flex: none; }
.term__ps b { color: var(--text-mute); }
.term__input {
  flex: 1; background: none; border: 0; outline: 0;
  font-family: var(--font-mono); font-size: 0.84rem; color: var(--text);
  caret-color: var(--accent);
}

/* ---------- AGENT CREW ---------- */
.crew { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; margin-bottom: 26px; }
.crew__diagram {
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(124,139,255,0.07), transparent 70%), var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 18px;
}
.crew__orchestrator { display: flex; justify-content: center; }
.crew .orch-card {
  width: min(320px, 100%); text-align: center; padding: 14px 18px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,129,89,0.16), rgba(124,139,255,0.16));
  border: 1px solid rgba(255, 129, 89, 0.4); cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.crew .orch-card:hover, .crew .orch-card.active {
  transform: translateY(-2px); box-shadow: 0 12px 30px -14px rgba(255,129,89,0.5);
}
.crew__connector { width: 2px; height: 26px; margin: 0 auto; background: linear-gradient(var(--accent), transparent); }
.crew__tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.tier__label {
  font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-mute); text-align: center; margin-bottom: 9px;
}
.tier__col { display: flex; flex-direction: column; gap: 8px; }
.agent {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer;
  transition: transform 0.16s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.agent:hover { transform: translateY(-2px); border-color: var(--border-2); background: var(--surface-2); }
.agent.active { border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 1px var(--accent); }
.agent__name {
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500;
  display: flex; align-items: center; gap: 5px;
}
.agent__dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.agent__role { font-size: 0.67rem; color: var(--text-mute); }
.agent__model {
  align-self: flex-start; margin-top: 2px; font-family: var(--font-mono); font-size: 0.58rem;
  padding: 1px 6px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--text-dim);
}
.crew__detail {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 20px; align-self: start;
}
.detail__top { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.detail__dot { width: 10px; height: 10px; border-radius: 50%; }
.detail__name { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; }
.detail__role { font-family: var(--font-head); font-size: 0.88rem; color: var(--accent); margin-bottom: 13px; }
.detail__desc { color: var(--text-dim); font-size: 0.89rem; margin-bottom: 14px; }
.detail__row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--border); font-size: 0.8rem;
}
.detail__row span { color: var(--text-mute); }
.detail__row strong { font-family: var(--font-mono); font-weight: 500; }
.detail__hint { margin-top: 13px; font-size: 0.74rem; color: var(--text-mute); font-style: italic; }

.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.principle {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; padding: 18px 17px;
}
.principle__icon {
  font-size: 1.15rem; color: var(--accent);
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255, 129, 89, 0.1); border: 1px solid rgba(255, 129, 89, 0.22);
  margin-bottom: 11px;
}
.principle h4 { font-family: var(--font-head); font-size: 0.95rem; margin-bottom: 5px; }
.principle p { font-size: 0.82rem; color: var(--text-dim); }

/* ---------- STACK ---------- */
.stackgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stackgroup {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 20px 22px;
}
.stackgroup--accent {
  background: radial-gradient(ellipse 80% 80% at 0% 0%, rgba(255,129,89,0.1), transparent 65%), var(--surface);
  border-color: rgba(255, 129, 89, 0.3);
}
.stackgroup h3 {
  font-family: var(--font-head); font-size: 1rem; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.stackgroup h3::before {
  content: ''; width: 8px; height: 8px; border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* ---------- CONTACT ---------- */
.contact__title {
  font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; margin-bottom: 10px;
}
.contact__links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
.contact__link {
  display: flex; align-items: center; gap: 13px; padding: 15px 17px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.contact__link:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--surface-2); }
.contact__ic {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.95rem;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(255,129,89,0.16), rgba(124,139,255,0.16));
  border: 1px solid var(--border-2);
}
.contact__link span:last-child { display: flex; flex-direction: column; line-height: 1.35; font-size: 0.8rem; color: var(--text-mute); }
.contact__link strong { font-size: 0.92rem; }
.contact__link--cv { background: linear-gradient(135deg, rgba(255,129,89,0.1), var(--bg-2)); border-color: rgba(255,129,89,0.3); }
.contact__meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-mute); }

/* ---------- GAME (Glyph Quest) ---------- */
.game { height: 100%; display: grid; place-items: center; background: #07080c; }
.game__canvas { max-width: 100%; max-height: 100%; border-radius: 5px; }

/* ============================================================
   STACKED / PLAIN VIEW  (mobile + "Plain view" button)
   ============================================================ */
.stacked {
  position: relative; z-index: 1;
  min-height: 100%;
  background: var(--bg);
}
.stacked__bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: rgba(10, 11, 16, 0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.stacked__logo { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.stacked__logo b {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stacked__back {
  font-size: 0.82rem; color: var(--text-dim);
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-2);
  transition: color 0.2s, border-color 0.2s;
}
.stacked__back:hover { color: var(--text); border-color: var(--accent); }
.stacked__body {
  max-width: 760px; margin: 0 auto; padding: 14px 16px 80px;
  display: flex; flex-direction: column; gap: 16px;
}
.stacked__card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.stacked__card-title {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
  padding: 13px 18px 0;
}
/* finder inside stacked: collapse to vertical */
.stacked .finder { flex-direction: column; min-height: 0; }
.stacked .finder__list {
  width: 100%; display: flex; gap: 6px; overflow-x: auto;
  border-right: 0; border-bottom: 1px solid var(--border);
}
.stacked .finder__group { display: none; }
.stacked .finder__item { min-width: 150px; }
.stacked .crew { grid-template-columns: 1fr; }
.stacked .crew__tiers { grid-template-columns: repeat(2, 1fr); }
.stacked .metrics { grid-template-columns: repeat(2, 1fr); }
.stacked .stackgrid,
.stacked .principles,
.stacked .contact__links { grid-template-columns: 1fr; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .crew { grid-template-columns: 1fr; }
  .crew__tiers { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .stackgrid, .principles, .contact__links { grid-template-columns: 1fr; }
  .finder { flex-direction: column; }
  .finder__list { width: 100%; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .finder__group { display: none; }
  .finder__item { min-width: 150px; }
}

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