/* abhishekkar.info — one stylesheet, light + dark. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #16181d;
  --muted: #5d6270;
  --faint: #8a8f9c;
  --line: #e7e4dc;
  --accent: #2346d6;
  --accent-soft: #e9edfc;
  --award: #a4401b;
  --award-soft: #fbece4;
  --radius: 14px;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --ink: #eceef2;
    --muted: #a3a8b4;
    --faint: #7a808d;
    --line: #262a33;
    --accent: #8ea4ff;
    --accent-soft: #1d2440;
    --award: #f2a37f;
    --award-soft: #33221a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font: 500 19px var(--serif); color: var(--ink); }
.topbar nav { display: flex; gap: 22px; font-size: 14px; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--ink); text-decoration: none; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1fr 280px; gap: 56px; align-items: center;
  padding: 72px 0 24px;
}
.eyebrow { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.hero h1 {
  font: 400 clamp(32px, 4.6vw, 50px)/1.1 var(--serif);
  letter-spacing: -.015em; margin-bottom: 24px; text-wrap: balance;
}
.bio p { color: var(--muted); font-size: 17px; margin-bottom: 14px; max-width: 62ch; }
.bio strong { color: var(--ink); font-weight: 600; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.hero-photo { margin: 0; }
.hero-photo img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  border-radius: 20px; border: 1px solid var(--line);
}

/* Sections */
.section { padding: 56px 0 24px; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font: 400 32px/1.2 var(--serif); letter-spacing: -.01em; margin-bottom: 6px; }
.section-head p { color: var(--muted); max-width: 64ch; }
h3.sub { font: 400 24px var(--serif); margin: 56px 0 8px; }

/* Shipped */
.ship-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ship {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.ship-media { aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.ship-media img, .ship-media video { width: 100%; height: 100%; object-fit: cover; }
.ship-tile {
  height: 100%; display: grid; place-items: center;
  background: radial-gradient(120% 120% at 0% 0%, var(--accent-soft), var(--surface) 70%);
  font: 400 26px var(--serif); color: var(--faint);
}
.ship-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ship-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); letter-spacing: .03em; }
.ship-meta .org { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.ship h3 { font: 500 19px/1.3 var(--serif); }
.ship h3 a { color: var(--ink); }
.ship p { font-size: 14.5px; color: var(--muted); }

/* Selected research */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.feature:hover { text-decoration: none; }
.feature:hover h3 { color: var(--accent); }
.feature-media {
  aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
}
.feature-media img, .feature-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.feature:hover .feature-media img, .feature:hover .feature-media video { transform: scale(1.03); }
.feature-venue { font-size: 12px; color: var(--faint); letter-spacing: .03em; }
.feature-venue em { font-style: normal; color: var(--award); }
.feature h3 { font: 500 16.5px/1.35 var(--serif); }

/* Publication list */
.year-group { display: grid; grid-template-columns: 72px 1fr; gap: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.year { font: 400 20px var(--serif); color: var(--faint); padding-top: 18px; }
.pub { display: grid; grid-template-columns: 136px 1fr; gap: 20px; padding: 18px 0; }
.pub + .pub { border-top: 1px dashed var(--line); }
.pub-media { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.pub-media img, .pub-media video { width: 100%; height: 100%; object-fit: contain; }
.pub-title { font: 500 17px/1.35 var(--sans); margin-bottom: 4px; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--accent); }
.pub-authors { font-size: 14px; color: var(--muted); }
.pub-authors strong { color: var(--ink); font-weight: 600; }
.authors-long summary { cursor: pointer; list-style: none; }
.authors-long summary::-webkit-details-marker { display: none; }
.authors-long[open] summary { display: none; }
.more { color: var(--accent); white-space: nowrap; }
.pub-venue { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; font-style: italic; margin-top: 2px; }
.badge {
  font-style: normal; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  color: var(--award); background: var(--award-soft); padding: 2px 8px; border-radius: 999px;
}
.pub-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: flex-start; }
.chip {
  font: 400 12.5px var(--sans); padding: 3px 10px; border-radius: 6px; border: 0; cursor: pointer;
  background: var(--accent-soft); color: var(--accent);
}
.chip:hover { text-decoration: none; filter: brightness(.97); }
.chip[aria-expanded="true"] { background: var(--accent); color: var(--surface); }
p.drawer { font-size: 14px; color: var(--muted); padding: 10px 0 2px; max-width: 75ch; }
.bib { position: relative; }
.bib pre {
  margin: 8px 0 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; font-size: 12.5px; line-height: 1.5; overflow-x: auto;
}
.copy {
  position: absolute; top: 16px; right: 8px; font: 500 12px var(--sans);
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  border-radius: 6px; padding: 3px 8px; cursor: pointer;
}

/* Career + honors */
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.tl-dates { font-size: 13px; color: var(--faint); padding-top: 3px; }
.timeline h3 { font: 500 18px var(--serif); }
.tl-title { font-size: 14.5px; }
.tl-sum { font-size: 14px; color: var(--muted); }
.honors { margin: 0; padding: 0; list-style: none; }
.honors li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0 40px; font-size: 13px; color: var(--faint); }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Responsive */
@media (max-width: 900px) {
  .ship-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .hero-photo { order: -1; width: 140px; }
  .topbar nav { gap: 14px; }
  .ship-grid { grid-template-columns: 1fr; }
  .year-group { grid-template-columns: 1fr; gap: 0; }
  .year { padding-top: 12px; }
  .pub { grid-template-columns: 96px 1fr; gap: 14px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .feature-media img, .feature-media video { transition: none; }
}
