/* ============ Reset / base ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: #fafaf9;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: #3A3432;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: #C2410C; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Text selection — bright fresh teal tint */
::selection {
  background: rgba(0, 214, 188, 0.32);
  color: #1C1917;
}
::-moz-selection {
  background: rgba(0, 214, 188, 0.32);
  color: #1C1917;
}

/* ============ Sticky top banner ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 249, 0.8);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.6);
}
.site-header__inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #C2410C;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 16px;
}
.brand:hover { text-decoration: none; }
.brand__icon { font-size: 18px; }
.site-nav {
  display: flex;
  gap: 30px;
}
.site-nav a {
  position: relative;
  font-size: 14px;
  color: #57534E;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding-bottom: 3px;
  transition: color 0.2s ease;
}
/* left→right underline wipe on hover */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: #C2410C;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.45, 0, 0.15, 1);
}
.site-nav a:hover {
  color: #1C1917;
  text-decoration: none;
}
.site-nav a:hover::after { transform: scaleX(1); }

/* ============ Page container ============ */
.page {
  max-width: 1024px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* ============ Hero ============ */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 36px;
  margin-bottom: 72px;
}
.hero-photo {
  width: 190px;
  height: 252px;
  border-radius: 0;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  background: #f0f0f0;
}
.hero-text { flex: 1; min-width: 0; }
.hero-text h1 {
  font-family: 'Hedvig Letters Serif', Georgia, serif;
  font-weight: 500;
  font-size: 44px;
  line-height: 1.1;
  color: #1C1917;
  margin: 0 0 14px;
}
.bio {
  margin: 0 0 14px;
  color: #3A3432;
  font-size: 17px;
}
.bio:last-of-type { margin-bottom: 18px; }
.bio strong { color: #1C1917; font-weight: 600; }
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #E7E5E4;
  color: #57534E;
  background: #ffffff;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.icon-btn:hover {
  color: #C2410C;
  border-color: #C2410C;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(194, 65, 12, 0.25);
}
.icon-btn svg { display: block; }

/* ============ Section ============ */
.section { margin-bottom: 64px; scroll-margin-top: 80px; }
.section h2 {
  font-family: 'Hedvig Letters Serif', Georgia, serif;
  font-weight: 500;
  font-size: 25px;
  letter-spacing: 0;
  text-transform: none;
  color: #1C1917;
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Refined fading accent rule in front of section titles */
.section h2::before {
  content: "";
  width: 30px;
  height: 1.5px;
  background: linear-gradient(90deg, #C2410C, rgba(194, 65, 12, 0));
  border-radius: 1px;
  flex-shrink: 0;
}

/* ============ News ============ */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.news-item {
  display: flex;
  gap: 20px;
  align-items: baseline;
  font-size: 15px;
  line-height: 1.55;
}
.news-date {
  flex: 0 0 76px;
  font-size: 13px;
  color: #A8A29E;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.news-text {
  flex: 1;
  color: #3A3432;
}
.news-text em { font-style: italic; color: #1C1917; }
.news-highlight {
  color: #C2410C;
  font-weight: 600;
}

/* ============ Research Interests tags ============ */
/* Typographic list: serif terms separated by accent middots — no boxes */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 8px;
}
.tag {
  font-family: 'Hedvig Letters Serif', Georgia, serif;
  font-size: 19px;
  color: #1C1917;
  line-height: 1.5;
}
.tag + .tag::before {
  content: "\00B7";
  color: #C2410C;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 700;
  margin: 0 16px;
}

/* ============ Education / Experience rows ============ */
.rows { display: flex; flex-direction: column; gap: 24px; }
.row {
  display: flex;
  align-items: center;
  gap: 22px;
}
.row-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}
.row--nologo { padding-left: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title {
  font-size: 18px;
  font-weight: 500;
  color: #1C1917;
  line-height: 1.3;
}
.row-sub {
  font-size: 14px;
  color: #808080;
  margin-top: 4px;
}
.row-year {
  font-size: 14px;
  color: #808080;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============ Publications ============ */
.pub {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
}
.pub-teaser {
  width: 320px;
  height: auto;
  display: block;
  border-radius: 4px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid #ececec;
  align-self: flex-start;
}
.pub-body { flex: 1; min-width: 0; }
.pub-venue {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.venue--gray { color: #808080; }
.venue--red  { color: #C2410C; }
.pub-title {
  font-family: 'Hedvig Letters Serif', Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  color: #1C1917;
  margin: 0 0 10px;
  line-height: 1.35;
}
.pub-authors {
  font-size: 15px;
  color: #3A3432;
  margin: 0 0 14px;
  line-height: 1.55;
}
.pub-authors strong { color: #1C1917; font-weight: 600; }
.pub-authors a {
  color: inherit;
  text-decoration: none;
  padding-bottom: 1px;
  border-bottom: 1px solid #D6D3D1;
  background-image: linear-gradient(#14b8a6, #14b8a6);
  background-repeat: no-repeat;
  background-position: left 100%;
  background-size: 0% 1px;
  transition: background-size 0.34s cubic-bezier(0.45, 0, 0.15, 1), color 0.28s ease, border-bottom-color 0.28s ease;
}
.pub-authors a:hover {
  color: #14b8a6;
  border-bottom-color: transparent;
  background-image: linear-gradient(#14b8a6, #14b8a6);
  background-size: 100% 1.5px;
  text-decoration: none;
}
.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
}

/* ============ Publication video teaser (A2A) ============ */
.pub-teaser--video {
  position: relative;
  overflow: hidden;
  background: transparent;
  border: 1px solid #ececec;
  border-radius: 4px;
  width: 320px;
  height: auto;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  align-self: flex-start;
}
.pub-teaser--video .teaser-still,
.pub-teaser--video .teaser-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pub-teaser--video .teaser-video {
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.pub-teaser--video:hover .teaser-video {
  opacity: 1;
}

/* ============ Buttons ============ */
/* Publication resource links — minimal text + icon, burnt-orange, no box, no hover */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #C2410C;
  border: none;
  background: none;
  text-decoration: none;
  line-height: 1.4;
}
.btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.95;
}
.btn:hover { text-decoration: none; }
.btn--disabled { color: #B8B4B0; cursor: default; }

/* ============ Visitor map ============ */
.visitor-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.visitor-section h2 { align-self: flex-start; margin-bottom: 0; }
.visitor-globe {
  width: 240px;
  height: 240px;
  max-width: 100%;
  margin: 0 auto;
}
.visitor-globe canvas { display: block; margin: 0 auto; cursor: grab; }
.visitor-globe.is-clickable canvas { cursor: pointer; }
.visitor-caption {
  margin: 2px 0 0;
  min-height: 1.25em;
  font-size: 0.88rem;
  color: #78716C;
  text-align: center;
}
.visitor-caption b { color: #C2410C; font-weight: 600; }

/* real-time current-visitor detail card */
.visitor-live {
  width: 100%;
  max-width: 460px;
  margin: 8px auto 0;
  min-height: 1px;
}
.visitor-live .vl-line {
  text-align: center;
  font-size: 0.9rem;
  color: #57534E;
  margin: 0 0 12px;
}
.visitor-live .vl-line b { color: #1C1917; font-weight: 600; }
.visitor-live .vl-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 0.82rem;
  border-top: 1px solid #EFEDEA;
  padding-top: 12px;
}
.visitor-live .vl-k { color: #A8A29E; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.72rem; align-self: center; }
.visitor-live .vl-v { color: #3A3432; text-align: right; font-variant-numeric: tabular-nums; }
.visitor-live .vl-v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }

/* visits badge (hits.sh) */
.visitor-badge {
  display: inline-block;
  margin-top: 4px;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.visitor-badge:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 4px 10px rgba(194, 65, 12, 0.25));
}
.visitor-badge img {
  display: block;
  height: 20px;
  width: auto;
  border-radius: 3px;
  opacity: 0.85;
  transition: opacity 0.18s ease;
}
.visitor-badge:hover img { opacity: 1; }

/* ============ Footer ============ */
.footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid #E7E5E4;
  font-size: 12px;
  color: #808080;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .page { padding: 28px 20px 64px; }

  .site-header__inner { padding: 12px 20px; }
  .brand__name { display: none; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 13px; }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 48px;
  }
  .hero-photo { width: 128px; height: 128px; }
  .hero-text h1 { font-size: 32px; }
  .bio { font-size: 16px; }

  .news-item { flex-wrap: wrap; gap: 6px; }
  .news-date { flex-basis: 100%; font-size: 12px; }
  .news-text { font-size: 14px; }

  .row-logo { width: 60px; height: 60px; }
  .row-title { font-size: 17px; }

  .tag { font-size: 17px; }
  .tag + .tag::before { margin: 0 12px; }

  .pub { flex-direction: column; gap: 12px; }
  .pub-teaser,
  .pub-teaser--video {
    width: 100%;
    height: auto;
  }
  .pub-title { font-size: 19px; }
  .pub-authors { font-size: 14px; }

  .row { flex-wrap: wrap; }
  .row-main { flex: 1 1 60%; }
  .row-year { flex: 0 0 auto; }
}
