:root {
  --bg: #ffffff;
  --fg: #161616;
  --muted: #6a6a6a;
  --link: #5555cc;
  --visited: #7755aa;
  --rule: #e8e8e8;
  --surface: rgba(127, 127, 127, 0.06);
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --fg: #f2f2f2;
    --muted: #b5b5b5;
    --link: #88aaff;
    --visited: #bb99ee;
    --rule: #222;
    --surface: rgba(255, 255, 255, 0.06);
  }
}

html {
  color-scheme: light dark;

  background: var(--bg);
}

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

::selection {
  background: color-mix(in srgb, var(--link) 24%, transparent);
}

body {
  max-width: var(--max-width);

  margin: 48px auto;
  padding: 0 20px;

  background: var(--bg);
  color: var(--fg);

  font-family:
    Inter,
    system-ui,
    sans-serif;

  font-size: 17px;
  line-height: 1.7;

  text-rendering: optimizeLegibility;
}

header {
  margin-bottom: 4rem;
}

footer {
  margin-top: 4rem;
  padding-top: 1rem;

  border-top: 1px solid var(--rule);

  color: var(--muted);

  font-size: 0.9rem;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

h1,
h2,
h3 {
  margin: 0;

  font-weight: 600;
  line-height: 1.2;

  letter-spacing: -0.03em;
}

h1 {
  font-size: 3rem;
}

h2 {
  margin-bottom: 0.5rem;

  font-size: 1.35rem;
}

h3 {
  margin-bottom: 0.5rem;

  font-size: 1.05rem;
}

.tagline {
  margin-top: 0.6rem;

  color: var(--muted);

  white-space: nowrap;
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;

  flex-shrink: 0;

  padding-top: 1.5rem;
}

nav a {
  text-decoration: none;

  transition: color 120ms ease;
}

nav a:hover {
  color: var(--fg);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: -10px;
}

.icon-link svg {
  width: 1.5rem;
  height: 1.5rem;

  fill: currentColor;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

article {
  padding-block: 0.1rem;
}

article + article {
  margin-top: 1.25rem;
}

p {
  margin: 0;
}

a {
  color: var(--link);
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

a:visited {
  color: var(--visited);
}

.stack {
  margin-top: 0.5rem;

  color: var(--muted);

  font-size: 0.95rem;
}

.project-list h2 {
  margin-bottom: 0.45rem;

  font-size: 1.1rem;
}

ul {
  margin-block: 0;
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.3rem;
}

code,
pre {
  font-family:
    "JetBrains Mono",
    "Iosevka",
    monospace;
}

code {
  font-size: 0.9em;
}

pre {
  overflow-x: auto;

  padding: 0.8rem;

  border: 1px solid var(--rule);
  border-radius: 8px;

  background: var(--surface);

  font-size: 0.85rem;
  line-height: 1.5;

  tab-size: 2;
}

pre code {
  font-size: inherit;
}

@media (max-width: 700px) {
  body {
    margin: 32px auto;
    padding: 0 20px;

    font-size: 16px;
  }

  header {
    margin-bottom: 2.5rem;
  }

  .hero {
    flex-direction: column;
    gap: 1.25rem;
  }

  nav {
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0;
  }

  h1 {
    font-size: 2.4rem;
  }

  .tagline {
    white-space: normal;
  }

  footer {
    margin-top: 2.5rem;
    padding-top: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  nav a {
    transition: none;
  }
}
