

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --brand:          #0b1f5c;
  --brand2:         #1a4faa;
  --brand3:         #2563c4;
  --brand-light:    #e8edf8;
  --accent:         #c0001f;
  --accent-light:   #fff0f3;
  --gold:           #a8720d;
  --gold-light:     #fef3dc;

  --bg:             #f4f6fb;
  --bg-alt:         #eaeef7;
  --surface:        #ffffff;
  --surface2:       #f8f9fd;
  --surface3:       #f1f4fa;
  --text:           #0d1a2b;
  --muted:          #3a4f6a;
  --subtle:         #637492;
  --faint:          #96acc8;

  --border:         rgba(11,31,92,.09);
  --border-md:      rgba(11,31,92,.15);
  --border-strong:  rgba(11,31,92,.24);
  --link:           #1249a8;
  --link-hover:     #0b2e7a;

  --panel:          #c3cde8;
  --panel2:         #dae0f2;

  --radius:         12px;
  --radius-sm:      8px;
  --radius-xs:      4px;
  --radius-pill:    50px;

  --shadow-xs:      0 1px 3px rgba(11,31,92,.06), 0 1px 2px rgba(11,31,92,.04);
  --shadow-sm:      0 2px 8px rgba(11,31,92,.08), 0 1px 3px rgba(11,31,92,.05);
  --shadow:         0 4px 20px rgba(11,31,92,.10), 0 2px 6px rgba(11,31,92,.06);
  --shadow-lg:      0 12px 40px rgba(11,31,92,.14), 0 4px 12px rgba(11,31,92,.08);

  --maxw:           1180px;
  --gap:            1.5rem;
  --section-pad:    3rem 0;
  --card-pad:       1.5rem 1.75rem;

  --hero-bg:        linear-gradient(160deg, #e8edf8 0%, #f0f4fb 45%, #f4f6fb 100%);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
main { flex: 1 0 auto; }
footer { flex-shrink: 0; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color .18s ease;
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul { padding-left: 1.4rem; }
li { margin-bottom: .45rem; }

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  /* font-family: 'Playfair Display', Georgia, serif; */
  color: var(--brand);
  line-height: 1.28;
  font-weight: 590;
  letter-spacing: -.012em;
}

h1 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); margin-bottom: .7rem; }
h2 { font-size: clamp(1.4rem, 2.8vw, 2.1rem); margin-bottom: .6rem; }
h3 { font-size: clamp(1.05rem, 2vw, 1.35rem); margin-bottom: .5rem; }
h4 { font-size: 1.05rem; margin-bottom: .45rem; }
h5 { font-size: .95rem;  margin-bottom: .4rem; }
h6 { font-size: .87rem;  margin-bottom: .35rem; }

p { margin-bottom: 1rem; color: var(--muted); }
p:last-child { margin-bottom: 0; }

.lead   { font-size: 1.05rem; line-height: 1.85; color: var(--muted); }
.small  { font-size: .875rem; }
.muted  { color: var(--subtle); }

.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--brand3);
  margin-bottom: .6rem;
  display: block;
}

/* ============================================================
   HERO / PROFILE BANNER
   overflow:clip  — clips decorative blobs visually
                    WITHOUT breaking position:sticky on children
   isolation      — creates stacking context (replaces overflow:hidden trick)
   ============================================================ */
.hero {
  padding: 3.5rem 0 0;
  background: var(--hero-bg);
  border-bottom: 1px solid var(--panel2);
  position: relative;
  overflow: clip;
  isolation: isolate;
}

/* Decorative background circle */
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(26,79,170,.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Bottom brand accent line */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand3) 0%, transparent 0%);
}

.hero .container { position: relative; z-index: 1; }

/* ============================================================
   HERO GRID
   padding-bottom gives the grid row defined height so the
   sticky sidebar has a stop point before the hero ends.
   ============================================================ */
.herogrid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 3rem;
  align-items: start;
  padding-bottom: 5.5rem;   /* ← increased from 3.5rem to 5.5rem */
}

/* ============================================================
   PROFILE PHOTO
   ============================================================ */
.profile-photo {
  width: 210px;
  height: 270px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  border: 3px solid var(--surface);
  box-shadow: var(--shadow);
  display: block;
}

.profile-photo-inline {
  float: right;
  margin: .3rem 0 1.5rem 2.25rem;
  width: 265px;
  height: 300px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  border: 3px solid var(--surface);
  box-shadow: var(--shadow);
  shape-outside: margin-box;
}

/* ============================================================
   PROFILE NAME & ROLE
   ============================================================ */
.profile-name,
h2.title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.7rem, 3.8vw, 2.2rem);
  color: var(--brand);
  margin-bottom: .3rem;
  line-height: 1.18;
  letter-spacing: -.02em;
}

.profile-role,
h3.small {
  font-family: 'DM Sans', sans-serif;
  font-size: .98rem;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 1.3rem;
  line-height: 1.65;
}

.profile-role a,
h3.small a { color: var(--link); font-weight: 500; }
.profile-role a:hover,
h3.small a:hover { color: var(--brand3); }

.profile-role .sep {
  color: var(--panel);
  margin: 0 .45rem;
  user-select: none;
}

/* ============================================================
   BIO PARAGRAPH
   ============================================================ */
.profile-bio {
  position: relative;
  font-size: .965rem;
  line-height: 1.9;
  color: var(--muted);
  padding: .85rem 1.1rem .85rem 1.4rem;
  border-left: 3px solid var(--brand3);
  background: rgba(26,79,170,.045);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.25rem 0 1.5rem;
}

/* ============================================================
   RESEARCH INTERESTS
   ============================================================ */
.profile-interests {
  list-style: none;
  padding: 0;
  margin: .5rem 0 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.profile-interests li {
  position: relative;
  padding: .5rem .9rem .5rem 1.65rem;
  font-size: .93rem;
  color: var(--muted);
  line-height: 1.65;
  background: var(--surface);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  margin: 0;
  transition: border-color .2s, background .2s;
}

.profile-interests li:hover {
  border-color: var(--border-md);
  background: var(--surface2);
}

.profile-interests li::before {
  content: '';
  position: absolute;
  left: .7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand3);
}

/* ============================================================
   DETAIL PARAGRAPHS
   ============================================================ */
.profile-detail {
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 1.1rem;
}

.profile-detail p { margin-bottom: .95rem; }

/* ============================================================
   TAB BAR (optional)
   ============================================================ */
.profile-tabs {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--panel2);
  margin-top: 2.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.profile-tabs a {
  padding: .8rem 1.4rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--subtle);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: color .2s, border-color .2s;
  letter-spacing: .01em;
}

.profile-tabs a:hover,
.profile-tabs a.active {
  color: var(--brand3);
  border-bottom-color: var(--brand3);
  text-decoration: none;
}

/* ============================================================
   SIDEBAR
   ── FIX: awards card was collapsing because max-height was too
      tight and padding-bottom was missing, causing the last card
      to be clipped by the scroll container.

   align-self:start    — column height = content, gives sticky a stop point
   position:sticky     — sticks while scrolling within the herogrid row
   top:90px            — offset below fixed header
   max-height          — increased to calc(100vh - 100px) so taller
                         viewports show more; the sidebar scrolls
                         internally when content exceeds it
   padding-bottom      — 2rem gap so the awards card isn't flush-clipped
                         at the bottom of the scroll container
   overflow-y:auto     — internal scroll when content is taller than
                         max-height (always present when needed)
   scrollbar-width:thin— thin native scrollbar (Firefox)
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-self: start;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--panel) transparent;
  padding-right: 4px;
  padding-bottom: 2rem;       /* ← prevents last card from being clipped */
}

/* Webkit scrollbar (Chrome, Safari, Edge) */
.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
  margin-bottom: 8px;   
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--panel);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--brand2);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--card-pad);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: .55rem;
  transition: box-shadow .25s ease, transform .22s ease;
}

.card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

/* Card heading — serif, full-width underline */
.card h3,
.card > strong {
  font-family: 'Playfair Display', serif;
  margin: 0 0 .5rem;
  color: var(--brand);
  font-size: 1rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--border);
  display: block;
}

/* Sub-label headings inside cards — small caps, no border */
.card h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--subtle);
  margin: 0 0 .25rem;
  padding-bottom: 0;
  border-bottom: none;
  display: block;
}

.card p  { font-size: .9rem; }
.card ul { font-size: .9rem; padding-left: 1.1rem; }
.card ul li { margin-bottom: .4rem; }

/* Card type accents */
.card-quicklinks { border-top: 3px solid var(--brand); }

/* ── FIX: awards card bottom margin removed (padding-bottom on
   .sidebar now handles spacing cleanly instead) ── */
.card-awards { border-top: 3px solid var(--gold); }

/* ============================================================
   LINK LIST (inside cards)
   ============================================================ */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}



.list li {
  font-size: .85rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
  margin: 0;
  color: #000; /* black */
}


.list li:last-child { border-bottom: none; }

.list li a {
  font-weight: 500;
  color: var(--link);
  display: inline-flex;
  align-items: flex-start;
  gap: .32rem;
  transition: color .18s, gap .18s;
}

.list li a::before {
  content: '›';
  color: var(--brand3);
  font-size: 1.1rem;
  line-height: 1.3;
  flex-shrink: 0;
}

.list li a:hover {
  color: var(--brand3);
  gap: .48rem;
  text-decoration: none;
}

.list li address {
  font-style: normal;
  font-size: .82rem;
  color: var(--subtle);
  line-height: 1.75;
  margin-top: .15rem;
  word-break: break-word;
  hyphens: auto;
}

/* Divider label inside card e.g. "Email", "Scholar Profile" */
.card-label {
  font-size: .67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--subtle);
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  margin-top: .4rem;
}

/* ============================================================
   AWARDS LIST
   ============================================================ */
.awards-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.awards-list li {
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.awards-list li:last-child { border-bottom: none; }

.awards-list a {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .5rem 0;
  font-size: .85rem;
  color: var(--link);
  transition: color .18s, padding-left .18s;
  text-decoration: none;
  line-height: 1.55;
}

.awards-list a::before {
  content: '★';
  color: var(--gold);
  font-size: .78rem;
  flex-shrink: 0;
  margin-top: .15em;
}

.awards-list a:hover {
  color: var(--brand3);
  padding-left: .35rem;
  text-decoration: none;
}

/* External linkout links inside cards */
.card a[href*="scholar"],
.card a[href*="insa"],
.card a[href*="csir"],
.card a[href*="dbt"],
.card a[href*="nba"] {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .84rem;
  padding: .2rem 0;
  color: var(--link);
}

/* ============================================================
   CONTENT SECTIONS (below hero)
   ============================================================ */
section { padding: var(--section-pad); }
section + section { padding-top: 0; }

#publications { padding-top: 4rem; }   /* ← add this one line */
/* ============================================================
   SECTION HEAD — title on left, button on right
   justify-content:space-between pushes them apart cleanly.
   flex-shrink:0 on .btn prevents the button from squishing.
   ============================================================ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: .75rem;
  margin-bottom: 1.75rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--panel2);
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}

/* Blue vertical accent bar before section title */
.section-head h2::before,
.section-head h3::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 20px;
  background: var(--brand3);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ============================================================
   PUBLICATIONS LIST
   ============================================================ */
.publications-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.publications-list li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--panel2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.35rem;
  box-shadow: var(--shadow-xs);
  font-size: .9rem;
  line-height: 1.78;
  color: var(--muted);
  margin: 0;
  transition: border-left-color .2s ease, box-shadow .22s ease, transform .22s ease;
}

.publications-list li:hover {
  border-left-color: var(--brand3);
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}

.publications-list li a {
  color: var(--link);
  font-weight: 500;
  line-height: 1.5;
  display: block;
  margin-bottom: .3rem;
}

.publications-list li a:hover { color: var(--brand3); }

/* Inside a card */
.card .publications-list li {
  background: var(--bg);
  border-left-width: 3px;
  padding: .75rem 1rem;
}

.card > ul.publications-list { margin-top: .35rem; }

/* ============================================================
   AWARD BADGES / CHIPS
   ============================================================ */
.awards-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .5rem;
}

.award-badge {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .3rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: background .2s, box-shadow .2s, transform .15s;
}

.award-badge::before {
  content: '★';
  color: var(--gold);
  font-size: .72rem;
}

.award-badge:hover {
  background: var(--gold-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  color: var(--gold);
  text-decoration: none;
}

/* ============================================================
   TAGS / CHIPS
   ============================================================ */
.tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand3);
  background: rgba(26,79,170,.08);
  border-radius: var(--radius-xs);
  padding: .2rem .6rem;
}

/* ============================================================
   GRID HELPERS
   ============================================================ */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }
.grid-2    { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-3    { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }

/* ============================================================
   BUTTONS
   flex-shrink:0 prevents the button squishing inside .section-head
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .48rem 1.05rem;
  background: var(--brand);
  color: #fff !important;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  letter-spacing: .02em;
  flex-shrink: 0;
  transition: background .2s, transform .15s, box-shadow .2s;
}

.btn:hover {
  background: var(--brand3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--brand) !important;
  border: 1.5px solid var(--brand);
}

.btn-outline:hover {
  background: var(--brand);
  color: #fff !important;
}

/* ============================================================
   SPACING & UTILITY
   ============================================================ */
.mt-1 { margin-top: .75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: .75rem; }
.mb-2 { margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 2.5rem; }
.py-1 { padding-top: .75rem; padding-bottom: .75rem; }
.py-2 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-3 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.clearfix::after { content: ''; display: table; clear: both; }
.text-center { text-align: center; }

/* ============================================================
   RESPONSIVE — TABLET ≤ 1040px
   ============================================================ */
@media (max-width: 1040px) {
  .container { padding: 0 2rem; }

  .herogrid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
  }

  /* Sidebar: drop sticky, switch to 2-col grid */
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
    padding-bottom: 0;
  }

  .hero { padding: 2.5rem 0 0; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RESPONSIVE — MOBILE ≤ 700px
   ============================================================ */
@media (max-width: 700px) {
  :root {
    --card-pad: 1.1rem 1.2rem;
    --section-pad: 2rem 0;
  }

  .container { padding: 0 1.1rem; }
  .hero { padding: 1.75rem 0 0; }

  .herogrid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    position: static;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
    padding-bottom: 0;
  }

  .profile-photo-inline {
    float: none;
    display: block;
    margin: 0 auto 1.25rem;
    width: 136px;
    height: 160px;
  }

  .profile-photo { width: 136px; height: 160px; }

  .profile-name,
  h2.title { font-size: clamp(1.45rem, 6vw, 1.9rem); }

  .profile-bio { font-size: .93rem; padding: .65rem .85rem .65rem 1rem; }

  .publications-list li { font-size: .87rem; padding: .8rem 1rem; }

  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }

  .section-head h2,
  .section-head h3 { font-size: .97rem; }

  .awards-strip { gap: .45rem; }
  .award-badge  { font-size: .75rem; padding: .27rem .7rem; }
}

/* ============================================================
   RESPONSIVE — EXTRA SMALL ≤ 420px
   ============================================================ */
@media (max-width: 420px) {
  .container { padding: 0 .85rem; }

  .profile-name,
  h2.title { font-size: 1.32rem; }

  .profile-photo,
  .profile-photo-inline { width: 120px; height: 140px; }

  .card { padding: .9rem 1rem; }
  .publications-list li { font-size: .83rem; }
  .award-badge { font-size: .72rem; }
  .sidebar { grid-template-columns: 1fr !important; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .sidebar {
    position: static !important;
    max-height: none !important;
    overflow-y: visible !important;
    padding-bottom: 0 !important;
  }
  .hero::before,
  .hero::after { display: none; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .publications-list li { box-shadow: none; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: .74rem; color: #666; }
}
