/* =========================================================
   Prof. Y P Singh — site styles
   Colours and fonts are set once here as variables.
   ========================================================= */
:root {
  --cream: #f5ecd6;          /* main page background, header */
  --light: #f4efe4;          /* alternate section background */
  --card: #f5ead8;           /* research / lecture cards */
  --card-light: #f7f1e6;     /* about / publication cards */
  --border: #e8d5ae;
  --accent: #c3663a;         /* terracotta */
  --accent-dark: #a9532b;
  --text: #0a0a0a;
  --text-soft: #2b2b2b;
  --brown: #7a5718;          /* small descriptive text */
  --pill-soft: #ead8cf;
  --footer-bg: #3a2e25;
  --footer-head: #e8c9a0;
  --footer-text: #e9dfd1;

  --serif: "Lora", "Noto Sans Devanagari", Georgia, serif;
  --sans: "Source Sans 3", "Noto Sans Devanagari", -apple-system, system-ui, sans-serif;

  --radius: 14px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.25; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.container-wide   { max-width: 1152px; margin: 0 auto; padding: 0 22px; }
.container-narrow { max-width: 838px;  margin: 0 auto; padding: 0 24px; }
.container-contact{ max-width: 958px;  margin: 0 auto; padding: 0 24px; }

.section { padding: 112px 0; }
.bg-cream { background: var(--cream); }
.bg-light { background: var(--light); }

.section-head { margin-bottom: 40px; }
.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.section-title { font-size: clamp(30px, 4vw, 36px); color: var(--text); }
.section-intro { margin-top: 14px; font-size: 14px; color: var(--brown); }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 700; font-size: 14px;
  border-radius: 999px; padding: 11px 22px;
  transition: background-color .2s, transform .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }

.pill {
  display: inline-block; white-space: nowrap;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 6px 10px; border-radius: 999px;
}
.pill-solid { background: var(--accent); color: #fff; }
.pill-soft  { background: var(--pill-soft); color: #6b4a2a; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  transition: box-shadow .3s, background-color .3s;
}
.site-header.is-scrolled {
  background: rgba(245, 236, 214, .95);
  box-shadow: 0 1px 0 var(--border), 0 4px 14px rgba(58, 46, 37, .06);
  backdrop-filter: blur(6px);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
}
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--accent); }
.brand-tagline { font-size: 12px; color: #6b4a1a; margin-top: 3px; }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  font-size: 14px; padding: 8px 13px; border-radius: 8px;
  transition: color .2s, background-color .2s;
}
.main-nav a:hover { color: var(--accent); background: rgba(195, 102, 58, .08); }

.menu-toggle {
  display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--text);
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: inline; }

.mobile-nav { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #e3d1bf 0%, #dfb69f 100%);
  padding: 110px 0 104px;
}
.hero-circle { position: absolute; border-radius: 50%; pointer-events: none; }
.hero-circle--top {
  width: 360px; height: 360px; top: -90px; right: -90px;
  background: rgba(212, 150, 116, .45);
}
.hero-circle--bottom {
  width: 240px; height: 240px; bottom: -110px; left: -60px;
  background: rgba(212, 160, 128, .4);
}
.hero-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.hero-text { max-width: 480px; }
.hero-name {
  font-family: var(--serif); font-size: clamp(32px, 4.5vw, 40px);
  margin: 6px 0 14px;
}
.hero-role { font-size: 17px; font-weight: 700; color: var(--accent); }
.hero-position { font-size: 14px; color: #6b4a1a; margin-top: 4px; }
.hero-intro { font-size: 15.5px; color: var(--text-soft); margin: 26px 0 30px; line-height: 1.65; }

.photo-ring {
  width: 290px; height: 290px; border-radius: 50%;
  padding: 12px;
  border: 2px solid rgba(195, 102, 58, .45);
  box-shadow: 0 20px 40px rgba(120, 60, 30, .18);
}
.photo-ring img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 3px solid var(--accent);
  background: #fff;
}

/* ---------- About ---------- */
.about-card {
  display: grid; grid-template-columns: 1fr 1px 240px; gap: 30px;
  background: var(--card-light);
  border: 1px solid var(--border); border-radius: 18px;
  padding: 37px;
  box-shadow: 0 2px 10px rgba(58, 46, 37, .04);
}
.about-card::before {
  content: ""; grid-column: 2; grid-row: 1; background: var(--border);
}
.about-text { grid-column: 1; grid-row: 1; }
.about-text p { font-size: 15px; color: var(--text-soft); line-height: 1.65; }
.about-text p + p { margin-top: 18px; }
.about-image { grid-column: 3; grid-row: 1; }
.about-image img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px;
}
.about-quote {
  margin: 72px 0 40px;
  font-family: var(--serif); font-weight: 700; font-size: 19px; line-height: 1.4;
  text-align: center; color: var(--accent);
}

/* ---------- Research ---------- */
.research-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.research-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 27px 28px 32px;
}
.research-card h3 { font-size: 17px; margin-bottom: 16px; }
.research-card p { font-size: 13.5px; color: var(--brown); line-height: 1.6; }

/* ---------- Banner ---------- */
.banner { background: var(--accent); padding: 72px 24px; }
.banner-text {
  max-width: 790px; margin: 0 auto; text-align: center;
  font-family: var(--serif); font-weight: 700; font-size: clamp(22px, 3vw, 29px);
  line-height: 1.2; color: #fff;
}

/* ---------- Publications ---------- */
.pub-list { display: flex; flex-direction: column; gap: 16px; }
.pub-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--card-light);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 22px 24px;
  transition: border-color .2s, box-shadow .2s;
}
.pub-card:hover { border-color: #d8b98a; box-shadow: 0 4px 14px rgba(58, 46, 37, .06); }
.pub-card .pill { margin-top: 3px; }
.pub-body h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 4px; }
.pub-venue { font-size: 13px; color: var(--brown); }
.pub-authors { font-size: 11px; color: var(--brown); margin-top: 4px; }

/* ---------- Lectures timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 18px; top: 18px; bottom: 0;
  width: 1px; background: #e2c9a4;
}
.timeline-item { position: relative; display: flex; gap: 22px; }
.timeline-item + .timeline-item { margin-top: 22px; }
.timeline-dot {
  position: relative; z-index: 1; flex: none;
  width: 37px; height: 37px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
}
.talk-card {
  flex: 1;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 22px 22px 24px;
}
.talk-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.talk-date { font-size: 11px; color: var(--brown); }
.talk-card h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 4px; }
.talk-venue { font-size: 13px; color: var(--brown); line-height: 1.5; }

/* ---------- Social activities ---------- */
.activity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.activity-card {
  background: var(--card-light);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.activity-image { height: 150px; overflow: hidden; }
.activity-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.activity-card:hover .activity-image img { transform: scale(1.04); }
.activity-body { padding: 22px 22px 30px; }
.activity-body h3 { font-size: 15.5px; margin-bottom: 12px; }
.activity-body p { font-size: 13px; color: var(--brown); line-height: 1.6; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px;
  grid-auto-rows: 205px; align-items: start;
}
.gallery-item {
  position: relative; margin: 0; overflow: hidden; border-radius: 12px;
  height: 205px;
}
.gallery-item.is-tall { grid-row: span 2; height: 372px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item figcaption {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; padding: 16px;
  color: #fff; font-size: 14px; font-weight: 600;
  background: linear-gradient(to top, rgba(40, 25, 15, .7), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.gallery-item:hover figcaption { opacity: 1; }
.gallery-item:hover img { transform: scale(1.04); }

/* ---------- Contact ---------- */
.contact-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  background: linear-gradient(135deg, #e6d3bf 0%, #ddb7a0 100%);
  border: 1px solid #e5cdb4; border-radius: 22px;
  padding: 58px 53px;
}
.contact-left .section-title { margin-bottom: 18px; }
.contact-lines { font-size: 15px; line-height: 1.6; color: #6b4a1a; margin-bottom: 30px; }
.btn-email { font-size: 13px; padding: 12px 22px; }

.contact-right { display: flex; flex-direction: column; gap: 16px; }
.info-box {
  background: rgba(245, 236, 222, .78);
  border: 1px solid rgba(232, 213, 174, .9);
  border-radius: 12px;
  padding: 18px 18px 20px;
}
.info-box .eyebrow { font-size: 11px; margin-bottom: 6px; }
.info-value { font-size: 13.5px; color: var(--text); }
.profile-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.profile-links a {
  font-size: 12px; color: #5b4632; padding: 6px 11px; border-radius: 999px;
  background: rgba(234, 216, 204, .8); transition: background-color .2s, color .2s;
}
.profile-links a:hover { background: var(--accent); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 56px 0 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.footer-name { font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--footer-head); margin-bottom: 8px; }
.footer-about { font-size: 13px; line-height: 1.6; text-align: justify; color: #e0d4c4; max-width: 310px; }
.footer-email { display: inline-block; margin-top: 26px; font-size: 13.5px; color: var(--footer-head); }
.footer-email:hover { text-decoration: underline; }
.footer-heading {
  font-family: var(--serif); font-weight: 600; font-size: 15px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--footer-head);
  margin: 4px 0 18px;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: 10px; }
.footer-links a { font-size: 13.5px; color: #d8cbb8; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-social a { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom {
  margin-top: 46px; padding-top: 24px; border-top: 1px solid rgba(232, 201, 160, .18);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 11.5px; color: #a8998a;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff; box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px 30px;
}
.cookie-banner[hidden] { display: none; }
.cookie-title { font-family: var(--serif); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.cookie-text p:last-child { font-size: 13px; color: #333; line-height: 1.45; }
.cookie-actions { display: flex; gap: 12px; flex: none; }
.btn-cookie {
  border: 0; border-radius: 6px; cursor: pointer; color: #fff;
  font: 700 13px var(--sans); padding: 10px 12px;
}
.btn-decline { background: #c0a93a; }
.btn-accept  { background: var(--accent); }
.btn-cookie:hover { filter: brightness(.93); }

/* ---------- Scroll reveal (fade in) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1023px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav {
    display: none; flex-direction: column;
    padding: 8px 22px 18px; background: var(--cream);
    border-top: 1px solid var(--border);
  }
  .mobile-nav.is-open { display: flex; }
  .mobile-nav a { padding: 10px 0; font-size: 15px; border-bottom: 1px solid rgba(232, 213, 174, .5); }
  .mobile-nav a:last-child { border-bottom: 0; }

  .gallery-grid, .activity-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .section { padding: 72px 0; }
  .hero { padding: 64px 0 72px; }
  .hero-inner { flex-direction: column-reverse; align-items: flex-start; }
  .photo-ring { width: 220px; height: 220px; }

  .about-card { grid-template-columns: 1fr; padding: 26px; }
  .about-card::before { display: none; }
  .about-image { grid-column: 1; grid-row: 2; }
  .about-quote { font-size: 17px; margin-top: 48px; }

  .research-grid, .activity-grid, .footer-grid { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; gap: 30px; padding: 34px 24px; }

  .pub-card { flex-direction: column; gap: 10px; }

  .cookie-banner { flex-direction: column; align-items: stretch; padding: 18px 20px; }
  .cookie-actions { justify-content: flex-end; }
}

@media (max-width: 639px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .gallery-item, .gallery-item.is-tall { grid-row: auto; height: 240px; }
}
