:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --paper: #fffdf8;
  --text: #18211f;
  --muted: #59635f;
  --line: #d8d1c4;
  --accent: #1f6f66;
  --accent-dark: #12483f;
  --link: #175e8f;
  --gold: #a76f2a;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(247, 245, 239, 0.96), rgba(247, 245, 239, 1)),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration-color: rgba(23, 94, 143, 0.35);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
  text-decoration-color: currentColor;
}

.site {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 80px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 52px;
  align-items: center;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.portrait-wrap {
  width: min(100%, 320px);
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 18px 48px rgba(24, 33, 31, 0.16);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 4.8vw, 3.55rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.bio {
  max-width: 760px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 1.06rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-top: 28px;
}

.email {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(31, 111, 102, 0.24);
  border-radius: 4px;
  background: rgba(31, 111, 102, 0.08);
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  border-color: rgba(31, 111, 102, 0.5);
  background: rgba(31, 111, 102, 0.13);
}

.publications {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 44px;
  padding-top: 56px;
}

.section-heading {
  position: sticky;
  top: 32px;
  align-self: start;
}

.publication-list {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.publication {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.publication h3 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0;
}

.publication h3 a {
  color: var(--text);
  text-decoration-color: rgba(23, 94, 143, 0.25);
}

.publication h3 a:hover {
  color: var(--link);
  text-decoration-color: currentColor;
}

.publication p {
  margin-bottom: 5px;
}

.authors {
  color: var(--text);
}

.venue,
.note {
  color: var(--muted);
}

.note strong,
.venue strong {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 780px) {
  .site {
    width: min(100% - 28px, 680px);
    padding-top: 28px;
    padding-bottom: 52px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 40px;
  }

  .portrait-wrap {
    width: min(66vw, 260px);
  }

  .publications {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }

  .section-heading {
    position: static;
  }
}

@media (max-width: 460px) {
  .site {
    width: min(100% - 22px, 680px);
  }

  h1 {
    font-size: 2.7rem;
  }

  .links {
    align-items: flex-start;
    flex-direction: column;
  }

  .email {
    overflow-wrap: anywhere;
  }
}
