/* ===================================================================
   Shivangi Tripathi — Personal Academic Website
   Light theme · DM Serif Display + Source Sans 3
   =================================================================== */

:root {
  --bg: #faf9f7;
  --bg-warm: #f5f3ef;
  --panel: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #4a4a68;
  --muted: #6b6b88;
  --border: rgba(26, 26, 46, 0.08);
  --border-strong: rgba(26, 26, 46, 0.14);

  --accent: #1d4ed8;
  --accent-soft: rgba(29, 78, 216, 0.07);
  --accent-mid: rgba(29, 78, 216, 0.14);

  --green: #15803d;
  --green-soft: rgba(21, 128, 61, 0.07);
  --green-mid: rgba(21, 128, 61, 0.14);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.07), 0 4px 12px rgba(0, 0, 0, 0.04);

  --radius: 14px;
  --radius-lg: 20px;

  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 500px at 10% -5%, rgba(29, 78, 216, 0.04), transparent 60%),
    radial-gradient(ellipse 700px 400px at 95% -5%, rgba(21, 128, 61, 0.04), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: #1e3a8a; text-decoration: underline; }

img { display: block; max-width: 100%; }

/* ── Container ─────────────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  width: min(1100px, 90vw);
  margin: 0 auto;
}

/* ── Banner ────────────────────────────────────────────────────────── */
.banner {
  background: var(--green-soft);
  border-bottom: 1px solid var(--green-mid);
}
.banner-inner {
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.banner-inner strong { color: var(--green); }
.banner-sep { color: var(--muted); opacity: 0.4; }

/* ── Topbar ────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-name {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--text);
  letter-spacing: -0.2px;
}
.brand-sub {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}

.nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 11px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a:hover {
  text-decoration: none;
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-cta {
  background: var(--accent-soft) !important;
  border: 1px solid var(--accent-mid);
  color: var(--accent) !important;
  border-radius: 999px !important;
  padding: 6px 16px !important;
}
.nav-cta:hover {
  background: var(--accent-mid) !important;
}

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

/* ── Scroll Animations ─────────────────────────────────────────────── */
.anim-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  padding: 56px 0 24px;
  align-items: start;
}

.hero-tag {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 22px;
  color: var(--text);
}
.hero h1 .accent {
  color: var(--accent);
}

.hero-lead {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}
.pill {
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text-secondary);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.pill:hover {
  border-color: var(--accent-mid);
  background: var(--accent-soft);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-body);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.btn svg { flex-shrink: 0; }
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.btn.primary {
  border-color: var(--green-mid);
  background: var(--green-soft);
  color: var(--green);
}
.btn.primary:hover {
  background: var(--green-mid);
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--green-mid);
  background: var(--green-soft);
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.65;
}
.callout svg {
  flex-shrink: 0;
  color: var(--green);
  margin-top: 2px;
}

/* ── Profile Card ──────────────────────────────────────────────────── */
.profile-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.09);
}

.profile-photo {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.profile-meta {
  padding: 14px 18px 18px;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(26, 26, 46, 0.05);
}
.meta-row:last-child { border-bottom: none; }
.k {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.v {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

/* ── Sections ──────────────────────────────────────────────────────── */
.section {
  padding: 50px 0;
}

.section-head {
  margin-bottom: 22px;
}
.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--accent);
  margin-bottom: 6px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.section-head p {
  color: var(--muted);
  font-size: 17px;
}

/* ── Cards ─────────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover {
  box-shadow: var(--shadow);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.project-card {
  border-left: 3px solid var(--accent-mid);
}
.project-card:hover {
  border-left-color: var(--accent);
}

/* ── Grid & Stack ──────────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Row & Tag ─────────────────────────────────────────────────────── */
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.tag {
  font-size: 13px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--accent-mid);
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* ── Typography helpers ────────────────────────────────────────────── */
h3 {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.muted { color: var(--muted); font-size: 15.5px; }

.bullets {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 16px;
}
.bullets li {
  margin: 7px 0;
  line-height: 1.7;
}
.bullets li::marker {
  color: var(--accent);
}

/* ── Publications ──────────────────────────────────────────────────── */
.pub-list {
  margin: 0;
  padding-left: 20px;
  counter-reset: pub;
  list-style: none;
}
.pub-list li {
  margin: 18px 0;
  padding-left: 8px;
  counter-increment: pub;
  position: relative;
}
.pub-list li::before {
  content: counter(pub) ".";
  position: absolute;
  left: -20px;
  font-weight: 700;
  color: var(--accent);
  font-size: 16px;
}
.pub-title {
  display: block;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  line-height: 1.55;
}
.pub-venue {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
}

/* ── Contact ───────────────────────────────────────────────────────── */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.contact p {
  margin-bottom: 14px;
  font-size: 16.5px;
  line-height: 1.65;
}
.contact strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 3px;
}

/* ── Footer ────────────────────────────────────────────────────────── */
.footer {
  padding: 28px 0 52px;
}
.footer-inner {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--muted);
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 32px;
  }
  .hero h1 { font-size: 40px; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 28px; }

  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    gap: 4px;
    z-index: 200;
  }
  .nav.open a {
    padding: 10px 14px;
    border-radius: 8px;
  }
  .mobile-toggle {
    display: flex;
  }
}

@media (max-width: 500px) {
  .hero h1 { font-size: 34px; }
  .banner-inner { font-size: 13.5px; }
  .container { width: 92vw; }
  .card { padding: 18px; }
  body { font-size: 16.5px; }
}

/* ── Selection highlight ───────────────────────────────────────────── */
::selection {
  background: var(--accent-mid);
  color: var(--text);
}

/* ── Scrollbar ─────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(26, 26, 46, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 26, 46, 0.25);
}
