/* ----------------------------------------------------
   DESIGN SYSTEM & VARIABLES (Baby Blue Premium Theme)
---------------------------------------------------- */
:root {
  /* Primitive Tokens (Colors) */
  --blue-50: #F6FAFF;
  --blue-100: #DCEFFF;
  --blue-200: #CFE7FF;
  --blue-300: #8FC7FF;
  --blue-500: #5FAEFF;
  --blue-600: #479FFF;
  --blue-700: #2F6FE4;
  
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  
  /* Semantic Tokens */
  --bg-app: #2A3446;
  --bg-surface: #ffffff;
  --bg-navbar: rgba(255, 255, 255, 0.08);
  
  --text-main: var(--slate-800);
  --text-secondary: var(--slate-500);
  --text-heading: var(--slate-900);
  
  --primary: var(--blue-500);
  --primary-hover: var(--blue-700);
  --primary-light: var(--blue-100);
  --primary-border: var(--blue-200);
  
  --border-light: var(--blue-200);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-bg: rgba(255, 255, 255, 0.7);
  
  /* Spacing Scale */
  --space-2: 0.25rem;
  --space-4: 0.5rem;
  --space-6: 0.75rem;
  --space-8: 1rem;
  --space-12: 1.5rem;
  --space-16: 2rem;
  --space-24: 3rem;
  
  /* Typography Scale */
  --font-sans: 'Quicksand', 'Nunito', sans-serif;
  --font-display: 'Baloo 2', cursive;
  --font-chinese: 'Noto Serif SC', 'Georgia', serif;
  
  /* Shadow Tiers */
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.18);
  --shadow-glow: 0 12px 32px rgba(0, 0, 0, 0.16);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Transitions */
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background: linear-gradient(180deg, #2A3446 0%, #334155 100%),
              radial-gradient(circle at top center, rgba(95,174,255,0.12), transparent 60%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.25;
}

a {
  text-decoration: none;
  color: var(--blue-700);
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

/* ----------------------------------------------------
   CULTURAL BACKGROUND WATERMARKS
---------------------------------------------------- */
.watermark {
  position: fixed;
  font-family: var(--font-chinese);
  font-size: 9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.06);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  pointer-events: none;
  z-index: -2;
  letter-spacing: 2.5rem;
  user-select: none;
  transition: var(--transition-smooth);
}

.watermark-left {
  top: 18%;
  left: 3%;
}

.watermark-right {
  bottom: 12%;
  right: 3%;
}

@media (max-width: 1280px) {
  .watermark {
    display: none;
  }
}

/* ----------------------------------------------------
   NAVBAR (Glassmorphic)
---------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
  transition: var(--transition-smooth);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
}

.brand-seal {
  color: var(--blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.nav-brand:hover .brand-seal {
  transform: rotate(10deg) scale(1.1);
  color: var(--primary-hover);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 0%, var(--blue-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: var(--space-8);
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: var(--blue-700);
  background-color: var(--blue-100);
}

/* ----------------------------------------------------
   HERO / PROFILE SECTION
---------------------------------------------------- */
.hero-section {
  padding-top: 130px;
  padding-bottom: var(--space-16);
}

.profile-card {
  position: relative;
  background-color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-12);
  overflow: hidden;
}

/* Decorative Traditional Cloud Paths */
.cloud-decor-left, .cloud-decor-right {
  position: absolute;
  width: 150px;
  height: 75px;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.1;
  pointer-events: none;
}

.cloud-decor-left {
  top: 15px;
  left: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50'%3E%3Cpath d='M10 30 C 5 25, 0 35, 10 40 C 20 40, 25 30, 35 30 C 45 30, 50 40, 60 40 C 70 40, 75 30, 85 35 C 95 35, 90 25, 80 25 C 70 25, 65 30, 55 25 C 45 20, 35 25, 25 25 C 15 25, 12 30, 10 30 Z' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E");
}

.cloud-decor-right {
  bottom: 15px;
  right: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50'%3E%3Cpath d='M90 20 C 95 25, 100 15, 90 10 C 80 10, 75 20, 65 20 C 55 20, 50 10, 40 10 C 30 10, 25 20, 15 15 C 5 15, 10 25, 20 25 C 30 25, 35 20, 45 25 C 55 30, 65 25, 75 25 C 85 25, 88 20, 90 20 Z' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E");
}

.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
  position: relative;
  z-index: 1;
}

/* Calligraphic Seal / Moon Gate Avatar */
.moon-gate-avatar {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.seal-inner {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  border: 4px solid var(--blue-500);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--blue-100);
  box-shadow: 0 4px 16px rgba(95, 174, 255, 0.2);
  transition: var(--transition-smooth);
  z-index: 2;
}

.seal-char {
  font-family: var(--font-chinese);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--blue-700);
  line-height: 1;
}

.avatar-ring {
  position: absolute;
  width: 92px;
  height: 92px;
  border: 1.5px dashed var(--blue-500);
  border-radius: 50%;
  animation: spinRing 40s linear infinite;
  pointer-events: none;
}

@keyframes spinRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.profile-title {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.badge-major {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-700);
  background-color: var(--blue-100);
  padding: 4px 12px;
  border-radius: 20px;
  align-self: flex-start;
  border: 1px solid var(--primary-border);
}

.profile-title h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 4px;
  background: linear-gradient(135deg, #142033 0%, #1F376B 48%, #2563EB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-title .subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.info-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-12);
  border-top: 1px dashed var(--blue-200);
  border-bottom: 1px dashed var(--blue-200);
  padding: var(--space-8) 0;
  position: relative;
  z-index: 1;
}

.info-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.badge-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.badge-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 2px;
}

.profile-bio {
  font-size: 1.05rem;
  color: var(--text-main);
  text-align: justify;
  position: relative;
  z-index: 1;
  margin-top: var(--space-16);
}

.bio-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
  text-align: center;
}

.bio-kicker {
  color: var(--blue-700);
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.bio-heading h2 {
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  font-weight: 800;
  background: linear-gradient(180deg, #A9D8FF 0%, #78BFFF 50%, #5FAEFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 12px rgba(95,174,255,.35), 0 4px 18px rgba(95,174,255,.18);
  filter: drop-shadow(0 0 20px rgba(95,174,255,.2));
  position: relative;
}

.about-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow-sm);
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-12);
}

.goal-card {
  position: relative;
  background-color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  padding: var(--space-12);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.goal-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M30 40 L40 40 L40 30 Z' fill='%235FAEFF' fill-opacity='0.12'/%3E%3C/svg%3E");
  pointer-events: none;
}

.goal-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
  border-color: var(--blue-300);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--blue-100);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(95, 174, 255, 0.15);
}

.goal-card h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-4);
  color: var(--blue-700);
}

.goal-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: justify;
}

/* ----------------------------------------------------
   BENTO GRID / ASSIGNMENTS
---------------------------------------------------- */
.assignments-section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-kicker {
  display: inline-block;
  color: var(--blue-700);
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-4);
}

.section-header h2 {
  font-size: 2.8rem;
  letter-spacing: -0.02em;
  font-weight: 800;
  background: linear-gradient(180deg, #A9D8FF 0%, #78BFFF 50%, #5FAEFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 12px rgba(95,174,255,.35), 0 4px 18px rgba(95,174,255,.18);
  filter: drop-shadow(0 0 20px rgba(95,174,255,.2));
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: var(--space-4);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: var(--space-12);
}

.bento-card {
  position: relative;
  background-color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

/* Traditional Chinese Key Fret (Huiwen) Top Border Pattern */
.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 4 H4 V0 H12 V8 H8 V4 H10 V6' fill='none' stroke='%235FAEFF' stroke-opacity='0.5' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: contain;
  transition: var(--transition-smooth);
}

.bento-card:hover::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 4 H4 V0 H12 V8 H8 V4 H10 V6' fill='none' stroke='%232F6FE4' stroke-opacity='1' stroke-width='1.8'/%3E%3C/svg%3E");
}

.bento-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-glow);
  border-color: var(--blue-300);
}

.card-glow {
  position: absolute;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(95, 174, 255, 0.18) 0%, transparent 70%);
  top: -50px;
  right: -50px;
  border-radius: 50%;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.bento-card:hover .card-glow {
  transform: scale(3.5);
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: var(--space-12);
}

/* Calligraphic Red Stamp Style Card Number */
.card-number {
  font-family: var(--font-chinese);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue-500);
  border: 2.5px solid var(--blue-500);
  border-radius: 6px;
  padding: 2px 8px;
  width: fit-content;
  line-height: 1;
  background-color: var(--blue-100);
  box-shadow: inset 0 0 8px rgba(95, 174, 255, 0.12);
  transition: var(--transition-smooth);
}

.bento-card:hover .card-number {
  color: #ffffff;
  background-color: var(--blue-500);
  border-color: var(--blue-500);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(95, 174, 255, 0.3);
}

.card-main-info {
  margin-top: var(--space-4);
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--blue-700);
  letter-spacing: 1px;
  margin-bottom: var(--space-2);
}

.bento-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-heading);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: var(--space-4);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: justify;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--blue-200);
  padding-top: var(--space-4);
}

.read-more-btn {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-700);
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-more-btn .arrow {
  transition: var(--transition-fast);
}

.bento-card:hover .read-more-btn .arrow {
  transform: translateX(4px);
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--blue-100);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--blue-200);
}

/* Bento Grid Spans */
.card-large {
  grid-column: span 2;
}

/* ----------------------------------------------------
   REFLECTION & SUMMARY SECTION
---------------------------------------------------- */
.summary-section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.summary-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  box-shadow: var(--shadow-md);
  overflow: visible;
}

.summary-card::before {
  display: none;
}

.summary-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-16);
  text-align: center;
}

.summary-kicker {
  color: var(--blue-700);
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.summary-heading h2 {
  font-size: 2.8rem;
  letter-spacing: -0.02em;
  font-weight: 800;
  background: linear-gradient(180deg, #A9D8FF 0%, #78BFFF 50%, #5FAEFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 12px rgba(95,174,255,.35), 0 4px 18px rgba(95,174,255,.18);
  filter: drop-shadow(0 0 20px rgba(95,174,255,.2));
}

.summary-block h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-4);
  color: var(--blue-700);
}

.summary-block p,
.lesson-item p {
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.75;
}

.summary-intro,
.summary-lessons,
.summary-reflection {
  border-radius: var(--radius-md);
  padding: var(--space-12);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
}

.summary-intro,
.summary-lessons {
  margin-bottom: var(--space-12);
}

.experience-list {
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.experience-list p {
  padding-left: var(--space-8);
  border-left: 3px solid var(--blue-500);
}

.summary-emphasis {
  margin-top: var(--space-8);
  color: var(--blue-700) !important;
  font-weight: 600;
}

.lessons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.lesson-item {
  padding: var(--space-8);
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-sm);
}

.lesson-item h4 {
  margin-bottom: var(--space-4);
  color: var(--text-heading);
  font-size: 1rem;
}

.lesson-item h4 span {
  color: var(--blue-700);
  font-weight: 600;
}

.summary-reflection {
  border-left: 4px solid var(--blue-500);
}

.summary-reflection h3 {
  color: var(--text-heading);
}

.summary-footer {
  display: none;
}

/* ----------------------------------------------------
   FOOTER
---------------------------------------------------- */
.footer {
  background: linear-gradient(180deg, #2A3446 0%, #334155 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-left,
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-left {
  text-align: left;
}

.footer-right {
  text-align: right;
}

.footer-left strong,
.footer-left span,
.footer-right span {
  background: linear-gradient(135deg, #F8FCFF 0%, #DCEFFF 42%, #8FC7FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-left strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.footer-left span,
.footer-right span {
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .footer-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .footer-right {
    text-align: left;
  }
}

/* ----------------------------------------------------
   MODALS (Glassmorphic & Animations)
---------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-wrapper {
  background-color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 960px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(40px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.show .modal-wrapper {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-8) var(--space-12);
  border-bottom: 1px solid var(--blue-200);
  background-color: var(--blue-100);
}

.modal-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-700);
  text-transform: uppercase;
  background-color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--blue-200);
}

.modal-close-btn {
  font-size: 2.2rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--blue-700);
  transform: rotate(90deg);
}

.modal-body-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: var(--space-16);
  scroll-behavior: smooth;
}

/* ----------------------------------------------------
   MODAL INJECTED CONTENTS STYLING
---------------------------------------------------- */
.docx-content {
  font-family: var(--font-sans);
  color: var(--text-main);
  font-size: 1.05rem;
}

.docx-content h2, .docx-content h3 {
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  font-weight: 700;
}

.docx-content h2 {
  font-size: 1.8rem;
  color: var(--blue-700);
  border-left: 5px solid var(--blue-500);
  padding-left: var(--space-4);
}

.docx-content h3 {
  font-size: 1.35rem;
  color: var(--blue-700);
}

.docx-content p {
  margin-bottom: var(--space-6);
  text-align: justify;
}

.docx-content ul, .docx-content ol {
  margin-bottom: var(--space-8);
  padding-left: var(--space-12);
}

.docx-content li {
  margin-bottom: var(--space-2);
}

/* Table styling inside docx-content */
.docx-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-8) 0;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.docx-content th, .docx-content td {
  padding: var(--space-6) var(--space-8);
  text-align: left;
  border-bottom: 1px solid var(--blue-200);
}

.docx-content th {
  background-color: var(--blue-100);
  color: var(--blue-700);
  font-weight: 600;
  font-family: var(--font-display);
}

.docx-content tr:nth-child(even) {
  background-color: var(--blue-50);
}

.docx-content tr:hover {
  background-color: rgba(95, 174, 255, 0.05);
}

/* Image container and details */
.content-image-box {
  background-color: #ffffff;
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-8) auto;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--transition-smooth);
}

.content-image-box:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-300);
}

.content-image-box img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  transition: filter var(--transition-fast);
}

.content-image-box img:hover {
  filter: brightness(0.95);
}

.content-image-box .img-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--space-4);
  text-align: center;
  font-style: italic;
}

/* ----------------------------------------------------
   TIMELINE STYLING
---------------------------------------------------- */
.timeline {
  position: relative;
  margin: var(--space-12) 0;
  padding-left: var(--space-16);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--blue-500) 0%, var(--blue-200) 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-12);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-16) - 4px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--blue-500);
  border: 2px solid var(--blue-100);
  box-shadow: 0 0 10px rgba(95, 174, 255, 0.3);
}

.timeline-item h4 {
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
  color: var(--blue-700);
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

/* ----------------------------------------------------
   KEYFRAMES AND ANIMATIONS
---------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* ----------------------------------------------------
   RESPONSIVE DESIGN (Media Queries)
---------------------------------------------------- */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 260px;
  }
  
  .card-large {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .section-header h2 {
    font-size: 2.2rem;
  }

  .nav-links {
    gap: var(--space-4);
  }
  
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bio-heading h2 {
    font-size: 2rem;
  }

  .about-card {
    padding: var(--space-8) var(--space-12);
  }
  
  .badge-major {
    align-self: center;
  }
  
  .info-badges {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .goals-grid {
    grid-template-columns: 1fr;
  }
  
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  
  .card-large {
    grid-column: span 1;
  }
  
  .lessons-grid {
    grid-template-columns: 1fr;
  }

  .summary-card {
    padding: var(--space-8);
  }

  .summary-heading h2 {
    font-size: 2.2rem;
  }
  
  .modal-wrapper {
    width: 95%;
    height: 90vh;
  }
}

/* =====================================================
   CONTINUOUS PAGE SECTIONS
===================================================== */
.page {
  display: block;
  opacity: 1;
  transform: translateY(0);
  scroll-margin-top: 90px;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.page.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
