/* ============================================================
   Riddhi Bhagwat — Personal Academic Site
   Minimal, research-oriented, pastel palette
   ============================================================ */

:root {
  --bg:          #FAFAF7;
  --bg-alt:      #F5F3EE;
  --text:        #2C2C2C;
  --text-body:   #4A4A4A;
  --text-muted:  #7A7A6E;
  --accent:      #6B8F71;
  --accent-dark: #4E6B52;
  --border:      #E0DDD5;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  font-size: 0.97rem;
  line-height: 1.75;
}

/* ── Page container ── */
.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* ── Links ── */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ── Header ── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.01em;
}

.site-nav { font-size: 0.97rem; color: var(--text-muted); }
.site-nav a { color: var(--text-body); margin: 0 0.1rem; text-transform: lowercase; letter-spacing: 0.02em; }
.site-nav a:hover { color: var(--accent); }

/* ── Section labels (shared style for all headers including subsections) ── */
.section-label,
.subsection-label {
  font-family: 'Lato', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.section-label    { margin: 2.8rem 0 1rem; }
.subsection-label { margin: 1.6rem 0 0.7rem; font-size: 0.72rem; }

/* ── Scroll fade-in ── */
.fade-section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Bio grid ── */
.bio-grid {
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 2rem;
  align-items: start;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: block;
  margin-right: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.profile-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
}

.bio-text p { margin-bottom: 0.85rem; }
.bio-text p:last-child { margin-bottom: 0; }

.bio-links { font-size: 0.86rem; color: var(--text-muted); }
.bio-links a { color: var(--text-body); margin: 0 0.1rem; }
.bio-links a:hover { color: var(--accent); }

/* ── Interest tags ── */
.interest-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.interest-tags span {
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: #E3EDE4;
  color: #3D6142;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.interest-tags span:nth-child(3n+2) { background: #E3EDF5; color: #3D5A6B; }
.interest-tags span:nth-child(3n)   { background: #EAE6F5; color: #5C4E8A; }
.interest-tags span:nth-child(5n)   { background: #F5E6EE; color: #7A3D5C; }
.interest-tags span:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* ── News ── */
.news-list { list-style: none; }

.news-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.87rem;
  color: var(--text-body);
}
.news-list li:last-child { border-bottom: none; }

.news-date {
  font-weight: 700;
  color: var(--text-muted);
  display: inline-block;
  min-width: 95px;
  margin-right: 0.4rem;
  font-size: 0.82rem;
}

.news-toggle-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0.6rem 0 0;
  font-family: 'Lato', system-ui, sans-serif;
  text-decoration: underline;
  display: block;
}

/* ── Project rows ── */
.project-row {
  display: flex;
  gap: 1.2rem;
  padding: 1.2rem 0.5rem;
  border-top: 1px solid var(--border);
  align-items: flex-start;
  border-radius: 6px;
  margin: 0 -0.5rem;
  transition: background 0.2s ease;
}
.project-row:last-of-type { border-bottom: 1px solid transparent; }
.project-row:hover { background: var(--bg-alt); }

.project-thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.project-row:hover .project-thumb { transform: scale(1.02); }

.project-thumb-placeholder {
  width: 120px;
  height: 80px;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.4rem;
  font-style: italic;
}

.project-info { flex: 1; min-width: 0; }

.project-title-line {
  font-family: 'Lato', system-ui, sans-serif;
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.18rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.project-authors {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.28rem;
}
.project-authors strong {
  color: var(--text-body);
  font-weight: 700;
}

.project-desc {
  color: var(--text-body);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.project-links-line {
  font-size: 0.83rem;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
}
.project-links-line a { color: var(--accent); }

.project-tags-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.project-tags-line span {
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ── Status / conference tags ── */
.tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  font-family: 'Lato', system-ui, sans-serif;
}
.tag.ongoing       { background: #F5E6E8; color: #8B4A52; }
.tag.completed     { background: #E3EDE4; color: #3D6142; }
.tag.research      { background: #EAE6F5; color: #5C4E8A; }
.tag.personal      { background: #FEF3E2; color: #7A5C2E; }
.tag.iclr          { background: #EAE6F5; color: #5C4E8A; }
.tag.under-review  { background: #FEF3E2; color: #7A5C2E; }

/* ── Writing & Speaking ── */
.writing-layout {
  display: flex;
  gap: 1.8rem;
  align-items: flex-start;
}

.writing-text { flex: 1; }
.writing-text p { margin-bottom: 0.7rem; font-size: 0.92rem; }
.writing-text .highlight-text { font-style: italic; color: var(--text); }

.speaking-img-small {
  width: 145px;
  height: 145px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.speaking-img-small:hover { transform: scale(1.03); }

.talks-list { list-style: none; padding: 0; }
.talks-list li {
  padding: 0.3rem 0;
  font-size: 0.86rem;
  color: var(--text-body);
  border-bottom: 1px solid var(--border);
}
.talks-list li:last-child { border-bottom: none; }

/* ── Awards ── */
.awards-list { list-style: none; padding: 0; }
.awards-list li {
  padding: 0.45rem 0;
  font-size: 0.87rem;
  color: var(--text-body);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.awards-list li:last-child { border-bottom: none; }

.award-label {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Contact section ── */
.contact-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.2rem 2rem;
  text-align: center;
  margin-top: 1rem;
}

.contact-heading {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.55rem;
  letter-spacing: 0.01em;
}

.contact-blurb {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

.contact-icons {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-body);
  font-size: 0.87rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.contact-icon-link:hover {
  color: var(--accent-dark);
  border-color: var(--accent);
  background: #E3EDE4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107,143,113,0.15);
  text-decoration: none;
}
.contact-icon-link svg { flex-shrink: 0; }

/* ── Custom cursor (desktop hover only) ── */
@media (hover: hover) {
  body, a, button, .interest-tags span { cursor: none !important; }

  /* Tiny instant dot at true cursor position */
  .cursor-dot {
    position: fixed;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
    transition: opacity 0.2s;
  }

  /* Lagging hollow ring */
  .cursor-ring {
    position: fixed;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid rgba(107, 143, 113, 0.55);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.25s ease, height 0.25s ease,
                border-color 0.25s ease, opacity 0.2s;
  }
  .cursor-ring.hovered {
    width: 42px;
    height: 42px;
    border-color: rgba(107, 143, 113, 0.3);
  }

  /* Click ripple */
  .cursor-ripple {
    position: fixed;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(107, 143, 113, 0.45);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    z-index: 9998;
    animation: cursor-ripple-out 0.55s ease-out forwards;
  }

  @keyframes cursor-ripple-out {
    to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
  }
}

/* ── Footer ── */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 2;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

/* ── Mobile ── */
@media (max-width: 580px) {
  .page-wrap { padding: 0 1rem 4rem; }

  .site-header {
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.8rem 0 1.2rem;
  }

  .bio-grid { grid-template-columns: 1fr; }
  .profile-photo { width: 140px; margin: 0 auto; }

  .project-row { flex-direction: column; margin: 0; padding: 1.2rem 0; }
  .project-thumb,
  .project-thumb-placeholder { width: 100%; height: 130px; }

  .writing-layout { flex-direction: column; }
  .speaking-img-small { width: 100%; height: 170px; }

  .news-date { min-width: 75px; }

  .contact-card { padding: 1.6rem 1.2rem; }
  .contact-icons { gap: 0.5rem; }
  .contact-icon-link { font-size: 0.8rem; padding: 0.5rem 0.9rem; }
}
