@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-italic.woff2") format("woff2");
}

:root {
  --text: #1a1a1a;
  --muted: #5e5e5e;
  --line: #e6e6e6;
  --bg: #fff;
  --border: #d5d5d5;
  --status: #1f5f99;
  --measure: 58rem;
  --font: Inter, sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --text: #f3f3f3;
  --muted: #a8a8a8;
  --line: #2e2e2e;
  --bg: #141414;
  --border: #3d3d3d;
  --status: #8eb8e0;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}

a { color: inherit; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem 4.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
  padding-top: 1.35rem;
  padding-bottom: 0.8rem;
  margin-bottom: 2.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 560;
  letter-spacing: -0.015em;
}

.site-header h1 a {
  color: var(--text);
  font-weight: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1.15rem;
  font-family: var(--font);
  font-size: 1.02rem;
}

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

nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.header-tools {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.theme {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.theme svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

html[data-theme="dark"] .icon-moon,
html:not([data-theme="dark"]) .icon-sun {
  display: none;
}

.intro {
  display: grid;
  grid-template-columns: 22rem 1fr;
  gap: 1.35rem 2.25rem;
  align-items: start;
}

.portrait img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center 32%;
}

.actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  font-family: var(--font);
  font-size: 0.92rem;
}

.actions span,
.actions a {
  white-space: nowrap;
}

.actions a {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
}

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

.kicker,
.market {
  margin: 0;
}

.kicker {
  color: var(--muted);
}

.market {
  margin-top: 0.85rem;
  font-weight: 700;
}

.bio {
  margin: 1rem 0 0;
  text-align: justify;
  hyphens: auto;
}

.note {
  margin: 1rem 0 0;
}

.note a {
  color: var(--status);
  text-underline-offset: 0.15em;
}

.welcome {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.3;
}

h2.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.55rem;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.section {
  margin-top: 2.1rem;
}

.section h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.entry {
  margin: 0 0 1.15rem;
}

.entry p {
  margin: 0.15rem 0 0;
}

.entry .title {
  font-weight: 560;
  text-underline-offset: 0.15em;
}

.entry .title:not(a) {
  font-weight: 560;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  margin: 0;
}

.abstract-toggle {
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  cursor: pointer;
}

.abstract-toggle[aria-expanded="true"] {
  border-color: var(--text);
}

.detail {
  color: var(--muted);
}

.status {
  margin: 0.2rem 0 0;
  color: var(--status);
  font-weight: 400;
}

.mark {
  color: inherit;
}

.abstract {
  margin: 0.55rem 0 0;
  padding-top: 0.55rem;
  color: var(--muted);
  font-size: 0.98rem;
  text-align: justify;
  hyphens: auto;
}

.school {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 560;
}

.course-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.course-list li {
  margin: 0 0 1.05rem;
}

.course-list .title {
  margin: 0;
  font-weight: 560;
}

.course-list .detail {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .header-tools,
  .header-tools nav {
    width: 100%;
  }

  .theme {
    margin-left: auto;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .portrait {
    max-width: 22rem;
  }
}
