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

/* CSS Custom Properties for Design System */
:root {
  /* Colors */
  --primary: #3b82f6;
  --primary-dark: #1e40af;
  --primary-light: #60a5fa;
  --secondary: #6366f1;
  --accent: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Semantic Colors */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --bg-primary: #ffffff;
  --bg-secondary: var(--gray-50);
  --border: var(--gray-200);
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  
  /* Typography Scale */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  
  /* Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.9rem + 1.75vw, 3.5rem);
  --text-5xl: clamp(3rem, 2.5rem + 2.5vw, 4.5rem);
  
  /* Spacing Scale */
  --space-xs: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --space-sm: clamp(0.75rem, 0.6rem + 0.75vw, 1rem);
  --space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --space-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  --space-xl: clamp(2rem, 1.6rem + 2vw, 3.5rem);
  --space-2xl: clamp(3rem, 2.4rem + 3vw, 5rem);
  --space-3xl: clamp(4rem, 3.2rem + 4vw, 7rem);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --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 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: var(--gray-100);
    --text-secondary: var(--gray-300);
    --text-muted: var(--gray-400);
    --bg-primary: var(--gray-900);
    --bg-secondary: var(--gray-800);
    --border: var(--gray-700);
    --surface: var(--gray-800);
    --surface-elevated: var(--gray-700);
  }
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Focus Management */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Container System */
.container {
  width: 100%;
  max-width: min(1200px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Modern Navigation */
.navbar {
  background: hsla(0, 0%, 100%, 0.8);
  backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  transition: all var(--transition);
}

.navbar.scrolled {
  background: hsla(0, 0%, 100%, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 4rem;
  padding: var(--space-sm) 0;
}

.nav-logo a {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-logo a:hover {
  color: var(--primary-dark);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--primary);
  background-color: var(--gray-50);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.5rem;
  height: 0.125rem;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* Modern Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: var(--z-modal);
}

.hamburger span {
  display: block;
  height: 0.125rem;
  width: 100%;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  opacity: 1;
  transform: rotate(0deg);
  transition: all var(--transition-fast);
  transform-origin: left center;
}

.hamburger span:nth-child(1) {
  margin-bottom: 0.375rem;
}

.hamburger span:nth-child(2) {
  margin-bottom: 0.375rem;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
  left: 0.1875rem;
}

.hamburger.active span:nth-child(2) {
  width: 0%;
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  left: 0.1875rem;
}

/* Hero Section with Modern Gradient */
.hero {
  background: linear-gradient(135deg, 
    hsl(231, 74%, 71%) 0%, 
    hsl(257, 46%, 58%) 50%, 
    hsl(286, 69%, 60%) 100%);
  color: white;
  padding: calc(5rem + var(--space-2xl)) 0 var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Glass Morphism Countdown */
.countdown-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin: var(--space-xl) auto;
  max-width: 50rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.countdown-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.countdown-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  backdrop-filter: blur(8px);
}

.countdown-number {
  display: block;
  font-size: var(--text-4xl);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.countdown-label {
  font-size: var(--text-sm);
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Modern Form Elements */
.date-info {
  text-align: center;
}

.date-info p {
  margin-bottom: var(--space-md);
  font-size: var(--text-lg);
  opacity: 0.95;
}

.date-picker {
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  margin-right: var(--space-md);
  font-size: var(--text-base);
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
}

.date-picker:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.25);
}

.date-picker::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Modern Button */
.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 600;
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Content Section */
.content {
  padding: var(--space-3xl) 0;
}

.main-article {
  max-width: 50rem;
  margin: 0 auto;
}

.main-article h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.main-article h3 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: var(--space-xl) 0 var(--space-md);
  color: var(--text-primary);
  line-height: 1.3;
}

.main-article h4 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin: var(--space-lg) 0 var(--space-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

.lead {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xl);
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 400;
}

.main-article p {
  margin-bottom: var(--space-md);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
}

/* Modern Blockquote */
blockquote {
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  border-left: 0.25rem solid var(--primary);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--text-secondary);
  position: relative;
  box-shadow: var(--shadow-sm);
}

blockquote::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: var(--space-md);
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.3;
  font-family: serif;
}

/* Modern Table */
.achievement-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--space-xl) 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.achievement-table th,
.achievement-table td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.achievement-table th {
  background: var(--gray-50);
  font-weight: 700;
  color: var(--text-primary);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.achievement-table tbody tr {
  transition: background-color var(--transition-fast);
}

.achievement-table tbody tr:hover {
  background: var(--gray-50);
}

.achievement-table tbody tr:last-child td {
  border-bottom: none;
}

/* Highlight Box */
.highlight-box {
  background: linear-gradient(135deg, 
    rgba(251, 191, 36, 0.1), 
    rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
  position: relative;
  backdrop-filter: blur(4px);
}

.highlight-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0.25rem;
  height: 100%;
  background: linear-gradient(to bottom, var(--warning), var(--warning));
  border-radius: var(--radius-full);
}

.highlight-box h4 {
  color: var(--warning);
  margin-bottom: var(--space-md);
  font-weight: 700;
}

.highlight-box ul {
  margin-left: var(--space-md);
  list-style-type: none;
}

.highlight-box li {
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  position: relative;
  padding-left: var(--space-md);
}

.highlight-box li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--warning);
  font-weight: bold;
}

/* Article Footer */
.article-footer {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 2px solid var(--border);
}

.article-footer h4 {
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  font-weight: 700;
}

.article-footer ol {
  margin-left: var(--space-lg);
  counter-reset: footer-counter;
}

.article-footer li {
  margin-bottom: var(--space-sm);
  counter-increment: footer-counter;
  position: relative;
}

.article-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.article-footer a:hover,
.article-footer a:focus {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Related Articles */
.related-articles {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-top: var(--space-xl);
}

.related-articles h4 {
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  font-weight: 700;
}

.related-articles ul {
  list-style: none;
  display: grid;
  gap: var(--space-md);
}

.related-articles li {
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.related-articles li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.related-articles a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: block;
  transition: color var(--transition-fast);
}

.related-articles a:hover,
.related-articles a:focus {
  color: var(--primary-dark);
}

/* Modern Footer */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: var(--space-3xl) 0 var(--space-xl);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--gray-700), 
    transparent);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section h4 {
  margin-bottom: var(--space-md);
  color: var(--gray-100);
  font-weight: 700;
  font-size: var(--text-lg);
}

.footer-section ul {
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}

.footer-section a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: var(--space-xs) 0;
}

.footer-section a:hover,
.footer-section a:focus {
  color: var(--gray-100);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--gray-800);
  color: var(--gray-500);
  font-size: var(--text-sm);
}

/* GDPR Notice */
.gdpr-notice {
  position: fixed;
  bottom: var(--space-md);
  left: var(--space-md);
  background: var(--gray-900);
  color: white;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  max-width: 20rem;
  box-shadow: var(--shadow-2xl);
  z-index: var(--z-toast);
  border: 1px solid var(--gray-700);
  backdrop-filter: blur(16px);
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-slow);
}

.gdpr-notice.show {
  transform: translateY(0);
  opacity: 1;
}

.gdpr-notice p {
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.gdpr-notice a {
  color: var(--primary-light);
  text-decoration: none;
}

.gdpr-notice a:hover {
  text-decoration: underline;
}

.gdpr-notice button {
  background: var(--primary);
  color: white;
  border: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
  width: 100%;
}

.gdpr-notice button:hover,
.gdpr-notice button:focus {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  background: var(--primary);
  color: white;
  border: none;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: var(--text-lg);
  z-index: var(--z-fixed);
  transition: all var(--transition);
  box-shadow: var(--shadow-lg);
  transform: scale(0);
  opacity: 0;
}

.back-to-top.show {
  transform: scale(1);
  opacity: 1;
}

.back-to-top:hover,
.back-to-top:focus {
  background: var(--primary-dark);
  transform: scale(1.1) translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --space-md: 1rem;
    --space-lg: 1.25rem;
    --space-xl: 2rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    flex-direction: column;
    background: hsla(0, 0%, 100%, 0.95);
    backdrop-filter: blur(16px) saturate(180%);
    padding: var(--space-lg);
    gap: var(--space-md);
    box-shadow: var(--shadow-xl);
    border-top: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu a {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    text-align: center;
  }

  .hero {
    padding: calc(4rem + var(--space-xl)) 0 var(--space-2xl);
  }

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

  .countdown-number {
    font-size: var(--text-2xl);
  }

  .countdown-container {
    padding: var(--space-lg);
  }

  .date-picker {
    margin-bottom: var(--space-md);
    margin-right: 0;
    width: 100%;
  }

  .btn-secondary {
    width: 100%;
  }

  .achievement-table {
    font-size: var(--text-sm);
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .achievement-table th,
  .achievement-table td {
    padding: var(--space-sm);
    min-width: 120px;
  }

  .gdpr-notice {
    left: var(--space-sm);
    right: var(--space-sm);
    max-width: none;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .nav-container {
    padding: var(--space-xs) 0;
  }

  .hero {
    padding: calc(4rem + var(--space-lg)) 0 var(--space-xl);
  }
}

/* Responsive adjustments for small screens */
@media (max-width: 480px) {
  .hero {
    padding: calc(3rem + var(--space-md)) 0 var(--space-lg);
  }
  
  .hero h1 {
    font-size: var(--text-3xl);
    line-height: 1.2;
  }
  
  .hero p {
    font-size: var(--text-base);
  }
}