/* ==========================================================================
   1. CSS VARIABLES (Theme Configuration)
   ========================================================================== */
:root {
  /* Dark Mode Palette */
  --bg-primary: #0a0c10;
  --bg-secondary: #12161f;
  --bg-card: #1a202c;
  
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-color: #38bdf8;       /* Bright blue accent */
  --accent-hover: #0284c7;
  --border-color: #2e384d;

  /* Typography */
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'Fira Code', Consolas, Monaco, monospace;

  /* Spacing & Layout */
  --container-max-width: 1100px;
  --radius: 8px;
  --transition: all 0.25s ease-in-out;
}

/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%; /* 16px default */
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.75em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

/* Responsive Images & Media */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   4. LAYOUT & RESPONSIVE CONTAINER
   ========================================================================== */
.container {
  width: 90%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 2rem 0;
}

/* Flexible Grid System for Content/Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ==========================================================================
   5. COMPONENTS (Cards, Buttons, Inputs)
   ========================================================================== */
/* Dark Mode Card */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
}

/* Action Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  background-color: var(--accent-color);
  color: var(--bg-primary);
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background-color: var(--accent-hover);
  color: #fff;
}

/* Form Controls */
input, textarea, select {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: inherit;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* ==========================================================================
   6. MOBILE & SMALL SCREEN ADJUSTMENTS (Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
  .container {
    width: 92%;
    padding: 1rem 0;
  }

  /* Make buttons stretch full-width on mobile */
  .btn {
    width: 100%;
    text-align: center;
  }
}