:root {
  color-scheme: light dark;
  --bg: #f4f3ef;
  --surface: #e9e8e2;
  --surface-strong: #deddd6;
  --text: #111318;
  --muted: #5d6169;
  --line: rgba(17, 19, 24, 0.16);
  --accent: #126b4c;
  --accent-ink: #f8fffb;
  --header: rgba(244, 243, 239, 0.82);
  --shadow: 0 24px 80px rgba(17, 19, 24, 0.11);
  --max: 1180px;
  --radius: 30px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10;
    --surface: #15181d;
    --surface-strong: #1c2026;
    --text: #f2f3ef;
    --muted: #9ea4ad;
    --line: rgba(242, 243, 239, 0.14);
    --accent: #42d392;
    --accent-ink: #07110d;
    --header: rgba(11, 13, 16, 0.82);
    --shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f3ef;
  --surface: #e9e8e2;
  --surface-strong: #deddd6;
  --text: #111318;
  --muted: #5d6169;
  --line: rgba(17, 19, 24, 0.16);
  --accent: #126b4c;
  --accent-ink: #f8fffb;
  --header: rgba(244, 243, 239, 0.82);
  --shadow: 0 24px 80px rgba(17, 19, 24, 0.11);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #15181d;
  --surface-strong: #1c2026;
  --text: #f2f3ef;
  --muted: #9ea4ad;
  --line: rgba(242, 243, 239, 0.14);
  --accent: #42d392;
  --accent-ink: #07110d;
  --header: rgba(11, 13, 16, 0.82);
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  transition: background-color 240ms ease, color 240ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 46rem);
}

a {
  color: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
summary {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  transform: translateY(-160%);
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(calc(100% - 2rem), var(--max));
  min-height: 64px;
  padding: 0.55rem 0.65rem 0.55rem 1.1rem;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--header);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(18px);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.brand {
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.brand span {
  color: var(--accent);
}

nav {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.4rem);
}

nav a,
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
}

nav a:hover,
nav a[aria-current="page"],
.site-footer a:hover {
  color: var(--text);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.theme-toggle__mark {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.hero {
  position: relative;
  overflow: clip;
  display: grid;
  align-content: center;
  min-height: 100svh;
  padding: 10rem max(1.25rem, calc((100vw - var(--max)) / 2)) 3rem;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 940px;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span,
.hero__location span {
  margin-inline: 0.45em;
  color: var(--muted);
}

h1,
h2,
h3,
blockquote,
p {
  text-wrap: pretty;
}

h1,
h2,
h3,
blockquote {
  margin-top: 0;
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h1 {
  max-width: 15ch;
  margin-bottom: 2rem;
  font-size: clamp(3.5rem, 8.8vw, 8.4rem);
}

h2 {
  margin-bottom: 1.3rem;
  font-size: clamp(2.8rem, 6vw, 6.1rem);
}

h3 {
  margin-bottom: 1.3rem;
  font-size: clamp(2rem, 4vw, 4.7rem);
}

.nowrap {
  white-space: nowrap;
}

.hero__summary {
  max-width: 720px;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 14px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 760;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

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

.button--primary {
  background: var(--text);
  color: var(--bg);
}

.button--quiet {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 52%, transparent);
}

.availability {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.availability__dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent);
}

.hero__location {
  position: relative;
  margin-top: 3rem;
  z-index: 2;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.hero__field {
  position: absolute;
  top: 12%;
  right: -10vw;
  width: min(54vw, 760px);
  aspect-ratio: 1;
  opacity: 0.65;
  pointer-events: none;
}

.orbit,
.signal {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit--one {
  animation: orbit 24s linear infinite;
}

.orbit--one::before,
.orbit--two::before {
  position: absolute;
  top: 50%;
  left: -7px;
  width: 14px;
  height: 14px;
  content: "";
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 28px var(--accent);
}

.orbit--two {
  inset: 17%;
  animation: orbit 17s linear infinite reverse;
}

.signal {
  inset: 34%;
  border: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 68%);
  animation: pulse 4s ease-in-out infinite;
}

.proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof__item {
  display: grid;
  align-content: start;
  min-height: 180px;
  padding: 2rem 1.4rem;
  border-right: 1px solid var(--line);
}

.proof__item:last-child {
  border-right: 0;
}

.proof__item strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 4vw, 3.8rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.proof__item span {
  max-width: 15ch;
  color: var(--muted);
  font-size: 0.88rem;
}

.section {
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
  padding-block: clamp(7rem, 14vw, 12rem);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 5rem;
}

.section-heading > p:last-child,
.contact > p:not(.eyebrow),
.principle__frame > p:last-child,
.writing__copy > p,
.writing-hero > p:last-child {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
}

.story-stack {
  display: grid;
  gap: 2rem;
}

.story {
  position: relative;
  display: grid;
  grid-template-columns: 82px 1fr minmax(180px, 0.32fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  min-height: 420px;
  padding: clamp(1.5rem, 4vw, 4rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.story::after {
  position: absolute;
  right: -12%;
  bottom: -45%;
  width: 48%;
  aspect-ratio: 1;
  content: "";
  border-radius: 50%;
  background: var(--story-color);
  opacity: 0.18;
  filter: blur(2px);
}

.story--lime { --story-color: #42d392; }
.story--blue { --story-color: #5b8cff; }
.story--violet { --story-color: #9c74ff; }
.story--orange { --story-color: #ff9e56; }
.story--pink { --story-color: #fa6c95; }

.story__index {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.story__copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 700px;
}

.story__copy > p:last-child {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.story__label {
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.story__metric {
  position: relative;
  z-index: 1;
  align-self: end;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.story__metric strong,
.story__metric span {
  display: block;
}

.story__metric strong {
  font-size: clamp(2rem, 4vw, 3.7rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.story__metric span {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

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

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

.service {
  border-bottom: 1px solid var(--line);
}

.service summary {
  display: grid;
  grid-template-columns: 56px 1fr 30px;
  align-items: center;
  gap: 1rem;
  min-height: 112px;
  cursor: pointer;
  list-style: none;
}

.service summary::-webkit-details-marker {
  display: none;
}

.service summary span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.service summary strong {
  font-size: clamp(1.2rem, 2.6vw, 2.2rem);
  letter-spacing: -0.035em;
}

.service summary i {
  position: relative;
  width: 24px;
  height: 24px;
}

.service summary i::before,
.service summary i::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  content: "";
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 180ms ease;
}

.service summary i::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.service[open] summary i::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.service > p {
  max-width: 760px;
  margin: -0.7rem 2rem 2.2rem 72px;
  color: var(--muted);
  font-size: 1.05rem;
}

.principle {
  padding-top: 2rem;
}

.principle__frame {
  padding: clamp(2rem, 7vw, 7rem);
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
}

.principle blockquote {
  max-width: 920px;
  margin-bottom: 2rem;
  font-size: clamp(2.8rem, 6.5vw, 6.3rem);
}

.principle__frame .eyebrow {
  color: var(--bg);
}

.principle__frame > p:last-child {
  color: color-mix(in srgb, var(--bg) 68%, transparent);
}

.writing {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.writing__copy h2 {
  font-size: clamp(2.8rem, 5.2vw, 5.4rem);
}

.text-link {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1rem;
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  font-weight: 750;
}

.writing__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

.writing__topics span {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 680;
}

.contact {
  padding-block: clamp(8rem, 18vw, 16rem);
}

.contact h2 {
  max-width: 980px;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.button__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

.site-footer div {
  display: flex;
  gap: 1.5rem;
}

.writing-page,
.not-found {
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
}

.writing-hero {
  display: grid;
  align-content: end;
  min-height: 72svh;
  padding: 10rem 0 5rem;
}

.writing-hero h1 {
  max-width: 12ch;
}

.empty-state {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 2rem;
  align-items: center;
  min-height: 260px;
  margin-bottom: 8rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-state__mark {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.empty-state h2 {
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.empty-state p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.not-found {
  display: grid;
  place-content: center;
  min-height: 100svh;
  text-align: center;
}

.not-found h1 {
  max-width: 12ch;
}

.not-found .button {
  justify-self: center;
}

.reveal.is-visible {
  animation: reveal 600ms ease both;
}

.reveal:focus-within {
  animation: none;
}

@keyframes reveal {
  from { opacity: 0.7; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  50% { transform: scale(1.12); opacity: 0.7; }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 1rem;
    flex-wrap: wrap;
  }

  nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

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

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

  .hero {
    padding-top: 10rem;
  }

  .hero__field {
    top: 16%;
    right: -36vw;
    width: 90vw;
    opacity: 0.42;
  }

  .hero__location {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 4rem;
  }

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

  .proof__item:nth-child(2) {
    border-right: 0;
  }

  .proof__item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .story {
    grid-template-columns: 46px 1fr;
    min-height: auto;
  }

  .story__metric {
    grid-column: 2;
  }

  .writing {
    grid-template-columns: 1fr;
  }

  .writing__topics {
    justify-content: flex-start;
  }

  .empty-state {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  nav {
    gap: 0.65rem;
  }

  nav a {
    font-size: 0.82rem;
  }

  .site-header {
    top: 0.65rem;
    width: calc(100% - 1rem);
  }

  .theme-toggle [data-theme-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  h1 {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .hero__actions,
  .hero__actions .button {
    width: 100%;
  }

  .proof {
    grid-template-columns: 1fr;
  }

  .proof__item,
  .proof__item:nth-child(2) {
    min-height: 130px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof__item:last-child {
    border-bottom: 0;
  }

  .story-stack {
    gap: 1.25rem;
  }

  .story {
    display: block;
    min-height: auto;
    padding: 1.5rem;
  }

  .story__index {
    margin-bottom: 3rem;
  }

  .story__metric {
    margin-top: 2rem;
  }

  .service summary {
    grid-template-columns: 36px 1fr 24px;
    min-height: 102px;
  }

  .service > p {
    margin-left: 52px;
  }

  .site-footer {
    display: grid;
    gap: 1rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Native hidden must override component display rules. */
[hidden] { display: none !important; }

.engagements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.engagements article {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.engagements h3 {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.engagements p {
  margin-bottom: 0;
  color: var(--muted);
}

.hero__experience {
  max-width: 720px;
  margin: -0.75rem 0 2rem;
  color: var(--muted);
}

.case-study-list {
  display: grid;
  gap: 1.25rem;
}

.case-study {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.case-study h3 {
  max-width: 28ch;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.1;
}

.case-study > p:not(.eyebrow),
.case-study__detail p {
  max-width: 75ch;
  color: var(--muted);
}

.case-study summary {
  padding-block: 0.75rem;
  cursor: pointer;
  font-weight: 700;
}

.case-study__detail {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.case-study h4 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.case-study__detail p {
  margin-top: 0;
}

.work-profiles {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.work-profiles__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
}

.work-profiles__link:hover {
  border-color: var(--text);
}

.work-profiles__link svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
