:root {
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Source Serif 4", Georgia, "Times New Roman", serif;
  --paper: #f8f8f6;
  --paper-deep: #f1f2ef;
  --surface: #fcfcfa;
  --ink: #222725;
  --ink-soft: #505854;
  --muted: #7a827e;
  --accent: #4d627f;
  --accent-dark: #3c506b;
  --accent-pale: #edf0f4;
  --line: #dce0db;
  --max-width: 1120px;
  --header-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  color: var(--ink);
  background: #dce3eb;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

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

.page-shell {
  width: min(calc(100% - 80px), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 8px 14px;
  color: #fff;
  background: var(--accent-dark);
  transform: translateY(-150%);
}

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

/* Navigation */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(248, 248, 246, 0.96);
  border-color: var(--line);
}

.nav-shell {
  width: min(calc(100% - 80px), var(--max-width));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 0.94rem;
  font-weight: 600;
}

.brand-mark {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 0.8rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 160ms ease;
}

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

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  margin: 6px auto;
  background: var(--ink);
}

/* Profile */
.hero {
  padding: calc(var(--header-height) + 86px) 0 104px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 100px;
  align-items: center;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--accent-dark);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.hero-kicker > span:first-child {
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(3.6rem, 5.8vw, 5.3rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.profile-subtitle {
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 1.04rem;
  font-weight: 500;
}

.hero-intro {
  max-width: 510px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-family: var(--font-heading);
  font-size: 1.18rem;
  line-height: 1.6;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
}

.hero-links a {
  border-bottom: 1px solid var(--line);
  color: var(--accent-dark);
  font-size: 0.88rem;
  line-height: 1.9;
  transition: color 150ms ease, border-color 150ms ease;
}

.hero-links a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.visual-stage {
  width: 100%;
}

.portrait-card {
  width: 100%;
  margin: 0;
}

.portrait-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid #d6dbd6;
  object-fit: cover;
  object-position: 50% 46%;
  filter: saturate(0.88);
}

/* Academic content */
.content-shell {
  padding-bottom: 40px;
}

.content-section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 54px;
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.section-number {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.section-body {
  min-width: 0;
}

.section-body h3 {
  margin: 0;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-copy p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 1.03rem;
  line-height: 1.8;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-copy a,
.news-list a,
.entry-desc a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: rgba(77, 98, 127, 0.35);
  text-underline-offset: 3px;
}

.about-copy a:hover,
.news-list a:hover,
.entry-desc a:hover {
  text-decoration-color: currentColor;
}

.interests-block {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.interests-block h3 {
  margin-bottom: 14px;
  color: var(--muted);
}

.interests-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-tag {
  padding: 4px 11px;
  border: 1px solid #d7dde4;
  border-radius: 3px;
  color: var(--accent-dark);
  background: var(--accent-pale);
  font-size: 0.82rem;
  line-height: 1.5;
}

.news-list,
.entry-list,
.project-list,
.publication-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.news-list li:first-child {
  padding-top: 0;
}

.news-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.news-date {
  color: var(--accent);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.news-content {
  color: var(--ink-soft);
}

.experience-group + .experience-group {
  margin-top: 48px;
}

.experience-group > h3 {
  margin-bottom: 20px;
  color: var(--muted);
}

.entry-list > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 175px;
  gap: 8px 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.entry-list > li:first-child {
  padding-top: 0;
  border-top: 0;
}

.entry-list > li:last-child {
  padding-bottom: 0;
}

.entry-main {
  min-width: 0;
}

.entry-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.45;
}

.entry-location {
  display: block;
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 0.9rem;
}

.entry-meta {
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: right;
}

.entry-desc {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.75;
}

.entry-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 10px;
}

a.tag {
  color: var(--accent-dark);
  font-size: 0.8rem;
  text-decoration: underline;
  text-decoration-color: #bdc7d1;
  text-underline-offset: 3px;
}

a.tag::after {
  content: " ↗";
}

a.tag:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.project-list > li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 18px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.project-list > li:first-child {
  padding-top: 0;
  border-top: 0;
}

.project-list > li:last-child {
  padding-bottom: 0;
}

.project-index {
  padding-top: 3px;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.project-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.project-heading .entry-meta {
  flex-shrink: 0;
  max-width: 190px;
}

.project-content .entry-desc {
  margin-top: 12px;
}

.publication-list > li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.publication-list > li:first-child {
  padding-top: 0;
}

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

.pub-number {
  padding-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.pub-title-link {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.pub-title-link:hover {
  color: var(--accent-dark);
  text-decoration-color: currentColor;
}

.pub-authors {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 4px;
}

.pub-venue {
  color: var(--muted);
  font-size: 0.78rem;
}

.pub-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
}

.pub-links a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: #c2cbd5;
  text-underline-offset: 3px;
}

.pub-links a::after {
  content: " ↗";
  font-size: 0.72rem;
}

.pub-links a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.pub-arrow {
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding-top: 44px;
  padding-bottom: 28px;
}

.footer-inner p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner .footer-name {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.footer-email {
  padding-bottom: 3px;
  border-bottom: 1px solid #b8c2cc;
  color: var(--accent-dark);
  font-size: 0.9rem;
}

.footer-email span {
  margin-left: 8px;
}

.footer-email:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.footer-inner .copyright {
  grid-column: 1 / -1;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
}

.noscript-message {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  padding: 12px;
  background: #fff;
}

@media (max-width: 1000px) {
  .page-shell,
  .nav-shell {
    width: min(calc(100% - 56px), var(--max-width));
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 54px;
  }

  .content-section {
    grid-template-columns: 155px minmax(0, 1fr);
    gap: 38px;
  }

  .entry-list > li {
    grid-template-columns: minmax(0, 1fr) 150px;
  }

  .project-heading {
    display: block;
  }

  .project-heading .entry-meta {
    max-width: none;
    margin-top: 6px;
    text-align: left;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 64px;
  }

  .page-shell,
  .nav-shell {
    width: min(calc(100% - 40px), var(--max-width));
  }

  .brand-name {
    font-size: 0.88rem;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .site-header.is-open .menu-toggle span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .site-header.is-open .menu-toggle span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .site-nav a {
    padding: 11px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    padding: calc(var(--header-height) + 54px) 0 72px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 13vw, 4.7rem);
  }

  .hero-intro {
    font-size: 1.1rem;
  }

  .visual-stage {
    width: 230px;
  }

  .content-section {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 58px 0;
  }

  .section-heading {
    display: flex;
    align-items: baseline;
    gap: 15px;
  }

  .section-number {
    margin: 0;
  }

  .section-heading h2 {
    font-size: 1.7rem;
  }

  .entry-list > li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .entry-meta {
    grid-row: 2;
    text-align: left;
  }

  .entry-desc,
  .entry-links {
    grid-column: 1;
  }

  .entry-desc {
    margin-top: 10px;
  }

  .project-list > li {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
  }

  .publication-list > li {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
  }

  .pub-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-kicker {
    font-size: 0.65rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 14.5vw, 4.1rem);
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-email {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
