:root {
  color-scheme: light dark;
  --site-background: var(--brand-color-surface-light);
  --site-surface: var(--brand-color-surface-subtle-light);
  --site-text: var(--brand-color-text-light);
  --site-muted: var(--brand-color-muted-light);
  --site-link: var(--brand-color-primary);
  --site-accent: var(--brand-color-accent-light);
  --site-content-width: 72rem;
  --site-copy-width: var(--brand-copy-max-width);
  --site-header-height: 5.5rem;
  --site-radius: 1.25rem;
  --site-border: color-mix(in srgb, currentColor 14%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --site-background: var(--brand-color-surface-dark);
    --site-surface: var(--brand-color-surface-raised-dark);
    --site-text: var(--brand-color-text-dark);
    --site-muted: var(--brand-color-muted-dark);
    --site-link: var(--brand-color-primary-dark);
    --site-accent: var(--brand-color-accent-dark);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--site-header-height) + 1rem);
}

body {
  min-width: 20rem;
  margin: 0;
  background: var(--site-background);
  color: var(--site-text);
  font-family: var(--brand-font-body);
  font-size: var(--brand-font-size-body);
  line-height: var(--brand-line-height-body);
}

a {
  color: var(--site-link);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--site-accent);
}

a:focus-visible {
  outline: 3px solid var(--site-accent);
  outline-offset: 4px;
  border-radius: 0.15rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--brand-font-display);
  font-weight: var(--brand-font-weight-bold);
  line-height: var(--brand-line-height-heading-large);
}

h1 {
  max-width: 15ch;
  font-size: var(--brand-font-size-heading-large);
  line-height: var(--brand-line-height-heading-large);
  letter-spacing: -0.045em;
}

h2 {
  font-size: var(--brand-font-size-heading-medium);
  line-height: var(--brand-line-height-heading-medium);
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--brand-font-size-heading-small);
  line-height: var(--brand-line-height-heading-small);
}

h4 {
  font-size: var(--brand-font-size-body);
}

p {
  margin: 0;
  font-weight: var(--brand-font-weight-regular);
  line-height: var(--brand-line-height-body);
}

.container {
  width: min(var(--site-content-width), calc(100% - 3rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 1100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  border-radius: 0.5rem;
  background: var(--site-background);
  color: var(--site-text);
}

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

.site-header {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  background: var(--site-background);
  border-bottom: 1px solid var(--site-border);
}

.header-inner {
  display: flex;
  min-height: var(--site-header-height);
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.brand-wordmark img {
  display: block;
  width: 11.5rem;
  height: auto;
}

.brand-mark {
  display: none;
}

.brand-mark img {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
}

.site-nav,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.site-nav a,
.footer-nav a {
  color: var(--site-text);
  font-size: var(--brand-font-size-small);
  font-weight: var(--brand-font-weight-semibold);
  line-height: var(--brand-line-height-control);
  text-decoration: none;
}

.site-nav a:hover,
.footer-nav a:hover {
  color: var(--site-link);
  text-decoration: underline;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(7rem, 14vh, 10rem) 4rem;
  border-bottom: 1px solid color-mix(in srgb, var(--site-text) 14%, transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-grid {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--site-accent);
  font-size: var(--brand-font-size-small);
  font-weight: var(--brand-font-weight-semibold);
  line-height: var(--brand-line-height-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.lead {
  max-width: 47rem;
  color: var(--site-muted);
  font-size: var(--brand-font-size-lead);
}

.hero-detail {
  margin-top: 1rem;
  color: var(--site-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.2rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: var(--brand-font-weight-semibold);
  line-height: var(--brand-line-height-control);
  text-decoration: none;
}

.button-primary {
  background: var(--brand-color-primary);
  color: var(--brand-color-surface-light);
}

.button-primary:hover {
  background: var(--brand-color-primary-hover);
  color: var(--brand-color-surface-light);
}

.button-primary:active {
  background: var(--brand-color-primary-pressed);
  color: var(--brand-color-surface-light);
  transform: translateY(1px);
}

@media (prefers-color-scheme: dark) {
  .button-primary {
    background: var(--brand-color-primary-dark);
    color: var(--brand-color-mark-foreground-dark);
  }

  .button-primary:hover {
    background: var(--brand-color-accent-dark);
    color: var(--brand-color-mark-foreground-dark);
  }

  .button-primary:active {
    background: var(--brand-color-primary);
    color: var(--brand-color-surface-light);
    transform: translateY(1px);
  }
}

.text-link {
  font-weight: var(--brand-font-weight-semibold);
}

.icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.18em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.section {
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.section + .section {
  border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.section-muted {
  background: var(--site-surface);
}

.section-tinted {
  background: var(--brand-color-surface-subtle-light);
}

.section-tinted .eyebrow,
.section-tinted .section-heading > p:last-child {
  color: var(--brand-color-surface-light);
}

.section-tinted a {
  color: var(--brand-color-surface-light);
}

.section-tinted a:hover {
  color: var(--brand-color-accent-fill-light);
}

@media (prefers-color-scheme: dark) {
  .section-tinted {
    background: var(--brand-color-surface-raised-dark);
    color: var(--brand-color-surface-light);
  }
}

.section-heading {
  max-width: 42rem;
  margin-bottom: 2.25rem;
}

.section-heading .eyebrow {
  margin-bottom: 0.75rem;
}

.section-heading h2 {
  margin-bottom: 0.75rem;
}

.section-heading > p:last-child {
  color: var(--site-muted);
}

.about-copy {
  max-width: var(--site-copy-width);
  color: var(--site-muted);
  font-size: var(--brand-font-size-lead);
}

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

.card {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: var(--site-background);
}

.card h3,
.card h4 {
  margin-bottom: 0.8rem;
}

.card p {
  color: var(--site-muted);
}

.project-category a {
  text-decoration: none;
}

.project-grid .card {
  color: var(--site-text);
}

.project-grid a {
  color: var(--site-link);
}

.project-grid a:hover {
  color: var(--site-accent);
}

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

.project-category + .project-category {
  margin-top: 3rem;
}

.project-category > h3 {
  margin-bottom: 1rem;
}

.category-description {
  margin-bottom: 1rem;
  color: var(--site-muted);
}

.section-action {
  margin-top: 1.5rem;
}

.contact-section {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.contact-section h2 {
  max-width: 18ch;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.contact-section > p:not(.eyebrow) {
  max-width: 38rem;
  color: var(--site-muted);
}

.contact-email {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  font-weight: var(--brand-font-weight-semibold);
}
.contact-email a {
  text-decoration: none;
}

.contact-section .button {
  margin-top: 1.5rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: var(--brand-font-weight-semibold);
  text-decoration: none;
}

.social-links a:hover {
  color: var(--site-accent);
}

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

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem 2rem;
  padding-block: 2rem;
}

.footer-identity .legal-identity {
  margin-top: 0.5rem;
}

.footer-nav {
  justify-content: flex-end;
}

.copyright,
.legal-identity {
  color: var(--site-muted);
  font-size: var(--brand-font-size-small);
}

.legal-identity strong {
  color: var(--site-text);
}

.legal-identity {
  max-width: 48rem;
  overflow-wrap: anywhere;
}

.legal-main {
  padding: calc(var(--site-header-height) + 3rem) 0 6rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-weight: 800;
}

.legal-content {
  max-width: var(--site-copy-width);
  margin-inline: auto;
}

.legal-content h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
}

.legal-content .lead {
  margin-bottom: 2.5rem;
}

.legal-content h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
}

.legal-content p + p {
  margin-top: 1rem;
}

.not-found {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--site-header-height) + 2rem) 0 5rem;
}

.not-found h1 {
  margin-bottom: 1rem;
}

.not-found > p:not(.eyebrow) {
  margin-bottom: 1.5rem;
  color: var(--site-muted);
}

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

@media (max-width: 42rem) {
  :root {
    --site-header-height: 4.5rem;
  }

  .container {
    width: min(var(--site-content-width), calc(100% - 2rem));
  }

  .header-inner {
    gap: 1rem;
  }

  .brand-wordmark {
    display: none;
  }

  .brand-mark {
    display: inline-flex;
  }

  .site-nav {
    justify-content: flex-end;
    gap: 0.35rem 0.8rem;
  }

  .site-nav a {
    font-size: 0.8rem;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    justify-content: flex-start;
  }
}

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