:root {
  color-scheme: light dark;
  --bg: #f6f3ed;
  --surface: #fffdf8;
  --surface-2: #eee9df;
  --text: #20201d;
  --muted: #6f6b63;
  --line: #d9d2c6;
  --accent: #b8453b;
  --accent-soft: #efe0dc;
  --link: #8f332d;
  --shadow: 0 14px 40px rgba(30, 27, 22, .08);
  --max: 1180px;
  --reading: 760px;
}

html[data-theme="dark"] {
  --bg: #171715;
  --surface: #201f1c;
  --surface-2: #292721;
  --text: #f0ece3;
  --muted: #aaa49a;
  --line: #3b3832;
  --accent: #e07a70;
  --accent-soft: #3b2926;
  --link: #f09288;
  --shadow: 0 14px 40px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--accent) 3%, transparent), transparent 280px),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="ja"] body {
  font-family: "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", system-ui, sans-serif;
  line-height: 1.95;
  letter-spacing: .015em;
}

a { color: inherit; }

img { max-width: 100%; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 9px 13px;
  border-radius: 6px;
}
.skip-link:focus { top: 16px; }

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

.header-inner {
  max-width: var(--max);
  margin: auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  transform: rotate(-2deg);
  flex: 0 0 auto;
}

.brand-copy {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[lang="ja"] .brand-copy {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.lang-link {
  white-space: nowrap;
  flex: 0 0 auto;
}

.lang-link,
.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  min-height: 38px;
  padding: 7px 11px;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.lang-link:hover,
.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle {
  width: 40px;
  padding: 0;
  display: grid;
  place-items: center;
}

.theme-icon { font-size: 16px; line-height: 1; }

.wrap {
  max-width: var(--max);
  margin: auto;
  padding-inline: 24px;
}

.masthead {
  padding: 84px 0 62px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 0 18px;
}

html[lang="ja"] .kicker {
  letter-spacing: .16em;
}

.site-title,
.article-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.03;
  text-wrap: balance;
}

.site-title {
  max-width: 850px;
  font-size: clamp(46px, 7.2vw, 92px);
}

html[lang="ja"] .site-title,
html[lang="ja"] .article-title {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  letter-spacing: -.01em;
  line-height: 1.3;
  font-weight: 600;
}

html[lang="ja"] .site-title {
  font-size: clamp(38px, 6.6vw, 76px);
}

.deck {
  max-width: 710px;
  margin: 28px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.5;
  color: var(--muted);
}

html[lang="ja"] .deck {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.85;
}

.masthead-note {
  margin-top: 40px;
  max-width: 620px;
  color: var(--muted);
  font-size: 14px;
}

.essays-section {
  padding: 58px 0 96px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 500;
}

html[lang="ja"] .section-heading h2 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
}

.section-count {
  color: var(--muted);
  font-size: 13px;
}

.essay-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.essay-card {
  background: var(--surface);
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}

.essay-card:hover {
  background: color-mix(in srgb, var(--surface) 90%, var(--accent) 10%);
}

.essay-card-main { min-width: 0; }

.essay-number {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.essay-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -.025em;
}

html[lang="ja"] .essay-card h3 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  line-height: 1.55;
  letter-spacing: 0;
}

.essay-card p {
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 15px;
}

.essay-card-arrow {
  align-self: center;
  font-family: Georgia, serif;
  color: var(--accent);
  font-size: 30px;
  padding-inline: 10px 4px;
}

.about-strip {
  border-top: 1px solid var(--line);
  padding: 42px 0 72px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.about-grid h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

html[lang="ja"] .about-grid h2 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
}

.about-grid p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 25px 0 38px;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.article-hero {
  padding: 66px 0 42px;
}

.article-hero-inner {
  max-width: 980px;
}

.article-title {
  max-width: 930px;
  font-size: clamp(46px, 7vw, 86px);
}

html[lang="ja"] .article-title {
  max-width: 960px;
  font-size: clamp(36px, 5.8vw, 67px);
}

.article-subtitle {
  margin: 28px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.55;
  font-family: Georgia, "Times New Roman", serif;
}

html[lang="ja"] .article-subtitle {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  line-height: 1.8;
}

.article-meta {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px 30px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  position: fixed;
  top: 67px;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 25;
  pointer-events: none;
}
.progress-bar {
  width: 0;
  height: 100%;
  background: var(--accent);
}

.article-shell {
  border-top: 1px solid var(--line);
  padding: 52px 24px 100px;
}

.article {
  max-width: var(--reading);
  margin: auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.86;
}

html[lang="ja"] .article {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  font-size: 18px;
  line-height: 2.05;
  letter-spacing: .015em;
}

.article p {
  margin: 0 0 1.35em;
}

.article h2 {
  margin: 3.1em 0 .85em;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

html[lang="ja"] .article h2 {
  font-family: "Hiragino Sans", "Yu Gothic", "YuGothic", sans-serif;
  font-size: 24px;
  line-height: 1.55;
  letter-spacing: .01em;
}

.article strong { font-weight: 700; }

.article em { color: color-mix(in srgb, var(--text) 80%, var(--accent) 20%); }

.article .opening {
  font-size: 1.08em;
}

.article .opening::first-letter {
  float: left;
  font-size: 4.45em;
  line-height: .78;
  padding: .08em .08em 0 0;
  color: var(--accent);
}

html[lang="ja"] .article .opening::first-letter {
  font-size: 3.65em;
  line-height: .92;
}

.pullquote {
  margin: 2.5em -80px;
  padding: 1.2em 0 1.2em 32px;
  border-left: 3px solid var(--accent);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.5;
  font-style: italic;
  color: color-mix(in srgb, var(--text) 82%, var(--accent) 18%);
}

html[lang="ja"] .pullquote {
  font-style: normal;
  line-height: 1.8;
  font-size: clamp(21px, 2.5vw, 29px);
}

.article-end {
  margin-top: 4em;
  padding-top: 2em;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 14px;
}

html[lang="ja"] .article-end {
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
}

.back-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--accent); }

.language-note {
  margin-top: 16px;
}

.language-note a {
  color: var(--link);
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .masthead { padding-top: 60px; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .pullquote { margin-inline: 0; }
}

@media (max-width: 640px) {
  .header-inner, .wrap { padding-inline: 18px; }
  .brand-copy { max-width: 190px; }
  .masthead { padding: 54px 0 44px; }
  .essay-card { padding: 25px 22px; grid-template-columns: 1fr; }
  .essay-card-arrow { display: none; }
  .article-hero { padding: 46px 0 30px; }
  .article-shell { padding: 36px 18px 74px; }
  .article { font-size: 18px; line-height: 1.8; }
  html[lang="ja"] .article { font-size: 17px; line-height: 1.95; }
  .article h2 { margin-top: 2.6em; }
  .footer-inner { flex-direction: column; }
  .progress { top: 67px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
