:root {
  --bg: #f8f6f7;
  --text: #1f2933;
  --muted: #6b7280;
  --accent: #B2284B;
  --link: #1D71B8;
  --border: #e3d7dc;
  --card: #ffffff;
  --soft: #faf7f8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

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

.profile-header,
.layout,
footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 42px 24px;
}

.profile-header {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.simple-header {
  display: block;
}

.profile-photo-wrap {
  width: 160px;
}

.profile-photo {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--card);
  box-shadow: 0 10px 28px rgba(31, 41, 51, 0.16);
}

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

.institution-line,
.breadcrumb {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  line-height: 1.15;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.role {
  margin: 6px 0 0;
  font-size: 1.15rem;
  color: var(--muted);
  font-weight: 600;
}

.lead {
  max-width: 76ch;
  margin-top: 14px;
  color: var(--text);
  font-size: 1.04rem;
}

.contact-links,
.page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  margin-top: 18px;
  font-size: 0.95rem;
}

.page-nav {
  gap: 0;
  margin: 1rem 0 0.4rem;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

.page-nav a {
  font-weight: 650;
  text-decoration: none;
}

.page-nav a:hover {
  text-decoration: underline;
}

.page-nav span {
  margin: 0 0.15rem;
  color: #777;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 300px;
  gap: 48px;
  align-items: start;
}

.full-layout,
.publications-layout,
.thesis-layout,
.cv-layout {
  display: block;
}

.publications-layout,
.thesis-layout {
  max-width: 1040px;
}

.cv-layout {
  max-width: 960px;
}

h2 {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--accent);
  font-size: 1.45rem;
  line-height: 1.2;
}

h3 {
  color: var(--text);
  line-height: 1.35;
}

p {
  max-width: 78ch;
}

ul,
ol {
  max-width: 82ch;
}

li {
  margin: 0.35rem 0;
}

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

.section-block,
.section-card,
.cv-section,
.thesis-section {
  margin-bottom: 42px;
}

.section-card,
.cv-section,
.thesis-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}

.intro-note,
.section-intro {
  color: var(--muted);
  margin-top: 0;
}

/* Homepage */
.research-interests {
  max-width: 760px;
  margin-top: 0.8rem;
  line-height: 1.7;
}

#publications {
  margin-top: 48px;
}

.selected-title {
  margin-top: 64px;
}

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

.publication h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.publication p {
  margin: 4px 0;
}

.year {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  align-self: start;
}

.sidebar ul {
  padding-left: 18px;
  margin-bottom: 28px;
}

/* Publications */
.publication-list {
  list-style: none;
  counter-reset: publication 61;
  margin: 0;
  padding: 0;
}

.publication-item {
  counter-increment: publication -1;
  position: relative;
  padding: 22px 0 22px 58px;
  border-bottom: 1px solid var(--border);
}

.publication-item:last-child {
  border-bottom: 0;
}

.publication-item::before {
  content: counter(publication);
  position: absolute;
  top: 23px;
  left: 0;
  width: 40px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}

.publication-item h3 {
  margin: 3px 0 6px;
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--text);
}

.authors {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

.journal {
  margin: 4px 0 0;
  color: var(--muted);
}

.paper-links {
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.paper-links a {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
  font-weight: 600;
}

.paper-links a + a::before,
.paper-links a + .open-access::before,
.paper-links .open-access + a::before {
  content: " · ";
  color: var(--muted);
  font-weight: 400;
}

.open-access {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
}

/* CV */
.timeline {
  display: grid;
  gap: 0;
}

.timeline-item,
.cv-entry {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 22px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:first-child,
.cv-entry:first-child {
  padding-top: 0;
}

.timeline-item:last-child,
.cv-entry:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-date,
.cv-date {
  margin: 0;
  color: var(--accent);
  font-weight: 750;
}

.timeline-content p,
.cv-details p {
  margin: 0 0 5px;
}

.timeline-content p:last-child,
.cv-details p:last-child {
  margin-bottom: 0;
}

.cv-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cv-highlight {
  border-left: 4px solid var(--accent);
  background: var(--card);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 12px 12px 0;
  padding: 15px 17px;
}

.cv-highlight-year {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.cv-highlight strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

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

.clean-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.clean-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.clean-list strong {
  display: block;
  color: var(--text);
}

.clean-list span {
  display: block;
  color: var(--muted);
}

.compact-list {
  margin-bottom: 0;
}

.compact-list li {
  margin-bottom: 0.65rem;
}

.visit-list {
  display: grid;
  gap: 0;
}

.visit-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.visit-item:last-child {
  border-bottom: 0;
}

.visit-years {
  color: var(--accent);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.4;
}

.visit-content h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1.05rem;
}

.visit-content p {
  margin: 0;
  color: var(--muted);
}

/* Thesis */
.lead-text {
  font-size: 1.05rem;
  color: var(--text);
  margin-top: 0;
}

.notice-box {
  background: var(--soft);
  border-left: 4px solid var(--accent);
  padding: 16px 18px;
  margin: 22px 0;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 8px;
}

.topic-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--card);
}

.topic-card h3 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 1rem;
}

.topic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.video-links {
  margin-top: 18px;
  padding-left: 1.2rem;
}

.video-links li {
  margin-bottom: 0.55rem;
}

.contact-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-weight: 700;
}

.thesis-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.thesis-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.thesis-item:last-child {
  border-bottom: 0;
}

.thesis-year {
  margin: 0;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.thesis-details p {
  margin: 0 0 4px;
}

.student-name {
  font-weight: 700;
  color: var(--text);
}

.thesis-title {
  color: var(--text);
  font-style: italic;
}

.thesis-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

footer {
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.disclaimer {
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .profile-header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .profile-photo-wrap {
    width: 128px;
  }

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

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

  h1 {
    font-size: 2rem;
  }

  .profile-header,
  .layout,
  footer {
    padding: 32px 20px;
  }

  .publication-item {
    padding-left: 0;
  }

  .publication-item::before {
    position: static;
    display: block;
    width: auto;
    text-align: left;
    margin-bottom: 6px;
  }

  .section-card,
  .cv-section,
  .thesis-section {
    padding: 22px;
  }

  .timeline-item,
  .cv-entry,
  .visit-item,
  .thesis-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .cv-card-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }
}
