/* ==========================================================================
   Saab El Hage | Personal Professional Website
   Design system: dark, enterprise-technology aesthetic.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces */
  --bg: #08090c;
  --bg-elevated: #0e1015;
  --surface: #12151b;
  --surface-2: #171b23;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text-primary: #eef1f6;
  --text-secondary: #a2acbb;
  --text-tertiary: #7a8496;

  /* Accents */
  --gold: #c9a768;
  --gold-bright: #e0c48c;
  --gold-dim: rgba(201, 167, 104, 0.12);
  --blue: #6f97ee;
  --blue-bright: #8fb0f5;
  --blue-dim: rgba(111, 151, 238, 0.12);

  /* Feedback */
  --danger: #e2716b;

  /* Typography */
  --font-heading: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  /* Layout */
  --container: 1240px;
  --container-narrow: 860px;
  --header-h: 76px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-med: 420ms;
  --dur-slow: 900ms;

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input,
textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--gold);
  color: #14110a;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.container--narrow {
  max-width: var(--container-narrow);
}

section {
  position: relative;
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.section-inner {
  position: relative;
  z-index: 1;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
}

.section-head--center .eyebrow::before {
  display: none;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-lede {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 58ch;
}

.section-head--center .section-lede {
  margin-inline: auto;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
  border: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #16130a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(201, 167, 104, 0.45);
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text-secondary);
  padding-inline: 0.25rem;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(8, 9, 12, 0.6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med) var(--ease), background var(--dur-med) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(8, 9, 12, 0.82);
}

.nav-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-bright);
  background: linear-gradient(155deg, var(--surface-2), var(--surface));
}

.brand-name-full {
  display: block;
}

.brand-role {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.nav-links a {
  position: relative;
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease);
  padding-block: 0.4rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right var(--dur-med) var(--ease);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  right: 0;
}

/* The in-flyout "Let's Connect" is only needed once the nav collapses to a
   mobile menu; on desktop the one in .nav-actions already covers it. */
.nav-links > a.btn-primary {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-primary);
  position: relative;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6rem));
  padding-bottom: clamp(4rem, 8vw, 6rem);
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero-content .eyebrow {
  animation: fade-up var(--dur-slow) var(--ease) both;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.9rem);
  color: var(--text-primary);
  margin-bottom: 1.4rem;
  animation: fade-up var(--dur-slow) var(--ease) 80ms both;
}

.hero-title .line-accent {
  display: block;
  background: linear-gradient(100deg, var(--gold-bright), var(--gold) 60%, var(--blue-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 2.2rem;
  animation: fade-up var(--dur-slow) var(--ease) 160ms both;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.6rem;
  animation: fade-up var(--dur-slow) var(--ease) 240ms both;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  animation: fade-up var(--dur-slow) var(--ease) 320ms both;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.social-icon svg {
  width: 17px;
  height: 17px;
}

.social-icon:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.hero-meta-sep {
  width: 1px;
  height: 26px;
  background: var(--border-strong);
}

.hero-meta-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
}

/* Hero infrastructure visual */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in var(--dur-slow) var(--ease) 200ms both;
}

.hero-visual svg {
  width: 100%;
  height: 100%;
}

.node-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: node-pulse 3.2s var(--ease) infinite;
}

.node-pulse.delay-1 { animation-delay: .5s; }
.node-pulse.delay-2 { animation-delay: 1s; }
.node-pulse.delay-3 { animation-delay: 1.5s; }
.node-pulse.delay-4 { animation-delay: 2s; }

.flow-path {
  stroke-dasharray: 6 8;
  animation: flow-dash 18s linear infinite;
}

@keyframes flow-dash {
  to { stroke-dashoffset: -280; }
}

@keyframes node-pulse {
  0%, 100% { opacity: .8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .flow-path { animation: none; }
  .node-pulse { animation: none; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-copy p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  font-size: 1.02rem;
}

.about-copy p:first-of-type {
  color: var(--text-primary);
  font-size: 1.12rem;
}

.fact-panel {
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.fact-panel dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.3rem;
}

.fact-panel dd {
  color: var(--text-primary);
  font-size: 0.98rem;
  margin-bottom: 1.35rem;
}

.fact-panel dd:last-child {
  margin-bottom: 0;
}

.fact-panel .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ---------- Tags / pills ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.tag:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* ---------- Expertise ---------- */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.expertise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  transition: border-color var(--dur-med) var(--ease), transform var(--dur-med) var(--ease),
    background var(--dur-med) var(--ease);
}

.expertise-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  background: var(--surface-2);
}

.expertise-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-dim);
  color: var(--gold-bright);
  margin-bottom: 1.1rem;
}

.expertise-icon svg {
  width: 22px;
  height: 22px;
}

.expertise-card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.95rem;
  color: var(--text-primary);
}

.expertise-card .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ---------- What I do ---------- */
.capability-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.capability-item {
  background: var(--bg-elevated);
  padding: 1.9rem;
  display: flex;
  gap: 1rem;
  transition: background var(--dur-fast) var(--ease);
}

.capability-item:hover {
  background: var(--surface);
}

.capability-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.capability-item h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}

.capability-item p {
  color: var(--text-secondary);
  font-size: 0.94rem;
}

/* ---------- Ecosystem diagram ---------- */
.ecosystem {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ecosystem-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.eco-node {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.6rem;
  position: relative;
  z-index: 1;
}

.eco-node-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-dim);
  color: var(--blue-bright);
  flex-shrink: 0;
}

.eco-node-icon svg {
  width: 24px;
  height: 24px;
}

.eco-node h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.eco-node p {
  font-size: 0.88rem;
  color: var(--text-tertiary);
}

.eco-connector {
  width: 1px;
  height: 34px;
  margin-inline-start: 24px;
  position: relative;
  background: var(--border-strong);
  overflow: hidden;
}

.eco-connector::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -100%;
  height: 100%;
  background: linear-gradient(var(--blue-bright), transparent);
  animation: eco-flow 2.6s linear infinite;
}

@keyframes eco-flow {
  to { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .eco-connector::after { animation: none; top: 40%; }
}

/* ---------- Philosophy ---------- */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.philosophy-card {
  padding: 1.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.philosophy-number {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
  display: block;
}

.philosophy-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.philosophy-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-bottom: 2rem;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-info-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  flex-shrink: 0;
}

.contact-info-icon svg {
  width: 20px;
  height: 20px;
}

.contact-info-item .label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.15rem;
}

.contact-info-item .value {
  color: var(--text-primary);
  font-size: 1rem;
  transition: color var(--dur-fast) var(--ease);
}

a.contact-info-item .value:hover {
  color: var(--gold-bright);
}

.placeholder-value {
  border-bottom: 1px dashed var(--text-tertiary);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.field {
  margin-bottom: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.field input,
.field textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  background: var(--surface-2);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-status {
  font-size: 0.85rem;
  margin-top: 0.9rem;
  min-height: 1.2em;
}

.form-status[data-state="success"] { color: #7fd6a4; }
.form-status[data-state="error"] { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 1.6rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  transition: color var(--dur-fast) var(--ease);
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ---------- Background texture ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

.bg-glow {
  position: fixed;
  top: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(111, 151, 238, 0.09), transparent 65%);
  z-index: -1;
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
    max-width: 420px;
    margin-inline: auto;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .capability-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    /* height (not bottom: 0) because .site-header's backdrop-filter makes it a
       containing block for fixed descendants in most mobile browsers, which would
       otherwise confine bottom:0 to the header's own ~76px box instead of the screen. */
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(8, 9, 12, 0.98);
    backdrop-filter: blur(16px);
    padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem);
    transform: translateX(100%);
    transition: transform var(--dur-med) var(--ease);
    overflow-y: auto;
  }

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

  .nav-links a {
    width: 100%;
    padding-block: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.05rem;
  }

  .nav-actions .btn-primary.btn-sm {
    display: none;
  }

  .nav-links > a.btn-primary {
    display: inline-flex;
    margin-top: 1.5rem;
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
