:root {
  color-scheme: light dark;
  --bg: #f4f0e8;
  --bg-soft: rgba(255,255,255,0.48);
  --surface: rgba(255,255,255,0.58);
  --surface-strong: rgba(255,255,255,0.72);
  --text: #181614;
  --muted: #5d5955;
  --line: rgba(24,22,20,0.12);
  --accent: #8f3f2e;
  --accent-2: #b98a5a;
  --shadow: 0 18px 60px rgba(43, 32, 17, 0.11);
  --radius: 28px;
  --radius-sm: 18px;
  --max: 1240px;
  --sans: Inter, "SF Pro Text", "Helvetica Neue", Arial, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --serif: "Iowan Old Style", "Cormorant Garamond", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --ease: cubic-bezier(.2,.7,.1,1);
}

:root[data-theme="dark"] {
  --bg: #10100f;
  --bg-soft: rgba(31,31,29,0.46);
  --surface: rgba(25,25,24,0.56);
  --surface-strong: rgba(28,28,27,0.74);
  --text: #f2eee7;
  --muted: #c0b7ab;
  --line: rgba(242,238,231,0.12);
  --accent: #d99067;
  --accent-2: #d7b483;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--bg);
}
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 8%, transparent), transparent 32%),
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 82%, #ffffff 18%), var(--bg));
  min-height: 100vh;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { margin: 0 0 1rem; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent 0, transparent calc(100% - 1px), color-mix(in srgb, var(--line) 70%, transparent) calc(100% - 1px)),
    linear-gradient(to bottom, transparent 0, transparent calc(100% - 1px), color-mix(in srgb, var(--line) 65%, transparent) calc(100% - 1px));
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  opacity: .18;
}

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
}

.brand {
  display: grid;
  gap: 2px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 12px;
}
.brand-mark::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent);
}
.brand-title {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  letter-spacing: .08em;
}
.brand-sub {
  color: var(--muted);
  font-size: .84rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-links a,
.theme-toggle {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .95rem;
  transition: transform .35s var(--ease), border-color .35s var(--ease), background-color .35s var(--ease);
}
.nav-links a:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
}
.theme-toggle {
  background: none;
  color: inherit;
  cursor: pointer;
}

.hero {
  padding: 72px 0 38px;
}
.hero-shell {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
}

.panel {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.hero-main {
  padding: clamp(28px, 4vw, 48px);
  position: relative;
  overflow: clip;
}
.hero-main::after {
  content: "余白";
  position: absolute;
  right: 20px;
  top: 22px;
  writing-mode: vertical-rl;
  font-family: var(--serif);
  color: color-mix(in srgb, var(--accent) 20%, transparent);
  font-size: clamp(2.4rem, 10vw, 6rem);
  letter-spacing: .12em;
}

.eyebrow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.08;
  margin: 0 0 16px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.75rem);
  max-width: 9ch;
  text-wrap: balance;
}

.hero-lead {
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.button,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease);
}
.button {
  color: #fff7f1;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #26140c 28%));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 25%, transparent);
}
.button-ghost {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
}
.button:hover,
.button-ghost:hover {
  transform: translateY(-2px);
}

.hero-side {
  padding: 22px;
  display: grid;
  gap: 18px;
}
.metric-card,
.note-card,
.quote-card,
.article-card,
.feature-card,
.info-block,
.profile-card,
.post-head {
  background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  border-radius: calc(var(--radius) - 8px);
}
.metric-card,
.note-card,
.quote-card,
.feature-card,
.profile-card,
.info-block,
.post-head { padding: 22px; }
.metric-label,
.kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .76rem;
}
.metric-value {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 8px 0 0;
}

main section {
  padding: 30px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}
.section-head p {
  color: var(--muted);
  max-width: 62ch;
}
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.feature-card {
  padding: 24px;
  min-height: 250px;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: auto -30% -20% auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
}
.feature-card h3,
.article-card h3 { font-size: 1.55rem; }
.feature-card p,
.article-card p,
.note-card p,
.quote-card p,
.info-block p,
.profile-card p,
.post-head p,
.post-body p,
.post-body li {
  color: var(--muted);
}
.meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .84rem;
  color: var(--muted);
}
.tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.article-card {
  padding: 24px;
  display: grid;
  gap: 18px;
  transition: transform .35s var(--ease), border-color .35s var(--ease), background-color .35s var(--ease);
}
.article-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.article-art {
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 50%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 95%, transparent), color-mix(in srgb, var(--bg) 88%, transparent));
  overflow: hidden;
  position: relative;
}
.article-art::before,
.article-art::after {
  content: "";
  position: absolute;
  inset: 0;
}
.article-art::before {
  background: radial-gradient(circle at 22% 30%, color-mix(in srgb, var(--accent-2) 26%, transparent), transparent 28%);
}
.article-art::after {
  background: linear-gradient(130deg, transparent 24%, color-mix(in srgb, var(--text) 4%, transparent) 24%, transparent 26%, transparent 52%, color-mix(in srgb, var(--accent) 14%, transparent) 52%, transparent 54%);
}

.editorial {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
}
.editorial .panel {
  padding: clamp(24px, 4vw, 42px);
}
.list-plain {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.list-plain li {
  display: flex;
  align-items: start;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.list-plain li:first-child { border-top: 0; padding-top: 0; }
.list-plain strong {
  min-width: 96px;
  font-family: var(--serif);
  font-weight: 600;
}

.profile-card {
  display: grid;
  gap: 18px;
}
.profile-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 12%, transparent);
}
.profile-card blockquote,
.quote-card blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.45;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.info-block strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
  font-family: var(--serif);
}

.site-footer {
  padding: 44px 0 80px;
}
.footer-shell {
  padding: 26px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-shell p { color: var(--muted); }

.post-layout {
  padding: 48px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 780px) minmax(0, 320px);
  gap: 22px;
}
.post-head h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  max-width: 10ch;
}
.post-cover {
  aspect-ratio: 16 / 9;
  margin-top: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 28%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 30%),
    radial-gradient(circle at 76% 35%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--bg) 82%, transparent));
}
.post-body {
  padding: clamp(24px, 4vw, 42px);
}
.post-body h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-top: 34px;
}
.post-body h3 {
  font-size: 1.4rem;
  margin-top: 24px;
}
.post-body ul { padding-left: 1.1rem; }
.post-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
.post-aside {
  display: grid;
  gap: 18px;
  align-content: start;
  position: sticky;
  top: 96px;
}
.toc a { display: block; color: var(--muted); padding: 8px 0; }
.toc a:hover { color: var(--text); }

.empty-state {
  min-height: calc(100vh - 240px);
  display: grid;
  place-items: center;
  padding: 54px 0;
}
.empty-inner {
  padding: 42px;
  text-align: center;
  max-width: 680px;
}
.empty-code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-family: var(--serif);
  line-height: 1;
  margin-bottom: 10px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[style*="--delay"] { transition-delay: var(--delay); }

.render-later {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .55s;
  animation-timing-function: var(--ease);
}

::view-transition-old(root) { opacity: 1; }
::view-transition-new(root) { opacity: 1; }

@media (max-width: 1080px) {
  .hero-shell,
  .editorial,
  .post-layout,
  .grid-3,
  .info-strip {
    grid-template-columns: 1fr;
  }
  .grid-2 { grid-template-columns: 1fr; }
  .post-aside { position: static; }
}

@media (max-width: 760px) {
  .navbar { min-height: 78px; align-items: start; padding: 12px 0; }
  .nav-links { justify-content: flex-start; }
  .hero { padding-top: 42px; }
  .hero-main::after { font-size: 3rem; right: 12px; top: 16px; }
  .hero h1 { max-width: none; }
  .section-head { align-items: start; }
  .footer-shell { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
