:root {
  --text: #494e52;
  --muted: #6c7380;
  --faint: #9aa3b5;
  --link: #598be7;
  --rule: #e8ebf3;
  --bg: #ffffff;
  --card: #f8f9fc;
  --card-edge: #dfe7f8;
  --award: #c54500;
  --badge-text: #8a4800;
  --badge-bg: #fff2cd;
  --badge-edge: #ffd487;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto",
    "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif;
  line-height: 1.5;
}
a { color: var(--link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

.masthead {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid #f2f3f3;
}
.masthead nav {
  max-width: 925px; margin: 0 auto; padding: 1em 16px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4em 1.4em;
}
.masthead a { color: var(--muted); font-size: 0.95rem; }
.masthead a.brand { color: var(--text); font-weight: 700; font-size: 1.1rem; }

main {
  max-width: 925px; margin: 2em auto 0; padding: 0 16px;
  font-size: 0.95rem; line-height: 1.65;
}
.hero-title { font-size: 2rem; margin: 0 0 0.2rem; color: #313436; }
.hero-subtitle {
  color: var(--muted); font-size: 0.98rem; font-weight: 600;
  margin: 0 0 0.9rem;
}
.about-photo {
  float: right; width: clamp(200px, 30vw, 260px); aspect-ratio: 4 / 5;
  margin: 6px 0 12px 22px; border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  background: linear-gradient(135deg, #f3f6ff 0%, #dde6fb 100%);
  display: flex; align-items: center; justify-content: center;
  color: #9aa9cf; font-size: 3rem; font-weight: 700; letter-spacing: 0.05em;
  object-fit: cover;
}
@media (max-width: 700px) {
  .about-photo { float: none; margin: 8px auto 16px; }
}
.quick-links {
  clear: both; margin: 0.4em 0 1em; font-size: 0.92rem;
  color: #4b4b4b; text-align: center;
}
.quick-links .divider { color: #b0b7c3; margin: 0 0.35em; }

.section-heading {
  font-size: 1.32rem; letter-spacing: 0.01em; font-weight: 700;
  color: #313436; margin: 1.4em 0 0.6em;
  display: flex; align-items: center; gap: 0.5rem;
}
.section-heading::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(89,139,231,0.35),
    rgba(89,139,231,0));
}
.news-hint {
  text-align: right; font-size: 0.82rem; color: var(--faint);
  margin: -6px 0 6px;
}
.news-box { max-height: 260px; overflow-y: auto; margin-bottom: 18px; }
.news-box ul { padding-left: 1.5rem; margin: 0.75rem 0; }

.pub-list { padding-left: 1.6rem; margin: 0; }
.pub-item {
  padding: 0 0 1rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.pub-item:last-child { border-bottom: none; }
.pub-title { font-size: 1.04rem; font-weight: 700; color: #313436; }
.award-highlight { font-weight: 800; color: var(--award); }
.badge {
  display: inline-block; margin: 0.18rem 0 0.3rem;
  padding: 0.1rem 0.6rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 700;
  color: var(--badge-text); background: var(--badge-bg);
  border: 1px solid var(--badge-edge);
}

.entry-list { list-style: none; padding: 0; margin: 0; }
.entry { padding: 0.7rem 0; }
.entry__meta { font-size: 0.88rem; color: var(--muted); }
.entry__title { font-weight: 700; color: #313436; }
.entry__details { margin: 0.2rem 0 0; }

.card-list { display: grid; gap: 0.9rem; margin: 0 0 1.3rem; }
.card {
  background: linear-gradient(135deg, #fcfdff 0%, #f3f7ff 100%);
  border: 1px solid var(--card-edge); border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  padding: 0.95rem 1rem;
}
.card__meta {
  font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 0.28rem;
}
.card__title { font-size: 1rem; font-weight: 700; color: #313436; }
.card p { margin: 0.32rem 0 0; }

code { font-family: Monaco, Consolas, "Lucida Console", monospace;
  font-size: 0.86em; }

footer {
  max-width: 925px; margin: 3em auto 0; padding: 1.5em 16px 4em;
  border-top: 1px solid #f2f3f3; font-size: 0.82rem; color: var(--muted);
}

.demo-grid {
  display: grid; gap: 1.2rem; margin: 0 0 1.3rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.demo {
  color: var(--text); text-decoration: none;
  border: 1px solid var(--card-edge); border-radius: 12px;
  overflow: hidden; background: var(--card);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}
.demo img { display: block; width: 100%; aspect-ratio: 16 / 9;
  object-fit: cover; }
.demo__body { padding: 0.7rem 0.9rem 0.85rem; }
.demo__title { font-weight: 700; color: #313436; line-height: 1.35; }
.demo__meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.demo__text { margin-top: 0.25rem; font-size: 0.9rem; }
.demo__tile {
  aspect-ratio: 16 / 9; display: flex; align-items: center;
  justify-content: center; padding: 0 1rem; text-align: center;
  background: linear-gradient(135deg, #f3f6ff 0%, #dde6fb 100%);
  color: #7f90bd; font-weight: 700; overflow-wrap: anywhere;
}
.demo:hover, .demo:focus { text-decoration: none; }

.pub-item { display: flex; gap: 1rem; align-items: flex-start; }
.pub-thumb {
  flex: 0 0 180px; aspect-ratio: 4 / 3; border-radius: 8px;
  border: 1px solid var(--card-edge); background: #ffffff;
  overflow: hidden; display: flex; align-items: center;
  justify-content: center;
}
.pub-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pub-tile {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; color: #7f90bd;
  background: linear-gradient(135deg, #f3f6ff 0%, #dde6fb 100%);
}
.pub-body { flex: 1; min-width: 0; }
@media (max-width: 560px) {
  .pub-item { flex-direction: column; }
  .pub-thumb { flex-basis: auto; width: 100%; }
}
.demo img.demo__figure { object-fit: contain; background: #ffffff; }
