/* ==========================================================================
   StevenRoyster.com — site styles
   Palette: deep navy, warm white, muted teal. Type: Fraunces / Public Sans / IBM Plex Mono.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/publicsans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plexmono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0e1a2b;
  --navy-2: #15253b;
  --navy-3: #1d3150;
  --paper: #f6f2ea;
  --paper-2: #ede7dc;
  --card: #fffdf9;
  --ink: #13202f;
  --ink-soft: #46525f;
  --line: #d9d1c3;
  --teal: #2a6f70;
  --teal-strong: #1f5859;
  --teal-light: #8fd0cf;
  --teal-glow: rgba(95, 179, 179, 0.3);
  --on-dark: #f6f2ea;
  --on-dark-soft: #c3cedb;
  --error: #a3261b;
  --error-dark: #ff9b8f;
  --success: #1f6b3f;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 8rem);
  --radius: 14px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.15rem);
  line-height: 1.7;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--teal-strong);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--teal-light);
}

.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;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--paper);
  color: var(--navy);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.skip-link:focus {
  top: 0.75rem;
}

/* ---------- Header & navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(14, 26, 43, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(143, 208, 207, 0.12);
  color: var(--on-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--on-dark);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand:hover {
  color: var(--on-dark);
}
.brand svg {
  width: 1.9rem;
  height: 1.9rem;
}

.nav-toggle {
  display: none;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--on-dark-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.2s, background-color 0.2s;
}
.site-nav a:hover,
.site-nav a[aria-current="true"] {
  color: var(--on-dark);
  background: rgba(143, 208, 207, 0.1);
}
.site-nav a.nav-cta {
  color: var(--navy);
  background: var(--teal-light);
  margin-left: 0.5rem;
  font-weight: 600;
}
.site-nav a.nav-cta:hover {
  background: var(--paper);
}

@media (max-width: 52rem) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.8rem;
    background: transparent;
    color: var(--on-dark);
    border: 1px solid rgba(143, 208, 207, 0.35);
    border-radius: 8px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
  }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s var(--ease), opacity 0.2s;
  }
  .nav-toggle-bars {
    position: relative;
  }
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .nav-toggle-bars::before {
    top: -6px;
  }
  .nav-toggle-bars::after {
    top: 6px;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars {
    background: transparent;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--navy);
    border-bottom: 1px solid rgba(143, 208, 207, 0.18);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  }
  /* Hidden only when JS is available to reopen it. */
  .js .site-nav:not(.is-open) {
    display: none;
  }
  .site-nav ul {
    flex-direction: column;
    padding: 0.75rem var(--gutter) 1.25rem;
    gap: 0.15rem;
  }
  .site-nav a {
    padding: 0.85rem 0.75rem;
    font-size: 1.05rem;
  }
  .site-nav a.nav-cta {
    margin: 0.5rem 0 0;
    text-align: center;
  }
  /* Without JS, the nav is shown inline below the bar. */
  html:not(.js) .site-header {
    height: auto;
    position: relative;
  }
  html:not(.js) .site-nav {
    position: static;
    box-shadow: none;
  }
  html:not(.js) .header-inner {
    flex-wrap: wrap;
    padding-block: 0.75rem;
  }
}

/* ---------- Shared section bits ---------- */

.section {
  padding-block: var(--section-y);
  position: relative;
}

.on-dark {
  background: var(--navy);
  color: var(--on-dark);
}
.on-dark a {
  color: var(--teal-light);
}
.on-dark a:hover {
  color: var(--paper);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.section-label::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: currentColor;
}
.on-dark .section-label {
  color: var(--teal-light);
}

.section-title {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  max-width: 22ch;
}

.section-intro {
  max-width: 40rem;
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 1.1em;
}
.on-dark .section-intro {
  color: var(--on-dark-soft);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}
.btn svg {
  width: 1.05em;
  height: 1.05em;
  transition: transform 0.2s var(--ease);
}
.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  background: var(--teal-light);
  color: var(--navy);
  box-shadow: 0 8px 24px -10px var(--teal-glow);
}
.on-dark .btn-primary,
.btn-primary {
  color: var(--navy);
}
.btn-primary:hover {
  background: var(--paper);
  color: var(--navy);
}

.btn-ghost {
  color: var(--on-dark);
  border-color: rgba(246, 242, 234, 0.4);
}
.on-dark .btn-ghost {
  color: var(--on-dark);
}
.btn-ghost:hover,
.on-dark .btn-ghost:hover {
  color: var(--on-dark);
  border-color: var(--teal-light);
  background: rgba(143, 208, 207, 0.08);
}

.btn-dark {
  background: var(--navy);
  color: var(--paper);
}
.btn-dark:hover {
  background: var(--teal-strong);
  color: var(--paper);
}
.btn-dark[disabled] {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) 0;
  isolation: isolate;
}

.blueprint {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(143, 208, 207, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 208, 207, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 70% 40%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 90% 80% at 70% 40%, #000 30%, transparent 85%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: end;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.hero-copy {
  padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
  align-self: center;
}

.hero h1 {
  font-weight: 600;
}
.hero-eyebrow {
  display: block;
  margin-bottom: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-light);
}
.hero-headline {
  display: block;
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero-headline > span {
  display: block;
}
.hero-headline > span:nth-child(2) {
  color: var(--teal-light);
}

.hero-text {
  max-width: 36rem;
  margin: 1.75rem 0 2.25rem;
  color: var(--on-dark-soft);
  font-size: clamp(1.1rem, 0.5vw + 1rem, 1.25rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-figure {
  position: relative;
  margin: 0;
  align-self: end;
  justify-self: center;
  width: 100%;
  max-width: 27rem;
}
.hero-figure::before {
  /* soft teal glow behind the portrait */
  content: "";
  position: absolute;
  inset: 8% -12% 10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(95, 179, 179, 0.34), rgba(14, 26, 43, 0));
}
.hero-figure picture,
.hero-figure img {
  width: 100%;
  height: auto;
}
.hero-figure img {
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}

.hero-nodes {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.hero-nodes path {
  fill: none;
  stroke: rgba(143, 208, 207, 0.35);
  stroke-width: 1;
}
.hero-nodes circle {
  fill: var(--navy);
  stroke: var(--teal-light);
  stroke-width: 1.5;
}
.hero-nodes circle.solid {
  fill: var(--teal-light);
}

.hero-facts {
  border-top: 1px solid rgba(143, 208, 207, 0.16);
  background: rgba(21, 37, 59, 0.75);
}
.hero-facts ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.hero-facts li {
  padding: 1.35rem 1.25rem 1.35rem 0;
  font-size: 0.95rem;
  color: var(--on-dark);
  line-height: 1.45;
}
.hero-facts li + li {
  padding-left: 1.25rem;
  border-left: 1px solid rgba(143, 208, 207, 0.16);
}
.hero-facts .fact-label {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-light);
}

@media (max-width: 52rem) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding-bottom: 0.5rem;
  }
  .hero-figure {
    max-width: 21rem;
  }
  .hero-facts ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-facts li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .hero-facts li:nth-child(n + 3) {
    border-top: 1px solid rgba(143, 208, 207, 0.16);
  }
}
@media (max-width: 26rem) {
  .hero-actions .btn {
    width: 100%;
  }
  .hero-facts ul {
    grid-template-columns: 1fr;
  }
  .hero-facts li,
  .hero-facts li + li {
    padding: 1rem 0;
    border-left: 0;
  }
  .hero-facts li + li {
    border-top: 1px solid rgba(143, 208, 207, 0.16);
  }
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about-body {
  font-size: 1.08em;
  padding-top: 0.4rem;
}
.about-body p:first-child {
  font-size: 1.12em;
  color: var(--ink);
}

@media (max-width: 52rem) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Focus areas ---------- */

.focus {
  background: var(--paper-2);
}

.focus-head {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  counter-reset: focus;
}

.focus-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.focus-card:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 111, 112, 0.45);
  box-shadow: 0 22px 40px -28px rgba(14, 26, 43, 0.45);
}
.focus-card::before {
  /* connector rail that echoes the systems motif */
  content: "";
  position: absolute;
  left: clamp(1.6rem, 3vw, 2.2rem);
  right: clamp(1.6rem, 3vw, 2.2rem);
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--teal);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.focus-card:hover::before {
  transform: scaleX(1);
}

.focus-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.focus-icon {
  width: 3rem;
  height: 3rem;
  padding: 0.6rem;
  border-radius: 12px;
  background: var(--navy);
  color: var(--teal-light);
}
.focus-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.focus-card h3 {
  font-size: clamp(1.45rem, 2vw, 1.7rem);
  margin-bottom: 1rem;
}
.focus-card p {
  color: var(--ink-soft);
  font-size: 0.98em;
}
.focus-note {
  margin-top: auto;
  padding-top: 1.25rem;
}
.focus-note p {
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  font-size: 0.88em;
  color: var(--ink-soft);
  font-style: italic;
}
.focus-link {
  margin-top: auto;
  padding-top: 1.25rem;
  font-weight: 650;
  font-size: 0.98em;
}
.focus-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.focus-link svg {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  transition: transform 0.2s var(--ease);
}
.focus-link a:hover svg {
  transform: translateX(3px);
}

.focus-card--accent {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--on-dark);
}
.focus-card--accent .focus-icon {
  background: var(--teal-light);
  color: var(--navy);
}
.focus-card--accent p,
.focus-card--accent .focus-kicker {
  color: var(--on-dark-soft);
}
.focus-card--accent::before {
  background: var(--teal-light);
}
.focus-card--accent a {
  color: var(--teal-light);
}
.focus-card--accent a:hover {
  color: var(--paper);
}
.focus-card--accent :focus-visible {
  outline-color: var(--teal-light);
}
.credential-chip {
  display: inline-block;
  margin-bottom: 1.1rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(143, 208, 207, 0.45);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-light);
}

@media (max-width: 60rem) {
  .focus-grid {
    grid-template-columns: 1fr;
    max-width: 40rem;
  }
}

/* ---------- Work / exploring ---------- */

.work-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 4rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.work-head .section-intro {
  margin: 0;
}

.explore-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  position: relative;
}
.explore-list::before {
  /* the line linking the three nodes */
  content: "";
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  right: 0.7rem;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), rgba(42, 111, 112, 0.25));
}
.explore-item {
  position: relative;
  padding: 2.75rem 2rem 0 0;
}
.explore-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--teal);
  box-shadow: 0 0 0 6px var(--paper);
  transition: background-color 0.25s, transform 0.25s var(--ease);
}
.explore-item:hover::before {
  background: var(--teal);
  transform: scale(1.12);
}
.explore-tag {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.explore-item h3 {
  font-size: clamp(1.3rem, 1.8vw, 1.5rem);
  margin-bottom: 0.75rem;
}
.explore-item p {
  color: var(--ink-soft);
}

@media (max-width: 52rem) {
  .work-head {
    grid-template-columns: 1fr;
  }
  .explore-list {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding-left: 2.5rem;
  }
  .explore-list::before {
    top: 0.7rem;
    bottom: 0.7rem;
    left: 0.65rem;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--teal), rgba(42, 111, 112, 0.25));
  }
  .explore-item {
    padding: 0;
  }
  .explore-item::before {
    left: -2.5rem;
  }
}

/* Project cards (rendered when projects are added in content/site.json) */
.projects-subhead {
  margin: clamp(3rem, 6vw, 4.5rem) 0 1.5rem;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
}
.work-head + .projects-subhead {
  margin-top: 0;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 111, 112, 0.45);
  box-shadow: 0 22px 40px -28px rgba(14, 26, 43, 0.45);
}
.project-status {
  align-self: flex-start;
  margin-bottom: 1rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--paper-2);
  color: var(--ink);
}
.project-status--experiment {
  background: #efe3c8;
  color: #5a4210;
}
.project-status--active {
  background: #d3ebe9;
  color: #1c4f50;
}
.project-status--completed {
  background: #dbe3ee;
  color: #1d3150;
}
.project-card h4 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.2;
}
.project-card p {
  color: var(--ink-soft);
  font-size: 0.98em;
}
.project-meta {
  margin: 1rem 0 0;
  font-size: 0.9em;
}
.project-meta div {
  display: flex;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}
.project-meta dt {
  min-width: 4.5rem;
  font-weight: 650;
}
.project-meta dd {
  margin: 0;
  color: var(--ink-soft);
}
.project-link {
  margin-top: auto;
  padding-top: 1.25rem;
  font-weight: 650;
}

/* ---------- Coaching ---------- */

.coaching {
  overflow: hidden;
  isolation: isolate;
}
.lanes {
  /* track lanes: a quiet nod to the oval */
  position: absolute;
  inset: auto -10% -2px -10%;
  height: 46%;
  z-index: -1;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 calc(2.75rem - 1px),
    rgba(143, 208, 207, 0.12) calc(2.75rem - 1px) 2.75rem
  );
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
  transform: perspective(600px) rotateX(48deg);
  transform-origin: bottom;
}

.coaching-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.coaching-body {
  margin-top: 1.75rem;
  color: var(--on-dark-soft);
}

.resources-title {
  margin: 2.5rem 0 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(143, 208, 207, 0.18);
  font-size: clamp(1.4rem, 2.2vw, 1.7rem);
  color: var(--on-dark);
}
.resources-intro {
  margin-bottom: 1.25rem;
  color: var(--on-dark-soft);
}
.resource-list {
  display: grid;
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.resource a {
  display: block;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(143, 208, 207, 0.25);
  border-radius: 12px;
  background: rgba(21, 37, 59, 0.6);
  color: var(--on-dark);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, transform 0.25s var(--ease);
}
.on-dark .resource a:hover {
  color: var(--on-dark);
  border-color: var(--teal-light);
  background: rgba(29, 49, 80, 0.85);
  transform: translateY(-2px);
}
.resource-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}
.resource-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
}
.resource-role {
  padding: 0.15rem 0.6rem;
  border: 1px solid rgba(143, 208, 207, 0.45);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-light);
}
.resource-desc {
  display: block;
  margin: 0.45rem 0 0.6rem;
  font-size: 0.95em;
  line-height: 1.6;
  color: var(--on-dark-soft);
}
.resource-host {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-light);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.resource-host svg {
  width: 1em;
  height: 1em;
  transition: transform 0.2s var(--ease);
}
.resource a:hover .resource-host svg {
  transform: translateX(3px);
}

.credential-card {
  position: relative;
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  border: 1px solid rgba(143, 208, 207, 0.3);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(29, 49, 80, 0.85), rgba(14, 26, 43, 0.85));
}
.credential-card .credential-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-light);
}
.credential-card .credential-name {
  margin: 0.75rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--on-dark);
}
.credential-card .credential-org {
  color: var(--on-dark-soft);
  font-size: 0.95em;
}

.principles {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  counter-reset: lane;
}
.principles li {
  counter-increment: lane;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 0.75rem;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(143, 208, 207, 0.18);
}
.principles li::before {
  content: counter(lane);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1.5px solid var(--teal-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal-light);
}
.principles h3 {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--on-dark);
  margin-bottom: 0.2rem;
}
.principles p {
  font-size: 0.95em;
  color: var(--on-dark-soft);
}

@media (max-width: 52rem) {
  .coaching-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-links {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}
.contact-links li + li {
  margin-top: 0.75rem;
}
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--ink);
}
.contact-links a:hover {
  color: var(--teal);
}
.contact-links svg {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.6rem;
  border-radius: 10px;
  background: var(--navy);
  color: var(--teal-light);
  transition: background-color 0.2s;
}
.contact-links a:hover svg {
  background: var(--teal);
  color: var(--paper);
}

.contact-form {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -45px rgba(14, 26, 43, 0.5);
}

.field {
  margin-bottom: 1.25rem;
}
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 650;
  font-size: 0.95rem;
}
.field .req {
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 0.85em;
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.8rem 0.95rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #8a8173;
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea {
  min-height: 9.5rem;
  resize: vertical;
}
.field input:hover,
.field textarea:hover {
  border-color: #5f584d;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 111, 112, 0.22);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field input[aria-invalid="true"]:hover,
.field textarea[aria-invalid="true"]:hover,
.field input[aria-invalid="true"]:focus,
.field textarea[aria-invalid="true"]:focus {
  border-color: var(--error);
}
.field input[aria-invalid="true"]:focus,
.field textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(163, 38, 27, 0.2);
}
.field-error {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--error);
}
.field-error:empty {
  display: none;
}
.field-hint {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.form-privacy {
  flex: 1 1 14rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.form-status {
  margin-top: 1.25rem;
  padding: 0.95rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.97rem;
}
.form-status:empty {
  display: none;
}
.form-status[data-state="success"] {
  background: #e1f0e6;
  color: var(--success);
  border: 1px solid #b6d9c2;
}
.form-status[data-state="error"] {
  background: #f8e3e0;
  color: var(--error);
  border: 1px solid #ebbdb7;
}

@media (max-width: 52rem) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--on-dark-soft);
  padding-block: 2.75rem;
  font-size: 0.92rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
}
.footer-inner p {
  margin: 0;
}
.site-footer a {
  color: var(--on-dark);
}
.site-footer a:hover {
  color: var(--teal-light);
}
.footer-credit {
  flex-basis: 100%;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(143, 208, 207, 0.14);
  font-size: 0.85rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- 404 ---------- */

.notfound {
  min-height: calc(100vh - var(--header-h) - 8rem);
  display: grid;
  align-items: center;
}
.notfound h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 1.25rem;
}
.notfound p {
  color: var(--on-dark-soft);
  max-width: 34rem;
  margin-bottom: 2rem;
}

/* ---------- Entrance motion (progressive; only when JS and motion are OK) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: var(--delay, 0s);
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover,
  .focus-card:hover,
  .project-card:hover {
    transform: none;
  }
}

@media print {
  .site-header,
  .contact-form,
  .hero-nodes,
  .blueprint,
  .lanes {
    display: none !important;
  }
  .on-dark {
    background: #fff;
    color: #000;
  }
}
