:root {
  color-scheme: light;
  --background: #f5f5ef;
  --panel: #fcfcf8;
  --text: #172e25;
  --muted: #526359;
  --line: #d9dfd5;
  --accent: #1b503a;
  --text-small: 1rem;
  --text-ui: 1rem;
  --text-title: 1rem;
  --leading-tight: 1.3;
  --leading-ui: 1.45;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: var(--leading-ui);
  color: var(--text);
  background: var(--background);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.page-width { width: min(calc(100% - clamp(32px, 9vw, 144px)), 1120px); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 72px; }
.header-inner h1 {
  margin: 0;
  font-size: clamp(1.125rem, 2.15vw, 1.75rem);
  font-weight: 700;
  line-height: var(--leading-tight);
}
.brand-mark {
  flex: none;
  width: clamp(36px, 4vw, 44px);
  height: auto;
  object-fit: contain;
  padding: 2px;
  border-radius: 6px;
  background: #fff;
}
.gallery { padding-block: clamp(16px, 3vw, 32px) 44px; }
.project-grid { display: grid; gap: 22px; }
.project-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color .2s, box-shadow .2s;
}
.project-card:hover, .project-card:focus-visible {
  border-color: #7d9a76;
  box-shadow: 0 9px 28px #172e2510;
}
.preview { overflow: hidden; background: #dfe8d9; }
.cover { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.card-details { padding: clamp(18px, 2.5vw, 24px); }
.card-details h2 {
  margin: 0 0 16px;
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  line-height: var(--leading-tight);
  font-weight: 700;
}
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.view-count { color: var(--muted); font-size: var(--text-small); font-variant-numeric: tabular-nums; }
.card-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 7px;
  background: #eaf0e4;
  color: var(--accent);
  font-size: 1.0625rem;
  font-weight: 700;
}
.project-card:hover .card-action, .project-card:focus-visible .card-action { background: #e1f2bf; }
@media (min-width: 780px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
