:root {
  --ink: #070707;
  --paper: #fff;
  --muted: rgba(7, 7, 7, .62);
  --line: rgba(7, 7, 7, .18);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }

body.section-page {
  --section-background: url("/assets/home-background3.png");
  min-height: 100svh;
  background:
    linear-gradient(rgba(255,255,255,.82), rgba(255,255,255,.82)),
    var(--section-background) center / cover fixed,
    var(--paper);
  color: var(--ink);
  font-family: "NotoSansJP-ExtraLight", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-weight: 200;
}

a { color: inherit; }

.section-shell {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.section-header,
.section-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(12px, 2vw, 24px);
  font-size: .8rem;
  line-height: 1;
}

.section-header nav,
.section-footer { display: flex; gap: clamp(14px, 3vw, 30px); }
.section-header a, .section-footer a { text-decoration: none; }
.section-header nav a, .section-footer a { color: var(--muted); }
.section-header a:hover, .section-header a:focus-visible,
.section-footer a:hover, .section-footer a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .3em;
  outline: none;
}

.section-main {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) clamp(20px, 3vw, 36px) clamp(64px, 9vw, 110px);
}

.section-intro { margin-bottom: clamp(34px, 5vw, 56px); }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: .72rem; }
.display-title {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 200;
  line-height: .94;
  text-transform: uppercase;
}
.lead { max-width: 640px; margin: 18px 0 0; color: var(--muted); line-height: 1.8; }

.section-rule {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: .7rem;
  text-transform: uppercase;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 2.2vw, 26px);
}

.project-card { min-width: 0; }
.project-visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  background: #070707;
  color: #fff;
  text-decoration: none;
}
.project-visual img { width: 100%; height: 100%; object-fit: cover; }
.project-visual:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.project-placeholder { font-size: 2rem; }
.project-count { position: absolute; top: 12px; left: 12px; color: rgba(255,255,255,.7); font-size: .68rem; }
.project-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--muted); font-size: .7rem; }
.project-card h2 { margin: 6px 0 8px; font-size: 1.3rem; font-weight: 400; line-height: 1.2; }
.project-card p { margin: 0; font-size: .84rem; line-height: 1.7; }
.project-detail { margin-top: 6px !important; color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag-list span { color: var(--muted); font-size: .68rem; }

.blog-list { border-top: 1px solid var(--ink); }
.post-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 110px 24px;
  gap: clamp(14px, 3vw, 36px);
  align-items: center;
  min-height: 96px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.post-row:hover, .post-row:focus-visible { background: #070707; color: #fff; outline: none; }
.post-date, .post-category { opacity: .6; font-size: .7rem; }
.post-row h2 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 400; line-height: 1.3; }
.post-row p { margin: 0; opacity: .65; font-size: .78rem; line-height: 1.6; }
.post-thumb { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-arrow { text-align: right; }
.empty-state { margin: 0; padding: 42px 0; border-top: 1px solid var(--ink); color: var(--muted); font-size: .84rem; }

.article-wrap { width: min(100%, 720px); margin: 0 auto; }
.article-back { display: inline-block; margin-bottom: 42px; color: var(--muted); font-size: .76rem; text-underline-offset: .3em; }
.article-head { margin-bottom: 32px; }
.article-head h1 { margin: 10px 0 14px; font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 300; line-height: 1.2; }
.article-meta { display: flex; gap: 18px; color: var(--muted); font-size: .72rem; }
.article-cover { width: 100%; max-height: 480px; object-fit: cover; margin-bottom: 36px; }
.article-body { font-size: 1rem; line-height: 2; }
.article-body p { margin: 0 0 1.8em; }
.article-body h2 { margin: 2.2em 0 .8em; font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 400; line-height: 1.35; }
.article-body h3 { margin: 2em 0 .7em; font-size: 1.45rem; font-weight: 400; line-height: 1.4; }
.article-body h4 { margin: 1.8em 0 .6em; font-size: 1.15rem; font-weight: 500; line-height: 1.5; }
.article-body strong { font-weight: 600; }
.article-body a { text-underline-offset: .25em; }
.article-body blockquote { margin: 2em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--ink); color: var(--muted); }
.article-body blockquote p { margin: 0; }
.article-body ul, .article-body ol { margin: 0 0 1.8em; padding-left: 1.5em; }
.article-body li { margin: .35em 0; }
.article-body img { display: block; width: auto; max-width: 100%; max-height: 720px; margin: 2.4em auto; object-fit: contain; }
.article-body pre { overflow-x: auto; margin: 2em 0; padding: 18px; background: #070707; color: #fff; font-size: .85rem; line-height: 1.7; }
.article-body :not(pre) > code { padding: .15em .4em; background: rgba(7,7,7,.07); font-size: .88em; }
.article-body hr { margin: 3em 0; border: 0; border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  .section-header nav a:not([aria-current="page"]) { display: none; }
  .portfolio-grid { grid-template-columns: 1fr; gap: 34px; }
  .post-row { grid-template-columns: 1fr auto; gap: 8px 14px; }
  .post-date { grid-column: 1; }
  .post-copy { grid-column: 1; }
  .post-thumb, .post-category { grid-column: 2; grid-row: 1 / span 2; width: 72px; }
  .post-arrow { display: none; }
}
