:root {
  --bg: #ffffff;
  --ink: #1f2328;
  --muted: #5f6770;
  --rule: #d8dee4;
  --soft: #f6f8fa;
  --link: #0b57a3;
  --accent: #8a2d2d;
  --wrapper: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "TASA Explorer", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.58;
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-150%);
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 8px 10px;
}

.skip-link:focus {
  transform: translateY(0);
}

.wrapper {
  width: min(var(--wrapper), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.96);
}

.nav {
  width: min(var(--wrapper), calc(100% - 32px));
  min-height: 50px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-title {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.menu-button {
  display: none;
  width: 38px;
  height: 36px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.profile {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 70px;
}

.profile-photo {
  width: 150px;
  height: 150px;
  border: 1px solid var(--rule);
  object-fit: cover;
}

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

h1 {
  margin-bottom: 6px;
  font-size: 2.15rem;
  line-height: 1.12;
  font-weight: 780;
}

h2 {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
  color: var(--accent);
  font-size: 1.18rem;
  line-height: 1.25;
  font-weight: 780;
}

h3 {
  margin-bottom: 5px;
  font-size: 1.02rem;
  line-height: 1.34;
  font-weight: 760;
}

.profile-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 1.03rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  font-weight: 700;
}

.profile-links span {
  color: var(--muted);
}

.profile-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.profile-meta div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
}

.profile-meta dt {
  color: var(--muted);
  font-weight: 760;
}

.profile-meta dd {
  margin: 0;
}

.section {
  padding: 26px 0 0;
  scroll-margin-top: 70px;
}

.section p:last-child,
.section ul:last-child {
  margin-bottom: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
}

.compact-list,
.dated-list {
  margin: 0;
  padding-left: 20px;
}

.compact-list li + li,
.dated-list li + li {
  margin-top: 6px;
}

.dated-list {
  padding-left: 0;
  list-style: none;
}

.dated-list li {
  display: grid;
  grid-template-columns: minmax(210px, max-content) minmax(0, 1fr);
  column-gap: 22px;
  row-gap: 2px;
}

.date {
  color: var(--muted);
  font-weight: 760;
  white-space: nowrap;
}

#experience .dated-list li {
  grid-template-columns: 1fr;
  row-gap: 2px;
}

#experience .dated-list li + li {
  margin-top: 12px;
}

.publication-list {
  display: grid;
  gap: 16px;
}

.publication-group {
  display: grid;
  gap: 16px;
}

.publication-group + .publication-group {
  margin-top: 22px;
}

.publication-group-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 780;
}

.publication {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.publication:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.publication-thumb {
  width: 150px;
  min-height: 94px;
  border: 1px solid var(--rule);
  background: var(--soft);
}

.publication-thumb img {
  width: 100%;
  height: 100%;
  min-height: 94px;
  object-fit: contain;
  padding: 8px;
  background: #ffffff;
}

.publication-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 780;
}

.publication-text p {
  margin-bottom: 6px;
}

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

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 700;
}

.site-footer {
  margin-top: 34px;
  border-top: 1px solid var(--rule);
  padding: 22px 0 28px;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-col-wrapper {
  display: flex;
  align-items: center;
  gap: 34px;
}

.footer-col {
  min-width: 0;
}

.footer-col-2 {
  width: 210px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  flex: 0 0 auto;
}

.footer-col-3 {
  flex: 1 1 auto;
}

.footer-col-3 .text {
  margin: 0;
  color: var(--muted);
}

.footer-col-3 i.text {
  display: block;
  color: var(--ink);
  line-height: 1.55;
}

.footer-col-3 p.text {
  margin-top: 10px;
}

.icon-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
}

.icon-button:hover {
  color: var(--accent);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button i {
  font-style: normal;
}

.icon-button-text {
  font-size: 0.82rem;
  font-weight: 780;
}

@media (max-width: 760px) {
  .menu-button {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 50px;
    right: 16px;
    left: 16px;
    display: none;
    border: 1px solid var(--rule);
    background: #ffffff;
    padding: 10px 12px;
  }

  .nav-links.open {
    display: grid;
    gap: 10px;
  }

  .profile,
  .section-grid,
  .publication {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    width: 132px;
    height: 132px;
  }

  .profile-meta div,
  .dated-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .publication-thumb {
    width: 100%;
    max-width: 220px;
  }
}

@media (max-width: 520px) {
  .wrapper,
  .nav {
    width: min(var(--wrapper), calc(100% - 24px));
  }

  h1 {
    font-size: 1.82rem;
  }

  .footer-col-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-col-2 {
    width: auto;
  }
}
