/* Spyrosk.gr — premium portfolio (cousin to Noostrid) */
[x-cloak] { display: none !important; }

:root {
  --ink: #07090d;
  --surface: #111722;
  --surface-2: #171e2b;
  --line: rgba(255, 255, 255, 0.08);
  --line-accent: rgba(91, 143, 212, 0.28);
  --text: #eef1f6;
  --muted: #9aa3b5;
  --faint: #6b7385;
  --accent-blue: #5b8fd4;
  --accent-green: #7ec49a;
  --warm: #b8a99a;
  --max: 1120px;
  --nav-h: 84px;
  --radius: 16px;
  --font: Inter, system-ui, sans-serif;
  --display: "Instrument Sans", var(--font);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
.portfolio-body { margin: 0; font-family: var(--font); color: var(--text); background: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.wrap, .shell { width: min(calc(100% - 2.5rem), var(--max)); margin-inline: auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 13, 0.94);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header--scrolled, .site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(7, 9, 13, 0.97);
}
.site-header__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: min(calc(100% - 2rem), var(--max));
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.brand:hover { color: #fff; }
.brand-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(0.92rem, 3.8vw, 1.05rem);
  letter-spacing: -0.03em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.brand-text--footer {
  font-size: 1.1rem;
  display: inline-block;
  margin-bottom: 0.65rem;
  overflow: visible;
  text-overflow: unset;
}
.brand img { display: none; }
.site-nav { display: none; gap: 0.15rem; margin-left: auto; flex-shrink: 0; }
@media (min-width: 1024px) { .site-nav { display: flex; } }
.site-nav__link {
  color: var(--muted); font-size: 0.9rem; font-weight: 500; padding: 0.5rem 0.8rem;
  border-radius: 999px; text-decoration: none;
}
.site-nav__link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  flex-shrink: 0;
}
@media (min-width: 1024px) { .site-header__actions { margin-left: 0; } }
/* Keep header uncluttered on phones — CTA lives in the drawer */
.site-header__actions .sp-header-cta { display: none; }
@media (min-width: 1024px) {
  .site-header__actions .sp-header-cta { display: inline-flex; }
}

/* Hamburger → X */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  gap: 5px;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  width: 42px;
  height: 42px;
  transition: background 0.2s var(--ease), border-color 0.2s;
}
.menu-toggle:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--line);
}
@media (min-width: 1024px) { .menu-toggle { display: none; } }
.menu-toggle__bar {
  width: 18px;
  height: 1.5px;
  background: var(--text);
  display: block;
  margin-inline: auto;
  border-radius: 1px;
  transition: transform 0.28s var(--ease), opacity 0.2s;
  transform-origin: center;
}
.site-header--menu-open .menu-toggle__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.site-header--menu-open .menu-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.site-header--menu-open .menu-toggle__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}
body.menu-open {
  overflow: hidden;
}

/* Full-viewport mobile drawer
   absolute (not fixed): header backdrop-filter creates a containing block,
   which would trap position:fixed to the ~84px header. */
.site-header {
  overflow: visible;
}
.site-header--menu-open {
  background: rgba(7, 9, 13, 0.98);
  border-bottom-color: var(--line);
}
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 48;
  width: 100%;
  max-width: 100vw;
  /* Stay inside the visible viewport under the sticky header */
  height: calc(100svh - var(--nav-h));
  max-height: calc(100dvh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 1rem 1.15rem;
  background:
    radial-gradient(ellipse 70% 40% at 20% 0%, rgba(126,196,154,0.1), transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 100%, rgba(91,143,212,0.08), transparent 50%),
    rgba(7, 9, 13, 0.98);
  border-top: 1px solid var(--line);
  overflow: hidden; /* children scroll; keep chrome on-screen */
  overscroll-behavior: contain;
  box-shadow: 0 24px 48px rgba(0,0,0,0.45);
}
@media (min-width: 1024px) {
  .mobile-menu { display: none !important; }
}
/* Alpine transition helpers */
.mobile-menu-enter { transition: opacity 0.28s var(--ease), transform 0.32s var(--ease); }
.mobile-menu-enter-start { opacity: 0; transform: translateY(-8px); }
.mobile-menu-enter-end { opacity: 1; transform: none; }
.mobile-menu-leave { transition: opacity 0.2s ease, transform 0.22s ease; }
.mobile-menu-leave-start { opacity: 1; transform: none; }
.mobile-menu-leave-end { opacity: 0; transform: translateY(-6px); }

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.25rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu__link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.9rem;
  row-gap: 0.1rem;
  align-items: baseline;
  padding: 0.95rem 0.85rem;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s var(--ease), border-color 0.2s, transform 0.2s var(--ease);
}
.mobile-menu__link:hover,
.mobile-menu__link:focus-visible {
  background: rgba(255,255,255,0.04);
  border-color: rgba(126,196,154,0.22);
  outline: none;
}
.mobile-menu__link:active {
  transform: scale(0.99);
}
.mobile-menu__idx {
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent-green, #7ec49a);
  opacity: 0.9;
}
.mobile-menu__label {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.mobile-menu__hint {
  font-size: 0.82rem;
  color: var(--faint);
  line-height: 1.3;
}

.mobile-menu__footer {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  margin-top: auto;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.mobile-menu__cta,
.mobile-menu a.btn,
.mobile-menu a.btn--primary,
.mobile-menu .btn--primary {
  color: #061018 !important;
  -webkit-text-fill-color: #061018 !important;
  background: var(--accent-green, #7ec49a) !important;
  border: 1px solid transparent !important;
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0.85rem 1rem !important;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  box-sizing: border-box !important;
}
.mobile-menu__cta:hover,
.mobile-menu .btn--primary:hover {
  filter: brightness(1.06);
  color: #061018 !important;
  -webkit-text-fill-color: #061018 !important;
}
.mobile-menu__external {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  box-sizing: border-box;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.mobile-menu__external:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.03);
}
.mobile-menu__meta {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--faint);
  padding-bottom: 0.15rem;
  overflow-wrap: anywhere;
}

/* Short phones: tighter menu rows so CTA stays visible */
@media (max-height: 700px) {
  .mobile-menu__link { padding: 0.7rem 0.7rem; }
  .mobile-menu__label { font-size: 1.15rem; }
  .mobile-menu__hint { display: none; }
  .mobile-menu__cta,
  .mobile-menu a.btn--primary {
    padding: 0.75rem 0.9rem !important;
  }
}
@media (max-width: 360px) {
  .mobile-menu { padding-inline: 0.85rem; }
  .mobile-menu__label { font-size: 1.2rem; }
  .site-header__inner { width: min(calc(100% - 1.25rem), var(--max)); gap: 0.4rem; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 600; font-size: 0.88rem;
  padding: 0.65rem 1.15rem; border-radius: 999px; text-decoration: none; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), filter 0.2s, background 0.2s, border-color 0.2s;
}
.btn--xai, .btn-primary, .btn--primary { background: var(--accent-green); color: #061018; -webkit-text-fill-color: #061018; }
.btn--ghost, .btn-ghost { border-color: var(--line); color: var(--text); }
.btn--primary:hover, .btn--xai:hover { color: #061018; -webkit-text-fill-color: #061018; }
.btn--sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }

/* Photo hero — truly centered in viewport */
.sp-photo-hero {
  position: relative;
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
}
.sp-photo-hero__media { position: absolute; inset: 0; }
.sp-photo-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.sp-photo-hero__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(7,9,13,0.25) 0%, rgba(7,9,13,0.75) 70%, rgba(7,9,13,0.92) 100%),
    linear-gradient(180deg, rgba(7,9,13,0.5) 0%, rgba(7,9,13,0.7) 55%, rgba(7,9,13,0.94) 100%);
}
.sp-photo-hero__inner {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2.5rem), 44rem);
  margin-inline: auto;
  padding: 4.5rem 0 4rem;
  display: flex;
  justify-content: center;
}
.sp-photo-hero__content {
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}
.hero__eyebrow, .sp-eyebrow, .eyebrow {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-green); margin: 0 0 1rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.hero__eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 12px rgba(126,196,154,0.45); }
.sp-photo-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5.2vw, 3.35rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.08;
  margin: 0 0 0.85rem;
  text-wrap: balance;
}
/* Portfolio-themed typing line (green, fixed height — no layout jump) */
.sp-type-line {
  margin: 0 auto 1.15rem;
  height: 1.45em;
  min-height: 1.45em;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent-green);
  line-height: 1.45;
}
.sp-type-line.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 3px;
  vertical-align: -0.08em;
  background: var(--accent-green);
  box-shadow: 0 0 10px rgba(126, 196, 154, 0.55);
  animation: sp-caret 1s steps(1) infinite;
}
@keyframes sp-caret {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.sp-photo-hero .lead, .x-hero__lead {
  color: var(--muted); font-size: 1.08rem; max-width: 42ch; margin: 0 auto 1.5rem;
}
.sp-photo-hero__actions, .x-hero__actions {
  display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.5rem;
  justify-content: center;
}
.sp-hero-metrics {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem;
  padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: 0.85rem; color: var(--muted);
  max-width: 28rem;
  margin-inline: auto;
  justify-content: center;
}
.sp-hero-metrics strong {
  display: block; font-family: var(--display); font-size: 1.2rem; color: var(--text);
}
@media (prefers-reduced-motion: reduce) {
  .sp-type-line.is-typing::after { display: none; }
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* x-hero is the active Noostrid-style hero on this site */
.x-hero.sp-x-hero { display: grid; }

.section { padding: 4.5rem 0; }
.section-header, .sp-section-head { margin-bottom: 2rem; max-width: 40rem; }
.section-header h2, .sp-section-head h2 {
  font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0.4rem 0 0.6rem; font-weight: 600; letter-spacing: -0.02em;
}
.muted { color: var(--muted); }
.panel, .sp-about-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; color: var(--muted);
}
.sp-manifesto { padding: 3.5rem 0; }

.expertise-grid { display: grid; gap: 1rem; }
@media (min-width: 768px) { .expertise-grid { grid-template-columns: repeat(2, 1fr); } }
.card, .expertise-card, .project-card {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
}
.card h3, .expertise-card h3 { font-family: var(--display); margin: 0.65rem 0 0.4rem; font-size: 1.08rem; }
.card .icon { color: var(--accent-green); }

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}
.filter-chip {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.filter-chip.is-active,
.filter-chip.active {
  background: rgba(126, 196, 154, 0.16);
  color: var(--text);
}
.filter-chip:hover:not(.is-active):not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.project-card.is-filtered-out,
.project-card[hidden] {
  display: none !important;
}
.project-grid { display: grid; gap: 1rem; }
@media (min-width: 768px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
.project-media {
  min-height: 140px; display: grid; place-items: center;
  background: rgba(0,0,0,0.28); border-radius: 12px; margin-bottom: 0.85rem;
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
  overflow: hidden;
}
.project-media img { width: 100%; height: 140px; object-fit: cover; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.75rem; }
.tag, .stack-pill {
  font-size: 0.72rem; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); font-family: var(--mono);
}

.timeline { display: grid; gap: 1.15rem; }
.timeline-item { border-left: 2px solid var(--line-accent); padding-left: 1.15rem; }
.timeline-year { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-blue); margin-bottom: 0.35rem; }
.stack-grid { display: grid; gap: 1.15rem; }
@media (min-width: 640px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
.stack-group h4 { font-family: var(--display); margin: 0 0 0.65rem; }
.stack-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.contact-panel {
  display: grid; gap: 2rem; padding: 2rem;
  background: var(--surface); border: 1px solid var(--line-accent); border-radius: var(--radius);
}
@media (min-width: 900px) { .contact-panel { grid-template-columns: 1fr 1.1fr; } }
.contact-form { display: grid; gap: 0.75rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 0.75rem 0.9rem; background: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font: inherit;
}
.contact-form textarea { min-height: 140px; resize: vertical; }

.site-footer { margin-top: 2rem; background: #0c1018; border-top: 1px solid var(--line); }
.site-footer__grid { display: grid; gap: 1.75rem; padding: 2.75rem 0 1.75rem; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer__tagline, .site-footer__note { color: var(--muted); font-size: 0.9rem; }
.site-footer__label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.65rem; }
.site-footer__links a { display: block; color: var(--text); text-decoration: none; margin-bottom: 0.45rem; font-size: 0.92rem; }
.site-footer__bar { border-top: 1px solid var(--line); padding: 1rem 0 1.5rem; }
.site-footer__bar-inner {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; justify-content: space-between;
  align-items: center; font-size: 0.8rem; color: var(--faint);
}
.site-footer__hosted { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--muted); text-decoration: none; }
.site-footer__hosted-logo { height: 28px; width: auto; }
.site-footer__legal a { margin-right: 0.75rem; color: var(--faint); text-decoration: none; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.reveal.is-visible, .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

.modal { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.78); padding: 1.5rem; overflow: auto; }
.modal.open { display: flex; align-items: flex-start; justify-content: center; }
.modal-content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; max-width: 640px; width: 100%; margin-top: 2.5rem; position: relative; }
.modal-close { position: absolute; top: 0.75rem; right: 1rem; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }
.legal-page { padding: calc(var(--nav-h) + 2rem) 0 4rem; }
.legal-back { display: inline-block; margin-bottom: 1.25rem; color: var(--accent-blue); }
.page-hero { padding: 3rem 0 2rem; }
.page-hero h1 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -0.02em; }

#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  z-index: 60; pointer-events: none;
}

/* Light typing line */
.sp-type-line {
  margin: 0.65rem 0 0.85rem;
  min-height: 1.35em;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--accent-blue);
}
.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.1em;
  background: var(--accent-blue);
  animation: sp-caret 1s steps(1) infinite;
}
@keyframes sp-caret {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .is-typing::after { display: none; }
}

/* ── Shared Noostrid-style hero (spyrosk) ── */
.sp-x-hero.x-hero { display: grid; }
.x-hero.sp-x-hero { display: grid; }
/* Force light text on dark portfolio — never circular vars / black body text */
.portfolio-body {
  --ink: #07090d;
  --text: #eef1f6 !important;
  --muted: #9aa3b5 !important;
  --faint: #6b7385 !important;
  --blue: #5b8fd4;
  --blue-glow: rgba(91, 143, 212, 0.28);
  --nav-h: 84px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color: #eef1f6 !important;
  background: #07090d;
}
.portfolio-body h1,
.portfolio-body h2,
.portfolio-body h3,
.portfolio-body p,
.portfolio-body li,
.portfolio-body .card,
.portfolio-body .panel,
.portfolio-body .section-header,
.portfolio-body .lead {
  color: inherit;
}
.portfolio-body .muted,
.portfolio-body .x-hero__lead,
.portfolio-body .x-rail__text {
  color: #9aa3b5 !important;
}
.portfolio-body .x-hero__title,
.portfolio-body .x-hero__static,
.portfolio-body .x-rail__title,
.portfolio-body .x-hero__stats strong {
  color: #eef1f6 !important;
}
.sp-x-hero .eyebrow,
.x-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-green, #7ec49a);
  margin: 0 0 1.1rem;
}
.sp-x-hero .eyebrow::before { display: none; }
.x-hero {
  position: relative;
  min-height: min(78svh, 720px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 2rem 0 2.5rem;
  text-align: left;
}
.x-hero--photo .x-hero__media { position: absolute; inset: 0; z-index: 0; }
.x-hero--photo .x-hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
}
.x-hero--photo .x-hero__shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.42) 0%, rgba(7, 9, 13, 0.58) 42%, rgba(7, 9, 13, 0.9) 100%),
    linear-gradient(105deg, rgba(7, 9, 13, 0.75) 0%, rgba(7, 9, 13, 0.3) 60%, rgba(7, 9, 13, 0.55) 100%);
}
.x-hero__grid {
  position: relative; z-index: 2;
  width: min(calc(100% - 2.5rem), var(--max));
  margin-inline: auto;
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 960px) {
  .x-hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 360px);
    gap: 3rem 3.5rem;
  }
}
.x-hero__copy { max-width: 40rem; min-width: 0; }
.x-hero__title {
  font-family: var(--display);
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--text);
}
.x-hero__static { display: block; color: #eef1f6; }
.x-hero__rotator-wrap { display: block; margin-top: 0.12em; min-height: 1.3em; }
.x-hero__rotator {
  position: relative;
  display: block;
  min-height: 1.3em;
  overflow: hidden;
}
/* Rotating word accent (spyrosk green) */
.sp-x-hero [data-x-word],
.x-hero [data-x-word] {
  color: #8fd4a8 !important;
  font-weight: 600;
  background: none !important;
  -webkit-text-fill-color: #8fd4a8 !important;
  filter: none !important;
}

.x-hero__lead { color: var(--muted); font-size: 1.08rem; max-width: 48ch; margin: 1.35rem 0 0; }
.x-hero__type {
  margin: 1rem 0 0; height: 1.5em; min-height: 1.5em;
  overflow: hidden; white-space: nowrap;
  font-family: var(--display);
  font-size: 0.95rem; font-weight: 500;
  letter-spacing: 0.02em; color: var(--accent-green, #7ec49a); line-height: 1.5;
}
.x-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; justify-content: flex-start; }
.x-hero__stats {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2rem;
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line); max-width: 36rem;
  margin-inline: 0; justify-content: flex-start;
}
.x-hero__stats strong { display: block; font-family: var(--display); font-size: 1.15rem; font-weight: 600; color: var(--text); }
.x-hero__stats span { font-size: 0.82rem; color: var(--faint); }
.x-rail {
  position: relative; justify-self: stretch; align-self: center;
  padding-left: 1.5rem; width: 100%; min-width: 0;
}
.x-rail::before {
  content: ""; position: absolute; left: 0; top: 0.1rem; bottom: 0.1rem;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, transparent, rgba(126,196,154,0.75) 15%, rgba(91,143,212,0.35) 85%, transparent);
}
.x-rail__track { position: relative; min-height: 9.5rem; }
.x-rail [data-x-beat] {
  position: absolute; left: 0; right: 0; top: 0;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.x-rail [data-x-beat].is-active { position: relative; opacity: 1; pointer-events: auto; transform: none; }
.x-rail__idx {
  display: block; font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.76rem; letter-spacing: 0.14em; color: var(--accent-green, #7ec49a); margin-bottom: 0.65rem;
}
.x-rail__title {
  display: block; font-family: var(--display);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem); font-weight: 600;
  color: var(--text); margin: 0 0 0.55rem; letter-spacing: -0.02em;
}
.x-rail__text { margin: 0; font-size: 0.98rem; line-height: 1.55; color: var(--muted); max-width: 32ch; }
.x-rail__dots { display: flex; gap: 8px; margin-top: 1.5rem; }
.x-rail__dots span {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.18);
  transition: background 0.3s, transform 0.3s;
}
.x-rail__dots span.is-active {
  background: var(--accent-green, #7ec49a); transform: scale(1.3);
  box-shadow: 0 0 12px rgba(126,196,154,0.5);
}
.x-hero__type.is-typing::after {
  content: ""; display: inline-block; width: 2px; height: 0.95em;
  margin-left: 3px; vertical-align: -0.08em;
  background: var(--accent-green, #7ec49a);
  animation: sp-caret 1s steps(1) infinite;
}
.project-media__placeholder {
  text-align: center; opacity: 0.55; font-size: 13px; letter-spacing: 3px;
  padding: 2.5rem 1rem;
}
.stack-grid {
  display: grid; gap: 1rem;
}
@media (min-width: 700px) {
  .stack-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 959px) {
  .x-hero { min-height: auto; padding: 2.5rem 0 2.75rem; }
  .x-hero__grid {
    width: min(calc(100% - 1.5rem), var(--max));
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .x-hero__title { font-size: clamp(1.8rem, 7vw, 2.5rem); }
  .x-hero__rotator-wrap,
  .x-hero__rotator { min-height: 1.45em; }
  /* mobile word display handled by rotator grid */
  .x-hero__actions { width: 100%; }
  .x-hero__actions .btn {
    flex: 1 1 auto;
    min-width: min(100%, 9rem);
    text-align: center;
    justify-content: center;
  }
  .x-rail { padding-left: 1.15rem; }
  .x-rail__track { min-height: 6.5rem; }
  .x-rail__text { max-width: none; }
  .shell { width: min(calc(100% - 1.5rem), var(--max)); }
  .project-grid { grid-template-columns: 1fr !important; }
  .expertise-grid { grid-template-columns: 1fr !important; }
  .site-header__inner { width: min(calc(100% - 1.5rem), var(--max)); }
  .btn { white-space: normal; }
  .filter-chip { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .x-hero__actions .btn { flex: 1 1 100%; }
}
/* primary CTA stays light-on-dark-friendly: green fill, dark label on the button only */
.btn--primary {
  background: var(--accent-green, #7ec49a) !important;
  color: #061018 !important;
}
.btn--primary:hover {
  filter: brightness(1.06);
  color: #061018 !important;
}

/* Spyrosk differentiator: soft green rail + warm stats border */
.sp-x-hero .x-hero__stats {
  border-top-color: rgba(126, 196, 154, 0.28);
}
.sp-x-hero .x-rail__title { color: #eef1f6 !important; }
.sp-x-hero .x-hero__type { color: #8fd4a8; }

.x-rail__dots { margin-top: 0.85rem !important; }
.x-rail__track { min-height: 7.25rem !important; }
.sp-x-hero.x-hero,
.x-hero.sp-x-hero {
  display: grid !important;
  /* Viewport lock handled in HERO VIEWPORT LOCK block */
  min-height: calc(100svh - var(--nav-h, 84px));
  align-items: center;
  padding: 1.5rem 0 2.25rem;
}
.sp-x-hero .x-hero__grid {
  align-items: center;
}
@media (max-width: 959px) {
  .sp-x-hero.x-hero {
    min-height: calc(100svh - var(--nav-h, 84px));
    align-items: center;
    padding: 1.15rem 0 2rem;
  }
  .x-rail__track { min-height: 6.25rem !important; }
}

/* === HERO ROTATOR (absolute stack — parent sized by JS) === */
.x-hero__rotator-wrap {
  display: block;
  margin-top: 0.1em;
  min-height: 1.25em;
}
.x-hero__rotator {
  display: block !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 1.25em;
  /* width/height set by hero-motion.js from phrase metrics */
}
.x-hero__rotator [data-x-word],
.x-hero__rotator .x-hero__word,
.x-hero [data-x-word],
.tools-x-hero [data-x-word],
.sp-x-hero [data-x-word] {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  display: block !important;
  margin: 0 !important;
  width: auto !important;
  max-width: none !important; /* never bind to collapsed parent */
  white-space: nowrap !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(0.35em);
  pointer-events: none !important;
  z-index: 0;
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.45s;
}
.x-hero__rotator [data-x-word].is-active,
.x-hero__rotator .x-hero__word.is-active,
.x-hero [data-x-word].is-active,
.tools-x-hero [data-x-word].is-active,
.sp-x-hero [data-x-word].is-active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  z-index: 2 !important;
  pointer-events: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  .x-hero__rotator [data-x-word],
  .x-hero__rotator .x-hero__word,
  .x-hero [data-x-word],
  .tools-x-hero [data-x-word],
  .sp-x-hero [data-x-word] {
    transition: none !important;
    transform: none !important;
  }
}


/* === BODY REWORK (match hero quality) === */
.section {
  padding: 4.5rem 0;
}
.section--tight { padding: 3.25rem 0; }
.section--panel {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(126,196,154,0.06), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(91,143,212,0.05), transparent 50%),
    #0a0e15;
  border-block: 1px solid var(--line);
}
.section--contact { padding: 2.5rem 0 4rem; }
.section-header { margin-bottom: 2rem; max-width: 42rem; }
.section-header h2 {
  font-family: var(--display);
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0.35rem 0 0.75rem;
}
.section-header .eyebrow,
.section .eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-green);
}
.section-header__lead { margin: 0; max-width: 48ch; font-size: 1.02rem; }
.muted { color: var(--muted); }

/* Hero scroll hint */
.x-hero__scroll {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--faint);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.85;
  transition: color 0.2s, opacity 0.2s;
}
.x-hero__scroll:hover { color: var(--text); opacity: 1; }
.x-hero__scroll svg { animation: sp-bounce 1.6s ease-in-out infinite; }
@keyframes sp-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
@media (max-width: 700px) {
  .x-hero__scroll { display: none; }
}

/* Split layout */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; }
  .split--rev .split__copy { order: 2; }
  .split--rev .split__media { order: 1; }
}
.split__copy h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0.35rem 0 1rem;
}
.prose-block {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.prose-block br + br { display: block; content: ""; margin-top: 0.75rem; }
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.55rem;
}
.checklist li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--text);
  font-size: 0.95rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(126,196,154,0.15);
}
.split__media {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.split__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.split__caption {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--faint);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
}

/* Feature cards with images */
.feature-grid {
  display: grid;
  gap: 1.15rem;
}
@media (min-width: 860px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature-card {
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(126,196,154,0.28);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.feature-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0e14;
}
.feature-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.feature-card:hover .feature-card__media img { transform: scale(1.04); }
.feature-card__body { padding: 1.2rem 1.25rem 1.35rem; }
.feature-card__meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
}
.feature-card h3 {
  font-family: var(--display);
  font-size: 1.12rem;
  margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
}
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.noostrid-strip {
  margin-top: 1.75rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(126,196,154,0.22);
  background:
    linear-gradient(120deg, rgba(126,196,154,0.08), transparent 55%),
    var(--surface);
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.noostrid-strip h3 {
  font-family: var(--display);
  margin: 0.25rem 0 0.35rem;
  font-size: 1.15rem;
}
.noostrid-strip p { margin: 0; }
.noostrid-strip__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Work cards */
.project-grid--rich,
.work-card {
  /* grid container below */
}
.project-grid.project-grid--rich {
  display: grid;
  gap: 1.15rem;
}
@media (min-width: 768px) {
  .project-grid.project-grid--rich { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .project-grid.project-grid--rich { grid-template-columns: repeat(3, 1fr); }
}
.work-card {
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.work-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.work-card.is-filtered-out,
.work-card[hidden] { display: none !important; }
.work-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0e14;
}
.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.work-card:hover .work-card__media img { transform: scale(1.04); }
.work-card__idx {
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(7,9,13,0.72);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
}
.work-card__cat {
  position: absolute;
  right: 0.85rem;
  top: 0.85rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(126,196,154,0.16);
  color: #b8e6c8;
  border: 1px solid rgba(126,196,154,0.25);
}
.work-card__body { padding: 1.15rem 1.2rem 1.3rem; }
.work-card h3 {
  font-family: var(--display);
  font-size: 1.08rem;
  margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.work-card__body > p { margin: 0; font-size: 0.92rem; line-height: 1.55; }
.work-card__focus {
  margin-top: 0.75rem !important;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem !important;
  color: var(--faint) !important;
  line-height: 1.45;
}
.work-card__focus strong {
  display: inline;
  color: var(--accent-green);
  font-weight: 600;
  margin-right: 0.35rem;
}

/* Timeline rich */
.timeline--rich {
  display: grid;
  gap: 0;
  border-left: 2px solid rgba(126,196,154,0.25);
  margin-left: 0.35rem;
}
.timeline--rich .timeline-item {
  border-left: 0;
  padding: 0 0 1.5rem 1.5rem;
  position: relative;
}
.timeline--rich .timeline-item::before {
  content: "";
  position: absolute;
  left: -0.42rem;
  top: 0.35rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 4px rgba(126,196,154,0.12);
}
.timeline--rich .timeline-year {
  color: var(--accent-green);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.timeline--rich h3 {
  font-family: var(--display);
  font-size: 1.08rem;
  margin: 0.2rem 0 0.4rem;
}
.timeline--rich .pill {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--faint);
}

/* Arsenal chips */
.stack-chips { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.stack-group h3 {
  font-family: var(--display);
  font-size: 0.95rem;
  margin: 0 0 0.55rem;
  color: var(--text);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-family: var(--mono);
}

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--line);
  min-height: 280px;
  display: grid;
  align-items: end;
  padding: 2rem;
  gap: 1.25rem;
}
@media (min-width: 800px) {
  .cta-band {
    grid-template-columns: 1.4fr auto;
    align-items: center;
    padding: 2.5rem 2.75rem;
    min-height: 300px;
  }
}
.cta-band__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cta-band__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cta-band__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(7,9,13,0.92) 0%, rgba(7,9,13,0.72) 48%, rgba(7,9,13,0.55) 100%),
    linear-gradient(180deg, transparent 0%, rgba(7,9,13,0.35) 100%);
}
.cta-band__content,
.cta-band__actions { position: relative; z-index: 2; }
.cta-band__content h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  margin: 0.35rem 0 0.65rem;
  letter-spacing: -0.03em;
  max-width: 22ch;
}
.cta-band__content p { margin: 0; color: var(--muted); max-width: 48ch; }
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.contact-row h2 {
  font-family: var(--display);
  margin: 0.25rem 0 0.4rem;
  font-size: 1.45rem;
}
.contact-row p { margin: 0; }
.contact-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Reveal polish */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible,
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .x-hero__scroll svg { animation: none; }
}

@media (max-width: 700px) {
  .section { padding: 3.25rem 0; }
  .cta-band { padding: 1.5rem; }
  .noostrid-strip { padding: 1.15rem; }
}


/* === HERO VIEWPORT LOCK (next section starts exactly below the fold) === */
.sp-x-hero.x-hero,
.x-hero.sp-x-hero {
  /* Exactly one screen under the sticky nav — no peek of #approach on land */
  min-height: calc(100svh - var(--nav-h, 84px)) !important;
  height: calc(100svh - var(--nav-h, 84px)) !important;
  max-height: calc(100svh - var(--nav-h, 84px)) !important;
  box-sizing: border-box;
  display: grid !important;
  align-items: center;
  padding: 1.5rem 0 2.25rem !important;
  overflow: hidden;
}
.sp-x-hero .x-hero__grid {
  width: min(calc(100% - 2.5rem), var(--max));
  margin-inline: auto;
  align-items: center;
}
/* Keep hero content from overflowing the locked viewport */
.sp-x-hero .x-hero__lead {
  margin-top: 0.85rem !important;
  font-size: 0.98rem !important;
  max-width: 42ch !important;
}
.sp-x-hero .x-hero__actions {
  margin-top: 1.1rem !important;
}
.sp-x-hero .x-hero__stats {
  margin-top: 1.15rem !important;
  padding-top: 0.85rem !important;
  gap: 1rem 1.5rem !important;
}
.sp-x-hero .x-hero__title {
  font-size: clamp(1.8rem, 4.4vw, 2.75rem) !important;
}
.sp-x-hero .x-hero__type {
  margin-top: 0.65rem !important;
}
.sp-x-hero .eyebrow {
  margin-bottom: 0.65rem !important;
}
.sp-x-hero .x-rail__track {
  min-height: 6.25rem !important;
}
.x-hero__scroll {
  bottom: 0.85rem !important;
}
@media (min-width: 960px) {
  .sp-x-hero .x-hero__grid {
    gap: 1.75rem 2.25rem !important;
  }
}
@media (max-width: 959px) {
  .sp-x-hero.x-hero {
    min-height: calc(100svh - var(--nav-h, 84px)) !important;
    height: calc(100svh - var(--nav-h, 84px)) !important;
    max-height: calc(100svh - var(--nav-h, 84px)) !important;
    padding: 1.15rem 0 2rem !important;
  }
  .sp-x-hero .x-hero__stats {
    gap: 0.75rem 1.1rem !important;
  }
}
/* Short viewports: drop secondary chrome so content fits one screen */
@media (max-height: 760px) {
  .sp-x-hero .x-hero__stats { display: none !important; }
  .x-hero__scroll { display: none !important; }
  .sp-x-hero .x-hero__lead {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
@media (max-height: 640px) {
  .sp-x-hero .x-rail { display: none !important; }
  .sp-x-hero .x-hero__grid {
    grid-template-columns: 1fr !important;
  }
}

