/* ===========================================================
   Vaishnavi Khindkar — academic website
   Clean, minimal design inspired by al-folio & Zhengyang Geng
   =========================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f9;
  --bg-card: #ffffff;
  --border: #ececf1;
  --text: #1c1d22;
  --text-soft: #5a5d6b;
  --text-mute: #8b8e9c;
  --accent: #5b54e6;
  --accent-soft: #efedfd;
  --accent-2: #e26d5c;
  --badge-grad: linear-gradient(135deg, #6a5cf0 0%, #8b7bf5 100%);
  --shadow: 0 1px 2px rgba(16, 17, 33, .04), 0 8px 24px rgba(16, 17, 33, .05);
  --shadow-hover: 0 4px 10px rgba(16, 17, 33, .08), 0 16px 40px rgba(16, 17, 33, .10);
  --radius: 10px;
  --maxw: 1010px;
}

html[data-theme="dark"] {
  --bg: #0f1117;
  --bg-soft: #161922;
  --bg-card: #161922;
  --border: #262a36;
  --text: #e9eaf0;
  --text-soft: #b2b6c5;
  --text-mute: #7b8093;
  --accent: #9b90ff;
  --accent-soft: #20203a;
  --accent-2: #f0876f;
  --badge-grad: linear-gradient(135deg, #7d6ff5 0%, #a394ff 100%);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-hover: 0 4px 10px rgba(0,0,0,.5), 0 16px 40px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; font-size: 15px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease, opacity .15s ease; }
a:hover { color: var(--accent-2); }

::selection { background: var(--accent-soft); }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-name { font-weight: 700; letter-spacing: -.01em; font-size: 1.02rem; color: var(--text); }
.nav-name:hover { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  color: var(--text-soft); font-size: .9rem; font-weight: 500;
  position: relative;
}
.nav-links a:hover { color: var(--accent); }
.theme-toggle {
  background: none; border: 1px solid var(--border); color: var(--text-soft);
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; font-size: 1rem; transition: all .2s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.nav-burger { display: none; background:none; border:none; color: var(--text); font-size:1.4rem; cursor:pointer; }

/* ---------------- Layout ---------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 34px; }
section { padding: 40px 0 4px; }
.section-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--text); margin: 0 0 20px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ---------------- Hero ---------------- */
.intro { padding-top: 52px; }
.intro::after { content: ""; display: block; clear: both; }
.intro-photo {
  float: right; width: 240px; margin: 6px 0 24px 60px; text-align: center;
}
.intro h1, .hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.3rem, 5vw, 3.1rem); font-weight: 600; line-height: 1.05;
  margin: 0 0 30px; letter-spacing: -.015em; color: var(--text);
}
.intro .affil {
  color: var(--text); font-size: 1.12rem; font-weight: 500; margin: 10px 0 22px;
  line-height: 1.5;
}
.intro .affil a { font-weight: 600; }
.intro .affil-sub {
  display: block; color: var(--text-mute); font-size: .92rem; font-weight: 400;
  margin-top: 2px;
}
.intro .affil-sub:first-of-type { margin-top: 8px; }
.intro .affil-sub a { font-weight: 500; }
.hero-photo {
  flex: 0 0 auto; width: 200px; height: 200px; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--border);
}
.photo-contact { margin-top: 16px; text-align: center; }
.intro-photo .email-line {
  margin: 2px 0 14px; line-height: 1.65; text-align: center;
}
.email-label { color: var(--text-mute); font-size: .82rem; margin-right: 5px; }
.email-scramble {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-soft); font-size: .8rem; letter-spacing: .005em;
  white-space: nowrap;
}
.unscramble {
  display: block; margin: 5px auto 0;
  background: none; border: none; color: var(--accent); font: inherit;
  font-size: .76rem; cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
}
.unscramble:hover { color: var(--accent-2); }
.intro-photo .socials { justify-content: center; margin-top: 0; gap: 10px; }
.intro-photo .socials a {
  padding: 0; width: 38px; height: 38px; justify-content: center;
  color: var(--text-mute); transition: color .18s ease, border-color .18s ease,
    transform .18s ease, box-shadow .18s ease;
}
.intro-photo .socials svg { width: 19px; height: 19px; }

/* social row */
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.socials a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-soft); font-size: .86rem; font-weight: 500; background: var(--bg-card);
}
.socials a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.socials svg { width: 16px; height: 16px; }

/* ---------------- About ---------------- */
.about p { color: var(--text-soft); margin: 0 0 16px; }
.about strong { color: var(--text); font-weight: 600; }

/* Justify body prose for a clean, formatted look */
.about p, .research p, .research .lead-text, .pub-note,
.card p, .blog-card p, .tl-desc, .personal-note {
  text-align: justify; text-justify: inter-word; hyphens: none;
}
/* Lighter, airier long-form prose */
.about p, .research p, .research .lead-text {
  font-size: .95rem; line-height: 1.75; color: var(--text-soft);
}
.personal-note {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 4px 0 16px;
  font-size: .96rem; color: var(--text-soft);
}
.exp-foot { font-size: .9rem; color: var(--text-mute); margin: 14px 0 0; font-style: italic; }
.term {
  border-bottom: 1px dotted var(--text-mute);
  color: var(--text); transition: color .15s ease, border-color .15s ease;
}
.term:hover, .term:focus-visible { color: var(--accent); border-bottom-color: var(--accent); outline: none; }

/* interests chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  padding: 6px 13px; border-radius: 999px; font-size: .82rem; font-weight: 500;
  background: var(--accent-soft); color: var(--accent); border: 1px solid transparent;
  white-space: nowrap;
}

/* ---- Research interests block ---- */
.interests {
  margin: 30px 0 4px; padding-top: 22px; border-top: 1px solid var(--border);
}
.interests-label {
  display: block; margin-bottom: 14px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--text);
}
.interests .chips { flex-wrap: wrap; gap: 10px; margin-top: 0; }
.interests .chip {
  padding: 7px 15px; font-size: .84rem;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.interests .chip:hover {
  background: var(--accent); color: #fff;
  transform: translateY(-2px); box-shadow: var(--shadow);
}

/* ---------------- Research narrative ---------------- */
.research p { color: var(--text-soft); margin: 0 0 16px; font-size: .95rem; }
.research p:last-child { margin-bottom: 0; }
.research p strong { color: var(--text); font-weight: 600; }
.math { font-family: "Fraunces", Georgia, serif; font-style: italic; white-space: nowrap; color: var(--text); }
.research .lead-text { color: var(--text-soft); margin: 0 0 24px; font-size: .95rem; }
.research .lead-text strong { color: var(--text); font-weight: 600; }
.lenses { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; }
.lens { padding: 0; }
.lens h3 {
  margin: 0 0 7px; font-size: 1.0rem; font-weight: 650; color: var(--text);
  display: flex; align-items: center; gap: 9px;
}
.lens h3 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--badge-grad); flex: 0 0 auto; }
.lens p { margin: 0; font-size: .92rem; color: var(--text-soft); line-height: 1.6; }
.lens-meta { display: block; margin-top: 6px; font-size: .82rem; color: var(--text-mute); }

/* ---------------- News ---------------- */
.news { list-style: none; padding: 0; margin: 0; max-height: 290px; overflow-y: auto; }
.news li { display: flex; gap: 16px; padding: 11px 2px; border-bottom: 1px dashed var(--border); }
.news li:last-child { border-bottom: none; }
.news .date {
  flex: 0 0 92px; font-size: .8rem; font-weight: 600; color: var(--accent);
  font-variant-numeric: tabular-nums; padding-top: 1px;
}
.news .item { color: var(--text-soft); font-size: .95rem; }
.news::-webkit-scrollbar { width: 6px; }
.news::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

/* ---------------- Publications ---------------- */
.pub {
  display: flex; gap: 36px; padding: 32px 0; margin: 0;
  border-bottom: 1px solid var(--border);
}
.pub:last-child { border-bottom: none; }
.pub-badge {
  flex: 0 0 380px; width: 380px; height: 220px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 8px;
}
.pub-thumb {
  flex: 0 0 300px; width: 300px; height: 195px; object-fit: cover;
  object-position: center; align-self: flex-start; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-soft);
}
.pub-venue-tag {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-soft); background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 6px; margin: 0 8px 0 0;
  vertical-align: middle;
}
.pub-badge .venue { font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.pub-badge .year { font-size: .8rem; opacity: .92; margin-top: 2px; }
.pub-badge .kind { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; opacity: .85; margin-top: 4px; }
.pub-body { flex: 1 1 auto; min-width: 0; }
.pub-title { font-weight: 650; font-size: 1.04rem; line-height: 1.35; margin: 0 0 5px; color: var(--text); }
.pub-authors { font-size: .9rem; color: var(--text-soft); margin: 0 0 4px; }
.pub-authors .me { color: var(--text); font-weight: 700; }
.pub-venue { font-size: .88rem; color: var(--text-mute); font-style: italic; margin: 0 0 6px; }
.pub-note { font-size: .86rem; color: var(--text-soft); margin: 6px 0 10px; }
.pub-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.pub-links a {
  font-size: .85rem; font-weight: 600; color: var(--accent);
}
.pub-links a::before { content: "["; color: var(--text-mute); font-weight: 500; margin-right: 1px; }
.pub-links a::after { content: "]"; color: var(--text-mute); font-weight: 500; margin-left: 1px; }
.pub-links a:hover { color: var(--accent-2); }

.pub-profile-links { margin: -10px 0 18px; font-size: .88rem; }
.pub-profile-links a { font-weight: 600; }
.pub-soon { font-size: .76rem; font-weight: 600; color: var(--text-mute); padding: 4px 0; font-style: italic; }

.subhead { font-size: 1.05rem; font-weight: 650; margin: 26px 0 10px; color: var(--text); }
.patents li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; }
.patents .pat-meta { font-size: .82rem; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.patents .pat-meta a { font-weight: 600; }

/* ---------------- Experience / Timeline ---------------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border);
}
.tl-item { position: relative; margin-bottom: 26px; }
.tl-item::before {
  content: ""; position: absolute; left: -27px; top: 5px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.tl-role { font-weight: 650; font-size: 1.02rem; color: var(--text); }
.tl-date { font-size: .82rem; color: var(--text-mute); font-weight: 500; white-space: nowrap; }
.tl-org { font-size: .92rem; color: var(--accent); font-weight: 500; margin: 1px 0 5px; }
.tl-desc { font-size: .92rem; color: var(--text-soft); margin: 0; }

/* ---------------- Projects ---------------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 36px; }
.card {
  padding: 0 0 4px; border-bottom: 1px solid var(--border);
}
.card h3 { margin: 0 0 4px; font-size: 1.0rem; font-weight: 650; color: var(--text); }
.card .advisor { font-size: .82rem; color: var(--accent); font-weight: 500; margin-bottom: 8px; }
.card p { margin: 0; font-size: .9rem; color: var(--text-soft); }

/* collapsible "earlier projects" */
.more-projects { margin-top: 26px; }
.more-projects > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  font-size: .88rem; font-weight: 600; color: var(--accent); width: fit-content;
  transition: color .15s ease;
}
.more-projects > summary::-webkit-details-marker { display: none; }
.more-projects > summary:hover { color: var(--accent-2); }
.more-projects > summary::after {
  content: "▾"; font-size: .8rem; transition: transform .2s ease;
}
.more-projects[open] > summary::after { transform: rotate(180deg); }
.more-projects > summary .mp-hide { display: none; }
.more-projects[open] > summary .mp-show { display: none; }
.more-projects[open] > summary .mp-hide { display: inline; }
.more-projects[open] .cards { margin-top: 22px; }

/* blog cards */
.blog-card { display: block; }
.blog-card h3 { transition: color .15s ease; }
.blog-card:hover h3 { color: var(--accent); }
.blog-tag {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: 2px 9px; border-radius: 6px; margin-bottom: 10px;
}
.blog-more { display: inline-block; margin-top: 12px; font-size: .84rem; font-weight: 600; color: var(--accent); }

/* ---------------- Two-column meta (education + service) ---------------- */
.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 38px; }
.meta-block h3 { font-size: .95rem; margin: 0 0 10px; color: var(--text); }
.meta-list { list-style: none; padding: 0; margin: 0; }
.meta-list li { font-size: .92rem; color: var(--text-soft); padding: 6px 0; border-bottom: 1px dashed var(--border); }
.meta-list li:last-child { border-bottom: none; }
.meta-list .lead { color: var(--text); font-weight: 600; }

/* structured education entry */
.edu-entry { padding: 2px 0 0; }
.edu-top { display: flex; justify-content: flex-start; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.edu-degree { font-weight: 650; font-size: 1.0rem; color: var(--text); }
.edu-date { font-size: .82rem; color: var(--text-mute); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.edu-school { font-size: .92rem; color: var(--accent); font-weight: 500; margin: 3px 0 0; }
.edu-sub { font-size: .85rem; color: var(--text-soft); margin: 3px 0 0; }
.edu-courses { font-size: .82rem; color: var(--text-mute); line-height: 1.6; margin: 11px 0 0; padding-top: 11px; border-top: 1px dashed var(--border); }
.edu-courses-label { display: block; color: var(--text-soft); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; font-size: .72rem; margin-bottom: 7px; }
.edu-course-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 5px 0;
}
.edu-course-list li {
  position: relative; padding-left: 15px; font-size: .83rem; color: var(--text-soft);
  line-height: 1.4;
}
.edu-course-list li::before {
  content: ""; position: absolute; left: 2px; top: .5em;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}

.skills { display: flex; flex-wrap: wrap; gap: 7px; }
.skills .chip { background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--border); }

/* ---------------- Footer ---------------- */
footer {
  margin-top: 50px; padding: 32px 0 44px; border-top: 1px solid var(--border);
  text-align: center; color: var(--text-mute); font-size: .85rem;
}
footer a { font-weight: 500; }
footer .socials { justify-content: center; margin-top: 16px; }

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
  .nav-links { display: none; position: absolute; top: 60px; right: 16px; left: 16px;
    flex-direction: column; align-items: flex-start; gap: 4px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 7px 0; width: 100%; }
  .nav-burger { display: block; }
  .nav-extra { display: flex; align-items: center; gap: 10px; }
  .intro-photo { float: none; width: 100%; margin: 0 0 22px; }
  .hero-photo { width: 160px; height: 160px; }
  .cards, .grid-2, .lenses { grid-template-columns: 1fr; }
  .pub { flex-direction: column; gap: 14px; }
  .pub-badge { flex: 0 0 auto; width: 100%; height: auto; flex-direction: row; gap: 10px; padding: 10px 14px; }
  .pub-badge .kind { margin-top: 0; }
  .pub-thumb { flex: 0 0 auto; width: 100%; height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
