/* =============================================================
   main.css — Design tokens, reset, layout, typography
   ============================================================= */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Colour palette */
  --bg-base:        #f4f6f1;
  --bg-card:        #eef1ea;
  --bg-card-hover:  #e4e9df;
  --bg-surface:     #ffffff;
  --bg-code:        #11161d;

  --accent:         #0f6f62;
  --accent-light:   #149b86;
  --accent-dim:     rgba(15, 111, 98, 0.1);
  --accent-warm:    #b85c38;
  --accent-ink:     #172027;

  --text-primary:   #172027;
  --text-secondary: #4f5b5c;
  --text-muted:     #78817d;
  --text-code:      #e9f3ee;

  --border:         rgba(23, 32, 39, 0.14);
  --border-accent:  rgba(15, 111, 98, 0.42);

  /* Tech badge colours */
  --badge-llm:      #0f6f62;
  --badge-backend:  #345f7d;
  --badge-frontend: #7a5a20;
  --badge-cloud:    #275d8d;
  --badge-data:     #b85c38;
  --badge-mlops:    #6b4f73;

  /* Layout */
  --max-width:      1200px;
  --section-pad:    6rem 2rem;
  --card-radius:    8px;
  --nav-height:     64px;

  /* Transitions */
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --transition:     0.25s var(--ease-out);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    linear-gradient(rgba(23, 32, 39, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 39, 0.035) 1px, transparent 1px),
    var(--bg-base);
  background-size: 44px 44px;
  color: var(--text-primary);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover { color: var(--text-primary); }

ul { list-style: none; }

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: var(--section-pad); }

section:nth-of-type(even) {
  background:
    linear-gradient(135deg, rgba(15, 111, 98, 0.035), transparent 38%),
    var(--bg-card);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
}

.section-heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: 0;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 3rem;
}

.section-disclaimer {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 2rem;
  margin-top: -1.5rem;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1, h2 {
  font-family: 'Fraunces', Georgia, serif;
}

code, pre, .mono {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* ── Divider ────────────────────────────────────────────────── */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-ink);
  color: #fff;
  box-shadow: 0 10px 28px rgba(23, 32, 39, 0.18);
}
.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 111, 98, 0.22);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.54);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: #fff;
}

.btn-snippet {
  background: #fff;
  color: var(--accent-ink);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
}
.btn-snippet:hover {
  background: var(--accent-ink);
  color: #fff;
}

/* ── Responsive Breakpoints ─────────────────────────────────── */
@media (max-width: 768px) {
  :root { --section-pad: 4rem 1.25rem; }
  .section-heading { font-size: 1.75rem; }
}
