:root {
  --bg: #ffffff;
  --text: #1f2933;
  --muted: #62707d;
  --line: #e4e7eb;
  --surface: #f6f7f9;
  --accent: #a6192e; /* subtle scarlet nod to OSU */
  --accent-dark: #7f1222;
  --max: 860px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { color: var(--accent-dark); text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3.5rem;
}
.brand {
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--accent); }
nav a {
  margin-left: 1.4rem;
  font-size: 0.92rem;
  color: var(--muted);
}
nav a:hover { color: var(--accent); text-decoration: none; }
nav a[aria-current="page"] { color: var(--text); font-weight: 500; }

/* Hero */
.hero { padding: 3.5rem 0 3rem; }
.hero-top {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2rem;
}
.bio p { margin: 0 0 0.9rem; font-size: 1.04rem; line-height: 1.7; }
.bio p:last-child { margin-bottom: 0; }
.portrait {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}
h1 {
  margin: 0 0 0.4rem;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.role {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 1rem;
}
.hero-text p { margin: 0 0 0.9rem; }
.hero-text p.role { margin-bottom: 0.4rem; }
.hero-text p.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.4rem;
  margin: 0.2rem 0 0;
  font-size: 0.98rem;
}
.contact .email,
.contact .icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.contact .email {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}
.contact .icon-link {
  color: var(--text);
  font-weight: 500;
}
.contact .icon-link:hover { color: var(--accent); text-decoration: none; }
.contact svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  fill: currentColor;
  color: var(--muted);
}
.contact .icon-link:hover svg { color: var(--accent); }
.contact svg.stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact .sep { display: none; }

/* Sections */
section { padding: 2.5rem 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 650;
}

/* Research interests */
.interests { margin: 0; display: grid; gap: 1.1rem; }
.interests > div {
  padding-left: 1.1rem;
  border-left: 2px solid var(--accent);
}
.interests dt { font-size: 1rem; font-weight: 600; margin-bottom: 0.1rem; }
.interests dd { margin: 0; color: #4a5865; }

/* News */
.news { list-style: none; margin: 0; padding: 0; }
.news li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  padding-bottom: 0.7rem;
}
.news li:last-child { padding-bottom: 0; }
.news-date {
  color: var(--muted);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

/* Publications */
.pubs {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pubs li {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1rem;
  padding: 0 0 1.6rem;
}
.pubs li:last-child { padding-bottom: 0; }
.pub-year {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  padding-top: 0.1rem;
}
.pub-body p { margin: 0; }
.pub-title {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
}
.pub-authors, .pub-venue {
  font-size: 0.95rem;
  color: var(--muted);
}
.pub-authors strong { color: var(--text); }
.pub-note {
  font-size: 0.85rem;
  color: var(--muted);
}
.pub-links { margin-top: 0.3rem !important; font-size: 0.88rem; }
.pub-links a {
  margin-right: 0.5rem;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
}
.pub-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Side projects */
.feature {
  margin: 0 0 2.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}
.feature:last-child { margin-bottom: 0; }
.shot-main {
  display: block;
  border-bottom: 1px solid var(--line);
  cursor: zoom-in;
}
.shot-main img { display: block; width: 100%; height: auto; }
.shot-strip {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.shot-thumb {
  flex: 0 1 110px;
  min-width: 0;
  line-height: 0;
  border-radius: 5px;
  overflow: hidden;
  outline: 2px solid transparent;
  outline-offset: 1px;
  opacity: 0.7;
  transition: opacity 0.15s, outline-color 0.15s;
}
.shot-thumb img { width: 100%; height: auto; }
.shot-thumb:hover { opacity: 1; }
.shot-thumb.is-active { opacity: 1; outline-color: var(--accent); }

.feature-body { padding: 1.2rem 1.4rem 1.4rem; }
.feature-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.feature h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.working-title { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.feature-body p { margin: 0 0 0.8rem; font-size: 0.98rem; color: #3a4753; }
.feature-body p.pub-links { margin: 0.9rem 0 0; font-size: 0.88rem; }
.proj-year {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.feature .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0; }
.tags span {
  padding: 0.05rem 0.6rem;
  background: var(--surface);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
}

.proj-list { list-style: none; margin: 0; padding: 0; }
.proj-list li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 1.1rem;
  padding: 0 0 1.5rem;
}
.proj-list li:last-child { padding-bottom: 0; }
.thumb-link {
  position: relative;
  display: block;
  width: 76px;
  height: 76px;
  cursor: zoom-in;
}
.thumb-link .thumb { transition: transform 0.15s, box-shadow 0.15s; }
.thumb-link:hover .thumb { transform: scale(1.04); box-shadow: 0 3px 10px rgba(15, 23, 42, 0.2); }
.thumb-link .count {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}
.thumb {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface);
}
.thumb.icon { object-fit: contain; border-color: transparent; background: none; }
.thumb.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8e9ec;
  border-color: #efd3d8;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.proj-body p { margin: 0; }
.proj-title { font-size: 1.02rem; font-weight: 600; line-height: 1.4; }
.proj-title .proj-year { margin-left: 0.4rem; }
.proj-desc { color: #4a5865; font-size: 0.95rem; }
.proj-body .pub-links { margin-top: 0.4rem; }

.proj-list li.era-divider {
  display: block;
  margin: 0.4rem 0 1.5rem;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--line);
}
.proj-list li.era-divider:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.era-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}
.era-note { display: block; font-size: 0.92rem; color: var(--muted); }

.pub-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  vertical-align: middle;
}
.pub-links a svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--muted);
}
.pub-links a:hover svg { color: var(--accent); }
.pub-links a svg.stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pub-links a svg.fill { fill: currentColor; }

/* Lightbox */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox::backdrop { background: rgba(10, 14, 20, 0.88); }
.lightbox figure { margin: 0; max-width: 90vw; text-align: center; }
.lightbox img {
  display: block;
  max-width: 90vw;
  max-height: 80vh;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  background: #111;
}
.lightbox figcaption { margin-top: 0.8rem; font-size: 0.92rem; color: #d5dbe1; }
.lb-btn {
  position: absolute;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.25); }
.lb-btn[hidden] { display: none; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Small screens */
@media (max-width: 700px) {
  body { font-size: 16px; }
  .hero-text p.contact { justify-content: center; }
  .hero-top {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding-top: 2.5rem;
  }
  .portrait { width: 180px; height: 180px; }
  h1 { font-size: 2rem; }
  .interests > div { grid-template-columns: 1fr; gap: 0.1rem; }
  .pubs li { grid-template-columns: 1fr; gap: 0.2rem; }
  .proj-list li { grid-template-columns: 56px 1fr; gap: 0.9rem; }
  .thumb, .thumb-link { width: 56px; height: 56px; }
  .thumb { border-radius: 8px; }
  .thumb-link .count { right: 2px; bottom: 2px; }
  .shot-strip { gap: 0.35rem; padding: 0.45rem; }
  .lb-btn { width: 2.2rem; height: 2.2rem; }
  .lb-prev { left: 0.4rem; }
  .lb-next { right: 0.4rem; }
  .thumb.tile { font-size: 1.1rem; }
  .feature-body { padding: 1rem 1.1rem 1.2rem; }
  .news li { grid-template-columns: 1fr; gap: 0; }
  nav a { margin-left: 1rem; }
}

@media (max-width: 420px) {
  .brand { display: none; }
  .header-inner { justify-content: center; }
  nav a { margin: 0 0.6rem; }
}
