/* A quieter academic reading layer, retaining FZU identity and content. */
#hero .hero-layout { align-items: center; }
#hero .hero-network { opacity: .55; }
#about .content p { line-height: 1.75; }

/* Publications: title first, quiet metadata, no spreadsheet columns. */
#publications .record-table-header { display: none; }
#publications .record-table {
  display: grid;
  gap: 12px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}
#publications .record-table .pub-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 18px 20px;
  border: 1px solid #e6e1e3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(49, 27, 33, .025);
  transition: border-color .18s ease, box-shadow .18s ease;
}
#publications .record-table .pub-card:last-child { border-bottom: 1px solid #e6e1e3; }
#publications .record-table .pub-card::before,
#publications .record-table .pub-card::after { display: none; }
#publications .record-table .pub-card:hover,
#publications .record-table .pub-card:focus-within { border-color: #d6afb7; box-shadow: 0 4px 18px rgba(90, 30, 43, .055); }
#publications .pub-index { grid-area: 1 / 1 / 4 / 2; padding-top: 3px; font-size: 11px; color: #8b8185; background: none; }
#publications .pub-title { grid-area: 1 / 2; font-size: 16px; line-height: 1.5; margin: 0; }
#publications .pub-badges { grid-area: 2 / 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 7px 12px; }
#publications .pub-venue {
  width: auto; padding: 3px 9px; margin: 0;
  border: 1px solid #eddce0; border-radius: 6px;
  background: #fbf4f5; color: var(--accent-color);
  font: 600 12px/1.5 var(--default-font);
}
#publications .pub-authors { grid-area: 3 / 2; font-size: 13px; line-height: 1.65; color: var(--detail-muted); margin: 0; }
#publications .pub-me { text-decoration: underline; text-decoration-color: #cab8bd; text-underline-offset: 3px; }
#publications .pub-tag { font-size: 11px; }
#publications .pub-scholar { margin-top: 20px; }

/* Keep awards lighter and denser than publication cards. */
#projects .record-table-header { display: none; }
#projects .record-table { border: 1px solid var(--ui-border); border-radius: 10px; }
#projects .record-table .pub-card { padding: 11px 12px; }
#projects .record-table .pub-card::before,
#projects .record-table .pub-card::after { display: none; }
#projects .pub-title { font-size: 14px; line-height: 1.5; }

@media (max-width: 640px) {
  #hero .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 480px) {
  #publications .record-table .pub-card { padding: 14px 12px; grid-template-columns: 23px minmax(0, 1fr); gap: 7px 8px; }
  #publications .pub-title { font-size: 14px; }
  #publications .pub-authors { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #publications .record-table .pub-card { transition: none; }
}

/* Persistent desktop profile and navigation; only the document scrolls. */
@media screen and (min-width: 1000px) {
  #header {
    position: fixed; inset: 0 auto 0 0;
    width: 240px; height: 100dvh;
    padding: 18px 16px 16px;
    overflow-y: auto;
    background: #fcfafb;
    border-right: 1px solid #ece3e5;
    transition: none;
  }
  #header > * { flex-shrink: 0; }
  #header .header-toggle { display: none !important; }
  #header ~ main { margin-left: 240px; }
  #header .profile-img img { width: 92px; margin: 0 auto 10px; }
  #header .logo { margin-bottom: 0; }
  #header .profile-meta { border: 1px solid #ece3e5; border-radius: 10px; background: #fff; padding: 9px 6px; margin: 12px 0 8px; }
  #header .profile-meta .profile-email { margin-top: 4px; padding-top: 5px; border-top-color: #eee5e7; }
  #header #navmenu ul { padding-bottom: 0; }
  #header #navmenu a { grid-template-columns: 18px 13px minmax(0,1fr) 16px; column-gap: 5px; min-height: 32px; padding: 5px 10px; font-size: 12px; border-radius: 7px; margin-bottom: 0; }
  #header #navmenu .nav-label { font-size: 12px; }
  #header #navmenu li { margin: 1px 0; }
  #header #navmenu li::before { display: none; }
  #header .catalog-heading { margin: 0 10px 6px; }
  .workbench-bar { padding-right: 30px; }
}

@media screen and (min-width: 1000px) and (max-height: 720px) {
  #header { padding-top: 16px; }
  #header .profile-img img { width: 68px; margin-bottom: 10px; }
  #header .profile-meta { padding-block: 8px; margin-top: 10px; }
}

/* Shared academic components: clear headings and compact resource links. */
:is(.section-title h2, #contact .contact-inline-title) .section-label {
  position: relative;
  padding-bottom: 7px;
  font-family: var(--default-font);
  font-size: clamp(1.375rem, 1.3rem + .2vw, 1.5rem);
  font-weight: 650;
  letter-spacing: -.02em;
}
:is(.section-title h2, #contact .contact-inline-title) .section-label::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 32px; height: 2px; border-radius: 2px;
  background: var(--accent-color);
}
:is(.section-title h2, #contact .contact-inline-title) :is(.section-index, .file-extension) {
  font-family: var(--mono-font);
  font-size: .75rem;
}
:is(.section-title h2, #contact .contact-inline-title) .section-index { opacity: .65; }
.section-title .record-count { font-size: 11px; }
#publications .pub-venue { border-radius: 999px; }
#contact .profile-links a { border-color: #e6d7db; }

/* Funding and honors: compact institutional list. */
#projects .record-table { border-color: #e6e1e3; background: #fff; }
#projects .record-table .pub-card {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) max-content;
  align-items: start; gap: 3px 13px; padding: 13px 16px;
  background: #fff; border-bottom: 1px solid #eee8ea;
}
#projects .record-table .pub-card:last-child { border-bottom: 0; }
#projects .record-table .pub-card:hover { background: #fdfafb; }
#projects .pub-body { display: contents; }
#projects .funding-logo { grid-area: 1 / 1 / 3 / 2; width: 24px; height: 24px; margin: 0; object-fit: contain; }
#projects .pub-title { grid-area: 1 / 2; margin: 0; font-size: 14px; font-weight: 500; line-height: 1.55; }
#projects .pub-year-col { grid-area: 1 / 3; padding: 2px 0 0 12px; text-align: right; }
#projects .pub-year-num { font: 400 11px/1.6 var(--default-font); color: #78808a; white-space: nowrap; }
@media (max-width: 640px) {
  #projects .record-table .pub-card { grid-template-columns: 24px minmax(0, 1fr); padding: 11px 12px; gap: 3px 10px; }
  #projects .pub-year-col { grid-area: 2 / 2; padding: 0; text-align: left; }
}

/* One chronological route, with appointments grouped at each stop. */
.career-route {
  --route-line: #b8bfc4;
  list-style: none;
  padding: 0;
  margin: 0;
}
.career-stage {
  position: relative;
  display: grid;
  grid-template-columns: clamp(120px, 15vw, 165px) minmax(0, 1fr);
  column-gap: 16px;
  padding: 0 0 16px 24px;
}
.career-stage:last-child { padding-bottom: 0; }
.career-stage:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: -10px;
  border-left: 1px solid var(--route-line);
}
.career-place::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--route-line);
}
.career-stage + .career-stage .career-place::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 3px;
  width: 5px;
  height: 5px;
  border: solid var(--route-line);
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}
.career-stage:last-child .career-place::before { background: var(--accent-color); }
.career-stage:last-child .career-place h3 { color: var(--accent-color); }
.career-place h3 { font-size: 15px; line-height: 1.5; font-weight: 600; margin: 0; }
.career-regions > span { display: inline-block; }
.career-regions + p { flex-basis: 100%; }
.place-flag { font-size: .86em; }
.career-place p, .career-detail p { margin: 1px 0 0; color: var(--detail-muted); font-size: 13px; line-height: 1.5; }
.career-place em, .career-detail .career-people { font-size: 12px; }
.career-appointments { display: grid; gap: 9px; list-style: none; padding: 0; margin: 0; }
.career-entry { display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; gap: 1px 9px; align-items: start; }
.career-entry > img { width: 23px; height: 23px; object-fit: contain; }
.career-detail > a { color: var(--heading-color); font-size: 14px; line-height: 1.5; font-weight: 600; }
.career-people a { color: inherit; text-decoration: underline; text-decoration-color: var(--ui-border); text-underline-offset: 2px; }
.career-entry a:hover, .career-entry a:focus-visible { color: var(--accent-color); text-decoration: underline; }
.career-entry time { color: var(--detail-muted); font-size: 11px; line-height: 22px; white-space: nowrap; }
@media (max-width: 640px) {
  .career-stage { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-left: 18px; }
  .career-place { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
  .career-entry { grid-template-columns: 21px minmax(0, 1fr); }
  .career-entry time { grid-column: 2; line-height: 1.4; }
}
@media print {
  .career-entry { break-inside: avoid; }
}

/* Publications share the lighter hierarchy, without a redundant ID column. */
#publications .pub-index { display: none; }
#publications .record-table .pub-card { grid-template-columns: minmax(0, 1fr); padding: 16px 18px; gap: 7px; }
#publications .pub-title { grid-area: 1 / 1; }
#publications .pub-badges { grid-area: 3 / 1; }
#publications .pub-authors { grid-area: 2 / 1; }
#publications .pub-scholar { margin-left: 0; }
@media (max-width: 480px) {
 #publications .record-table .pub-card { padding: 13px 14px; }
}

/* Match the compact funding-title scale. */
#publications .pub-title { font-size: 14px; font-weight: 500; line-height: 1.55; }
#publications .pub-title a { font-weight: inherit; }
#publications .pub-title .paper-token { font-weight: 600; }

#contact .contact-email-list {
  display: flex;
  flex-wrap: wrap;
  max-width: none;
  gap: 3px 16px;
}
#contact .contact-panel .contact-email-list p {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}
#contact .contact-panel .email-copy {
  width: 30px;
  height: 30px;
  padding: 0;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

#service { padding-block: 20px; }
#service .section-title { padding-bottom: 10px; }
#service .section-title h2 { font-size: 19px; }
.service-list { margin: 0; border-block: 1px solid var(--reader-rule); }
.service-list > div { display: grid; grid-template-columns: minmax(170px, 25%) 1fr; gap: 16px; align-items: baseline; padding: 7px 0; }
.service-list > div + div { border-top: 1px solid var(--reader-rule); }
.service-list dt { color: var(--heading-color); font-size: 14px; line-height: 1.5; font-weight: 600; }
.service-list dt span { display: block; color: var(--detail-muted); font-size: 12px; font-weight: 400; }
.service-list dd { margin: 0; font-size: 14px; line-height: 1.55; }
.talk-hosts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; list-style: none; margin: 0; padding: 0; }
.talk-hosts li { display: inline-flex; align-items: center; gap: 5px; }
.talk-hosts img { object-fit: contain; }
.talk-hosts abbr[title] { text-decoration: none; }
@media (max-width: 640px) {
  .service-list > div { grid-template-columns: 1fr; gap: 3px; }
  .service-list dt { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
}

#publications .pub-tag.pub-recognition { color: var(--accent-color); font-weight: 600; }
#publications .pub-recognition:hover { text-decoration: underline; }

.sidebar-identity { display: contents; }
@media screen and (max-width: 999px) {
  #header { --rail-inset: 8px; }
  #header .sidebar-identity { display: flex; align-items: center; gap: 8px; padding: 4px var(--rail-inset) 12px; }
  #header .sidebar-identity .profile-img { flex: 0 0 76px; }
  #header .sidebar-identity img { width: 76px; height: 76px; margin: 0; }
  #header .sidebar-identity .logo { margin: 0; text-align: left; }
  #header .sidebar-identity .sitename { color: var(--heading-color); font-size: 18px; line-height: 1.2; font-weight: 650; }
  #header .sidebar-identity .sitename span { display: block; margin-top: 3px; font-size: 14px; font-weight: 500; }
  #header .profile-meta { text-align: left; padding: 0 var(--rail-inset) 12px; margin: 0 0 12px; }
  #header .profile-title { line-height: 1.5; }
  #header .profile-group-role { color: var(--detail-muted); font-weight: 400; }
  #header .profile-meta .profile-email { border: 0; margin: 2px 0 0; padding: 0; }
  #header .catalog-heading { margin: 0 var(--rail-inset) 4px; }
  #header #navmenu a { min-height: 44px; grid-template-columns: 22px 16px minmax(0,1fr) auto; column-gap: 9px; padding: 6px var(--rail-inset); align-items: center; }
  #header #navmenu .nav-count { font-variant-numeric: tabular-nums; }
}
