/* ══════════════════════════════════════════════
   COMPONENTS v9 — Quiet, reusable pieces
══════════════════════════════════════════════ */

/* ── LOADER ──────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader.is-gone {
  display: none;
}

.loader__inner {
  width: min(240px, 72vw);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.loader__bar {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.loader__fill {
  height: 100%;
  background: var(--white);
  width: 0%;
  transition: width 0.28s var(--ease-out);
}

.loader__text {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.loader__name,
.loader__pct {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

/* Cursor look + motion live in css/cursor.css (loaded by js/cursor.js). */
.cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ── NAVIGATION ──────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 500;
  background: transparent;
  transition: background 0.3s var(--ease-smooth),
              border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: color-mix(in srgb, var(--white) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--light-border);
}

.nav.over-dark.is-scrolled {
  background: color-mix(in srgb, var(--dark-bg) 88%, transparent);
  border-bottom-color: var(--dark-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  width: min(100% - (var(--page-x) * 2), var(--max-w));
  margin-inline: auto;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  flex-shrink: 0;
}

.nav__logo em { font-style: italic; font-weight: 400; color: var(--ink-50); }
.nav__logo-mark { width: 22px; height: 22px; color: var(--ink); flex-shrink: 0; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-left: auto;
}

.nav__links a {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--ink-50);
  letter-spacing: 0.01em;
  transition: color var(--dur-sm);
}

.nav__links a:hover,
.nav__links a.is-active { color: var(--ink); }

.nav.over-dark .nav__logo { color: var(--white); }
.nav.over-dark .nav__logo em { color: rgba(255, 255, 255, 0.5); }
.nav.over-dark .nav__logo-mark { color: var(--white); }
.nav.over-dark .nav__links a { color: rgba(255, 255, 255, 0.5); }
.nav.over-dark .nav__links a:hover,
.nav.over-dark .nav__links a.is-active { color: var(--white); }
.nav.over-dark .nav__cta {
  background: var(--white);
  color: var(--ink);
}
.nav.over-dark .nav__burger { color: var(--white); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.45rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  transition: opacity var(--dur-sm);
}

.nav__cta:hover { opacity: 0.78; }

.soc-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.soc {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.42rem;
  color: inherit;
  text-decoration: none !important;
  border: 1px solid currentColor;
  flex-shrink: 0;
}

.soc svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 36px; height: 36px;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  color: var(--ink);
}

.nav__burger span {
  display: block;
  width: 18px; height: 1px;
  background: currentColor;
  transition: transform 0.28s var(--ease-out), opacity 0.28s;
}

.nav__burger.is-open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.nav__drawer {
  position: fixed;
  inset: 64px 0 0;
  background: var(--white);
  padding: var(--sp-8) var(--page-x);
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out);
  z-index: 490;
}

.nav__drawer.is-open { transform: translateX(0); }

.nav__drawer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.drawer-link {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 450;
  letter-spacing: -0.03em;
  color: var(--ink);
  opacity: 0.38;
  transition: opacity var(--dur-sm);
}

.drawer-link:hover { opacity: 1; }

.drawer-link--cta {
  opacity: 1;
  margin-top: var(--sp-4);
  font-size: var(--fs-lg);
}

/* ── BUTTONS ─────────────────────────────────── */
.btn-black,
.btn-outline,
.btn-white,
.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.85rem 1.4rem;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: opacity var(--dur-sm), background var(--dur-sm), color var(--dur-sm), border-color var(--dur-sm);
}

.btn-black {
  background: var(--ink);
  color: var(--white);
}
.btn-black:hover { opacity: 0.82; }

.btn-outline {
  border: 1px solid var(--light-border);
  color: var(--ink);
}
a.btn-outline:hover {
  border-color: var(--ink);
}

span.btn-outline {
  cursor: default;
  user-select: text;
}

.btn-white {
  background: var(--white);
  color: var(--ink);
}
a.btn-white:hover { opacity: 0.86; }

span.btn-white {
  cursor: default;
  user-select: text;
}

.btn-outline-white {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.82);
}
.btn-outline-white:hover {
  border-color: var(--white);
  color: var(--white);
}

/* ── CHIP/DOT ────────────────────────────────── */
.chip-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chip-dot--green { background: var(--green); }
.dark-section .chip-dot--green,
.contact .chip-dot--green { background: #6fbf7a; }
.chip-dot--white { background: var(--white); }

/* ── REVIEW CARD ─────────────────────────────── */
.rv-card {
  position: relative;
  padding: 0 0 var(--sp-6);
  border: 0;
  border-bottom: 1px solid var(--light-border);
  background: transparent;
  border-radius: 0;
}

.rv-card:hover { transform: none; box-shadow: none; }

.rv-card__q { display: none; }

.rv-card blockquote {
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink-60);
  margin-bottom: var(--sp-5);
}

.rv-card__author {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.rv-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--light-border);
}

.rv-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1) contrast(1.06);
}

.rv-avatar--hero { width: 36px; height: 36px; background: var(--ink); color: var(--white); }

.rv-card__name {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 550;
  line-height: 1.3;
  color: var(--ink);
}

.rv-card__role {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--ink-30);
  letter-spacing: 0.02em;
}

.rv-card__link {
  color: var(--orange);
  text-decoration: none;
}

.rv-card__link:hover,
.rv-card__link:focus-visible {
  color: var(--orange-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── TRUSTED BY ──────────────────────────────── */
.companies-marquee {
  margin-top: var(--sp-8);
}

.marquee-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-30);
  margin-bottom: var(--sp-4);
}

.marquee-track {
  overflow: hidden;
  padding-block: var(--sp-4) 0;
  border-top: 1px solid var(--light-border);
}

.marquee-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  align-items: baseline;
  animation: none;
}

.marquee-content span {
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-50);
}

.marquee-sep { color: var(--ink-10) !important; }

/* ── BUILD STAGE (full-bleed presentation) ───── */
.terminal {
  width: 100%;
  margin-top: var(--sp-8);
  border: 0;
  border-top: 1px solid rgba(20, 20, 19, 0.12);
  border-bottom: 1px solid rgba(20, 20, 19, 0.12);
  border-radius: 0;
  overflow: hidden;
  background: var(--dark-bg);
  color: var(--white);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.85rem var(--page-x);
  background: var(--dark-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal__dots { display: flex; gap: 5px; }

.terminal__dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.terminal__title {
  flex: 1;
  text-align: left;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.terminal__title b { color: var(--orange); font-weight: 500; }

.terminal__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  background: var(--dark-bg);
  padding: var(--sp-7) var(--page-x);
  min-height: 280px;
  font-family: ui-monospace, 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
}

.terminal__col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.t-line {
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.42);
  display: block;
}

.t-kicker {
  font-family: var(--font);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: var(--sp-3);
}

.t-prompt { color: var(--orange); margin-right: 8px; }
.t-cmd { color: var(--white); }
.t-success { color: var(--orange); }
.t-dim { color: rgba(255, 255, 255, 0.32); }
.t-live { color: var(--orange); font-weight: 600; }

.t-metric {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--sp-4);
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
}

.t-metric b { color: var(--white); font-weight: 500; }
.t-metric em {
  color: var(--orange);
  font-style: normal;
  font-weight: 500;
}

@media (max-width: 760px) {
  .terminal__body { grid-template-columns: 1fr; gap: var(--sp-6); }
}

/* ── SKILL PILLS ─────────────────────────────── */
.s-pill {
  display: inline-flex;
  padding: 0.28rem 0.7rem;
  background: transparent;
  border: 1px solid var(--light-border);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 450;
  color: var(--ink-60);
  letter-spacing: 0.02em;
}

.s-pill:hover {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* ── TECH CHIPS ──────────────────────────────── */
.t-chip {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  background: transparent;
  border: 1px solid var(--light-border);
  border-radius: var(--r-sm);
  font-size: 0.7rem;
  font-weight: 450;
  color: var(--ink-60);
}

.t-chip--light {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.55);
}

.ck {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--light-border);
  color: var(--ink);
  font-size: 0.55rem;
  font-weight: 600;
  flex-shrink: 0;
}
