/* ==========================================================================
   zacbatten.me — site.css

   Minimal by design. The work is shown, not described.
   A faint animated contour field sits behind the homepage name; everything
   else is hairlines, type, and space.

   Rules that keep it disciplined:
   - THREE colours, each with one job. --lime = you, action, foreground.
     --blue = data, system, terrain. --amber = live status only. Never decorative.
   - Hairlines, never heavy borders. Depth comes from restraint, not shadow.
   - Never claim a pseudo-element twice: a section-level ::after merges with
     the band rule that already uses it.
   - One layout primitive: --pad-x. Every band shares one left and right edge.
   - Three breakpoints: 1200 / 900 / 640.
   - 12px type floor. Cut a label rather than shrink it.
   - Motion is budgeted: at most two moving things per viewport, all of it
     disabled under prefers-reduced-motion.
   - No override layers. Edit the rule.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: dark;

  --ink: #eef1ea;
  --soft: #c3cabd;
  --muted: #8f998d;

  --paper: #0a0f0d;
  --panel: #121917;
  --panel-2: #172020;
  --media-bg: #101715;

  --line: rgba(238, 241, 234, 0.11);
  --line-2: rgba(238, 241, 234, 0.2);
  --rule: rgba(238, 241, 234, 0.07);

  /* Three jobs, three colours. */
  --lime: #c3f14f;          /* you, action, foreground */
  --lime-ink: #0a1200;
  --lime-dim: rgba(195, 241, 79, 0.34);
  --lime-tint: rgba(195, 241, 79, 0.07);
  --blue: #6cc2e8;          /* data, system, terrain */
  --amber: #f2b155;         /* live status only */

  --terrain-line: rgba(108, 194, 232, 0.17);
  --terrain-peak: rgba(195, 241, 79, 0.2);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --fs-label: 0.75rem;
  --fs-small: 0.8125rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.1875rem;
  --fs-h3: 1.3125rem;
  --fs-h2: clamp(1.875rem, 1.2rem + 2.4vw, 3.25rem);
  --fs-h1: clamp(2.375rem, 1.3rem + 4vw, 4.5rem);

  --measure: 1180px;
  --gutter: 24px;
  --pad-x: max(var(--gutter), calc((100% - var(--measure)) / 2));
  --band-y: clamp(64px, 8vw, 132px);

  --radius: 3px;
  --radius-sm: 2px;
  --ease: cubic-bezier(0.22, 0.68, 0.15, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --ink: #11150f;
  --soft: #2e332a;
  --muted: #5c6459;
  --paper: #f1f2ec;
  --panel: #ffffff;
  --panel-2: #e7e9e0;
  --media-bg: #e9ebe2;
  --line: rgba(17, 21, 15, 0.14);
  --line-2: rgba(17, 21, 15, 0.26);
  --rule: rgba(17, 21, 15, 0.1);
  --lime: #41660f;
  --lime-ink: #ffffff;
  --lime-dim: rgba(65, 102, 15, 0.36);
  --lime-tint: rgba(65, 102, 15, 0.07);
  --blue: #175c79;
  --amber: #8a5407;
  --terrain-line: rgba(23, 92, 121, 0.13);
  --terrain-peak: rgba(65, 102, 15, 0.15);
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Deliberately NOT overflow-x: hidden — that makes body a scroll container in
     several browsers and breaks position: sticky on the header. The only thing
     that can overflow horizontally is the hero's terrain layer, and .home-hero
     clips that itself. */
}

body > main {
  flex: 1 0 auto;
  position: relative;
}

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

img {
  height: auto;
}

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

a {
  color: var(--ink);
  text-decoration-color: var(--lime-dim);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: var(--lime);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
  line-height: 1.22;
}
h4 {
  font-size: 1.0625rem;
  line-height: 1.3;
}

p {
  text-wrap: pretty;
}

ul,
ol {
  padding-left: 1.15em;
}

li + li {
  margin-top: 0.42em;
}

li::marker {
  color: var(--lime-dim);
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

code {
  color: var(--blue);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 36px 0;
}

::selection {
  background: var(--lime);
  color: var(--lime-ink);
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 100;
  padding: 11px 18px;
  background: var(--lime);
  color: var(--lime-ink);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 14px;
}

/* --------------------------------------------------------------------------
   3. Layout primitive
   -------------------------------------------------------------------------- */

.site-header,
.site-footer,
main > section,
main > nav,
main > div {
  padding-inline: var(--pad-x);
}

main > section {
  position: relative;
  padding-block: var(--band-y);
}

/* Adjacent bands were paying the full pad twice (up to 264px between them). */
main > section + section {
  padding-block-start: calc(var(--band-y) * 0.72);
}

main > section + section::before {
  /* Hairline between bands. */
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: var(--rule);
}

.section-heading {
  position: relative;
  max-width: 64ch;
  display: grid;
  gap: 14px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section-heading > p:last-child {
  color: var(--muted);
  font-size: var(--fs-lead);
  max-width: 54ch;
}

/* Mono micro-label. 12px floor, always. */
.eyebrow,
.resume-kicker,
.note-kicker,
.what-built-label,
.dock-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--lime);
  flex: none;
}

.eyebrow:has(.live-dot)::before {
  display: none;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  display: inline-block;
  flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .live-dot {
    animation: pulse 2.4s var(--ease) infinite;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* --------------------------------------------------------------------------
   4. Scroll reveal
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }

  [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  /* Stagger steps. Kept as data attributes rather than inline styles so the
     HTML quality check stays clean and the rhythm lives in one place. */
  [data-reveal-delay="1"] { --reveal-delay: 90ms; }
  [data-reveal-delay="2"] { --reveal-delay: 170ms; }
  [data-reveal-delay="3"] { --reveal-delay: 250ms; }
  [data-reveal-delay="4"] { --reveal-delay: 330ms; }
  [data-reveal-delay="5"] { --reveal-delay: 400ms; }
  [data-reveal-delay="6"] { --reveal-delay: 470ms; }

  /* Headline wipe: the display type draws itself in. */
  [data-reveal="wipe"] {
    transform: none;
    clip-path: inset(0 0 105% 0);
    opacity: 1;
    transition: clip-path 0.9s var(--ease-out);
  }

  [data-reveal="wipe"].is-in {
    clip-path: inset(0 0 -12% 0);
  }
}

@media (max-width: 1439px) {}

/* --------------------------------------------------------------------------
   6. Header + navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--paper) 93%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--lime);
  color: var(--lime-ink);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 0.35s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-90deg);
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy > span:first-child {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav > a {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--soft);
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}

.nav > a::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 3px;
  width: calc(100% - 24px);
  height: 1px;
  background: var(--lime);
  scale: 0 1;
  transform-origin: left;
  transition: scale 0.3s var(--ease);
}

.nav > a:hover {
  color: var(--ink);
}

.nav > a:hover::after {
  scale: 1 1;
}

.nav > a[aria-current="page"],
.nav > a[aria-current="location"],
.nav-group.is-active > .nav-group-toggle {
  color: var(--ink);
  font-weight: 700;
}

.nav > a[aria-current="page"]::after,
.nav > a[aria-current="location"]::after,
.nav-group.is-active > .nav-group-toggle::after {
  scale: 1 1;
}

.nav .nav-cta {
  margin-left: 6px;
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 700;
  transition: background-color 0.18s var(--ease);
}

.nav .nav-cta:hover {
  background: var(--ink);
  color: var(--paper);
}

.nav .nav-cta::after {
  display: none;
}

.nav .nav-utility {
  color: var(--muted);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--soft);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--lime-dim);
  background: var(--lime-tint);
  color: var(--lime);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
  padding: 9px 13px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   7. Buttons + links
   -------------------------------------------------------------------------- */

/* Hover fill wipes left to right. Done with background-position rather than a
   pseudo-element: a ::before at z-index -1 would paint *behind* the button's
   own background and never be seen, and raising it above would cover the label
   (there is no wrapper span to lift). */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  background-repeat: no-repeat;
  background-size: 200% 100%;
  background-position: 100% 0;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease),
    background-position 0.4s var(--ease);
}

.button.primary {
  background-color: var(--lime);
  background-image: linear-gradient(to right, var(--ink) 0 50%, transparent 50%);
  color: var(--lime-ink);
}

.button.primary:hover {
  background-position: 0 0;
  color: var(--paper);
}

.button.secondary,
.button.ghost {
  background-color: transparent;
  background-image: linear-gradient(to right, var(--lime) 0 50%, transparent 50%);
  border-color: var(--line-2);
  color: var(--ink);
}

.button.secondary:hover,
.button.ghost:hover {
  background-position: 0 0;
  border-color: var(--lime);
  color: var(--lime-ink);
}

.button.ghost {
  border-color: transparent;
  border-bottom-color: var(--line-2);
  border-radius: 0;
  padding-inline: 6px;
}

.button:active {
  translate: 0 1px;
}

/* Bracketed link: [ label ↗ ] on hover. */
.text-link,
.build__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--lime-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    gap 0.2s var(--ease);
}

.text-link::after,
.build__links a::after {
  content: "\2197";
  font-size: 0.9em;
  translate: 0 0;
  transition: translate 0.25s var(--ease);
}

.text-link:hover,
.build__links a:hover {
  color: var(--lime);
  border-color: var(--lime);
  gap: 10px;
}

.text-link:hover::after,
.build__links a:hover::after {
  translate: 2px -2px;
}

.hero-actions,
.next-step-actions,
.resume-header-actions,
.build__links,
.movie-library-system-actions,
.traverse-demo-actions,
.demo-checklist__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

/* --------------------------------------------------------------------------
   8. Home hero
   -------------------------------------------------------------------------- */

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Short enough that the first project peeks above the fold. */
  min-height: min(66vh, 660px);
  display: grid;
  align-content: center;
  padding-block: clamp(64px, 8vw, 112px);
}

.terrain {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  mask-image: radial-gradient(120% 90% at 62% 46%, #000 4%, transparent 70%);
  pointer-events: none;
}

.hero-copy {
  display: grid;
  gap: clamp(18px, 2vw, 26px);
  justify-items: start;
}

.home-hero h1 {
  font-size: clamp(3rem, 1.2rem + 7vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

@supports (-webkit-text-stroke: 1px currentColor) {}

@supports not (-webkit-text-stroke: 1px currentColor) {}

.hero-role {
  font-size: clamp(1.0625rem, 0.95rem + 0.55vw, 1.3125rem);
  color: var(--soft);
  max-width: 34ch;
}

@media (prefers-reduced-motion: no-preference) {}

/* Inner-page hero */
.section-heading h1 {
  font-size: var(--fs-h1);
}

.page-breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  padding-block: 22px 0;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.page-breadcrumb a:hover {
  color: var(--lime);
}

.page-breadcrumb [aria-current],
.page-breadcrumb > span:last-child {
  color: var(--soft);
}

 — the homepage project component
   -------------------------------------------------------------------------- */

.builds {
  display: grid;
  gap: clamp(44px, 5.5vw, 78px);
}

.build {
  display: grid;
  /* The screenshot is the point; give it the wider column. */
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 52px);
  align-items: center;
}

/* Every project row reads the same way: image left, text right. Rows used to
   alternate sides, which reads as disorder once a row has no image. */
.build__shot {
  position: relative;
  display: block;
  margin: 0;
  background: var(--media-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}

.build:hover .build__shot {
  border-color: var(--line-2);
}

.build__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.9);
  transition: transform 0.8s var(--ease-out), filter 0.5s var(--ease);
}

.build:hover .build__shot img {
  transform: scale(1.03);
  filter: saturate(1.05);
}

/* No screenshot yet: the left column stays empty so the text still lines up
   with every other row, and a hairline marks it as a lighter tier. */
.build--text {
  padding-top: clamp(20px, 2.5vw, 32px);
  border-top: 1px solid var(--line);
}

.build--text .build__spec {
  grid-column: 2;
  max-width: 52ch;
}

.build__spec {
  display: grid;
  gap: 14px;
  align-content: center;
  justify-items: start;
  min-width: 0;
}

.build__spec h3 {
  font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.125rem);
  letter-spacing: -0.032em;
}

.build__spec > p {
  color: var(--muted);
  max-width: 44ch;
  margin: 0;
}

/* Spec table — the "instrument readout" for each project. */
.spec {
  display: grid;
  gap: 0;
  width: 100%;
  margin: 0;
  border-top: 1px solid var(--line);
}

.spec > div {
  display: grid;
  grid-template-columns: minmax(0, 92px) minmax(0, 1fr);
  gap: 16px;
  padding-block: 11px;
  border-bottom: 1px solid var(--line);
}

.spec dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

.spec dd {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--soft);
}

.spec dd code {
  color: var(--blue);
}

/* --------------------------------------------------------------------------
   10. Minimal page components
   -------------------------------------------------------------------------- */

/* Page title band: just the word. */
.page-hero {
  padding-block: clamp(72px, 10vw, 150px) clamp(24px, 3vw, 44px);
}

.page-hero h1 {
  font-size: clamp(2.75rem, 1.4rem + 5vw, 5.5rem);
  letter-spacing: -0.04em;
}

/* One supporting line under a page title. */
.page-lede {
  margin-top: clamp(14px, 1.6vw, 22px);
  max-width: 46ch;
  font-size: var(--fs-lead);
  color: var(--soft);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-top: clamp(20px, 2.2vw, 30px);
}

/* .text-link is written for anchors; strip the UA button chrome so a button
   sitting beside them is visually identical. */
button.text-link {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--lime-dim);
  padding: 0 0 2px;
  cursor: pointer;
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 700;
}

/* Small mono section label with a hairline running to the edge. */
.section-label {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: clamp(32px, 4vw, 56px);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Hero on the homepage: name, one line, three links. */
.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  min-width: min(100%, 30ch);
}

.hero-links span {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--muted);
}

.hero-links a {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.hero-links a:hover {
  color: var(--lime);
  border-color: var(--lime-dim);
}

/* Definition rows used for skills, contact details, project meta. */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  margin: 0;
  border-top: 1px solid var(--line);
}

.facts > div {
  display: grid;
  gap: 5px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  color: var(--soft);
}

.facts dd a {
  color: var(--soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

.facts dd a:hover {
  color: var(--lime);
  border-color: var(--lime);
}

/* Plain index list: name on the left, category on the right. */
.index-list {
  display: grid;
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.index-list li {
  margin: 0;
}

.index-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 0.2s var(--ease), padding-inline 0.25s var(--ease);
}

.index-list a > span:first-child {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.index-list a > span:last-child {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.index-list a:hover {
  color: var(--lime);
  padding-inline: 10px 0;
}

.index-list a:hover > span:last-child {
  color: var(--lime);
}

.work-more {
  margin-top: clamp(28px, 3vw, 44px);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 240px);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  margin-bottom: clamp(36px, 4vw, 60px);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
}

.contact-links a {
  justify-self: start;
  color: var(--soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

.contact-links a:hover {
  color: var(--lime);
  border-color: var(--lime);
}

/* --------------------------------------------------------------------------
   11. Cards
   -------------------------------------------------------------------------- */

.about-card-grid,
.movie-library-system-grid,
.movie-library-tech-grid,
.movie-control-grid,
.traverse-workflow-grid,
.traverse-report-grid,
.resume-projects {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 282px), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-card,
.resume-card,
.what-built-card,
.demo-checklist,
.next-step-panel,
.traverse-demo-panel,
.movie-list-preview,
.error-page-content {
  position: relative;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
  transition: border-color 0.28s var(--ease), background-color 0.28s var(--ease),
    translate 0.28s var(--ease);
}

.project-bullets {
  color: var(--muted);
  font-size: var(--fs-small);
}

.about-card,
.what-built-card {
  display: grid;
  gap: 11px;
  align-content: start;
}

.about-card h3 {
  font-size: 1.125rem;
}

.about-card p,
.what-built-card p {
  color: var(--muted);
  font-size: var(--fs-small);
}

/* Chips */
.provider-badge,
.traverse-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.movie-list-stats,
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* --------------------------------------------------------------------------
   12. Panels
   -------------------------------------------------------------------------- */

.contact-section {
  position: relative;
  background: var(--panel);
  overflow: hidden;
}

.contact-panel {
  display: grid;
  gap: clamp(24px, 3vw, 40px);
  justify-items: start;
}

.contact-section h2 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  letter-spacing: -0.035em;
}

.next-step-panel {
  display: grid;
  gap: 18px;
  padding: 30px;
}

.next-step-panel h2 {
  font-size: 1.625rem;
}

.next-step-panel p {
  color: var(--muted);
}

label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-size: var(--fs-body);
  transition: border-color 0.2s var(--ease);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--lime);
  outline-offset: 1px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   14. Two-column page layouts
   -------------------------------------------------------------------------- */

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}

.movie-library-page,
.stream-page,
.traverse-demo-page {
  padding-inline: 0;
}

.movie-list-copy,
.traverse-demo-hero-copy {
  display: grid;
  gap: 16px;
  max-width: 68ch;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   15. Resume
   -------------------------------------------------------------------------- */

.resume-lede {
  max-width: 60ch;
  font-size: var(--fs-lead);
  color: var(--soft);
}

.resume-items {
  display: grid;
  border-top: 1px solid var(--line);
}

.resume-item {
  display: grid;
  gap: 12px;
  padding-block: clamp(20px, 2.4vw, 30px);
  border-bottom: 1px solid var(--line);
}

/* Title left, role right — the pattern people scan a resume with. */
.resume-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
}

.resume-item__head h3 {
  font-size: 1.125rem;
}

.resume-item__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.resume-list {
  display: grid;
  gap: 8px;
  max-width: 78ch;
  color: var(--soft);
  font-size: var(--fs-small);
}

.resume-item > p {
  color: var(--soft);
  font-size: var(--fs-small);
}

.resume-item .build__links {
  gap: 12px 22px;
}
   20. 404
   -------------------------------------------------------------------------- */

.error-page-content {
  display: grid;
  gap: 18px;
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   21. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 40px;
  border-top: 1px solid var(--line);
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-meta {
  color: var(--muted);
  font-size: var(--fs-small);
}

/* --------------------------------------------------------------------------
   23. Breakpoints — three, and only three.
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  .contact-layout,
  .resume-layout,
  .resume-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-sidebar {
    position: static;
    top: auto;
  }

  .build {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  /* Single column: the empty-left-column trick must not create a phantom
     second track. */
  .build--text .build__spec {
    grid-column: 1;
    max-width: none;
  }

}

@media (max-width: 900px) {
  :root {
    --gutter: 20px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    /* --gutter, not --pad-x: absolutely positioned inside the header's padding
       box, so --pad-x would apply the page gutter a second time. */
    padding: 14px var(--gutter) 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .site-header.nav-open .nav {
    display: flex;
  }

  .nav > a {
    padding: 13px 14px;
    font-size: var(--fs-body);
  }

  .nav > a::after {
    left: 0;
    bottom: auto;
    top: 50%;
    translate: 0 -50%;
    width: 2px;
    height: 22px;
    scale: 1 0;
  }

  .nav > a:hover::after,
.nav > a[aria-current="page"]::after,
.nav > a[aria-current="location"]::after,
.nav-group.is-active > .nav-group-toggle::after {
    scale: 1 1;
  }

  .nav .nav-cta {
    justify-content: center;
    text-align: center;
    margin: 8px 0 0;
  }

  .home-hero {
    min-height: 0;
  }



  .about-portrait {
    max-width: 240px;
  }


  .footer-meta {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 18px;
    --fs-body: 1rem;
  }

  .home-hero h1 {
    letter-spacing: -0.035em;
  }

  .about-card,
.next-step-panel,
.resume-card {
    padding: 19px;
  }

  .hero-actions .button,
  .next-step-actions .button {
    flex: 1 1 100%;
  }

  .spec > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

}

/* --------------------------------------------------------------------------
   24. Motion + print
   -------------------------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  :root {
    --ink: #000;
    --soft: #222;
    --muted: #444;
    --paper: #fff;
    --panel: #fff;
    --panel-2: #fff;
    --line: #bbb;
    --line-2: #999;
    --rule: #ddd;
    --lime: #000;
    --lime-ink: #fff;
    --lime-tint: transparent;
    --lime-dim: #999;
    --blue: #333;
    --band-y: 0;
    --pad-x: 0;
  }

  .site-header,
.site-footer,
.theme-toggle,
.nav,
.nav-toggle,
.skip-link,
.page-breadcrumb,
.contact-section,
.next-step-panel,
.terrain,
.about-portrait {
    display: none !important;
  }

  body {
    font-size: 11pt;
  }

  main > section {
    padding-block: 12pt;
  }

  main > section + section::before {
    display: none;
  }

  a {
    text-decoration: none;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .resume-card,
  .resume-item,
  .build {
    break-inside: avoid;
  }
}

/* --------------------------------------------------------------------------
   Demo grid (Lab)
   -------------------------------------------------------------------------- */

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 2.5vw, 34px);
}

.demo-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.demo-card__shot {
  display: block;
  background: var(--media-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}

.demo-card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.9);
  transition: transform 0.7s var(--ease-out), filter 0.4s var(--ease);
}

.demo-card:hover .demo-card__shot {
  border-color: var(--line-2);
}

.demo-card:hover .demo-card__shot img {
  transform: scale(1.03);
  filter: saturate(1.05);
}

.demo-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.demo-card__meta h3 {
  font-size: 1.0625rem;
}

.demo-card__meta span {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.lab-extra {
  margin-top: clamp(32px, 4vw, 52px);
}

/* --------------------------------------------------------------------------
   Portfolio refresh
   -------------------------------------------------------------------------- */

.site-header {
  min-height: 76px;
  border-bottom-color: var(--rule);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.nav {
  gap: 4px;
}

.home-hero {
  min-height: clamp(610px, calc(100svh - 76px), 820px);
  padding-block: clamp(52px, 5vw, 76px) clamp(42px, 4.5vw, 68px);
  background:
    radial-gradient(circle at 76% 35%, color-mix(in srgb, var(--blue) 9%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--paper) 94%, var(--lime)), var(--paper));
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
  opacity: 0.45;
}

.home-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: clamp(44px, 9vw, 150px);
  width: 100%;
}

.home-hero .hero-copy {
  max-width: 760px;
  gap: clamp(20px, 2.5vw, 30px);
}

.home-hero h1 {
  max-width: 13ch;
  font-size: clamp(3.65rem, 1.9rem + 3.65vw, 6.4rem);
  line-height: 0.94;
  letter-spacing: -0.064em;
}

.home-hero .hero-role {
  max-width: 53ch;
  font-size: clamp(1.08rem, 0.98rem + 0.45vw, 1.3rem);
  line-height: 1.55;
  color: var(--soft);
}

.home-hero .hero-actions {
  gap: 12px;
}

.home-hero .hero-actions .button {
  min-height: 50px;
  padding-inline: 20px;
}

.home-hero .hero-links {
  min-width: 0;
  width: min(100%, 560px);
  padding-top: 18px;
}

.hero-links span strong {
  color: var(--soft);
  font-weight: 500;
}

.hero-signal {
  display: grid;
  gap: 18px;
  align-self: end;
  max-width: 330px;
  padding: 20px;
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 24px 70px color-mix(in srgb, #000 18%, transparent);
  backdrop-filter: blur(14px);
}

.signal-label,
.feature-card__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.signal-project {
  display: grid;
  gap: 12px;
}

.signal-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.signal-project strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.signal-project p,
.contact-panel__side > p {
  color: var(--muted);
  font-size: var(--fs-small);
}

.signal-project .text-link {
  justify-self: start;
  margin-top: 2px;
}

.signal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.signal-tags li,
.tag-list li {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.2;
}

.hero-scroll {
  position: absolute;
  right: var(--pad-x);
  bottom: 42px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero-scroll span {
  color: var(--lime);
  font-size: 1.2rem;
}

.home-work-section {
  padding-block: clamp(78px, 8vw, 126px);
}

.home-work-section .section-heading {
  max-width: 720px;
  margin-bottom: clamp(38px, 5vw, 68px);
}

.home-work-section .section-heading h2 {
  max-width: 17ch;
  font-size: clamp(2.2rem, 1.55rem + 2.7vw, 4.4rem);
  line-height: 1;
}

.home-work-section .section-heading > p:last-child {
  max-width: 54ch;
  margin-top: 4px;
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  display: grid;
  grid-column: span 4;
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.25s var(--ease), transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.feature-card--wide {
  grid-column: span 8;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.feature-card--wide .feature-card__media {
  min-height: 100%;
  aspect-ratio: auto;
}

.feature-card--wide .feature-card__body {
  align-content: center;
  min-height: 420px;
}

.feature-card:hover {
  border-color: var(--line-2);
  box-shadow: 0 22px 56px color-mix(in srgb, #000 13%, transparent);
  transform: translateY(-4px);
}

.feature-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--media-bg);
}

.feature-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.88);
  transition: filter 0.45s var(--ease), transform 0.65s var(--ease-out);
}

.feature-card:hover .feature-card__media img {
  filter: saturate(1.05);
  transform: scale(1.035);
}

.feature-card__body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 220px;
  padding: clamp(20px, 2.2vw, 30px);
}

.feature-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.65rem;
}

.feature-card__meta span:last-child {
  text-align: right;
  color: var(--blue);
}

.feature-card__body h3 {
  font-size: clamp(1.45rem, 1.2rem + 0.65vw, 2rem);
  letter-spacing: -0.04em;
}

.feature-card__body > p {
  max-width: 48ch;
  color: var(--muted);
  font-size: var(--fs-small);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  color: var(--muted);
  font-size: 0.62rem;
}

.feature-card__links {
  margin-top: auto;
  padding-top: 8px;
}

.feature-card--note {
  position: relative;
  background: linear-gradient(145deg, var(--panel), color-mix(in srgb, var(--blue) 8%, var(--panel)));
}

.feature-card--note::before {
  content: "↗";
  position: absolute;
  right: 20px;
  bottom: -34px;
  color: var(--blue);
  font-family: var(--font-display);
  font-size: 10rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.055;
  pointer-events: none;
}

.feature-card--lab {
  background: linear-gradient(145deg, color-mix(in srgb, var(--lime) 10%, var(--panel)), var(--panel));
}

.feature-card--lab::before {
  content: "✦";
  color: var(--lime);
}

.feature-card--note .feature-card__body {
  position: relative;
  z-index: 1;
}

.work-more {
  margin-top: 28px;
}

.work-more .button {
  min-height: 44px;
}

.contact-section {
  background: linear-gradient(135deg, var(--panel), color-mix(in srgb, var(--blue) 8%, var(--panel)));
}

.contact-panel {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
  align-items: end;
  gap: clamp(32px, 9vw, 140px);
  max-width: 1120px;
}

.contact-section h2 {
  max-width: 11ch;
  font-size: clamp(2.6rem, 1.6rem + 4.5vw, 6rem);
  line-height: 0.95;
}

.contact-panel__side {
  display: grid;
  gap: 22px;
  max-width: 340px;
}

.contact-links {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.contact-links a {
  padding-bottom: 4px;
}

.about-snapshot {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.about-snapshot__mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: var(--lime);
  color: var(--lime-ink);
  border-radius: 14px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.about-snapshot > div {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.about-snapshot > div span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.about-snapshot > div strong {
  font-size: var(--fs-small);
}

.about-snapshot__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
}

.about-layout {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.55fr);
}

.about-prose {
  display: grid;
  gap: 18px;
  max-width: 66ch;
  font-size: clamp(1.02rem, 0.98rem + 0.18vw, 1.12rem);
}

.about-prose p {
  color: var(--soft);
}

.demo-card__shot {
  position: relative;
  border-radius: 14px;
}

.demo-card__shot::after {
  content: "Open ↗";
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--lime-ink);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.demo-card:hover .demo-card__shot::after,
.demo-card:focus-within .demo-card__shot::after {
  opacity: 1;
  transform: none;
}

.demo-card__meta h3 {
  font-size: 1.12rem;
}

@media (max-width: 900px) {
  .home-hero {
    min-height: auto;
    padding-block: 78px 66px;
  }

  .home-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .hero-signal {
    max-width: 420px;
  }

  .hero-scroll {
    position: static;
    margin-top: 46px;
  }

  .feature-card,
  .feature-card--wide {
    grid-column: span 6;
  }

  .feature-card--wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-card--wide .feature-card__media {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .feature-card--wide .feature-card__body {
    align-content: start;
    min-height: 220px;
  }

  .feature-card--note:last-child {
    grid-column: span 6;
  }

  .contact-panel {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 32px;
  }

  .about-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-snapshot {
    max-width: 420px;
  }
}

@media (max-width: 640px) {
  .home-hero h1 {
    max-width: 9ch;
    font-size: clamp(3.25rem, 15vw, 5rem);
  }

  .home-hero .hero-actions .button {
    flex: 1 1 100%;
  }

  .hero-signal {
    display: none;
  }

  .hero-scroll {
    display: none;
  }

  .home-hero {
    padding-block: 60px 52px;
  }

  .feature-card,
  .feature-card--wide,
  .feature-card--note:last-child {
    grid-column: 1 / -1;
  }

  .feature-card__body {
    min-height: 0;
  }

  .feature-card__meta {
    flex-wrap: wrap;
  }

  .demo-card__shot::after {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Demo-page + placeholder rules
   Recovered after an over-wide delete during the resume rewrite; these are
   still used by movie-night, movie-library, traverseops-demo and about.
   -------------------------------------------------------------------------- */

.changelog-meta,
.build-log-meta,
.lab-takeaway,
.ownership-note,
.bot-note,
.footer-note,
.traverse-demo-note,
.movie-search-hint {
  color: var(--muted);
  font-size: var(--fs-small);
}

.lab-takeaway,
.ownership-note,
.bot-note {
  padding: 15px 17px;
  border-left: 2px solid var(--lime);
  background: var(--lime-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.architecture-svg-card,
.moviebot-flow-diagram,
.traverse-architecture,
.bot-flow {
  display: grid;
  gap: 16px;
  overflow-x: auto;
}

.embed-shell,
.twitch-shell,
.chat-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--media-bg);
}

.embed-shell iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.about-portrait__placeholder {
  display: grid;
  place-content: center;
  gap: 5px;
  height: 100%;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px dashed var(--line-2);
}

.about-portrait__placeholder small {
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.7;
}

.project-status-list,
.detail-list {
  display: grid;
  gap: 9px;
  color: var(--soft);
  font-size: var(--fs-small);
}

/* ==========================================================================
   Coastal field-note redesign — August 2026

   A warm paper surface, Atlantic-blue ink, compact project cards, and quiet
   cartographic details. This layer deliberately keeps every established page
   and demo on the same token system while giving the portfolio a new voice.
   ========================================================================== */

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #0b2342;
  --soft: #243b59;
  --muted: #66758a;
  --paper: #f8f6f1;
  --panel: #fffefa;
  --panel-2: #eef2f2;
  --media-bg: #edf2f6;
  --line: rgba(31, 67, 111, 0.16);
  --line-2: rgba(31, 67, 111, 0.3);
  --rule: rgba(31, 67, 111, 0.1);
  --lime: #1767d8;
  --lime-ink: #ffffff;
  --lime-dim: rgba(23, 103, 216, 0.28);
  --lime-tint: rgba(23, 103, 216, 0.07);
  --blue: #1767d8;
  --amber: #e7a51a;
  --terrain-line: rgba(52, 103, 167, 0.16);
  --terrain-peak: rgba(52, 103, 167, 0.12);
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --measure: 1480px;
  --gutter: clamp(18px, 4vw, 64px);
  --pad-x: var(--gutter);
  --band-y: clamp(58px, 7vw, 104px);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-paper: 0 18px 54px rgba(31, 44, 59, 0.13);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2eee4;
  --soft: #d1d8df;
  --muted: #9ca9b5;
  --paper: #09182a;
  --panel: #10243a;
  --panel-2: #142c45;
  --media-bg: #132a42;
  --line: rgba(207, 223, 239, 0.15);
  --line-2: rgba(207, 223, 239, 0.3);
  --rule: rgba(207, 223, 239, 0.1);
  --lime: #72a9ff;
  --lime-ink: #061326;
  --lime-dim: rgba(114, 169, 255, 0.33);
  --lime-tint: rgba(114, 169, 255, 0.09);
  --blue: #72a9ff;
  --amber: #f2b84b;
  --terrain-line: rgba(150, 190, 231, 0.15);
  --terrain-peak: rgba(150, 190, 231, 0.1);
  --shadow-paper: 0 18px 54px rgba(0, 0, 0, 0.32);
}

html {
  scroll-padding-top: 112px;
}

body {
  min-width: 0;
  background: #e8e8e5;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  padding: 18px;
}

:root[data-theme="dark"] body {
  background: #06111e;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.72), transparent 58%);
}

a {
  color: inherit;
  text-decoration-color: var(--lime-dim);
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--lime);
}

::selection {
  color: #fff;
  background: #1767d8;
}

.skip-link {
  z-index: 1000;
  border-radius: 0 0 8px 8px;
  background: var(--ink);
  color: var(--paper);
}

.site-header,
.home-page,
main:not(.home-page),
.site-footer {
  width: min(100%, var(--measure));
  margin-inline: auto;
  background: var(--paper);
  border-inline: 1px solid rgba(255, 255, 255, 0.7);
}

.site-header {
  position: sticky;
  top: 18px;
  z-index: 100;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 92px;
  padding: 18px clamp(24px, 4vw, 50px);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 28px rgba(31, 44, 59, 0.04);
  transition: min-height 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  min-height: 72px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  box-shadow: 0 12px 30px rgba(31, 44, 59, 0.09);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  min-width: 64px;
  height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(11, 35, 66, 0.14);
}

.brand:hover .brand-mark {
  transform: translateY(-1px);
}

.brand-copy {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 3.4vw, 54px);
  min-width: 0;
}

.nav a {
  position: relative;
  padding: 7px 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav a:hover::after,
.nav a[aria-current]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav .nav-utility,
.nav .nav-cta {
  display: none;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--lime-tint);
}

.theme-toggle svg {
  width: 23px;
  height: 23px;
}

:root:not([data-theme="dark"]) .icon-moon,
:root[data-theme="light"] .icon-moon,
:root[data-theme="dark"] .icon-sun {
  display: block;
}

:root:not([data-theme="dark"]) .icon-sun,
:root[data-theme="light"] .icon-sun,
:root[data-theme="dark"] .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
}

.home-page,
main:not(.home-page) {
  overflow: hidden;
}

.home-hero {
  position: relative;
  min-height: 610px;
  padding: clamp(58px, 7vw, 104px) clamp(26px, 6.2vw, 92px) 40px;
  overflow: hidden;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--paper) 97%, transparent) 0 42%, transparent 72%),
    var(--paper);
}

.terrain {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  pointer-events: none;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent 48%, rgba(0, 0, 0, 0.55));
}

.home-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  align-items: center;
  gap: clamp(36px, 6vw, 90px);
}

.hero-copy {
  width: 100%;
  max-width: 760px;
}

.eyebrow,
.section-label,
.feature-card__meta,
.hero-coordinates {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.home-hero h1 {
  max-width: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(4.75rem, 8.1vw, 8.2rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.065em;
}

.hero-tagline {
  margin-top: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2.25vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.04em;
}

.hero-tagline span:first-child {
  color: var(--lime);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.24em;
}

.hero-tagline span:last-child {
  color: var(--amber);
}

.hero-role {
  max-width: 530px;
  margin-top: 20px;
  color: var(--soft);
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  line-height: 1.7;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 20px rgba(11, 35, 66, 0.18);
}

.button.primary:hover {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
  box-shadow: 0 14px 24px rgba(11, 35, 66, 0.23);
}

.button.secondary,
.button.ghost {
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.button.secondary:hover,
.button.secondary:focus-visible,
.button.ghost:hover,
.button.ghost:focus-visible {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
}

.hero-coordinates {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--soft);
}

.hero-coordinates span {
  color: var(--ink);
  font-size: 1.2rem;
}

.coastal-scene {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  color: var(--ink);
  isolation: isolate;
}

.coastal-scene::before {
  position: absolute;
  content: "";
  pointer-events: none;
}

.coastal-scene::before {
  inset: 10% 2% 14% 8%;
  z-index: -2;
  border-radius: 50%;
  background: repeating-radial-gradient(ellipse at 65% 48%, transparent 0 28px, var(--terrain-line) 29px 30px);
  opacity: 0.72;
}

.cliff {
  position: absolute;
  right: 1%;
  bottom: 48px;
  width: 71%;
  height: 145px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 74%, transparent);
  border-bottom: 0;
  background:
    repeating-linear-gradient(108deg, transparent 0 32px, var(--terrain-line) 33px 34px),
    color-mix(in srgb, var(--paper) 82%, #dfe9f1);
  clip-path: polygon(0 100%, 9% 78%, 20% 74%, 28% 39%, 43% 33%, 52% 18%, 63% 20%, 71% 9%, 82% 17%, 100% 0, 100% 100%);
}

.lighthouse {
  position: absolute;
  right: 28%;
  bottom: 162px;
  z-index: 3;
  width: 86px;
  height: 176px;
}

.lighthouse-light {
  position: absolute;
  top: 17px;
  left: 50%;
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent);
  opacity: 0.48;
  transform: translateY(-50%) rotate(-8deg);
  transform-origin: left;
}

.lighthouse-roof {
  position: absolute;
  top: 0;
  left: 25px;
  width: 38px;
  height: 20px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.lighthouse-room {
  position: absolute;
  top: 18px;
  left: 26px;
  width: 36px;
  height: 25px;
  border: 1.5px solid var(--ink);
  background: repeating-linear-gradient(90deg, var(--paper) 0 7px, var(--ink) 8px 9px);
}

.lighthouse-tower {
  position: absolute;
  top: 40px;
  left: 17px;
  width: 52px;
  height: 132px;
  border: 1.5px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 47%, var(--line-2) 48% 51%, transparent 52%),
    var(--paper);
  clip-path: polygon(26% 0, 74% 0, 100% 100%, 0 100%);
}

.scene-bird {
  position: absolute;
  color: color-mix(in srgb, var(--lime) 72%, var(--ink));
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  transform: rotate(-10deg) scaleX(1.5);
}

.bird-one { top: 9%; left: 12%; }
.bird-two { top: 18%; left: 25%; transform: rotate(8deg) scale(0.72) scaleX(1.5); }
.bird-three { top: 7%; right: 27%; transform: rotate(8deg) scale(0.55) scaleX(1.5); }

.scene-waves {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 2%;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 8%;
  height: 48px;
  overflow: hidden;
  color: var(--lime);
}

.scene-waves span {
  width: 68px;
  height: 18px;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.56;
}

.section,
.contact-section {
  padding: var(--band-y) clamp(26px, 6.2vw, 92px);
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.section-heading {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-bottom: clamp(30px, 4vw, 48px);
}

.section-heading--row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 30px;
  max-width: none;
}

.section-heading--row > p {
  max-width: 380px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.section-heading h2,
.contact-panel h2,
.page-hero h1 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.section-heading h2 {
  font-size: clamp(2rem, 3.3vw, 3.5rem);
  line-height: 1.05;
}

.section-heading .eyebrow,
.skills-section .eyebrow {
  color: var(--ink);
}

.wave-mark {
  margin-left: 7px;
  color: var(--lime);
  font-size: 1.2em;
  letter-spacing: -0.18em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  color: var(--lime);
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 34px);
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 278px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 13px 24px rgba(45, 60, 75, 0.08);
  transform: rotate(-0.35deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature-card:nth-child(2) { transform: rotate(0.3deg); }
.feature-card:nth-child(3) { transform: rotate(-0.15deg); }

.feature-card:hover {
  box-shadow: 0 19px 32px rgba(45, 60, 75, 0.13);
  transform: translateY(-5px) rotate(0);
}

.feature-card--blue { background: color-mix(in srgb, var(--panel) 75%, #dce9f8); }
.feature-card--green { background: color-mix(in srgb, var(--panel) 76%, #dceee5); }
.feature-card--violet { background: color-mix(in srgb, var(--panel) 76%, #e8e0f2); }

:root[data-theme="dark"] .feature-card--blue,
:root[data-theme="dark"] .feature-card--green,
:root[data-theme="dark"] .feature-card--violet {
  background: var(--panel);
}

.project-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border: 1px solid var(--line-2);
  border-radius: 50% 50% 46% 54%;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.feature-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 0;
}

.feature-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
  color: var(--muted);
}

.feature-card h3 {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.feature-card p {
  max-width: 36ch;
  margin-top: 5px;
  color: var(--soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: auto 52px 0 0;
  padding: 20px 0 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel) 58%, transparent);
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.feature-card__links {
  position: absolute;
  right: 22px;
  bottom: 22px;
}

.project-arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  color: var(--ink);
  font-size: 1.15rem;
  text-decoration: none;
  box-shadow: 0 4px 9px rgba(45, 60, 75, 0.07);
}

.project-arrow:hover {
  border-color: var(--lime);
  background: var(--lime);
  color: #fff;
}

.skills-section {
  padding-top: clamp(46px, 5vw, 72px);
  padding-bottom: clamp(56px, 6vw, 86px);
}

.skills-section .section-heading {
  margin-bottom: 24px;
}

.skills-section .section-heading h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.7rem);
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-list li {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 64px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.tool-list li span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--lime-tint);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.contact-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.78fr);
  align-items: center;
  gap: clamp(42px, 6vw, 86px);
  width: min(100%, 1180px);
  min-height: clamp(380px, 30vw, 440px);
  margin-inline: auto;
  padding: clamp(32px, 3.5vw, 48px) clamp(32px, 5.5vw, 68px) clamp(78px, 7vw, 100px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 20%, var(--lime-tint), transparent 34%),
    var(--panel);
  box-shadow: 0 22px 56px rgba(31, 44, 59, 0.08);
}

.contact-panel h2 {
  max-width: 8.5ch;
  margin: 0;
  font-size: clamp(3rem, 4.8vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.contact-panel__intro {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 0;
  text-align: center;
}

.contact-panel__side {
  align-self: center;
  display: grid;
  gap: 34px;
  max-width: 430px;
  color: var(--soft);
}

.contact-panel__side > p {
  max-width: 29ch;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.55;
  text-wrap: balance;
}

.contact-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 76px;
  padding: 18px 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: #0b2b50;
  color: #fff;
  font-size: clamp(0.94rem, 1.2vw, 1.08rem);
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  box-shadow: 0 12px 24px rgba(11, 43, 80, 0.16);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.contact-message:hover {
  background: #114174;
  box-shadow: 0 16px 30px rgba(11, 43, 80, 0.22);
  transform: translateY(-2px);
}

.contact-message__icon {
  font-size: 1.35rem;
  font-weight: 400;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px clamp(24px, 3vw, 40px);
  margin-top: 2px;
}

.contact-links a {
  padding-bottom: 6px;
  border-bottom-color: var(--lime-dim);
  color: var(--ink);
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  font-weight: 600;
}

.contact-ocean-art {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.contact-panel__intro,
.contact-panel__side {
  position: relative;
  z-index: 1;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  min-height: 126px;
  padding: 28px clamp(26px, 5vw, 72px);
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 0 0 28px 28px;
  box-shadow: var(--shadow-paper);
}

.footer-brand {
  display: grid;
  gap: 4px;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
}

.footer-brand small,
.footer-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.footer-sail {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 104px;
  min-height: 58px;
}

.footer-sail img {
  width: 100%;
  height: auto;
}

/* Interior portfolio pages ------------------------------------------------ */

main:not(.home-page) {
  min-height: 62vh;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  align-items: end;
  gap: 30px;
  padding-top: clamp(76px, 10vw, 150px);
  padding-bottom: clamp(56px, 7vw, 90px);
  background:
    radial-gradient(circle at 85% 35%, var(--lime-tint), transparent 27%),
    var(--paper);
}

.page-hero h1 {
  font-size: clamp(4.2rem, 9vw, 9rem);
  line-height: 0.88;
}

.page-lede {
  max-width: 48ch;
  color: var(--soft);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.page-hero .page-actions {
  grid-column: 2;
}

.section-label {
  margin-bottom: 28px;
  color: var(--lime);
}

.builds {
  display: grid;
  gap: 28px;
}

.build {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 12px 25px rgba(45, 60, 75, 0.06);
}

.build__shot {
  display: block;
  min-height: 320px;
  overflow: hidden;
  background: var(--media-bg);
}

.build__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.build:hover .build__shot img {
  transform: scale(1.025);
}

.build__spec {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(28px, 4vw, 52px);
}

.build__spec h3,
.demo-card__meta h3,
.resume-item h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.build__spec p,
.spec,
.resume-item p,
.resume-list {
  color: var(--soft);
}

.build__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 10px;
}

.build__links a {
  font-size: 0.8rem;
  font-weight: 600;
}

.build--text {
  grid-template-columns: 1fr;
  min-height: 220px;
}

.index-list {
  border-top: 1px solid var(--line);
}

.index-list li {
  list-style: none;
}

.index-list a {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.index-list a:hover {
  padding-inline: 12px;
  background: var(--lime-tint);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.demo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.demo-card__shot {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--media-bg);
}

.demo-card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-card__meta {
  display: grid;
  gap: 4px;
  padding: 20px;
}

.demo-card__meta h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(40px, 8vw, 110px);
}

.about-prose {
  display: grid;
  gap: 22px;
  color: var(--soft);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.about-snapshot {
  display: grid;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 75%, #dce9f8);
}

.about-snapshot__mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.about-snapshot > div {
  display: grid;
  gap: 4px;
}

.about-snapshot > div > span,
.facts dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(44px, 6vw, 80px);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
}

.facts > div {
  display: grid;
  gap: 6px;
  padding: 20px;
  background: var(--panel);
}

.facts dd {
  color: var(--soft);
  font-size: 0.86rem;
}

.resume-items {
  display: grid;
  gap: 0;
}

.resume-item {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1.55fr);
  gap: 30px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.resume-item__head,
.resume-item__meta {
  display: grid;
  gap: 5px;
  align-content: start;
}

.resume-item h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
}

@media (max-width: 1100px) {
  body {
    padding: 10px;
  }

  .site-header {
    top: 10px;
  }

  .nav {
    gap: 24px;
  }

  .home-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 0.8fr);
    gap: 30px;
  }

  .coastal-scene {
    min-height: 360px;
  }

  .home-project-grid,
  .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card:last-child {
    grid-column: 1 / -1;
  }

  .tool-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    min-height: 78px;
    padding: 12px 22px;
  }

  .brand-mark {
    width: 48px;
  }

  .nav-toggle {
    display: inline-flex;
    justify-self: end;
    align-items: center;
    margin-right: 8px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.7rem;
  }

  .theme-toggle {
    grid-column: 3;
    grid-row: 1;
  }

  .nav-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .nav {
    position: absolute;
    top: calc(100% - 1px);
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 12px 22px 22px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 18px 24px rgba(31, 44, 59, 0.1);
  }

  .nav[hidden] {
    display: none;
  }

  .nav a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
  }

  .nav a::after {
    display: none;
  }

  .home-hero {
    min-height: 0;
  }

  .home-hero__grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 720px;
  }

  .coastal-scene {
    min-height: 330px;
  }

  .contact-panel,
  .page-hero,
  .about-layout,
  .build {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    align-items: start;
    gap: 24px;
    min-height: 460px;
    padding: 34px 34px 88px;
  }

  .contact-panel h2 {
    max-width: 11ch;
    margin-top: 0;
  }

  .contact-panel__side {
    max-width: 520px;
  }

  .contact-message {
    max-width: 430px;
  }

  .contact-ocean-art {
    left: auto;
    width: 1100px;
    max-width: none;
  }

  .page-hero .page-actions {
    grid-column: auto;
  }

  .build__shot {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .site-header,
  .home-page,
  main:not(.home-page),
  .site-footer {
    border-inline: 0;
  }

  .site-header {
    top: 0;
    border-radius: 0;
  }

  .home-hero,
  .section,
  .contact-section {
    padding-inline: 20px;
  }

  .home-hero {
    padding-top: 54px;
  }

  .home-hero h1 {
    font-size: clamp(4rem, 20vw, 6.25rem);
  }

  .hero-tagline {
    font-size: 1.15rem;
  }

  .coastal-scene {
    min-height: 280px;
  }

  .lighthouse {
    right: 22%;
    bottom: 130px;
    transform: scale(0.78);
    transform-origin: bottom;
  }

  .cliff {
    bottom: 40px;
    height: 110px;
  }

  .home-project-grid,
  .demo-grid,
  .tool-list,
  .facts {
    grid-template-columns: 1fr;
  }

  .feature-card:last-child {
    grid-column: auto;
  }

  .section-heading--row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-heading--row > p {
    text-align: left;
  }

  .contact-panel {
    gap: 22px;
    min-height: 430px;
    padding: 28px 24px 78px;
    border-radius: 20px;
  }

  .contact-panel h2 {
    margin-top: 0;
    font-size: clamp(2.85rem, 15vw, 4.4rem);
  }

  .contact-panel__side {
    gap: 24px;
  }

  .contact-message {
    min-height: 68px;
    gap: 12px;
    padding: 16px 18px;
  }

  .contact-links {
    gap: 14px 24px;
  }

  .contact-ocean-art {
    right: -120px;
    width: 820px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    border-radius: 0;
  }

  .site-footer > .footer-meta {
    display: none;
  }

  .page-hero h1 {
    font-size: clamp(4rem, 22vw, 7rem);
  }

  .resume-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .feature-card:nth-child(2),
  .feature-card:nth-child(3) {
    transform: none;
  }
}

/* Cape Spear + card/icon refinements -------------------------------------- */

.coastal-scene {
  min-height: 440px;
}

.cape-spear-art {
  position: absolute;
  inset: -4% -12% -3% -9%;
  z-index: -1;
  width: 121%;
  height: 108%;
  object-fit: contain;
  object-position: 60% 100%;
  mask-image: radial-gradient(ellipse 78% 88% at 60% 57%, #000 58%, transparent 94%);
  pointer-events: none;
}

.cape-spear-art--line {
  inset: -2% -10% -4% -7%;
  width: 120%;
  height: 108%;
  object-position: 55% 100%;
  mask-image: none;
}

.home-project-grid {
  align-items: stretch;
}

.feature-card {
  grid-column: auto;
  min-height: 348px;
  padding: 26px;
  color: var(--ink);
  text-decoration: none;
  isolation: isolate;
}

.feature-card::before {
  position: absolute;
  right: -48px;
  bottom: -62px;
  z-index: -1;
  width: 190px;
  height: 190px;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 24px color-mix(in srgb, var(--panel) 18%, transparent),
    0 0 0 48px color-mix(in srgb, var(--panel) 12%, transparent);
  opacity: 0.62;
  transition: transform 350ms var(--ease-out);
}

.feature-card:hover,
.feature-card:focus-visible {
  color: var(--ink);
}

.feature-card:hover::before,
.feature-card:focus-visible::before {
  transform: scale(1.12) translate(-4px, -4px);
}

.feature-card:focus-visible {
  outline: 3px solid var(--lime-dim);
  outline-offset: 4px;
}

.project-mark {
  width: 52px;
  height: 52px;
  margin-bottom: 24px;
  border-color: color-mix(in srgb, var(--lime) 34%, var(--line));
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 500;
  box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--panel) 45%, transparent);
}

.feature-card__body {
  min-height: 0;
}

.feature-card__meta {
  margin-bottom: 10px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2vw, 2.1rem);
  font-weight: 400;
}

.feature-card p {
  max-width: 34ch;
  font-size: 0.84rem;
}

.feature-card .tag-list {
  margin: 24px 0 0;
  padding: 0;
}

.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  border-top: 1px solid var(--line);
}

.project-arrow {
  flex: 0 0 auto;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.feature-card:hover .project-arrow,
.feature-card:focus-visible .project-arrow {
  background: var(--lime);
  color: #fff;
  transform: translateX(3px) rotate(-8deg);
}

.tool-list li {
  min-height: 76px;
  padding: 14px 18px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.tool-list li:hover {
  border-color: color-mix(in srgb, var(--lime) 40%, var(--line));
  box-shadow: 0 10px 22px rgba(45, 60, 75, 0.07);
  transform: translateY(-3px);
}

.tool-list li .tool-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  box-shadow: 0 4px 10px rgba(45, 60, 75, 0.06);
}

.tool-icon img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.tool-list li.tool-list__more {
  justify-content: center;
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  text-align: center;
}

.tool-list li.tool-list__more:hover {
  border-color: var(--line-2);
  box-shadow: none;
  transform: none;
}

.tool-list strong {
  font-size: 0.82rem;
  font-weight: 600;
}

:root[data-theme="dark"] .tech-github {
  filter: invert(1);
}

@media (max-width: 1100px) {
  .feature-card:last-child {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .coastal-scene {
    min-height: 390px;
  }

  .cape-spear-art {
    inset: -3% -7% -2%;
    width: 112%;
  }
}

@media (max-width: 640px) {
  .coastal-scene {
    min-height: 330px;
  }

  .cape-spear-art {
    inset: 0 -18% 0 -12%;
    width: 130%;
    height: 100%;
    object-position: 57% 100%;
  }

  .feature-card {
    min-height: 320px;
    padding: 22px;
  }

  .tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-list li {
    min-height: 68px;
    padding: 11px;
  }

  .tool-list li .tool-icon {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 390px) {
  .tool-list {
    grid-template-columns: 1fr;
  }
}

/* Cape Spear sky and water details --------------------------------------- */

.coastal-scene::before {
  display: none;
}

.scene-bird {
  z-index: 2;
  width: 70px;
  height: 24px;
  font-size: 0;
  line-height: 0;
  opacity: 0.9;
}

.scene-bird::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("assets/cape-spear-bird-flap-frames.png");
  background-repeat: no-repeat;
  background-position: 50% 0%;
  background-size: 300% 600%;
  content: "";
  animation: coastal-bird-flap 0.9s steps(1, end) infinite;
}

.scene-bird::after {
  display: none;
}

.bird-one {
  top: 14%;
  left: 5%;
  transform: rotate(-4deg) scale(1.12);
}

.bird-two {
  top: 29%;
  left: 24%;
  transform: rotate(7deg) scale(0.72);
}

.bird-three {
  top: 10%;
  right: 9%;
  transform: rotate(4deg) scale(0.62);
}

@media (max-width: 640px) {
  .bird-one { left: 1%; }
  .bird-two { left: 20%; }
  .bird-three { right: 4%; }
}

/* Animated Cape Spear atmosphere ----------------------------------------- */

.coastal-scene--animated .cape-spear-art {
  z-index: 2;
}

.coastal-scene--animated {
  isolation: auto;
}

.cape-spear-art--sequence {
  inset: auto auto -2% 50%;
  width: auto;
  max-width: none;
  height: 130%;
  object-fit: fill;
  object-position: center;
  transform: translateX(-50%);
  filter: none;
  mix-blend-mode: normal;
  will-change: contents;
}

.coastal-scene--animated .scene-bird {
  --bird-angle: 0deg;
  --bird-scale: 1;
  --bird-travel: 58px;
  z-index: 3;
  animation: coastal-bird-drift 6.5s ease-in-out infinite;
  transform: rotate(var(--bird-angle)) scale(var(--bird-scale));
  transform-origin: center;
  will-change: transform;
}

.coastal-scene--animated .bird-one {
  --bird-angle: -4deg;
  --bird-scale: 1.12;
  --bird-travel: 76px;
  animation-duration: 8s;
}

.coastal-scene--animated .bird-two {
  --bird-angle: 7deg;
  --bird-scale: 0.72;
  --bird-travel: 54px;
  animation-delay: -3s;
  animation-duration: 6.5s;
}

.coastal-scene--animated .bird-three {
  --bird-angle: 4deg;
  --bird-scale: 0.62;
  --bird-travel: -64px;
  animation-delay: -5s;
  animation-duration: 9s;
}

@keyframes coastal-bird-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--bird-angle)) scale(var(--bird-scale)); }
  52% { transform: translate3d(var(--bird-travel), -16px, 0) rotate(calc(var(--bird-angle) + 3deg)) scale(var(--bird-scale)); }
}

@keyframes coastal-bird-flap {
  /* Frame centers follow the artwork's actual, unevenly spaced alpha bounds. */
  0% { background-position: 50% 1.55%; }
  16.667% { background-position: 50% 21.31%; }
  33.333% { background-position: 50% 37.56%; }
  50% { background-position: 50% 57.25%; }
  66.667% { background-position: 50% 75.38%; }
  83.333% { background-position: 50% 97.07%; }
  100% { background-position: 50% 1.55%; }
}

:root[data-theme="dark"] .cape-spear-art--sequence {
  filter: invert(1) hue-rotate(180deg);
}

/* The coastal scene is intentionally animated even when the operating system
   asks other interface motion to settle. It is decorative, non-interactive,
   and no longer needs a visible playback control. */
@media (prefers-reduced-motion: reduce) {
  .coastal-scene--animated .scene-bird,
  .coastal-scene--animated .scene-bird::before {
    animation-iteration-count: infinite !important;
  }

  .coastal-scene--animated .bird-one {
    animation-duration: 8s !important;
  }

  .coastal-scene--animated .bird-two {
    animation-duration: 6.5s !important;
  }

  .coastal-scene--animated .bird-three {
    animation-duration: 9s !important;
  }

  .coastal-scene--animated .scene-bird::before {
    animation-duration: 0.9s !important;
  }

}

/* Editorial tech stack --------------------------------------------------- */

.skills-section--coastal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: clamp(76px, 9vw, 132px);
  padding-bottom: 0;
}

.skills-section--coastal::before {
  position: absolute;
  top: -210px;
  right: -170px;
  z-index: -1;
  width: min(52vw, 760px);
  aspect-ratio: 1;
  border-radius: 47% 53% 60% 40%;
  background: repeating-radial-gradient(ellipse at 48% 52%, transparent 0 30px, var(--terrain-line) 31px 32px);
  content: "";
  opacity: 0.54;
  transform: rotate(14deg);
}

.skills-section--coastal .section-heading {
  margin-bottom: clamp(34px, 4vw, 58px);
}

.skills-section--coastal .stack-heading-wave {
  display: block;
  width: clamp(58px, 5.2vw, 82px);
  height: auto;
  margin-bottom: 18px;
  object-fit: contain;
}

.skills-section--coastal .section-heading h2 {
  max-width: none;
  font-size: clamp(2.25rem, 3.6vw, 4rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.contact-dialog {
  width: min(calc(100% - 32px), 620px);
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(11, 35, 66, 0.24);
}

.contact-dialog::backdrop {
  background: rgba(9, 24, 42, 0.48);
  backdrop-filter: blur(5px);
}

.contact-dialog__shell {
  display: grid;
  gap: 28px;
  padding: clamp(26px, 4vw, 44px);
  overflow: auto;
}

.contact-dialog__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.contact-dialog__eyebrow {
  margin: 0 0 10px;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-dialog__close {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.contact-dialog__close:hover,
.contact-dialog__close:focus-visible {
  border-color: var(--lime);
  color: var(--lime);
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-form__field {
  display: grid;
  gap: 7px;
}

.contact-form label {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-form input:not([type="hidden"]),
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.contact-form textarea {
  min-height: 132px;
  resize: vertical;
}

.contact-form input:not([type="hidden"]):focus,
.contact-form textarea:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-tint);
}

.contact-form__submit {
  justify-self: start;
  margin-top: 4px;
}

.skills-section--coastal .tool-list {
  position: relative;
  z-index: 1;
  gap: clamp(16px, 1.6vw, 24px);
}

.skills-section--coastal .tool-list li {
  min-height: clamp(92px, 8vw, 118px);
  gap: clamp(16px, 1.6vw, 24px);
  padding: 18px clamp(18px, 2.1vw, 30px);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 12px 28px rgba(45, 60, 75, 0.07);
}

.skills-section--coastal .tool-list li:hover {
  box-shadow: 0 16px 32px rgba(45, 60, 75, 0.11);
}

.skills-section--coastal .tool-list li .tool-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  box-shadow: 0 7px 15px rgba(45, 60, 75, 0.09);
}

.skills-section--coastal .tool-icon img {
  width: 35px;
  height: 35px;
}

.skills-section--coastal .tool-list strong {
  font-size: clamp(0.92rem, 1.25vw, 1.15rem);
  font-weight: 600;
}

.skills-section--coastal .tool-icon--ai {
  position: relative;
  color: #7774ea;
}

.skills-section--coastal .tool-icon--ai i {
  position: absolute;
  width: 22px;
  height: 22px;
  background: currentColor;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}

.skills-section--coastal .tool-icon--ai i:nth-child(1) {
  top: 10px;
  left: 9px;
}

.skills-section--coastal .tool-icon--ai i:nth-child(2) {
  right: 7px;
  bottom: 8px;
  width: 16px;
  height: 16px;
  opacity: 0.72;
}

.skills-section--coastal .tool-icon--ai i:nth-child(3) {
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  opacity: 0.52;
}

.skills-section--coastal .tool-list li.tool-list__more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 12px clamp(18px, 2.1vw, 30px);
  border-color: color-mix(in srgb, var(--lime) 46%, var(--line));
  background: color-mix(in srgb, var(--lime-tint) 44%, transparent);
  color: var(--lime);
  text-align: left;
}

.skills-section--coastal .tool-list li.tool-list__more strong {
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  font-style: italic;
  line-height: 1.45;
}

.skills-section--coastal .tool-list li.tool-list__more strong span {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: currentColor;
  font: inherit;
}

.skills-section--coastal .stack-sailboat-art {
  display: block;
  flex: 0 0 auto;
  width: 118px;
  height: 86px;
  margin: -9px -8px -9px 0;
  object-fit: contain;
}

.stack-waterline {
  position: relative;
  z-index: 1;
  width: 108%;
  height: 96px;
  margin-top: clamp(28px, 4vw, 58px);
  margin-left: -4%;
}

.stack-buoy-art {
  position: absolute;
  bottom: -16px;
  left: 50%;
  display: block;
  width: 104px;
  height: 140px;
  object-fit: contain;
  transform: translateX(-50%) rotate(2deg);
}

@media (max-width: 900px) {
  .skills-section--coastal .tool-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-section--coastal .tool-list li.tool-list__more {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .skills-section--coastal {
    padding-top: 72px;
  }

  .skills-section--coastal::before {
    right: -220px;
    width: 560px;
  }

  .skills-section--coastal .section-heading h2 {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
  }

  .skills-section--coastal .tool-list {
    grid-template-columns: 1fr;
  }

  .skills-section--coastal .tool-list li,
  .skills-section--coastal .tool-list li.tool-list__more {
    grid-column: auto;
    min-height: 84px;
  }

  .skills-section--coastal .tool-list li.tool-list__more {
    min-height: 104px;
  }

  .stack-waterline {
    height: 84px;
    margin-top: 24px;
  }
}

/* DwellSmart project ----------------------------------------------------- */
.dwellsmart-shot,
.dwellsmart-product {
  --ds-ink: #f6f1e7;
  --ds-muted: #a9b1b5;
  --ds-gold: #d7b267;
  --ds-gold-soft: #f0d99e;
  --ds-deep: #09141c;
  --ds-panel: #111f29;
  --ds-line: rgba(240, 217, 158, 0.22);
}

.dwellsmart-shot {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 24px;
  min-height: 340px;
  padding: clamp(22px, 3vw, 38px);
  overflow: hidden;
  color: var(--ds-ink);
  text-decoration: none;
  background:
    radial-gradient(circle at 86% 12%, rgba(215, 178, 103, 0.19), transparent 29%),
    linear-gradient(145deg, #0f1f2a 0%, var(--ds-deep) 72%);
}

.dwellsmart-shot::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -40%;
  width: 62%;
  aspect-ratio: 1;
  border: 1px solid rgba(215, 178, 103, 0.11);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(215, 178, 103, 0.04),
    0 0 0 76px rgba(215, 178, 103, 0.025);
  pointer-events: none;
}

.dwellsmart-shot__chrome,
.dwellsmart-product__nav,
.dwellsmart-product__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dwellsmart-wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dwellsmart-wordmark span {
  color: var(--ds-gold);
}

.dwellsmart-alpha {
  padding: 4px 9px;
  border: 1px solid var(--ds-line);
  border-radius: 999px;
  color: var(--ds-gold-soft);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dwellsmart-shot__copy {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 470px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.1vw, 3.9rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.dwellsmart-shot__copy em {
  color: var(--ds-gold);
  font-weight: 400;
}

.dwellsmart-search,
.dwellsmart-query {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border: 1px solid var(--ds-line);
  border-radius: 999px;
  color: var(--ds-muted);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
  font-size: clamp(0.72rem, 1.25vw, 0.94rem);
}

.dwellsmart-search b,
.dwellsmart-query b {
  color: var(--ds-gold);
  font-size: 1.15em;
}

.dwellsmart-result-row {
  position: absolute;
  right: clamp(20px, 3vw, 36px);
  bottom: -34px;
  z-index: 0;
  display: flex;
  gap: 9px;
  width: min(43%, 300px);
  opacity: 0.46;
  transform: rotate(-3deg);
  transition: transform 220ms ease, opacity 220ms ease;
}

.dwellsmart-result-row i {
  flex: 1;
  height: 94px;
  border: 1px solid var(--ds-line);
  border-radius: 10px 10px 0 0;
  background: linear-gradient(150deg, rgba(215, 178, 103, 0.3), rgba(255, 255, 255, 0.04));
}

.dwellsmart-shot:hover .dwellsmart-result-row {
  opacity: 0.75;
  transform: translateY(-6px) rotate(-3deg);
}

.dwellsmart-hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
  align-items: start;
  overflow: hidden;
  background:
    radial-gradient(circle at 91% 17%, rgba(215, 178, 103, 0.13), transparent 23%),
    var(--paper);
}

.dwellsmart-hero > .eyebrow,
.dwellsmart-hero > h1,
.dwellsmart-hero > .page-lede {
  grid-column: 1;
}

.dwellsmart-hero > .page-actions {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: end;
  justify-self: end;
}

.dwellsmart-hero > .dwellsmart-product {
  grid-column: 1 / -1;
  margin-top: clamp(20px, 4vw, 54px);
}

.dwellsmart-product {
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(215, 178, 103, 0.24);
  border-radius: 18px;
  color: var(--ds-ink);
  background:
    radial-gradient(circle at 83% 12%, rgba(215, 178, 103, 0.17), transparent 24%),
    var(--ds-deep);
  box-shadow: 0 34px 70px rgba(7, 18, 26, 0.2);
}

.dwellsmart-product__bar {
  padding: 20px clamp(22px, 4vw, 46px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.dwellsmart-product__nav {
  color: var(--ds-muted);
  font-size: 0.74rem;
}

.dwellsmart-product__nav span + span {
  margin-left: 18px;
}

.dwellsmart-product__body {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(38px, 6vw, 78px) clamp(24px, 5vw, 72px);
}

.dwellsmart-product__intro {
  display: grid;
  gap: 24px;
}

.dwellsmart-product__intro p {
  margin: 0;
  color: var(--ds-muted);
  font-size: clamp(0.88rem, 1.25vw, 1.02rem);
}

.dwellsmart-product__intro h2 {
  margin: 0;
  max-width: 650px;
  color: var(--ds-ink);
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5.5vw, 5.7rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.dwellsmart-product__intro h2 em {
  color: var(--ds-gold);
  font-weight: 400;
}

.dwellsmart-listings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.dwellsmart-listing {
  min-height: 240px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background:
    linear-gradient(to bottom, transparent 49%, var(--ds-panel) 50%),
    linear-gradient(145deg, #8b9d94, #3d5860 48%, #e1cfaa 49%, #8a765b);
  box-shadow: 0 22px 38px rgba(0, 0, 0, 0.22);
}

.dwellsmart-listing::after {
  content: "MLS  •  St. John's";
  display: block;
  margin-top: 126px;
  color: var(--ds-gold-soft);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
}

.dwellsmart-listing--one { transform: translateY(20px) rotate(-2deg); }
.dwellsmart-listing--two { min-height: 278px; }
.dwellsmart-listing--three { transform: translateY(28px) rotate(2deg); }

.dwellsmart-overview,
.dwellsmart-data {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(36px, 7vw, 110px);
  padding-top: clamp(72px, 10vw, 150px);
  padding-bottom: clamp(72px, 10vw, 150px);
}

.dwellsmart-overview h2,
.dwellsmart-capabilities h2,
.dwellsmart-data h2,
.dwellsmart-cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6.2rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.dwellsmart-overview__copy {
  display: grid;
  gap: 22px;
  align-content: start;
}

.dwellsmart-overview__copy > p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  line-height: 1.6;
}

.dwellsmart-capabilities {
  padding-top: clamp(70px, 9vw, 130px);
  padding-bottom: clamp(70px, 9vw, 130px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.dwellsmart-capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 6vw, 78px);
}

.dwellsmart-capability-grid article {
  min-height: 245px;
  padding: clamp(24px, 3.5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 36px rgba(45, 60, 75, 0.06);
}

.dwellsmart-capability-grid span {
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.dwellsmart-capability-grid h3 {
  margin: 58px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1;
}

.dwellsmart-capability-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dwellsmart-data ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dwellsmart-data li {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-weight: 600;
}

.dwellsmart-cta {
  margin-bottom: clamp(54px, 8vw, 100px);
  padding: clamp(40px, 7vw, 88px);
  border: 1px solid rgba(215, 178, 103, 0.25);
  border-radius: 18px;
  color: #f6f1e7;
  background:
    radial-gradient(circle at 87% 15%, rgba(215, 178, 103, 0.18), transparent 30%),
    #09141c;
  box-shadow: 0 26px 60px rgba(7, 18, 26, 0.16);
}

.dwellsmart-cta p {
  max-width: 620px;
  margin: 24px 0 34px;
  color: #a9b1b5;
  font-size: clamp(1rem, 1.65vw, 1.3rem);
  line-height: 1.6;
}

.dwellsmart-cta .btn-primary {
  color: #09141c;
  background: var(--ds-gold, #d7b267);
}

@media (max-width: 900px) {
  .dwellsmart-hero,
  .dwellsmart-overview,
  .dwellsmart-data {
    grid-template-columns: 1fr;
  }

  .dwellsmart-hero > .eyebrow,
  .dwellsmart-hero > h1,
  .dwellsmart-hero > .page-lede,
  .dwellsmart-hero > .page-actions,
  .dwellsmart-hero > .dwellsmart-product {
    grid-column: 1;
    grid-row: auto;
  }

  .dwellsmart-hero > .page-actions {
    justify-self: start;
  }

  .dwellsmart-product__body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dwellsmart-shot {
    min-height: 310px;
  }

  .dwellsmart-product {
    min-height: 0;
  }

  .dwellsmart-product__nav {
    display: none;
  }

  .dwellsmart-product__body {
    padding: 38px 20px 54px;
  }

  .dwellsmart-listings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dwellsmart-listing--three {
    display: none;
  }

  .dwellsmart-capability-grid,
  .dwellsmart-data ul {
    grid-template-columns: 1fr;
  }

  .dwellsmart-capability-grid article {
    min-height: 210px;
  }

  .dwellsmart-cta {
    border-radius: 12px;
  }
}

/* Homepage project gallery ------------------------------------------------ */
.home-work-section {
  padding-top: clamp(82px, 9vw, 138px);
  padding-bottom: clamp(84px, 10vw, 150px);
}

.home-work-section .section-heading {
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.95fr);
  align-items: end;
  gap: clamp(30px, 7vw, 110px);
  max-width: 100%;
  margin-bottom: clamp(42px, 6vw, 78px);
}

.home-work-section .section-heading h2 {
  max-width: none;
  font-size: clamp(2.25rem, 3.6vw, 4rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.home-work-section .section-heading .text-link {
  justify-self: start;
  margin-bottom: 4px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  align-items: stretch;
}

.home-project-card {
  --project-accent: #1767d8;
  --project-wash: #e5eef8;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 520px;
  flex-direction: column;
  padding: clamp(24px, 2.4vw, 34px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--project-accent) 22%, var(--line));
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--panel) 72%, var(--project-wash)), var(--panel) 76%);
  box-shadow: 0 18px 38px rgba(41, 57, 75, 0.08);
  isolation: isolate;
  transition: transform 220ms var(--ease-out), border-color 220ms ease, box-shadow 220ms ease;
}

.home-project-card--dwell {
  --project-accent: #698043;
  --project-wash: #edf0df;
}

.home-project-card--swarm {
  --project-accent: #76519c;
  --project-wash: #eee7f4;
}

:root[data-theme="dark"] .home-project-card {
  --project-wash: var(--panel);
  background:
    radial-gradient(circle at 82% 9%, color-mix(in srgb, var(--project-accent) 13%, transparent), transparent 31%),
    var(--panel);
}

.home-project-card:hover,
.home-project-card:focus-visible {
  border-color: color-mix(in srgb, var(--project-accent) 58%, var(--line));
  color: var(--ink);
  box-shadow: 0 24px 48px rgba(41, 57, 75, 0.14);
  transform: translateY(-7px);
}

.home-project-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--project-accent) 45%, transparent);
  outline-offset: 4px;
}

.project-card-icon {
  position: relative;
  z-index: 2;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
}

.project-card-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-card-icon--muni i {
  position: absolute;
  top: 20px;
  left: 17px;
  width: 26px;
  height: 27px;
  border: 2px solid currentColor;
  border-top: 0;
}

.project-card-icon--muni i::before,
.project-card-icon--muni i::after {
  position: absolute;
  inset-block: 0;
  width: 2px;
  content: "";
  background: currentColor;
}

.project-card-icon--muni i::before { left: 7px; }
.project-card-icon--muni i::after { right: 7px; }

.project-card-icon--muni b {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 15px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  background: var(--panel);
  transform: rotate(-45deg);
}

.project-card-icon--muni b::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  content: "";
  background: currentColor;
}

.project-card-icon--dwell i {
  position: absolute;
  top: 24px;
  left: 18px;
  width: 25px;
  height: 24px;
  border: 2px solid currentColor;
  border-top: 0;
}

.project-card-icon--dwell i::before {
  position: absolute;
  top: -10px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.project-card-icon--dwell b {
  position: absolute;
  right: 13px;
  bottom: 13px;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--panel);
}

.project-card-icon--dwell b::after {
  position: absolute;
  right: -7px;
  bottom: -4px;
  width: 9px;
  height: 2px;
  content: "";
  background: currentColor;
  transform: rotate(48deg);
}

.project-card-icon--swarm i,
.project-card-icon--swarm b,
.project-card-icon--swarm em {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--panel);
}

.project-card-icon--swarm i { top: 15px; left: 29px; }
.project-card-icon--swarm b { right: 14px; bottom: 14px; }
.project-card-icon--swarm em { bottom: 14px; left: 14px; }

.project-card-icon--swarm::before,
.project-card-icon--swarm::after {
  position: absolute;
  top: 36px;
  width: 29px;
  height: 2px;
  content: "";
  background: currentColor;
  transform-origin: center;
}

.project-card-icon--swarm::before { left: 13px; transform: rotate(-56deg); }
.project-card-icon--swarm::after { right: 13px; transform: rotate(56deg); }

.project-card-icon--swarm::before,
.project-card-icon--swarm::after {
  content: none;
}

.home-project-card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  padding-top: clamp(42px, 4vw, 62px);
}

.home-project-card__kicker {
  color: color-mix(in srgb, var(--project-accent) 82%, var(--ink));
  font-family: var(--font-mono);
  font-size: clamp(0.64rem, 0.82vw, 0.76rem);
  letter-spacing: 0.025em;
}

.home-project-card h3 {
  margin: 22px 0 14px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 3vw, 3.2rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.home-project-card p {
  min-height: 5.1em;
  margin: 0;
  color: var(--soft);
  font-size: clamp(0.84rem, 1vw, 0.96rem);
  line-height: 1.55;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.project-card-tags li {
  margin: 0;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--project-accent) 24%, var(--line));
  border-radius: 6px;
  color: color-mix(in srgb, var(--project-accent) 68%, var(--ink));
  background: color-mix(in srgb, var(--panel) 62%, transparent);
  font-family: var(--font-mono);
  font-size: clamp(0.56rem, 0.72vw, 0.66rem);
}

.project-case-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 84%, #eee8f7);
}

.project-case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-case-thumb--swarm img {
  object-position: 50% 22%;
}

.case-study-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1.15fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: center;
  min-height: min(720px, 78vh);
}

.case-study-hero__copy h1 {
  margin: 14px 0 18px;
}

.case-study-hero__visual {
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 22px 55px rgba(16, 39, 66, 0.09);
}

.case-study-hero__visual img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.case-study-hero__visual--swarm img {
  object-position: 50% 20%;
}

.case-study-overview {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(36px, 8vw, 120px);
  align-items: start;
}

.case-study-overview h2,
.case-study-features h2,
.case-study-cta h2 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.case-study-overview__copy > p {
  margin: 0 0 28px;
  color: var(--soft);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.75;
}

.case-study-features {
  border-top: 1px solid var(--line);
}

.case-study-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 42px;
}

.case-study-feature-grid article {
  min-height: 230px;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.case-study-feature-grid article > span {
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.case-study-feature-grid h3 {
  margin: 36px 0 12px;
}

.case-study-feature-grid p {
  margin: 0;
  color: var(--soft);
  line-height: 1.65;
}

.case-study-cta {
  display: grid;
  justify-items: start;
  gap: 26px;
  border-top: 1px solid var(--line);
}

@media (max-width: 800px) {
  .case-study-hero,
  .case-study-overview {
    grid-template-columns: 1fr;
  }

  .case-study-hero {
    min-height: 0;
  }

  .case-study-feature-grid {
    grid-template-columns: 1fr;
  }
}

.home-project-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--project-accent) 20%, var(--line));
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(0.63rem, 0.78vw, 0.72rem);
  font-weight: 600;
}

.home-project-card__action > span {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--project-accent) 24%, var(--line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  box-shadow: 0 5px 12px rgba(41, 57, 75, 0.08);
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.home-project-card:hover .home-project-card__action > span,
.home-project-card:focus-visible .home-project-card__action > span {
  color: #fff;
  background: var(--project-accent);
  transform: translateX(3px) rotate(-7deg);
}

.project-card-art {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  transition: opacity 250ms ease, transform 450ms var(--ease-out);
}

.home-project-card:hover .project-card-art,
.home-project-card:focus-visible .project-card-art {
  opacity: 0.78;
  transform: scale(1.035) rotate(1deg);
}

/* Original CSS map study. */
.project-card-art--muni {
  top: -34px;
  right: -68px;
  width: 330px;
  height: 310px;
  opacity: 0.54;
  background:
    linear-gradient(28deg, transparent 48%, color-mix(in srgb, var(--project-accent) 22%, transparent) 49%, transparent 50%) 0 0 / 58px 58px,
    linear-gradient(118deg, transparent 48%, color-mix(in srgb, var(--project-accent) 18%, transparent) 49%, transparent 50%) 0 0 / 58px 58px;
  mask-image: radial-gradient(circle at 58% 42%, #000 25%, transparent 76%);
}

.project-card-art--muni i {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--project-accent) 42%, transparent);
  border-radius: 48% 52% 43% 57%;
}

.project-card-art--muni i:nth-child(1) { inset: 24px 28px 30px 22px; }
.project-card-art--muni i:nth-child(2) { inset: 55px 61px 64px 55px; }
.project-card-art--muni i:nth-child(3) { inset: 90px 95px 98px 92px; }
.project-card-art--muni i:nth-child(4) {
  top: 28px;
  right: 110px;
  width: 4px;
  height: 280px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--project-accent) 38%, transparent);
  box-shadow: -38px 14px 0 -1px color-mix(in srgb, var(--project-accent) 20%, transparent);
  transform: rotate(34deg);
}

/* Original CSS property-search interface. */
.project-card-art--dwell {
  top: 26px;
  right: -34px;
  width: 250px;
  height: 230px;
  border: 1px solid color-mix(in srgb, var(--project-accent) 25%, transparent);
  border-radius: 12px;
  opacity: 0.45;
  background:
    linear-gradient(to bottom, transparent 54px, color-mix(in srgb, var(--project-accent) 17%, transparent) 55px, transparent 56px),
    color-mix(in srgb, var(--panel) 36%, transparent);
}

.project-card-art--dwell i:nth-child(1) {
  position: absolute;
  top: 17px;
  left: 17px;
  width: 150px;
  height: 19px;
  border: 1px solid color-mix(in srgb, var(--project-accent) 30%, transparent);
  border-radius: 999px;
}

.project-card-art--dwell i:nth-child(1)::before {
  position: absolute;
  top: 5px;
  left: 7px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--project-accent);
  border-radius: 50%;
  content: "";
}

.project-card-art--dwell i:nth-child(2) {
  position: absolute;
  top: 86px;
  left: 35px;
  width: 85px;
  height: 72px;
  border: 2px solid color-mix(in srgb, var(--project-accent) 36%, transparent);
  border-top: 0;
}

.project-card-art--dwell i:nth-child(2)::before {
  position: absolute;
  top: -33px;
  left: 9px;
  width: 62px;
  height: 62px;
  border-top: 2px solid color-mix(in srgb, var(--project-accent) 36%, transparent);
  border-left: 2px solid color-mix(in srgb, var(--project-accent) 36%, transparent);
  content: "";
  transform: rotate(45deg);
}

.project-card-art--dwell i:nth-child(3),
.project-card-art--dwell i:nth-child(4) {
  position: absolute;
  right: 22px;
  width: 74px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--project-accent) 22%, transparent);
  border-radius: 6px;
}

.project-card-art--dwell i:nth-child(3) { top: 78px; }
.project-card-art--dwell i:nth-child(4) { top: 128px; }

/* Original CSS learning-network diagram. */
.project-card-art--swarm {
  top: -36px;
  right: -46px;
  width: 310px;
  height: 310px;
  border: 1px solid color-mix(in srgb, var(--project-accent) 21%, transparent);
  border-radius: 50%;
  opacity: 0.52;
  background:
    radial-gradient(circle, transparent 0 31%, color-mix(in srgb, var(--project-accent) 17%, transparent) 31.5% 32%, transparent 32.5% 48%, color-mix(in srgb, var(--project-accent) 15%, transparent) 48.5% 49%, transparent 49.5% 65%, color-mix(in srgb, var(--project-accent) 13%, transparent) 65.5% 66%, transparent 66.5%),
    repeating-conic-gradient(from 8deg, color-mix(in srgb, var(--project-accent) 11%, transparent) 0 1deg, transparent 1deg 30deg);
}

.project-card-art--swarm::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 112px;
  height: 1px;
  content: "";
  background: color-mix(in srgb, var(--project-accent) 44%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--panel) 65%, transparent);
  transform: rotate(19deg);
  transform-origin: left center;
}

.project-card-art--swarm i {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid color-mix(in srgb, var(--project-accent) 70%, var(--panel));
  border-radius: 50%;
  background: var(--panel);
}

.project-card-art--swarm i:nth-child(1) { top: 49%; left: 49%; width: 11px; height: 11px; }
.project-card-art--swarm i:nth-child(2) { top: 23%; left: 29%; }
.project-card-art--swarm i:nth-child(3) { top: 17%; right: 24%; }
.project-card-art--swarm i:nth-child(4) { top: 47%; right: 13%; }
.project-card-art--swarm i:nth-child(5) { right: 29%; bottom: 18%; }
.project-card-art--swarm i:nth-child(6) { bottom: 25%; left: 20%; }
.project-card-art--swarm i:nth-child(7) { top: 43%; left: 8%; }

/* Full-card project illustrations. These override the earlier lightweight CSS studies. */
.project-card-art.project-card-art--muni,
.project-card-art.project-card-art--dwell,
.project-card-art.project-card-art--swarm {
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  opacity: 0.82;
  mask-image: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: saturate(0.9);
}

.project-card-art.project-card-art--muni {
  background-image: url("assets/project-card-muni-v2.png");
}

.project-card-art.project-card-art--dwell {
  background-image: url("assets/project-card-dwell-v3.png");
}

.project-card-art.project-card-art--swarm {
  background-image: url("assets/project-card-swarm-v2.png");
}

.project-card-art.project-card-art--swarm::before {
  content: none;
}

:root[data-theme="dark"] .project-card-art.project-card-art--muni,
:root[data-theme="dark"] .project-card-art.project-card-art--dwell,
:root[data-theme="dark"] .project-card-art.project-card-art--swarm {
  opacity: 0.13;
  filter: saturate(0.65);
}

.home-project-card:hover .project-card-art,
.home-project-card:focus-visible .project-card-art {
  opacity: 0.94;
  transform: scale(1.025);
}

:root[data-theme="dark"] .home-project-card:hover .project-card-art,
:root[data-theme="dark"] .home-project-card:focus-visible .project-card-art {
  opacity: 0.19;
}

@media (max-width: 1080px) {
  .home-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-project-card:last-child {
    grid-column: 1 / -1;
  }

  .home-project-card p {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .home-work-section .section-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .home-work-section .section-heading h2 {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
  }

  .home-project-grid {
    grid-template-columns: 1fr;
  }

  .home-project-card,
  .home-project-card:last-child {
    grid-column: auto;
    min-height: 470px;
  }
}

@media (max-width: 430px) {
  .home-project-card {
    min-height: 450px;
    padding: 22px;
  }

  .project-card-icon {
    width: 60px;
    height: 60px;
    transform: scale(0.9);
    transform-origin: top left;
  }

  .home-project-card__body {
    padding-top: 28px;
  }

  .home-project-card h3 {
    font-size: 2.3rem;
  }
}

.header-photography {
  position: relative;
  justify-self: end;
  padding: 9px 2px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.header-photography::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.header-photography:hover::after,
.header-photography:focus-visible::after,
.header-photography[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (max-width: 520px) {
  .header-photography {
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-photography::after {
    transition: none;
  }
}
