/* Continuous academic homepage: identity first, research one scroll away. */
@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakra-petch/ChakraPetch-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

.homepage {
  --ff-poppins: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--ff-poppins);
  color: var(--light-gray);
  font-size: 15px;
  line-height: 1.65;
}

.homepage main {
  display: block;
  width: min(980px, calc(100% - 64px));
  min-width: 0;
  margin: 20px auto 0;
}

.homepage article {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 40px 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: none;
  scroll-margin-top: 0;
}

.homepage article + article { border-top: 1px solid var(--glass-border); }

.homepage a { color: var(--orange-yellow-crayola); }
.homepage a:hover { text-decoration: underline; text-underline-offset: 4px; }
.homepage a:focus-visible, .homepage button:focus-visible, .homepage summary:focus-visible {
  outline: 2px solid var(--orange-yellow-crayola);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 8px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--glass-bg-strong);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.homepage .navbar {
  position: sticky;
  top: 12px;
  width: 100%;
  max-width: none;
  min-height: 56px;
  margin: 0;
  padding: 6px 14px 6px 20px;
  justify-content: space-between;
  gap: 16px;
  border-radius: 18px;
  box-shadow: 0 4px 20px hsla(220, 40%, 10%, 0.06);
  animation: none;
  transform: none;
}
.homepage .navbar:hover { transform: none; box-shadow: 0 4px 20px hsla(220, 40%, 10%, 0.06); }
.homepage .navbar::before { display: none; }
.homepage .nav-name {
  flex: 1;
  color: var(--white-2);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1;
}
.nav-name span { display: inline; color: var(--orange-yellow-crayola); }
.homepage .navbar-list { gap: 6px; }
.homepage .navbar-link {
  min-height: 44px;
  padding: 10px 14px;
  color: var(--light-gray);
  font-size: 13px;
  font-weight: 400;
  line-height: 24px;
  background-image: none;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  animation: none;
}
.homepage .navbar-link.active {
  color: var(--white-2);
  background: var(--glass-highlight);
  font-weight: 600;
  letter-spacing: 0;
}
.homepage .theme-toggle {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.homepage .theme-toggle::before { display: none; }

.homepage .profile { padding-top: 36px; padding-bottom: 28px; }
.profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.profile-identity { min-width: 0; }
.profile-eyebrow, .section-eyebrow {
  color: var(--light-gray-70);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
}
.profile-eyebrow { margin-bottom: 9px; }
.profile h1 {
  color: var(--white-2);
  font-family: "Chakra Petch", var(--ff-poppins);
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.profile-role { color: var(--white-2); font-size: 17px; font-weight: 500; line-height: 1.5; }
.profile-affiliation { color: var(--light-gray); font-size: 15px; margin-top: 2px; }
.profile-portrait { flex: 0 0 152px; }
.profile-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 12px 32px hsla(220, 40%, 10%, 0.1);
}
.profile-focus {
  color: var(--white-2);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.025em;
  margin-top: 24px;
  max-width: 790px;
}
.profile-bio { max-width: 830px; margin-top: 10px; }
.profile-bio a { display: inline; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; margin-left: -10px; }
.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  transition: background var(--transition-1), color var(--transition-1);
}
.profile-links a:hover, .profile-links a:focus-visible { background: var(--glass-highlight); }
.profile-links ion-icon, .profile-links .social-svg-icon { width: 22px; height: 22px; flex-shrink: 0; }
.section-text-link span { opacity: 0.6; }
.research-topics { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.research-topics h2 { color: var(--light-gray-70); font-size: 12px; font-weight: 500; white-space: nowrap; }
.research-topics ul { display: flex; flex-wrap: wrap; gap: 8px; }
.research-topics li {
  padding: 5px 11px;
  color: var(--light-gray);
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-bg);
}
.homepage .latest-highlight {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: fit-content;
  margin-top: 20px;
  color: var(--light-gray);
  font-size: 13px;
  min-height: 30px;
}
.latest-label { color: var(--orange-yellow-crayola); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; }
.latest-highlight strong { color: var(--white-2); font-weight: 600; }

.section-header { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.section-eyebrow { margin-bottom: 5px; }
.homepage .section-header .h2 { font-size: 27px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.25; }
.section-text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; min-height: 30px; }
.homepage .project-list { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 0; }
.homepage .project-item { display: block; }
.homepage .project-card {
  grid-template-columns: minmax(0, 225px) minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  border-radius: 16px;
  background: var(--glass-bg);
  align-items: center;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
}
.homepage .project-card::before { display: none; }
.homepage .project-card:hover, .homepage .project-card:focus-within { transform: none; box-shadow: none; }
.homepage .project-img { border: 0; border-radius: 10px; background: none; }
.homepage .project-img img { max-height: 158px; width: 100%; object-fit: contain; }
.homepage .project-content { min-width: 0; }
.homepage .project-title { font-size: 17px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.4; margin-bottom: 5px; }
.homepage .project-category { color: var(--orange-yellow-crayola); font-size: 12px; font-weight: 500; margin-bottom: 6px; }
.homepage .project-description { font-size: 13px; line-height: 1.6; margin-bottom: 9px; font-weight: 400; }
.homepage .project-links {
  --action-fill: hsl(174, 58%, 54%);
  --action-fill-text: hsl(226, 46%, 6%);
  --action-border: hsla(174, 58%, 54%, 0.46);
  --action-hover: hsla(174, 58%, 54%, 0.12);
  gap: 6px;
  margin-top: 4px;
}
:root[data-theme="light"] .homepage .project-links {
  --action-fill: hsl(174, 48%, 30%);
  --action-fill-text: hsl(0, 0%, 98%);
  --action-border: hsl(174, 38%, 50%);
  --action-hover: hsla(174, 48%, 38%, 0.1);
}
.homepage .project-links a {
  justify-content: center;
  gap: 4px;
  color: var(--white-2);
  font-size: 12px;
  font-weight: 500;
  min-height: 32px;
  padding: 4px 7px;
  border: 1px solid var(--action-border);
  border-radius: 7px;
  background: var(--glass-bg-strong);
}
.homepage .project-links a:hover, .homepage .project-links a:focus-visible {
  color: var(--white-2);
  background: var(--action-hover);
  border-color: var(--action-fill);
  text-decoration: none;
}
.homepage .project-links a:first-child {
  color: var(--action-fill-text);
  background: var(--action-fill);
  border-color: var(--action-fill);
}
.homepage .project-links a:first-child:hover, .homepage .project-links a:first-child:focus-visible {
  color: var(--action-fill-text);
  background: var(--action-fill);
  filter: brightness(1.08);
}
.homepage .project-links ion-icon { font-size: 13px; }

.archive-disclosure { margin-top: 18px; border-top: 1px solid var(--glass-border); }
.archive-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 0;
  cursor: pointer;
  color: var(--white-2);
  font-size: 13px;
  font-weight: 500;
  list-style: none;
}
.archive-disclosure > summary::-webkit-details-marker { display: none; }
.archive-disclosure > summary::after { content: "+"; margin-left: auto; font-size: 20px; font-weight: 400; }
.archive-disclosure[open] > summary::after { content: "−"; }
.disclosure-count { color: var(--light-gray-70); font-size: 11px; font-weight: 400; }
.archive-disclosure[open] > .project-list { padding-bottom: 12px; }

.homepage .news .timeline-list { margin: 0; }
.homepage .news .timeline-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 4px 20px;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--glass-border);
}
.homepage .news .timeline-item:last-child { border: 0; padding-bottom: 0; }
.homepage .news .timeline-item::before, .homepage .news .timeline-item::after { display: none; }
.homepage .news .timeline-item > span { grid-column: 1; grid-row: 1; font-size: 12px; line-height: 1.7; color: var(--light-gray-70); font-variant-numeric: tabular-nums; }
.homepage .news .timeline-item-title { grid-column: 2; grid-row: 1; font-size: 14px; line-height: 1.6; font-weight: 500; margin: 0; }
.homepage .news .timeline-text { grid-column: 2; grid-row: 2; font-size: 13px; font-weight: 400; }
.homepage .resume .timeline { margin-bottom: 32px; }
.homepage .resume .title-wrapper { margin-bottom: 20px; }
.homepage .resume .title-wrapper .icon-box { display: none; }
.homepage .resume .title-wrapper .h3 { font-size: 18px; font-weight: 500; }
.homepage .resume .timeline-list { margin-left: 0; }
.homepage .resume .timeline-item { margin-left: 0; }
.homepage .resume .timeline-item::before, .homepage .resume .timeline-item::after { display: none; }
.homepage .resume .education-item { grid-template-columns: 44px minmax(0, 1fr); gap: 18px; margin-bottom: 24px; }
.homepage .resume .education-logo { width: 44px; height: 44px; flex-basis: 44px; object-fit: contain; }
.homepage .resume .timeline-item-title { font-size: 15px; font-weight: 600; }
.homepage .resume .timeline-text, .homepage .resume .entry-summary { font-size: 13px; font-weight: 400; line-height: 1.7; }
.homepage .resume .timeline-list span { font-size: 12px; }
.homepage .resume .entry-description__toggle { min-height: 32px; }
.homepage .resume .academic-services-card { padding: 18px; border-radius: 12px; background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: none; }
.homepage .resume .academic-services-card::before { display: none; }
.homepage .resume .archive-disclosure .timeline { margin-top: 20px; }
.site-footer { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 30px 0 40px; border-top: 1px solid var(--glass-border); }
.site-footer p { color: var(--white-2); font-size: 19px; font-weight: 500; margin-bottom: 4px; }
.site-footer a { font-size: 13px; min-height: 32px; display: inline-flex; align-items: center; }
.site-footer ul { display: flex; gap: 18px; }

@media (max-width: 680px) {
  html { scroll-padding-top: 88px; }
  .homepage main { width: calc(100% - 36px); margin-top: 10px; }
  .homepage article { padding: 28px 0; }
  .homepage .navbar { top: 8px; padding: 4px 6px; gap: 0; min-height: 52px; border-radius: 14px; }
  .homepage .nav-name { padding-left: 8px; font-size: 17px; }
  .homepage .navbar-list { gap: 0; }
  .homepage .navbar-link { padding: 10px 11px; font-size: 12px; }
  .homepage .theme-toggle { flex-basis: 40px; width: 40px; height: 44px; }
  .homepage .profile { padding-top: 30px; padding-bottom: 24px; }
  .profile-heading { gap: 18px; align-items: flex-start; }
  .profile-eyebrow { display: none; }
  .profile h1 { font-size: 39px; margin-bottom: 10px; }
  .profile-role { font-size: 13px; }
  .profile-affiliation { font-size: 12px; line-height: 1.6; max-width: 230px; }
  .profile-portrait { flex-basis: 94px; }
  .profile-portrait img { border-radius: 16px; }
  .profile-focus { font-size: 18px; margin-top: 20px; line-height: 1.5; }
  .profile-bio { font-size: 13px; margin-top: 8px; }
  .profile-links { margin-top: 8px; }
  .research-topics { display: block; margin-top: 14px; }
  .research-topics h2 { margin-bottom: 8px; }
  .research-topics ul { gap: 6px; }
  .research-topics li { font-size: 10px; padding: 4px 8px; }
  .homepage .latest-highlight { margin-top: 15px; font-size: 12px; gap: 6px 10px; }
  .section-header { margin-bottom: 16px; gap: 6px; }
  .homepage .section-header .h2 { font-size: 23px; }
  .section-text-link { font-size: 11px; }
  .homepage .project-list { gap: 18px; }
  .homepage .project-card { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; align-items: start; border-radius: 14px; }
  .homepage .project-img { width: 100%; margin: 0; border-radius: 8px; }
  .homepage .project-img img { max-height: none; height: auto; }
  .homepage .project-title { font-size: 16px; line-height: 1.45; }
  .homepage .project-category { font-size: 12px; }
  .homepage .project-description { font-size: 13px; line-height: 1.6; }
  .homepage .project-links { gap: 4px; }
  .homepage .project-links a { min-height: 30px; padding: 4px 5px; font-size: 11px; }
  .homepage .project-links ion-icon { font-size: 12px; }
  .homepage .news .timeline-item { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
  .homepage .news .timeline-item > span { grid-column: 1; grid-row: 1; font-size: 11px; }
  .homepage .news .timeline-item-title { grid-column: 1; grid-row: 2; font-size: 13px; }
  .homepage .news .timeline-text { grid-column: 1; grid-row: 3; font-size: 12px; }
  .homepage .resume .education-item { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
  .homepage .resume .education-logo { width: 34px; height: 34px; flex-basis: 34px; }
  .site-footer { padding-bottom: 24px; align-items: start; }
  .site-footer ul { gap: 12px; }
}

@media (max-width: 380px) {
  .homepage main { width: calc(100% - 28px); }
  .homepage .navbar-link { padding-inline: 9px; font-size: 11px; }
  .profile-portrait { flex-basis: 82px; }
  .profile h1 { font-size: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
