:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #1c1d22;
  --muted: #63656e;
  --line: #e2e0d8;
  --accent: #2f6b3c;
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 6px 20px rgba(20, 20, 30, .06);
  --shadow-hover: 0 2px 4px rgba(20, 20, 30, .06), 0 14px 32px rgba(20, 20, 30, .12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14151a;
    --surface: #1e2027;
    --text: #ececf0;
    --muted: #9c9faa;
    --line: #2d3039;
    --accent: #8fd19e;
    --shadow: none;
    --shadow-hover: 0 0 0 1px var(--accent);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 16px;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, system-ui, sans-serif;
  line-height: 1.7;
}

.site-header,
main,
.site-footer {
  max-width: 960px;
  margin: 0 auto;
}

.site-header { padding: 72px 0 40px; }

.wordmark {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: ui-rounded, "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .12em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: .02em;
}

.lead {
  margin: 12px 0 0;
  color: var(--muted);
}

.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.works > li { display: flex; }

.work {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.work:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.work:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.work img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

/* 横長のカード画像が無い作品は、アイコンを地色の上に置く */
.work img.is-icon {
  object-fit: contain;
  background: #ffffee;
}

.work-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px 20px;
}

.tag {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
}

h2 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.4;
}

.desc {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: .94rem;
}

.host {
  margin: auto 0 0;
  color: var(--accent);
  font-size: .88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.host::after { content: " \2197"; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 64px;
  padding: 24px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

.site-footer p { margin: 0; }

.site-footer a {
  color: var(--text);
  font-weight: 700;
}

/* 404 */
.notfound { padding: 96px 0; }
.notfound a { color: var(--accent); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .work { transition: none; }
  .work:hover { transform: none; }
}
