:root {
  color-scheme: dark;
  --page-bg: #081018;
  --surface: #101923;
  --surface-soft: #14212c;
  --text: #f4f7fb;
  --muted: #aab5c5;
  --line: #293746;
  --teal: #50d8c7;
  --teal-soft: #143a37;
  --blue: #92a3ff;
  --blue-soft: #202b4a;
  --success: #67dfa1;
  --danger-soft: #3b2d32;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --nav-surface: rgba(8, 16, 24, 0.86);
  --nav-border: rgba(255, 255, 255, 0.08);
  --brand-bg: #f4f7fb;
  --brand-text: #111820;
  --button-ghost-bg: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] {
  color-scheme: light;
  --page-bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #edf2f5;
  --text: #17212b;
  --muted: #5e6b79;
  --line: #d9e1e7;
  --teal: #137a72;
  --teal-soft: #dff1ed;
  --blue: #5269cf;
  --blue-soft: #e5e9fb;
  --success: #137a50;
  --danger-soft: #f2e5e7;
  --shadow: 0 20px 55px rgba(35, 48, 60, 0.1);
  --nav-surface: rgba(245, 247, 250, 0.88);
  --nav-border: rgba(23, 33, 43, 0.08);
  --brand-bg: #17212b;
  --brand-text: #ffffff;
  --button-ghost-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--page-bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--text);
  color: var(--page-bg);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  overflow: clip;
  border-bottom: 1px solid var(--nav-border);
  background: var(--nav-surface);
  color: var(--text);
  backdrop-filter: blur(18px) saturate(145%);
}

.page-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.78;
}

.page-progress > span {
  width: 100%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--teal), var(--blue), #f28c78);
  box-shadow: 0 0 14px rgba(80, 216, 199, 0.34);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.content-shell {
  width: min(calc(100% - 40px), 1160px);
  margin-inline: auto;
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-bg);
  color: var(--brand-text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: contents;
}

.header-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.header-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.header-nav a {
  position: relative;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.header-nav a::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 5px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms ease;
}

.header-nav a:hover,
.header-nav a:focus-visible,
.header-nav a.is-active {
  background: var(--surface);
  color: var(--teal);
}

.header-nav a:hover::after,
.header-nav a:focus-visible::after,
.header-nav a.is-active::after {
  transform: scaleX(1);
}

.theme-toggle {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-ghost-bg);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.theme-icon {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
  transition: transform 180ms ease;
}

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

html[data-theme="light"] .theme-icon-moon {
  display: block;
}

.theme-toggle:hover .theme-icon,
.theme-toggle:focus-visible .theme-icon {
  transform: translateY(-1px) scale(1.06);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--teal);
  outline: none;
  box-shadow: var(--shadow);
}

.project-hero,
.directory-hero {
  position: relative;
  isolation: isolate;
  min-height: 690px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #071018;
  color: #ffffff;
}

.project-hero::after,
.directory-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(4, 10, 16, 0.7);
}

.hero-media {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-hero .content-shell,
.directory-hero .content-shell {
  padding-top: 64px;
  padding-bottom: 72px;
}

.breadcrumbs {
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
}

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

.breadcrumbs li + li::before {
  margin-right: 8px;
  content: "/";
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 20px;
  font-size: 58px;
}

h2 {
  margin-bottom: 16px;
  font-size: 34px;
}

h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.hero-lede {
  max-width: 760px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 21px;
  line-height: 1.55;
}

.pill-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-row span,
.tag-row span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(7, 16, 24, 0.64);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover,
.button:focus-visible {
  outline: none;
  transform: translateY(-2px);
}

.button.primary {
  background: var(--teal);
  color: #061410;
}

html[data-theme="light"] .button.primary {
  color: #ffffff;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(9, 20, 29, 0.76);
  color: #ffffff;
}

.project-facts {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fact-grid div {
  min-width: 0;
  padding: 24px 20px;
}

.fact-grid div + div {
  border-left: 1px solid var(--line);
}

.fact-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.fact-grid strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
}

.page-section {
  padding-block: 76px;
}

.page-section + .page-section {
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

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

.case-item {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.case-item:nth-child(2) {
  border-top-color: var(--blue);
}

.case-item:nth-child(3) {
  border-top-color: var(--success);
}

.case-label {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.role-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 60px;
  align-items: start;
}

.role-summary {
  padding-left: 18px;
  border-left: 3px solid var(--teal);
}

.role-summary p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.project-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
}

.project-note + .tag-row,
.role-summary + .tag-row {
  margin-top: 22px;
}

.tag-row span {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

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

.gallery-grid figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.gallery-media-button {
  position: relative;
  width: 100%;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #070d12;
  color: #ffffff;
  cursor: zoom-in;
}

.gallery-grid img,
.gallery-grid video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #070d12;
}

.gallery-media-button img,
.gallery-media-button video {
  transition:
    filter 220ms ease,
    transform 280ms ease;
}

.gallery-media-button:hover img,
.gallery-media-button:hover video,
.gallery-media-button:focus-visible img,
.gallery-media-button:focus-visible video {
  filter: brightness(0.82);
  transform: scale(1.025);
}

.gallery-media-button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: -3px;
}

.gallery-zoom-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(6, 12, 18, 0.78);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  opacity: 0.88;
  transition:
    background-color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.gallery-zoom-mark::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.gallery-zoom-mark::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 21px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

.gallery-media-button:hover .gallery-zoom-mark,
.gallery-media-button:focus-visible .gallery-zoom-mark {
  background: rgba(6, 12, 18, 0.94);
  opacity: 1;
  transform: translateY(-1px);
}

.gallery-grid figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #ffffff;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 12, 0.88);
  backdrop-filter: blur(14px) saturate(120%);
}

.gallery-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  height: min(88dvh, 860px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #081018;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.58);
}

.gallery-lightbox-toolbar,
.gallery-lightbox-caption {
  position: relative;
  z-index: 2;
  padding: 14px 18px;
  background: #101923;
}

.gallery-lightbox-toolbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-lightbox-toolbar div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.gallery-lightbox-toolbar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-lightbox-toolbar span,
.gallery-lightbox-caption {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.gallery-lightbox-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #03070a;
}

.gallery-lightbox-stage img,
.gallery-lightbox-stage video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-lightbox-caption {
  min-height: 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 16, 24, 0.88);
  color: #ffffff;
  cursor: pointer;
}

.gallery-lightbox-close {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.gallery-lightbox-close::before,
.gallery-lightbox-close::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 10px;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.gallery-lightbox-close::before {
  transform: rotate(45deg);
}

.gallery-lightbox-close::after {
  transform: rotate(-45deg);
}

.gallery-lightbox-nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 44px;
  height: 56px;
  border-radius: 8px;
  transform: translateY(-50%);
}

.gallery-lightbox-prev {
  left: 16px;
}

.gallery-lightbox-next {
  right: 16px;
}

.gallery-lightbox-nav::before {
  content: "";
  position: absolute;
  top: 19px;
  width: 14px;
  height: 14px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.gallery-lightbox-prev::before {
  left: 17px;
  transform: rotate(-45deg);
}

.gallery-lightbox-next::before {
  right: 17px;
  transform: rotate(135deg);
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible,
.gallery-lightbox-nav:hover,
.gallery-lightbox-nav:focus-visible {
  border-color: var(--teal);
  background: #14212c;
  color: var(--teal);
  outline: none;
}

body.lightbox-open {
  overflow: hidden;
}

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

.related-card,
.directory-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.related-card:hover,
.related-card:focus-visible,
.directory-card:hover,
.directory-card:focus-visible {
  border-color: var(--teal);
  outline: none;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.related-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
}

.related-card img {
  width: 92px;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  background: var(--surface-soft);
}

.related-card div,
.directory-card__body {
  min-width: 0;
  padding: 16px;
}

.related-card span,
.directory-card__meta {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.related-card strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.directory-hero {
  min-height: 560px;
}

.directory-hero h1 {
  max-width: 780px;
}

.directory-grid {
  margin-top: 32px;
}

.directory-card {
  display: flex;
  flex-direction: column;
}

.directory-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #070d12;
}

.directory-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.directory-card p {
  margin-bottom: 20px;
  color: var(--muted);
}

.directory-card__action {
  margin-top: auto;
  color: var(--teal);
  font-size: 14px;
  font-weight: 850;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner a {
  color: var(--teal);
}

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

@media (max-width: 900px) {
  .project-hero,
  .directory-hero {
    min-height: 640px;
  }

  h1 {
    font-size: 46px;
  }

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

  .fact-grid div:nth-child(3) {
    border-left: 0;
  }

  .fact-grid div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .case-grid,
  .gallery-grid,
  .related-grid,
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 168px;
  }

  .content-shell {
    width: calc(100% - 28px);
  }

  .header-inner {
    width: calc(100% - 28px);
    min-height: auto;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
  }

  .header-tools {
    display: contents;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .header-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
    gap: 4px;
  }

  .header-nav a {
    min-height: 34px;
    justify-content: center;
    padding: 7px 8px;
    font-size: 13px;
    text-align: center;
  }

  .page-progress {
    opacity: 1;
  }

  .gallery-lightbox {
    padding: 0;
  }

  .gallery-lightbox-dialog {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .gallery-lightbox-toolbar,
  .gallery-lightbox-caption {
    padding-inline: 14px;
  }

  .gallery-lightbox-prev {
    left: 8px;
  }

  .gallery-lightbox-next {
    right: 8px;
  }

  .project-hero,
  .directory-hero {
    min-height: 600px;
  }

  .project-hero .content-shell,
  .directory-hero .content-shell {
    padding-top: 46px;
    padding-bottom: 46px;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 28px;
  }

  .hero-lede {
    font-size: 18px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .fact-grid,
  .case-grid,
  .gallery-grid,
  .related-grid,
  .directory-grid {
    grid-template-columns: 1fr;
  }

  .fact-grid div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .page-section {
    padding-block: 56px;
  }

  .related-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .related-card img {
    width: 82px;
  }

  .footer-inner {
    min-height: 120px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
