  :root {
    --bg: #faf9f6;
    --fg: #1a1a1a;
    --accent: #2d5a27;
    --accent-light: #e8f0e6;
    --muted: #6b6b6b;
    --border: #d4d0c8;
    --link: #1a5276;
    --link-hover: #2d5a27;
    --code-bg: #f0ede6;
    --card-bg: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: 'Source Serif 4', Georgia, serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.7;
    padding: 0 1.5rem;
  }

  .container {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 0 4rem;
  }

  /* ── language switch ── */
  .lang-switch {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
  }

  .lang-switch a {
    color: var(--muted);
    text-decoration: none;
    padding: 0.25rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--card-bg);
    transition: all 0.2s;
  }

  .lang-switch a:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .lang-switch a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }

  /* ── header ── */
  header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--fg);
  }

  header h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
  }

  header .subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 1.2rem;
  }

  header .tagline {
    font-style: italic;
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 1rem;
  }

  .contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
  }

  .contact-row a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
  }
  .contact-row a:hover {
    border-bottom-color: var(--link);
  }

  /* ── sections ── */
  section {
    margin-bottom: 2.5rem;
  }

  h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  /* ── about ── */
  .about p {
    margin-bottom: 0.8rem;
    font-size: 1rem;
  }

  .about a, .entry a, .interests a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.2s, color 0.2s;
  }
  .about a:hover, .entry a:hover, .interests a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  /* ── entry blocks ── */
  .entry {
    margin-bottom: 1.8rem;
  }

  .entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.15rem;
  }

  .entry-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.95rem;
  }

  .entry-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
  }

  .entry-org {
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
  }

  .entry ul {
    padding-left: 1.2rem;
    font-size: 0.93rem;
  }

  .entry li {
    margin-bottom: 0.3rem;
    color: #333;
  }

  /* ── publication ── */
  .pub {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.2rem;
    border-radius: 3px;
    font-size: 0.92rem;
    line-height: 1.6;
    box-shadow: var(--shadow);
  }

  .pub .venue {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    display: inline-block;
    margin-top: 0.4rem;
    background: var(--accent-light);
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
  }

  .pub a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
  }
  .pub a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  .pub-links {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  .pub-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 2px;
  }

  .pub-links .venue { margin-top: 0; }

  .pub-link:hover {
    background: var(--accent-light);
    border-color: var(--accent);
  }

  .lang-note {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 2px;
    padding: 0.1rem 0.4rem;
    white-space: nowrap;
  }

  /* ── skills ── */
  .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .skill-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    background: var(--code-bg);
    border: 1px solid var(--border);
    padding: 0.2rem 0.65rem;
    border-radius: 2px;
    color: var(--fg);
  }

  /* ── award ── */
  .award {
    padding: 0.8rem 0;
    border-bottom: 1px dashed var(--border);
  }
  .award:last-child { border-bottom: none; }

  .award-name {
    font-weight: 600;
    font-size: 0.95rem;
  }

  .award-detail {
    font-size: 0.9rem;
    color: var(--muted);
  }

  /* ── links row ── */
  .links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
  }

  .links-grid a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--link);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: all 0.2s;
    display: block;
    text-align: center;
  }

  .links-grid a:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
  }

  /* ── personal ── */
  .interests {
    font-size: 0.95rem;
    color: #444;
  }

  /* ── gallery ── */
  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
  }

  .gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow: var(--shadow);
    display: block;
  }

  /* ── quote ── */
  .quote {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--fg);
    text-align: center;
  }

  .quote blockquote {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--muted);
  }

  .quote a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px dotted var(--muted);
  }

  /* ── responsive ── */
  @media (max-width: 500px) {
    header h1 { font-size: 1.4rem; }
    .entry-header { flex-direction: column; }
    .contact-row { flex-direction: column; gap: 0.25rem; }
  }

  /* ── Japanese page ── */
  html[lang="ja"] body {
    font-family: 'Source Serif 4', 'Noto Serif JP', "Hiragino Mincho ProN", "Yu Mincho", YuMincho, serif;
  }

  html[lang="ja"] h2,
  html[lang="ja"] header h1,
  html[lang="ja"] .contact-row,
  html[lang="ja"] .entry-title,
  html[lang="ja"] .entry-date,
  html[lang="ja"] .skill-tag,
  html[lang="ja"] .venue,
  html[lang="ja"] .pub-link,
  html[lang="ja"] .lang-note,
  html[lang="ja"] .links-grid a,
  html[lang="ja"] .lang-switch {
    font-family: 'JetBrains Mono', 'Noto Sans JP', "Hiragino Sans", "Yu Gothic", sans-serif;
  }

  html[lang="ja"] h2 {
    text-transform: none;
    letter-spacing: 1px;
  }
