/* namekonzu-site の静的ページ共通スタイル */
:root {
  --text: #181818;
  --muted: #666;
  --surface: #fff;
  --line: #d7d7d7;
  --menu: #111;
  --link: #303030;
  --error: #9b2c2c;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--surface);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
}
a { color: var(--link); text-underline-offset: .2em; }
a:hover { color: #707070; }
img { display: block; max-width: 100%; height: auto; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 10; padding: .5rem .8rem; color: #fff; background: #000; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: .9rem max(1.25rem, calc((100% - 960px) / 2)); color: #fff; background: var(--menu); }
.site-logo { color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.nav-list { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.nav-list a { display: block; padding: .3rem 0; color: #fff; font-size: .9rem; text-decoration: none; border-bottom: 2px solid transparent; }
.nav-list a:hover { color: #cfcfcf; }
.nav-list a[aria-current="page"] { border-color: #fff; font-weight: 700; }
.site-main { width: min(960px, calc(100% - 40px)); min-height: calc(100vh - 145px); margin: 0 auto; }
.hero { padding: 4.5rem 0 3.5rem; text-align: center; border-bottom: 1px solid var(--line); }
.hero img { width: 112px; height: 112px; margin: 0 auto 1.25rem; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.25; }
.hero p { margin: .5rem 0 0; color: var(--muted); }
.page-section { padding: 3rem 0 5rem; }
.page-section > h1, .page-section > h2 { margin: 0 0 1.5rem; font-size: clamp(1.7rem, 4vw, 2.25rem); line-height: 1.35; }
.article-list, .work-list { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.article-card, .work-card { display: flex; min-height: 170px; flex-direction: column; padding: 1.25rem; background: #fff; border: 1px solid var(--line); }
.article-card h2, .article-card h3, .work-card h2 { margin: .55rem 0; font-size: 1.2rem; line-height: 1.45; }
.article-card h2 a, .article-card h3 a, .work-card h2 a { color: var(--text); text-decoration: none; }
.article-card p, .work-card p { margin: 0 0 1rem; color: var(--muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .8rem; }
.read-more { margin-top: auto; font-size: .85rem; }
.sort-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.sort-controls button { padding: .5rem .9rem; color: var(--text); background: #fff; border: 1px solid #999; border-radius: 0; font: inherit; cursor: pointer; }
.sort-controls button[aria-pressed="true"] { color: #fff; background: #111; border-color: #111; }
.view-count { color: var(--muted); font-size: .8rem; }
.static-page, .article-page { padding: 3.5rem 0 5rem; }
.profile-details { max-width: 720px; margin: 0; }
.profile-details > div { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.profile-details > div:last-child { border-bottom: 1px solid var(--line); }
.profile-details dt { margin-bottom: .35rem; font-weight: 700; }
.profile-details dd { margin: 0; color: var(--muted); }
.article-page { max-width: 760px; margin: auto; }
.article-header { padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.article-header h1 { margin: .75rem 0; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.35; }
.article-content { margin-top: 2.5rem; }
.article-content h2 { margin-top: 2.75rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
.article-content h3 { margin-top: 2rem; }
.article-content pre { overflow-x: auto; padding: 1rem; color: #f5f5f5; background: #222; }
.article-content code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-content img { margin: 1rem 0; }
.toc { margin-top: 2rem; padding: 1rem; border: 1px solid var(--line); }
.toc h2 { margin: 0; font-size: .9rem; }
.toc ol { margin-bottom: 0; padding-left: 1.25rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.tag-list a { font-size: .8rem; }
.cat-converter { display: grid; gap: 1.25rem; max-width: 760px; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 700; }
textarea { width: 100%; min-height: 170px; padding: .9rem; resize: vertical; color: var(--text); background: #fff; border: 1px solid #888; border-radius: 0; font: inherit; }
textarea[readonly] { background: #f7f7f7; }
textarea:focus { outline: 2px solid #444; outline-offset: 2px; }
button, .button-link { display: inline-block; width: fit-content; min-height: 44px; padding: .65rem 1.5rem; color: #fff; background: #111; border: 1px solid #111; border-radius: 0; font: 700 .9rem inherit; text-decoration: none; cursor: pointer; }
button:hover, .button-link:hover { color: #fff; background: #444; }
.tool-message { min-height: 1.75em; color: var(--error); font-size: .9rem; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; width: min(960px, calc(100% - 40px)); margin: 0 auto; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.site-footer p { margin: 0; font-size: .85rem; }
@media (max-width: 520px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .nav-list { gap: .25rem 1rem; }
  .site-main, .site-footer { width: min(100% - 32px, 960px); }
  .hero { padding: 3rem 0 2.5rem; }
  .hero img { width: 80px; height: 80px; }
  .page-section, .static-page, .article-page { padding-top: 2.5rem; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
