.preview-page {
  --bg: #f4fffb;
  --panel: #ffffff;
  --text: #0b1f1a;
  --muted: #51645f;
  --line: #cbe8df;
  --accent: #00a48f;
  --accent-strong: #006b5f;
  --gold: #f0a11a;
  --blue: #2563eb;
  --cyan: #00a9d6;
  background:
    linear-gradient(180deg, #effffb 0%, #f7fbff 44%, #fff8e8 100%);
}

.preview-page main {
  display: flex;
  flex-direction: column;
}

.animated-hero {
  order: 1;
}

#contributions {
  order: 2;
}

#highlights {
  order: 3;
}

#about {
  order: 4;
}

#publications {
  order: 5;
}

#contact {
  order: 6;
}

.preview-header {
  background: rgba(244, 255, 251, 0.88);
  box-shadow: 0 10px 30px rgba(0, 104, 92, 0.08);
}

.animated-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 72px 0 64px;
  text-align: center;
}

.hero-badge a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(0, 164, 143, 0.26);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #e9fffa 100%);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(0, 132, 116, 0.14);
}

.animated-title {
  display: grid;
  justify-items: center;
  gap: 22px;
  margin-top: 26px;
}

.animated-title h1 {
  display: grid;
  gap: 12px;
  max-width: 860px;
  margin: 0;
  color: var(--text);
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: 0;
}

.word-rotator {
  position: relative;
  display: grid;
  min-height: 1.16em;
  overflow: hidden;
  color: var(--accent);
  font-weight: 850;
}

.word {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(90%);
  transition: opacity 360ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.word.active {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(90deg, var(--accent) 0%, var(--blue) 55%, var(--gold) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.animated-title p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}

.animated-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.preview-section {
  width: min(1120px, calc(100% - 32px));
}

.preview-section .eyebrow,
.animated-title + .animated-actions {
  position: relative;
}

.preview-page .button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent) 0%, var(--blue) 100%);
  box-shadow: 0 14px 30px rgba(0, 132, 116, 0.22);
}

.preview-page .button.secondary {
  border-color: rgba(0, 164, 143, 0.38);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
}

.centered-heading {
  justify-items: center;
  text-align: center;
}

.profile-preview-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 24px;
  align-items: stretch;
}

.about-card {
  display: grid;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.highlight-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 56px;
  align-items: center;
  overflow: hidden;
}

.highlight-intro {
  display: grid;
  gap: 28px;
}

.highlight-intro h2 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.04;
  letter-spacing: 0;
}

.highlight-intro p:not(.eyebrow) {
  max-width: 580px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.highlight-dots {
  display: flex;
  gap: 10px;
}

.highlight-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(89, 100, 95, 0.32);
  cursor: pointer;
  transition: width 220ms ease, background 220ms ease;
}

.highlight-dot.active {
  width: 42px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.highlight-card-wrap {
  position: relative;
  min-height: 420px;
  margin-right: 28px;
}

.highlight-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 34px;
  border: 1px solid rgba(0, 164, 143, 0.22);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 52px rgba(0, 112, 102, 0.15);
  opacity: 0;
  transform: translateX(70px) scale(0.94);
  transition: opacity 360ms ease, transform 420ms ease;
}

.highlight-card.active {
  z-index: 2;
  opacity: 1;
  transform: translateX(0) scale(1);
}

.highlight-card-wrap::before,
.highlight-card-wrap::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 164, 143, 0.14), rgba(37, 99, 235, 0.1));
}

.highlight-card-wrap::before {
  right: -26px;
  top: -26px;
}

.highlight-card-wrap::after {
  left: -26px;
  bottom: -26px;
}

.highlight-rating {
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.highlight-card blockquote {
  position: relative;
  flex: 1;
  margin: 28px 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.5;
}

.highlight-card blockquote::before {
  content: "\"";
  position: absolute;
  top: -36px;
  left: -8px;
  color: rgba(0, 164, 143, 0.2);
  font-size: 84px;
  line-height: 1;
}

.highlight-separator {
  height: 1px;
  margin: 8px 0 20px;
  background: var(--line);
}

.highlight-persona {
  display: flex;
  align-items: center;
  gap: 14px;
}

.highlight-persona img {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  object-fit: cover;
}

.highlight-persona h3 {
  margin: 0;
  font-size: 16px;
}

.highlight-persona p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.preview-contribution .contribution-card {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.98), rgba(231, 255, 248, 0.9) 55%, rgba(239, 246, 255, 0.88)),
    var(--panel);
  padding-bottom: 34px;
  border-color: rgba(0, 164, 143, 0.24);
  box-shadow: 0 22px 58px rgba(0, 112, 102, 0.16);
}

.preview-contribution .contribution-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--blue));
}

.preview-contribution .stack-image.active {
  box-shadow: 0 22px 50px rgba(37, 99, 235, 0.16);
}

.preview-contact {
  justify-content: center;
}

@media (max-width: 820px) {
  .profile-preview-grid {
    grid-template-columns: 1fr;
  }

  .highlight-showcase {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .highlight-card-wrap {
    margin-right: 0;
  }

  .animated-title h1 {
    font-size: clamp(42px, 12vw, 68px);
  }
}

@media (max-width: 520px) {
  .animated-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .animated-actions .button {
    width: 100%;
  }

  .highlight-card {
    padding: 24px;
  }

  .highlight-card blockquote {
    font-size: 18px;
  }
}
