/* ==========================================================================
   Candidate — Homepage preview & full profile page
   ========================================================================== */

/* --- Homepage preview section --- */
.candidate-preview-section {
  padding: 5rem 0;
  background: linear-gradient(165deg, var(--off-white) 0%, #eef5f1 45%, var(--white) 100%);
  position: relative;
  overflow: hidden;
  overflow-x: clip;
}

.candidate-preview-section::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 204, 0, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.candidate-preview-section::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 107, 63, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.section-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-light);
  display: inline-block;
  margin-bottom: 0.65rem;
}

.candidate-preview-title {
  font-family: var(--font-hero);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--green-primary);
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.candidate-preview-subtitle {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--yellow-gold);
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.candidate-preview-lead {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
}

.candidate-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.candidate-topic-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-700);
  padding: 0.5rem 0.75rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 64, 38, 0.08);
  box-shadow: var(--shadow-sm);
}

.candidate-topic-item i {
  color: var(--green-light);
  font-size: 1rem;
}

.btn-read-profile {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--green-darkest) !important;
  background: var(--yellow-primary);
  border: none;
  border-radius: 50px;
  padding: 0.9rem 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 8px 24px rgba(255, 204, 0, 0.35);
}

.btn-read-profile:hover {
  background: var(--yellow-bright);
  color: var(--green-darkest) !important;
  transform: translateY(-2px);
}

/* --- Wow portrait frame (shared) --- */
.portrait-showcase {
  position: relative;
  width: min(100%, 380px);
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

.portrait-showcase--lg {
  width: min(100%, 420px);
}

.portrait-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 204, 0, 0.45) 0%, rgba(0, 107, 63, 0.25) 40%, transparent 70%);
  filter: blur(28px);
  animation: portrait-pulse 4s ease-in-out infinite;
}

.portrait-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(255, 204, 0, 0.45);
  animation: portrait-orbit-spin 24s linear infinite;
}

.portrait-orbit--inner {
  inset: 12%;
  border-style: solid;
  border-width: 1px;
  border-color: rgba(0, 135, 81, 0.25);
  animation: none;
}

.portrait-ring {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--yellow-primary),
    var(--green-light),
    var(--yellow-gold),
    var(--green-mid),
    var(--yellow-primary)
  );
  padding: 4px;
}

.portrait-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--green-darkest);
  padding: 6px;
}

.portrait-arch {
  position: relative;
  width: 78%;
  height: 88%;
  margin: auto;
  border-radius: 50% 50% 12% 12% / 55% 55% 8% 8%;
  overflow: hidden;
  z-index: 3;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 0 80px rgba(255, 204, 0, 0.15);
}

.portrait-arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.02);
}

.portrait-shine {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: linear-gradient(
    125deg,
    transparent 40%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 60%
  );
  pointer-events: none;
  animation: portrait-shine 5s ease-in-out infinite;
}

.portrait-badge {
  position: absolute;
  z-index: 10;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

.portrait-badge--top {
  top: 6%;
  right: 0;
  background: var(--yellow-primary);
  color: var(--green-darkest);
}

.portrait-badge--bottom {
  bottom: 12%;
  left: 0;
  background: var(--green-nav);
  color: var(--white);
  border: 1px solid rgba(255, 204, 0, 0.35);
}

.portrait-badge i {
  margin-right: 0.25rem;
}

.portrait-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--yellow-bright);
  border-radius: 50%;
  z-index: 5;
  box-shadow: 0 0 12px var(--yellow-primary);
  animation: portrait-sparkle 2.5s ease-in-out infinite;
}

.portrait-spark--1 { top: 18%; left: 8%; animation-delay: 0s; }
.portrait-spark--2 { top: 42%; right: 4%; animation-delay: 0.8s; }
.portrait-spark--3 { bottom: 28%; right: 12%; animation-delay: 1.4s; }

@keyframes portrait-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes portrait-orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes portrait-shine {
  0%, 100% { opacity: 0.3; transform: translateX(-20%); }
  50% { opacity: 0.8; transform: translateX(20%); }
}

@keyframes portrait-sparkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* --- Candidate page --- */
.candidate-page-hero {
  position: relative;
  background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-dark) 50%, var(--green-darkest) 100%);
  padding: 3rem 0 4rem;
  overflow-x: clip;
}

.candidate-page-hero .section-eyebrow {
  color: var(--yellow-primary);
}

.candidate-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1540575467061-178a50c2df87?w=1920&q=40");
  background-size: cover;
  opacity: 0.08;
}

.candidate-breadcrumb {
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.candidate-breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.candidate-breadcrumb a:hover {
  color: var(--yellow-primary);
}

.candidate-breadcrumb span {
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0.4rem;
}

.candidate-breadcrumb .current {
  color: var(--yellow-primary);
}

.candidate-hero-title {
  font-family: var(--font-hero);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.candidate-hero-tagline {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 520px;
  line-height: 1.65;
}

.candidate-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.candidate-hero-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--yellow-primary);
}

.candidate-hero-stat span {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.candidate-profile-body {
  padding: 3rem 0 4rem;
  background: var(--off-white);
}

.candidate-sticky-nav {
  position: sticky;
  top: calc(var(--nav-height) + 8px);
  z-index: 100;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 64, 38, 0.08);
  margin-bottom: 2rem;
}

.candidate-nav-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.candidate-nav-scroll::-webkit-scrollbar {
  display: none;
}

.candidate-nav-link {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: 0.55rem 0.85rem;
  border-radius: 50px;
  white-space: nowrap;
  transition: all var(--transition);
}

.candidate-nav-link:hover,
.candidate-nav-link.active {
  background: var(--green-primary);
  color: var(--white);
}

.candidate-content-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 64, 38, 0.06);
  scroll-margin-top: 140px;
}

.candidate-block-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--gray-100);
}

.candidate-block-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.candidate-block-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-primary);
  margin: 0 0 0.25rem;
}

.candidate-block-subtitle {
  font-size: 0.88rem;
  color: var(--gray-500);
  margin: 0;
}

.candidate-block-body p {
  color: var(--gray-700);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.candidate-block-body p:last-child {
  margin-bottom: 0;
}

/* Timeline */
.candidate-timeline {
  position: relative;
  padding-left: 1.75rem;
  border-left: 2px solid var(--yellow-primary);
}

.candidate-timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}

.candidate-timeline-item:last-child {
  padding-bottom: 0;
}

.candidate-timeline-item::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--yellow-primary);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--green-light);
}

.candidate-timeline-year {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green-light);
  letter-spacing: 0.06em;
}

.candidate-timeline-item h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0.25rem 0 0.35rem;
}

.candidate-timeline-item p {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.6;
}

/* Milestone cards */
.milestone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.milestone-card {
  text-align: center;
  padding: 1.35rem 1rem;
  background: linear-gradient(160deg, #f0f9f4 0%, var(--white) 100%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 107, 63, 0.1);
}

.milestone-card i {
  font-size: 1.75rem;
  color: var(--green-light);
  margin-bottom: 0.65rem;
}

.milestone-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--green-primary);
}

.milestone-card span {
  font-size: 0.78rem;
  color: var(--gray-500);
}

/* Vision quote */
.vision-quote {
  font-family: var(--font-hero);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-style: italic;
  color: var(--green-primary);
  border-left: 4px solid var(--yellow-primary);
  padding: 1rem 0 1rem 1.5rem;
  margin: 1.5rem 0;
  line-height: 1.6;
}

/* Achievement list */
.achievement-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.achievement-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.92rem;
  color: var(--gray-700);
  line-height: 1.55;
}

.achievement-list li:last-child {
  border-bottom: none;
}

.achievement-list i {
  color: var(--yellow-gold);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* Awards */
.award-card {
  display: flex;
  gap: 1rem;
  padding: 1.15rem;
  background: var(--off-white);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  border: 1px solid rgba(0, 64, 38, 0.06);
}

.award-card i {
  font-size: 2rem;
  color: var(--yellow-primary);
}

.award-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--gray-900);
}

.award-card p {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin: 0;
}

/* Gallery */
.candidate-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.candidate-gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.candidate-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.candidate-gallery-item:hover img {
  transform: scale(1.08);
}

.candidate-gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 26, 15, 0.6) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
}

.candidate-gallery-item:hover::after {
  opacity: 1;
}

.candidate-gallery-caption {
  position: absolute;
  bottom: 0.5rem;
  left: 0.65rem;
  right: 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--white);
  z-index: 2;
  opacity: 0;
  transform: translateY(4px);
  transition: all var(--transition);
}

.candidate-gallery-item:hover .candidate-gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Speeches */
.speech-card {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.15rem 1.25rem;
  background: var(--off-white);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  border: 1px solid rgba(0, 64, 38, 0.06);
  transition: box-shadow var(--transition), transform var(--transition);
}

.speech-card:hover {
  box-shadow: var(--shadow-md);
}

@media (max-width: 991.98px) {
  .speech-card:hover {
    transform: none;
  }
}

.speech-play {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green-primary);
  color: var(--yellow-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.speech-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: var(--gray-900);
}

.speech-card p {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin: 0;
}

.speech-card .speech-meta {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--green-light);
  font-weight: 600;
  white-space: nowrap;
}

.candidate-sidebar-portrait {
  margin-bottom: 1.5rem;
}

@media (max-width: 991.98px) {
  .candidate-preview-section {
    padding: 3.5rem 0;
  }

  .portrait-showcase {
    margin-bottom: 2.5rem;
  }

  .candidate-topic-grid {
    grid-template-columns: 1fr;
  }

  .candidate-sticky-nav {
    top: 0;
    border-radius: var(--radius-md);
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
  }

  .candidate-profile-body .container {
    overflow-x: clip;
  }

  .candidate-content-block {
    padding: 1.5rem 1.25rem;
  }

  .speech-card .speech-meta {
    display: none;
  }
}

/* --- Rich content: images & quotes --- */
.candidate-media-band {
  margin-top: 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 3px solid rgba(255, 204, 0, 0.25);
}

.candidate-media-band img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.candidate-figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 64, 38, 0.08);
}

.candidate-figure img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.candidate-figure figcaption {
  font-size: 0.75rem;
  color: var(--gray-500);
  padding: 0.5rem 0.75rem;
  background: var(--off-white);
  text-align: center;
}

.candidate-figure--center {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.candidate-photo-strip img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.candidate-photo-wide {
  height: 220px !important;
  object-fit: cover;
}

.candidate-quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.candidate-quote-card {
  margin: 0;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(160deg, #f0f9f4, var(--white));
  border-left: 4px solid var(--yellow-primary);
  border-radius: var(--radius-sm);
}

.candidate-quote-card p {
  font-family: var(--font-hero);
  font-size: 1rem;
  font-style: italic;
  color: var(--green-primary);
  margin: 0 0 0.5rem;
  line-height: 1.45;
}

.candidate-quote-card cite {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  font-style: normal;
}

.achievement-list--numbered li {
  align-items: flex-start;
}

@media (max-width: 767.98px) {
  .candidate-photo-strip img {
    height: 110px;
  }

  .portrait-badge {
    font-size: 0.58rem;
    padding: 0.35rem 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portrait-orbit,
  .portrait-glow,
  .portrait-shine,
  .portrait-spark {
    animation: none;
  }
}
