/* =============================================================
   style.css — Susanta Samanta Academic Website
   Minimal, polished, two-column layout (left sidebar + right content).

   HOW TO CUSTOMISE:
   - Colors  → edit the CSS variables in :root below
   - Fonts   → swap the Google Fonts import URL in both HTML files
   - Spacing → adjust --gap-* variables
   - Layout  → --sidebar-width controls the left column width
   ============================================================= */

/* ── 1. DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Accent — change ONE value to re-theme the whole site */
  --accent:        #1a56a0;
  --accent-light:  #e8f0fb;
  --accent-border: #c3d9f5;

  /* Neutrals */
  --text-primary:   #1a1a1a;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;
  --border:         #e5e7eb;
  --bg-page:        #ffffff;
  --bg-card:        #f9fafb;

  /* Typography */
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Mono', monospace;

  /* Layout */
  --sidebar-width: 210px;
  --content-max:   680px;
  --page-max:      calc(var(--sidebar-width) + var(--content-max) + 4rem);
}

/* ── 2. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.72;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
a             { color: var(--accent); text-decoration: none; }
a:hover       { text-decoration: underline; }
strong        { font-weight: 600; }
em            { font-style: italic; }

/* ── 3. PAGE WRAPPER ──────────────────────────────────────── */
/*
  Two-column layout:
    LEFT  → .sidebar  (fixed-ish, contains photo + name + nav + links)
    RIGHT → .content  (scrollable main area)
*/
.page-wrapper {
  display: flex;
  min-height: 100vh;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 3.5rem;
}

/* ── 4. LEFT SIDEBAR ──────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 2.5rem 0 2.5rem;
  /* Sticky so it stays visible while scrolling */
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/*
  HOW TO CHANGE YOUR PHOTO:
    Option A (URL)  → find <img id="profile-photo"> in index.html
                      and change the src to any direct image URL.
    Option B (file) → place photo.jpg next to index.html,
                      then set src="photo.jpg"
*/
.sidebar-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}

.sidebar-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-top: 0.1rem;
}

.sidebar-role {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.15rem;
}

/* Navigation links stacked vertically */
.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.25rem;
}

.sidebar-nav a {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 3px 0;
  border-left: 2px solid transparent;
  padding-left: 8px;
  transition: color 0.15s, border-color 0.15s;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  text-decoration: none;
}

/* Profile links (email, scholar, etc.) */
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.sidebar-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s;
}
.sidebar-links a:hover { color: var(--accent); text-decoration: none; }

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── 5. RIGHT CONTENT AREA ────────────────────────────────── */
.content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 0 4rem;
  max-width: var(--content-max);
}

/* ── 6. SECTION HEADINGS ──────────────────────────────────── */
section { margin-bottom: 2.4rem; }

.section-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.section-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 1.1rem;
}

/* ── 7. ABOUT TEXT ────────────────────────────────────────── */
.about-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.78;
  margin-bottom: 0.7rem;
}

/* ── 8. TAGS (Research Interests) ────────────────────────── */
.tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.76rem;
  font-weight: 500;
  margin: 2px 2px;
  white-space: nowrap;
}

/* ── 9. NEWS LIST ─────────────────────────────────────────── */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.news-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.news-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.news-year-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  min-width: 30px;
  flex-shrink: 0;
  padding-top: 0.05rem;
}

.news-text { font-size: 0.87rem; color: var(--text-secondary); }
.news-text strong { color: var(--text-primary); }

/* ── 10. META LIST (Teaching / Contact) ───────────────────── */
.meta-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.meta-row {
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 88px;
  flex-shrink: 0;
}

.meta-content { font-size: 0.87rem; color: var(--text-secondary); }
.meta-content strong { color: var(--text-primary); }
.meta-sub { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.08rem; }

/* ── 11. PUBLICATIONS (research.html) ────────────────────── */
.pub-year-group { margin-bottom: 2rem; }

.pub-year-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--accent-light);
}

.pub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pub-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 1px 5px rgba(26,86,160,0.07);
}

/* Badge */
.pub-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 0.4rem;
  vertical-align: middle;
}
.badge-journal    { background: #e0f2fe; color: #0369a1; }
.badge-conference { background: #f0fdf4; color: #166534; }
.badge-preprint   { background: #fef9c3; color: #854d0e; }
.badge-workshop   { background: #fdf4ff; color: #7e22ce; }

.pub-title   { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.18rem; line-height: 1.45; }
.pub-authors { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.12rem; }
.pub-authors strong { color: var(--text-primary); }
.pub-venue   { font-size: 0.78rem; color: var(--text-muted); font-style: italic; margin-bottom: 0.3rem; }
.pub-link    { font-size: 0.76rem; font-weight: 500; color: var(--accent); display: inline-flex; align-items: center; gap: 0.2rem; }
.pub-link:hover { text-decoration: underline; }

/* ── 12. TEACHING CARDS (teaching.html) ──────────────────── */
.teach-card {
  border-left: 2px solid var(--accent-border);
  padding: 0.65rem 0 0.65rem 1rem;
  margin-bottom: 0.9rem;
  transition: border-color 0.15s;
}
.teach-card:hover { border-left-color: var(--accent); }

.teach-meta {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.2rem;
}

.teach-term {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 62px;
  flex-shrink: 0;
}

.teach-inst {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.teach-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
  line-height: 1.4;
}

.teach-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── 13. FOOTER ───────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.2rem 0;
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ── 13. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 680px) {
  .page-wrapper {
    flex-direction: column;
    gap: 0;
    padding: 0 1rem;
  }
  .sidebar {
    position: static;
    height: auto;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0 1rem;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0;
  }
  .sidebar-nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding-left: 0;
    padding-bottom: 2px;
  }
  .sidebar-nav a:hover,
  .sidebar-nav a.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }
  .content { padding: 1.5rem 0 3rem; }
}
