/* ============================================
   style.css — Global Styles & Variables
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ─── CSS Variables (Dark Mode Default) ─── */
:root {
  --bg-primary:    #0a0f1e;
  --bg-secondary:  #0d1424;
  --bg-card:       #111827;
  --bg-card-hover: #151f33;

  --accent-cyan:   #38bdf8;
  --accent-purple: #a855f7;
  --accent-grad:   linear-gradient(135deg, #38bdf8 0%, #a855f7 100%);

  --text-primary:  #f0f6ff;
  --text-secondary:#94a3b8;
  --text-muted:    #4b5e7a;

  --border:        rgba(56, 189, 248, 0.12);
  --border-hover:  rgba(56, 189, 248, 0.35);

  --radius-sm:     8px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --radius-pill:   999px;

  --font-display:  'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;

  --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) var(--bg-secondary);
}

html::-webkit-scrollbar { width: 4px; }
html::-webkit-scrollbar-track { background: var(--bg-secondary); }
html::-webkit-scrollbar-thumb { background: var(--accent-cyan); border-radius: var(--radius-pill); }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

/* Background mesh */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 8% 8%, rgba(56,189,248,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 92% 85%, rgba(168,85,247,0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Layout ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

main {
  position: relative;
  z-index: 1;
  padding-bottom: 100px;
}

/* ─── Typography ─── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ─── Section Utilities ─── */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ─── Card ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

/* ─── Gradient Text ─── */
.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
}

.flash {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 280px;
  max-width: 380px;
  padding: 14px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 99999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  font-family: "DM Sans", sans-serif;
  animation: slideIn 0.3s ease;
}

.flash-success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
}

.flash-error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
}

.flash-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  font-weight: bold;
}

.flash-text {
  font-size: 14px;
  font-weight: 500;
}

.flash-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.flash-close:hover {
  transform: scale(1.1);
}