
:root {
  --color-bg: #0e0f11;
  --color-surface: #1a1c20;
  --color-text: #e5e7eb;
  --color-primary: #3b82f6;
  --color-secondary: #8b5cf6;
  --color-accent: #10b981;
  --color-border: #2a2d33;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light mode overrides */
html:not(.dark) {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1f2937;
  --color-primary: #2563eb;
  --color-secondary: #7c3aed;
  --color-accent: #059669;
  --color-border: #e5e7eb;
}

html:not(.dark) .content p {
  color: #4b5563;
}

html:not(.dark) header p {
  color: #6b7280;
}

main {
  max-width: 64rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  padding-block: clamp(2rem, 5vh, 4rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vh, 3rem);
}

header h1 {
  margin-bottom: 0.5rem;
  text-align: center;
  position: relative;
}

/* Gradient text will be handled by Tailwind classes in HTML */

header p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #9ca3af;
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: clamp(1rem, 3vh, 1.5rem);
  color: var(--color-accent);
  text-shadow: 0 1px 1px #000, 0 0 15px rgba(16, 185, 129, 0.2);
  font-weight: 800;
  letter-spacing: -0.015em;
}

details {
  background: rgba(26, 28, 32, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

html:not(.dark) details {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

details:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

html:not(.dark) details:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-color: rgba(37, 99, 235, 0.3);
}

summary {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  font-weight: 700;
  width: 100%;
  padding: clamp(1rem, 3vw, 1.5rem);
  margin: 0;
  border-radius: 0.5rem;
  -webkit-user-select: none;
  user-select: none;
  transition: all 0.2s ease;
  cursor: pointer;
  color: var(--color-primary);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  outline: none;
  background-color: rgba(255, 255, 255, 0.02);
  letter-spacing: -0.01em;
}

html:not(.dark) summary {
  text-shadow: none;
  background-color: rgba(0, 0, 0, 0.02);
}

summary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-accent);
  transform: translateY(-1px);
}

html:not(.dark) summary:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

details[open] summary {
  color: var(--color-secondary);
  background: rgba(139, 92, 246, 0.1);
  border-bottom: 1px solid var(--color-border);
  border-radius: 0.5rem 0.5rem 0 0;
}

html:not(.dark) details[open] summary {
  background: rgba(124, 58, 237, 0.08);
}


.content {
  padding: clamp(1rem, 3vw, 1.5rem);
  background: rgba(0, 0, 0, 0.1);
  border-radius: 0 0 0.5rem 0.5rem;
}

html:not(.dark) .content {
  background: rgba(0, 0, 0, 0.03);
}

.content p {
  color: #d1d5db;
  font-size: clamp(0.9rem, 2vw, 1.125rem);
  line-height: 1.7;
  margin: 0;
  font-weight: 400;
}

/* Glass panel sections */
section {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2vh, 1rem);
}

/* Smooth content reveal animation */
details[open] .content {
  opacity: 0;
  animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Theme toggle button styling */
#theme-toggle {
  transition: all 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.3);
}

html:not(.dark) #theme-toggle {
  background-color: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

html:not(.dark) #theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-gradient-x {
    animation: none;
  }
}

details summary::marker {
  display: none;
}

.chevron {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: bold;
  color: var(--color-accent);
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
}

details[open] .chevron {
  color: var(--color-secondary);
}

/* Enhanced responsive breakpoints */
@media screen and (min-width: 768px) {
  main {
    gap: clamp(2.5rem, 5vh, 4rem);
  }
  
  details:hover {
    transform: translateY(-3px) scale(1.01);
  }
}

@media screen and (min-width: 1024px) {
  details {
    border-radius: 1rem;
  }
  
  summary {
    border-radius: 0.75rem;
  }
  
  .content {
    border-radius: 0 0 0.75rem 0.75rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-border: #4a4d55;
    --color-text: #ffffff;
  }
  
  details {
    border-width: 2px;
  }
}

/* Custom gradient animation for header */
@keyframes gradient-x {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.animate-gradient-x {
  background-size: 200% 200%;
  animation: gradient-x 8s ease infinite;
}
