:root {
  color-scheme: light dark;
  --background: #f7f8f8;
  --surface: #ffffff;
  --text: #202629;
  --muted: #5f6a6e;
  --line: #dfe4e5;
  --accent: #147d64;
  --accent-soft: #e4f2ed;
  --font-sans: "Segoe UI Variable", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  min-width: 0;
  min-height: 100dvh;
  color: var(--text);
  background: var(--background);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
::selection { color: var(--text); background: var(--accent-soft); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.navigation, main, .footer-content { width: min(960px, calc(100% - 48px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); }
.navigation { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a, .footer-content a { display: inline-flex; min-height: 44px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14px; }
.nav-links a:hover, .project-links a:hover, .version-link:hover, .footer-content a:hover { color: var(--accent); }

main { display: grid; min-height: calc(100dvh - 160px); padding-block: 48px; align-content: center; }
.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.project { display: flex; min-width: 0; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.project-heading { display: flex; align-items: center; gap: 15px; }
.project-heading img { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 13px; }
.project-heading h2 { font-size: 21px; font-weight: 680; line-height: 1.35; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.project-heading p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.project-description { margin: 24px 0 28px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.project-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.project-links { display: flex; flex-wrap: wrap; gap: 18px; }
.project-links a, .version-link { display: inline-flex; min-height: 44px; align-items: center; }
.project-links a { font-size: 14px; font-weight: 650; }
.version-link { flex: 0 0 auto; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

.site-footer { border-top: 1px solid var(--line); }
.footer-content { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 13px; }
.footer-content a { color: var(--text); }

@media (max-width: 700px) {
  .navigation, main, .footer-content { width: calc(100% - 32px); }
  .navigation { min-height: 64px; }
  .nav-links { gap: 20px; }
  main { min-height: calc(100dvh - 152px); padding-block: 32px; }
  .project-list { grid-template-columns: 1fr; gap: 16px; }
  .project { padding: 24px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #171a1c;
    --surface: #1e2326;
    --text: #edf1f1;
    --muted: #aab4b6;
    --line: #353d40;
    --accent: #76d5b8;
    --accent-soft: #244a3f;
  }
}

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