/* ============================================================
   CARTER MANAHAN — portfolio
   Type: Fraunces (display) + DM Sans (text)
   Colour: iOS grouped greys + systemIndigo (light)
           ink navy, lifted navy surfaces + indigo (dark)
   Every surface colour comes from a token; there are no
   colour literals below the two :root blocks.
   ============================================================ */

:root {
  color-scheme: light;
  /* grouped-background greys, the way an iOS settings sheet stacks:
     the page recedes, the surfaces sitting on it are white */
  --ink:        #f2f2f7;   /* page */
  --cream:      #1c1c1e;   /* primary text */
  --cream-dim:  rgba(28, 28, 30, 0.82);
  --cream-faint:rgba(28, 28, 30, 0.6);
  --accent:     #5856d6;   /* systemIndigo */
  --accent-hi:  #4340c0;
  --hairline:   rgba(60, 60, 67, 0.26);
  --hairline-2: rgba(60, 60, 67, 0.13);

  /* canvas instruments read these */
  --fx-line: 28, 28, 30;
  --fx-accent: 88, 86, 214;
  --fx-bg: 242, 242, 247;

  /* panel / card surfaces */
  --panel: #ffffff;
  --stage: #ffffff;
  --shadow-lg: 0 20px 46px rgba(60, 60, 67, 0.1), 0 2px 8px rgba(60, 60, 67, 0.05);
  --shadow-md: 0 12px 32px rgba(60, 60, 67, 0.07);
  --grain-blend: overlay;
  --grain-op: 0.022;

  /* the platform's own faces: New York for display, SF Pro for text.
     ui-serif resolves to New York on Apple systems and to the
     platform serif elsewhere, so nothing is downloaded. */
  --serif: ui-serif, "New York", "Iowan Old Style", Palatino, Georgia, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
           system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* the second light in the room, kept well behind the indigo */
  --glow-a: 88, 86, 214;
  --glow-b: 64, 190, 214;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4.5vw, 2.5rem);
  --sect: clamp(3.25rem, 7.5vw, 6rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --z-content: 2;
  --z-nav: 50;
  --z-menu: 60;
  --z-grain: 70;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  /* same stacking, navy: the page is the deep one, surfaces lift off it */
  --ink:        #0e1428;
  --cream:      #f2f2f7;
  --cream-dim:  rgba(242, 242, 247, 0.8);
  --cream-faint:rgba(242, 242, 247, 0.58);
  --accent:     #7d7bef;
  --accent-hi:  #a5a3f7;
  --hairline:   rgba(242, 242, 247, 0.2);
  --hairline-2: rgba(242, 242, 247, 0.12);

  --fx-line: 176, 186, 220;
  --fx-accent: 125, 123, 239;
  --fx-bg: 14, 20, 40;

  --panel: #171f3a;
  --stage: #151c35;
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.45), 0 3px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 20px 46px rgba(0, 0, 0, 0.4);
  --grain-blend: soft-light;
  --grain-op: 0.07;
  --glow-a: 125, 123, 239;
  --glow-b: 90, 210, 235;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
/* the portrait is cropped by CSS, not in the file, so a native drag
   would hand over the whole uncropped frame. Nothing here drags. */
img { -webkit-user-drag: none; -khtml-user-drag: none; user-drag: none; }
.portrait-plate, .portrait-plate img { -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
ul, ol { list-style: none; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--cream-dim);
  background-color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease-soft), color 0.5s var(--ease-soft);
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 255, 255, 0.9) 0%, rgba(242, 242, 247, 0) 60%),
    radial-gradient(90% 70% at 85% 110%, rgba(88, 86, 214, 0.05) 0%, rgba(242, 242, 247, 0) 55%);
  background-repeat: no-repeat;
  transition: opacity 0.5s var(--ease-soft);
}
:root[data-theme="dark"] body::before {
  background-image:
    radial-gradient(120% 90% at 50% -10%, rgba(84, 108, 168, 0.16) 0%, rgba(14, 20, 40, 0) 60%),
    radial-gradient(90% 70% at 85% 110%, rgba(125, 123, 239, 0.09) 0%, rgba(14, 20, 40, 0) 55%);
}

::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 2px; }

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

.skip-link {
  position: fixed; top: -60px; left: 1rem; z-index: 100;
  padding: 0.7em 1.2em; background: var(--cream); color: var(--ink);
  font-weight: 500; font-size: 0.85rem; border-radius: 4px;
  transition: top 0.25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; 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); }
main { position: relative; z-index: var(--z-content); }

/* ---------- typography ---------- */
h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  color: var(--cream);
  letter-spacing: 0.002em;
  text-wrap: balance;
}
h1 em, h2 em, h3 em, .display em { font-style: italic; font-weight: 400; color: var(--accent-hi); }

.display-xl { font-size: clamp(2.9rem, 7.2vw, 5.6rem); letter-spacing: -0.021em; }
.display-lg { font-size: clamp(2.2rem, 4.7vw, 3.6rem); letter-spacing: -0.017em; }
.display-md { font-size: clamp(1.7rem, 3.3vw, 2.5rem); line-height: 1.14; letter-spacing: -0.012em; }

.lede {
  font-size: clamp(1.1rem, 1.55vw, 1.3rem); line-height: 1.64;
  color: var(--cream-dim); max-width: 58ch;
}
p + p { margin-top: 1.05em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.9em;
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); opacity: 0.7; flex: none; }
.eyebrow--branded { gap: 0.7em; }
.eyebrow--branded::before { display: none; }
.eyebrow-icon {
  width: 20px; height: 20px; object-fit: contain; border-radius: 4px; flex: none;
}
.eyebrow-icon--mark { border-radius: 0; }
.eyebrow-rule { width: 20px; height: 1px; background: var(--accent); opacity: 0.7; flex: none; }
.tm { font-size: 0.58em; vertical-align: 0.6em; letter-spacing: 0; }

/* ---------- icons ---------- */
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- monogram ---------- */
.monogram {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; flex: none;
  width: 38px; height: 38px;
  font-family: var(--serif); font-size: 1.02rem; font-weight: 450; letter-spacing: 0.01em;
  color: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  transition: border-color 0.35s var(--ease-soft), color 0.35s var(--ease-soft);
}
.monogram::before, .monogram::after {
  content: ""; position: absolute; background: var(--accent);
  transition: background-color 0.35s var(--ease-soft);
}
.monogram::before { left: 5px; top: 5px; width: 7px; height: 1px; }
.monogram::after  { left: 5px; top: 5px; width: 1px; height: 7px; }
.brand:hover .monogram, .foot-mark:hover .monogram { border-color: var(--accent); }
.monogram--lg { width: 46px; height: 46px; font-size: 1.2rem; border-radius: 9px; }

/* ---------- links & buttons ---------- */
.link-inline {
  color: var(--cream); text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat; background-size: 100% 1px; background-position: 0 100%;
  transition: color 0.25s var(--ease-soft);
  padding-bottom: 1px;
}
.link-inline:hover { color: var(--accent-hi); }

.btn {
  display: inline-flex; align-items: center; gap: 0.85em;
  min-height: 48px; padding: 0.9em 1.8em;
  font-size: 0.79rem; font-weight: 500; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--cream); text-decoration: none;
  border: 1px solid var(--hairline); border-radius: 3px;
  position: relative; overflow: hidden;
  transition: color 0.35s var(--ease-soft), border-color 0.35s var(--ease-soft);
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: var(--cream);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.4s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn:hover, .btn:focus-visible { color: var(--ink); border-color: var(--cream); }
.btn > * { position: relative; }
.btn .arrow { transition: transform 0.35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--accent { border-color: rgba(88, 86, 214, 0.55); color: var(--accent-hi); }
.btn--accent::before { background: var(--accent); }
.btn--accent:hover, .btn--accent:focus-visible { color: var(--ink); border-color: var(--accent); }

.btn--ink { border-color: rgba(28, 28, 30, 0.4); color: var(--cream); }
.btn--ink::before { background: var(--cream); }
.btn--ink:hover, .btn--ink:focus-visible { color: #ffffff; border-color: var(--cream); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.tlink {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent-hi); text-decoration: none;
  border-bottom: 1px solid rgba(88, 86, 214, 0.35); padding-bottom: 3px;
  transition: color 0.25s var(--ease-soft), border-color 0.25s var(--ease-soft);
}
.tlink:hover { color: var(--cream); border-color: var(--cream); }
.tlink .ic { width: 15px; height: 15px; transition: transform 0.3s var(--ease-out); }
.tlink:hover .ic { transform: translateX(3px); }
.tlink-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin-top: 1.1rem; }

/* ---------- film grain ---------- */
.grain {
  position: fixed; inset: -100%; z-index: var(--z-grain);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-op);
  mix-blend-mode: var(--grain-blend);
}
html.motion-ok .grain { animation: grain-shift 1.2s steps(6) infinite; }
@keyframes grain-shift {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-4%, 3%, 0); }
  40%  { transform: translate3d(3%, -5%, 0); }
  60%  { transform: translate3d(-5%, -2%, 0); }
  80%  { transform: translate3d(4%, 4%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ---------- header / nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  transition: background-color 0.45s var(--ease-soft), border-color 0.45s var(--ease-soft);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--ink) 84%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--hairline-2);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 84px; }

.brand { display: inline-flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.brand-name {
  font-family: var(--serif); font-size: 1.16rem; font-weight: 450; color: var(--cream);
  letter-spacing: 0.01em; white-space: nowrap; line-height: 1.15;
}
.brand-name small {
  display: block; font-family: var(--sans); font-size: 0.63rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--cream-faint); margin-top: 4px;
}

.nav-links { display: flex; align-items: center; gap: clamp(0.9rem, 1.7vw, 1.6rem); }
.nav-links a {
  position: relative; text-decoration: none; padding: 0.55em 0.1em;
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--cream-dim);
  transition: color 0.25s var(--ease-soft);
  white-space: nowrap;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent-hi);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.32s var(--ease-out);
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--accent-hi); }
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-links .nav-cta {
  margin-left: 0.5rem; padding: 0.62em 1.2em;
  border: 1px solid var(--hairline); border-radius: 3px;
  font-size: 0.74rem; letter-spacing: 0.15em; text-transform: uppercase;
  transition: color 0.3s var(--ease-soft), background-color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
}
.nav-links .nav-cta::after { display: none; }
.nav-links .nav-cta:hover { background: var(--cream); border-color: var(--cream); color: var(--ink); }

.nav-end { display: flex; align-items: center; gap: 0.6rem; }

/* theme toggle */
.theme-toggle {
  position: relative; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--hairline); color: var(--cream-dim);
  transition: color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft), background-color 0.3s var(--ease-soft);
}
.theme-toggle:hover { color: var(--accent-hi); border-color: var(--accent); }
.theme-toggle .ic {
  position: absolute; width: 17px; height: 17px;
  transition: opacity 0.35s var(--ease-soft), transform 0.45s var(--ease-out);
}
.theme-toggle .ic-moon { opacity: 0; transform: rotate(-45deg) scale(0.6); }
.theme-toggle .ic-sun  { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .ic-moon { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun  { opacity: 0; transform: rotate(45deg) scale(0.6); }

.nav-toggle {
  display: none; position: relative; z-index: calc(var(--z-menu) + 1);
  width: 42px; height: 42px; align-items: center; justify-content: center;
  color: var(--cream); border-radius: 4px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 22px; height: 1.5px; background: currentColor;
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(-90deg) translateX(-7px); }
.nav-toggle[aria-expanded="true"] span::after { opacity: 0; }

.mobile-menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  background: color-mix(in srgb, var(--ink) 97%, transparent);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem var(--gutter) 3rem;
  visibility: hidden; opacity: 0;
  transition: opacity 0.45s var(--ease-soft), visibility 0s linear 0.45s;
}
.mobile-menu.is-open { visibility: visible; opacity: 1; transition-delay: 0s; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 0.1rem; }
.mobile-menu a.mm-link {
  display: inline-block; text-decoration: none;
  font-family: var(--serif); font-size: clamp(1.75rem, 6.6vw, 2.35rem); font-weight: 380;
  color: var(--cream); padding: 0.28em 0;
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), color 0.25s;
}
.mobile-menu a.mm-link:hover { color: var(--accent-hi); }
.mobile-menu.is-open a.mm-link { opacity: 1; transform: translateY(0); transition-delay: calc(0.05s * var(--i, 0) + 0.1s); }
.mobile-menu .mm-foot {
  margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--hairline-2);
  font-size: 0.85rem; color: var(--cream-faint);
  display: flex; flex-wrap: wrap; gap: 0.4em 1.4em;
  opacity: 0; transition: opacity 0.6s var(--ease-soft) 0.5s;
}
.mobile-menu.is-open .mm-foot { opacity: 1; }
.mobile-menu .mm-foot a { color: var(--cream-dim); text-decoration: none; }
.mobile-menu .mm-foot a:hover { color: var(--accent-hi); }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}
body.menu-open { overflow: hidden; }
body.menu-open .site-header {
  z-index: calc(var(--z-menu) + 1);
  background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom-color: transparent;
}

/* ---------- reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(14px); }
html.motion-ok .rv {
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
  transition-delay: var(--d, 0s);
}
html.motion-ok .rv.in, html:not(.motion-ok) .rv { opacity: 1; transform: none; }

.rv--curtain { transform: none; clip-path: inset(0 0 100% 0); }
html.motion-ok .rv--curtain {
  transition: clip-path 1.2s var(--ease-out), opacity 0.9s var(--ease-soft);
  transition-delay: var(--d, 0s);
}
.rv--curtain.in, html:not(.motion-ok) .rv--curtain { clip-path: inset(0 0 0 0); transform: none; }
.rv--curtain img {
  transition: transform 1.1s var(--ease-out), filter 1.1s var(--ease-soft);
  transition-delay: calc(var(--d, 0s) + 0.12s);
}
html.motion-ok .rv--curtain:not(.in) img { transform: scale(1.06); filter: blur(5px); }
html.motion-ok .rv--curtain.in img { transform: none; filter: blur(0); }

.mask-line { display: block; overflow: hidden; padding-block: 0.08em; margin-block: -0.08em; }
.mask-line > span { display: block; }
html.motion-ok .mask-line > span { transform: translateY(112%); animation: line-up 1.1s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
@keyframes line-up { to { transform: translateY(0); } }

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

/* ============================================================
   HERO — quiet field, copy left, portrait right
   ============================================================ */
.hero {
  position: relative;
  min-height: clamp(640px, 94svh, 1000px);
  display: flex; align-items: center;
  padding: clamp(7.5rem, 15vh, 10rem) 0 clamp(3rem, 7vh, 5rem);
  overflow: hidden;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(46% 56% at 76% 34%, rgb(var(--glow-a) / 0.09), transparent 72%),
    radial-gradient(40% 48% at 12% 82%, rgb(var(--glow-b) / 0.07), transparent 70%),
    linear-gradient(180deg, rgb(var(--fx-bg) / 0.12), rgb(var(--fx-bg) / 0) 45%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
/* the portrait sits first in the source so it can float on small
   screens; on wide ones order puts it back in the right column */
.hero-copy { order: 1; }
.hero-portrait { order: 2; }
.hero h1 { margin: 0 0 1.5rem; line-height: 1.0; white-space: nowrap; }
.hero .display-xl { font-size: clamp(2rem, 6.1vw, 4.9rem); letter-spacing: -0.028em; }
.hero-kicker {
  display: flex; align-items: center; gap: 0.85em;
  margin-bottom: 1.7rem;
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent);
}
.hero-kicker::before { content: ""; width: 30px; height: 1px; background: var(--accent); opacity: 0.75; flex: none; }
.hero-line {
  font-size: clamp(1.06rem, 1.5vw, 1.24rem); line-height: 1.6; color: var(--cream-dim);
  max-width: 42ch;
}
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em 1.6em;
  margin-top: 2.4rem; padding-top: 1.4rem;
  border-top: 1px solid var(--hairline-2);
  max-width: 560px;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--cream-faint);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.6em; }
.hero-meta .ic { width: 14px; height: 14px; color: var(--accent); }
.hero-meta .live { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
html.motion-ok .hero-meta .live { animation: live-pulse 2.6s var(--ease-soft) infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

html.motion-ok .hero-kicker,
html.motion-ok .hero-line,
html.motion-ok .hero-meta,
html.motion-ok .hero-actions {
  opacity: 0; animation: fade-up 1s var(--ease-out) both; animation-delay: var(--d, 0s);
}

/* The portrait: a circular plate sitting inside a bearing ring.
   The frame does not clip, so the ring reads as an instrument
   around the plate rather than a border drawn on it. */
.hero-portrait {
  position: relative; justify-self: end;
  width: 100%; max-width: 470px; aspect-ratio: 1;
}
.portrait-ring {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; pointer-events: none;
}
.portrait-plate {
  /* MANUAL PORTRAIT CROP CONTROLS
     Zoom: 1 = none, 1.05 = 5%, 1.10 = 10%.
     X: positive moves right; negative moves left.
     Y: positive moves down; negative moves up.
     Rotate: positive turns clockwise; negative turns anticlockwise. */
  --portrait-zoom: 1.4;
  --portrait-x: -0.5%;
  --portrait-y: 2.5%;
  --portrait-rotate: 10deg;

  position: absolute; inset: 12%; z-index: 1;
  border-radius: 50%; overflow: hidden;
  border: 1px solid var(--hairline-2);
  background:
    radial-gradient(70% 70% at 50% 30%, rgb(var(--fx-accent) / 0.1), transparent 68%),
    var(--stage);
  box-shadow: var(--shadow-md);
}
.portrait-plate::before {
  content: ""; position: absolute; inset: 11px;
  border: 1px dashed rgb(var(--fx-line) / 0.16); border-radius: 50%;
  pointer-events: none; z-index: 2;
}
.portrait-plate::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle at 52% 42%, transparent 48%, rgba(8, 12, 26, 0.08) 72%, rgba(8, 12, 26, 0.28) 100%);
}
.portrait-plate img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 50%;
  transform: translate(var(--portrait-x), var(--portrait-y)) scale(var(--portrait-zoom)) rotate(var(--portrait-rotate));
  transform-origin: center;
}
.hero-portrait .slot-label { display: none; }
html.motion-ok .hero-portrait {
  opacity: 0; animation: fade-up 1.3s var(--ease-out) both; animation-delay: 0.4s;
}
/* empty state */
.hero-portrait.is-empty img { display: none; }
.hero-portrait.is-empty .portrait-plate::after { display: none; }
.hero-portrait.is-empty .slot-label {
  display: grid; place-items: center; align-content: center; gap: 0.55rem;
  position: absolute; inset: 0; text-align: center; padding: 3rem 2.6rem;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--cream-faint);
}
.hero-portrait.is-empty .slot-label small {
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: none;
  color: rgb(var(--fx-line) / 0.42); max-width: 22ch; line-height: 1.6;
}
.hero-portrait.is-empty .slot-label::before {
  content: ""; width: 26px; height: 1px; background: var(--accent); opacity: 0.8;
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding: clamp(6.5rem, 14vh, 8.5rem) 0 clamp(2.5rem, 6vh, 4rem); }
  .hero-inner { grid-template-columns: 1fr; gap: 2.2rem; }
  /* the same portrait carries the profile card immediately below, so the
     stacked hero stays copy-only rather than spending a screen on it twice */
  /* small, level with the name, with the copy running past it */
  .hero-inner { display: block; }
  .hero-portrait {
    float: right; width: clamp(76px, 23vw, 104px); max-width: none;
    margin: 0.15rem 0 0.9rem 1.1rem;
  }
  .portrait-ring { display: none; }
  .portrait-plate { inset: 0; }
  .hero-actions, .hero-meta { clear: both; }
  .hero-line { max-width: none; }
}
@media (max-width: 560px) {
  .hero-kicker { font-size: 0.66rem; letter-spacing: 0.15em; margin-bottom: 1.3rem; }
  .hero-kicker::before { display: none; }
  .hero-meta { font-size: 0.66rem; letter-spacing: 0.12em; gap: 0.5em 1.2em; }
  .hero-actions .btn, .case-foot .btn-row .btn { flex: 1 1 100%; justify-content: center; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding-block: var(--sect); position: relative; }
.section--tight { padding-top: 0; }
.section-head { max-width: 760px; margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.section-head .eyebrow { margin-bottom: 1.2rem; }
.section-head h2 { margin-bottom: 1.2rem; }

.sect-index { display: flex; align-items: baseline; gap: 1.1rem; margin-bottom: 1.4rem; }
.sect-index .num { font-family: var(--serif); font-style: italic; font-weight: 380; font-size: 1.08rem; color: var(--accent); flex: none; }
.sect-index .rule { flex: 1; height: 1px; background: var(--hairline-2); }

/* ============================================================
   PROFILE CARD — the Cognitif technology-page card, adapted
   ============================================================ */
.card {
  --pad: clamp(1.8rem, 4vw, 2.6rem);
  position: relative;
  background: var(--panel);
  border: 1px solid var(--hairline-2); border-radius: 12px;
  padding: var(--pad);
}
.card p { font-size: 0.96rem; color: var(--cream-faint); }

/* ============================================================
   OVERVIEW — the degree, read off an instrument
   ============================================================ */
.ov-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.56fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.ov-copy .eyebrow { margin-bottom: 1rem; }
.ov-copy h2 { margin-bottom: 1.1rem; }
.ov-copy .lede { max-width: 46ch; }

.ov-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; margin-top: clamp(2rem, 4vw, 2.8rem);
  background: var(--hairline-2);
  border: 1px solid var(--hairline-2); border-radius: 12px; overflow: hidden;
}
.ov-fact { background: var(--panel); padding: clamp(1.1rem, 2.4vw, 1.5rem); }
.ov-fact dt {
  display: flex; align-items: center; gap: 0.6em; margin-bottom: 0.45rem;
  font-size: 0.62rem; font-weight: 590; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
}
.ov-fact dt .ic { width: 14px; height: 14px; }
.ov-fact dd { font-size: 0.92rem; line-height: 1.5; color: var(--cream-dim); }

/* the degree stated as a record, the way a registry prints it:
   label, value, rule. No seal, no laurels, no shouting. */
.ov-record {
  align-self: start;
  border: 1px solid var(--hairline-2); border-radius: 12px;
  background: var(--panel); overflow: hidden;
}
.ov-record-row {
  padding: clamp(1rem, 2.2vw, 1.35rem) clamp(1.1rem, 2.4vw, 1.5rem);
  border-bottom: 1px solid var(--hairline-2);
}
.ov-record-row:last-child { border-bottom: 0; }
.ov-record dt {
  font-size: 0.58rem; font-weight: 590; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream-faint); margin-bottom: 0.34rem;
}
.ov-record dd { font-size: 0.98rem; line-height: 1.45; color: var(--cream-dim); }
.ov-record-row--lead {
  background:
    radial-gradient(120% 180% at 100% 0%, rgb(var(--glow-a) / 0.07), transparent 62%),
    var(--panel);
}
.ov-record-row--lead dt { color: var(--accent); }
.ov-record-row--lead dd {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.28rem, 2.1vw, 1.6rem); line-height: 1.15;
  letter-spacing: -0.012em; color: var(--cream);
}

@media (max-width: 900px) {
  .ov-grid { grid-template-columns: 1fr; gap: 2.2rem; }
}
@media (max-width: 520px) {
  .ov-facts { grid-template-columns: 1fr; }
}

/* ============================================================
   CASE STUDIES
   ============================================================ */
.case + .case { margin-top: clamp(3.5rem, 8vw, 6.5rem); }

.case-head {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.4rem, 5vw, 4rem); align-items: end;
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}
.case-head h2 { font-size: clamp(2.3rem, 5.2vw, 4rem); margin: 1.15rem 0 0; }
.case-head .lede { margin-bottom: 0.2rem; }
@media (max-width: 900px) { .case-head { grid-template-columns: 1fr; align-items: start; gap: 1.3rem; } }

/* the capture instrument sits behind the head, right of the stacked copy */
.case-head--fx { position: relative; min-height: clamp(300px, 28vw, 360px); align-items: stretch; }
.case-head--fx > div:not(.head-scrim) {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
}
.case-head--fx .lede { margin-top: clamp(1rem, 2vw, 1.35rem); margin-bottom: 0; max-width: 50ch; }
.head-fx {
  position: absolute; top: 4%; right: 0; bottom: 4%; left: 52%;
  width: 48%; height: 92%; z-index: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(72% 88% at 50% 50%, #000 44%, transparent 88%);
  mask-image: radial-gradient(72% 88% at 50% 50%, #000 44%, transparent 88%);
}
.head-fx--mark {
  -webkit-mask-image: radial-gradient(74% 90% at 50% 50%, #000 46%, transparent 90%);
  mask-image: radial-gradient(74% 90% at 50% 50%, #000 46%, transparent 90%);
}
.head-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(52% 100% at 6% 50%, rgb(var(--fx-bg) / 0.88) 0%, rgb(var(--fx-bg) / 0) 66%),
    radial-gradient(34% 62% at 78% 50%, rgb(var(--glow-a) / 0.08) 0%, rgb(var(--glow-a) / 0) 70%);
}
@media (max-width: 900px) {
  .case-head--fx { min-height: 0; }
  .case-head--fx > div:not(.head-scrim) { display: block; }
  .head-fx { position: relative; inset: auto; order: 3; width: 100%; height: clamp(190px, 46vw, 260px); margin-top: 0.4rem;
    -webkit-mask-image: none; mask-image: none; }
  .head-scrim { display: none; }
}

/* the body: ownership rows, with a sticky aside carrying the artefact */
.case-body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.5fr);
  gap: clamp(1.8rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 900px) { .case-body { grid-template-columns: 1fr; } }

.case-aside { position: sticky; top: 112px; display: grid; gap: 1.5rem; }
@media (max-width: 900px) { .case-aside { position: static; order: -1; } }

/* the artwork sits as an object on a plinth, never as a full-bleed photo */
.media-plinth {
  position: relative; overflow: hidden;
  border: 1px solid var(--hairline-2); border-radius: 14px;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  background: var(--stage);
  box-shadow: var(--shadow-md);
}
.media-plinth img { width: 100%; border-radius: 6px; }
/* a brand mark wants breathing room, artwork wants the frame */
.media-plinth--mark { padding: clamp(1.6rem, 3.4vw, 2.6rem); }
.media-plinth--mark img { max-width: 190px; margin-inline: auto; border-radius: 12px; }
.media-plinth--wide { padding: clamp(0.7rem, 1.6vw, 1.1rem); }
.media-plinth--fill { padding: 0; }
.media-plinth--fill img { width: 100%; height: auto; object-fit: contain; border-radius: 0; }
.media-plinth--slot {
  aspect-ratio: 16 / 10; display: grid; place-items: center;
  background:
    linear-gradient(var(--hairline-2) 1px, transparent 1px) 0 0 / 100% 50%,
    linear-gradient(90deg, var(--hairline-2) 1px, transparent 1px) 0 0 / 50% 100%,
    repeating-linear-gradient(135deg, rgb(var(--fx-line) / 0.025) 0 8px, transparent 8px 16px),
    var(--stage);
}
.media-plinth--slot .slot-label { display: none; }
.media-plinth--slot.is-empty img { display: none; }
.media-plinth--slot.is-empty .slot-label {
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
  font-size: 0.64rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream-faint); text-align: center;
}
.media-plinth--slot.is-empty .slot-label::before {
  content: "+"; display: grid; place-items: center; width: 30px; height: 30px;
  border: 1px solid var(--hairline); border-radius: 50%; color: var(--accent);
  font-size: 1rem; font-weight: 300; line-height: 1;
}
.media-plinth--slot.is-empty .slot-label small {
  font-size: 0.54rem; font-weight: 400; letter-spacing: 0.12em; color: var(--cream-faint);
}

/* an illustrative participant session, intentionally abstract rather than a
   reproduction of Cognitif's private production interface */
.cognitif-visual {
  aspect-ratio: 16 / 10;
  padding: clamp(0.65rem, 1.4vw, 0.9rem);
  background: var(--stage);
}
.cognitif-ui {
  height: 100%; min-height: 0; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--hairline-2); border-radius: 9px;
  background: var(--panel); color: var(--cream-faint);
}
.cognitif-ui__bar,
.cognitif-ui__status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.62rem 0.75rem;
  font-size: clamp(0.43rem, 0.65vw, 0.55rem); font-weight: 600;
  line-height: 1; letter-spacing: 0.16em; text-transform: uppercase;
}
.cognitif-ui__bar { border-bottom: 1px solid var(--hairline-2); }
.cognitif-ui__status { border-top: 1px solid var(--hairline-2); }
.cognitif-ui__live,
.cognitif-ui__status span:first-child { display: inline-flex; align-items: center; gap: 0.42rem; }
.cognitif-ui__live i,
.cognitif-ui__status i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  animation: live-pulse 2.4s var(--ease-soft) infinite;
}
.cognitif-ui__stage { position: relative; min-height: 0; overflow: hidden; }
.cognitif-ui__stage::before,
.cognitif-ui__stage::after {
  content: ""; position: absolute; pointer-events: none;
}
.cognitif-ui__stage::before {
  inset: 0;
  background:
    linear-gradient(var(--hairline-2) 1px, transparent 1px) 0 0 / 100% 33.333%,
    linear-gradient(90deg, var(--hairline-2) 1px, transparent 1px) 0 0 / 25% 100%;
  opacity: 0.44;
}
.cognitif-ui__stage::after {
  width: 1px; inset-block: 0; left: 68.75%;
  background: rgba(var(--fx-accent), 0.34);
}
.cognitif-ui__trace {
  position: absolute; inset: 7% 2% 8%; width: 96%; height: 85%;
  overflow: visible;
}
.cognitif-ui__guide,
.cognitif-ui__signal,
.cognitif-ui__focus circle,
.cognitif-ui__focus path {
  fill: none; vector-effect: non-scaling-stroke;
}
.cognitif-ui__guide { stroke: rgba(var(--fx-line), 0.28); stroke-width: 1; }
.cognitif-ui__signal {
  stroke: rgba(var(--fx-accent), 0.78); stroke-width: 1.45;
  stroke-dasharray: none; stroke-linecap: round;
  animation: cognitif-trace 5.6s var(--ease-soft) infinite;
}
.cognitif-ui__nodes circle {
  fill: var(--panel); stroke: rgba(var(--fx-line), 0.48); stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.cognitif-ui__nodes circle:nth-child(4) { fill: var(--accent); stroke: var(--accent); }
.cognitif-ui__focus circle { stroke: rgba(var(--fx-accent), 0.42); stroke-width: 1; }
.cognitif-ui__focus circle + circle { stroke-dasharray: 2 5; }
.cognitif-ui__focus path { stroke: rgba(var(--fx-accent), 0.58); stroke-width: 1; }
.cognitif-ui__reticle {
  position: absolute; z-index: 1; left: 68.75%; top: 24.4%;
  width: 8px; height: 8px; border: 2px solid var(--panel); border-radius: 50%;
  background: var(--accent); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(var(--fx-accent), 0.68);
}
.cognitif-ui__reticle::before,
.cognitif-ui__reticle::after {
  content: ""; position: absolute; border: 1px solid rgba(var(--fx-accent), 0.34); border-radius: 50%;
}
.cognitif-ui__reticle::before { inset: -9px; }
.cognitif-ui__reticle::after { inset: -17px; border-style: dotted; }
.cognitif-ui__prompt {
  position: absolute; left: 0.8rem; bottom: 0.7rem; z-index: 1;
  display: grid; max-width: 48%;
}
.cognitif-ui__prompt span,
.cognitif-ui__prompt small {
  font-size: clamp(0.42rem, 0.65vw, 0.54rem); line-height: 1.35;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-faint);
}
.cognitif-ui__prompt strong {
  margin-block: 0.12rem 0.16rem; font-family: var(--serif); font-size: clamp(0.78rem, 1.35vw, 1.05rem);
  font-weight: 400; line-height: 1.2; color: var(--cream);
}
.cognitif-ui__status span:last-child { color: var(--accent-hi); }
@keyframes cognitif-trace {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 1; }
}
@media (max-width: 900px) {
  .media-plinth { width: 100%; max-width: 420px; margin-inline: auto; }
  .media-plinth--mark { max-width: 300px; }
}

/* numbered ownership rows */
.frows { border-top: 1px solid var(--hairline-2); }
.frow {
  display: grid; grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.55rem 1rem;
  padding: clamp(1.6rem, 3.4vw, 2.3rem) 0;
  border-bottom: 1px solid var(--hairline-2);
  align-items: baseline;
}
.frow-num { grid-column: 1; grid-row: 1; font-family: var(--serif); font-style: italic; font-weight: 380; font-size: 1.05rem; color: var(--accent); }
.frow h3 { grid-column: 2; grid-row: 1; font-size: clamp(1.22rem, 2vw, 1.55rem); font-weight: 420; line-height: 1.24; }
.frow > div { grid-column: 2; grid-row: 2; }
.frow p { font-size: 1rem; color: var(--cream-faint); max-width: 72ch; }
.frow p + .tlink { margin-top: 1.1rem; }
@media (max-width: 560px) {
  .frow { grid-template-columns: 30px minmax(0, 1fr); gap: 0.45rem 0.7rem; padding: 1.5rem 0; }
  .frow p { font-size: 0.95rem; }
}

.case-facts { display: grid; gap: 0; border-top: 1px solid var(--hairline-2); }
.case-facts > div { padding: 0.85rem 0; border-bottom: 1px solid var(--hairline-2); }
.case-facts dt {
  font-size: 0.62rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.32rem;
}
.case-facts dd { font-size: 0.93rem; line-height: 1.5; color: var(--cream-dim); }
@media (max-width: 900px) {
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.2rem; max-width: 640px; margin-inline: auto; }
}
@media (max-width: 520px) { .case-facts { grid-template-columns: 1fr; } }

.case-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.2rem; padding-top: clamp(1.6rem, 3.5vw, 2.4rem);
}
.case-stamp {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-size: 0.71rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cream-faint);
}
.case-stamp .ic { width: 15px; height: 15px; color: var(--accent); }

/* ============================================================
   OTHER WORK
   ============================================================ */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.1rem, 2.6vw, 1.8rem); }
@media (max-width: 760px) { .pgrid { grid-template-columns: 1fr; } }

.pcard {
  display: flex; flex-direction: column;
  border: 1px solid var(--hairline-2); border-radius: 14px; overflow: hidden;
  background: var(--panel);
  transition: border-color 0.4s var(--ease-soft), transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
html.motion-ok .pcard:hover {
  border-color: rgb(var(--glow-a) / 0.34);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 0 34px -6px rgb(var(--glow-a) / 0.28);
}
.pcard-media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-bottom: 1px solid var(--hairline-2);
}
.pcard-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform 0.8s var(--ease-out);
}
html.motion-ok .pcard:hover .pcard-media img { transform: scale(1.04); }
.pcard-body { padding: clamp(1.3rem, 2.8vw, 1.9rem); display: flex; flex-direction: column; flex: 1; }
.pcard-kicker {
  display: flex; align-items: center; gap: 0.6em; margin-bottom: 0.85rem;
  font-size: 0.66rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
}
.pcard-kicker .ic { width: 14px; height: 14px; }
.pcard h3 { font-size: clamp(1.28rem, 2vw, 1.55rem); font-weight: 430; margin-bottom: 0.55rem; }
.pcard p { font-size: 0.95rem; color: var(--cream-faint); line-height: 1.6; }
.pcard-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: auto; padding-top: 1.4rem; }

/* ============================================================
   CAPABILITY STRIP
   ============================================================ */
.cap-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline-2); border: 1px solid var(--hairline-2);
  border-radius: 12px; overflow: hidden;
}
.cap-cell { background: var(--panel); padding: clamp(1.4rem, 2.8vw, 2.1rem); }
.cap-cell .ic { width: 20px; height: 20px; color: var(--accent); margin-bottom: 1.1rem; }
.cap-cell h3 { font-size: 1.18rem; font-weight: 450; margin-bottom: 0.5rem; }
.cap-cell p { font-size: 0.92rem; color: var(--cream-faint); line-height: 1.58; }
@media (max-width: 900px) { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cap-grid { grid-template-columns: 1fr; } }

/* pull quote */
.callout {
  position: relative; margin-top: clamp(1.8rem, 4vw, 2.8rem);
  padding: clamp(1.7rem, 4vw, 2.6rem) clamp(1.6rem, 4vw, 3rem);
  background: var(--panel);
  border: 1px solid var(--hairline-2); border-radius: 12px;
}
.callout::before {
  content: ""; position: absolute; left: 0; top: 12%; bottom: 12%;
  width: 2px; background: linear-gradient(transparent, var(--accent), transparent);
}
.callout p { font-family: var(--serif); font-size: clamp(1.14rem, 1.9vw, 1.4rem); font-weight: 380; line-height: 1.5; color: var(--cream); }
.callout cite {
  display: block; margin-top: 1.1rem; font-family: var(--sans); font-style: normal;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent);
}

/* ============================================================
   SKILLS MATRIX
   ============================================================ */
.skill-matrix { border-top: 1px solid var(--hairline-2); }
.skill-row {
  display: grid; grid-template-columns: minmax(0, 0.4fr) minmax(0, 1.6fr);
  gap: 0.6rem clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.5rem, 3.2vw, 2.2rem) 0;
  border-bottom: 1px solid var(--hairline-2);
  align-items: baseline;
}
.skill-row:last-child { border-bottom: 0; }
.skill-row dt {
  display: flex; align-items: baseline; gap: 0.9rem;
  font-family: var(--serif); font-weight: 420; font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.16; color: var(--cream);
}
.skill-idx { font-style: italic; font-size: 0.62em; color: var(--accent); flex: none; }
.skill-row dd p { font-size: 0.99rem; color: var(--cream-faint); max-width: 68ch; }
.skill-tools {
  margin-top: 0.7rem !important;
  font-size: 0.72rem !important; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent) !important;
}
@media (max-width: 760px) {
  .skill-row { grid-template-columns: 1fr; gap: 0.6rem; }
  .skill-row dd p { font-size: 0.94rem; }
}

/* ============================================================
   SURFACING BAND — the one place a surface runs full width
   ============================================================ */
.band-cream {
  position: relative; overflow: hidden; color: var(--cream);
  background:
    radial-gradient(38% 70% at 88% 44%, rgb(var(--glow-a) / 0.07), transparent 72%),
    radial-gradient(34% 60% at 6% 96%, rgb(var(--glow-b) / 0.06), transparent 70%),
    var(--panel);
  border-block: 1px solid var(--hairline-2);
}
.band-cream .wrap { position: relative; z-index: 1; }
.band-cream h2 { color: var(--cream); }
.band-cream h2 em,
.band-cream .eyebrow { color: var(--accent-hi); }
.band-cream .eyebrow::before { background: var(--accent-hi); }
.band-cream p { color: var(--cream-dim); }
/* one large bearing running off the edge of the band */
.band-bearing { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-head h2 { margin: 1.1rem 0 1.1rem; }
.contact-direct { display: grid; gap: 0.9rem; margin-top: 2rem; }
.contact-direct a {
  display: inline-flex; align-items: center; gap: 0.8em;
  font-size: 0.97rem; color: var(--cream-dim); text-decoration: none;
  transition: color 0.25s var(--ease-soft);
  justify-self: start;
}
.contact-direct a:hover { color: var(--accent-hi); }
.contact-direct .ic { width: 17px; height: 17px; color: var(--accent); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.3rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 0.65rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream-faint);
}
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--cream);
  background: var(--ink);
  border: 1px solid var(--hairline-2); border-radius: 8px;
  padding: 0.82em 1em;
  transition: border-color 0.3s var(--ease-soft), background-color 0.3s var(--ease-soft);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 148px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: rgb(var(--fx-line) / 0.4); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: var(--panel);
}
:root[data-theme="dark"] .field input:focus,
:root[data-theme="dark"] .field textarea:focus { background: rgba(255, 255, 255, 0.06); }
:root[data-theme="dark"] .btn--ink { border-color: var(--hairline); color: var(--cream); }
:root[data-theme="dark"] .btn--ink::before { background: var(--cream); }
:root[data-theme="dark"] .btn--ink:hover { color: var(--ink); border-color: var(--cream); }

.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 0.3rem; }
.form-note { font-size: 0.82rem; color: var(--cream-faint); }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: var(--z-content); }
.site-footer .wrap { padding-block: clamp(2.8rem, 6vw, 4.2rem) 2.2rem; }
.foot-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.6rem; padding-bottom: 2rem;
}
.foot-mark { display: inline-flex; align-items: center; gap: 0.9rem; text-decoration: none; }
.foot-mark > span:last-child { font-family: var(--serif); font-size: 1.22rem; font-weight: 450; color: var(--cream); }
.foot-socials { display: flex; align-items: center; gap: 0.4rem; }
.foot-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--hairline-2); border-radius: 4px;
  color: var(--cream-dim);
  transition: color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft), background-color 0.3s var(--ease-soft);
}
.foot-socials a:hover { color: var(--ink); background: var(--cream); border-color: var(--cream); }
.foot-socials .ic { width: 18px; height: 18px; }
.foot-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.6rem 1.6rem; padding-top: 1.6rem; border-top: 1px solid var(--hairline-2);
  font-size: 0.82rem; color: var(--cream-faint);
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.5em 1.4em; }
.foot-nav a { text-decoration: none; color: var(--cream-faint); transition: color 0.25s; }
.foot-nav a:hover { color: var(--accent-hi); }
