/* Reset & base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-text: #111;
  --color-muted: #555;
  --color-link: #111;
  --color-link-hover: #000;
  --color-border: #ccc;
  --font-body: Georgia, 'Times New Roman', serif;
  --font-mono: 'Courier New', Courier, monospace;
  --max-width: 760px;
  --gap: 2rem;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: #fffbf7;
  line-height: 1.7;
  padding: 2rem 1.25rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Typography */
h1 {
  font-size: 1.75rem;
  font-weight: normal;
  letter-spacing: 0.01em;
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 0.9rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-link-hover);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--gap) 0;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.25rem;
}

/* Header */
header {
  margin-bottom: var(--gap);
}

.name-ja {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-left: 0.6rem;
}

.handle {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.9rem;
}

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

.links a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

/* Section headings with Japanese */
.heading-ja {
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--color-muted);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 0.5rem;
}

/* Sections */
section {
  margin-bottom: 0;
}

/* Bilingual layout */
.bilingual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.lang-block {
  font-size: 0.95rem;
}

/* Tables (affiliations, career, education) */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

tr {
  border-bottom: 1px solid #eee;
}

tr:last-child {
  border-bottom: none;
}

td {
  padding: 0.6rem 0;
  vertical-align: top;
}

.aff-role {
  width: 80%;
}

.aff-period {
  width: 20%;
  text-align: right;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-left: 1rem;
}

.role-ja {
  display: block;
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 0.15rem;
}

/* Publications & Talks list */
.pub-list {
  list-style: none;
  padding: 0;
}

.pub-list li {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
  align-items: baseline;
}

.pub-list li:last-child {
  border-bottom: none;
}

.pub-year {
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 2.5rem;
}

.pub-body {
  flex: 1;
}

.pub-venue {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.pub-award {
  display: block;
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-top: 0.1rem;
}

.talk-ja {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.see-more {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Footer */
footer {
  margin-top: var(--gap);
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer-links {
  margin-top: 0.4rem;
}

.footer-links a {
  color: var(--color-muted);
}

/* Responsive */
@media (max-width: 600px) {
  .bilingual {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .aff-period {
    display: none;
  }

  .aff-role {
    width: 100%;
  }

  h1 {
    font-size: 1.4rem;
  }

  .name-ja {
    display: block;
    margin-left: 0;
    margin-top: 0.2rem;
  }
}
