:root {
  --background: #fefbf6;
  --surface: #fffdf9;
  --text: #2a2723;
  --heading: #181614;
  --muted: #6f665b;
  --border: #eee5d8;
  --border-strong: #ded0bd;
  --link: #2f6482;
  --link-hover: #1f465d;
  --accent: #8b6238;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus {
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--link), transparent 35%);
  outline-offset: 3px;
}

.site-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-strong);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile-photo {
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 12px 30px rgb(52 41 28 / 10%);
  object-fit: cover;
}

.site-header h1 {
  margin: 0 0 0.5rem;
  color: #2f2a25;
  font-size: clamp(1.65rem, 4.8vw, 2.45rem);
  font-weight: 650;
  line-height: 1.02;
}

.site-header p {
  max-width: 60ch;
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.site-header .header-contact {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: -0.8rem;
  margin-bottom: 0.35rem;
  font-size: 0.98rem;
}

.site-header .header-cv {
  margin-bottom: 1.25rem;
  font-size: 0.98rem;
}

.header-cv a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.header-contact svg,
.header-cv svg {
  width: 1.08em;
  height: 1.08em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

nav a {
  color: var(--text);
  font-size: 0.95rem;
  text-decoration-color: transparent;
}

nav a:hover,
nav a:focus {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

main {
  padding-top: 0.5rem;
}

section {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);
  gap: 0.5rem 2rem;
  padding: 1.65rem 0;
  border-bottom: 1px solid var(--border);
}

h2 {
  margin: 0;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

h3 {
  margin: 0 0 0.12rem;
  color: #2f2a25;
  font-size: 1.03rem;
  font-weight: 650;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

p {
  margin-top: 0;
}

section > :not(h2) {
  grid-column: 2;
}

.publication,
.experience-item {
  padding: 0.48rem 0;
  border-top: 1px solid var(--border);
}

.experience-item {
  padding: 0.35rem 0;
}

.publication:first-of-type,
.experience-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.publication p,
.experience-item p {
  margin-bottom: 0.12rem;
}

.publication-group-title {
  margin: 0.55rem 0 0.1rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-strong);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.publication-group-title:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.year {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.meta {
  color: var(--muted);
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.primary-author {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

footer {
  padding-top: 1.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  body {
    padding-top: 2rem;
  }

  .profile-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.25rem;
  }

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

  section {
    display: block;
    padding: 1.35rem 0;
  }

  h2 {
    margin-bottom: 0.85rem;
  }
}
