:root {
  --page: 610px;
  --white: #f2f2f2;
  --ink: #1e1a29;
  --body: #1e1a29;
  --muted: #1e1a29;
  --line: #e7e7e7;
  --line-strong: #d8d8d8;
  --accent: #1e1a29;
  --green: #35a85c;
  --focus: #1e1a29;
  --theme-toggle: #000000;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --white: #120e1e;
  --ink: #f4f1ea;
  --body: #f4f1ea;
  --muted: #f4f1ea;
  --line: rgb(244 241 234 / 14%);
  --line-strong: rgb(244 241 234 / 22%);
  --accent: #f4f1ea;
  --focus: #f4f1ea;
  --theme-toggle: #f4f1ea;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--white);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color 220ms ease, color 220ms ease;
}

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

a {
  color: inherit;
}

a:hover {
  text-decoration: none;
}

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

html[data-theme="dark"] ::selection {
  background: #f4f1ea;
  color: #120e1e;
}

.page {
  width: min(calc(100% - 40px), var(--page));
  min-height: 100vh;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 20px;
  z-index: 20;
  width: calc(100% + 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 60px;
  margin-top: 20px;
  margin-left: -20px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: blur(0) saturate(1);
  -webkit-backdrop-filter: blur(0) saturate(1);
  opacity: 0;
  transform: translateY(-10px);
  transition: background-color 220ms ease, border-color 220ms ease,
    box-shadow 220ms ease, backdrop-filter 220ms ease, opacity 500ms ease,
    transform 500ms ease;
}

.is-ready .site-header {
  opacity: 1;
  transform: translateY(0);
}

.has-scrolled .site-header {
  border-color: rgb(16 16 16 / 9%);
  background: rgb(255 255 255 / 82%);
  box-shadow: none;
  backdrop-filter: blur(28px) saturate(1.75);
  -webkit-backdrop-filter: blur(28px) saturate(1.75);
}

html[data-theme="dark"] .has-scrolled .site-header {
  border-color: rgb(244 241 234 / 14%);
  background: rgb(18 14 30 / 92%);
}

.site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 3px;
}

.site-brand img {
  width: 69px;
  height: 26px;
}

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

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a.is-active {
  color: var(--accent);
}

.theme-toggle {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 5px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--theme-toggle);
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  background: rgb(0 0 0 / 8%);
}

html[data-theme="dark"] .theme-toggle:hover {
  background: rgb(244 241 234 / 10%);
}

.theme-toggle:active {
  transform: scale(0.92);
}

.theme-toggle svg {
  grid-area: 1 / 1;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-toggle-sun,
html[data-theme="dark"] .theme-toggle-moon {
  display: none;
}

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

html[data-theme="dark"] .site-brand img,
html[data-theme="dark"] .project-action img,
html[data-theme="dark"] .contact-link img,
html[data-theme="dark"] .case-visit img {
  filter: brightness(0) saturate(100%) invert(96%) sepia(8%) saturate(282%)
    hue-rotate(349deg) brightness(101%) contrast(91%);
}

.hero {
  padding: 78px 0 48px;
}

.hero-name {
  margin: 0 0 13px;
  font-size: 15px;
  font-weight: 700;
}

.hero h1,
.page-intro h1,
.case-hero h1 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(44px, 7vw, 50px);
  font-weight: 700;
  letter-spacing: -0.052em;
  line-height: 1.04;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 42px);
}

.hero-intro {
  max-width: 570px;
  margin: 28px 0 0;
  color: var(--body);
  font-size: 18px;
  line-height: 1.65;
}

.hero-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.hero-details {
  display: flow-root;
}

.availability {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 13px;
  margin-top: 30px;
  color: var(--ink);
  font-size: 11px;
}

.availability-state,
.availability-detail {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
}

.availability-state {
  padding-left: 8px;
}

.availability-detail {
  gap: 5px;
}

.availability-detail strong {
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgb(53 168 92 / 13%);
}

.section {
  padding: 18px 0 42px;
}

.section-label {
  margin: 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.project-list {
  margin-top: 9px;
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: auto;
  min-height: 48px;
  padding: 6px 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-decoration: none;
  backdrop-filter: blur(0) saturate(1);
  -webkit-backdrop-filter: blur(0) saturate(1);
  transition: padding 180ms ease, background-color 180ms ease,
    border-color 180ms ease, backdrop-filter 180ms ease;
}

.project-row:hover,
.project-row:focus-visible {
  padding-right: 12px;
  padding-left: 12px;
  border-color: rgb(16 16 16 / 9%);
  background: rgb(255 255 255 / 82%);
  backdrop-filter: blur(28px) saturate(1.75);
  -webkit-backdrop-filter: blur(28px) saturate(1.75);
}

html[data-theme="dark"] .project-row:hover,
html[data-theme="dark"] .project-row:focus-visible {
  border-color: rgb(244 241 234 / 14%);
  background: rgb(18 14 30 / 92%);
}

.project-copy {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.project-copy strong {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.4;
}

.project-copy > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  opacity: 0;
  text-overflow: ellipsis;
  transform: translateX(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-row:hover .project-copy > span,
.project-row:focus-visible .project-copy > span {
  opacity: 1;
  transform: translateX(0);
}

.project-action {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  transition: background-color 180ms ease, transform 180ms ease;
}

.project-action img {
  opacity: 0.75;
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-row:hover .project-action {
  background: #f4f4f4;
}

html[data-theme="dark"] .project-row:hover .project-action {
  background: rgb(244 241 234 / 10%);
}

.project-row:hover .project-action img {
  opacity: 1;
  transform: translateX(3px);
}

.project-row:not(.has-case-study):hover .project-action img {
  transform: translate(2px, -2px);
}

.clients > p:not(.section-label) {
  margin: 15px 0 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.85;
}

.client-highlight {
  color: inherit;
  font-weight: 700;
}

.contact > p:not(.section-label) {
  max-width: 510px;
  margin: 15px 0 18px;
  color: var(--body);
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.contact-link img {
  transition: transform 180ms ease;
}

.contact-link:hover img {
  transform: translateX(4px);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
  padding: 20px 0 34px;
  color: var(--muted);
  font-size: 10px;
}

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

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

.page-intro,
.case-hero {
  padding: 78px 0 48px;
}

.page-intro .section-label,
.case-hero .section-label {
  margin-bottom: 17px;
}

.page-intro h1,
.case-hero h1 {
  font-size: clamp(40px, 6.5vw, 52px);
}

.lead,
.case-summary {
  max-width: 560px;
  margin: 25px 0 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.7;
}

.portrait {
  margin: 0 0 38px;
}

.portrait img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.about-section {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 20px 0 38px;
}

.about-section p {
  margin: 0;
  color: var(--body);
}

.about-section p + p {
  margin-top: 14px;
}

.about-clients > p:last-child {
  line-height: 1.85;
}

.notes {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 17px;
  color: var(--body);
}

.labs {
  display: grid;
}

.lab {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 13px 0;
}

.lab p {
  display: grid;
  gap: 1px;
}

.lab strong {
  color: var(--ink);
  font-size: 13px;
}

.lab span {
  color: var(--muted);
  font-size: 12px;
}

.case-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.case-kicker span {
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.case-meta > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 15px 0;
}

.case-meta strong {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.case-meta span {
  color: var(--body);
}

.case-content {
  padding: 26px 0 10px;
}

.case-content h2 {
  margin: 32px 0 9px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.case-content h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.4;
}

.case-content p {
  margin: 0;
  color: var(--body);
  line-height: 1.75;
}

.case-content p + p,
.case-content p + ul,
.case-content p + ol,
.case-content ul + p,
.case-content ol + p,
.case-content table + h2,
.case-content .case-media + h2 {
  margin-top: 16px;
}

.case-content ul,
.case-content ol {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--body);
}

.case-content li {
  padding-left: 3px;
  line-height: 1.65;
}

.case-content li + li {
  margin-top: 6px;
}

.case-content p > img:only-child {
  position: relative;
  left: 50%;
  width: min(calc(100vw - 40px), 1278px);
  max-width: none;
  height: auto;
  margin: 28px 0 34px;
  border-radius: 16px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 25%),
    0 8px 17px rgb(35 143 220 / 10%);
  transform: translateX(-50%);
}

.case-content p > em:only-child,
.case-media figcaption {
  display: block;
  margin-top: -20px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.6;
  text-align: center;
}

.case-content table {
  display: block;
  width: 100%;
  margin: 20px 0 8px;
  overflow-x: auto;
  border-collapse: collapse;
  color: var(--body);
  font-size: 12px;
  line-height: 1.55;
}

.case-content th,
.case-content td {
  min-width: 220px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  text-align: left;
  vertical-align: top;
}

.case-content th {
  color: var(--ink);
  font-weight: 700;
}

.case-media {
  margin: 30px 0 34px;
}

.case-media--wide {
  position: relative;
  left: 50%;
  width: min(calc(100vw - 40px), 1278px);
  max-width: none;
  transform: translateX(-50%);
}

.case-media-grid {
  display: grid;
  gap: 14px;
}

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

.case-media--phones .case-media-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.case-media--wide img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 25%),
    0 8px 17px rgb(35 143 220 / 10%);
}

.case-media--phone img {
  width: min(100%, 375px);
  height: auto;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 25%),
    0 8px 17px rgb(35 143 220 / 10%);
}

.case-media figcaption {
  margin-top: 12px;
}

.case-note {
  margin-top: 34px !important;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted) !important;
  font-size: 11px;
}

.case-visit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding: 14px 0;
  font-weight: 600;
  text-decoration: none;
}

.case-visit img {
  transition: transform 180ms ease;
}

.case-visit:hover img {
  transform: translate(2px, -2px);
}

.case-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 0 18px;
}

.case-nav a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

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

.site-brand:focus-visible,
.site-nav a:focus-visible,
.theme-toggle:focus-visible,
.project-row:focus-visible,
.contact-link:focus-visible,
.site-footer a:focus-visible,
.case-visit:focus-visible,
.case-nav a:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition:
    opacity 820ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
    transform 820ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 180ms ease-in both fade-out;
}

::view-transition-new(root) {
  animation: none;
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(calc(100% - 32px), var(--page));
  }

  .site-header {
    top: 12px;
    width: calc(100% + 16px);
    gap: 18px;
    min-height: 56px;
    margin-top: 12px;
    margin-left: -8px;
    padding: 0 7px;
    border-radius: 8px;
  }

  .site-brand img {
    width: 58px;
    height: auto;
  }

  .site-nav {
    gap: 17px;
  }

  .site-nav a {
    font-size: 12px;
  }

  .hero,
  .page-intro,
  .case-hero {
    padding: 54px 0 40px;
  }

  .hero h1 {
    font-size: clamp(34px, 9.5vw, 38px);
    line-height: 1.055;
  }

  .page-intro h1,
  .case-hero h1 {
    font-size: clamp(36px, 10.4vw, 46px);
  }

  .lead,
  .case-summary {
    font-size: 15px;
  }

  .availability {
    align-items: stretch;
    gap: 8px;
  }

  .availability-state {
    width: 100%;
  }

  .availability-detail {
    flex: 0 0 90px;
    justify-content: center;
  }

  .availability-detail.weather {
    flex: 1 1 210px;
  }

  .project-row {
    height: auto;
    min-height: 48px;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .case-meta > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .case-media--duo .case-media-grid {
    grid-template-columns: 1fr;
  }

  .case-media--phones .case-media-grid {
    grid-template-columns: repeat(3, minmax(230px, 1fr));
    overflow-x: auto;
    padding: 0 0 8px;
    scroll-snap-type: x proximity;
  }

  .case-media--phones img {
    scroll-snap-align: center;
  }
}

@media (max-width: 380px) {
  .site-header {
    align-items: flex-start;
  }

  .site-brand img {
    width: 50px;
  }

  .site-nav {
    gap: 12px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .project-row {
    gap: 14px;
  }

  .project-copy strong {
    font-size: 14px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

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

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

  .site-header,
  .js .reveal {
    opacity: 1;
    transform: none;
  }

}
