/* ============================================================
   Lakshita Sharma — personal academic site
   Modern minimal. Light + dark theme aware. No dependencies.
   Edit the CSS variables below to re-color the whole site.
   ============================================================ */

:root {
  --accent:        #3b53c4;   /* links, highlights */
  --accent-soft:   #e8ecfb;   /* tinted backgrounds */
  --bg:            #ffffff;
  --bg-alt:        #f7f8fa;    /* section / card backgrounds */
  --text:          #1a1d24;    /* body text */
  --text-muted:    #5b6270;    /* secondary text */
  --border:        #e6e8ec;
  --maxw:          760px;      /* content column width */
  --radius:        12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent:      #93a4ff;
    --accent-soft: #1c2338;
    --bg:          #0f1116;
    --bg-alt:      #161922;
    --text:        #e7e9ee;
    --text-muted:  #9aa1b1;
    --border:      #262a35;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
  font-size: 1.05rem;
}
.nav-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 40px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 40px;
  align-items: start;
}
.hero-photo {
  width: 210px;
  height: 280px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.hero h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.hero .subtitle {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.hero p { margin: 0 0 16px; }

@media (max-width: 620px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
    gap: 24px;
    text-align: left;
  }
  .hero-photo { width: 150px; height: 200px; }
}

/* ---------- Contact / link chips ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.links a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- General sections ---------- */
main { padding-bottom: 80px; }

section { padding: 20px 0; }

h2 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 40px 0 4px;
}
h2:first-of-type { margin-top: 24px; }

.section-rule {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 8px 0 20px;
}

a { color: var(--accent); }

/* ---------- Paper / item cards ---------- */
.paper {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.paper:last-child { border-bottom: 0; }

.paper h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.4;
}
.paper .meta {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin: 0 0 10px;
}
.paper p { margin: 0 0 12px; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.paper-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.paper-links a { font-weight: 500; text-decoration: none; }
.paper-links a:hover { text-decoration: underline; }

.abstract {
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* ---------- CV button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: 10px;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.9; }

/* ---------- Teaching list ---------- */
.course {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.course:last-child { border-bottom: 0; }
.course h3 { margin: 0 0 2px; font-size: 0.97rem; }
.course .meta { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* ---------- Dated rows (education, presentations, awards) ---------- */
.row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.row:last-of-type { border-bottom: 0; }
.row-when { color: var(--text-muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); font-size: 0.88rem; }

/* ---------- References ---------- */
.refs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 32px;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .row { grid-template-columns: 1fr; gap: 2px; }
  .refs { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 48px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Helper to flag unfinished placeholder text while you edit.
   Delete the .todo spans (or this rule) before publishing. */
.todo {
  background: #fff2a8;
  color: #6b5900;
  padding: 0 4px;
  border-radius: 3px;
}
@media (prefers-color-scheme: dark) {
  .todo { background: #4a3f00; color: #ffe89a; }
}
.hero .market { margin-top: 22px; font-weight: 600; }
.inst { font-size: 1.02rem; margin: 6px 0 2px; }
.course h3 { font-weight: 500; }
.abstract { text-align: justify; }

/* Abstract / Draft toggles under a paper */
.toggles { display: flex; gap: 22px; margin-top: 8px; }
.toggle { background: none; border: 0; padding: 0; font: inherit; font-size: 0.92rem; font-weight: 500; color: var(--accent); cursor: pointer; }
.toggle::before { content: "\25B8\00a0"; }
.toggle[aria-expanded="true"]::before { content: "\25BE\00a0"; }
.toggle:hover { text-decoration: underline; }
.panel { margin-top: 10px; }
