/* ============================================================
   LAYOUT + COMPONENTS
   ============================================================ */

/* ---------- header / nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .8rem clamp(1.1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
}

.nav .brand {
  font-weight: 600; font-size: 1rem; letter-spacing: -.01em;
  cursor: pointer; user-select: none;
}

.nav .brand:hover { color: var(--accent); }

.nav nav { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }

.nav nav a {
  font-size: .82rem; letter-spacing: .02em;
  padding: .3rem .6rem; border-radius: 999px; color: var(--muted);
}

.nav nav a:hover {
  color: var(--ink);
  background: var(--accent-soft);
  text-decoration: none;
}

/* theme dots */
.themes { display: flex; gap: .5rem; align-items: center; margin-left: .35rem; }

.themes button {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--line); padding: 0; cursor: pointer;
  transition: transform .18s ease;
}

.themes button:hover { transform: scale(1.18); }

.themes button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink);
}

.sw-sand { background: #A08968; }
.sw-sage { background: #86977E; }
.sw-mist { background: #8291A0; }

/* ---------- page layout ---------- */
.wrap {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.1rem, 4vw, 3rem) 4rem;
  display: grid; grid-template-columns: 290px 1fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}

@media (max-width: 820px) {
  .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ---------- sidebar ---------- */
aside { position: sticky; top: 80px; }

@media (max-width: 820px) {
  aside { position: static; }
}

.photo {
  width: 184px; height: 184px; border-radius: 20px; object-fit: cover;
  background: var(--accent-soft); border: 1px solid var(--line);
  box-shadow: 6px 8px 0 var(--accent-soft);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease;
  margin-bottom: 1.1rem;
}

.photo:hover {
  transform: rotate(-2.5deg) scale(1.02);
  box-shadow: 9px 11px 0 var(--accent-soft);
}

.myname { font-size: 1.4rem; margin: .15rem 0 .35rem; }

.role {
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.5;
}

.role strong { color: var(--ink); font-weight: 600; }

.fellow {
  display: inline-block;
  margin-top: .45rem;
  font-size: .82rem;
  color: var(--accent);
  font-weight: 600;
}

.contact { margin: .9rem 0 0; font-size: .9rem; word-break: break-word; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .7rem;
}

.links a {
  font-size: .8rem;
  letter-spacing: .01em;
  padding: .3rem .6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--card);
  transition: transform .15s ease, border-color .15s ease, color .15s ease;
}

.links a:hover {
  color: var(--ink);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

/* "currently" status card */
.status {
  margin-top: 1.3rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px dashed var(--accent);
  font-size: .84rem;
  line-height: 1.45;
}

.status b {
  display: block;
  margin-bottom: .2rem;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.status .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: .4rem;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}

/* sidebar mini-lists */
.mini { margin-top: 1.4rem; font-size: .88rem; }

.mini h3 {
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 .45rem;
}

.mini ul { list-style: none; margin: 0 0 1.1rem; padding: 0; }
.mini li { margin: .22rem 0; color: var(--muted); }
.mini li a { color: var(--ink); }

/* ---------- main content ---------- */
main { min-width: 0; }

section {
  scroll-margin-top: 80px;
  margin-bottom: 2.8rem;
}

main h2 { font-size: 1.4rem; margin: 0 0 1rem; }
main p { max-width: 64ch; }
.tag-inline { font-weight: 600; color: var(--ink); }

/* hand-drawn wavy divider */
.wave {
  display: block;
  width: 100%;
  height: 14px;
  color: var(--line);
  margin: 2.4rem 0;
}

/* stacked entries: research, publications, awards */
.entries {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: item;
}

.entry {
  position: relative;
  padding: 1rem 0 1rem 2.3rem;
  border-top: 1px solid var(--line);
}

.entry::before {
  counter-increment: item;
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.15rem;
  font-size: .72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.entry:hover::before { color: var(--accent); }

.entry .title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
}

/*
   Research is experience, not a numbered/ranked list.
   Publications and Awards keep the shared .entry counter.
*/
#research .entry {
  padding-left: 0;
}

#research .entry::before {
  content: none;
  display: none;
  counter-increment: none;
}

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

.entry .meta {
  color: var(--muted);
  font-size: .82rem;
  margin-top: .2rem;
}

.entry .desc {
  color: var(--muted);
  font-size: .92rem;
  margin-top: .3rem;
}

.entry .desc .me {
  color: var(--ink);
  font-weight: 600;
}

.badge {
  display: inline-block;
  font-size: .72rem;
  padding: .1rem .45rem;
  border-radius: 6px;
  margin-left: .35rem;
  background: var(--accent-soft);
  color: var(--ink);
  white-space: nowrap;
}

/* plain prose lists (teaching / service) */
.plain {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plain li {
  padding: .55rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.plain li b {
  color: var(--ink);
  font-weight: 600;
}

.plain li span {
  display: block;
  font-size: .82rem;
  margin-top: .1rem;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem clamp(1.1rem, 4vw, 3rem);
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  letter-spacing: .02em;
}

/* easter-egg confetti */
.confetti {
  position: fixed;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
}