:root {
  color-scheme: light;
  --ink: #171a1f;
  --muted: #5d6470;
  --line: #d9dde3;
  --surface: #ffffff;
  --surface-alt: #f4f5f2;
  --hero: #171a1f;
  --hero-muted: #c7cbd1;
  --accent: #087f6f;
  --accent-dark: #056257;
  --amber: #a35d00;
  --danger: #a63d40;
  --radius: 8px;
  --shadow: 0 12px 30px rgba(23, 26, 31, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.top-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(23, 26, 31, 0.96);
  color: #fff;
  backdrop-filter: blur(12px);
}
.nav-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-size: 0.92rem; font-weight: 700; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 0.86rem; }
.nav-links a { color: #d9dde2; text-decoration: none; }
.nav-links a:hover, .nav-links a:focus-visible { color: #fff; }

.hero { min-height: 590px; display: flex; align-items: center; background: var(--hero); color: #fff; border-bottom: 5px solid var(--accent); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr); gap: 96px; align-items: end; padding-block: 96px 88px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; }
.hero .eyebrow { color: #60d4c3; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: 4.3rem; line-height: 1.02; letter-spacing: 0; }
.hero-statement { margin: 24px 0 12px; font-size: 1.55rem; font-weight: 600; }
.hero-copy { max-width: 650px; margin: 0; color: var(--hero-muted); font-size: 1.02rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 34px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid transparent; border-radius: 6px; font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover, .button-primary:focus-visible { background: var(--accent-dark); }
.button-secondary { border-color: var(--line); background: transparent; }
.text-link { color: var(--accent); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.hero .text-link { color: #8be1d5; }
.signal-panel { border-left: 1px solid #4a5058; padding-left: 28px; }
.signal-title { margin: 0 0 20px; color: #9299a3; font-size: 0.76rem; font-weight: 700; text-transform: uppercase; }
.signal-panel dl { margin: 0; }
.signal-panel dl div { padding: 16px 0; border-top: 1px solid #353a41; }
.signal-panel dt { color: #9299a3; font-size: 0.78rem; }
.signal-panel dd { margin: 4px 0 0; font-weight: 600; }

.section { padding: 88px 0; }
.section-alt { background: var(--surface-alt); }
.section-heading { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1fr); gap: 80px; align-items: end; margin-bottom: 42px; }
.section-heading h2, .about-grid h2 { margin: 0; font-size: 2.25rem; line-height: 1.18; }
.section-heading > p { max-width: 650px; margin: 0; color: var(--muted); }
.project-group + .project-group { margin-top: 58px; }
.group-heading { display: flex; align-items: baseline; gap: 12px; margin: 0 0 20px; }
.group-heading h3 { margin: 0; font-size: 1.25rem; }
.group-heading span { color: var(--muted); font-size: 0.8rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.project-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #e7e9e6; }
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.project-media.image-failed::after { content: "Project preview"; position: absolute; inset: 0; display: grid; place-items: center; color: #707781; font-size: 0.8rem; }
.project-card-body { padding: 24px; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.tag-owned { border-color: #9ccbc3; color: #056257; background: #edf8f5; }
.tag-private-demo { border-color: #e0b572; color: #7d4800; background: #fff7e8; }
.tag-fork { background: #f0f1f2; }
.project-card h3 { margin: 0 0 8px; font-size: 1.35rem; }
.project-summary { min-height: 3.3em; margin: 0 0 22px; color: var(--muted); }
.project-facts { display: grid; gap: 13px; margin: 0; }
.project-facts div { display: grid; grid-template-columns: 54px 1fr; gap: 12px; }
.project-facts dt { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.project-facts dd { margin: 0; font-size: 0.88rem; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 22px; background: var(--line); border: 1px solid var(--line); }
.metric { min-width: 0; padding: 12px; background: #fafaf8; }
.metric strong, .metric span { display: block; }
.metric strong { font-size: 0.92rem; overflow-wrap: anywhere; }
.metric span { color: var(--muted); font-size: 0.7rem; }
.project-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; }

.notes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.note-item { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.note-item:nth-child(odd) { border-right: 1px solid var(--line); }
.note-item:nth-child(even) { padding-left: 24px; }
.note-item time { color: var(--accent); font-size: 0.76rem; font-weight: 700; }
.note-item h3 { margin: 7px 0; font-size: 1.03rem; }
.note-item p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.section-action { margin: 26px 0 0; }
.repo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.repo-item { display: grid; gap: 4px; min-height: 104px; padding: 22px; background: #fff; text-decoration: none; }
.repo-item span { color: var(--muted); font-size: 0.85rem; }
.fork-card { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; margin-top: 32px; padding: 24px; border-left: 4px solid var(--amber); background: #f7f4ed; }
.fork-card h3, .fork-card p { margin: 0; }
.fork-card p { color: var(--muted); }
.about-grid { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1fr); gap: 80px; }
.about-copy p:first-child { margin-top: 0; }
.about-links { display: flex; gap: 12px; margin-top: 24px; }
.loading-copy { color: var(--muted); }
.footer { padding: 26px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; }
.footer .container { display: flex; justify-content: space-between; gap: 20px; }
:focus-visible { outline: 3px solid #e6a13a; outline-offset: 3px; }

@media (max-width: 820px) {
  .nav-links a:not(:last-child) { display: none; }
  .hero { min-height: auto; }
  .hero-grid, .section-heading, .about-grid { grid-template-columns: 1fr; gap: 38px; }
  .hero-grid { padding-block: 72px 64px; }
  h1 { font-size: 3.25rem; }
  .section { padding: 68px 0; }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 28px, 1160px); }
  .nav-inner { min-height: 56px; }
  .hero-grid { padding-block: 58px 52px; }
  h1 { font-size: 2.65rem; }
  .hero-statement { font-size: 1.25rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 15px; }
  .signal-panel { display: none; }
  .section { padding: 56px 0; }
  .section-heading { gap: 18px; margin-bottom: 30px; }
  .section-heading h2, .about-grid h2 { font-size: 1.8rem; }
  .project-card-body { padding: 19px; }
  .metrics { grid-template-columns: 1fr; }
  .note-item, .note-item:nth-child(even) { padding: 20px 0; border-right: 0; }
  .notes-grid, .repo-grid { grid-template-columns: 1fr; }
  .fork-card { grid-template-columns: 1fr; }
  .footer .container { flex-direction: column; gap: 6px; }
}
