:root {
  --bg: #ffffff;
  --text: #171717;
  --muted: #5f6368;
  --line: #e8e8e8;
  --accent: #1f4e79;
  --accent-soft: #f5f8fc;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 1.05rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
}

.intro-section {
  display: flex;
  gap: 96px;
  align-items: flex-start;
  padding: 56px 0 48px;
}

.portrait-column {
  display: flex;
  flex-direction: column;
  flex: 0 0 200px;
  max-width: 200px;
  align-self: flex-start;
}

.portrait-frame {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.portrait-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.portrait-socials {
  margin: 14px 0 0;
  display: flex;
  width: 100%;
  align-self: stretch;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
}

.social-link {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.social-link svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.social-link--github svg {
  width: 88%;
  height: 88%;
}

.social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.section-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-weight: 500;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.bio-text {
  margin-top: 0;
  text-align: justify;
}

.bio-text p,
.news-item p,
.footer p,
.portrait-placeholder p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

.news-item p {
  white-space: pre-line;
}

.bio-text p + p {
  margin-top: 16px;
}

.bio-text a {
  color: #0b57d0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bio-text a:hover {
  color: #0842a0;
}

.news-item a {
  color: #0b57d0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-item a:hover {
  color: #0842a0;
}

.news-section {
  padding-top: 40px;
}

.publications-section {
  padding-top: 40px;
}

.visitor-map-section {
  padding-top: 40px;
}

.section-heading {
  margin-bottom: 24px;
}

.news-list {
  border-top: 1px solid var(--line);
}

.news-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.news-date {
  color: var(--text);
  font-weight: 700;
  font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 1rem;
  line-height: 1.8;
}

.publication-list {
  border-top: 1px solid var(--line);
}

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

.publication-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 24px;
  align-items: start;
}

.publication-copy {
  min-width: 0;
}

.publication-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.publication-title {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.6;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.publication-link {
  color: #0b57d0;
  font-size: 0.95rem;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.publication-link:hover {
  color: #0842a0;
}

.publication-meta {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.publication-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
}

.visitor-map-embed {
  min-height: 220px;
  width: min(100%, 220px);
}

.visitor-map-embed > * {
  max-width: 100%;
}

.footer {
  padding-top: 28px;
}

@media (max-width: 820px) {
  .intro-section {
    flex-direction: column;
    gap: 28px;
    align-items: start;
  }

  .portrait-column {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-self: center;
    margin: 0 auto;
    max-width: 340px;
  }

  .portrait-frame {
    height: auto;
  }

  .portrait-socials {
    width: 100%;
    justify-content: space-between;
    align-self: center;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 980px);
    padding-top: 20px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 24px;
  }

  .intro-section {
    padding: 36px 0 28px;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .publication-body {
    grid-template-columns: 1fr;
  }

  .publication-thumbnail {
    max-width: 220px;
  }
}
