/* ==========================================================
   personality-enhance.css  (v2)
   Additive styling for personality pages (e.g. mahatma-gandhi.html)
   Loaded AFTER style.css — does not modify existing rules.
   ========================================================== */

:root{
  --pe-cream: #fbf3e6;
  --pe-ink: #1d1712;
  --pe-orange: #e8672b;
  --pe-green: #0f6b4f;
  --pe-navy: #1a2340;
  --pe-muted: #5b5044;
  --pe-card-radius: 14px;
  --pe-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Hero layout ---------- */
.personality-hero{
  padding-top: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(40px, 6vw, 64px);
}
.personality-container{
  display: grid;
  grid-template-columns: 0.95fr 1.1fr;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
}

/* ---------- Hero image polish ---------- */
.personality-image{
  display: block;
  aspect-ratio: 4 / 5;
  min-height: 380px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(15,27,51,0.08);
  background: rgba(255,255,255,0.8);
  box-shadow: 0 20px 44px -18px rgba(15,27,51,0.18);
}
.personality-image img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.45s var(--pe-spring), box-shadow 0.45s var(--pe-spring);
}
.personality-image span{
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.65));
}
.personality-image:hover img{
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 30px 54px -18px rgba(15,27,51,0.4);
}

@media (max-width: 900px){
  .personality-container{
    grid-template-columns: 1fr;
  }
  .personality-image img{
    aspect-ratio: 16 / 11;
    max-height: 380px;
  }
}

/* ---------- Intro spacing tighten ---------- */
.personality-content .intro{
  margin-top: 14px;
  margin-bottom: 26px;
}

/* ---------- Detail cards (smaller + elegant) ---------- */
.personality-content .details{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.personality-content .details > div{
  position: relative;
  background: #ffffff;
  border-radius: var(--pe-card-radius);
  padding: 14px 16px 13px;
  box-shadow: 0 8px 20px -12px rgba(15,27,51,0.16);
  border: 1px solid rgba(15,27,51,0.05);
  transition: transform 0.4s var(--pe-spring), box-shadow 0.4s var(--pe-spring);
}
.personality-content .details > div:hover{
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 30px -14px rgba(15,27,51,0.26);
}
.detail-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-bottom: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--pe-orange), var(--pe-green));
  transition: transform 0.4s var(--pe-spring);
}
.personality-content .details > div:hover .detail-icon{
  transform: rotate(-8deg) scale(1.08);
}
.personality-content .details h4{
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pe-muted);
  margin: 0 0 3px;
}
.personality-content .details p{
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--pe-ink);
  margin: 0;
  line-height: 1.3;
}

/* ---------- Hero CTA button ---------- */
.hero-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, var(--pe-orange), var(--pe-green));
  box-shadow: 0 12px 24px -10px rgba(58,157,93,0.45);
  transition: transform 0.4s var(--pe-spring), box-shadow 0.4s var(--pe-spring);
}
.hero-btn:hover{
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 20px 34px -10px rgba(58,157,93,0.55);
}

/* ---------- Quote section ---------- */
.quote-section{
  position: relative;
  background: var(--pe-navy);
  padding: clamp(44px, 6vw, 70px) 24px;
  text-align: center;
  overflow: hidden;
}
.quote-section::before{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(245,148,31,0.15), transparent 55%),
              radial-gradient(circle at 80% 80%, rgba(58,157,93,0.18), transparent 55%);
  pointer-events: none;
}
.quote-mark{
  color: var(--pe-orange);
  margin-bottom: 16px;
  position: relative;
}
.quote-text{
  position: relative;
  max-width: 720px;
  margin: 0 auto 14px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: #fff;
  line-height: 1.4;
}
.quote-author{
  position: relative;
  color: rgba(255,255,255,0.65);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

/* ---------- Biography section ---------- */
.biography-section{
  position: relative;
  background: var(--pe-cream);
  padding: clamp(56px, 7vw, 90px) 24px clamp(64px, 8vw, 96px);
  overflow: hidden;
}
.biography-section::before{
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,148,31,0.10), transparent 70%);
  pointer-events: none;
}
.biography-section::after{
  content: "";
  position: absolute;
  bottom: -140px;
  left: -140px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58,157,93,0.10), transparent 70%);
  pointer-events: none;
}
.biography-inner{
  position: relative;
  max-width: 840px;
}
.section-heading{
  text-align: center;
  margin-bottom: 40px;
}
.section-eyebrow{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pe-green);
  margin-bottom: 10px;
}
.section-eyebrow::before,
.section-eyebrow::after{
  content: "";
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--pe-orange), var(--pe-green));
  border-radius: 2px;
}
.section-heading h2{
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  color: var(--pe-ink);
  margin: 0;
}

/* Biography text card */
.biography-text{
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
  box-shadow: 0 18px 44px -22px rgba(15,27,51,0.22);
  border: 1px solid rgba(15,27,51,0.05);
  margin-bottom: 8px;
}
.biography-text + .section-heading{
  margin-top: 44px;
}
.biography-text p{
  color: var(--pe-muted);
  font-size: 1.04rem;
  line-height: 1.85;
  margin-bottom: 20px;
}
.biography-text p:last-child{
  margin-bottom: 0;
}
.biography-text strong{
  color: var(--pe-green);
  font-weight: 600;
}
.biography-text > p:first-of-type::first-letter{
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 3.6em;
  line-height: 0.8;
  float: left;
  padding: 6px 10px 0 0;
  background: linear-gradient(135deg, var(--pe-orange), var(--pe-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* Reset drop cap for any biography-text block that isn't the first one on the page */
.timeline ~ .biography-text > p:first-of-type::first-letter,
.contributions-list ~ .biography-text > p:first-of-type::first-letter{
  font-size: 1em;
  font-weight: inherit;
  padding: 0;
  float: none;
  background: none;
  -webkit-text-fill-color: var(--pe-muted);
}

/* ---------- Timeline ---------- */
.timeline{
  position: relative;
  margin-top: 44px;
  padding: clamp(28px, 4vw, 40px) clamp(24px, 4vw, 44px) clamp(8px, 2vw, 16px) clamp(50px, 6vw, 64px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 18px 44px -22px rgba(15,27,51,0.22);
  border: 1px solid rgba(15,27,51,0.05);
}
.timeline{
  position: relative;
  margin-top: 44px;
  padding: 36px 32px 20px 56px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 18px 44px -22px rgba(15,27,51,0.22);
  border: 1px solid rgba(15,27,51,0.05);
}
.timeline::before{
  content: "";
  position: absolute;
  left: 28px;
  top: 48px;
  bottom: 32px;
  width: 2px;
  background: rgba(58,157,93,0.25);
}
.timeline-item{
  position: relative;
  padding-bottom: 32px;
  transition: transform 0.4s var(--pe-spring);
}
.timeline-item:hover{
  transform: translateX(4px);
}
.timeline-item:last-child{
  padding-bottom: 0;
}
.timeline-item::before{
  content: "";
  position: absolute;
  left: -28px;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--pe-orange);
  transition: transform 0.4s var(--pe-spring);
}
.timeline-item:hover::before{
  transform: scale(1.25);
}
.timeline-year{
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--pe-green);
  margin-bottom: 4px;
}
.timeline-content h4{
  margin: 2px 0 5px;
  font-size: 1rem;
  color: var(--pe-ink);
}
.timeline-content p{
  margin: 0;
  color: var(--pe-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---------- Contributions list ---------- */
.contributions-list{
  list-style: none;
  margin: 0 0 8px;
  padding: clamp(24px, 4vw, 36px) clamp(24px, 4vw, 44px);
  display: grid;
  gap: 14px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 18px 44px -22px rgba(15,27,51,0.22);
  border: 1px solid rgba(15,27,51,0.05);
}
.contributions-list li{
  position: relative;
  padding-left: 30px;
  color: var(--pe-muted);
  font-size: 1.02rem;
  line-height: 1.6;
}
.contributions-list li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--pe-orange), var(--pe-green));
  transform: rotate(45deg);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px){
  .personality-content .details{
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .quote-section{
    padding: 40px 20px;
  }
  .biography-section{
    padding: 50px 18px 60px;
  }
  .timeline{
    padding: 28px 18px 12px 40px;
  }
  .timeline::before{
    left: 18px;
  }
  .timeline-item::before{
    left: -22px;
  }
}
/* Dynamic DB profile helpers */
.personality-image .bk-initials {
  font-size: 4rem;
  color: #1a2340;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
[hidden] { display: none !important; }
