/* sodhaniaditya.com — stylesheet
   Plain CSS, no build step. Edit freely. */

:root {
  --bg: #fdfcfa;
  --bg-elev: #ffffff;
  --text: #1b1b1b;
  --muted: #5e5e5e;
  --faint: #8a8a8a;
  --rule: #e6e2dc;
  --accent: #7a0019;        /* University of Minnesota maroon */
  --accent-soft: #f6e9ec;
  --link: #7a0019;
  --thumb-bg: #ffffff;
  --code-bg: #f4f2ee;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 860px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131313;
    --bg-elev: #1c1c1c;
    --text: #ebe8e2;
    --muted: #b3afa8;
    --faint: #8d8983;
    --rule: #2e2c29;
    --accent: #f0a3b4;
    --accent-soft: #2a1a1f;
    --link: #f0a3b4;
    --thumb-bg: #f4f2ee;
    --code-bg: #1f1e1c;
  }
}
:root[data-theme="dark"] {
  --bg: #131313;
  --bg-elev: #1c1c1c;
  --text: #ebe8e2;
  --muted: #b3afa8;
  --faint: #8d8983;
  --rule: #2e2c29;
  --accent: #f0a3b4;
  --accent-soft: #2a1a1f;
  --link: #f0a3b4;
  --thumb-bg: #f4f2ee;
  --code-bg: #1f1e1c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: 2.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.55rem; margin: 2.6rem 0 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--rule); }
h3 { font-size: 1.15rem; margin: 0 0 0.25rem; }
p { margin: 0 0 1rem; }
strong { font-weight: 600; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Top navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 52px; }
.nav .brand { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--text); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.1rem; font-size: 0.95rem; }
.nav li a { color: var(--muted); }
.nav li a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 640px) {
  .nav .brand { display: none; }
  .nav .wrap { justify-content: flex-start; padding: 0; }
  .nav ul { gap: 0.9rem; font-size: 0.9rem; overflow-x: auto; white-space: nowrap; padding: 0 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav ul::-webkit-scrollbar { display: none; }
  .nav li:last-child { padding-right: 20px; }
}

/* Header / intro */
.intro { display: grid; grid-template-columns: 1fr 240px; gap: 2.4rem; align-items: start; padding-top: 2.8rem; }
.intro .photo { width: 240px; height: 240px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 14px rgba(0,0,0,0.12); }
.intro .title { color: var(--muted); font-size: 1.1rem; margin: 0.35rem 0 1.2rem; }
.intro .title a { color: var(--muted); border-bottom: 1px dotted var(--faint); }
.intro .title a:hover { color: var(--accent); text-decoration: none; }
.links { display: flex; flex-wrap: wrap; gap: 0.45rem 0.6rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.links a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.32rem 0.75rem; border: 1px solid var(--rule); border-radius: 999px;
  font-size: 0.92rem; color: var(--text); background: var(--bg-elev);
}
.links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.links svg { width: 15px; height: 15px; fill: currentColor; }
@media (max-width: 700px) {
  .intro { grid-template-columns: 1fr; gap: 1.4rem; padding-top: 2rem; }
  .intro picture { order: -1; }
  .intro .photo { width: 160px; height: 160px; }
  h1 { font-size: 2.1rem; }
}

/* News */
.news { list-style: none; margin: 0; padding: 0; }
.news li { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--rule); }
.news li:last-child { border-bottom: 0; }
.news time { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 0.95rem; padding-top: 1px; }
@media (max-width: 480px) { .news li { grid-template-columns: 1fr; gap: 0; } }

/* Research threads */
.thread { display: grid; grid-template-columns: 1fr 260px; gap: 1.8rem; align-items: start; margin: 1.6rem 0 2rem; }
.thread figure { margin: 0; }
.thread figure img, .thread figure svg { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--rule); background: var(--thumb-bg); }
.thread figure svg { background: var(--bg-elev); padding: 6px; }
.thread figcaption { font-size: 0.82rem; color: var(--faint); margin-top: 0.4rem; line-height: 1.4; }
.thread p:last-child { margin-bottom: 0; }
@media (max-width: 700px) { .thread { grid-template-columns: 1fr; gap: 1rem; } .thread figure { max-width: 420px; } }

/* Publications */
.pub { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; padding: 1.3rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.pub:last-of-type { border-bottom: 0; }
.pub .thumb img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); background: var(--thumb-bg); }
.pub .ptitle { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.3; }
.pub .ptitle a { color: var(--text); }
.pub .ptitle a:hover { color: var(--accent); }
.pub .authors { margin: 0.25rem 0 0; color: var(--muted); }
.pub .authors b { color: var(--text); font-weight: 600; }
.pub .venue { margin: 0.15rem 0 0.55rem; color: var(--muted); font-style: italic; }
.pub .venue .badge { font-style: normal; font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 0.1rem 0.5rem; border-radius: 4px; margin-left: 0.4rem; vertical-align: 1px; }
.pub .summary { margin: 0.5rem 0 0; font-size: 0.97rem; }
.plinks { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.92rem; margin: 0.1rem 0 0; }
.plinks details { display: inline; }
.plinks summary { display: inline; cursor: pointer; color: var(--link); list-style: none; }
.plinks summary::-webkit-details-marker { display: none; }
.plinks summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.plinks pre { grid-column: 1 / -1; width: 100%; }
.pub pre {
  margin: 0.7rem 0 0; padding: 0.75rem 0.9rem; font-family: var(--mono); font-size: 0.78rem; line-height: 1.45;
  background: var(--code-bg); border: 1px solid var(--rule); border-radius: 6px; overflow-x: auto; white-space: pre;
}
@media (max-width: 640px) { .pub { grid-template-columns: 1fr; gap: 0.8rem; } .pub .thumb { max-width: 300px; } }

/* Generic lists (talks, awards, experience, education) */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 0.5rem 0; border-bottom: 1px dashed var(--rule); }
.list li:last-child { border-bottom: 0; }
.list .when { color: var(--faint); font-size: 0.92rem; float: right; margin-left: 1rem; font-variant-numeric: tabular-nums; }
.list .where { color: var(--muted); }
.list .note { display: block; color: var(--muted); font-size: 0.95rem; margin-top: 0.1rem; }
@media (max-width: 480px) { .list .when { float: none; display: block; margin: 0; } }

/* Contact & footer */
.contact p { margin-bottom: 0.4rem; }
footer { margin: 3.5rem 0 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--faint); font-size: 0.88rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
footer button { background: none; border: 1px solid var(--rule); color: var(--faint); border-radius: 999px; padding: 0.15rem 0.7rem; font: inherit; cursor: pointer; }
footer button:hover { color: var(--accent); border-color: var(--accent); }

@media print {
  .nav, footer button { display: none; }
  body { font-size: 11pt; }
  a { color: inherit; }
}
