/* Minimal academic homepage theme for lepotatoguy.github.io */

:root {
  --page: #ffffff;
  --surface: #f9fafb;
  --ink: #111827;
  --body: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --link: #2563eb;
  --link-dark: #1d4ed8;
  --link-soft: #eff6ff;
  --content-w: 960px;
  --nav-h: 56px;
  --font: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  background: var(--page);
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover,
a:focus {
  color: var(--link-dark);
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

strong,
b {
  color: var(--ink);
  font-weight: 600;
}

.container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* === TOP NAV === */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--nav-h);
}
.nav-brand {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}
.nav-brand:hover {
  color: var(--ink);
  text-decoration: none;
}
.nav-inner > nav {
  min-width: 0;
}
.nav-links.is-scrollable {
  mask-image: linear-gradient(to right, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
}
.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar {
  display: none;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  text-decoration: none;
  border-bottom-color: var(--link);
}

/* === SECTIONS === */
section {
  padding: 40px 0 8px;
}
.section-label {
  display: none;
}
.section-title {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  padding-bottom: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

/* Section title with a right-aligned link on the same line */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.section-head-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 20px;
}
.section-head .section-title {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

/* === INTRO === */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
  align-items: start;
  padding-top: 48px;
}
.intro-name {
  color: var(--ink);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.15;
}
.intro-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 6px 0 16px;
}
.intro-meta span + span::before {
  content: "\00b7";
  margin: 0 8px;
  color: var(--faint);
}
.about-text p {
  margin-bottom: 14px;
}
.intro-photo {
  width: 220px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  font-size: 0.92rem;
}
.intro-links i {
  margin-right: 5px;
  color: var(--muted);
}
.about-interests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.intro-email {
  font-size: 0.88rem;
  color: var(--muted);
}
.intro-email a {
  font-size: 0.78rem;
  color: var(--faint);
}

/* === NEWS === */
.news-list {
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
}
.news-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0 12px;
  padding: 6px 0;
  font-size: 0.94rem;
}
.news-date {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.news-icon {
  display: none;
}
.news-logo {
  display: inline-block;
  height: 1.4em;
  width: auto;
  vertical-align: middle;
  margin-left: 4px;
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: 1px;
}
.badge-paper {
  background: #dbeafe;
  color: #1e40af;
}
.badge-award {
  background: #fef3c7;
  color: #92400e;
}
.badge-review {
  background: #e0f2fe;
  color: #075985;
}
.badge-edu {
  background: #ede9fe;
  color: #5b21b6;
}

/* === PUBLICATIONS === */
.scholar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}
.pub-list {
  display: flex;
  flex-direction: column;
}
.pub-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.pub-card:last-child {
  border-bottom: 0;
}
.pub-venue {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--link-dark);
  background: var(--link-soft);
  padding: 1px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.pub-title {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.4;
  margin-bottom: 4px;
}
.pub-authors {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.88rem;
}
.pub-link::before {
  content: "[";
  color: var(--faint);
}
.pub-link::after {
  content: "]";
  color: var(--faint);
}
.pub-note {
  font-size: 0.8rem;
  color: var(--faint);
  margin-top: 4px;
}

/* === HONORS / SKILLS (shared card grid) === */
.honors-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.honor-card,
.skill-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--page);
}
.honor-year,
.timeline-period {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--link-dark);
  margin-bottom: 2px;
}
.honor-title {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}
.honor-org {
  font-size: 0.86rem;
  color: var(--muted);
}
.skill-group-title {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skill-tag,
.tag {
  font-size: 0.8rem;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
}

/* === REVIEWER === */
.reviewer-list {
  list-style: none;
}
.reviewer-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.94rem;
}
.reviewer-item i {
  color: var(--faint);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* === EDUCATION / EXPERIENCE === */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.timeline-dot {
  display: none;
}
.timeline-role {
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
}
.timeline-org {
  font-size: 0.92rem;
  color: var(--muted);
}
.timeline-detail {
  font-size: 0.9rem;
}
.timeline-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 4px;
  background: #fff7ed;
  color: #c2410c;
  margin-top: 4px;
}

/* === COLLABORATIONS / LINEAGE === */
.collab-note {
  margin-bottom: 16px;
}
.collab-img,
.lineage-img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* === FOOTER WIDGETS === */
.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
}
.footer-widgets {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 40px;
  padding: 32px 0 24px;
}
.footer-widget-card {
  min-width: 0;
}
.footer-widget-card h3 {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.visitor-map-embed {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 232px;
  overflow: hidden;
}

.citation-tracker-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 232px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.citation-tracker-topline {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
}
.citation-tracker-topline span:first-child {
  color: var(--link-dark);
  font-weight: 700;
  text-transform: uppercase;
}
.citation-tracker-topline span:last-child {
  color: var(--faint);
}
.citation-tracker-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.citation-tracker-total > span {
  color: var(--ink);
  font-size: 2.8rem;
  font-weight: 750;
  line-height: 1;
}
.citation-tracker-total small,
.citation-stat-grid span,
.citation-top-paper span {
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 650;
  text-transform: uppercase;
}
.citation-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.citation-stat-grid div {
  padding: 8px;
  border-right: 1px solid var(--line);
}
.citation-stat-grid div:last-child {
  border-right: 0;
}
.citation-stat-grid strong,
.citation-stat-grid span,
.citation-top-paper span,
.citation-top-paper strong {
  display: block;
}
.citation-stat-grid strong {
  color: var(--link-dark);
  font-size: 1rem;
  line-height: 1.1;
}
.citation-chart-shell {
  height: 82px;
}
.citation-chart-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.citation-top-paper {
  display: block;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.citation-top-paper strong {
  color: var(--body);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 2px;
}
.citation-tracker-actions {
  display: flex;
  gap: 14px;
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 600;
}

.site-copyright {
  color: var(--faint);
  font-size: 0.8rem;
  text-align: center;
  padding: 8px 0 28px;
}

/* === RESPONSIVE === */
@media (max-width: 1080px) {
  .nav-brand {
    display: none;
  }
  .nav-inner {
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .intro-photo {
    order: -1;
    width: 140px;
  }
  .footer-widgets {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }
  .container {
    padding: 0 16px;
  }
  .intro-name {
    font-size: 1.8rem;
  }
  .news-item {
    grid-template-columns: 1fr;
  }
  .honors-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }
}
