/* ============================================
   Dr. Bhaskar Das — design system
   ============================================ */

:root {
  --ink: #16302e;
  --ink-soft: #3f5b58;
  --paper: #fbf7ef;
  --card: #ffffff;
  --sand: #f2e8d5;
  --sand-line: #e6d8bd;
  --accent: #e2612e;
  --accent-dark: #c74f22;
  --teal: #2f6f63;
  --teal-light: #e4efe9;
  --line: rgba(22, 48, 46, 0.12);
  --shadow: 0 20px 45px -25px rgba(22, 48, 46, 0.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --ink: #eef0e9;
  --ink-soft: #a9bcb6;
  --paper: #101f1d;
  --card: #182b28;
  --sand: #142522;
  --sand-line: #2b453f;
  --accent: #f0713d;
  --accent-dark: #e2612e;
  --teal: #83c7b5;
  --teal-light: #1d3934;
  --line: rgba(238, 240, 233, 0.14);
  --shadow: 0 20px 45px -25px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.9rem); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
  border-radius: 2px;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #fff8f2;
  box-shadow: 0 12px 24px -12px rgba(226, 97, 46, 0.65);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--card); }
.btn-dark {
  background: var(--ink);
  color: var(--paper);
}
.btn-dark:hover { background: #0d211f; }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

/* ---------- nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #16302e;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand .mark svg { width: 19px; height: 19px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { transform: translateY(-2px); border-color: var(--ink); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 68px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    gap: 22px;
    font-size: 1.2rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: block; }
  .nav-cta .btn-ghost { display: none; }
}

/* ---------- hero ---------- */
.hero {
  padding: 56px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}
.hero-portrait {
  position: relative;
  justify-self: center;
}
.hero-portrait .frame {
  width: min(480px, 88vw);
  aspect-ratio: 16/10;
  border-radius: 26px;
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow);
  border: 6px solid var(--card);
}
.hero-portrait .frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: left center;
}
.hero-portrait .badge {
  position: absolute;
  bottom: -18px;
  left: -28px;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 210px;
  border: 1px solid var(--line);
}
.hero-portrait .badge .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.hero-tags {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 22px 0 26px;
}
.tag {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal);
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero-socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-socials .social-pill { padding: 9px 15px; font-size: 0.85rem; }

/* ---------- stats ---------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--sand);
}
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 36px 28px;
  gap: 20px;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--ink);
  font-weight: 600;
}
.stat span {
  font-size: 0.86rem;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ---------- sections ---------- */
section { padding: 72px 0; }

/* ---------- big link tiles ---------- */
.link-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.link-tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.link-tile:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: var(--shadow); }
.link-tile .lt-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--teal-light);
  color: var(--teal);
  display: grid;
  place-items: center;
}
.link-tile .lt-icon svg { width: 23px; height: 23px; }
.link-tile b { font-size: 1.02rem; color: var(--ink); }
.link-tile span { font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; line-height: 1.4; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- timeline ---------- */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid var(--sand-line);
}
.tl-item { position: relative; padding-bottom: 38px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -38px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--accent);
}
.tl-item .period {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}
.tl-item h3 { margin-bottom: 2px; font-size: 1.25rem; }
.tl-item .place { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 6px; font-weight: 500; }
.tl-item p { margin-bottom: 0; font-size: 0.98rem; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 32px;
}
.card-grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.teaser-card {
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
}
.teaser-card.teal { background: linear-gradient(155deg, #24504a, #16302e); }
.teaser-card.coral { background: linear-gradient(155deg, #e2612e, #b5461e); }
.teaser-card h3 { color: #fff; font-size: 1.7rem; margin-bottom: 10px; }
.teaser-card p { color: rgba(255,255,255,0.82); }
.teaser-card .eyebrow { color: rgba(255,255,255,0.75); }
.teaser-card .eyebrow::before { background: rgba(255,255,255,0.6); }

/* ---------- IR explainer ---------- */
.ir-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ir-item {
  padding: 26px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--line);
}
.ir-item .num {
  font-family: var(--font-display);
  color: var(--sand-line);
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.ir-item h3 { font-size: 1.1rem; margin-bottom: 8px; }
.ir-item p { font-size: 0.95rem; margin: 0; }

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
}
.gallery figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--sand);
}
.gallery figure img { width: 100%; height: 100%; object-fit: cover; }
.gallery figure:first-child { grid-row: span 2; aspect-ratio: auto; }

/* ---------- socials ---------- */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.social-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.social-pill:hover { transform: translateY(-2px); border-color: var(--ink); }
.social-pill svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- footer ---------- */
.site-footer {
  background: #16302e;
  color: rgba(251, 247, 239, 0.75);
  padding: 64px 0 32px;
}
.site-footer h3 { color: var(--paper); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(251, 247, 239, 0.12);
}
.footer-grid a {
  text-decoration: none;
  color: rgba(251, 247, 239, 0.75);
}
.footer-grid a:hover { color: var(--paper); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { color: var(--paper); font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 0.86rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- page hero (sub pages) ---------- */
.page-hero {
  padding: 56px 0 70px;
  border-bottom: 1px solid var(--line);
}
.page-hero .wrap { max-width: 780px; }

/* ---------- pub / award lists ---------- */
.pub-list { display: flex; flex-direction: column; gap: 18px; }
.pub-item {
  padding: 24px 28px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.pub-item .idx {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--sand-line);
  font-weight: 600;
  flex-shrink: 0;
}
.pub-item h3 { margin-bottom: 4px; font-size: 1.08rem; }
.pub-item p { margin: 0; font-size: 0.92rem; }

.award-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.award-item {
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--sand);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.award-item svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 3px; color: var(--accent-dark); }
.award-item strong { display: block; font-size: 0.98rem; margin-bottom: 2px; }
.award-item span { font-size: 0.86rem; color: var(--ink-soft); }

.thesis-card {
  border-radius: var(--radius-lg);
  background: #16302e;
  color: #fbf7ef;
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.thesis-card p { color: rgba(251,247,239,0.78); }
.thesis-card .eyebrow { color: #f2b79c; }
.thesis-card .eyebrow::before { background: #f2b79c; }
.thesis-card h3 { color: #fff; font-size: 1.35rem; margin-bottom: 10px; }

/* ---------- callout ---------- */
.callout {
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--sand-line);
  background: var(--sand);
  padding: 40px;
  text-align: center;
}
.callout h3 { margin-bottom: 8px; }
.callout p { max-width: 52ch; margin-left: auto; margin-right: auto; }

/* ---------- skills chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.88rem;
  font-weight: 500;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-portrait { order: -1; }
  .hero-tags, .hero-cta, .hero-socials { justify-content: center; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .ir-grid, .grid-3, .footer-grid, .award-grid { grid-template-columns: 1fr 1fr; }
  .grid-4, .link-tiles { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure:first-child { grid-row: span 1; aspect-ratio: 4/3; }
  .thesis-card { grid-template-columns: 1fr; text-align: left; }
}
@media (max-width: 620px) {
  section { padding: 52px 0; }
  .ir-grid, .grid-2, .grid-3, .grid-4, .footer-grid, .award-grid { grid-template-columns: 1fr; }
  .gallery, .link-tiles { grid-template-columns: 1fr 1fr; }
  .link-tile { padding: 18px 16px; gap: 10px; }
  .link-tile .lt-icon { width: 38px; height: 38px; border-radius: 10px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); padding: 28px 20px; }
  .hero-portrait .badge { left: 50%; transform: translateX(-50%); bottom: -16px; white-space: nowrap; max-width: none; }
  .thesis-card { padding: 30px 24px; }
  .card, .teaser-card, .callout { padding: 28px; }
}
