:root {
  color-scheme: light;
  --background: #ffffff;
  --text: #252525;
  --muted: #666666;
  --link: #245ca6;
  --line: #e7e7e7;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #191919;
  --text: #e0e0e0;
  --muted: #a9a9a9;
  --link: #94b9ed;
  --line: #363636;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #191919;
    --text: #e0e0e0;
    --muted: #a9a9a9;
    --link: #94b9ed;
    --line: #363636;
  }
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--link); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 5px; }
.page { width: min(720px, calc(100% - 48px)); margin: 64px auto 40px; }
.skip-link { position: absolute; top: -60px; left: 24px; padding: 8px 12px; background: var(--background); }
.skip-link:focus { top: 12px; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 54px; }
.site-name { color: var(--text); font-size: 22px; font-weight: 650; text-decoration: none; letter-spacing: -.4px; }
.site-header nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.site-header nav a { color: var(--muted); }
.theme-toggle { border: 0; padding: 4px 0; min-height: 32px; color: var(--muted); background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--text); }

h1 { margin: 0 0 9px; font-size: 26px; line-height: 1.5; font-weight: 600; }
.intro { margin: 0 0 38px; color: var(--muted); font-size: 15px; }
.project { margin: 0 0 30px; padding: 0 0 29px; border-bottom: 1px solid var(--line); }
.project h2 { margin: 0 0 10px; font-size: 20px; line-height: 1.5; font-weight: 600; }
.project p { margin: 0; max-width: 45em; }
.project .project-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-size: 14px; }
footer { padding-top: 2px; font-size: 13px; }
footer a { color: var(--muted); }

@media (max-width: 600px) {
  .page { width: calc(100% - 40px); margin-top: 29px; }
  .site-header { margin-bottom: 38px; }
  .site-header nav { gap: 18px; }
  .site-name { font-size: 20px; }
  h1 { font-size: 24px; }
  .intro { margin-bottom: 30px; font-size: 14px; }
  .project h2 { font-size: 19px; }
  .project p { font-size: 15px; }
  .project { margin-bottom: 27px; padding-bottom: 25px; }
  .project .project-links { font-size: 14px; }
}
