/* Professional, restrained visual layer */
:root {
  --accent-color: #2f6f9f;
}

.light-background {
  --background-color: #f7f8fa;
}

body {
  line-height: 1.65;
}

section,
.section {
  padding: 42px 0;
}

.section-title {
  padding-bottom: 10px;
}

.section-title h2 {
  margin-bottom: 10px;
  padding-bottom: 10px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.section-title h2::after {
  width: 34px;
  height: 2px;
}

/* Sidebar and navigation */
.header {
  width: 280px;
  padding: 18px 18px 12px;
}

.header .profile-img img {
  width: 104px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  margin: 8px auto 14px;
  border-width: 3px;
}

.header .logo {
  margin-bottom: 12px;
}

.header .logo h1 {
  font-size: 21px;
  font-weight: 600;
}

.header .profile-meta {
  margin-bottom: 14px;
  padding: 0 8px;
}

.header .profile-meta p {
  margin-bottom: 5px;
  font-size: 12.5px;
  line-height: 1.45;
}

.navmenu a,
.navmenu a:focus {
  padding: 10px 8px;
  font-size: 14px;
}

.navmenu a .navicon,
.navmenu a:focus .navicon {
  margin-right: 9px;
  font-size: 17px;
}

button.header-toggle {
  border: 0;
  padding: 0;
}

button.header-toggle:focus-visible,
.scroll-top:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 111, 159, 0.38);
  outline-offset: 3px;
}

@media (min-width: 1200px) {
  .header ~ main,
  .header ~ #footer {
    margin-left: 280px;
  }
}

/* Hero: compact, calm, still interactive */
.hero {
  min-height: clamp(420px, 58vh, 620px);
  padding: 72px 0;
}

.hero::before {
  background: rgba(4, 11, 20, 0.58);
}

.hero h2 {
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.hero p {
  max-width: 760px;
  margin-top: 10px;
  font-size: clamp(18px, 2.2vw, 23px);
  font-weight: 400;
}

.hero p span {
  border-bottom-width: 1px;
  letter-spacing: 0;
}

/* About */
.about .content {
  max-width: 960px;
  margin-inline: auto;
}

.publications > .container,
.organizations > .container {
  max-width: 984px;
}

.about .content p {
  margin-bottom: 8px;
  color: #40464d;
  font-size: 14.5px;
  line-height: 1.72;
}

.about .content p strong {
  font-weight: 600;
}

/* Publications: flat list instead of floating cards */
.pub-card {
  position: relative;
  display: flex;
  align-items: stretch;
  margin: 0;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid #e4e7eb;
  border-radius: 0;
  background: transparent;
  transition: background-color 0.2s ease;
}

.pub-card:first-child {
  border-top: 1px solid #e4e7eb;
}

.pub-card::before {
  display: none;
}

.pub-card:hover {
  border-color: #e4e7eb;
  background: #f8fafb;
  box-shadow: none;
  transform: none;
}

.pub-body {
  flex: 1;
  min-width: 0;
  padding: 16px 10px 15px 4px;
}

.pub-top-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}

.pub-index {
  flex-shrink: 0;
  color: #9299a1;
  font-family: inherit;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
}

.pub-card:hover .pub-index {
  color: #66717c;
}

.pub-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pub-venue,
.pub-tag {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid #d8dde2;
  border-radius: 3px;
  background: transparent;
  color: #5c6670;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pub-venue {
  border-color: rgba(47, 111, 159, 0.42);
  color: #2f6f9f;
  text-transform: uppercase;
}

.pub-tag.oral,
.pub-tag.ccfa,
.pub-tag.q1 {
  background: transparent;
  color: #5c6670;
}

.pub-title {
  margin: 0 0 6px;
  color: #17212b;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.42;
}

.pub-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pub-title a:hover,
.pub-card:hover .pub-title a {
  color: #2f6f9f;
}

.pub-link-icon {
  display: inline-block;
  margin-left: 3px;
  color: #2f6f9f;
  font-size: 10px;
  opacity: 0;
  transform: none;
  transition: opacity 0.2s ease;
}

.pub-card:hover .pub-link-icon,
.pub-title a:focus-visible .pub-link-icon {
  opacity: 0.75;
}

.pub-authors {
  margin: 0;
  color: #68717a;
  font-size: 12.8px;
  line-height: 1.5;
}

.pub-me {
  position: static;
  color: #343c44;
  font-weight: 600;
}

.pub-me::after {
  display: none;
}

.pub-year-col {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  width: 64px;
  padding-right: 4px;
  border: 0;
  background: transparent;
}

.pub-year-num {
  color: #7d8790;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  writing-mode: horizontal-tb;
  transform: none;
}

.pub-card:hover .pub-year-num {
  color: #4f5b66;
}

.pub-scholar {
  margin-top: 20px;
  text-align: left;
}

.pub-scholar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #cfd6dc;
  border-radius: 4px;
  background: transparent;
  color: #2f6f9f;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.pub-scholar-btn:hover {
  border-color: #2f6f9f;
  background: #f5f8fa;
  color: #2f6f9f;
  box-shadow: none;
  transform: none;
}

.pub-scholar-arrow {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.pub-scholar-btn:hover .pub-scholar-arrow {
  transform: translateX(2px);
}

/* Affiliations: simple institutional rows */
.tl-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.tl-col {
  min-width: 0;
}

.timeline-wrap {
  padding: 0;
}

.timeline-wrap::before,
.tl-dot-col {
  display: none;
}

.tl-item {
  display: block;
  margin: 0;
}

.tl-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid #e0e4e8;
  border-radius: 0;
  background: transparent;
  transition: background-color 0.2s ease;
}

.tl-item:first-child .tl-card {
  border-top: 1px solid #e0e4e8;
}

.tl-card:hover,
.tl-item.current .tl-card,
.tl-item.current .tl-card:hover {
  border-color: #e0e4e8;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
  transform: none;
}

.tl-logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: transparent;
}

.tl-logo:hover {
  background: transparent;
}

.tl-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter 0.2s ease;
}

.tl-card:hover .tl-logo img {
  filter: grayscale(0%);
}

.tl-info {
  flex: 1;
  min-width: 0;
}

.tl-school {
  margin-bottom: 1px;
  overflow: hidden;
  color: #25313b;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tl-school a {
  color: inherit;
  text-decoration: none;
}

.tl-school a:hover {
  color: #2f6f9f;
}

.tl-role {
  color: #707981;
  font-size: 11.5px;
  line-height: 1.4;
}

.tl-meta {
  flex-shrink: 0;
  text-align: right;
}

.tl-year {
  color: #7d8790;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.tl-badge {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 6px;
  border: 1px solid #b8c9d6;
  border-radius: 3px;
  background: transparent;
  color: #2f6f9f;
  font-size: 9px;
  font-weight: 600;
}

/* Contact: plain information block */
#contact.contact.section {
  padding: 26px 0;
}

.contact-compact-shell {
  display: grid;
  grid-template-columns: 95px minmax(260px, 0.8fr) minmax(320px, 1.4fr);
  align-items: center;
  gap: 22px;
  padding: 13px 2px;
  border: 0;
  border-top: 1px solid #e0e4e8;
  border-bottom: 1px solid #e0e4e8;
  border-radius: 0;
  background: transparent;
}

.contact-inline-title {
  margin: 0;
  color: #25313b;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.contact-kicker,
.contact-summary-item h4 {
  margin: 0 0 5px;
  color: #2f6f9f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-email-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
}

.contact-email-list p {
  margin: 0;
  color: #25313b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.email-preferred {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border: 1px solid #b8c9d6;
  border-radius: 3px;
  color: #2f6f9f;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}

.contact-primary-note {
  margin: 3px 0 0;
  color: #737c84;
  font-size: 10.5px;
}

.contact-summary {
  display: grid;
  padding-left: 20px;
  border-left: 1px solid #e0e4e8;
}

.contact-summary-item p {
  margin: 0;
  color: #5f6972;
  font-size: 12.5px;
  line-height: 1.5;
}

.contact-copyright {
  margin: 5px 0 0;
  color: #818991;
  font-size: 10.5px;
  line-height: 1.4;
}

.contact-copyright strong {
  color: #5f6972;
  font-weight: 600;
}

.scroll-top {
  width: 36px;
  height: 36px;
  border-radius: 4px;
}

/* Kept for sections that are currently commented out */
.prog-card,
.recruit-col {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid #e0e4e8;
  border-radius: 4px;
  background: #fff;
}

@media (max-width: 991px) {
  .contact-compact-shell {
    grid-template-columns: 100px 1fr;
    gap: 14px 20px;
  }

  .contact-summary {
    grid-column: 1 / -1;
    width: 100%;
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid #e0e4e8;
    border-left: 0;
  }
}

@media (max-width: 768px) {
  section,
  .section {
    padding: 34px 0;
  }

  .tl-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tl-col + .tl-col .tl-item:first-child .tl-card {
    border-top: 0;
  }
}

@media (max-width: 576px) {
  .section-title h2 {
    font-size: 25px;
  }

  .hero {
    min-height: 400px;
  }

  .pub-body {
    padding: 14px 8px 13px 2px;
  }

  .pub-title {
    font-size: 14px;
  }

  .pub-authors {
    font-size: 12px;
  }

  .pub-year-col {
    width: 48px;
  }

  .pub-top-row {
    align-items: flex-start;
  }

  .tl-card {
    gap: 9px;
  }

  .tl-school {
    white-space: normal;
  }

  .contact-compact-shell {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .contact-summary {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
