@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-0.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/instrument-sans-latin-1.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f2f3ef;
  --surface: #ffffff;
  --ink: #18202b;
  --muted: #5b6470;
  --rule: #d5d9d2;
  --accent: #2f4bd8;
  --accent-soft: #e4e8fb;
  --live: #17895b;
  --live-soft: #dcf1e7;
  --focus: #2f4bd8;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141a22;
    --surface: #1c2430;
    --ink: #e8ecef;
    --muted: #9aa4b1;
    --rule: #2c3644;
    --accent: #8da2ff;
    --accent-soft: #222c4a;
    --live: #4fd39a;
    --live-soft: #173528;
    --focus: #8da2ff;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #141a22;
  --surface: #1c2430;
  --ink: #e8ecef;
  --muted: #9aa4b1;
  --rule: #2c3644;
  --accent: #8da2ff;
  --accent-soft: #222c4a;
  --live: #4fd39a;
  --live-soft: #173528;
  --focus: #8da2ff;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 8px;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

.theme-toggle {
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  margin-left: 6px;
}

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

.menu-button {
  display: none;
}

.mobile-menu {
  display: none;
}

@media (max-width: 900px) {
  .site-nav .nav-link {
    display: none;
  }

  .menu-button {
    display: grid;
  }

  .mobile-menu:not([hidden]) {
    display: grid;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 16px;
    box-shadow: 0 18px 30px -20px rgba(10, 20, 40, 0.5);
  }

  .mobile-menu a {
    text-decoration: none;
    font-family: var(--display);
    font-weight: 700;
    font-size: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
  }

  .mobile-menu a:last-child {
    border-bottom: 0;
  }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 15px/1 var(--body);
  text-decoration: none;
  padding: 13px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

:root[data-theme="dark"] .button-primary {
  color: #10172a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button-primary {
    color: #10172a;
  }
}

.button-primary:hover {
  filter: brightness(1.08);
}

.button-quiet {
  border-color: var(--rule);
  background: var(--surface);
  color: var(--ink);
}

.button-quiet:hover {
  border-color: var(--muted);
}

/* Hero */

.hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 88px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.hero-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(52px, 9vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
}

.hero-role {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  max-width: 22ch;
}

.hero-summary {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}

.facts div {
  padding: 16px 12px 0 0;
}

.facts dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
}

.facts dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

/* Live board */

.board {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 22px 22px 10px;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.board-head h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.board-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.board ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.board li + li {
  border-top: 1px solid var(--rule);
}

.board a {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 4px;
  text-decoration: none;
  border-radius: 8px;
}

.board a:hover .board-name {
  color: var(--accent);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px var(--live-soft);
}

.board-name {
  font-weight: 600;
  display: block;
}

.board-what {
  color: var(--muted);
  font-size: 14px;
  display: block;
  line-height: 1.4;
}

.board-domain {
  color: var(--muted);
  font-size: 14px;
}

@media (prefers-reduced-motion: no-preference) {
  .board li {
    opacity: 0;
    transform: translateY(6px);
    animation: board-in 360ms ease-out forwards;
    animation-delay: calc(var(--row) * 60ms + 120ms);
  }

  @keyframes board-in {
    to {
      opacity: 1;
      transform: none;
    }
  }
}

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

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

  .board-domain {
    display: none;
  }
}

/* Sections */

.section {
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--rule);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px 48px;
  align-items: end;
  margin-bottom: 40px;
}

.section-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  max-width: var(--measure);
}

@media (max-width: 800px) {
  .section-head {
    grid-template-columns: 1fr;
  }
}

.group-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 56px 0 6px;
}

.group-note {
  color: var(--muted);
  margin: 0 0 22px;
  max-width: var(--measure);
}

/* Products */

.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.product {
  display: flex;
  flex-direction: column;
}

.product-media {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product screenshot sliders: a snap-scrolling strip that swipes without script; site.js adds arrows and dots. */

.product-slider {
  position: relative;
}

.slider-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.slider-track::-webkit-scrollbar {
  display: none;
}

.slider-track img {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(10, 14, 24, 0.6);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms ease, background 200ms ease;
  backdrop-filter: blur(4px);
}

.slider-arrow:hover {
  background: rgba(10, 14, 24, 0.85);
}

.slider-arrow.prev {
  left: 10px;
}

.slider-arrow.next {
  right: 10px;
}

.product-slider:hover .slider-arrow,
.slider-arrow:focus-visible {
  opacity: 1;
}

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 2;
  display: flex;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(10, 14, 24, 0.45);
  transform: translateX(-50%);
}

.slider-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease;
}

.slider-dots button[aria-current='true'] {
  width: 18px;
  border-radius: 4px;
  background: #fff;
}

@media (hover: none) {
  .slider-arrow {
    display: none;
  }
}

.product-media img.fit-contain {
  object-fit: contain;
  background: #0b1a14;
}

.product h4 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 16px 0 4px;
}

.product h4 a {
  text-decoration: none;
}

.product h4 a:hover {
  color: var(--accent);
}

.product .domain {
  color: var(--live);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
}

.product p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.product-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.product-featured h4 {
  font-size: clamp(26px, 3vw, 34px);
  margin-top: 0;
}

.product-featured .points {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.product-featured .points li + li {
  margin-top: 4px;
}

.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

@media (max-width: 800px) {
  .products {
    grid-template-columns: 1fr;
  }

  .product-featured {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .product-featured h4 {
    margin-top: 16px;
  }
}

/* Client work */

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

.client-work article {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}

/* The title link covers the whole card, so the image and text open the project too. */
.client-work h4 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.client-work article:hover h4 a,
.client-work article:focus-within h4 a {
  color: var(--accent);
}

.client-work article:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.client-work h4 a:focus-visible {
  outline: none;
}

.client-work img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  border-bottom: 1px solid var(--rule);
}

.client-work .body {
  padding: 14px 16px 16px;
}

.client-work h4 {
  font-size: 17px;
  margin: 0 0 4px;
  line-height: 1.3;
}

.client-work h4 a {
  text-decoration: none;
}

.client-work h4 a:hover {
  color: var(--accent);
}

.client-work p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .client-work {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .client-work {
    grid-template-columns: 1fr;
  }
}

/* Packages */

.packages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
}

.packages li {
  border-top: 1px solid var(--rule);
  padding: 14px 0;
}

.packages a {
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
}

.packages a:hover {
  text-decoration: underline;
}

.packages p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 760px) {
  .packages {
    grid-template-columns: 1fr;
  }
}

.more-link {
  margin-top: 32px;
}

/* Experience */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline > li {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 8px 40px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}

.timeline .when {
  color: var(--muted);
  font-size: 15px;
  padding-top: 4px;
}

.timeline h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.timeline .where {
  margin: 2px 0 12px;
  color: var(--accent);
  font-weight: 600;
}

.timeline ul {
  margin: 0;
  padding-left: 18px;
  max-width: var(--measure);
}

.timeline ul li + li {
  margin-top: 6px;
}

.timeline p {
  margin: 0;
  max-width: var(--measure);
}

@media (max-width: 700px) {
  .timeline > li {
    grid-template-columns: 1fr;
  }
}

/* About */

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.about-photo {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--rule);
  width: 100%;
  max-width: 340px;
  aspect-ratio: 4 / 5;
  position: sticky;
  top: 96px;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.about-text p {
  margin: 0 0 16px;
  max-width: var(--measure);
}

.skills {
  margin: 28px 0 0;
  display: grid;
  gap: 0;
}

.skills div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 4px 24px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}

.skills dt {
  font-weight: 700;
}

.skills dd {
  margin: 0;
  color: var(--muted);
}

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

  .about-photo {
    position: static;
    max-width: 260px;
  }

  .skills div {
    grid-template-columns: 1fr;
  }
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
}

.contact-lines {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.contact-lines li {
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}

.contact-lines span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.contact-lines a {
  font-weight: 600;
  text-decoration: none;
}

.contact-lines a:hover {
  color: var(--accent);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.socials a {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
}

.socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 32px);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 11px 13px;
}

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

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.form-status {
  margin: 14px 0 0;
  min-height: 1.6em;
  font-size: 15px;
}

.form-status.success {
  color: var(--live);
}

.form-status.error {
  color: #c2412d;
}

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

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

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

/* Motion */

.product-media img,
.client-work img {
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.product-media:hover img,
.client-work article:hover img {
  transform: scale(1.04);
}

.client-work article {
  transition: transform 250ms ease, border-color 250ms ease;
}

.client-work article:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.button {
  transition: transform 150ms ease, filter 150ms ease, border-color 150ms ease;
}

.button:active {
  transform: translateY(1px);
}

.theme-toggle svg {
  transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.theme-toggle.is-turning svg {
  transform: rotate(-200deg);
}

@media (prefers-reduced-motion: no-preference) {
  .status-dot {
    position: relative;
  }

  .status-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--live);
    opacity: 0;
    animation: live-ping 2.8s ease-out infinite;
    animation-delay: calc(var(--row, 0) * 400ms + 1.2s);
  }

  @keyframes live-ping {
    0% {
      transform: scale(0.6);
      opacity: 0.7;
    }

    70%,
    100% {
      transform: scale(2.2);
      opacity: 0;
    }
  }

  .hero-intro > * {
    opacity: 0;
    transform: translateY(12px);
    animation: rise 480ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }

  .hero-intro > :nth-child(2) { animation-delay: 50ms; }
  .hero-intro > :nth-child(3) { animation-delay: 100ms; }
  .hero-intro > :nth-child(4) { animation-delay: 150ms; }
  .hero-intro > :nth-child(5) { animation-delay: 200ms; }


  @keyframes rise {
    to {
      opacity: 1;
      transform: none;
    }
  }

  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--stagger, 0) * 70ms);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .timeline > li {
    position: relative;
  }

  .js .timeline > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    height: 2px;
    width: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 150ms;
  }

  .js .timeline > li.is-visible::before {
    transform: scaleX(0.18);
  }
}

/* Colour themes */

:root[data-accent="violet"] { --accent: #7c3aed; --accent-soft: #efe7fd; --focus: #7c3aed; }
:root[data-accent="emerald"] { --accent: #0f7f5c; --accent-soft: #dcf3ea; --focus: #0f7f5c; }
:root[data-accent="sunset"] { --accent: #c94a14; --accent-soft: #fbe6dc; --focus: #c94a14; }
:root[data-accent="rose"] { --accent: #c92f60; --accent-soft: #fbe3ea; --focus: #c92f60; }

:root[data-theme="dark"][data-accent="violet"] { --accent: #b79bff; --accent-soft: #2c2348; --focus: #b79bff; }
:root[data-theme="dark"][data-accent="emerald"] { --accent: #4fd1a5; --accent-soft: #15352b; --focus: #4fd1a5; }
:root[data-theme="dark"][data-accent="sunset"] { --accent: #ff9a6a; --accent-soft: #3a2419; --focus: #ff9a6a; }
:root[data-theme="dark"][data-accent="rose"] { --accent: #ff8fb0; --accent-soft: #3a1d28; --focus: #ff8fb0; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-accent="violet"] { --accent: #b79bff; --accent-soft: #2c2348; --focus: #b79bff; }
  :root:not([data-theme="light"])[data-accent="emerald"] { --accent: #4fd1a5; --accent-soft: #15352b; --focus: #4fd1a5; }
  :root:not([data-theme="light"])[data-accent="sunset"] { --accent: #ff9a6a; --accent-soft: #3a2419; --focus: #ff9a6a; }
  :root:not([data-theme="light"])[data-accent="rose"] { --accent: #ff8fb0; --accent-soft: #3a1d28; --focus: #ff8fb0; }
}

/* Theme picker */

.theme-menu {
  position: relative;
  display: flex;
  gap: 6px;
  margin-left: 6px;
}

.theme-menu .theme-toggle {
  margin-left: 0;
}

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

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

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }

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

.theme-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 268px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 18px 40px -18px rgba(10, 20, 40, 0.35);
  z-index: 60;
  transform-origin: top right;
}

.theme-panel[hidden] {
  display: none;
}

.panel-label {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.panel-label + .segmented,
.panel-label + .swatches {
  margin-bottom: 16px;
}

.swatches + .panel-label {
  margin-top: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 3px;
}

.segmented button {
  font: 600 14px/1 var(--body);
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 9px 4px;
  cursor: pointer;
}

.segmented button[aria-checked="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(10, 20, 40, 0.15);
}

.swatches {
  display: flex;
  gap: 10px;
  margin-bottom: 0;
}

.swatches button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--rule);
  background: var(--swatch);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.swatches button:hover {
  transform: scale(1.1);
}

.swatches button[aria-checked="true"] {
  box-shadow: 0 0 0 2px var(--ink);
}

/* Header on scroll */

.site-header {
  transition: box-shadow 250ms ease, background-color 250ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px -22px rgba(10, 20, 40, 0.6);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
  z-index: 70;
  pointer-events: none;
}

/* Hero extras */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hero-glow span {
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 820px;
  max-height: 820px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 62%);
  opacity: 0.16;
  will-change: transform;
}

.hero-glow span:nth-child(1) {
  top: -18%;
  left: -10%;
}

.hero-glow span:nth-child(2) {
  bottom: -30%;
  right: -8%;
  background: radial-gradient(circle, var(--live) 0%, transparent 62%);
  opacity: 0.1;
}

.hero-typed {
  font-family: var(--display);
  font-size: clamp(18px, 2vw, 22px);
  margin: 0 0 18px;
  color: var(--muted);
  min-height: 1.4em;
}

.hero-typed strong {
  color: var(--accent);
  font-weight: 700;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: var(--accent);
}

.board {
  position: relative;
  overflow: hidden;
}

.board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(260px circle at var(--spot-x, 50%) var(--spot-y, -40%), var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.board:hover::before {
  opacity: 1;
}

.board > * {
  position: relative;
}

/* Tech marquee */

.marquee {
  border-top: 1px solid var(--rule);
  overflow: hidden;
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 0;
}

.marquee-track span {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--muted);
  padding: 0 22px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 44px;
}

.marquee-track span::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 0;
}

.product-media {
  transform-style: preserve-3d;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-intro > :nth-child(6) { animation-delay: 250ms; }

  .hero-glow span:nth-child(1) {
    animation: drift-a 18s ease-in-out infinite alternate;
  }

  .hero-glow span:nth-child(2) {
    animation: drift-b 22s ease-in-out infinite alternate;
  }

  @keyframes drift-a {
    to { transform: translate(18vw, 14vh) scale(1.15); }
  }

  @keyframes drift-b {
    to { transform: translate(-16vw, -12vh) scale(0.9); }
  }

  .caret {
    animation: blink 1s steps(1) infinite;
  }

  @keyframes blink {
    50% { opacity: 0; }
  }

  .marquee-track {
    animation: marquee 38s linear infinite;
    will-change: transform;
  }

  .marquee.is-offscreen .marquee-track {
    animation-play-state: paused;
  }

  .marquee:hover .marquee-track,
  .hero.is-offscreen .hero-glow span {
    animation-play-state: paused;
  }

  @keyframes marquee {
    to { transform: translateX(-50%); }
  }

  .product-media.is-tilting {
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
    box-shadow: 0 24px 40px -24px rgba(10, 20, 40, 0.55);
    transition: transform 80ms linear, box-shadow 300ms ease;
  }

  .theme-panel:not([hidden]) {
    animation: panel-in 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  @keyframes panel-in {
    from {
      opacity: 0;
      transform: translateY(-6px) scale(0.97);
    }
  }

  body,
  .site-header,
  .board,
  .contact-form,
  .client-work article,
  .button,
  .field input,
  .field textarea {
    transition-property: background-color, border-color, color, transform, filter, box-shadow;
    transition-duration: 350ms;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* Impact */

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

.highlights li {
  border-top: 2px solid var(--ink);
  padding: 22px 0 30px;
}

.highlights strong {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.highlights h3 {
  font-size: 18px;
  margin: 12px 0 6px;
}

.highlights p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 40ch;
}

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

@media (max-width: 560px) {
  .highlights {
    grid-template-columns: 1fr;
  }
}

.packages p a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.packages .name {
  font-weight: 700;
  color: var(--ink);
}

.packages .status {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--rule);
  vertical-align: 1px;
}

.publication {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  max-width: var(--measure);
}

.publication .pub-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.publication .pub-meta {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 15px;
}

.publication .pub-meta + p:not(.pub-meta) {
  margin-top: 12px;
}

.publication .status {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--live);
  background: var(--live-soft);
}
