:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #24252a;
  --muted: #606570;
  --line: #dedbd2;
  --teal: #1e6f73;
  --teal-dark: #164f52;
  --clay: #a3523f;
  --gold: #b8872d;
  --band: #f4f1ea;
  --shadow: 0 12px 28px rgba(42, 38, 30, 0.08);
  --radius: 7px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

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

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.55rem 0.8rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.shell {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  font-size: 0.95rem;
}

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

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--teal-dark);
}

.cv-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 3.2rem;
  align-items: start;
  padding-block: 2.1rem 3.6rem;
}

.profile-card {
  position: sticky;
  top: 78px;
  align-self: start;
}

.profile-photo {
  width: 188px;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-card h1 {
  margin: 1rem 0 0.1rem;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.profile-role {
  margin: 0.35rem 0 0;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-bio {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.profile-links {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.profile-links li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.profile-links a {
  display: block;
  padding: 0.48rem 0;
  font-weight: 720;
  text-decoration: none;
}

.cv-content {
  min-width: 0;
  max-width: 820px;
}

.cv-section {
  margin: 0 0 2rem;
  padding: 0 0 2rem;
  border-bottom: 1px solid var(--line);
}

.cv-section h2 {
  margin: 0 0 0.85rem;
  color: var(--teal-dark);
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.cv-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.28;
  letter-spacing: 0;
}

.cv-section p {
  margin: 0;
  color: var(--muted);
}

.cv-section p + p {
  margin-top: 0.7rem;
}

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

.publication p {
  color: var(--muted);
  font-size: 0.96rem;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.1rem;
}

.link-row a {
  font-size: 0.95rem;
  font-weight: 720;
}

.publication {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
}

.pub-year {
  color: var(--gold);
  font-weight: 800;
}

.pub-main {
  display: grid;
  gap: 0.28rem;
}

.venue {
  color: var(--clay) !important;
  font-weight: 720;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
}

.contact-grid a {
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.contact-grid a:hover {
  border-color: rgba(30, 111, 115, 0.45);
  color: var(--teal-dark);
}

.contact-grid span {
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-grid strong {
  margin-top: 0.2rem;
  font-size: 0.95rem;
}

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

.footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 28px, 720px);
  }

  .nav {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding-block: 0.75rem;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .cv-shell {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-block: 1.5rem 3rem;
  }

  .profile-card {
    position: static;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 0.95rem 1rem;
    align-items: start;
  }

  .profile-photo {
    grid-row: 1 / 4;
    width: 132px;
  }

  .profile-card h1,
  .profile-role,
  .profile-bio {
    grid-column: 2;
  }

  .profile-card h1 {
    margin-top: 0.1rem;
    font-size: 1.45rem;
  }

  .profile-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    border-top: 0;
  }

  .profile-links li {
    border-bottom: 0;
  }

  .profile-links a {
    padding: 0.36rem 0.62rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .profile-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .profile-photo {
    width: 104px;
  }

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


  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 1rem;
  }
}
