/* =========================================================
   BASE STYLES & THEME VARIABLES
   ========================================================= */

:root {
  /* Core palette - consistent across site */
  --purple-primary: #bf00ff;
  --purple-dark: #7a00cc;
  --purple-soft: #d580ff;

  /* Backgrounds */
  --bg-dark: #121212;
  --bg-secondary: #1f1f1f;
  --text-light: #eeeeee;
  --text-muted: #bbbbbb;

  /* Fonts */
  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --nav-height: 60px;
  --section-padding: 4rem 1.5rem;
  --container-max: 1000px;
}

/* Light mode overrides */
html.light {
  --bg-dark: #f7f7f9;
  --bg-secondary: #ffffff;
  --text-light: #111111;
  --text-muted: #333333;
  --purple-primary: #7a00cc;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: 1.2;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--purple-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover, a:focus {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

ul, ol {
  margin: 0;
  padding: 0;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Give anchored sections offset for fixed nav */
section, header {
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.cta-button,
.submit-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--purple-primary);
  color: #fff;
  font-weight: bold;
  font-family: var(--font-body);
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(191, 0, 255, 0.3);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.cta-button:hover,
.submit-button:hover {
  background: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(191, 0, 255, 0.4);
  text-decoration: none;
}

/* =========================================================
   FORMS
   ========================================================= */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--bg-secondary);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--purple-primary);
  box-shadow: 0 0 0 3px rgba(191, 0, 255, 0.15);
}

html.light .form-group input,
html.light .form-group textarea,
html.light .form-group select {
  border-color: #ccc;
}

/* =========================================================
   PAGE STRUCTURE
   ========================================================= */
main {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.page-header {
  text-align: center;
  padding: var(--section-padding);
  max-width: var(--container-max);
  margin: 0 auto;
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-intro {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.page-intro p {
  margin-bottom: 0;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reveal animation for timeline */
.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
