/* ============================================================
   amar.jamale.org — "Platform Console"
   Dark engineering-console aesthetic. No frameworks.
   ============================================================ */

:root {
  --bg: #0a0e14;
  --bg-soft: #0e131c;
  --surface: #111722;
  --surface-2: #161e2c;
  --border: #1f2937;
  --border-bright: #2d3b52;
  --text: #e6edf3;
  --muted: #94a3b8;
  --faint: #64748b;
  --accent: #4ade80;          /* terminal green */
  --accent-dim: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-2: #38bdf8;        /* cyan */
  --accent-2-dim: color-mix(in srgb, var(--accent-2) 12%, transparent);
  --accent-contrast: #07210f;
  --amber: #fbbf24;
  --red: #f87171;
  --dot: rgba(148, 163, 184, 0.07);
  --shadow-c: rgba(0, 0, 0, 0.5);
  --term-bg: #0c1018;
  --term-head: #161e2c;
  --term-text: #c9d4e3;
  --term-muted: #64748b;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1100px;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* subtle dot grid */
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1px);
  background-size: 28px 28px;
}

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

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

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-contrast); padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.nav-brand {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
  color: var(--accent); text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 22px; flex: 1; }
.nav-links a {
  color: var(--muted); font-size: 0.92rem; font-weight: 500; text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.status-wrap { position: relative; }
.nav-status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px;
  background: var(--surface); cursor: pointer;
}
.nav-status:hover { border-color: var(--border-bright); color: var(--text); }
.status-text {
  transition: opacity 0.25s ease;
  width: 245px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  text-align: left;
}
.status-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  width: 290px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border-bright); border-radius: 12px;
  box-shadow: 0 18px 50px var(--shadow-c);
  font-size: 0.75rem;
}
.status-pop-title { color: var(--text); font-weight: 700; margin-bottom: 10px; }
.status-pop ul { list-style: none; display: grid; gap: 7px; margin-bottom: 12px; }
.status-pop li { display: flex; justify-content: space-between; color: var(--muted); }
.status-pop .st.ok { color: var(--accent); }
.status-pop .st.warn { color: var(--amber); }
.status-pop-foot { color: var(--faint); border-top: 1px solid var(--border); padding-top: 10px; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }

/* ---------- hero ---------- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 96px 24px 72px; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.eyebrow { color: var(--accent); font-size: 0.95rem; margin-bottom: 14px; }
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 12px;
}
.hero-role { font-size: 1.15rem; color: var(--accent-2); margin-bottom: 22px; min-height: 1.8em; }
.hero-role .prompt { color: var(--faint); }
.cursor-blink { animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-lede { color: var(--muted); font-size: 1.08rem; max-width: 52ch; margin-bottom: 30px; }
.hero-lede strong { color: var(--text); }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--accent); color: var(--accent-contrast);
  box-shadow: 0 0 0 rgba(74, 222, 128, 0);
}
.btn-primary:hover { box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-ghost {
  border: 1px solid var(--border-bright); color: var(--text); background: transparent;
}
.btn-ghost:hover { background: var(--surface-2); }

.hero-stats {
  list-style: none; display: grid; grid-template-columns: repeat(4, auto);
  gap: 36px; justify-content: start;
}
.hero-stats li { display: flex; flex-direction: column; }
.stat-num, .stat-suffix {
  font-family: var(--font-mono); font-size: 1.7rem; font-weight: 700;
  color: var(--accent); display: inline;
}
.hero-stats li { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 2px; max-width: 130px; }
.stat-label { width: 100%; font-size: 0.8rem; color: var(--faint); line-height: 1.35; margin-top: 4px; }

/* ---------- terminal ---------- */
.term {
  background: var(--term-bg);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px var(--shadow-c), 0 0 40px color-mix(in srgb, var(--accent) 5%, transparent);
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; background: var(--term-head);
  border-bottom: 1px solid var(--border);
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.red { background: #ff5f57; }
.term-dot.yellow { background: #febc2e; }
.term-dot.green { background: #28c840; }
.term-title { margin-left: 10px; font-size: 0.75rem; color: var(--term-muted); }
.term-body {
  padding: 18px; font-size: 0.78rem; line-height: 1.7;
  min-height: 320px; white-space: pre-wrap; word-break: break-word;
  color: var(--term-text);
}
.term-body .t-prompt { color: var(--accent); }
.term-body .t-ok { color: var(--accent); }
.term-body .t-key { color: var(--accent-2); }
.term-body .t-dim { color: var(--term-muted); }
.term-body .t-err { color: var(--red); }
.term-body a { color: var(--accent-2); text-decoration: underline; }

.term-body { max-height: 340px; min-height: 280px; overflow-y: auto; }
.term-input-line {
  display: none; align-items: center;
  padding: 0 18px 16px; font-size: 0.78rem;
}
.term.ready .term-input-line { display: flex; }
.term.ready { cursor: text; }
.term-input-line .t-prompt { color: var(--accent); }
.term-input-line input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--term-text); font-family: var(--font-mono); font-size: 0.78rem;
  caret-color: var(--accent);
}

/* ---------- sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 88px 24px; }
.section-head { margin-bottom: 48px; }
.section-kicker { color: var(--accent); font-size: 0.85rem; margin-bottom: 12px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.2;
}
.section-sub { color: var(--muted); margin-top: 12px; max-width: 60ch; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-grid > *, .hero-grid > *, .stage > *, .stack-card, .cred-card { min-width: 0; }
.about-text p { color: var(--muted); margin-bottom: 18px; }
.about-text strong { color: var(--text); }
.principles { margin-top: 28px; display: grid; gap: 12px; }
.principle {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 8px; background: var(--surface);
  padding: 12px 16px; font-size: 0.92rem; color: var(--text);
  display: flex; gap: 12px; align-items: baseline;
}

.code-card {
  background: var(--term-bg); border: 1px solid var(--border-bright);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 16px 48px var(--shadow-c);
  position: sticky; top: 90px;
}
.code-card-head {
  display: flex; justify-content: space-between;
  padding: 10px 16px; font-size: 0.78rem; color: var(--term-muted);
  background: var(--term-head); border-bottom: 1px solid var(--border);
}
.code-lang { color: var(--faint); }
.code-card pre { padding: 18px; font-size: 0.78rem; line-height: 1.75; overflow-x: auto; }
.code-card .k { color: var(--accent-2); }
.code-card .v { color: var(--term-text); }
.code-card .c { color: var(--term-muted); font-style: italic; }
.code-card .n { color: var(--amber); }
.code-card .g { color: var(--accent); }

/* ---------- experience pipeline ---------- */
.pipeline { position: relative; display: grid; gap: 28px; }
.pipeline::before {
  content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px;
  width: 2px; background: linear-gradient(180deg, var(--accent), var(--border));
}
.stage { display: grid; grid-template-columns: 40px 1fr; gap: 20px; position: relative; }
.stage-marker {
  width: 40px; height: 40px; border-radius: 50%; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 2px solid var(--border-bright);
  color: var(--accent); font-weight: 700; font-size: 0.95rem;
}
.stage.running .stage-marker { border-color: var(--accent); box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--accent-dim); border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.stage-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.stage-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.stage.running .stage-card { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.stage-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--faint); margin-bottom: 12px;
}
.badge { padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 500; }
.badge-running { background: var(--accent-dim); color: var(--accent); }
.badge-done { background: var(--accent-2-dim); color: var(--accent-2); }
.stage-card h3 { font-size: 1.25rem; font-weight: 700; }
.stage-org { color: var(--accent-2); font-size: 0.95rem; margin: 2px 0 14px; }
.stage-card ul { list-style: none; display: grid; gap: 9px; margin-bottom: 18px; }
.stage-card ul li {
  color: var(--muted); font-size: 0.95rem; padding-left: 20px; position: relative;
}
.stage-card ul li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }
.stage-card ul li strong { color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-size: 0.72rem; padding: 4px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); white-space: nowrap;
}

/* ---------- now shipping ---------- */
.ship-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ship-past-label { color: var(--faint); font-size: 0.8rem; margin: 56px 0 18px; }
.ship-card.past { border-color: color-mix(in srgb, var(--accent-2) 25%, transparent); }
.ship-card.past:hover { border-color: color-mix(in srgb, var(--accent-2) 50%, transparent); }
.ship-tag.past {
  color: var(--accent-2); background: var(--accent-2-dim);
  border-color: color-mix(in srgb, var(--accent-2) 25%, transparent);
}
.ship-card {
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-bright); border-radius: var(--radius);
  padding: 30px 28px; min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.ship-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateY(-4px);
  box-shadow: 0 16px 40px var(--shadow-c);
}
.ship-tag {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.06em;
  color: var(--accent); background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  padding: 4px 11px; border-radius: 999px; margin-bottom: 16px;
}
.ship-card h3 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 10px; }
.ship-card > p { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }

/* ---------- platform stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.stack-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.stack-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-4px);
}
.stack-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.stack-icon {
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); color: var(--accent); font-size: 1.15rem;
}
.stack-card h3 { font-size: 1.02rem; font-weight: 700; }
.stack-card > p { color: var(--muted); font-size: 0.88rem; margin-bottom: 16px; }

/* ---------- stack card tech icons ---------- */
.stack-icons {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.stack-icons img {
  height: 24px; width: 24px; object-fit: contain;
  filter: grayscale(35%); opacity: 0.85;
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.stack-icons img:hover {
  filter: none; opacity: 1; transform: translateY(-2px) scale(1.2);
}

/* ---------- credentials ---------- */
.creds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cred-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: block; color: inherit; text-decoration: none;
}
a.cred-card:hover { text-decoration: none; }
.cred-card:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.cred-card.featured { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--accent) 5%, transparent)); }
.cred-code {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  color: var(--accent); background: var(--accent-dim);
  padding: 4px 10px; border-radius: 6px; margin-bottom: 14px;
}
.cred-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.cred-card p { color: var(--faint); font-size: 0.85rem; }

/* ---------- automation ---------- */
.auto-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.auto-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 20px; min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.auto-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transform: translateY(-3px);
}
.auto-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.auto-card > p { color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }
.auto-foot { margin-top: 22px; color: var(--faint); font-size: 0.82rem; }
.auto-foot .t-dim { color: var(--accent); }

/* ---------- contact ---------- */
.contact { padding-bottom: 110px; }
.contact-card {
  text-align: center; padding: 70px 40px;
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border-bright); border-radius: 20px;
  box-shadow: 0 0 80px color-mix(in srgb, var(--accent) 6%, transparent) inset;
}
.contact-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin: 10px 0 14px; }
.contact-sub { color: var(--muted); max-width: 48ch; margin: 0 auto 32px; }
.contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- reachout form ---------- */
.reachout {
  max-width: 560px; margin: 40px auto 0; text-align: left;
  display: grid; gap: 16px;
}
.reachout-title { color: var(--faint); font-size: 0.8rem; }
.reachout .honey { display: none; }
.reachout-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reachout label { display: grid; gap: 6px; }
.reachout label span { font-size: 0.72rem; color: var(--accent); }
.reachout input[type="text"], .reachout input[type="email"], .reachout textarea {
  background: var(--surface); border: 1px solid var(--border-bright);
  border-radius: 8px; padding: 10px 14px;
  color: var(--text); font-family: var(--font-ui); font-size: 0.92rem;
  outline: none; width: 100%; resize: vertical;
}
.reachout input:focus, .reachout textarea:focus { border-color: var(--accent); }
.reachout button { justify-self: start; cursor: pointer; border: none; font-family: var(--font-ui); }
.reachout-sent { color: var(--accent); font-size: 0.8rem; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 24px;
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  font-size: 0.78rem; color: var(--faint);
}
.footer-inner a { color: var(--muted); }
.footer-sep { color: var(--border-bright); }


/* ============================================================
   Themes. Default (:root) is Platform Console.
   ============================================================ */
[data-theme="catppuccin-mocha"] {
  --bg: #1e1e2e; --bg-soft: #181825;
  --surface: #252536; --surface-2: #313244;
  --border: #313244; --border-bright: #45475a;
  --text: #cdd6f4; --muted: #a6adc8; --faint: #7f849c;
  --accent: #a6e3a1; --accent-2: #89b4fa;
  --accent-contrast: #1e1e2e;
  --amber: #f9e2af; --red: #f38ba8;
  --dot: rgba(205, 214, 244, 0.06);
  --term-bg: #11111b; --term-head: #181825;
  --term-text: #cdd6f4; --term-muted: #6c7086;
}
[data-theme="dracula"] {
  --bg: #282a36; --bg-soft: #232530;
  --surface: #2f313f; --surface-2: #343746;
  --border: #44475a; --border-bright: #565b74;
  --text: #f8f8f2; --muted: #b8bfd4; --faint: #6272a4;
  --accent: #50fa7b; --accent-2: #8be9fd;
  --accent-contrast: #282a36;
  --amber: #f1fa8c; --red: #ff5555;
  --dot: rgba(248, 248, 242, 0.05);
  --term-bg: #21222c; --term-head: #191a21;
  --term-text: #f8f8f2; --term-muted: #6272a4;
}
[data-theme="nord"] {
  --bg: #2e3440; --bg-soft: #292e39;
  --surface: #3b4252; --surface-2: #434c5e;
  --border: #434c5e; --border-bright: #4c566a;
  --text: #eceff4; --muted: #d8dee9; --faint: #7b88a1;
  --accent: #a3be8c; --accent-2: #88c0d0;
  --accent-contrast: #2e3440;
  --amber: #ebcb8b; --red: #bf616a;
  --dot: rgba(216, 222, 233, 0.06);
  --term-bg: #232831; --term-head: #2e3440;
  --term-text: #d8dee9; --term-muted: #616e88;
}
[data-theme="gruvbox"] {
  --bg: #282828; --bg-soft: #242424;
  --surface: #32302f; --surface-2: #3c3836;
  --border: #3c3836; --border-bright: #504945;
  --text: #ebdbb2; --muted: #bdae93; --faint: #928374;
  --accent: #b8bb26; --accent-2: #83a598;
  --accent-contrast: #282828;
  --amber: #fabd2f; --red: #fb4934;
  --dot: rgba(235, 219, 178, 0.05);
  --term-bg: #1d2021; --term-head: #282828;
  --term-text: #ebdbb2; --term-muted: #928374;
}
[data-theme="tokyo-night"] {
  --bg: #1a1b26; --bg-soft: #16161e;
  --surface: #1f2335; --surface-2: #24283b;
  --border: #292e42; --border-bright: #3b4261;
  --text: #c0caf5; --muted: #a9b1d6; --faint: #565f89;
  --accent: #9ece6a; --accent-2: #7aa2f7;
  --accent-contrast: #1a1b26;
  --amber: #e0af68; --red: #f7768e;
  --dot: rgba(192, 202, 245, 0.05);
  --term-bg: #16161e; --term-head: #1f2335;
  --term-text: #c0caf5; --term-muted: #565f89;
}
[data-theme="solarized-light"] {
  --bg: #fdf6e3; --bg-soft: #f5eeda;
  --surface: #eee8d5; --surface-2: #e4ddc8;
  --border: #dcd4bd; --border-bright: #c8bfa4;
  --text: #073642; --muted: #586e75; --faint: #93a1a1;
  --accent: #859900; --accent-2: #268bd2;
  --accent-contrast: #fdf6e3;
  --amber: #b58900; --red: #dc322f;
  --dot: rgba(7, 54, 66, 0.09);
  --shadow-c: rgba(101, 123, 131, 0.3);
  --term-bg: #eee8d5; --term-head: #e4ddc8;
  --term-text: #586e75; --term-muted: #93a1a1;
}
[data-theme="hr-light"] {
  --bg: #f8fafc; --bg-soft: #f1f5f9;
  --surface: #ffffff; --surface-2: #f1f5f9;
  --border: #e2e8f0; --border-bright: #cbd5e1;
  --text: #0f172a; --muted: #475569; --faint: #94a3b8;
  --accent: #2563eb; --accent-2: #7c3aed;
  --accent-contrast: #ffffff;
  --amber: #d97706; --red: #dc2626;
  --dot: rgba(15, 23, 42, 0.07);
  --shadow-c: rgba(15, 23, 42, 0.15);
  --term-bg: #ffffff; --term-head: #f1f5f9;
  --term-text: #334155; --term-muted: #94a3b8;
}

/* ---------- theme picker ---------- */
.theme-wrap { position: relative; }
.theme-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 30px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 0.9rem; cursor: pointer;
}
.theme-btn:hover { border-color: var(--border-bright); color: var(--text); }
.theme-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  width: 225px; padding: 10px;
  background: var(--surface); border: 1px solid var(--border-bright); border-radius: 12px;
  box-shadow: 0 18px 50px var(--shadow-c);
  display: grid; gap: 2px;
}
.theme-pop[hidden] { display: none; }
.theme-pop-title { color: var(--faint); font-size: 0.7rem; padding: 4px 10px 8px; }
.theme-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: none; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--font-mono); font-size: 0.78rem; text-align: left; width: 100%;
}
.theme-opt:hover { background: var(--surface-2); color: var(--text); }
.theme-opt.active { color: var(--accent); }
.theme-opt .sw {
  width: 15px; height: 15px; border-radius: 4px; flex-shrink: 0;
  border: 1px solid var(--border-bright);
  background: linear-gradient(135deg, var(--sw-bg) 50%, var(--sw-ac) 50%);
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .status-text { width: 150px; }
  .nav-inner { gap: 18px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
}
@media (max-width: 920px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .hero-terminal { order: 2; }
  .stack-grid, .creds-grid, .auto-grid { grid-template-columns: repeat(2, 1fr); }
  .ship-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .code-card { position: static; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; gap: 10px; }
  .status-text { width: 150px; }
  .theme-pop { right: auto; left: 0; }
  .stack-grid, .creds-grid, .auto-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 20px; }
  .stage { grid-template-columns: 1fr; }
  .pipeline::before { display: none; }
  .stage-marker { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
