/* sandupal.github.io: a clean academic layout in the spirit of the al-folio theme.
   Light and dark palettes follow the reader's system setting. */

:root {
  --bg: #ffffff;
  --text: #1f2328;
  --muted: #5f6670;
  --rule: #e3e6ea;
  --accent: #0a5c8a;          /* deep ocean blue */
  --accent-soft: #e8f1f7;
  --panel: #f6f8fa;
  --heading: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Literata", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --width: 50rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121418;
    --text: #e4e6ea;
    --muted: #a0a7b1;
    --rule: #2a2f36;
    --accent: #6cb6e3;
    --accent-soft: #1b2a36;
    --panel: #1a1d22;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.05rem/1.65 var(--body);
}
.wrap { max-width: var(--width); margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.25; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: .4rem .7rem; z-index: 10; }

/* ---------- top navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; flex-wrap: wrap; }
.nav-name { font-family: var(--heading); font-size: 1.15rem; color: var(--text); font-weight: 400; }
.nav-name strong { font-weight: 700; }
.nav-links { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; font-family: var(--heading); font-size: .98rem; }
.nav-links a { color: var(--muted); padding: .2rem 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

main.wrap { padding-top: 3.25rem; padding-bottom: 3rem; }

/* ---------- page heading ---------- */
.page-head { margin-bottom: 2rem; }
.page-head h1 { font-size: 2.6rem; font-weight: 300; margin: 0 0 .3rem; }
.page-head h1 strong { font-weight: 700; }
.page-head .desc { color: var(--muted); margin: 0; font-size: 1rem; }

section { margin-top: 2.8rem; }
section > h2 {
  font-size: 1.45rem; font-weight: 600; text-transform: lowercase;
  color: var(--accent); margin: 0 0 1rem;
}
section > h2 a { color: inherit; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 .4rem; }
h3.year { color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--rule); padding-bottom: .2rem; }

/* ---------- about ---------- */
.about::after { content: ""; display: block; clear: both; }
.profile { float: right; width: 13.5rem; margin: 0 0 1rem 1.75rem; text-align: center; }
.profile img { border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.12); display: block; width: 100%; }
.profile figcaption { font-family: var(--heading); font-size: .85rem; color: var(--muted); line-height: 1.45; margin-top: .7rem; }
.about p { margin: 0 0 1rem; }
.availability { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: .55rem .9rem; border-radius: 0 4px 4px 0; }
.interests { font-size: .95rem; color: var(--muted); }
.interests .label { font-family: var(--heading); font-weight: 600; color: var(--text); }

/* ---------- news ---------- */
table.news { width: 100%; border-collapse: collapse; }
.news th { text-align: left; vertical-align: top; white-space: nowrap; width: 9.5rem; padding: .45rem 1rem .45rem 0;
  font-family: var(--heading); font-weight: 500; font-size: .92rem; color: var(--muted); }
.news td { padding: .45rem 0; vertical-align: top; }
.news tr + tr th, .news tr + tr td { border-top: 1px solid var(--rule); }
.news-photo { margin: .6rem 0 .2rem; max-width: 22rem; }
.news-photo img { border-radius: 4px; }
.news-photo figcaption { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.more-news { margin-top: .6rem; }
.more-news summary { cursor: pointer; font-family: var(--heading); color: var(--accent); font-size: .95rem; }

/* ---------- publications ---------- */
ol.pubs { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.1rem; padding: .9rem 0; }
.pub + .pub { border-top: 1px solid var(--rule); }
.pub-badge img { border-radius: 4px; display: block; }
.abbr { display: inline-block; min-width: 5.5rem; text-align: center; padding: .25rem .5rem;
  background: var(--accent); color: var(--bg); border-radius: 3px;
  font-family: var(--heading); font-size: .82rem; font-weight: 600; letter-spacing: .02em; }
.pub-title { font-family: var(--heading); font-weight: 600; margin: 0 0 .2rem; line-height: 1.35; }
.pub-authors { margin: 0; font-size: .96rem; }
.pub-authors strong { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.pub-venue { margin: .1rem 0 0; color: var(--muted); font-size: .94rem; }
.pub-body { min-width: 0; }
.pub-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .4rem; margin-top: .5rem; }
.pub-links details { display: inline-block; }
.pub-links details[open] { flex-basis: 100%; }
.btn, .pub-links summary {
  display: inline-block; list-style: none; cursor: pointer;
  border: 1px solid var(--accent); color: var(--accent); border-radius: 3px;
  padding: .05rem .55rem; font-family: var(--heading); font-size: .78rem; font-weight: 600; line-height: 1.6;
}
.pub-links summary::-webkit-details-marker { display: none; }
.btn:hover, .pub-links summary:hover, .pub-links details[open] > summary { background: var(--accent); color: var(--bg); text-decoration: none; }
.pub-panel { margin-top: .4rem; padding: .7rem .9rem; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 4px; font-size: .92rem; }
.pub-panel p { margin: 0; }
.pub-panel pre { margin: 0; overflow-x: auto; font: .8rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* talks */
ul.talks { list-style: none; margin: 0; padding: 0; }
.talks li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.1rem; padding: .8rem 0; }
.talks li + li { border-top: 1px solid var(--rule); }
.talk-when { font-family: var(--heading); font-size: .9rem; color: var(--muted); padding-top: .1rem; }

/* ---------- research cards ---------- */
.projects { display: grid; gap: 1.2rem; }
.card { border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: var(--bg);
  transition: box-shadow .15s ease, transform .15s ease; }
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.card-img { display: block; width: 100%; max-height: 14rem; object-fit: cover; }
.card-body { padding: 1rem 1.2rem 1.1rem; }
.card-title { font-size: 1.15rem; margin: 0; color: var(--text); text-transform: none; }
.card-meta { font-family: var(--heading); font-size: .85rem; color: var(--muted); margin: .2rem 0 .6rem; }
.card-body p:last-child { margin-bottom: 0; }

/* ---------- experience ---------- */
ol.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.1rem; padding: .9rem 0; }
.timeline > li + li { border-top: 1px solid var(--rule); }
.tl-dates { font-family: var(--heading); font-size: .9rem; color: var(--muted); margin: .15rem 0 0; }
.timeline h3 { margin: 0; }
.unit { margin: .1rem 0 .3rem; color: var(--muted); font-style: italic; }
.note { margin: .2rem 0 0; font-size: .95rem; }
.timeline ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.timeline ul li { margin: .2rem 0; }
ul.plain { padding-left: 1.1rem; }
.wide-photo { margin: 1.5rem 0 0; }
.wide-photo img { border-radius: 4px; }
.wide-photo figcaption { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 1.6rem 0 2rem; text-align: center;
  font-family: var(--heading); font-size: .85rem; color: var(--muted); }
.social { display: flex; justify-content: center; gap: 1.1rem; list-style: none; margin: 0 0 .7rem; padding: 0; }
.social a { color: var(--muted); }
.social a:hover { color: var(--accent); }
.icon { display: block; }
.site-footer p { margin: 0; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .page-head h1 { font-size: 2rem; }
  .nav-links { gap: .9rem; font-size: .92rem; }
  .profile { float: none; width: 11rem; margin: 0 auto 1.4rem; }
  .pub, .talks li, .timeline > li { grid-template-columns: 1fr; gap: .35rem; }
  .news th { width: auto; display: block; padding-bottom: 0; }
  .news td { display: block; padding-top: .1rem; }
  .news tr + tr td { border-top: 0; }
}
