/* 浦井 崇 Human Portfolio — 「笑って生きろ！」
   外部フォント・外部リソースは読み込まない（CSPで self に限定しているため）。 */

:root {
  --paper: #fbf6ec;
  --paper-2: #ffffff;
  --ink: #1a1410;
  --muted: #6b5f52;
  --accent: #d8431f;
  --accent-2: #f0a500;
  --line: rgba(26, 20, 16, 0.10);
  --line-strong: rgba(26, 20, 16, 0.22);
  --shadow: 0 1px 2px rgba(26, 20, 16, .05), 0 12px 32px rgba(26, 20, 16, .07);
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --sans: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  --wrap: 940px;
  --read: 680px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14100d;
    --paper-2: #1d1814;
    --ink: #f6efe4;
    --muted: #b3a595;
    --accent: #ff6a3d;
    --accent-2: #ffbe2e;
    --line: rgba(246, 239, 228, 0.12);
    --line-strong: rgba(246, 239, 228, 0.26);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --paper: #14100d;
  --paper-2: #1d1814;
  --ink: #f6efe4;
  --muted: #b3a595;
  --accent: #ff6a3d;
  --accent-2: #ffbe2e;
  --line: rgba(246, 239, 228, 0.12);
  --line-strong: rgba(246, 239, 228, 0.26);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.95;
  text-underline-offset: .22em;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
a { color: inherit; }
img, svg { max-width: 100%; height: auto; }

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

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding: clamp(44px, 9vw, 92px) 0 clamp(48px, 9vw, 96px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 46% at 12% 8%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 70%),
    radial-gradient(52% 44% at 92% 84%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
}
.hero .wrap { position: relative; }
.kicker {
  margin: 0 0 22px; font-size: 11px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--muted);
}
.hero-name {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(30px, 5.4vw, 46px); letter-spacing: .06em;
  margin: 0 0 18px; line-height: 1.3;
}
.hero-creed {
  font-family: var(--serif); font-weight: 700; margin: 0 0 26px;
  font-size: clamp(46px, 13vw, 116px); line-height: 1.02; letter-spacing: .01em;
  display: flex; flex-direction: column;
}
.hero-creed span:last-child { color: var(--accent); }
.hero-lead { margin: 0 0 34px; max-width: 30em; color: var(--muted); font-size: clamp(15px, 2.1vw, 18px); }
.scroll-hint {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; letter-spacing: .08em; text-decoration: none;
  border-bottom: 2px solid var(--accent); padding-bottom: 4px;
}
.scroll-hint::after { content: "↓"; }
.hero-arc {
  position: absolute; right: -6%; top: 50%; transform: translateY(-50%);
  width: min(40vw, 380px); opacity: .5; pointer-events: none;
}
@media (max-width: 900px) { .hero-arc { display: none; } }

/* ---------------------------------------------------------------- head / nav */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; font-family: var(--serif); font-size: 17px;
}
.brand-name { font-family: var(--serif); letter-spacing: .05em; }
.head-tag { font-size: 10.5px; letter-spacing: .2em; color: var(--muted); }
@media (max-width: 620px) { .head-tag { display: none; } }

/* メニュー：itotetsu.com のグループ構成に倣う。開閉は <details> のみ（JSなし）。 */
.page-nav {
  border-bottom: 1px solid var(--line); background: var(--paper-2);
  position: sticky; top: 0; z-index: 20;
}
.nav-inner { display: flex; gap: 2px; flex-wrap: wrap; align-items: stretch; }
.nav-group { position: relative; }
.nav-trigger {
  display: flex; align-items: baseline; gap: 8px; white-space: nowrap; cursor: pointer;
  padding: 13px 14px; font-size: 13.5px; color: var(--muted);
  border-bottom: 2px solid transparent; list-style: none; user-select: none;
}
.nav-trigger::-webkit-details-marker { display: none; }
.nav-trigger:hover { color: var(--ink); }
.nav-group[open] > .nav-trigger { color: var(--ink); border-bottom-color: var(--accent); }
.nav-ja { font-weight: 600; }
.nav-en { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: .62; }
.caret { font-size: 9px; opacity: .6; transition: transform .15s ease; }
.nav-group[open] .caret { transform: rotate(180deg); }

.submenu {
  list-style: none; margin: 0; padding: 8px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 0 0 12px 12px; box-shadow: var(--shadow);
}
@media (min-width: 720px) {
  .submenu { position: absolute; top: 100%; left: 0; min-width: 258px; z-index: 30; }
}
@media (max-width: 719px) {
  .nav-inner { flex-direction: column; gap: 0; }
  .nav-group { border-bottom: 1px solid var(--line); }
  .nav-group:last-child { border-bottom: 0; }
  .submenu { border: 0; box-shadow: none; border-radius: 0; padding: 0 0 10px 14px; }
}
.submenu li { margin: 0; }
.submenu a {
  display: grid; grid-template-columns: 26px 1fr; align-items: baseline; column-gap: 8px;
  padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink);
}
.submenu a:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.submenu a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 700; }
.submenu .nav-num { font-size: 10.5px; letter-spacing: .08em; color: var(--accent); font-weight: 700; }
.submenu .nav-ja { grid-column: 2; font-size: 14.5px; font-weight: 500; }
.submenu .nav-en { grid-column: 2; }
.submenu a[aria-current="page"] .nav-ja { font-weight: 700; }

/* ---------------------------------------------------------------- sections */
.lede { padding: clamp(40px, 7vw, 72px) 0 0; }
.lede p {
  font-family: var(--serif); font-size: clamp(17px, 2.5vw, 21px);
  max-width: var(--read); margin: 0 0 1em;
}

.sec-head { margin: 0 0 30px; }
.sec-eyebrow { margin: 0 0 8px; font-size: 11px; letter-spacing: .24em; color: var(--accent); font-weight: 700; }
.sec-head h2 { font-family: var(--serif); font-size: clamp(22px, 3.6vw, 30px); margin: 0 0 6px; line-height: 1.45; }
.sec-note { margin: 0; color: var(--muted); font-size: 14.5px; }

.toc { padding: clamp(48px, 8vw, 88px) 0; }
.toc-grid {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.toc-card {
  display: flex; flex-direction: column; height: 100%; gap: 4px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 20px 18px; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease;
}
.toc-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.toc-art { display: block; margin: -4px 0 8px; }
.toc-art svg { display: block; width: 100%; height: auto; }
.toc-num { font-size: 11px; letter-spacing: .18em; color: var(--accent); font-weight: 700; }
.toc-label { font-size: 12.5px; color: var(--muted); letter-spacing: .06em; }
.toc-title { font-family: var(--serif); font-size: 18.5px; line-height: 1.6; margin: 2px 0 6px; }
.toc-sum { font-size: 13.5px; color: var(--muted); line-height: 1.85; flex: 1; }
.toc-go { margin-top: 12px; font-size: 13px; color: var(--accent); font-weight: 700; }
.toc-go::after { content: " →"; }

/* ---------------------------------------------------------------- page body */
.page { padding: clamp(36px, 6vw, 68px) 0 clamp(28px, 5vw, 56px); }
.crumbs { margin: 0 0 22px; font-size: 13px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.sec-mark { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.sec-mark .num { font-family: var(--serif); font-size: 30px; color: var(--accent); line-height: 1; }
.sec-mark .tag { font-size: 11px; letter-spacing: .24em; color: var(--muted); }
.sec-title {
  font-family: var(--serif); font-weight: 600; line-height: 1.42;
  font-size: clamp(26px, 5vw, 40px); margin: 0 0 16px; letter-spacing: .01em;
}
.sec-summary { margin: 0 0 36px; color: var(--muted); max-width: var(--read); font-size: 15.5px; }

.page-main { display: grid; gap: 34px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .page-main { grid-template-columns: 280px 1fr; align-items: start; } }
.page-visual {
  margin: 0; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; box-shadow: var(--shadow);
}
.page-visual svg { display: block; width: 100%; height: auto; }
@media (min-width: 900px) { .page-visual { position: sticky; top: 24px; } }

.sec-body { max-width: var(--read); }
.sec-body p { margin: 0 0 1.5em; }
.sec-body h2 {
  font-family: var(--serif); font-size: clamp(18px, 2.7vw, 22px);
  margin: 2.4em 0 .8em; padding-top: .9em; border-top: 1px solid var(--line); line-height: 1.6;
}
.sec-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.takeaways {
  background: color-mix(in srgb, var(--accent-2) 12%, var(--paper-2));
  border: 1px solid color-mix(in srgb, var(--accent-2) 36%, transparent);
  border-radius: 14px; padding: 20px 22px; margin: 0 0 2.4em;
}
.takeaways h2 {
  margin: 0 0 12px !important; padding: 0 !important; border: 0 !important;
  font-family: var(--sans); font-size: 12px; letter-spacing: .18em; color: var(--accent);
}
.takeaways ul { margin: 0; padding-left: 1.2em; }
.takeaways li { margin: 0 0 .5em; font-size: 15px; line-height: 1.85; }
.takeaways li:last-child { margin-bottom: 0; }

.page-faq { border-top: 1px solid var(--line); padding: clamp(40px, 6vw, 64px) 0; }

.pull {
  font-family: var(--serif); font-size: clamp(19px, 3.1vw, 25px); line-height: 1.75;
  margin: 1.6em 0 !important; padding: 2px 0 2px 22px;
  border-left: 4px solid var(--accent); color: var(--ink);
}
.pull.small { font-size: clamp(16px, 2.4vw, 19px); border-left-color: var(--accent-2); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative; padding: 0 0 2.2em 26px; border-left: 2px solid var(--line-strong);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 9px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--paper);
}
.timeline .when { display: block; font-size: 11.5px; letter-spacing: .14em; color: var(--accent); font-weight: 700; }
.timeline .what { display: block; font-family: var(--serif); font-size: 18px; margin: 2px 0 .7em; }
.timeline p { margin: 0 0 1em; }

/* ---------------------------------------------------------------- faq */
.faq { padding: 0 0 clamp(48px, 8vw, 88px); }
.faq-list { margin: 0; }
.faq-item {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; margin: 0 0 12px;
}
.faq-item dt { font-family: var(--serif); font-size: 17px; margin: 0 0 8px; }
.faq-item dd { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------------------------------------------------------------- pager */
.pager { border-top: 1px solid var(--line); }
.pager .wrap { display: flex; justify-content: space-between; gap: 14px; padding-block: 24px; flex-wrap: wrap; }
.pager a {
  flex: 1 1 200px; text-decoration: none; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  font-family: var(--serif); font-size: 16px;
}
.pager a:hover { border-color: var(--accent); }
.pager a span { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .14em; color: var(--accent); margin-bottom: 4px; }
.pager-next { text-align: right; }

/* ---------------------------------------------------------------- sitemap page */
.map-group { margin: 44px 0 0; }
.map-group h2 {
  font-family: var(--serif); font-size: 20px; margin: 0 0 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.map-group h2 span { font-family: var(--sans); font-size: 11px; letter-spacing: .2em; color: var(--muted); margin-left: 12px; }
.map-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.map-list a {
  display: grid; gap: 2px; grid-template-columns: 44px 1fr; align-items: baseline;
  text-decoration: none; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px;
}
.map-list a:hover { border-color: var(--accent); }
.map-num { font-size: 12px; letter-spacing: .12em; color: var(--accent); font-weight: 700; }
.map-label { font-family: var(--serif); font-size: 17px; }
.map-sum { grid-column: 2; font-size: 13.5px; color: var(--muted); }
.map-plain { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }

.notfound { text-align: center; padding-block: clamp(60px, 12vw, 120px); }
.btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
}

/* ---------------------------------------------------------------- thesis / footer */
.thesis {
  background: var(--ink); color: var(--paper);
  padding: clamp(56px, 10vw, 104px) 0; text-align: center;
}
.thesis-eyebrow { margin: 0 0 18px; font-size: 11px; letter-spacing: .26em; color: var(--accent-2); }
.thesis-line { font-family: var(--serif); font-size: clamp(34px, 8vw, 68px); margin: 0 0 18px; line-height: 1.25; }
.thesis-line em { font-style: normal; color: var(--accent-2); }
.thesis-sub { margin: 0; font-size: 13px; opacity: .72; letter-spacing: .1em; }

.site-foot { border-top: 1px solid var(--line); padding: clamp(40px, 7vw, 72px) 0 56px; }
.foot-creed { font-family: var(--serif); font-size: clamp(22px, 4vw, 30px); margin: 0 0 32px; color: var(--accent); }
.foot-map { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0 0 36px; }
.foot-col-title { margin: 0 0 12px; font-size: 12px; letter-spacing: .1em; font-weight: 700; }
.foot-col-title span { display: block; font-size: 10px; letter-spacing: .2em; color: var(--muted); font-weight: 400; margin-top: 2px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin: 0 0 8px; }
.foot-col a { font-size: 14px; text-decoration: none; color: var(--muted); }
.foot-col a:hover { color: var(--accent); text-decoration: underline; }
.foot-note { margin: 0 0 18px; font-size: 12.5px; color: var(--muted); max-width: 58em; line-height: 1.9; }
.foot-meta { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; }

@media print {
  .page-nav, .pager, .scroll-hint, .hero-arc { display: none; }
  body { background: #fff; color: #000; }
}
