/* ── Reset & Base (Hamilton / showma-yamazaki style) ─────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --text: #000000;
  --text-muted: rgba(0, 0, 0, 0.35);
  --link: #399EE3;
  --font: 'Helvetica', 'Helvetica Neue', Arial, sans-serif;
  --content-width: 900px;
  --page-padding: 22px;
  --sidebar-width: 240px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

a:hover {
  color: var(--text-muted);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

::selection {
  background: #000;
  color: #fff;
}

.page-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
  width: 100%;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  padding: 24px 0 16px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-name {
  display: inline-block;
  font-family: var(--font);
  font-size: 20px;
  font-weight: bold;
  letter-spacing: -0.01em;
  color: #399EE3;
  text-decoration: none;
}

.site-name:hover {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 22px;
  list-style: none;
  flex-shrink: 0;
}

.site-nav a {
  font-family: var(--font);
  font-size: 16px;
  font-weight: bold;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text-muted);
  text-decoration: none;
}

/* ── Main Layout ──────────────────────────────────────────── */
main {
  padding: 0 0 40px;
}

/* ── About Page ───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  gap: 22px;
  align-items: start;
}

.about-text h1 {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 0.25rem;
}

.about-title {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 14px;
}

.about-text p {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.about-text a.text-link {
  color: var(--link);
}

.about-text a.text-link:hover {
  color: var(--text-muted);
}

.about-list {
  list-style: disc;
  padding-left: 1.25em;
  font-size: 14px;
  line-height: 1.45;
}

.about-list li {
  margin-bottom: 12px;
}

.about-list li:last-child {
  margin-bottom: 0;
}

.about-list strong {
  font-weight: bold;
}

.about-list .katex {
  font-size: 1em;
}

/* ── News Section ─────────────────────────────────────────── */
.news-section {
  margin-top: 36px;
}

.news-heading {
  font-size: 20px;
  font-weight: bold;
  color: rgb(39, 89, 169);
  margin-bottom: 12px;
}

.news-list {
  list-style: disc outside;
  padding-left: 1.5em;
  font-size: 14px;
  line-height: 1.45;
}

.news-list .katex {
  font-size: 1em;
}

.news-list > li {
  margin-bottom: 8px;
}

.news-list > li:last-child {
  margin-bottom: 0;
}

.news-list ul {
  list-style: circle outside;
  padding-left: 1.5em;
  margin-top: 4px;
}

.news-list ul li {
  margin-bottom: 5px;
}

.news-list ul li:last-child {
  margin-bottom: 0;
}

.news-list a.news-link {
  color: #07889b;
}

.news-list a.news-link:hover {
  color: var(--text-muted);
}

.about-sidebar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: var(--sidebar-width);
}

.about-sidebar img {
  width: var(--sidebar-width);
  height: auto;
  object-fit: cover;
  margin-bottom: 12px;
}

.sidebar-email {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35em;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 10px;
  align-self: stretch;
  text-align: right;
}

.sidebar-links {
  list-style: none;
  font-size: 14px;
  line-height: 1.6;
  align-self: stretch;
  text-align: right;
}

.sidebar-links li {
  margin-bottom: 4px;
}

.sidebar-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.sidebar-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: -1px;
}

.sidebar-links a:hover {
  color: var(--text-muted);
  text-decoration: none;
}

/* ── Research Page ────────────────────────────────────────── */
.page-title {
  font-size: 28px;
  font-weight: bold;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 36px;
  text-align: left;
}

/* ── Misc Page ────────────────────────────────────────────── */
.misc-section {
  font-size: 14px;
  line-height: 1.45;
}

.misc-heading {
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 16px;
}

.misc-subheading {
  margin: 16px 0 8px;
}

.misc-subheading:first-of-type {
  margin-top: 0;
}

.misc-list {
  list-style: none;
  padding-left: 0;
}

.misc-list li {
  margin-bottom: 6px;
}

.misc-list li:last-child {
  margin-bottom: 0;
}

.misc-footer {
  margin-top: 64px;
  padding-bottom: 32px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.jog-section {
  margin-top: 36px;
}

.jog-item + .jog-item {
  margin-top: 20px;
}

.jog-problem {
  cursor: pointer;
  font-size: 14px;
  line-height: 1.45;
}

.jog-problem p {
  margin-bottom: 0;
  font-family: "Libertinus Serif", "STIX Two Text", "Latin Modern Roman", "Times New Roman", Times, serif;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.jog-problem:hover {
  color: var(--text-muted);
}

.jog-problem.is-revealed {
  cursor: pointer;
}

.jog-hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.jog-solution {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.jog-solution[hidden] {
  display: none;
}

.jog-solution p {
  margin-bottom: 10px;
}

.jog-solution p:last-child {
  margin-bottom: 0;
}

.jog-solution .katex-display {
  margin: 0.6em 0;
}

.band-name {
  font-family: "Shippori Mincho B1", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 600;
  font-size: 1.4em;
  letter-spacing: 0.12em;
  color: var(--text);
}

/* Timeline */
.timeline-section {
  margin-bottom: 36px;
}

.timeline-section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 18px;
}

.section-icon {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--text);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-header h2 {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: -0.01em;
}

.timeline {
  position: relative;
  padding-left: 18px;
  margin-left: 17px;
  border-left: 1px solid rgba(0, 0, 0, 0.13);
}

.timeline-entry {
  position: relative;
  padding-bottom: 18px;
  padding-left: 1.25rem;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
}

.entry-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 0.15rem;
}

.entry-date {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.entry-detail {
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
}

/* Publications */
.pub-entry {
  position: relative;
  padding-left: 1.1em;
  margin-bottom: 22px;
}

.pub-entry::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text);
  line-height: 1.45;
}

.pub-entry:last-child {
  margin-bottom: 0;
}

.pub-entry .entry-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.45;
  margin-bottom: 0.1rem;
}

.pub-entry .entry-title .katex {
  font-size: 1em;
}

.small-caps {
  font-variant: small-caps;
  letter-spacing: 0.02em;
}

.pub-entry .entry-title a {
  color: #07889b;
  font-weight: bold;
  border-bottom: none;
}

.pub-entry .entry-title a:hover {
  color: var(--text-muted);
  text-decoration: none;
}

.pub-status {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.pub-authors {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 0.1rem;
}

.pub-authors strong {
  font-weight: bold;
}

.pub-links {
  font-size: 14px;
  line-height: 1.45;
}

.pub-links a {
  color: #07889b;
}

.pub-links a:hover {
  color: var(--text-muted);
  text-decoration: none;
}

.misc-heading-spaced {
  margin-top: 28px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 750px) {
  :root {
    --page-padding: 16px;
  }

  .site-header {
    padding: 20px 0 12px;
  }

  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .header-inner nav {
    width: 100%;
  }

  .site-name {
    font-size: 18px;
    align-self: center;
    text-align: center;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .site-nav a {
    font-size: 13px;
    white-space: nowrap;
  }

  main {
    padding-bottom: 36px;
  }

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

  .about-sidebar {
    width: 100%;
    max-width: var(--sidebar-width);
    margin: 0 auto;
    align-items: center;
    order: -1;
  }

  .about-sidebar img {
    width: 200px;
  }

  .sidebar-email {
    display: flex;
    justify-content: center;
    width: 100%;
    text-align: center;
    align-self: stretch;
    margin-bottom: 8px;
  }

  .sidebar-links {
    text-align: center;
    align-self: stretch;
  }

  .sidebar-links li {
    margin-bottom: 6px;
  }

  .sidebar-links li:last-child {
    margin-bottom: 0;
  }

  .sidebar-links a {
    justify-content: center;
  }

  .page-title {
    font-size: 24px;
    margin-bottom: 28px;
  }

  .about-text p,
  .entry-detail,
  .pub-authors {
    margin-bottom: 12px;
  }

  .misc-footer .band-name {
    display: block;
    margin-top: 0.35em;
    white-space: nowrap;
  }
}

@media (max-width: 400px) {
  .site-nav {
    gap: 4px;
  }

  .site-nav a {
    font-size: 12px;
  }
}
