:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --ink: #272923;
  --muted: #6b6d64;
  --line: #deded6;
  --accent: #426749;
  --copy: #4e5049;
  --archived: #55574f;
  --separator: #a4a59e;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171916;
  --ink: #eeeee7;
  --muted: #a6a99f;
  --line: #393c34;
  --accent: #a9c783;
  --copy: #c4c6bc;
  --archived: #a1a398;
  --separator: #7f8277;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #171916;
    --ink: #eeeee7;
    --muted: #a6a99f;
    --line: #393c34;
    --accent: #a9c783;
    --copy: #c4c6bc;
    --archived: #a1a398;
    --separator: #7f8277;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.site-header,
.site-footer {
  display: flex;
  width: min(100% - 48px, 780px);
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.brand img {
  border-radius: 50%;
}

.site-header nav {
  display: flex;
  gap: 24px;
}

.site-header nav a,
.site-footer a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

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

.theme-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--ink);
  text-decoration: underline;
}

main {
  width: min(100% - 48px, 700px);
  margin: 0 auto;
}

.intro {
  padding: 82px 0 74px;
}

.location {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(36px, 7vw, 52px);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.15;
}

.intro-text {
  max-width: 550px;
  margin-bottom: 18px;
  color: var(--copy);
  font-size: 17px;
  line-height: 1.7;
}

.intro-links {
  display: flex;
  gap: 18px;
  margin: 0;
  font-size: 14px;
}

.content-section {
  padding: 30px 0 34px;
  border-top: 1px solid var(--line);
}

.content-section h2 {
  margin-bottom: 15px;
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.section-copy {
  max-width: 570px;
  color: var(--copy);
  font-size: 14px;
}

.section-copy p {
  margin-bottom: 10px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
}

.section-heading > a {
  flex-shrink: 0;
  font-size: 12px;
}

.project {
  padding: 20px 0 18px;
  border-top: 1px solid var(--line);
}

.project-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.project-heading h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.015em;
}

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

.project p {
  max-width: 570px;
  margin: 0 0 6px;
  color: var(--copy);
  font-size: 13px;
}

.project > a {
  font-size: 12px;
}

.project-archived h3 {
  color: var(--archived);
}

.contact-section {
  padding-bottom: 38px;
}

.separator {
  padding-inline: 8px;
  color: var(--separator);
}

.discord-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
}

.discord-copy {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.copy-feedback {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  min-height: 72px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 520px) {
  .site-header,
  .site-footer,
  main {
    width: calc(100% - 36px);
  }

  .site-header {
    min-height: 68px;
  }

  .site-header nav {
    gap: 14px;
  }

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

  .theme-toggle {
    font-size: 12px;
  }

  .intro {
    padding: 64px 0 58px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .section-heading h2 {
    margin-bottom: 4px;
  }

  .project-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}

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