/* ============================================
   Sakshi Bhatia — Academic Portfolio
   Sidebar with interactive particle background
   ============================================ */

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

:root {
  --text: #222;
  --text-sec: #555;
  --text-mut: #999;
  --bg: #fff;
  --border: #e8e8e8;
  --accent: #1a5276;
  --accent-light: #2980b9;
  --tag-bg: #eef4f9;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.section[id] { scroll-margin-top: 24px; }

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
.page { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #050510;
}

.sidebar canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.sidebar-content {
  position: relative;
  z-index: 10;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  text-align: center;
}

.sidebar-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 243, 255, 0.5);
  margin-bottom: 16px;
  box-shadow: 0 0 24px rgba(0, 243, 255, 0.2);
}

.sidebar-content h1 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.sidebar-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 28px;
  font-style: italic;
}

.sidebar-divider {
  width: 40px;
  height: 1px;
  background: rgba(0, 243, 255, 0.4);
  margin-bottom: 28px;
}

.sidebar-nav {
  width: 100%;
  margin-bottom: 28px;
}

.sidebar-nav a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  border-radius: 6px;
  margin-bottom: 2px;
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-nav a:hover {
  color: #fff;
  background: rgba(0, 243, 255, 0.1);
  text-decoration: none;
}

.sidebar-nav a.active {
  color: #00f3ff;
  background: rgba(0, 243, 255, 0.1);
  font-weight: 500;
}

.sidebar-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.sidebar-social a {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-social a:hover {
  color: #00f3ff;
  border-color: rgba(0, 243, 255, 0.5);
  text-decoration: none;
}

/* ---- Mobile toggle ---- */
.menu-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1000;
  background: #050510;
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--sans);
  color: #00f3ff;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}

/* ---- Main content ---- */
.main {
  flex: 1;
  max-width: 780px;
  padding: 48px 48px 64px;
}

/* ---- Section ---- */
.section { margin-bottom: 48px; }

.section-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ---- Bio ---- */
.bio {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.bio-interests {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.7;
  margin-bottom: 16px;
}

.bio-interests strong { color: var(--text); }

.bio-links {
  font-size: 14px;
  color: var(--text-sec);
}

/* ---- News ---- */
.news-item {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.news-date {
  color: var(--text-mut);
  font-size: 13px;
  white-space: nowrap;
  min-width: 110px;
  flex-shrink: 0;
}

.news-text { color: var(--text-sec); }
.news-text strong { color: var(--text); }
.news-text a { font-weight: 500; }

/* ---- Publication / Project cards ---- */
.pub-card {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  align-items: flex-start;
}

.pub-thumb {
  width: 200px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f0f0f0;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.pub-thumb.fit {
  object-fit: contain;
  background: #fff;
}

.pub-thumb-placeholder {
  width: 200px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--tag-bg), #f5f5f5);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-mut);
  text-align: center;
  padding: 8px;
}

.pub-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}

.pub-authors {
  font-size: 13px;
  color: var(--text-sec);
  margin-bottom: 3px;
}

.pub-authors .me { color: var(--text); font-weight: 600; }

.pub-venue {
  font-size: 13px;
  color: var(--text-mut);
  font-style: italic;
  margin-bottom: 8px;
}

.pub-desc {
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.6;
  margin-bottom: 8px;
}

.pub-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pub-links a {
  font-size: 12px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-sec);
  transition: all 0.15s;
}

.pub-links a:hover {
  border-color: var(--accent-light);
  color: var(--accent-light);
  text-decoration: none;
}

/* ---- Awards ---- */
.award {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.6;
}

.award strong { color: var(--text); }

/* ---- Experience ---- */
.exp { margin-bottom: 28px; }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 8px;
}

.exp h3 { font-size: 16px; font-weight: 600; }
.exp .date { font-size: 13px; color: var(--text-mut); white-space: nowrap; }
.exp .org { font-size: 14px; color: var(--text-sec); margin-bottom: 6px; }
.exp p { font-size: 14px; color: var(--text-sec); line-height: 1.6; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-mut);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .page { flex-direction: column; }

  .sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    width: 300px;
    height: 100vh;
    z-index: 999;
    transition: left 0.3s ease;
  }

  .sidebar.open { left: 0; }
  body.menu-open { overflow: hidden; }
  .overlay.open { display: block; z-index: 998; }

  .main { padding: 56px 20px 48px; }
  .pub-card { flex-direction: column; }
  .pub-thumb, .pub-thumb-placeholder { width: 100%; }
  .news-item { flex-direction: column; gap: 2px; }
  .news-date { min-width: auto; }
}
