/* ===== Kalash Jain — academic site (flat editorial) ===== */
:root {
  --cbs-blue: #0077a8;
  --cbs-blue-dark: #005f86;
  --navy: #0a3a52;
  --ink: #22262a;
  --muted: #5f6b73;
  --line: #dcdcd6;
  --tint: #f2f4f5;
  --page-bg: #ffffff;
  --maxw: 940px;
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--page-bg);
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--cbs-blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
}

/* thin flat brand rule along the very top */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cbs-blue);
  z-index: 40;
}

/* ===== Header / nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--page-bg);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: var(--ink);
}
.nav__brand img { height: 38px; width: auto; display: block; }
.nav__links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav__links a:hover { color: var(--cbs-blue-dark); text-decoration: none; border-bottom-color: var(--line); }
.nav__links a.active { color: var(--cbs-blue-dark); border-bottom-color: var(--cbs-blue); }

/* ===== Campus banners ===== */
.hero-banner,
.page-banner {
  position: relative;
  background-image:
    linear-gradient(rgba(9, 45, 64, 0.66), rgba(9, 45, 64, 0.66)),
    url("../img/cbs-campus.jpg");
  background-size: cover;
  background-position: center 38%;
  color: #fff;
}
.hero-banner__inner,
.page-banner__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.hero-banner { padding: 58px 0 60px; }
.hero-banner__name {
  font-family: var(--font-sans);
  font-size: 3.3rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}
.hero-banner__title {
  font-size: 1.18rem;
  line-height: 1.5;
  font-weight: 700;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
}
.page-banner { padding: 38px 0; }
.page-banner__title {
  font-family: var(--font-sans);
  font-size: 2.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin: 0;
}

/* ===== Hero (home about) ===== */
.hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 44px;
  align-items: start;
  padding: 44px 0 24px;
  margin: 0;
}
.hero h2:first-child { margin-top: 0; }
.hero__name {
  font-size: 3.1rem;
  margin: 0 0 8px;
  color: var(--cbs-blue);
  letter-spacing: -0.5px;
}
.hero__title { font-size: 1.12rem; color: var(--muted); margin: 0; }
.hero__aside { position: relative; padding-top: 6px; }
.hero__photo {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  display: block;
}
.hero h2 { color: var(--navy); }

/* ===== Sections ===== */
.section { padding: 8px 0 40px; transition: opacity 0.5s ease; }
.section h2 { font-size: 1.9rem; margin: 36px 0 8px; }
.page-title {
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cbs-blue);
  margin: 52px 0 8px;
}
.subhead {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cbs-blue-dark);
  border-bottom: 2px solid var(--cbs-blue);
  display: inline-block;
  padding-bottom: 5px;
  margin: 8px 0 20px;
}
.paper-group { margin: 0 0 36px; }
.paper-group:first-of-type { margin-top: 8px; }
.paper-group.is-first-visible { margin-top: 8px; }

/* ===== Research list ===== */
.paper {
  border-left: 2px solid var(--cbs-blue);
  border-bottom: 1px solid var(--line);
  padding: 4px 0 18px 20px;
  margin: 0 0 18px;
}
.paper:last-child { margin-bottom: 0; }
.paper__title {
  font-family: var(--font-sans);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 4px;
  line-height: 1.3;
}
.paper__title a { color: var(--navy); }
.paper__title a:hover { color: var(--cbs-blue-dark); }
.paper__venue { font-style: italic; color: var(--muted); margin: 0; }
.paper__authors { margin: 2px 0 8px; color: var(--ink); }
.paper__topics { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== Topic tags (clickable filters) ===== */
.filter-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 30px;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--line);
}
.filter-bar__label {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.filter-clear {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #55606a;
}
.filter-clear:hover { color: var(--ink); text-decoration: underline; }
.topic-pill {
  display: inline-block;
  cursor: pointer;
  border: 1px solid #cfe6f2;
  background: #edf6fb;
  color: #004c6c;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  user-select: none;
  transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}
.topic-pill:hover {
  background: var(--cbs-blue);
  color: #fff;
  border-color: var(--cbs-blue);
}
.topic-pill.active {
  background: var(--cbs-blue);
  color: #fff;
  border-color: var(--cbs-blue);
}
.filter-pill.reset { font-weight: 700; }
.paper.is-hidden, .paper-group.is-hidden { display: none; }

/* ===== Teaching ===== */
.award {
  display: inline-block;
  color: var(--cbs-blue-dark);
  font-weight: 600;
  border-left: 2px solid var(--cbs-blue);
  padding: 2px 0 2px 12px;
  margin: 6px 0 8px;
}
.card {
  border-top: 1px solid var(--line);
  padding: 20px 0 4px;
  margin: 0 0 20px;
}
.card > *:first-child { margin-top: 0; }
.card > *:last-child { margin-bottom: 0; }
.ratings {
  border-collapse: collapse;
  width: 100%;
  max-width: 460px;
  margin: 8px 0 4px;
}
.ratings th, .ratings td {
  text-align: left;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--line);
}
.ratings thead th {
  color: var(--cbs-blue-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.82rem;
}
.ratings tbody tr:last-child td { border-bottom: none; }
.ratings td:first-child { font-weight: 600; color: var(--navy); white-space: nowrap; }
.quotes { display: grid; gap: 4px; }
blockquote.quote {
  margin: 0;
  padding: 6px 0 14px 20px;
  border-left: 2px solid var(--cbs-blue);
  color: #3a444b;
  font-style: italic;
}

/* ===== Social icons ===== */
.socials { display: flex; gap: 16px; align-items: center; margin: 22px 0 6px; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}
.socials a:hover { opacity: 0.65; }
.socials img { height: 38px; width: 38px; object-fit: contain; display: block; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 30px 0 42px;
  text-align: center;
}
.site-footer .name {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy);
  font-size: 1.1rem;
  margin: 0 0 4px;
}
.site-footer a { color: var(--cbs-blue-dark); }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 32px 0 24px;
  }
  .hero__aside { max-width: 240px; margin: 0 auto; order: -1; }
  .hero__name { font-size: 2.4rem; }
  .nav { padding: 10px 16px; flex-wrap: wrap; gap: 6px; }
  .nav__links { gap: 2px; }
  .nav__links a { padding: 6px 8px; }
  .page-title { font-size: 2rem; }
  .hero-banner { padding: 40px 0 44px; }
  .hero-banner__name { font-size: 2.5rem; }
  .hero-banner__title { font-size: 1.05rem; }
  .page-banner { padding: 26px 0; }
  .page-banner__title { font-size: 2rem; }
  body { font-size: 16px; }
}
