/* ==========================================================
   Syrel Lou A. Jumawan — Portfolio
   Warm editorial system: putty-cream canvas, ink pills,
   circular portraits, orbital arcs, ghost watermark type.
   ========================================================== */

/* ---------- Tokens ---------- */
:root {
  --font: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  /* Light (default) */
  --canvas: #f3f0ee;          /* putty cream — never pure white */
  --lifted: #fcfbfa;          /* paper laid on paper */
  --raised: #ffffff;          /* nav pill, satellites, chips, form card */
  --ink: #141413;             /* warm near-black */
  --ink-soft: #262627;
  --muted: #696969;
  --ghost: #e6dfd6;           /* cream-on-cream watermark */
  --line: rgba(20, 20, 19, .12);
  --line-strong: rgba(20, 20, 19, .45);
  --primary: #141413;
  --on-primary: #f3f0ee;
  --dot: #cf4500;             /* eyebrow accent dot */
  --arc: #f37338;             /* orbital lines */
  --footer-bg: #141413;
  --footer-ink: #ffffff;
  --footer-muted: rgba(255, 255, 255, .6);
  --footer-line: rgba(255, 255, 255, .22);
  --nav-bg: rgba(255, 255, 255, .86);
  --shadow-1: 0 4px 24px rgba(0, 0, 0, .04);
  --shadow-2: 0 24px 48px rgba(0, 0, 0, .08);
  --placeholder: rgba(20, 20, 19, .42);

  /* Radius — small, 20–40, or full pill. Nothing in between. */
  --r-xs: 6px;
  --r-btn: 20px;
  --r-md: 24px;
  --r-lg: 40px;
  --r-pill: 999px;

  /* Spacing — powers of 8 */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;
  --s8: 128px;

  --container: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(72px, 10vw, 128px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

[data-theme="dark"] {
  --canvas: #141413;
  --lifted: #1c1b19;
  --raised: #24231f;
  --ink: #f3f0ee;
  --ink-soft: #e2ddd8;
  --muted: #a39d96;
  --ghost: #1f1e1b;
  --line: rgba(243, 240, 238, .12);
  --line-strong: rgba(243, 240, 238, .45);
  --primary: #f3f0ee;
  --on-primary: #141413;
  --dot: #f37338;
  --arc: #f37338;
  --footer-bg: #0b0b0a;
  --footer-ink: #f3f0ee;
  --footer-muted: rgba(243, 240, 238, .55);
  --footer-line: rgba(243, 240, 238, .16);
  --nav-bg: rgba(36, 35, 31, .86);
  --shadow-1: 0 4px 24px rgba(0, 0, 0, .35);
  --shadow-2: 0 24px 48px rgba(0, 0, 0, .45);
  --placeholder: rgba(243, 240, 238, .4);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}
body {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 450;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  overflow-x: clip;
}
img, picture, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }
strong { font-weight: 600; }
::selection { background: var(--arc); color: #141413; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: var(--s2); left: var(--s2);
  z-index: 3000;
  padding: 10px 20px;
  border-radius: var(--r-btn);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

/* Theme switch fallback */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease !important;
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Type ---------- */
.h1 {
  font-size: clamp(42px, 5.6vw, 72px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}
.h2 {
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.h3 {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.lead {
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--dot);
  flex-shrink: 0;
}

/* Ghost watermark headline (decorative) */
.ghost {
  position: absolute;
  z-index: -1;
  font-size: clamp(96px, 16vw, 232px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -0.04em;
  color: var(--ghost);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 2000;
  background: var(--arc);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 26px;
  border-radius: var(--r-btn);
  border: 1.5px solid var(--primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: transform .25s var(--ease), background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .3s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-icon { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover .btn-icon { transform: translateX(3px); }

.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }

.btn-secondary { background: var(--raised); color: var(--ink); border-color: var(--ink); font-weight: 450; }
.btn-secondary:hover { background: var(--ink); color: var(--canvas); }

.btn-sm { min-height: 40px; padding: 6px 20px; font-size: 15px; }
.btn-block { width: 100%; min-height: 54px; }

.circle-btn {
  width: 44px; height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .25s var(--ease);
}
.circle-btn svg { width: 17px; height: 17px; }
.circle-btn:hover { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.circle-btn:active { transform: scale(.94); }

/* Satellite: white circle with an arrow, docked onto a portrait */
.satellite {
  position: absolute;
  z-index: 2;
  width: 64px; height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--raised);
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: transform .45s var(--ease), background-color .2s ease, color .2s ease;
}
.satellite svg { width: 22px; height: 22px; transition: transform .45s var(--ease); }
.satellite:hover { background: var(--ink); color: var(--canvas); transform: scale(1.06); }
.satellite:hover svg { transform: rotate(-45deg); }

/* ---------- Floating nav pill ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: var(--s2);
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: 64px;
  padding: 8px 8px 8px 28px;
  border-radius: var(--r-pill);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: var(--shadow-1);
  transition: box-shadow .3s ease;
}
.scrolled .nav { box-shadow: 0 8px 32px rgba(0, 0, 0, .08); }
.wordmark {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.wordmark span { color: var(--dot); }
.nav-links { display: flex; gap: clamp(20px, 3vw, 44px); }
.nav-link {
  position: relative;
  display: block;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--dot);
  transform: scale(0);
  transition: transform .3s var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { transform: scale(1); }
.nav-actions { display: flex; align-items: center; gap: var(--s1); }

.theme-toggle { border-color: var(--line); }
.theme-toggle svg {
  grid-area: 1 / 1;
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .45s var(--ease), opacity .25s ease;
}
[data-theme="dark"] .icon-sun { transform: rotate(-90deg) scale(.4); opacity: 0; }
[data-theme="light"] .icon-moon { transform: rotate(90deg) scale(.4); opacity: 0; }

.menu-toggle { display: none; position: relative; border-color: var(--line); }
.menu-toggle span {
  position: absolute;
  left: 50%;
  width: 16px; height: 1.6px;
  margin-left: -8px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .35s var(--ease);
}
.menu-toggle span:first-child { transform: translateY(-3.5px); }
.menu-toggle span:last-child { transform: translateY(3.5px); }
.menu-open .menu-toggle span:first-child { transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding: clamp(48px, 7vw, 96px) 0 var(--section);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 14px;
  border-radius: var(--r-pill);
  background: var(--raised);
  box-shadow: var(--shadow-1);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: var(--s4);
}
.status-dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1f9d55;
}
.status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #1f9d55;
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: .6; }
  80%, 100% { transform: scale(2.6); opacity: 0; }
}

.hero-intro { color: var(--muted); margin-bottom: var(--s2); font-size: 18px; }
.hero-intro strong { color: var(--ink); font-weight: 600; }
.role-swap {
  display: inline-block;
  color: var(--ink);
  font-weight: 600;
  transition: opacity .3s ease, transform .4s var(--ease);
}
.role-swap.out { opacity: 0; transform: translateY(6px); }

.hero-title { margin-bottom: var(--s4); }
.hero-bio { max-width: 560px; margin-bottom: var(--s4); color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.social-row { display: flex; gap: 10px; }

/* Portrait stage with orbit */
.stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  justify-self: center;
  aspect-ratio: 1;
}
.portrait {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--lifted);
  box-shadow: var(--shadow-2);
}
.portrait picture, .about-photo picture { width: 100%; height: 100%; }
.portrait img, .about-photo img { width: 100%; height: 100%; object-fit: cover; }
.portrait img { object-position: 50% 18%; transform: scale(1.08); transform-origin: 50% 20%; }
.stage .satellite { right: 13%; bottom: 13%; }

.orbit {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}
.orbit path {
  fill: none;
  stroke: var(--arc);
  stroke-width: 1.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--raised);
  box-shadow: var(--shadow-2);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.chip svg { width: 15px; height: 15px; color: var(--dot); }
.chip-1 { top: 10%; left: -6%; }
.chip-2 { bottom: 4%; left: 6%; }

/* ---------- Intro animations ---------- */
.js .intro {
  opacity: 0;
  transform: translateY(18px);
  animation: introIn .9s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 90ms + 60ms);
}
.js .portrait.intro { transform: scale(.94); }
@keyframes introIn { to { opacity: 1; transform: none; } }

/* Orbit arcs draw themselves */
.js .orbit path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.8s var(--ease) .3s;
}
.js .orbit.drawn path { stroke-dashoffset: 0; }

/* ---------- Skills band (stadium pill) ---------- */
.band {
  height: 72px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--canvas);
}
.band-track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.band:hover .band-track { animation-play-state: paused; }
.band-list { display: flex; flex-shrink: 0; }
.band-list li {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-size: clamp(17px, 1.7vw, 21px);
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.band-list li::after {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--arc);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section {
  position: relative;
  isolation: isolate;
  overflow-x: clip;   /* ghost words may bleed off-edge without causing sideways scroll */
  padding-block: var(--section);
}
.section-head { margin-bottom: clamp(40px, 5vw, 72px); }
.section-head .eyebrow { margin-bottom: var(--s3); }
.section-head-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s3) var(--s6);
  align-items: end;
}
.section-head-split .lead { color: var(--ink-soft); max-width: 520px; }
.section .ghost.ghost-left { top: clamp(24px, 4vw, 56px); left: calc(var(--gutter) * -0.3); }
.section .ghost.ghost-right { top: clamp(24px, 4vw, 56px); right: calc(var(--gutter) * -0.3); }

/* Reveal on scroll */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
}
.about-visual {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  justify-self: center;
}
.about-photo {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--lifted);
  box-shadow: var(--shadow-2);
}
.about-photo img { object-position: 50% 22%; }
.about-visual .orbit { inset: -2%; width: 104%; height: 104%; }
.about-visual .chip { right: -4%; top: 14%; }

.about-copy .eyebrow { margin-bottom: var(--s3); }
.about-copy .h2 { margin-bottom: var(--s3); }
.about-copy .lead { margin-bottom: var(--s3); }
.about-copy p:not(.lead):not(.eyebrow) { color: var(--ink-soft); margin-bottom: var(--s2); max-width: 620px; }

.facts { margin-top: var(--s5); border-top: 1px solid var(--line); }
.fact {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: var(--s2);
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.fact dt {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}
.fact dd { margin: 0; font-weight: 500; }
.fact dd span { display: block; font-weight: 450; color: var(--muted); }

/* ---------- Services (constellation) ---------- */
.constellation {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 64px);
  padding-bottom: var(--s6);
}
.constellation > .orbit {
  inset: 0;
  width: 100%;
  height: 300px;
  top: 40px;
  z-index: -1;
}
.service:nth-child(2) { margin-top: 112px; }
.service:nth-child(3) { margin-top: 32px; }
.service-orb {
  position: relative;
  width: 200px;
  aspect-ratio: 1;
  margin-bottom: var(--s4);
}
.orb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lifted);
  box-shadow: var(--shadow-2);
  transition: transform .6s var(--ease), background-color .3s ease, color .3s ease;
}
.orb svg { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.service:hover .orb { transform: scale(1.04); background: var(--ink); color: var(--canvas); }
.service-orb .satellite { width: 56px; height: 56px; right: -10px; bottom: 6px; }
.service .eyebrow { margin-bottom: var(--s2); }
.service .h3 { margin-bottom: var(--s2); }
.service p { color: var(--ink-soft); margin-bottom: var(--s3); max-width: 360px; }

.tags { display: flex; flex-wrap: wrap; gap: var(--s1); }
.tags li {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---------- Certifications ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3);
}
.cert-card {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.4vw, 40px);
  border-radius: var(--r-lg);
  background: var(--lifted);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.cert-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s4);
}
.cert-mono {
  width: 64px; height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--canvas);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform .5s var(--ease);
}
.cert-card:hover .cert-mono { transform: rotate(-10deg) scale(1.05); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--r-pill);
  background: var(--raised);
  font-size: 14px;
  font-weight: 500;
}
.badge svg { width: 14px; height: 14px; color: #1f9d55; }
.cert-card .h3 { margin-bottom: 6px; }
.issuer { color: var(--muted); font-weight: 500; margin-bottom: var(--s2); }
.cert-desc { color: var(--ink-soft); margin-bottom: var(--s3); }
.cert-foot {
  margin-top: auto;
  padding-top: var(--s2);
  border-top: 1px solid var(--line);
  min-height: 61px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cert-date { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.verify-link svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.verify-link:hover svg { transform: translate(2px, -2px); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact-intro .eyebrow { margin-bottom: var(--s3); }
.contact-title { font-size: clamp(44px, 6vw, 80px); line-height: 1; letter-spacing: -0.035em; margin-bottom: var(--s3); }
.contact-intro .lead { color: var(--ink-soft); margin-bottom: var(--s5); max-width: 480px; }

.contact-links { border-top: 1px solid var(--line); }
.contact-links a {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  transition: padding .4s var(--ease);
}
.contact-links a:hover { padding-left: 10px; }
.contact-links .ci {
  width: 48px; height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--raised);
  transition: background-color .2s ease, color .2s ease;
}
.contact-links .ci svg { width: 18px; height: 18px; }
.contact-links a:hover .ci { background: var(--ink); color: var(--canvas); }
.contact-links .cl-text { flex: 1; min-width: 0; line-height: 1.3; }
.contact-links .cl-text strong { display: block; font-weight: 500; }
.contact-links .cl-text span { display: block; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.contact-links .go { width: 20px; height: 20px; flex-shrink: 0; transition: transform .35s var(--ease); }
.contact-links a:hover .go { transform: translate(3px, -3px); }

.contact-form {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: var(--r-lg);
  background: var(--raised);
  box-shadow: var(--shadow-2);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; padding-left: 4px; }
.field label small { color: var(--muted); font-weight: 450; }
.field input, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--lifted);
  font-size: 16px;
  font-weight: 450;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field textarea { border-radius: var(--r-md); resize: vertical; min-height: 150px; padding-top: 14px; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--raised);
  box-shadow: 0 0 0 4px var(--line);
}
.field.invalid input, .field.invalid textarea { border-color: #c4320a; box-shadow: 0 0 0 4px rgba(196, 50, 10, .14); }
.form-status { min-height: 1.4em; font-size: 15px; text-align: center; font-weight: 500; }
.form-status a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.contact-form .btn[disabled] { opacity: .6; cursor: progress; }
/* Spam trap: hidden from people and screen readers, bots still fill it */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status.ok { color: #1f9d55; }
.form-status.err { color: #c4320a; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: var(--s8) 0 var(--s5);
  margin-top: var(--section);
}
.footer-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 820px;
  margin-bottom: var(--s5);
}
.footer-cta { margin-bottom: var(--s7); }
.footer-cta .btn { background: var(--footer-ink); color: var(--footer-bg); border-color: var(--footer-ink); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--s5);
  padding-bottom: var(--s5);
}
.footer-brand .wordmark { display: inline-block; margin-bottom: var(--s2); }
.footer-brand p { color: var(--footer-muted); max-width: 280px; }
.footer-col h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--footer-muted);
  margin-bottom: var(--s2);
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 450;
  transition: opacity .2s ease;
}
.footer-col a:hover { opacity: .65; }
.footer-col a svg { width: 13px; height: 13px; opacity: .6; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s2);
  padding-top: var(--s3);
  border-top: 1px solid var(--footer-line);
  font-size: 14px;
  color: var(--footer-muted);
}
.footer-bottom .social-row .circle-btn { color: var(--footer-ink); border-color: var(--footer-line); }
.footer-bottom .social-row .circle-btn:hover { background: var(--footer-ink); color: var(--footer-bg); }
.back-top { display: inline-flex; align-items: center; gap: 8px; color: var(--footer-ink); font-weight: 500; }
.back-top svg { width: 15px; height: 15px; transform: rotate(-90deg); transition: transform .35s var(--ease); }
.back-top:hover svg { transform: rotate(-90deg) translateX(3px); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1100px) {
  .chip-1 { left: -2%; }
  .about-visual .chip { right: 0; }
}

@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stage { max-width: 420px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { max-width: 380px; }
  .constellation { grid-template-columns: 1fr 1fr; }
  .constellation > .orbit { display: none; }
  .service:nth-child(2) { margin-top: 64px; }
  .service:nth-child(3) { margin-top: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  /* Nav pill keeps its shape; links move into a full-screen overlay */
  .menu-toggle { display: inline-grid; }
  /* No backdrop-filter here: it would trap the fixed overlay inside the pill */
  .nav { padding-left: 22px; background: var(--raised); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 120px var(--gutter) var(--s5);
    background: var(--canvas);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility 0s linear .3s;
  }
  .menu-open .nav-links { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
  .menu-open body { overflow: hidden; }
  .nav-links li { overflow: hidden; border-bottom: 1px solid var(--line); }
  .nav-link {
    padding: 18px 0;
    font-size: clamp(36px, 9vw, 56px);
    letter-spacing: -0.035em;
    transform: translateY(100%);
    transition: transform .6s var(--ease);
  }
  .menu-open .nav-link { transform: none; }
  .menu-open .nav-links li:nth-child(2) .nav-link { transition-delay: .05s; }
  .menu-open .nav-links li:nth-child(3) .nav-link { transition-delay: .1s; }
  .menu-open .nav-links li:nth-child(4) .nav-link { transition-delay: .15s; }
  .nav-link::after { left: auto; right: 0; bottom: 50%; width: 10px; height: 10px; margin: 0 0 -5px; }
  .menu-open .nav { box-shadow: none; }
}

@media (max-width: 767px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 92px; }
  .section-head-split { grid-template-columns: 1fr; }
  .constellation { grid-template-columns: 1fr; gap: var(--s6); padding-bottom: 0; }
  .service:nth-child(n) { margin-top: 0; }
  .service-orb { width: 168px; }
  .cert-grid { grid-template-columns: 1fr; }
  .cert-card { border-radius: 32px; }
  .band { height: 60px; }
  .field-row { grid-template-columns: 1fr; }
  .fact { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { padding-top: var(--s7); }
}

@media (max-width: 560px) {
  .nav-cta { display: none; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .stage { max-width: 340px; }
  .chip { padding: 8px 14px; font-size: 13px; }
  .chip-1 { top: 6%; left: -2%; }
  .chip-2 { bottom: 2%; left: 2%; }
  .stage .satellite { width: 56px; height: 56px; }
  .about-visual .chip { right: -2%; top: 8%; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .footer-cta .btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js .intro, .js .reveal { opacity: 1; transform: none; }
  .js .orbit path { stroke-dashoffset: 0; }
  .band-track { animation: none; }
}
