/* ═══════════════════════════════════════════
   OUR SCIENCE — page-specific styles
   Shared styles live in common.css
═══════════════════════════════════════════ */
body { background: #F3EFE3; }


/* ═══════════════════════════════════════════
   SHARED TOP WRAPPER  (hero + pyramid share one background)
═══════════════════════════════════════════ */
.science-top {
  position: relative;
  background: url("../assets/images/science-hero-img.jpg") center top / 100% auto no-repeat;
  background-color: #EDD8C0;
}

.science-top::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(232, 168, 138, 0.88) 0%,
    rgba(220, 148, 100, 0.58) 42%,
    rgba(200, 120, 70,  0.22) 100%
  );
}


/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
#science-hero {
  position: relative;
  width: 100%;
  min-height: 580px;
  display: flex;
  align-items: stretch;
}

.science-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 148px 124px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.science-hero-text { flex: 0 0 560px; max-width: 560px; }

/* STANDARDIZED: Hero H1 — 52px */
.science-hero-heading {
  font-family: var(--font-h);
  font-size: 52px;
  font-weight: 400;
  line-height: 62px;
  letter-spacing: 0.16em;
  color: var(--brown);
  font-style: italic;
  margin-bottom: 18px;
}

/* STANDARDIZED: Sub-heading H3 — 28px */
.science-hero-sub {
  font-family: var(--font-h);
  font-size: 28px;
  font-weight: 400;
  line-height: 40px;
  letter-spacing: 0.10em;
  color: var(--brown);
}


/* ═══════════════════════════════════════════
   PYRAMID SECTION
═══════════════════════════════════════════ */
#science-pyramid {
  background: transparent;
  padding: 0 0 96px;
}

.pyramid-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px;
  display: flex;
  justify-content: center;
}

/* Glassmorphism card */
.pyramid-glass-card {
  width: 100%;
  max-width: 1200px;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 72px;
  padding: 72px 80px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 52px;
  box-shadow: 0 8px 40px rgba(96,58,23,0.06);
}

/* Pyramid + descriptions layout
   ─────────────────────────────
   Geometry is driven by three custom properties so every breakpoint only has to
   restate the variables — label width, triangle width and the minimum row height.
   Rows are equal-height (1fr) and grow to fit the longest description, so the
   labels, the triangle bands and the description text always stay in lockstep. */
.pyramid-layout {
  --label-w: 200px;
  --tri-w: 300px;
  --band-h: 116px;

  display: grid;
  grid-template-columns: var(--label-w) auto 1fr;
  grid-template-rows: repeat(3, minmax(var(--band-h), 1fr));
  width: 100%;
}

/* Let the column wrappers dissolve so their children become grid items */
.pyramid-labels-col,
.pyramid-desc-col { display: contents; }

/* STANDARDIZED: Label H4 — 20px */
.plabel-item {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.22em;
  clip-path: polygon(0% 0%, calc(100% - 32px) 0%, 100% 50%, calc(100% - 32px) 100%, 0% 100%);
  border-bottom: 2px solid rgba(255, 255, 255, 0.20);
}
.plabel-item:last-child { border-bottom: none; }

.plabel-3 { grid-row: 1; background: #603A17; color: var(--white); }
.plabel-2 { grid-row: 2; background: #C47641; color: var(--white); }
.plabel-1 { grid-row: 3; background: rgba(218, 179, 131, 0.45); color: var(--brown); }

/* ── Triangle pyramid ── */
.pyramid-shape-col {
  grid-column: 2;
  grid-row: 1 / 4;
  display: flex;
  margin-right: 20px;
}

.pyramid-tri {
  width: var(--tri-w);
  height: 100%;
  display: flex;
  flex-direction: column;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.ptri-band {
  flex: 1;
  width: 100%;
}

.ptri-3 { background: #603A17; }
.ptri-2 { background: #C47641; }
.ptri-1 { background: #DAB383; }

/* ── Connector lines ──
   Each line runs from the label column to the triangle's sloped left edge at that
   row's midpoint. For a triangle of width W split into 3 equal bands, the edge sits
   5W/12, W/4 and W/12 in from the left at each successive midpoint. */
.pyramid-layout { position: relative; z-index: 0; }

.pconn {
  position: absolute;
  height: 1px;
  left: var(--label-w);
  pointer-events: none;
  z-index: -1;
}

.pconn-3 { top: 16.667%; width: calc(var(--tri-w) * 5 / 12); background: #603A17; }
.pconn-2 { top: 50%;     width: calc(var(--tri-w) / 4);      background: #C47641; }
.pconn-1 { top: 83.333%; width: calc(var(--tri-w) / 12);     background: #DAB383; }

/* ── Description column ── */
.pdesc-item {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 0 14px 28px;
  border-left: 2px solid rgba(196, 118, 65, 0.22);
  position: relative;
}

.pyramid-desc-col .pdesc-item:nth-child(1) { grid-row: 1; }
.pyramid-desc-col .pdesc-item:nth-child(2) { grid-row: 2; }
.pyramid-desc-col .pdesc-item:nth-child(3) { grid-row: 3; }

/* STANDARDIZED: Small body — 16px */
.pdesc-title {
  font-family: var(--font-b);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.20em;
  color: var(--gold-1);
  margin-bottom: 8px;
}

/* STANDARDIZED: Body — 15px (constrained by pyramid layout) */
.pdesc-body {
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 300;
  line-height: 24px;
  letter-spacing: 0.12em;
  color: var(--gray);
}

/* STANDARDIZED: Section H2 — 36px */
.pyramid-section-heading {
  font-family: var(--font-h);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--brown);
  text-align: center;
}

/* ── Research philosophy closing block ── */
.research-philosophy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 860px;
}

/* STANDARDIZED: Sub-heading H3 — 28px */
.research-philosophy-heading {
  font-family: var(--font-h);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--gold-1);
  text-align: center;
}

/* STANDARDIZED: Lead — 18px */
.pyramid-summary {
  font-family: var(--font-h);
  font-size: 18px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: 0.08em;
  color: #707070;
  text-align: center;
}

.research-philosophy-tagline {
  font-family: var(--font-h);
  font-size: 20px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: 0.18em;
  color: var(--gold-1);
  text-align: center;
}


/* ═══════════════════════════════════════════
   DR. KHAN SECTION
═══════════════════════════════════════════ */
#science-doctor {
  padding: 96px 0;
  background:
    linear-gradient(rgba(30,15,5,0.88), rgba(30,15,5,0.88)),
    url("../assets/images/science-doctor-bg.jpg") center / cover no-repeat;
}

.doctor-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 124px;
  display: flex;
  align-items: center;
  gap: 80px;
}

.doctor-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* STANDARDIZED: Label H4 — 22px */
.doctor-role {
  font-family: var(--font-h);
  font-size: 22px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: 0.06em;
  color: var(--gold-3);
  margin-bottom: 16px;
}

/* STANDARDIZED: Hero H1 — 52px (display name) */
.doctor-name {
  font-family: var(--font-h);
  font-size: 52px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--white);
  margin-bottom: 20px;
}

.doctor-divider {
  width: 160px;
  height: 1px;
  background: var(--gold-3);
  margin-bottom: 32px;
}

/* STANDARDIZED: Body — 16px */
.doctor-bio {
  font-family: var(--font-b);
  font-size: 16px;
  font-weight: 300;
  line-height: 28px;
  letter-spacing: 0.14em;
  color: rgba(243,239,227,0.88);
  max-width: 680px;
}

/* Photo area */
.doctor-photo-wrap {
  flex: 0 0 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doctor-photo-ring {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  padding: 17px;
  background: conic-gradient(
    from 250deg,
    #7A5020   0deg,
    #9A6830  35deg,
    #B28958  60deg,
    #D4A862  85deg,
    #EDCA92 103deg,
    #FFDEA4 113deg,
    #FFFFFF  118deg,
    #FFDEA4 123deg,
    #EDCA92 140deg,
    #C49848 180deg,
    #9A6830 225deg,
    #7A5020 270deg,
    #9A6830 315deg,
    #B28958 350deg,
    #C49848 360deg
  );
  box-shadow:
    0 0 0 3px rgba(18,8,2,0.90),
    0 0 55px rgba(178,137,88,0.40);
}

.doctor-photo-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid #0c0502;
  box-shadow: inset 0 0 0 1px rgba(196,150,70,0.35);
  overflow: hidden;
  background: #100806;
}

.doctor-photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}


/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1280px) {
  .science-hero-inner,
  .doctor-inner { padding: 148px 80px 80px; }
  .doctor-inner { padding-top: 0; }
  .pyramid-inner { padding: 0 60px; }
  .pyramid-glass-card { padding: 64px 56px 56px; border-radius: 56px; }
  .pyramid-layout { --label-w: 170px; --tri-w: 260px; }
}

@media (max-width: 1100px) {
  .science-hero-inner { padding: 140px 60px 72px; }
  .science-hero-text { flex: 0 0 460px; }
  .doctor-inner { padding: 0 60px; gap: 56px; }
  .pyramid-inner { padding: 0 40px; }
  .pyramid-layout { --label-w: 150px; --tri-w: 220px; }
  .plabel-item { font-size: 18px; letter-spacing: 0.18em; }
  .science-hero-heading { font-size: 42px; line-height: 52px; }
  .science-hero-sub { font-size: 24px; line-height: 36px; }
}

@media (max-width: 960px) {
  #science-hero { min-height: auto; }
  .science-hero-inner { padding: 130px 40px 64px; flex-direction: column; align-items: flex-start; }
  .science-hero-text { flex: none; max-width: 100%; }
  .science-hero-heading { font-size: 38px; line-height: 48px; }
  .science-hero-sub { font-size: 22px; line-height: 34px; }

  #science-pyramid { padding: 0 0 64px; }
  .pyramid-inner { padding: 0 24px; }
  .pyramid-glass-card { border-radius: 40px; padding: 40px 32px 40px; gap: 40px; }
  /* Scale down 3-column layout — no stacking yet */
  .pyramid-layout { --label-w: 120px; --tri-w: 180px; }
  .plabel-item { font-size: 14px; letter-spacing: 0.12em; }

  .doctor-inner { flex-direction: column-reverse; padding: 0 40px; gap: 48px; }
  .doctor-photo-wrap { flex: none; }
  .doctor-role { font-size: 18px; line-height: 28px; }
  .doctor-name { font-size: 40px; }
}

@media (max-width: 680px) {
  .science-hero-inner { padding: 112px 24px 56px; }
  .science-hero-heading { font-size: 32px; line-height: 42px; }
  .science-hero-sub { font-size: 18px; line-height: 28px; }

  .pyramid-glass-card { border-radius: 28px; padding: 32px 20px 28px; gap: 24px; }
  /* Switch to stacked mobile layout: pyramid on top, descriptions beneath it.
     Rows are exactly --band-h here, so the connectors key off it directly. */
  .pyramid-layout {
    --label-w: 80px;
    --band-h: 64px;
    --tri-w: calc(100% - var(--label-w));
    grid-template-columns: var(--label-w) 1fr;
    grid-template-rows: repeat(3, var(--band-h)) auto;
  }
  .plabel-item { font-size: 10px; letter-spacing: 0.08em; clip-path: polygon(0% 0%, calc(100% - 12px) 0%, 100% 50%, calc(100% - 12px) 100%, 0% 100%); }
  .pyramid-shape-col { margin-right: 0; }
  .pyramid-tri { width: 100%; }
  .pconn-3 { top: calc(var(--band-h) * 0.5); }
  .pconn-2 { top: calc(var(--band-h) * 1.5); }
  .pconn-1 { top: calc(var(--band-h) * 2.5); }
  .pyramid-desc-col { display: block; grid-column: 1 / -1; grid-row: 4; }
  .pdesc-item { min-height: 64px; padding: 16px 0 16px 24px; }
  .pyramid-summary { font-size: 15px; line-height: 26px; }
  .pyramid-section-heading { font-size: 26px; }
  .research-philosophy-heading { font-size: 22px; }
  .research-philosophy-tagline { font-size: 16px; line-height: 28px; letter-spacing: 0.14em; }

  .doctor-inner { padding: 0 24px; }
  .doctor-role { font-size: 16px; line-height: 26px; }
  .doctor-name { font-size: 32px; }
  .doctor-bio { font-size: 14px; line-height: 24px; }
  .doctor-photo-ring { width: 240px; height: 240px; padding: 13px; }
  .doctor-photo-circle { border-width: 4px; }
}

@media (max-width: 480px) {
  .science-hero-inner { padding: 104px 20px 48px; }
  .science-hero-heading { font-size: 26px; line-height: 34px; }
  .science-hero-sub { font-size: 16px; letter-spacing: 0.06em; }
  .pyramid-inner { padding: 0 16px; }
  .pyramid-glass-card { padding: 24px 16px 20px; border-radius: 20px; }
  .pyramid-layout { --label-w: 70px; --band-h: 52px; }
  .plabel-item { font-size: 9px; clip-path: polygon(0% 0%, calc(100% - 10px) 0%, 100% 50%, calc(100% - 10px) 100%, 0% 100%); }
  .doctor-inner { padding: 0 20px; }
}
