/* CSS Variables for Design System */
:root {
  /* Custom Color Palette */
  --primary-dark: #1a237e;
  --primary-medium: #7b68ee;
  --primary-light: #87ceeb;
  --primary-cream: #f5deb3;
  
  /* Derived colors for better contrast and hierarchy */
  --primary-darker: #0d1142;
  --primary-lighter: #b19cd9;
  --accent-blue: #4fc3f7;
  --accent-cream-dark: #deb887;
  
  /* Enhanced darker colors for hover states */
  --primary-dark-hover: #0f1654;
  --primary-medium-hover: #5a4fcf;
  --text-dark-hover: #1a1a1a;
  --border-dark-hover: #2c387e;
  
  /* Neutral colors */
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #424242;
  --gray-800: #2d2d2d;
  --gray-900: #1a1a1a;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-body: 1.6;
  --line-height-heading: 1.3;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
  --shadow-dark: 0 20px 25px -5px rgb(0 0 0 / 0.2), 0 10px 10px -5px rgb(0 0 0 / 0.1);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--white);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px) translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Main Content */
.main {
  padding: var(--space-12) 0 var(--space-20);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: var(--space-16);
  padding: var(--space-16) var(--space-8);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 50%, var(--primary-light) 100%);
  border-radius: var(--radius-2xl);
  position: relative;
  overflow: hidden;
  color: var(--white);
  animation: heroFloat 0.8s ease-out 0.4s both;
}

@keyframes heroFloat {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(135, 206, 235, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(245, 222, 179, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(123, 104, 238, 0.1) 0%, transparent 70%);
  pointer-events: none;
  animation: backgroundPulse 4s ease-in-out infinite;
}

@keyframes backgroundPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.hero-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
  line-height: var(--line-height-heading);
  position: relative;
  z-index: 1;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  }
  to {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 40px rgba(135, 206, 235, 0.3);
  }
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

/* Content */
.content {
  max-width: 800px;
  margin: 0 auto;
}

/* Sections */
.section {
  margin-bottom: var(--space-12);
  padding: var(--space-8);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: relative;
  transition: all var(--transition-slow);
  animation: sectionSlideIn 0.6s ease-out both;
  animation-delay: calc(var(--animation-order, 0) * 0.1s);
}

@keyframes sectionSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.section:nth-child(1) { --animation-order: 1; }
.section:nth-child(2) { --animation-order: 2; }
.section:nth-child(3) { --animation-order: 3; }
.section:nth-child(4) { --animation-order: 4; }
.section:nth-child(5) { --animation-order: 5; }
.section:nth-child(6) { --animation-order: 6; }
.section:nth-child(7) { --animation-order: 7; }
.section:nth-child(8) { --animation-order: 8; }
.section:nth-child(9) { --animation-order: 9; }
.section:nth-child(10) { --animation-order: 10; }
.section:nth-child(11) { --animation-order: 11; }

.section:hover {
  box-shadow: var(--shadow-dark);
  transform: translateY(-8px) scale(1.02);
  border-color: var(--border-dark-hover);
  background: linear-gradient(135deg, var(--white) 0%, rgba(26, 35, 126, 0.02) 100%);
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-darker), var(--primary-dark-hover), var(--primary-medium-hover), var(--primary-cream));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.section:hover::before {
  transform: scaleX(1);
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--primary-dark);
  margin-bottom: var(--space-6);
  line-height: var(--line-height-heading);
  position: relative;
  transition: color var(--transition-normal);
}

.section:hover .section-title {
  color: var(--primary-dark-hover);
  text-shadow: 0 2px 4px rgba(15, 22, 84, 0.1);
}

.subsection {
  margin-bottom: var(--space-8);
  animation: fadeIn 0.6s ease-out both;
  animation-delay: calc(var(--subsection-order, 0) * 0.2s + 0.3s);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subsection:last-child {
  margin-bottom: 0;
}

.subsection-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--primary-medium);
  margin-bottom: var(--space-6);
  line-height: var(--line-height-heading);
  position: relative;
  transition: color var(--transition-normal);
  padding-left: var(--space-8);
}

.section:hover .subsection-title {
  color: var(--primary-medium-hover);
}

.subsection-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(to bottom, var(--primary-light), var(--primary-medium-hover));
  border-radius: var(--radius-sm);
  transition: height var(--transition-slow);
  animation-delay: calc(var(--subsection-order, 0) * 0.1s + 0.5s);
}

.section:hover .subsection-title::before {
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-medium-hover), var(--primary-dark-hover));
}

/* Typography */
.text {
  color: var(--gray-800);
  margin-bottom: var(--space-4);
  line-height: var(--line-height-body);
  transition: color var(--transition-normal);
}

.text:last-child {
  margin-bottom: 0;
}

.section:hover .text {
  color: var(--text-dark-hover);
}

/* Lists */
.list {
  list-style: none;
  margin: var(--space-4) 0;
  padding: 0;
}

.list li {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--gray-800);
  line-height: var(--line-height-body);
  transition: all var(--transition-normal);
  animation: listItemSlide 0.4s ease-out both;
  animation-delay: calc(var(--item-order, 0) * 0.1s + 0.6s);
}

@keyframes listItemSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.list li:nth-child(1) { --item-order: 1; }
.list li:nth-child(2) { --item-order: 2; }
.list li:nth-child(3) { --item-order: 3; }
.list li:nth-child(4) { --item-order: 4; }
.list li:nth-child(5) { --item-order: 5; }
.list li:nth-child(6) { --item-order: 6; }
.list li:nth-child(7) { --item-order: 7; }

.list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 8px;
  background: linear-gradient(45deg, var(--primary-light), var(--primary-medium));
  border-radius: 50%;
  transform: translateY(-50%) scale(0);
  transition: all var(--transition-normal);
  box-shadow: 0 0 10px rgba(123, 104, 238, 0.3);
}

.section:hover .list li::before {
  transform: translateY(-50%) scale(1);
  background: linear-gradient(45deg, var(--primary-medium-hover), var(--primary-dark-hover));
  animation: bulletPulse 2s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(15, 22, 84, 0.4);
}

@keyframes bulletPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(15, 22, 84, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(15, 22, 84, 0.7);
  }
}

.list li:hover {
  color: var(--text-dark-hover);
  transform: translateX(4px);
}

.section:hover .list li {
  color: var(--text-dark-hover);
}

.list li:last-child {
  margin-bottom: 0;
}

/* Contact Information */
.contact-info {
  background: linear-gradient(135deg, var(--primary-cream) 0%, rgba(245, 222, 179, 0.7) 100%);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary-medium);
  margin-top: var(--space-4);
  position: relative;
  overflow: hidden;
  animation: contactSlideUp 0.6s ease-out 0.3s both;
  transition: all var(--transition-normal);
}

.section:hover .contact-info {
  background: linear-gradient(135deg, var(--accent-cream-dark) 0%, rgba(222, 184, 135, 0.8) 100%);
  border-left-color: var(--primary-dark-hover);
}

@keyframes contactSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-info::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(135, 206, 235, 0.1) 0%, transparent 70%);
  animation: contactGlow 3s ease-in-out infinite;
}

.section:hover .contact-info::before {
  background: radial-gradient(circle, rgba(15, 22, 84, 0.15) 0%, transparent 70%);
}

@keyframes contactGlow {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
}

.contact-item {
  margin-bottom: var(--space-3);
  color: var(--gray-800);
  position: relative;
  z-index: 1;
  transition: all var(--transition-normal);
}

.contact-item:hover {
  transform: translateX(4px);
}

.section:hover .contact-item {
  color: var(--text-dark-hover);
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item strong {
  color: var(--primary-dark);
  font-weight: var(--font-weight-semibold);
  transition: color var(--transition-normal);
}

.section:hover .contact-item strong {
  color: var(--primary-darker);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: var(--space-8) 0;
  margin-top: var(--space-20);
  position: relative;
  overflow: hidden;
  animation: footerSlideUp 0.6s ease-out 0.5s both;
}

@keyframes footerSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(135, 206, 235, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(245, 222, 179, 0.1) 0%, transparent 50%);
  animation: footerWave 6s ease-in-out infinite;
}

@keyframes footerWave {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

.footer-text {
  text-align: center;
  font-size: var(--font-size-sm);
  position: relative;
  z-index: 1;
  opacity: 0.9;
}

/* Scroll animations */
@media (prefers-reduced-motion: no-preference) {
  .section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
  }
  
  .section.animate-in {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .hero {
    padding: var(--space-12) var(--space-4);
    margin-bottom: var(--space-12);
  }
  
  .hero-title {
    font-size: var(--font-size-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--font-size-base);
  }
  
  .section {
    padding: var(--space-6);
    margin-bottom: var(--space-8);
  }
  
  .section-title {
    font-size: var(--font-size-xl);
  }
  
  .subsection-title {
    font-size: var(--font-size-lg);
    padding-left: var(--space-6);
  }
  
  .main {
    padding: var(--space-8) 0 var(--space-16);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: var(--font-size-2xl);
  }
  
  .section {
    padding: var(--space-4);
  }
  
  .section-title {
    font-size: var(--font-size-lg);
  }
  
  .subsection-title {
    padding-left: var(--space-4);
  }
  
  .nav-link {
    font-size: var(--font-size-sm);
    padding: var(--space-2) var(--space-4);
  }
}

/* Focus States for Accessibility */
.nav-link:focus {
  outline: 2px solid var(--primary-cream);
  outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer {
    display: none;
  }
  
  .section {
    box-shadow: none;
    border: 1px solid var(--gray-300);
    page-break-inside: avoid;
  }
  
  .hero {
    background: none;
    border: 1px solid var(--gray-300);
    color: var(--gray-900);
  }
}