:root {
  --paper: #faf6f1;
  --paper-2: #f3ece4;
  --ink: #241a24;
  --muted: #76687a;
  --accent: #8c2f5a;
  --rose: #d48aa5;
  --gold: #b8976a;
  --line: #e4d8cc;
  --c-work: #8c2f5a;
  --c-study: #a8741f;
  --serif: "Cormorant Garamond", "Noto Serif JP", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141014;
    --paper-2: #1d171d;
    --ink: #efe7ea;
    --muted: #a99aa4;
    --accent: #e59ab6;
    --rose: #b46b88;
    --gold: #b8976a;
    --line: #3a2f38;
    --c-work: #d4669a;
    --c-study: #b07c24;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}

[lang="ja"] { font-family: "Noto Serif JP", serif; }
a { color: var(--accent); text-underline-offset: 3px; }
em { font-style: italic; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

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

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.monogram {
  font: 600 1.6rem var(--serif);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .02em;
}
.monogram span { color: var(--accent); font-style: italic; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--accent); }

/* Hero */
.hero { padding: 72px 0 0; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 56px; align-items: center; }
.kicker {
  margin: 0 0 18px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero h1 { font-size: clamp(3.2rem, 8vw, 6.4rem); font-weight: 500; letter-spacing: -.01em; }
.hero h1 em { color: var(--accent); }
.lede { font-size: 1.15rem; max-width: 560px; margin: 24px 0 12px; }
.meta { color: var(--muted); font-size: .92rem; margin: 0 0 28px; }

.links { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform .2s, background .2s, color .2s;
}
.button:hover { transform: translateY(-2px); }
.button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.button.ghost:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.portrait { position: relative; margin: 0; justify-self: center; }
.arch {
  width: min(340px, 72vw);
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 12px 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(60, 20, 40, .45);
  outline: 1px solid var(--gold);
  outline-offset: 10px;
}
.arch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait figcaption {
  position: absolute;
  bottom: -14px;
  left: -18px;
  padding: 8px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .9rem;
}
.vertical {
  position: absolute;
  top: 24px;
  right: -44px;
  writing-mode: vertical-rl;
  font-size: .8rem;
  letter-spacing: .35em;
  color: var(--gold);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 88px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats div { padding: 28px 24px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; padding-left: 0; }
.stats dt { font: 500 3rem/1 var(--serif); color: var(--accent); }
.stats dd { margin: 8px 0 0; color: var(--muted); font-size: .88rem; }

/* Sections */
.section { padding: 112px 24px 0; }
.label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 40px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.label > span:first-child { font: italic 500 1.4rem var(--serif); letter-spacing: 0; color: var(--gold); }
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

h4.group {
  margin: 0 0 12px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.pull {
  margin: 0;
  font: italic 500 clamp(1.8rem, 3.4vw, 2.6rem)/1.2 var(--serif);
  color: var(--ink);
  padding-left: 28px;
  border-left: 1px solid var(--gold);
}
.pull cite {
  display: block;
  margin-top: 20px;
  font: normal 600 .72rem var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose p { margin: 0 0 1.2em; font-size: 1.05rem; }
.prose p:first-child::first-letter {
  float: left;
  font: 600 4.2rem/.8 var(--serif);
  padding: 6px 10px 0 0;
  color: var(--accent);
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.timeline > li:last-child { border-bottom: 1px solid var(--line); }
.years { margin: 0; font: italic 500 1.5rem var(--serif); color: var(--accent); }
.timeline h3 { font-size: 1.9rem; margin-bottom: 10px; }
.timeline h3 small { font: 400 .85rem var(--sans); color: var(--muted); margin-left: 8px; }
.role { margin: 4px 0; font-weight: 500; }
.role span { color: var(--muted); font-weight: 400; font-size: .9rem; margin-left: 10px; }
.detail { margin: 10px 0 0; color: var(--muted); }
.highlights { margin: 16px 0 0; padding: 0; list-style: none; }
.highlights li { position: relative; padding-left: 22px; margin-bottom: 10px; color: var(--muted); }
.highlights li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.highlights strong { color: var(--ink); font-weight: 600; }
.timeline .stack { margin: 12px 0 0; font-size: .8rem; letter-spacing: .06em; color: var(--gold); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.project { background: var(--paper); padding: 32px; transition: background .25s; }
.project:hover { background: var(--paper-2); }
.project h3 { font-size: 1.6rem; margin-bottom: 10px; }
.project h3 a { color: var(--ink); text-decoration: none; }
.project h3 a:hover { color: var(--accent); }
.project p { margin: 0 0 10px; color: var(--muted); }
.project .stack { font-size: .8rem; letter-spacing: .06em; color: var(--gold); margin: 0; }
.project.featured {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  background: var(--paper-2);
}
.project.featured h3 { font-size: 2.4rem; }
.project.featured p { font-size: 1.05rem; max-width: 520px; }
.tag { font-size: .72rem !important; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent) !important; }
.more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .9rem; text-decoration: none; }

/* Credentials */
.credential-hero {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 32px;
  margin-bottom: 56px;
  border: 1px solid var(--gold);
  background: var(--paper-2);
}
.seal {
  flex: none;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin: 0;
  border-radius: 50%;
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 4px;
  font: 600 1.7rem var(--serif);
  color: var(--accent);
}
.credential-hero h3 { font-size: 2rem; }
.credential-hero p { margin: 6px 0 0; color: var(--muted); }
.credential-hero .accent { color: var(--accent); font-weight: 500; }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.rows { list-style: none; margin: 0 0 40px; padding: 0; }
.rows li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-weight: 500;
}
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: 2px; font-family: var(--sans); }
.rows time { flex: none; color: var(--gold); font: italic 500 1.05rem var(--serif); white-space: nowrap; }

/* Community */
.community { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.community article { border-top: 2px solid var(--accent); padding-top: 20px; }
.community h3 { font-size: 1.45rem; }
.community .when { margin: 6px 0 10px; font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.community p { margin: 0; color: var(--muted); }
.goal {
  margin: 72px 0 0;
  text-align: center;
  font: italic 500 clamp(1.8rem, 4vw, 2.8rem) var(--serif);
}
.goal span {
  display: block;
  margin-bottom: 8px;
  font: normal 600 .72rem var(--sans);
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Skills */
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 56px; }
.list { margin: 0; line-height: 1.9; }
.list em { color: var(--muted); font-size: .88rem; }

/* Footer / contact */
footer {
  margin-top: 128px;
  padding: 96px 0 40px;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
footer h2 { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 500; }
footer h2 em { color: var(--accent); }
footer .sub { max-width: 520px; color: var(--muted); margin: 20px 0 32px; font-size: 1.05rem; }
.copy { margin: 80px 0 0; color: var(--muted); font-size: .82rem; letter-spacing: .06em; }

/* Illustrations */
.sakura {
  position: absolute;
  top: -46px;
  left: -86px;
  width: 210px;
  z-index: 2;
  pointer-events: none;
}
.sakura .branch { fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: round; opacity: .7; }
.sakura .branch.thin { stroke-width: 1.8; }
.sakura .bud { opacity: .55; }

.bridge-art { margin: 40px 0 0; }
.bridge-art svg { width: 100%; height: auto; display: block; }
.bridge-art .water { fill: none; stroke: var(--rose); stroke-width: 1.5; opacity: .6; }
.bridge-art .water.faint { opacity: .3; }
.bridge-art .land { fill: var(--paper-2); stroke: var(--line); }
.bridge-art .arch-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.bridge-art .deck { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.bridge-art .hangers line { stroke: var(--gold); stroke-width: 1.2; }
.bridge-art .people circle, .bridge-art .people path { fill: none; stroke: var(--ink); stroke-width: 2; }
.bridge-art .doc rect { fill: var(--paper); stroke: var(--accent); stroke-width: 1.5; }
.bridge-art .doc line { stroke: var(--gold); stroke-width: 1.2; }
.bridge-art .flow-arrow { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 4 4; fill: none; }
.bridge-art .arrow-tip { fill: var(--gold); }
.bridge-art .cap { font: 600 14px var(--sans); fill: var(--ink); }
.bridge-art .cap.sub { font-weight: 400; fill: var(--muted); }

/* Charts */
.chart { margin: 0 0 48px; padding: 28px; border: 1px solid var(--line); background: var(--paper); }
.chart figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.chart figcaption h3 { font-size: 1.5rem; }
.legend { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; }
.swatch.study { background: var(--c-study); }
.swatch.work { background: var(--c-work); }

.chart-scroll { overflow-x: auto; }
.gantt { width: 100%; min-width: 640px; height: auto; display: block; }
.gantt .grid line { stroke: var(--line); stroke-width: 1; }
.gantt .baseline { stroke: var(--muted); stroke-width: 1; }
.gantt .ticks text { font: 500 13px var(--sans); fill: var(--muted); text-anchor: middle; }
.gantt .row-label { font: 600 13px var(--sans); fill: var(--ink); letter-spacing: .08em; text-transform: uppercase; }
.gantt .bar text { font: 600 12px var(--sans); fill: var(--paper); text-anchor: middle; pointer-events: none; }
.gantt .bar.study rect { fill: var(--c-study); }
.gantt .bar.work rect { fill: var(--c-work); }
.gantt .bar rect { transition: opacity .2s; cursor: default; }
.gantt:hover .bar rect { opacity: .55; }
.gantt .bar:hover rect { opacity: 1; }

.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li { display: grid; grid-template-columns: 240px 1fr 64px; gap: 16px; align-items: center; padding: 8px 0; }
.hbars .name { font-weight: 500; font-size: .92rem; }
.hbars .track { height: 14px; }
.hbars .fill { display: block; height: 100%; width: var(--v); background: var(--c-work); border-radius: 0 4px 4px 0; }
.hbars .val { color: var(--muted); font-size: .88rem; text-align: right; }

.cols {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 2px;
  align-items: end;
  height: 200px;
  border-bottom: 1px solid var(--muted);
}
.cols li { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.cols b { font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.cols i { display: block; width: 70%; max-width: 28px; height: calc(var(--n) * 20px); background: var(--c-work); border-radius: 4px 4px 0 0; opacity: .75; }
.cols li.peak i { opacity: 1; }
.cols li.peak b { color: var(--ink); }
.cols span { position: absolute; bottom: -24px; font-size: .72rem; color: var(--muted); }
.chart .cols { margin-bottom: 28px; }

.project .shot { width: 100%; height: auto; display: block; margin-bottom: 24px; border: 1px solid var(--line); }

.bubbles { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 16px; }
.bubble {
  position: relative;
  padding: 8px 16px;
  border-radius: 18px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font: italic 500 1.15rem var(--serif);
}
.bubble.jp { font-style: normal; font-size: 1rem; border-color: var(--accent); }
.bubble::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  background: inherit;
  border-right: 1px solid;
  border-bottom: 1px solid;
  border-color: inherit;
  transform: rotate(45deg);
}

/* Advice corner teaser on the home page */
.advice-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px;
  background: var(--paper-2);
  border: 1px solid var(--gold);
}
.advice-card h3 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 500; }
.advice-card h3 em { color: var(--accent); }
.advice-card p { color: var(--muted); }
.advice-card ul { list-style: none; margin: 0; padding: 0; }
.advice-card li { padding: 10px 0; border-top: 1px solid var(--line); font-weight: 500; }
.advice-card li:last-child { border-bottom: 1px solid var(--line); }

/* Guide page */
.guide-hero { padding: 72px 0 0; }
.guide-hero h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); font-weight: 500; }
.guide-hero h1 em { color: var(--accent); }
.guide-hero .lede { max-width: 720px; }
.guide-hero .meta { max-width: 720px; }
.guide-hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.hero-art { margin: 0; }
.hero-art svg { width: 100%; height: auto; display: block; }
.hero-art .sun { fill: var(--rose); opacity: .45; }
.hero-art .fuji { fill: var(--paper-2); stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; }
.hero-art .snow { fill: var(--paper); stroke: var(--muted); stroke-width: 1; stroke-linejoin: round; }
.hero-art .hill { fill: var(--paper-2); }
.hero-art .laptop rect, .hero-art .laptop path { fill: var(--ink); }
.hero-art .laptop .screen { fill: var(--paper); }
.hero-art .code line { stroke: var(--muted); stroke-width: 4; stroke-linecap: round; opacity: .6; }
.hero-art .code .hl { stroke: var(--accent); opacity: 1; }
.hero-art .jp { font: 600 18px "Noto Serif JP", serif; fill: var(--accent); }
.hero-art .petals ellipse { fill: var(--rose); opacity: .8; }

.calendar .markers line { stroke: var(--muted); stroke-dasharray: 3 4; }
.calendar .markers text { font: 600 12px var(--sans); fill: var(--ink); }
.calendar .row-labels text { font: 500 13px var(--sans); fill: var(--ink); }
.calendar .years text { font: italic 500 18px var(--serif); fill: var(--gold); text-anchor: middle; }
.chart figcaption .note { margin: 0; }

.doc-grid { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }
.rireki { margin: 0; position: sticky; top: 84px; }
.rireki svg { width: 100%; height: auto; display: block; }
.rireki .sheet { fill: var(--paper); stroke: var(--line); }
.rireki .cell { fill: none; stroke: var(--muted); stroke-width: .8; }
.rireki .cell-l, .rireki .rows-l line { stroke: var(--line); stroke-width: .8; }
.rireki .photo { fill: var(--paper-2); stroke: var(--muted); stroke-dasharray: 3 3; }
.rireki .ph { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.rireki text { font-family: "Noto Serif JP", serif; fill: var(--ink); }
.rireki .t-title { font-size: 20px; font-weight: 600; }
.rireki .t-small { font-size: 10px; }
.rireki .t-name { font-size: 18px; }
.rireki .pins circle { fill: var(--accent); }
.rireki .pins text { font: 700 10px var(--sans); fill: var(--paper); text-anchor: middle; }
.pin-key { margin: 16px 0 0; padding-left: 22px; font-size: .85rem; color: var(--muted); }
.pin-key li { padding-bottom: 4px; }
.pin-key li::marker { color: var(--accent); font-weight: 700; }

.callout {
  max-width: 820px;
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  background: var(--paper-2);
  color: var(--muted);
  font-size: .95rem;
}
.callout strong { color: var(--ink); }
.toc {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}
.toc li { border-bottom: 1px solid var(--line); }
.toc a { display: block; padding: 14px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.toc a:hover { color: var(--accent); }
.toc a > span:first-child { display: inline-block; min-width: 36px; font: italic 500 1.1rem var(--serif); color: var(--gold); }

.intro { max-width: 760px; font-size: 1.05rem; margin: 0 0 32px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
h3.h { font-size: 1.6rem; margin: 0 0 10px; }
h3.h.top { margin-top: 56px; }
.two p + h3.h, .two ul + h3.h { margin-top: 32px; }
.note { color: var(--muted); font-size: .9rem; }
.community.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 48px; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 0 0 12px 22px; }
.ticks li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.numbered { margin: 0; padding-left: 20px; }
.numbered li { padding-bottom: 8px; }
.numbered li::marker { color: var(--gold); font-family: var(--serif); font-style: italic; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); margin-bottom: 40px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; padding: 14px 16px; background: var(--paper-2); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; }
td:first-child { font-weight: 600; white-space: nowrap; }
td:last-child { color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 2px solid var(--accent); }
.steps li { padding: 24px 24px 24px 0; position: relative; }
.steps li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--paper); }
.steps .when { margin: 0 0 6px; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.steps h3 { font-size: 1.4rem; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }

.flow { list-style: none; counter-reset: flow; margin: 0 0 48px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.flow li {
  counter-increment: flow;
  flex: 1 1 150px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--muted);
  font-size: .85rem;
}
.flow li::before { content: counter(flow, decimal-leading-zero); display: block; font: italic 500 1.1rem var(--serif); color: var(--gold); }
.flow li > span { display: block; color: var(--ink); font-weight: 600; font-size: .95rem; }

.sample { padding: 20px 24px; border: 1px dashed var(--gold); background: var(--paper-2); font-size: .95rem; line-height: 1.9; }
.sample p { margin: 0 0 6px; }
.sample b { color: var(--accent); font-weight: 600; margin-right: 6px; }

.rows.doc li { display: block; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { border-top: 1px solid var(--line); }
.checks li:last-child { border-bottom: 1px solid var(--line); }
.checks label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; cursor: pointer; }
.checks input { margin-top: 5px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.checks label:has(input:checked) { color: var(--muted); text-decoration: line-through; }

.glossary { margin: 0; }
.glossary div { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.glossary div:last-child { border-bottom: 1px solid var(--line); }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0; color: var(--muted); }

.resources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.resources ul { list-style: none; margin: 0; padding: 0; }
.resources li { padding: 6px 0; }

/* Scroll reveal (added by script only) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { padding-top: 48px; }
  .hero-grid, .about-grid, .columns, .skills { grid-template-columns: 1fr; gap: 48px; }
  .portrait { order: -1; }
  .vertical { right: -32px; }
  .stats { grid-template-columns: 1fr 1fr; margin-top: 64px; }
  .stats div { padding: 20px 16px; }
  .stats div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section { padding-top: 80px; }
  .timeline > li { grid-template-columns: 1fr; gap: 8px; }
  .projects { grid-template-columns: 1fr; }
  .project.featured { grid-column: auto; grid-row: auto; padding: 32px; }
  .community { grid-template-columns: 1fr 1fr; }
  .advice-card, .two, .resources { grid-template-columns: 1fr; gap: 32px; }
  .advice-card { padding: 32px; }
  .community.three { grid-template-columns: 1fr; }
  .toc { grid-template-columns: 1fr; }
  .guide-hero-grid, .doc-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { max-width: 360px; }
  .rireki { position: static; max-width: 400px; }
}

@media (max-width: 560px) {
  .wrap, .section { padding-left: 16px; padding-right: 16px; }
  .community { grid-template-columns: 1fr; }
  .credential-hero { flex-direction: column; align-items: flex-start; padding: 24px; }
  .role span { display: block; margin-left: 0; }
  .rows li { flex-direction: column; gap: 4px; }
  .vertical { display: none; }
  .advice-card { padding: 24px; }
  .chart { padding: 20px 16px; }
  .hbars li { grid-template-columns: 1fr 56px; gap: 6px 12px; }
  .hbars .name { grid-column: 1 / -1; }
  .sakura { width: 150px; left: -40px; top: -36px; }
  .glossary div { grid-template-columns: 1fr; gap: 2px; }
  td:first-child { white-space: normal; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { padding: 14px 16px; border-top: 1px solid var(--line); }
  tr:first-child { border-top: 0; }
  td { padding: 2px 0; border: 0; }
}
