:root {
  color-scheme: light dark;
  --paper: oklch(0.985 0.004 80);
  --ink: oklch(0.2 0.01 250);
  --muted: oklch(0.51 0.012 250);
  --hairline: oklch(0.89 0.008 80);
  --focus: oklch(0.55 0.15 250);
  font-family: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: oklch(0.19 0.008 250);
    --ink: oklch(0.94 0.006 80);
    --muted: oklch(0.68 0.01 250);
    --hairline: oklch(0.31 0.008 250);
    --focus: oklch(0.75 0.12 245);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: oklch(0.985 0.004 80);
  --ink: oklch(0.2 0.01 250);
  --muted: oklch(0.51 0.012 250);
  --hairline: oklch(0.89 0.008 80);
  --focus: oklch(0.55 0.15 250);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: oklch(0.19 0.008 250);
  --ink: oklch(0.94 0.006 80);
  --muted: oklch(0.68 0.01 250);
  --hairline: oklch(0.31 0.008 250);
  --focus: oklch(0.75 0.12 245);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 220ms ease-out, color 220ms ease-out;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
}

.page {
  display: flex;
  flex-direction: column;
  width: min(100%, 1440px);
  min-height: 100svh;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 5vw, 4.5rem) 2rem;
}

.masthead {
  min-height: clamp(7rem, 16vh, 12rem);
}

.brand {
  display: inline-flex;
  padding: 0.5rem 0;
}

.brand span {
  display: block;
  width: 7.35rem;
  height: 1rem;
  background: currentColor;
  mask: url("./assets/anneven.svg") left center / contain no-repeat;
  -webkit-mask: url("./assets/anneven.svg") left center / contain no-repeat;
}

.introduction,
.work {
  width: min(100%, 46rem);
}

h1 {
  max-width: 30ch;
  margin: 0;
  font-size: clamp(1.9rem, 3.25vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.09;
  text-wrap: pretty;
}

.work {
  margin-top: clamp(7rem, 15vh, 11rem);
}

.work h2 {
  margin: 0 0 2.75rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-list {
  display: grid;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project {
  display: inline-flex;
  flex-direction: column;
  gap: 0.45rem;
  text-decoration: none;
}

.project-name {
  width: fit-content;
  border-bottom: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: border-color 180ms ease-out;
}

.project-description {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-wrap: pretty;
  transition: color 180ms ease-out;
}

.project:hover .project-description {
  color: var(--ink);
}

.project:hover .project-name,
.project:focus-visible .project-name {
  border-bottom-color: var(--muted);
}

.project:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

.page-mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: min(100%, 46rem);
  margin-top: auto;
  padding-top: clamp(7rem, 15vh, 11rem);
}

.page-mark-separator {
  color: var(--muted);
  font-size: 0.8rem;
}

.page-mark-logo {
  display: block;
  padding: 0.5rem;
  margin: -0.5rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  line-height: 0;
  transition: color 180ms ease-out;
}

.page-mark-logo span {
  display: block;
  width: 1.4rem;
  height: 1.29rem;
  background: currentColor;
  mask: url("./assets/monogram.svg") center / contain no-repeat;
  -webkit-mask: url("./assets/monogram.svg") center / contain no-repeat;
}

.page-mark-logo:hover,
.page-mark-logo:focus-visible {
  color: var(--ink);
}

.page-mark a:not(.page-mark-logo) {
  color: var(--muted);
  padding: 0.4rem 0;
  margin: -0.4rem 0;
  border-bottom: 1px solid transparent;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 180ms ease-out, border-color 180ms ease-out;
}

.page-mark a:not(.page-mark-logo):hover {
  color: var(--ink);
  border-bottom-color: var(--muted);
}

.page-mark a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--muted);
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

@media (max-width: 640px) {
  .masthead {
    min-height: 8rem;
  }

  h1 {
    font-size: clamp(1.75rem, 8.5vw, 2.4rem);
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
