/* ============================================
   Grace's Personal Website — Styles
   Vibrant & Playful Design
   ============================================ */

/* --- CSS Variables --- */
:root {
  --coral: #FF6B6B;
  --coral-light: #FF8E8E;
  --coral-dark: #E55A5A;
  --purple: #6C5CE7;
  --purple-light: #A29BFE;
  --purple-dark: #5541D7;
  --teal: #00B894;
  --teal-light: #55EFC4;
  --yellow: #FDCB6E;
  --yellow-light: #FFEAA7;
  --pink: #FD79A8;
  --pink-light: #FDA7DF;
  --blue: #74B9FF;
  --blue-light: #A8D8FF;

  --bg: #FFFAF5;
  --bg-alt: #FFF5EE;
  --text: #2D3436;
  --text-light: #636E72;
  --white: #FFFFFF;
  --card-shadow: 0 4px 20px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);

  --nav-height: 70px;
  --max-width: 1100px;
  --radius: 16px;
  --radius-sm: 8px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  word-spacing: 1.5px;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  border-bottom-color: rgba(0,0,0,0.04);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--coral), var(--purple), var(--teal));
  z-index: 1001;
  width: 0%;
  transition: width 0.1s ease-out;
  border-radius: 0 3px 3px 0;
}

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--coral), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links a {
  padding: 8px 18px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s;
  color: var(--text-light);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--coral);
  color: var(--white);
}

.nav-links a.active {
  box-shadow: 0 4px 12px rgba(255,107,107,0.35);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

/* Lang Switch Button */
.lang-switch {
  background: var(--bg-alt);
  border: 1.5px solid rgba(0,0,0,0.1);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  margin-left: 12px;
}

.lang-switch:hover {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- Page Layout --- */
.page {
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 60px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Home Page Background --- */
.page-home {
  position: relative;
  overflow: hidden;
}

.hero-bg-blobs {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.18;
}

.blob-1 {
  width: 360px;
  height: 360px;
  background: var(--coral);
  top: 20px;
  left: -80px;
  animation: blobFloat 18s ease-in-out infinite;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: var(--purple);
  top: 200px;
  right: -60px;
  animation: blobFloat 22s ease-in-out infinite reverse;
}

.blob-3 {
  width: 250px;
  height: 250px;
  background: var(--teal);
  bottom: 100px;
  left: 40%;
  animation: blobFloat 20s ease-in-out infinite 2s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

.page-home .container {
  position: relative;
  z-index: 1;
}

/* --- Hero (Home) --- */
.hero {
  text-align: center;
  padding: 70px 0 50px;
  position: relative;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 28px;
}

.hero-text {
  text-align: left;
  flex: 1;
}

.hero-text .hero-badge {
  margin-bottom: 14px;
}

.hero-text h1 {
  margin-bottom: 8px;
}

/* Photo with animated gradient border */
.hero-photo-wrap {
  position: relative;
  width: 220px;
  height: 268px;
  flex-shrink: 0;
  border-radius: 22px;
  padding: 3px;
  background: linear-gradient(135deg, var(--coral), var(--purple), var(--teal), var(--yellow), var(--coral));
  background-size: 300% 300%;
  animation: borderFlow 6s ease-in-out infinite;
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
}

@keyframes borderFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #e8eef5 0%, #d5dce8 100%);
}

/* Hero avatar removed — now using photo with orbiting dots */

@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.08); opacity: 0.15; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  background: rgba(108,92,231,0.08);
  color: var(--purple);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
  border: 1px solid rgba(108,92,231,0.15);
  letter-spacing: 0.3px;
  animation: badgeBounce 4s ease-in-out infinite;
}

@keyframes badgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.5px;
  word-spacing: 2px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: none;
}

.hero-desc {
  font-size: 1.02rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 12px;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* --- Presentation Banner --- */
.presentation-banner {
  text-align: center;
  margin-bottom: 8px;
}

.presentation-banner a {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--purple-light), var(--purple), var(--purple-dark));
  background-size: 200% 200%;
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(108,92,231,0.25);
  animation: bannerGlow 3s ease-in-out infinite, gradientShift 6s ease-in-out infinite;
}

@keyframes bannerGlow {
  0%, 100% { box-shadow: 0 4px 16px rgba(108,92,231,0.25); }
  50% { box-shadow: 0 8px 28px rgba(108,92,231,0.45); }
}

.presentation-banner a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(108,92,231,0.4);
}

/* --- Quick Nav Cards (Home) --- */
.quick-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px 0 50px;
}

.quick-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 24px 28px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s;
  cursor: pointer;
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.04);
  transform-style: preserve-3d;
  will-change: transform;
}

/* Mouse-follow glare on quick cards */
.quick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.25), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1;
}

.quick-card:hover::before {
  opacity: 1;
}

.quick-card-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.quick-card:nth-child(1) .quick-card-glow { background: var(--coral); }
.quick-card:nth-child(2) .quick-card-glow { background: var(--purple); }
.quick-card:nth-child(3) .quick-card-glow { background: var(--teal); }

.quick-card:hover .quick-card-glow {
  opacity: 0.12;
}

.quick-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: transparent;
}

.quick-card:nth-child(1) { border-top: 4px solid var(--coral); }
.quick-card:nth-child(2) { border-top: 4px solid var(--purple); }
.quick-card:nth-child(3) { border-top: 4px solid var(--teal); }
.quick-card:nth-child(4) { border-top: 4px solid var(--yellow); }

.quick-card .icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
  display: inline-block;
  transition: transform 0.35s;
  animation: iconBounce 3s ease-in-out infinite;
}

.quick-card:nth-child(1) .icon { animation-delay: 0s; }
.quick-card:nth-child(2) .icon { animation-delay: 0.4s; }
.quick-card:nth-child(3) .icon { animation-delay: 0.8s; }

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.quick-card:hover .icon {
  transform: scale(1.15);
}

.quick-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.quick-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 14px;
}

.quick-card-arrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.35s;
}

.quick-card:hover .quick-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  padding: 40px 0 48px;
}

.section-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--coral), var(--purple), var(--teal), var(--purple), var(--coral));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textGradient 8s ease-in-out infinite;
}

@keyframes textGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.section-header .accent {
  display: inline-block;
  width: 60px;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- About Page --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding-bottom: 40px;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--card-shadow);
  border-left: 5px solid var(--coral);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: cardFloat 5s ease-in-out infinite;
}

.about-card:nth-child(2) { animation-delay: 0.5s; }
.about-card:nth-child(3) { animation-delay: 1s; }
.about-card:nth-child(4) { animation-delay: 1.5s; }

@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.about-card:nth-child(2) { border-left-color: var(--purple); }
.about-card:nth-child(3) { border-left-color: var(--teal); }
.about-card:nth-child(4) { border-left-color: var(--yellow); }

.about-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-card h2 .emoji {
  font-size: 1.5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
  animation: tagWave 4s ease-in-out infinite;
}

.skill-tag:nth-child(2n) { animation-delay: 0.3s; }
.skill-tag:nth-child(3n) { animation-delay: 0.6s; }
.skill-tag:nth-child(4n) { animation-delay: 0.9s; }
.skill-tag:nth-child(5n) { animation-delay: 1.2s; }

@keyframes tagWave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.skill-tag:hover {
  transform: translateY(-5px) scale(1.08) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.skill-tag:nth-child(5n+1) { background: var(--coral); }
.skill-tag:nth-child(5n+2) { background: var(--purple); }
.skill-tag:nth-child(5n+3) { background: var(--teal); }
.skill-tag:nth-child(5n+4) { background: var(--pink); }
.skill-tag:nth-child(5n+5) { background: var(--blue); }

.edu-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.edu-item:last-child {
  border-bottom: none;
}

.edu-item .school {
  font-weight: 700;
  font-size: 1.05rem;
}

.edu-item .detail {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* --- Projects Page --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-bottom: 40px;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.project-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.project-card-banner {
  padding: 18px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  min-height: 80px;
  animation: bannerPulse 4s ease-in-out infinite;
}

@keyframes bannerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.project-card:nth-child(1) .project-card-banner { background: linear-gradient(135deg, var(--coral), var(--coral-dark)); }
.project-card:nth-child(2) .project-card-banner { background: linear-gradient(135deg, var(--purple), var(--purple-dark)); }
.project-card:nth-child(3) .project-card-banner { background: linear-gradient(135deg, var(--teal), #00A381); }
.project-card:nth-child(4) .project-card-banner { background: linear-gradient(135deg, var(--pink), #E84393); }
.project-card:nth-child(5) .project-card-banner { background: linear-gradient(135deg, var(--blue), #5B9BD5); }
.project-card:nth-child(6) .project-card-banner { background: linear-gradient(135deg, var(--yellow), #F0B62D); }

.project-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.project-card-body p {
  color: var(--text-light);
  font-size: 0.82rem;
  flex: 1;
  margin-bottom: 10px;
  line-height: 1.5;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.project-tag {
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-alt);
  color: var(--text-light);
}

.project-link {
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
height: 32px;
padding: 0 12px;
border-radius: 16px;
font-weight: 600;
font-size: 0.78rem;
transition: all 0.25s;
width: 100%;
box-sizing: border-box;
}

.project-card:nth-child(1) .project-link { background: #FFE0E0; color: var(--coral-dark); }
.project-card:nth-child(2) .project-link { background: #E8E4FF; color: var(--purple-dark); }
.project-card:nth-child(3) .project-link { background: #D4F7EE; color: #00A381; }
.project-card:nth-child(4) .project-link { background: #FFE0EC; color: #E84393; }
.project-card:nth-child(5) .project-link { background: #E0EEFF; color: #5B9BD5; }
.project-card:nth-child(6) .project-link { background: #FFF4D6; color: #C8960C; }

.project-link:hover {
  filter: brightness(0.95);
  transform: scale(1.04);
}

/* --- Project showcase modal --- */
.showcase-trigger {
  cursor: context-menu;
}

.showcase-trigger:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}

.modal-open {
  overflow: hidden;
}

.showcase-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  z-index: 2000;
}

.showcase-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.showcase-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 34, 0.68);
  backdrop-filter: blur(8px);
}

.showcase-modal__dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(86vh, 900px);
  overflow-y: auto;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(10, 8, 28, 0.4);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.24s ease;
}

.showcase-modal.is-open .showcase-modal__dialog {
  transform: translateY(0) scale(1);
}

.showcase-modal__content {
  padding: 44px clamp(22px, 5vw, 56px) 56px;
}

.showcase-modal__eyebrow {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.showcase-modal h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.showcase-modal__description {
  max-width: 780px;
  margin: 14px 0 30px;
  color: var(--text-light);
  line-height: 1.7;
}

.showcase-modal__gallery {
  display: grid;
  gap: 28px;
}

.showcase-modal__gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(108, 92, 231, 0.13);
  border-radius: 16px;
  background: #f8f8fc;
  box-shadow: 0 10px 28px rgba(22, 18, 55, 0.1);
}

.showcase-modal__gallery img {
  display: block;
  width: 100%;
  height: auto;
}

.showcase-modal__close {
  position: sticky;
  top: 16px;
  float: right;
  z-index: 1;
  width: 40px;
  height: 40px;
  margin: 16px 16px 0 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 4px 14px rgba(28, 23, 62, 0.14);
  color: var(--text);
  cursor: pointer;
  font-size: 1.85rem;
  line-height: 1;
}

.showcase-modal__close:hover,
.showcase-modal__close:focus-visible {
  background: var(--purple);
  color: var(--white);
  outline: none;
}

/* --- Leadership Page --- */
.leadership-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 40px;
}

.leadership-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.3s;
  border-left: 5px solid transparent;
}

.leadership-item:nth-child(1) { border-left-color: var(--coral); }
.leadership-item:nth-child(2) { border-left-color: var(--purple); }
.leadership-item:nth-child(3) { border-left-color: var(--teal); }
.leadership-item:nth-child(4) { border-left-color: var(--yellow); }
.leadership-item:nth-child(5) { border-left-color: var(--pink); }

.leadership-item:hover {
  transform: translateX(4px);
  box-shadow: var(--card-shadow-hover);
}

.leadership-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leadership-item:nth-child(1) .leadership-icon { background: #FFE0E0; }
.leadership-item:nth-child(2) .leadership-icon { background: #E8E4FF; }
.leadership-item:nth-child(3) .leadership-icon { background: #D4F7EE; }
.leadership-item:nth-child(4) .leadership-icon { background: #FFF4D6; }
.leadership-item:nth-child(5) .leadership-icon { background: #FFE0EC; }

.leadership-content h3 {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.leadership-content .role {
  color: var(--purple);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.leadership-content .desc {
  color: var(--text-light);
  font-size: 0.93rem;
}

.awards-section {
  padding-bottom: 40px;
}

.awards-section h2 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 28px;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.award-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.25s;
}

.award-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.award-medal {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.award-info h4 {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.award-info .detail {
  font-size: 0.83rem;
  color: var(--text-light);
}

/* --- Tabs --- */
.tab-nav {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  justify-content: center;
  position: relative;
  border-bottom: 1.5px solid #e1e4e8;
}

.tab-indicator {
  position: absolute;
  bottom: -1.5px;
  left: 0;
  height: 2px;
  background: var(--purple);
  border-radius: 1px;
  pointer-events: none;
  transition: left 0.3s cubic-bezier(.4,0,.2,1), width 0.3s cubic-bezier(.4,0,.2,1);
}

.tab-btn {
  padding: 12px 28px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s;
  font-family: inherit;
  position: relative;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--text);
  font-weight: 600;
}

.tab-panel, .tab-content {
  display: none;
}

.tab-panel.active, .tab-content.active {
  display: block;
}

/* --- Research & Work Page --- */
.research-section {
  padding-bottom: 24px;
}

.research-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0f0f0;
}

.research-entry {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--card-shadow);
  margin-bottom: 18px;
  transition: all 0.3s;
  border-left: 5px solid var(--coral);
  position: relative;
  overflow: hidden;
}

.research-entry:nth-child(2) { border-left-color: var(--purple); }
.research-entry:nth-child(3) { border-left-color: var(--teal); }
.research-entry:nth-child(4) { border-left-color: var(--pink); }
.research-entry:nth-child(5) { border-left-color: var(--blue); }
.research-entry:nth-child(6) { border-left-color: var(--coral); }

.research-entry:hover {
  transform: translateX(3px);
  box-shadow: var(--card-shadow-hover);
}

.research-entry {
  position: relative;
  overflow: hidden;
}

.research-entry .entry-header {
  margin-bottom: 14px;
}

.research-entry .entry-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.research-entry .entry-header h3 .date {
  color: var(--purple);
  font-weight: 600;
  font-size: 1em;
  white-space: nowrap;
  flex-shrink: 0;
}

.research-entry .entry-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-light);
}

.research-entry .entry-meta .role {
  font-weight: 600;
}

.research-entry .entry-meta .award {
  color: var(--coral);
  font-weight: 700;
}

.research-entry ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-light);
  font-size: 0.93rem;
  line-height: 1.6;
}

.research-entry ul li {
  margin-bottom: 6px;
}

.research-entry ul li:last-child {
  margin-bottom: 0;
}

/* Repo link inside research entry — inline with role */
.research-entry .repo-link {
  font-size: 0.82rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
  word-break: break-all;
  white-space: nowrap;
}
.research-entry .repo-link:hover {
  color: var(--purple);
}
.research-entry .repo-link .link-icon {
  margin-right: 2px;
  font-size: 0.7rem;
}

/* Detail link (e.g., View Details →) */
.research-entry .detail-link {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
}
.research-entry .detail-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(107,91,181,0.3);
}

/* Clickable research entry card */
.research-entry-link {
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s, border-color 0.3s;
}
.research-entry-link:hover {
  border-color: var(--purple-light);
  box-shadow: 0 6px 24px rgba(107,91,181,0.12);
}

/* Publications */
.pub-entry {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--card-shadow);
  margin-bottom: 14px;
  border-left: 4px solid var(--yellow);
  transition: all 0.3s;
}

.pub-entry:last-child { border-left-color: var(--teal); }

.pub-entry:hover {
  transform: translateX(3px);
  box-shadow: var(--card-shadow-hover);
}

.pub-entry .pub-venue {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #FFF4D6;
  color: #C8960C;
  white-space: nowrap;
  flex-shrink: 0;
}

.pub-entry .pub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
}

.pub-entry .pub-header h3 {
  font-size: 1rem;
  color: var(--dark);
  margin: 0;
  line-height: 1.4;
}

.pub-entry .pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  white-space: nowrap;
}
.pub-entry .pub-link:hover { color: var(--purple); }
.pub-entry .pub-link .link-icon { font-size: 0.85rem; }

.pub-entry:last-child .pub-venue {
  background: #D4F7EE;
  color: #00A381;
}

.pub-entry h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.pub-entry .pub-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.pub-entry .pub-role-row .pub-link {
  flex-shrink: 0;
  margin-top: 0;
}
.pub-entry .pub-role {
  font-size: 0.85rem;
  color: var(--purple);
  font-weight: 600;
}

.pub-entry .pub-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* Language info items */
.lang-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.lang-item:last-child {
  border-bottom: none;
}

.lang-item .lang-name {
  font-weight: 700;
  font-size: 1rem;
}

.lang-item .lang-detail {
  color: var(--text-light);
  font-size: 0.87rem;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding-bottom: 40px;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s;
  display: block;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.contact-card:nth-child(1) { border-top: 4px solid var(--coral); }
.contact-card:nth-child(2) { border-top: 4px solid var(--purple); }
.contact-card:nth-child(3) { border-top: 4px solid var(--teal); }
.contact-card:nth-child(4) { border-top: 4px solid var(--yellow); }

.contact-card .icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
}

.contact-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.contact-card p {
  color: var(--text-light);
  font-size: 0.93rem;
  word-break: break-all;
}

/* --- Contact Section (homepage) — legacy, kept for reference --- */

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 36px 24px 32px;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--coral), var(--purple), var(--teal), transparent);
  opacity: 0.4;
}

.footer-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 24px;
  margin-bottom: 16px;
}

.footer-info-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-info-item svg {
  opacity: 0.6;
  flex-shrink: 0;
}

a.footer-info-item:hover {
  color: var(--blue);
}

a.footer-info-item:hover svg {
  opacity: 1;
}

.footer .heart {
  color: var(--coral);
  display: inline-block;
  animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.2); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

/* --- PPT Password Modal --- */
.ppt-pw-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.ppt-pw-modal.show {
  display: flex;
}

.ppt-pw-box {
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px 28px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  text-align: center;
  width: 340px;
  max-width: 92vw;
}

.ppt-pw-box h2 {
  color: var(--purple);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.ppt-pw-sub {
  color: var(--text-light);
  font-size: 0.82rem;
  margin-bottom: 22px;
}

.ppt-pw-box input {
  display: block;
  width: 240px;
  margin: 0 auto;
  padding: 11px 14px;
  border: 1.5px solid #d8dce4;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
  outline: none;
  transition: border 0.2s;
  font-family: inherit;
  letter-spacing: 1px;
}

.ppt-pw-box input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.08);
}

.ppt-pw-btn {
  display: block;
  width: 240px;
  margin: 14px auto 0;
  padding: 11px;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.ppt-pw-btn:hover {
  background: var(--purple-dark);
}

.ppt-pw-err {
  color: #e74c3c;
  font-size: 0.78rem;
  margin-top: 10px;
  display: none;
}

.ppt-pw-cancel {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
}

.ppt-pw-cancel:hover {
  color: var(--text);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children reveal */
.fade-in.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in.visible > *:nth-child(2) { transition-delay: 0.08s; }
.fade-in.visible > *:nth-child(3) { transition-delay: 0.16s; }
.fade-in.visible > *:nth-child(4) { transition-delay: 0.24s; }
.fade-in.visible > *:nth-child(5) { transition-delay: 0.32s; }

/* Award card slide-in */
.award-card {
  animation: slideInLeft 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Back to top button enhanced */
#back-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 999;
  box-shadow: 0 4px 16px rgba(108,92,231,0.3);
}

#back-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#back-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 24px rgba(108,92,231,0.45);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: none;
  }

  .nav-links.show {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-badge {
    font-size: 0.75rem;
  }

  .hero-content {
    flex-direction: column-reverse;
    gap: 24px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-photo-wrap {
    width: 140px;
    height: 170px;
  }

  .quick-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .footer-info {
    gap: 6px 16px;
  }

  .footer-info-item {
    font-size: 0.76rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

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

  .project-card.featured {
    grid-column: 1;
    grid-template-columns: 1fr;
  }

  .showcase-modal {
    padding: 14px;
  }

  .showcase-modal__dialog {
    max-height: 90vh;
    border-radius: 18px;
  }

  .showcase-modal__content {
    padding: 36px 20px 32px;
  }

  @media (max-width: 480px) {
    .projects-grid {
      grid-template-columns: 1fr;
    }
  }

  .awards-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
