:root {
  color-scheme: dark;
  --background: #090909;
  --foreground: #f2f0e9;
  --muted: #b5b5ae;
  --line: #30302e;
  --page-width: 80rem;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  width: min(calc(100% - 3rem), var(--page-width));
  margin-inline: auto;
}

.page > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.page > main {
  display: grid;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--foreground);
  text-decoration: none;
}

.brand img {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

h1 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.email,
.projects p,
.legal {
  color: var(--muted);
  font-family: var(--font-mono);
}

.email,
.legal {
  font-size: 0.9rem;
}

.projects p {
  font-size: 0.9rem;
}

.email,
.projects p {
  letter-spacing: 0.06em;
}

.email,
.document a,
.legal a {
  text-decoration-color: transparent;
}

.email {
  text-underline-offset: 0.25em;
}

.email:hover,
.email:focus-visible,
.document a:hover,
.document a:focus-visible,
.legal a:hover,
.legal a:focus-visible {
  color: var(--foreground);
  text-decoration-color: currentColor;
}

.projects,
.not-found {
  display: grid;
  place-content: center;
  text-align: center;
}

.projects,
.not-found,
.document {
  padding-block: 5rem;
}

.projects p {
  margin: 0 0 3.5rem;
  text-transform: uppercase;
}

.projects nav {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: 1.5rem;
}

.projects nav a,
.not-found h2,
.document h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 0.9;
}

.projects nav a,
.not-found h2 {
  font-size: clamp(3.5rem, 8vw, 8rem);
  letter-spacing: -0.07em;
}

.projects nav a {
  color: var(--foreground);
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  transition: text-decoration-color 140ms ease;
}

.projects nav a:hover,
.projects nav a:focus-visible {
  text-decoration-color: var(--foreground);
}

.not-found {
  justify-items: center;
}

.not-found h2 {
  margin: 0;
}

.document {
  width: min(100%, 44rem);
  margin-inline: auto;
}

.document h2 {
  margin: 0 0 4rem;
  font-size: clamp(3.5rem, 8vw, 7rem);
  letter-spacing: -0.06em;
}

.document section + section {
  margin-top: 3rem;
}

.document > .privacy-updated {
  margin-bottom: 3rem;
}

.document h3 {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document p,
.document .contact-details {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.document a {
  color: var(--foreground);
  text-underline-offset: 0.2em;
}

.legal a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.legal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  letter-spacing: 0.015em;
  line-height: 1.5rem;
}

.document .contact-details {
  margin: 0;
  font-style: normal;
}

.document .contact-details span {
  display: block;
}

.legal nav {
  display: flex;
  gap: 1.25rem;
}

@media (max-width: 44rem) {
  .page {
    width: min(calc(100% - 2.5rem), var(--page-width));
  }

  .page > header {
    gap: 1rem;
    padding-block: 1.25rem;
  }

  .brand {
    gap: 0.55rem;
  }

  .brand img {
    width: 1.25rem;
    height: 1.25rem;
  }

  h1 {
    font-size: 0.72rem;
  }

  .projects {
    place-content: center;
    padding-block: 4rem;
    text-align: center;
  }

  .projects p {
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
  }

  .projects nav {
    align-items: center;
    width: 100%;
  }

  .projects nav a {
    font-size: clamp(3.5rem, 17vw, 5rem);
  }

  .document {
    padding-block: 3rem;
  }

  .document h2 {
    margin-bottom: 2.5rem;
  }

  .document > .privacy-updated {
    margin-bottom: 2.5rem;
  }

  .document section + section {
    margin-top: 2.5rem;
  }

  .legal {
    gap: 1.5rem;
    padding-block: 1.25rem;
    line-height: 1.4rem;
  }

}

@media (max-width: 24rem) {
  .page > header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .projects nav a {
    font-size: clamp(3.25rem, 17vw, 4rem);
  }
}
