/* Homepage styles (sidebar layout, CMU-red palette). */
:root {
  --accent: #a6192e;
  --accent-2: #e0614f;
  --accent-soft: #fbecea;
  --accent-ink: #7a1222;
  --bg: #f8f5f2;
  --ink: #16181d;
  --muted: #6b7280;
  --line: #ebe7e3;
  --gold: #b7791f;
  --gold-soft: #fdf3e1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.7 Inter, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  min-height: 100vh;
}
/* Soft colour blobs and a faint dot grid behind the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Rose/apricot background patches that show through the glass cards. */
  background:
    radial-gradient(600px 420px at 8% 4%, rgba(246, 216, 210, 1), transparent 70%),
    radial-gradient(560px 420px at 96% 30%, rgba(243, 230, 207, 1), transparent 70%),
    radial-gradient(520px 480px at 60% 75%, rgba(246, 205, 200, 0.9), transparent 70%),
    radial-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px) 0 0 / 22px 22px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }

.layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 36px;
  padding: 40px 28px 64px;
}

/* ---------- Sidebar ---------- */
aside { position: sticky; top: 32px; align-self: start; }
.glass {
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 20px 40px -28px rgba(166, 25, 46, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
/* Main section cards: translucent rose glass. */
section.card.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.62), rgba(255, 240, 236, 0.45));
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
/* Sidebar cards: solid white. */
aside .glass { background: #fff; }
.profile { border-radius: 22px; overflow: hidden; }
.banner {
  height: 116px;
  position: relative;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background: radial-gradient(circle at 20% 30%, #fff 0 2px, transparent 3px) 0 0 / 26px 26px;
}
.avatar {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  margin: -88px auto 0;
  display: block;
  position: relative;
  border: 5px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.pinfo { padding: 14px 24px 24px; text-align: center; }
.pinfo h1 {
  font: 600 26px/1.2 Fraunces, Georgia, serif;
  margin: 4px 0 2px;
  letter-spacing: -0.01em;
}
.pinfo h1 span { font: 500 18px Inter, sans-serif; color: var(--muted); margin-left: 6px; }
.role {
  font-size: 13.5px;
  color: var(--muted);
  margin: 6px 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.role img { width: 18px; height: 18px; }
.loc { font-size: 12.5px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 14px 0 16px; }
.tags span {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.icons { display: flex; justify-content: center; gap: 8px; }
.icons a {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  transition: 0.18s;
}
.icons a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}
nav.side-nav { margin-top: 16px; border-radius: 18px; padding: 8px; }
nav.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
nav.side-nav a i { width: 16px; text-align: center; }
nav.side-nav a:hover { background: rgba(0, 0, 0, 0.035); color: var(--ink); }
nav.side-nav a.on { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Sections ---------- */
section.card {
  border-radius: 22px;
  padding: 30px 34px;
  margin-bottom: 22px;
  scroll-margin-top: 28px;
}
h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 600 21px/1.2 Fraunces, Georgia, serif;
  margin: 0 0 20px;
}
h2 .hi {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 10px -3px var(--accent);
}
h2 .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
h2 a.scholar { font-size: 18px; color: var(--muted); }
h2 a.scholar:hover { color: var(--accent); }
p { margin: 0 0 12px; }
p:last-child { margin: 0; }
.mark { font-weight: 600; background: linear-gradient(transparent 62%, var(--accent-soft) 62%); }
.hello { font: 500 17px Fraunces, Georgia, serif; margin-bottom: 10px; }

/* News timeline */
.news { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; }
.news::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--accent-soft), var(--line));
}
.news li {
  display: grid;
  grid-template-columns: 30px 82px 1fr;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  position: relative;
}
.news .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--accent);
  z-index: 1;
}
.news time { font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.news b { font-weight: 600; }

/* Education / Experience cards */
.orgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.org {
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 6px 16px -10px rgba(166, 25, 46, 0.3);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: 0.2s;
}
.org:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 10px 22px -10px rgba(166, 25, 46, 0.38); }
.org img { width: 46px; height: 46px; object-fit: contain; }
.org b { font-size: 14px; line-height: 1.35; }
.org small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.pill {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* Publications */
.pub-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -8px 0 10px; }
.note { font-size: 12.5px; color: var(--muted); margin: 0; }
.sorter { display: flex; gap: 2px; background: rgba(0, 0, 0, 0.045); padding: 4px; border-radius: 11px; }
.sorter button {
  border: 0;
  background: none;
  font: 600 12.5px Inter, sans-serif;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sorter button:hover { color: var(--ink); }
.sorter button.on { background: #fff; color: var(--accent-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.pub {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 16px;
  margin: 0 -16px;
  border-radius: 16px;
  transition: 0.2s;
}
.pub:hover { background: #fff; box-shadow: 0 16px 34px -16px rgba(166, 25, 46, 0.4); transform: translateY(-2px); }
.pub + .pub { border-top: 1px solid rgba(166, 25, 46, 0.08); }
.pub:hover + .pub { border-top-color: transparent; }
.media { align-self: start; }
.media .frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f3f3f3;
}
.media img,
.media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s;
}
/* Wide teasers: show the whole image at its own aspect ratio instead of cropping to 16:10. */
.media img.natural { aspect-ratio: auto; height: auto; object-fit: contain; }
.pub:hover .media img,
.pub:hover .media video { transform: scale(1.04); }
.media iframe { display: block; margin: 8px auto 0; }
.title { font-weight: 650; font-size: 15.5px; line-height: 1.4; }
.authors { font-size: 13.5px; color: #555; margin: 5px 0 10px; line-height: 1.55; }
.me {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--accent-2);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.venue { background: var(--accent); color: #fff; }
.venue.review { background: #eef0f3; color: var(--muted); }
.award { background: var(--gold-soft); color: var(--gold); }
.lnk { border: 1px solid rgba(166, 25, 46, 0.12); background: rgba(255, 255, 255, 0.7); color: var(--ink); font-weight: 500; transition: 0.15s; }
.lnk:hover { border-color: var(--accent); color: var(--accent); }
.lnk.off { color: #aaa; pointer-events: none; }

footer { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 8px; }
footer p { margin: 2px 0; }

@media (max-width: 920px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 48px; gap: 20px; }
  aside { position: static; }
  nav.side-nav { display: none; }
  section.card { padding: 22px 20px; }
  .pub { grid-template-columns: minmax(0, 1fr); }
  .news li { grid-template-columns: 30px 1fr; }
  .news time { grid-column: 2; }
  .news li > span:last-child { grid-column: 2; margin-top: -6px; }
}
