/* ==========================================================
   Theme
   ========================================================== */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --hover: #f4f4f2;
  --text: #2b2b2b;
  --text-muted: #6b6b6b;
  --border: #e6e6e3;
  --accent: #1f3a8a;
  --placeholder-bg: #fff6d6;
  --placeholder-border: #e0b84a;
  --placeholder-text: #7a5b00;
  --teal: #2c6e66;
  --teal-strong: #1f5650;
  --teal-soft: #e6f0ee;
  --ivory: #fbf9f4;

  --font-serif: "Source Serif 4", Charter, Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --page-w: 760px;
  --header-h: 56px;
}

[data-theme="dark"] {
  --bg: #191919;
  --surface: #202020;
  --hover: #2a2a2a;
  --text: #e8e8e6;
  --text-muted: #a3a3a0;
  --border: #333331;
  --accent: #9db2ff;
  --placeholder-bg: #3a3013;
  --placeholder-border: #a8862c;
  --placeholder-text: #f2d98a;
  --teal: #7cc4b8;
  --teal-strong: #a3d9cf;
  --teal-soft: #1f3330;
  --ivory: #22221f;
}

/* ==========================================================
   Base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

h1, h2, h3 { font-weight: 700; line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 6px;
  font-family: var(--font-sans); text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Placeholders: highlighted so they're easy to spot and replace */
.placeholder {
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  border: 1px dashed var(--placeholder-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-style: italic;
}
p.placeholder, h2.placeholder, dd.placeholder { padding: 4px 8px; }
.placeholder-block { border-style: dashed !important; border-color: var(--placeholder-border) !important; }
.placeholder-block .pub-title,
.placeholder-block .pub-authors,
.placeholder-block .pub-venue,
.placeholder-block .pub-year { color: var(--placeholder-text); font-style: italic; }
.is-placeholder { opacity: .45; }

/* ==========================================================
   Header / navigation
   ========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
}

.nav {
  height: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}

.brand { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.name-suffix { font-size: .7em; font-weight: 600; color: var(--text-muted); }

.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }

.nav-menu a {
  display: block; padding: 6px 12px; border-radius: 6px;
  color: var(--text-muted); text-decoration: none; font-size: .92rem;
}
.nav-menu a:hover { background: var(--hover); color: var(--text); }
.nav-menu a[aria-current="page"] { color: var(--text); font-weight: 600; }

.theme-toggle {
  display: grid; place-items: center;
  width: 34px; height: 34px; margin-left: 6px;
  border: none; border-radius: 6px; background: transparent;
  color: var(--text-muted); cursor: pointer;
}
.theme-toggle:hover { background: var(--hover); color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.nav-toggle {
  display: none;
  width: 38px; height: 38px; padding: 11px 9px;
  border: none; border-radius: 6px; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle:hover { background: var(--hover); }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================
   Page layout
   ========================================================== */
.banner { height: clamp(100px, 25vw, 300px); overflow: hidden; background: #eceae6; }
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.page { width: 100%; max-width: var(--page-w); margin: 0 auto; padding: 32px 24px 80px; }
.page-inner { padding-top: 64px; }

.page-title { font-size: clamp(2rem, 4.5vw, 2.6rem); margin-bottom: 20px; }
.page-lead { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 36px; }

.title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 7px 16px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font-sans); font-size: .9rem; font-weight: 500; text-decoration: none;
}
.btn:hover { background: var(--hover); }

.card {
  padding: 22px 24px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.card-title { font-size: 1.2rem; }
.card p:last-child { margin-bottom: 0; }

.stack { display: grid; gap: 16px; }

/* ==========================================================
   Home
   ========================================================== */
.intro { display: grid; grid-template-columns: 1fr 200px; gap: 48px; align-items: start; }

.home-head { margin-bottom: 28px; }
.home-head .page-title { margin-bottom: 6px; }
.headline { font-size: 1.15rem; margin: 0; }
.headline-sub { font-family: var(--font-sans); font-size: .85rem; color: var(--text-muted); margin: 2px 0 0; letter-spacing: .01em; }

.intro-hello { font-weight: 700; margin-bottom: 6px; }

.intro-photo-wrap {
  position: relative;
  width: 200px; height: 200px; margin-top: 4px; border-radius: 50%;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.intro-photo {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  pointer-events: none; -webkit-user-drag: none; user-select: none;
}
.intro-photo-wrap::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
}

.social { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.social a {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px dashed var(--text-muted); color: var(--text);
  transition: background .15s, border-color .15s;
}
.social a:hover { background: var(--hover); border-style: solid; }
.social svg { width: 19px; height: 19px; fill: currentColor; }

.explore { margin-top: 56px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.explore-card {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-family: var(--font-sans); font-size: .9rem; font-weight: 500;
  text-decoration: none; transition: background .15s, border-color .15s;
}
.explore-card:hover { background: var(--hover); border-color: var(--text-muted); }
.explore-card svg {
  width: 17px; height: 17px; flex-shrink: 0;
  fill: none; stroke: var(--text-muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

.selected { margin-top: 72px; }
.selected h2 { font-size: 1.6rem; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.selected-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.highlight { display: flex; flex-direction: column; }
.highlight h3 { font-size: 1.02rem; margin: 14px 0 6px; }
.highlight p { color: var(--text-muted); font-size: .95rem; line-height: 1.6; margin-bottom: 10px; }
.highlight-link { margin-top: auto; }
.highlight-link.is-soon { color: var(--text-muted); font-style: italic; }
.highlight-img { aspect-ratio: 16 / 9; width: 100%; height: auto; border-radius: 8px; object-fit: cover; }
.highlight-media { display: block; overflow: hidden; border-radius: 8px; }
.highlight-media .highlight-img { border-radius: 0; transition: transform .4s ease; }
.highlight-media:hover .highlight-img { transform: scale(1.06); }
.highlight-link { font-family: var(--font-sans); font-size: .88rem; font-weight: 500; }

/* ==========================================================
   Publications
   ========================================================== */
.tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  border-bottom: 1px solid var(--border); margin-bottom: 24px;
  font-family: var(--font-sans);
}
.filter-btn {
  padding: 8px 12px; margin-bottom: -1px;
  border: none; border-bottom: 2px solid transparent; background: transparent;
  color: var(--text-muted); font: inherit; font-size: .9rem; cursor: pointer;
}
.filter-btn:hover { color: var(--text); }
.filter-btn.is-active { color: var(--text); border-bottom-color: var(--teal); font-weight: 600; }
.filter-count { margin-left: 6px; font-size: .75rem; color: var(--text-muted); font-weight: 500; }

.pub-year-group { margin-top: 28px; }
.pub-year-head {
  font-family: var(--font-sans); font-size: .85rem; font-weight: 600; letter-spacing: .06em;
  color: var(--teal); margin: 0 0 4px;
}
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-item { padding: 14px 0 16px; border-bottom: 1px solid var(--border); }
.pub-item:last-child { border-bottom: none; }
.pub-head { display: flex; align-items: baseline; gap: 10px; }
.pub-badge {
  flex-shrink: 0; position: relative; top: -2px;
  font-family: var(--font-sans); font-size: .64rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: 1px 7px; border-radius: 4px; background: var(--teal-soft); color: var(--teal-strong);
}
.pub-badge--conference { background: #e7ecfb; color: #1f3a8a; }
.pub-badge--preprint { background: #f1e9fa; color: #5f378f; }
.pub-badge--thesis { background: #f6eedf; color: #7a5310; }
[data-theme="dark"] .pub-badge { color: var(--teal); }
[data-theme="dark"] .pub-badge--conference { background: #24304f; color: #b8c7ff; }
[data-theme="dark"] .pub-badge--preprint { background: #2e2340; color: #cdb0f2; }
[data-theme="dark"] .pub-badge--thesis { background: #3a2f1c; color: #e8c88a; }
.pub-title { font-size: 1.02rem; line-height: 1.45; margin: 0 0 4px; }
.pub-authors { color: var(--text-muted); font-size: .95rem; margin: 0; }
.pub-authors strong { color: var(--text); font-weight: 600; }
.pub-venue { font-size: .92rem; color: var(--text-muted); margin: 0; }
.pub-venue em { color: var(--text); }
.pub-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pub-link {
  font-family: var(--font-sans); font-size: .76rem; font-weight: 500;
  padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.pub-link:hover { border-color: var(--teal); color: var(--teal-strong); background: var(--teal-soft); }
[data-theme="dark"] .pub-link:hover { color: var(--teal); }
.pub-empty { color: var(--text-muted); }

/* ==========================================================
   CV
   ========================================================== */
.page-wide { max-width: 1000px; }
.cv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-viewer {
  display: block; width: 100%; height: 85vh; min-height: 600px; margin-top: 8px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--hover);
}
.cv-fallback { margin-top: 12px; font-family: var(--font-sans); font-size: .85rem; color: var(--text-muted); }

/* ==========================================================
   Awards & Grants
   ========================================================== */
.award-grid {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.award-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  overflow: hidden; transition: border-color .25s ease, box-shadow .25s ease;
}
.award-card:hover, .award-card:has(.award-toggle:focus-visible), .award-card.is-open {
  border-color: color-mix(in srgb, var(--teal) 45%, var(--border));
  box-shadow: 0 4px 14px rgba(0, 0, 0, .05);
}

.award-toggle {
  display: block; width: 100%; padding: 0; margin: 0;
  border: none; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.award-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; border-radius: 12px 12px 0 0; }

.award-media {
  display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--ivory); border-bottom: 1px solid var(--border);
}
.award-media img {
  width: 88%; height: 88%; object-fit: contain; border-radius: 6px;
  transition: transform .25s ease;
}
.award-media--empty {
  font-family: var(--font-sans); font-size: .82rem; font-style: italic; color: var(--placeholder-text);
  background: repeating-linear-gradient(45deg, var(--ivory), var(--ivory) 10px, var(--hover) 10px, var(--hover) 11px);
}

.award-meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 14px 16px 0;
}
.award-name { font-weight: 700; font-size: .98rem; line-height: 1.35; min-height: 2.7em; }
.award-name.placeholder { min-height: 0; }
.award-meta:has(.placeholder) { min-height: calc(14px + 2.7 * .98rem); }
.award-year { flex-shrink: 0; font-family: var(--font-sans); font-size: .8rem; font-weight: 600; color: var(--teal); }
.award-meta .placeholder { padding: 1px 6px; font-size: .85rem; }

/* Fixed height keeps cards from shifting when the description appears. */
.award-desc {
  height: 9.6em; margin: 0; padding: 8px 16px 16px; overflow: hidden;
  font-family: var(--font-sans); font-size: .84rem; line-height: 1.5; color: var(--text-muted);
  opacity: 0; transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
}
.award-desc.placeholder { margin: 6px 16px 16px; padding: 6px 8px; height: calc(9.6em - 22px); border-radius: 4px; }

.award-card.is-open .award-media img,
.award-card:has(.award-toggle:focus-visible) .award-media img { transform: scale(1.05); }
.award-card.is-open .award-desc,
.award-card:has(.award-toggle:focus-visible) .award-desc { opacity: 1; transform: none; }

@media (hover: hover) {
  .award-card:hover .award-media img { transform: scale(1.05); }
  .award-card:hover .award-desc { opacity: 1; transform: none; }
}

@media (max-width: 880px) {
  .award-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .award-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   Talks & Service
   ========================================================== */
.section { margin-top: 48px; }
.section:first-of-type { margin-top: 8px; }
.section-title { font-size: 1.4rem; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }

.entry-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.entry { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: baseline; }
.entry-year { font-family: var(--font-sans); font-size: .85rem; font-weight: 600; color: var(--teal); }
.entry-year.placeholder { justify-self: start; font-size: .75rem; }
.entry-title { font-weight: 600; margin: 0 0 2px; line-height: 1.45; }
.entry-meta { font-family: var(--font-sans); font-size: .9rem; color: var(--text-muted); margin: 0 0 6px; }
.entry .placeholder { display: table; }
.entry-topic { margin: 0; font-style: italic; font-size: .95rem; line-height: 1.5; }

.stat { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.stat-number { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--teal); }
.stat-label { font-family: var(--font-sans); color: var(--text-muted); }

.tag-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { font-family: var(--font-sans); font-size: .85rem; }
.tag-list li:not(.placeholder) {
  padding: 4px 10px; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal-strong);
}
[data-theme="dark"] .tag-list li:not(.placeholder) { color: var(--teal); }

.review-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: center;
  padding: 16px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--ivory);
}
.review-img { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; }
.review-card .stat { margin-bottom: 10px; gap: 10px; }
.review-card .stat-number { font-size: 1.9rem; }
.review-card .tag-list { margin: 0; }

.moments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.moment-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden;
}
.moment-grid { list-style: none; margin: 0; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.moment-photo {
  display: block; width: 100%; aspect-ratio: 1; padding: 0; border: none; border-radius: 6px;
  overflow: hidden; background: var(--ivory); cursor: zoom-in;
}
.moment-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.moment-photo:hover img, .moment-photo:focus-visible img { transform: scale(1.06); }
.moment-photo:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.moment-body { padding: 10px 14px 14px; }
.moment-title { font-size: .95rem; margin: 0 0 2px; }
.moment-meta { margin: 0; font-family: var(--font-sans); font-size: .8rem; color: var(--teal-strong); }
@media (max-width: 880px) { .moments { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .moments { grid-template-columns: 1fr; } }
[data-theme="dark"] .moment-meta { color: var(--teal); }
.moment-note { margin: 6px 0 0; font-family: var(--font-sans); font-size: .8rem; line-height: 1.5; color: var(--text-muted); }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px;
  background: rgba(10, 12, 12, .96);
}
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: min(1200px, 100%); }
.lightbox-img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; border-radius: 6px; }
.lightbox-caption { margin-top: 12px; font-family: var(--font-sans); font-size: .9rem; color: #e8e8e6; text-align: center; }
.lightbox-close, .lightbox-nav {
  display: grid; place-items: center; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.8rem; line-height: 1;
  transition: background .15s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, .25); }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; }
.lightbox-nav { flex-shrink: 0; width: 48px; height: 48px; }
.lightbox :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body.lightbox-open { overflow: hidden; }
/* ==========================================================
   Contact
   ========================================================== */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start;
  padding: 24px 0 40px;
}
.contact-intro .page-title { margin-bottom: 18px; }
.contact-lead { font-size: 1.15rem; line-height: 1.7; color: var(--text); max-width: 34ch; }
.contact-location {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-family: var(--font-sans); font-size: .9rem; color: var(--text-muted);
}
.contact-location svg { width: 16px; height: 16px; fill: none; stroke: var(--teal); stroke-width: 1.8; }

.contact-card {
  background: var(--ivory); border: 1px solid var(--border); border-radius: 14px;
  padding: 36px; font-family: var(--font-sans);
}
.contact-label {
  margin: 0 0 8px; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted);
}
.contact-email {
  display: block; font-size: 1.2rem; font-weight: 500; color: var(--text);
  text-decoration: none; overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--teal); }

.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.btn-teal, .btn-copy {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; font: inherit; font-size: .9rem; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn-teal { background: var(--teal); color: #fff; border: 1px solid var(--teal); }
.btn-teal:hover { background: var(--teal-strong); border-color: var(--teal-strong); }
[data-theme="dark"] .btn-teal { color: #10201d; }
.btn-copy { background: transparent; color: var(--text); border: 1px solid var(--border); font-size: .85rem; padding: 7px 12px; }
.btn-copy:hover { border-color: var(--teal); color: var(--teal); }
.btn-copy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.copy-status { font-size: .85rem; color: var(--teal); min-height: 1.2em; }

.contact-divider { border: none; border-top: 1px solid var(--border); margin: 28px 0 22px; }

.profile-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-grid a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  color: var(--text); font-size: .9rem; font-weight: 500; text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.profile-grid a:hover { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-strong); }
[data-theme="dark"] .profile-grid a:hover { color: var(--teal); }
.profile-grid svg { width: 17px; height: 17px; flex-shrink: 0; fill: var(--teal); }

.contact-card :focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  border-top: 1px solid var(--border); padding: 24px;
  text-align: center; color: var(--text-muted); font-family: var(--font-sans); font-size: .85rem;
}
.site-footer p { margin: 0; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { padding: 12px; }
  .theme-toggle { margin: 6px 0 0 6px; }
}

@media (max-width: 720px) {
  .intro { grid-template-columns: 1fr; gap: 24px; }
  .intro-photo-wrap { order: -1; width: 140px; height: 140px; }
  .explore { grid-template-columns: 1fr 1fr; margin-top: 40px; }
  .explore-card:last-child { grid-column: span 2; }
  .selected { margin-top: 56px; }
  .selected-grid { grid-template-columns: 1fr; gap: 40px; }
  .page-inner { padding-top: 40px; }
  .cv-viewer { height: 70vh; min-height: 420px; }
  .pub-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pub-badge { top: 0; }
  .review-card { grid-template-columns: 64px 1fr; gap: 14px; padding: 14px; align-items: start; }
  .review-img { width: 64px; height: 64px; }
  .lightbox { padding: 12px; gap: 0; }
  .lightbox-nav { position: absolute; bottom: 20px; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
  .lightbox-img { max-height: calc(100vh - 160px); }
  .entry { grid-template-columns: 1fr; gap: 2px; }
  .contact-layout { grid-template-columns: 1fr; gap: 36px; padding-top: 0; }
  .contact-card { padding: 24px; }
  .contact-email { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .award-card .award-media img { transform: none !important; }
  .award-desc { transform: none !important; }
  .moment-photo img { transform: none !important; }
}
