/* ---- Minimal CV theme -------------------------------------------------- */

:root {
  --font-sans: -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --color-bg: #fdfdfc;
  --color-text: #1f2328;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-accent: #1f6feb;
  --color-accent-bg: #eef4ff;
  --max-width: 46rem;
  --space: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #14161a;
    --color-text: #e6e8eb;
    --color-muted: #9aa4af;
    --color-border: #2b2f36;
    --color-accent: #6ea8fe;
    --color-accent-bg: #17223a;
  }
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  padding: 2.5rem 1.25rem 4rem;
  line-height: 1.65;
  font-size: 16px;
}

.lang-switch,
.page {
  max-width: calc(11rem + 2.5rem + var(--max-width));
  margin: 0 auto;
}

.page {
  display: grid;
  grid-template-columns: 11rem var(--max-width);
  gap: 2.5rem;
}

main { display: flex; flex-direction: column; gap: 2.75rem; min-width: 0; }

h1, h2 { font-weight: 600; letter-spacing: -0.01em; }

h1 {
  font-size: 1.6rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--color-border);
}

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

/* ---- nav / language switch ---- */
.lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  font-size: .85rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

/* ---- table of contents (sidebar) ---- */
.toc {
  position: sticky;
  top: 2.5rem;
  align-self: start;
  font-size: .85rem;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

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

@media (max-width: 60rem) {
  .lang-switch,
  .page { max-width: var(--max-width); }
  .page { grid-template-columns: 1fr; }
  .toc { display: none; }
}

/* ---- profile ---- */
.profile-grid {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.5rem;
  align-items: start;
}

.profile-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 240 / 252;
  object-fit: cover;
  border-radius: .5rem;
  border: 1px solid var(--color-border);
}

@media (max-width: 30rem) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-photo { width: 8rem; }
}

/* ---- lists (publications / patents / talks / awards / software) ---- */
ol.pub-list, ol.patent-list, ul.talk-list, ul.award-list, ul.software-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.pub-entry, .patent-entry, .talk-entry, .award-entry, .software-entry {
  padding-left: 1.6rem;
  position: relative;
  font-size: .95rem;
}

.pub-entry::before, .patent-entry::before, .talk-entry::before, .award-entry::before, .software-entry::before {
  content: "";
  position: absolute;
  left: .2rem;
  top: .55em;
  width: .35rem;
  height: .35rem;
  border-radius: 50%;
  background: var(--color-border);
}

.pub-title, .talk-title, .software-name { font-weight: 500; }
.pub-venue, .patent-number, .patent-location, .award-org, .talk-event, .patent-year {
  color: var(--color-muted);
}
.pub-note, .award-note, .software-desc {
  display: block;
  font-size: .82rem;
  color: var(--color-muted);
  margin-top: .15rem;
}
.pub-link {
  margin-left: .5rem;
  font-size: .82rem;
  white-space: nowrap;
}

/* ---- awards ---- */
.award-name { font-weight: 500; }
.award-cite { color: var(--color-muted); font-size: .88rem; margin-top: .15rem; }

/* ---- biography prose ---- */
.profile-bio p { margin: 0; }
.profile-bio p + p { margin-top: 1rem; }
.profile-bio > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.profile-bio > ul > li::first-line { font-weight: 600; }

.profile-bio > ul > li > ul {
  list-style: none;
  margin: .4rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.profile-bio li li {
  padding-left: 1.1rem;
  position: relative;
  font-size: .95rem;
}

.profile-bio li li::before {
  content: "";
  position: absolute;
  left: .2rem;
  top: .55em;
  width: .35rem;
  height: .35rem;
  border-radius: 50%;
  background: var(--color-border);
}

.profile-bio blockquote {
  margin: 1.25rem 0 0;
  padding: .9rem 1.1rem;
  background: var(--color-accent-bg);
  border-radius: .5rem;
}

.profile-bio blockquote p { margin: 0; }
.profile-bio blockquote p + p { margin-top: .4rem; }

.profile-bio blockquote p:first-child {
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--color-accent);
}
