:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #5b6775;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --accent: #176b87;
  --accent-strong: #0f4d62;
  --accent-soft: #e7f4f7;
  --shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
  --shadow-hover: 0 22px 50px rgba(15, 77, 98, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 480px at 80% -10%, rgba(23, 107, 135, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(231, 244, 247, 0.65), rgba(246, 248, 251, 0) 420px),
    var(--bg);
  color: var(--text);
  font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.page-shell {
  width: min(940px, calc(100% - 36px));
  margin: 0 auto;
  padding: 64px 0 48px;
}

/* ---------- Profile / hero ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 48px;
  align-items: center;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 6px;
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(2.3rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.affiliation {
  margin-bottom: 18px;
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 1.02rem;
}

h2 {
  margin-bottom: 18px;
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.intro {
  max-width: 620px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.06rem;
}

.intro strong {
  color: var(--text);
  font-weight: 700;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--accent-strong);
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-links a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 77, 98, 0.12);
}

.profile-photo-wrap {
  margin: 0;
  width: 220px;
}

.profile-photo {
  display: block;
  width: 220px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border: 4px solid var(--surface);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(15, 77, 98, 0.18);
}

/* ---------- Sections ---------- */
.section {
  margin-top: 26px;
  padding: 32px 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.section h2 {
  position: relative;
  padding-left: 16px;
}

.section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

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

.section-header {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-header h2 {
  margin-bottom: 0;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Research interests ---------- */
.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.interest-list li {
  padding: 7px 15px;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.94rem;
  font-weight: 700;
}

/* ---------- Education ---------- */
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.education-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.education-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.education-card h3 {
  margin-bottom: 6px;
}

.education-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.education-period,
.project-meta {
  display: inline-block;
  width: fit-content;
  margin-bottom: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* ---------- Projects ---------- */
.project-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.project-card h3 {
  font-size: 1.12rem;
  line-height: 1.4;
}

.project-card p {
  margin-bottom: 12px;
  color: var(--muted);
}

.project-card p:last-child {
  margin-bottom: 0;
}

.project-authors {
  color: var(--text);
}

.project-authors .me {
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
}

.project-summary {
  font-size: 0.98rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.project-links a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
.page-footer {
  margin-top: 36px;
  text-align: center;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 940px);
    padding: 28px 0 36px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 26px;
    text-align: center;
  }

  .profile-links {
    justify-content: center;
  }

  .profile-photo-wrap,
  .profile-photo {
    width: min(200px, 70%);
  }

  .profile-photo-wrap {
    justify-self: center;
    order: -1;
  }

  .interest-list {
    justify-content: center;
  }

  .section {
    margin-top: 18px;
    padding: 26px 22px;
  }

  .section h2 {
    text-align: left;
  }

  .section-header {
    display: block;
  }

  .section-header p {
    margin-top: 6px;
  }

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

  .profile-links a {
    flex: 1 1 130px;
    justify-content: center;
  }
}
