/* ==========================================================================
   Dongya Koh — personal academic website
   Editorial, restrained. One accent color, hairline rules, no cards.
   ========================================================================== */

:root {
  --paper: #fcfbf8;
  --ink: #16181c;
  --ink-2: #3b3f46;
  --muted: #6e737b;
  --rule: #dcd9d2;
  --rule-strong: #16181c;
  --accent: #1f4e79;         /* muted blue: links, dates, labels, structure */
  --accent-ink: #163a5a;
  --accent-2: #b4541c;       /* warm accent, used sparingly: status, upcoming, new */
  --accent-2-ink: #8f4216;

  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --display: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;

  --measure: 68ch;
  --max: 1040px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";
}
main { flex: 1 0 auto; }

::selection { background: #d9e4ef; }

img { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 78, 121, 0.35);
  transition: border-color 0.15s, color 0.15s;
}
a:hover { color: var(--accent-ink); border-bottom-color: currentColor; }
a.plain { border-bottom: 0; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 400; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
em { font-style: italic; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.measure { max-width: var(--measure); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Small-caps labels used for section eyebrows, metadata, and link rows */
.label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Hairline rules */
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.rule-strong { border: 0; border-top: 2px solid var(--rule-strong); margin: 0; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 64px;
  padding-block: 1rem;
}
.brand {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--ink);
  border: 0;
  white-space: nowrap;
}
.brand .ja { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin-left: 0.6rem; font-weight: 400; }
.brand:hover { color: var(--ink); }

.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  border: 0;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav-links a { position: relative; border-bottom: 0; }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-links a[aria-current="page"] { color: var(--accent-ink); }
.nav-links a[aria-current="page"]::after { background: var(--accent); }
.nav-links .lang a { color: var(--muted); }
.nav-links .lang a::before { content: ""; display: inline-block; width: 1px; height: 0.9em; background: var(--rule); margin-right: 1.6rem; vertical-align: -0.1em; }

/* Reading progress bar */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 30;
  pointer-events: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.25rem 0;
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 0.02em;
}

@media (max-width: 760px) {
  .nav .container { align-items: center; }
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  .nav-links a::after { display: none; }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links a[aria-current="page"] { font-weight: 600; color: var(--accent-ink); }
  .nav-links .lang a::before { display: none; }
}

/* --------------------------------------------------------------------------
   Page structure
   -------------------------------------------------------------------------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section + .section { border-top: 1px solid var(--rule); }

.section-head { margin-bottom: 2rem; }
.section-head .label { display: block; margin-bottom: 0.6rem; }
.section-head p { color: var(--ink-2); max-width: var(--measure); margin: 0.25rem 0 0; }

.page-head { padding: clamp(3rem, 7vw, 5rem) 0 clamp(1.75rem, 4vw, 2.5rem); }
.page-head .label { display: block; margin-bottom: 0.9rem; }
.page-head h1 { margin-bottom: 0.6rem; }
.page-head p { font-size: 1.1rem; color: var(--ink-2); max-width: var(--measure); margin: 0; }

/* Inline link row: "Paper · Appendix · Code" */
.links {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0;
}
.links a { border-bottom-color: rgba(31, 78, 121, 0.3); }
.links a + a::before,
.links span + a::before,
.links a + span::before {
  content: "·";
  color: var(--muted);
  margin: 0 0.6rem;
  border: 0;
}
.links a::before { border: 0; }

/* Metadata line: venue, year, status */
.meta { font-size: 0.95rem; color: var(--muted); }
.meta em { color: var(--accent-ink); }
.status {
  display: inline-block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--accent-2-ink);
  background: rgba(180, 84, 28, 0.1);
  border-left: 2px solid var(--accent-2);
  padding: 0.18em 0.55em 0.18em 0.5em;
  margin-right: 0.15em;
  vertical-align: 0.1em;
}
html[lang="ja"] .status { letter-spacing: 0.06em; }

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
}
.hero h1 { margin-bottom: 0.2rem; }
.hero .ja {
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.hero .role { font-size: 1.15rem; margin-bottom: 0.1rem; }
.hero .affil { color: var(--ink-2); margin-bottom: 1.6rem; }
.hero .lede { font-size: 1.1rem; color: var(--ink-2); max-width: 56ch; margin-bottom: 1.6rem; }
.hero .interests { font-size: 0.98rem; color: var(--ink-2); margin-bottom: 1.8rem; }
.hero .interests .label { display: block; margin-bottom: 0.35rem; }
.hero .actions { font-family: var(--sans); font-size: 0.86rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; }
.hero .actions a { color: var(--ink); border-bottom: 1px solid rgba(31, 78, 121, 0.55); padding-bottom: 1px; }
.hero .actions a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.hero .role { color: var(--accent-ink); }

/* Staggered entrance */
.hero .rise { opacity: 0; transform: translateY(14px); animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.hero .rise:nth-child(1) { animation-delay: 0.05s; }
.hero .rise:nth-child(2) { animation-delay: 0.15s; }
.hero .rise:nth-child(3) { animation-delay: 0.25s; }
.hero .rise:nth-child(4) { animation-delay: 0.32s; }
.hero .rise:nth-child(5) { animation-delay: 0.42s; }
.hero .rise:nth-child(6) { animation-delay: 0.52s; }
.hero .rise:nth-child(7) { animation-delay: 0.62s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.hero figure { margin: 0; opacity: 0; animation: fade 1s ease 0.4s forwards; }
@keyframes fade { to { opacity: 1; } }
.hero figure svg { width: 100%; height: auto; display: block; }
.hero .line {
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
  animation: draw 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.hero .line.l1 { animation-delay: 0.6s; }
.hero .line.l2 { animation-delay: 1s; }
.hero .trend { opacity: 0; animation: fade 0.8s ease 2.8s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero .legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; margin-bottom: 0.5rem; }
.hero .legend span { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.hero .legend i { display: inline-block; width: 18px; height: 2px; }
.hero figcaption {
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
}
.hero figcaption b { font-weight: 600; color: var(--ink-2); }
.hero .line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.hero .trend { fill: none; stroke-width: 1.5; stroke-dasharray: 5 5; }
.hero .axis { font-family: var(--sans); font-size: 10px; fill: var(--muted); }
.hero .c-bea { stroke: #1f4fd8; }
.hero .c-pre { stroke: #f28c28; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero figure { max-width: 560px; }
}

/* --------------------------------------------------------------------------
   Entry lists (featured work, publications, talks)
   -------------------------------------------------------------------------- */
.entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.entries > li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.entries .side {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 0.35rem;
}
.entries .side b { display: block; font-weight: 600; color: var(--accent); font-size: 0.86rem; letter-spacing: 0.02em; }
.entries h3 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.entries h3 a { color: var(--ink); border-bottom-color: transparent; }
.entries h3 a:hover { color: var(--accent); border-bottom-color: rgba(31, 78, 121, 0.4); }
.entries .authors { color: var(--ink-2); margin-bottom: 0.15rem; }
.entries .meta { margin-bottom: 0.6rem; }
.entries .summary { color: var(--ink-2); max-width: var(--measure); margin-bottom: 0.7rem; }
.entries .note { font-size: 0.9rem; color: var(--muted); margin: -0.3rem 0 0.7rem; }
.entries .links { margin-top: 0.2rem; }
.entries .media { font-size: 0.9rem; color: var(--muted); margin-top: 0.75rem; }

@media (max-width: 600px) {
  .entries > li { grid-template-columns: 1fr; gap: 0.35rem; }
  .entries .side { padding-top: 0; }
}

/* Abstract disclosure */
details.abstract { margin-top: 0.8rem; }
details.abstract summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}
details.abstract summary::-webkit-details-marker { display: none; }
details.abstract summary::after { content: " +"; color: var(--muted); }
details.abstract[open] summary::after { content: " −"; }
details.abstract summary:hover { color: var(--ink); }
details.abstract p {
  margin: 0.6rem 0 0;
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: var(--measure);
}

/* Group headings on long pages */
.group { margin-bottom: 3.5rem; }
.group-head {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--rule-strong);
  margin-bottom: 0;
}
/* Short accent segment at the left end of strong heading rules */
.group-head::after, .cv-block > h2::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 3rem; height: 2px;
  background: var(--accent);
}
.group-head h2 { margin: 0; }
.group-head .count { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; }
.group .entries { border-top: 0; }

/* Simple list (work in progress, talks) */
.simple { list-style: none; margin: 0; padding: 0; }
.simple li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.simple .side { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--accent); font-weight: 500; padding-top: 0.3rem; }
.simple .t { color: var(--ink); }
.simple .w { color: var(--muted); font-size: 0.95rem; }
/* Upcoming talks (class added by JS from data-date) */
.simple li.upcoming .side { color: var(--accent-2-ink); font-weight: 600; }
.simple li.upcoming .side::before {
  content: "";
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); margin-right: 0.5rem; vertical-align: 0.1em;
}
@media (max-width: 600px) { .simple li { grid-template-columns: 1fr; gap: 0.15rem; } }

/* In-page navigation */
.subnav {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}
.subnav a { color: var(--ink-2); border-bottom-color: var(--rule); }
.subnav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.subnav button {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: var(--ink-2); cursor: pointer;
  border-bottom: 1px solid var(--rule);
}
.subnav button:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* --------------------------------------------------------------------------
   Two-column prose + figure (data section)
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.split p, .split ul { color: var(--ink-2); }
.split ul { padding-left: 1.1rem; margin: 0 0 1rem; }
.split li { margin-bottom: 0.3rem; }
.split figure { margin: 0; }
.split figcaption {
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
}
.split .cite { font-size: 0.88rem; color: var(--muted); margin-top: 1.25rem; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   CV
   -------------------------------------------------------------------------- */
.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 860px) { .cv-layout { grid-template-columns: 1fr; } }

.cv-block { margin-bottom: 3rem; }
.cv-block h2 {
  position: relative;
  font-size: 1.35rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rule-strong);
  margin-bottom: 0;
}
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
}
.rows .when { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.04em; color: var(--accent); font-weight: 500; padding-top: 0.3rem; }
.rows .what { color: var(--ink); }
.rows .where { color: var(--ink-2); }
.rows .ja { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); margin-top: 0.1rem; }
@media (max-width: 600px) { .rows li { grid-template-columns: 1fr; gap: 0.15rem; } }

.cv-pubs { margin: 0; padding: 0; list-style: none; counter-reset: pub; }
.cv-pubs li {
  position: relative;
  padding: 0.8rem 0 0.8rem 2.2rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
}
.cv-pubs li::before {
  counter-increment: pub;
  content: counter(pub) ".";
  position: absolute; left: 0; top: 0.8rem;
  font-family: var(--sans); font-size: 0.8rem; color: var(--muted); padding-top: 0.25rem;
}
.cv-pubs em { color: var(--accent-ink); }

.aside { position: sticky; top: 5.5rem; }
.aside section { margin-bottom: 1.75rem; }
.aside .label { display: block; padding-bottom: 0.4rem; border-bottom: 1px solid var(--rule); margin-bottom: 0.6rem; }
.aside ul { list-style: none; margin: 0; padding: 0; font-size: 0.95rem; color: var(--ink-2); }
.aside li { padding: 0.2rem 0; }

/* --------------------------------------------------------------------------
   Teaching
   -------------------------------------------------------------------------- */
.school {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 0 2.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}
.school:last-of-type { border-bottom: 1px solid var(--rule); }
.school h2 { font-size: 1.3rem; margin-bottom: 0.1rem; }
.school .years { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--accent); font-weight: 500; }
.school ul { list-style: none; margin: 0; padding: 0; }
.school li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}
.school li:last-child { border-bottom: 0; }
.school .c small { display: block; font-size: 0.86rem; color: var(--muted); }
.school .code { font-family: var(--sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em; color: var(--accent); white-space: nowrap; }
@media (max-width: 760px) {
  .school { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact dl { margin: 0; border-top: 1px solid var(--rule); }
.contact .row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.contact dt { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); padding-top: 0.35rem; }
.contact dd { margin: 0; color: var(--ink-2); }
.contact dd .ja { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); display: block; }
.contact .profiles { margin-top: 1.5rem; }
.map { border: 1px solid var(--rule); aspect-ratio: 4 / 3; background: #f1efe9; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(1) contrast(0.95); }
.map-note { font-family: var(--sans); font-size: 0.78rem; color: var(--muted); margin-top: 0.6rem; line-height: 1.5; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 2.25rem;
  margin-top: clamp(2rem, 6vw, 4rem);
}
.footer .container {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  font-family: var(--sans); font-size: 0.8rem; color: var(--muted);
}
.footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer nav a { color: var(--ink-2); border-bottom-color: transparent; }
.footer nav a:hover { border-bottom-color: var(--ink); color: var(--ink); }

/* --------------------------------------------------------------------------
   Scroll reveal (applied by JS to list rows and headings)
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* Underline that slides in on hover for links inside lists */
.entries h3 a, .simple .t a, .cv-pubs a, .contact dd a {
  border-bottom: 0;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.15s;
}
.entries h3 a:hover, .simple .t a:hover, .cv-pubs a:hover, .contact dd a:hover { background-size: 100% 1px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .hero .rise, .hero figure, .hero .trend { opacity: 1; transform: none; }
  .hero .line { stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Japanese pages
   -------------------------------------------------------------------------- */
html[lang="ja"] body {
  font-family: "Source Serif 4", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  line-height: 1.85;
  font-size: 16.5px;
}
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3 {
  font-family: "Newsreader", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 500;
  letter-spacing: 0.02em;
}
html[lang="ja"] h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
html[lang="ja"] .label, html[lang="ja"] .nav-links a, html[lang="ja"] .links, html[lang="ja"] .subnav,
html[lang="ja"] .side, html[lang="ja"] .when, html[lang="ja"] .years, html[lang="ja"] .code {
  font-family: "Inter", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}
html[lang="ja"] .label { letter-spacing: 0.2em; }
html[lang="ja"] .simple li { grid-template-columns: 8.5rem minmax(0, 1fr); }
@media (max-width: 600px) { html[lang="ja"] .simple li { grid-template-columns: 1fr; } }
html[lang="ja"] .hero .ja { letter-spacing: 0.05em; }

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  .nav, .footer, .subnav { display: none !important; }
  body { font-size: 11.5pt; background: #fff; }
  a { color: inherit; border: 0; }
  details.abstract { display: none; }
  .entries > li, .rows li { break-inside: avoid; }
}
