/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

body {
  font-family: 'Lato', Verdana, Helvetica, 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #334155;
  background: #fff;
}

a {
  color: #0052D4;
  text-decoration: none;
}

a:hover {
  color: #C2410C;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 2px solid #0052D4;
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 40px;
}

.name {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  padding: 16px 0 8px;
}

.links {
  text-align: center;
  line-height: 1.9;
}

.links a,
.project-links a {
  display: inline-block;
}

h2 {
  font-size: 20px;
  font-weight: normal;
  margin: 24px 0 12px;
  padding-top: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

/* Hero section */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(180px, 3fr);
  align-items: center;
}

.hero-text {
  min-width: 0;
  padding: 2.5%;
}

.hero-photo {
  padding: 2.5%;
  text-align: center;
}

.hero-photo img {
  width: 100%;
  max-width: 240px;
  height: auto;
  object-fit: cover;
}

/* News */
.news-list {
  list-style: none;
  padding-left: 0;
}

.news-list li {
  margin-bottom: 6px;
  padding-left: 0;
}

.news-date {
  display: inline-block;
  width: 100px;
  font-weight: 700;
  color: #64748b;
}

/* Publications */
.publication-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.publication {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr);
  align-items: center;
}

.pub-image {
  min-width: 0;
  padding: 16px;
}

.pub-image img {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.pub-text {
  min-width: 0;
  padding: 8px;
}

.papertitle {
  font-size: 15px;
  font-weight: 700;
}

.papertitle,
.project-context,
.project-links,
.pub-desc,
.exp-text {
  overflow-wrap: anywhere;
}

.pub-desc {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0;
}

.section-note {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 8px;
}

.tech-stack {
  font-size: 12px;
  font-style: italic;
  color: #64748b;
}

/* Experience */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-entry {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
}

.exp-date {
  padding: 8px 16px 8px 0;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.exp-text {
  min-width: 0;
  padding: 8px;
}

/* General list styling */
ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

li {
  margin-bottom: 4px;
}

p {
  margin-bottom: 8px;
}

/* Footer */
.footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  text-align: right;
  font-size: small;
  color: #64748B;
}

.footer a {
  color: #64748B;
}

.footer a:hover {
  color: #C2410C;
}

/* Projects */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-entry {
  padding: 8px 0;
}

.project-context {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 2px;
}

.project-links {
  font-size: 13px;
  margin-top: 2px;
}

.project-tag {
  display: inline-block;
  padding: 2px 7px;
  margin-left: 6px;
  border-radius: 3px;
  background: #0F766E;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.project-details {
  margin-top: 4px;
  font-size: 13px;
}

.project-details summary {
  width: fit-content;
  color: #0052D4;
  cursor: pointer;
}

.project-details summary:hover {
  color: #C2410C;
}

.project-details summary:focus-visible {
  outline: 2px solid #0052D4;
  outline-offset: 2px;
}

.project-detail-copy {
  margin: 4px 0 0;
  color: #64748B;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 16px 18px;
  }

  .hero {
    display: flex;
    flex-direction: column-reverse;
  }

  .hero-text,
  .hero-photo {
    width: 100%;
    max-width: 100%;
    padding: 8px 0;
  }

  .hero-photo {
    text-align: center;
  }

  .hero-photo img {
    width: 180px;
    margin: 0 auto;
  }

  .publication {
    display: flex;
    flex-direction: column;
  }

  .pub-image,
  .pub-text {
    width: 100%;
  }

  .pub-image {
    padding: 10px 0;
    text-align: center;
  }

  .pub-text {
    padding: 6px 0;
  }

  .pub-image img {
    margin: 0 auto;
  }

  .exp-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .exp-date {
    width: auto;
    padding-bottom: 0;
    white-space: normal;
  }

  .exp-text {
    padding-top: 0;
  }
}
