/* HK Work — 案A「仕様書」 */
:root {
  --ground: #F4F4F1;
  --paper: #FFFFFF;
  --ink: #16181B;
  --ink-2: #3A3D42;
  --rule: #C9CAC4;
  --track: #E4E4DF;
  --tint: #E9E9E4;
  --accent: #005EB8;
  --sans: 'IBM Plex Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--ink); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, dl, dd { margin: 0; }
/* 日本語の見出しを文節で折り返す（対応ブラウザのみ） */
h1, h2, h3, h4, .lead, .lead-l { word-break: auto-phrase; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 64px); box-sizing: content-box; }

/* ヘッダー・フッター */
.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 28px 0; border-bottom: 1px solid var(--ink);
}
.brand {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
  font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: 0.08em; text-decoration: none;
}
.brand img { height: 36px; width: auto; }
.site-header nav { display: flex; gap: 8px 28px; font-size: 14px; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px 0 40px; border-top: 1px solid var(--ink);
  font-family: var(--mono); font-size: 12px;
}

/* 共通部品 */
.eyebrow, .label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--accent); }
.num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-2); }
.mono-s { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--ink-2); }
.note { font-size: 13px; color: var(--ink-2); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-s { display: flex; flex-direction: column; gap: 12px; }
.card { border: 1px solid var(--ink); background: var(--paper); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
h2 { font-size: 36px; line-height: 1.3; }
h3 { font-size: 20px; line-height: 1.5; }
h4 { font-size: 18px; line-height: 1.5; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px;
  border: 1px solid var(--ink); text-decoration: none; font-weight: 500;
}
.btn-primary { background: var(--ink); color: var(--ground); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }

/* ファーストビュー */
.hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 48px;
  padding: 88px 0 96px; border-bottom: 1px solid var(--ink);
}
.hero-text { display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.lead { max-width: 34em; color: var(--ink-2); }
.spec { align-self: end; border: 1px solid var(--ink); background: var(--paper); font-size: 14px; }
.spec > div { display: grid; grid-template-columns: minmax(96px, 140px) 1fr; border-bottom: 1px solid var(--ink); }
.spec > div:last-child { border-bottom: 0; }
.spec dt { padding: 14px 16px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; border-right: 1px solid var(--ink); }
.spec dd { padding: 14px 16px; }
.status { font-weight: 500; display: flex; gap: 10px; align-items: baseline; }
.dot { width: 8px; height: 8px; background: var(--accent); flex-shrink: 0; }

/* セクション */
.section { padding: 96px 0; border-bottom: 1px solid var(--ink); display: flex; flex-direction: column; gap: 56px; }
.section.last { border-bottom: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 48px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 48px; }
.lead-l { max-width: 40em; font-size: 18px; }

.services {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  border-top: 1px solid var(--ink); border-left: 1px solid var(--ink);
}
.services > div {
  padding: 28px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  display: flex; flex-direction: column; gap: 12px;
}
.services > div > p:last-child { font-size: 15px; color: var(--ink-2); }

/* スキル */
.skills { width: 100%; border-collapse: collapse; font-size: 15px; }
.skills thead tr { border-bottom: 1px solid var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-align: left; }
.skills thead th { padding: 8px 12px 8px 0; font-weight: 500; }
.skills tbody tr { border-bottom: 1px solid var(--rule); }
.skills tbody tr:last-child { border-bottom: 1px solid var(--ink); }
.skills tbody th { padding: 12px 12px 12px 0; text-align: left; font-weight: 500; white-space: nowrap; }
.skills td { padding: 12px 0; width: 100%; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar { flex-grow: 1; height: 10px; background: var(--track); }
.bar > div { height: 100%; background: var(--accent); }
.bar-row span { font-family: var(--mono); font-size: 14px; min-width: 3.2em; text-align: right; }

.tools { display: flex; flex-direction: column; border-top: 1px solid var(--ink); margin-top: 8px; }
.tools > div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.tools p { padding-top: 5px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-2); }
.tools ul { padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 13px; }
.tools li { padding: 4px 10px; border: 1px solid var(--ink); background: var(--paper); }

/* 業務実績 */
.case dl { display: grid; grid-template-columns: 64px 1fr; gap: 8px 12px; font-size: 15px; }
.case dt { font-family: var(--mono); font-size: 12px; padding-top: 4px; color: var(--ink-2); }
.case .result { font-weight: 500; }

/* 個人開発 */
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); gap: 24px; }
.work-main { padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 0; }
.work-text { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.work-text .more { font-weight: 500; }
.work-text .mono-s + .more { margin-top: auto; }
.shots { display: flex; gap: 12px; padding: 24px; background: var(--tint); border-left: 1px solid var(--ink); justify-content: center; }
.shots img { width: 46%; max-width: 150px; border: 1px solid var(--ink); }
@media (max-width: 600px) {
  .shots { border-left: 0; border-top: 1px solid var(--ink); }
}

/* 共通リスト・記事カード */
.rules { padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.rules li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.rules li:last-child { border-bottom: 1px solid var(--ink); }
.articles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.article { text-decoration: none; min-height: 120px; gap: 8px; font-weight: 500; }
.article .meta { font-weight: 400; }

/* プロフィール・お問い合わせ */
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; font-size: 15px; }
.kv dt { font-family: var(--mono); font-size: 12px; padding-top: 3px; }
.timeline { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); font-size: 15px; }
.timeline li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.timeline li:last-child { border-bottom: 1px solid var(--ink); }
.timeline time { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 2px; }
.contact { gap: 18px; padding: 28px; }

/* 事例ページ（Markdown） */
.prose { max-width: 760px; padding: 72px 0 96px; }
.prose h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.35; margin-bottom: 16px; }
.prose h2 { font-size: 26px; margin: 56px 0 16px; padding-top: 24px; border-top: 1px solid var(--ink); }
.prose h3 { font-size: 19px; margin: 32px 0 8px; }
.prose p, .prose ul, .prose table { margin: 0 0 16px; }
.prose hr { display: none; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; table-layout: fixed; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 8px 12px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.prose th { background: var(--tint); font-weight: 500; }
.prose code { font-family: var(--mono); font-size: 0.9em; background: var(--tint); padding: 1px 5px; }
.prose img { border: 1px solid var(--ink); width: 100%; max-width: 200px; }
.prose .back { font-family: var(--mono); font-size: 13px; }
