@import url("site-header.css");

:root {
  --bg: #f7f4ef;
  --bg-elevated: #fffdf9;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e0d6;
  --accent: #1d4e5f;
  --accent-hover: #163c49;
  --link: #1a5276;
  --chip: #eef4f6;
  --max: 52rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100%;
}

p, li, .affiliation {
  overflow-wrap: break-word;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

main {
  padding: 2.75rem 0 4.5rem;
}

.hero {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.75rem;
}

.portrait {
  width: 10.5rem;
  height: 13.25rem;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 0.2rem;
  background: #ddd;
  box-shadow: 0 0 0 1px var(--line);
}

.hero h1 {
  margin: 0 0 0.2rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.1rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.affiliation {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  color: var(--accent);
  border-bottom: 0;
  text-decoration: none;
}

.links a:hover {
  color: var(--ink);
}

.links svg {
  display: block;
  width: 1.28rem;
  height: 1.28rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.prose {
  max-width: 100%;
}

.prose p {
  margin: 0 0 1.05rem;
  color: #292524;
  max-width: 100%;
  white-space: normal;
}

.prose p:last-child {
  margin-bottom: 0;
}

section {
  margin-top: 2.6rem;
  padding-top: 0.35rem;
}

section h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  background: var(--chip);
  color: var(--accent);
  border: 1px solid #d7e4e8;
  border-radius: 999px;
  padding: 0.18rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.news {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news li {
  display: grid;
  grid-template-columns: 6.2rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.news li:last-child {
  border-bottom: 0;
}

.news time {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.pubs {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pub;
}

.pubs li {
  position: relative;
  padding: 1.05rem 0 1.05rem 2rem;
  border-bottom: 1px solid var(--line);
  counter-increment: pub;
}

.pubs li::before {
  content: "[" counter(pub) "]";
  position: absolute;
  left: 0;
  top: 1.1rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.pub-title {
  margin: 0 0 0.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.pub-title a {
  color: inherit;
  text-decoration: none;
}

.pub-title a:hover {
  color: var(--link);
  text-decoration: underline;
}

.pub-meta,
.pub-venue {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pub-venue {
  font-style: italic;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
}

.research-grid {
  display: grid;
  gap: 1.1rem;
}

.research-card {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.1rem;
  padding: 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  text-decoration: none;
  color: inherit;
}

.research-card:hover {
  border-color: #c9ddd6;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.06);
}

.research-card img {
  width: 100%;
  height: 6.4rem;
  object-fit: cover;
  border-radius: 0.2rem;
  background: #eee;
}

.research-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
  line-height: 1.35;
}

.research-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.archive-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.awards-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.award-card {
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 0.3rem;
}

.award-photo {
  display: block;
  aspect-ratio: 4 / 3;
  background: #efe8dc;
  text-decoration: none;
  cursor: zoom-in;
}

.award-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.award-photo.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  border-bottom: 1px dashed var(--line);
}

.award-photo.is-empty img {
  display: none;
}

.award-photo.is-empty::after {
  content: none;
}

.award-body {
  padding: 0.9rem 1rem 1.05rem;
}

.award-year {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.award-card h3 {
  margin: 0 0 0.3rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.award-body p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.award-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 3.5rem 1.5rem 1.5rem;
  background: rgba(28, 25, 23, 0.88);
}

.award-lightbox[hidden] {
  display: none;
}

.award-lightbox img {
  max-width: min(56rem, 100%);
  max-height: 78vh;
  object-fit: contain;
  background: #111;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.award-lightbox-caption {
  margin: 0;
  color: #f5f1ea;
  text-align: center;
  font-size: 0.95rem;
  max-width: 42rem;
}

.award-lightbox-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  border: 0;
  background: transparent;
  color: #f5f1ea;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.contact p {
  margin: 0 0 0.4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.project-list {
  display: grid;
  gap: 0.85rem;
}

.project-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.project-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.project-item h3 a {
  color: inherit;
  text-decoration: none;
}

.project-item h3 a:hover {
  color: var(--link);
  text-decoration: underline;
}

.project-item p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  .hero,
  .research-card,
  .news li,
  .awards-gallery {
    grid-template-columns: 1fr;
  }

  .portrait {
    width: 8.5rem;
    height: 10.7rem;
  }

  .pubs li {
    padding-left: 0;
  }

  .pubs li::before {
    position: static;
    display: block;
    margin-bottom: 0.2rem;
  }
}
