/* ========================================
   Yubo Gong Personal Website
   Milton Academy Application Portfolio
   ======================================== */

:root {
  --navy: #1a2744;
  --navy-light: #2a3f6a;
  --blue: #3d6cb9;
  --blue-light: #5a8fd4;
  --gold: #c8a951;
  --gold-light: #e8d48b;
  --cream: #faf8f4;
  --white: #ffffff;
  --gray-100: #f5f5f7;
  --gray-200: #e8e8ec;
  --gray-400: #9a9aab;
  --gray-600: #5c5c6e;
  --gray-800: #2e2e3a;
  --text: #333340;
  --text-light: #5c5c6e;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(26,39,68,0.08);
  --shadow-lg: 0 12px 48px rgba(26,39,68,0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.3;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navigation ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.navbar.scrolled .nav-logo {
  color: var(--navy);
}

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

.nav-links a {
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.navbar.scrolled .nav-links a {
  color: var(--gray-600);
}

.navbar.scrolled .nav-links a:hover {
  color: var(--navy);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

.navbar.scrolled .nav-toggle span {
  background: var(--navy);
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, var(--blue) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(200,169,81,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(transparent, rgba(26,39,68,0.3));
  pointer-events: none;
}

.hero-content {
  text-align: center;
  z-index: 2;
  padding: 0 24px;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--white);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.7);
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-btn {
  display: inline-block;
  padding: 14px 36px;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: 50px;
  transition: var(--transition);
}

.hero-btn:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ---- Sections ---- */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--gray-100);
}

.section-title {
  font-size: 2.4rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
  font-weight: 300;
  margin-bottom: 56px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.section-title + .section-subtitle {
  margin-top: 12px;
}

/* ---- About Section ---- */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 48px;
}

.profile-photo {
  width: 280px;
  height: 360px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.about-text .lead {
  font-size: 1.15rem;
  color: var(--navy);
  font-weight: 500;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--text-light);
  font-size: 0.95rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
}

.highlight-item {
  text-align: center;
}

.highlight-number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
}

.highlight-label {
  display: block;
  font-size: 0.78rem;
  color: var(--gray-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ---- Academics Section ---- */
.academics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.academic-card {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--blue);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.academic-card h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-school {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 6px;
}

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

/* ---- Activities Section ---- */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.activity-card {
  background: var(--gray-100);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  overflow: hidden;
}

.activity-card:hover {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: var(--shadow);
}

.activity-photo {
  width: 100%;
  overflow: hidden;
}

.activity-photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.activity-card:hover .activity-photo img {
  transform: scale(1.05);
}

.activity-card h3,
.activity-card .activity-years,
.activity-card p {
  padding-left: 28px;
  padding-right: 28px;
}

.activity-card h3 {
  padding-top: 20px;
}

.activity-card p {
  padding-bottom: 28px;
}

.activity-card h3 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.activity-years {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.activity-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ---- Photo Gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(26,39,68,0.85));
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
}

/* ---- Projects Section ---- */
.projects-grid {
  max-width: 720px;
  margin: 0 auto;
}

.project-card {
  background: var(--white);
  padding: 44px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  position: relative;
  border: 1px solid var(--gray-200);
}

.project-card.featured {
  border-left: 4px solid var(--gold);
}

.project-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: rgba(200,169,81,0.1);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.project-card h3 {
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.project-description {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.project-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue);
  background: rgba(61,108,185,0.08);
  padding: 5px 14px;
  border-radius: 20px;
}

.project-motivation {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--gray-600);
  border-left: 3px solid var(--gold-light);
  padding-left: 16px;
  margin-bottom: 24px;
  line-height: 1.7;
}

.project-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: var(--transition);
}

.project-link:hover {
  color: var(--navy);
  text-decoration: underline;
}

/* ---- Interests Section ---- */
.interests-content {
  max-width: 800px;
  margin: 0 auto;
}

.interest-block {
  display: flex;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--gray-200);
}

.interest-block:last-child {
  border-bottom: none;
}

.interest-number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.5;
  line-height: 1;
  min-width: 72px;
}

.interest-detail h3 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.interest-detail p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* ---- Why Milton Section ---- */
.why-milton {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
}

.why-milton .section-title {
  color: var(--white);
}

.milton-content {
  max-width: 800px;
  margin: 0 auto;
}

.milton-text .lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 48px;
  text-align: center;
}

.milton-reasons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.reason {
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  transition: var(--transition);
}

.reason:hover {
  border-color: var(--gold);
  background: rgba(255,255,255,0.04);
}

.reason h4 {
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.reason p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
}

/* ---- Contact Section ---- */
.contact-container {
  text-align: center;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 20px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.contact-card svg {
  width: 32px;
  height: 32px;
  color: var(--blue);
}

.contact-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ---- Footer ---- */
.footer {
  padding: 32px 0;
  background: var(--navy);
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ---- Scroll Reveal Animation ---- */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-ready .revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    color: var(--gray-600) !important;
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

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

  .profile-photo {
    width: 200px;
    height: 260px;
    margin: 0 auto;
    display: block;
  }

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

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

  .academics-grid,
  .activities-grid,
  .milton-reasons {
    grid-template-columns: 1fr;
  }

  .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .interest-block {
    flex-direction: column;
    gap: 16px;
  }

  .interest-number {
    font-size: 2rem;
  }

  .section {
    padding: 64px 0;
  }

  .hero-name {
    font-size: 2.8rem;
  }
}

@media (max-width: 480px) {
  .about-highlights {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .highlight-number {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.8rem;
  }
}
