/* ============================================================
   GLOBAL STYLES — Blake Burnett Portfolio
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { color: var(--text-secondary); }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-violet    { color: var(--accent-violet-light); }
.text-cyan      { color: var(--accent-cyan); }

.mono { font-family: var(--font-mono); }

/* ── Layout helpers ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.section {
  padding-block: var(--space-3xl);
}

.section-sm {
  padding-block: var(--space-2xl);
}

/* ── Section labels ─────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-violet-light);
  margin-bottom: var(--space-sm);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.section-subheading {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: var(--space-xl);
}

/* ── Dividers ───────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-default) 30%,
    var(--border-default) 70%,
    transparent 100%
  );
  margin-block: 0;
}

.glow-line {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-violet-dim) 30%,
    var(--accent-violet) 50%,
    var(--accent-violet-dim) 70%,
    transparent 100%
  );
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-violet);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-violet-glow);
}

.btn-primary:hover {
  background: var(--accent-violet-light);
  box-shadow: var(--glow-violet);
  transform: translateY(-2px);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent-violet-light);
  outline-offset: 3px;
}

/* Glow pulse keyframe */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(139, 92, 246, 0.4); }
  50%       { box-shadow: 0 0 28px rgba(139, 92, 246, 0.7), 0 0 60px rgba(139, 92, 246, 0.2); }
}

.btn-primary-hero {
  animation: glowPulse 3s ease-in-out infinite;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
}

.btn-outline:hover {
  border-color: var(--accent-violet-light);
  color: var(--accent-violet-light);
  background: var(--accent-violet-dim);
  transform: translateY(-2px);
}

.btn-outline:focus-visible {
  outline: 2px solid var(--accent-violet-light);
  outline-offset: 3px;
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* ── Tag/Pill ───────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-violet-dim);
  color: var(--accent-violet-light);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.tag-cyan {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border-color: rgba(34, 211, 238, 0.25);
}

/* ── Card base ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.12), 0 8px 48px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}

/* ── Metric number ──────────────────────────────────────────── */
.metric-number {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1;
  letter-spacing: -0.03em;
}

/* ── Link arrows ────────────────────────────────────────────── */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--accent-violet-light);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.link-arrow:hover {
  gap: 0.625rem;
  color: var(--text-primary);
}

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

/* Scroll-triggered fade-in (below the fold) */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero on-load animation — plays immediately via CSS, no JS needed */
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-animate {
  opacity: 0;
  animation: heroReveal 0.7s ease forwards;
}

.hero-animate:nth-child(1) { animation-delay: 0.05s; }
.hero-animate:nth-child(2) { animation-delay: 0.15s; }
.hero-animate:nth-child(3) { animation-delay: 0.28s; }
.hero-animate:nth-child(4) { animation-delay: 0.40s; }
.hero-animate:nth-child(5) { animation-delay: 0.52s; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container {
    padding-inline: var(--space-md);
  }
  .section {
    padding-block: var(--space-2xl);
  }
}
