:root {
  --bg-primary: #030712;
  --bg-secondary: #0a0f1e;
  --bg-card: rgba(12, 20, 40, 0.65);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #22d3ee;
  --accent-blue: #3b82f6;
  --accent-purple: #a855f7;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #22d3ee 50%, #a855f7 100%);
  --glow-blue: rgba(59, 130, 246, 0.45);
  --glow-cyan: rgba(34, 211, 238, 0.35);
  --border-glass: rgba(148, 163, 184, 0.12);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --nav-height: 80px;
  --container-max: 1400px;
  --container-gutter: clamp(1rem, 2.5vw, 1.75rem);
  --radius-pill: 999px;
  --radius-card: 14px;
  /* Typography scale — section > subsection > card > body */
  --type-section-title: clamp(2.15rem, 4.2vw, 3.05rem);
  --type-section-subtitle: clamp(1rem, 1.65vw, 1.12rem);
  --type-subsection-title: clamp(1.85rem, 3.2vw, 2.4rem);
  --type-card-title: clamp(1.2rem, 1.55vw, 1.38rem);
  --type-card-title-sm: clamp(1.05rem, 1.25vw, 1.15rem);
  --type-body: 0.94rem;
  --type-body-sm: 0.84rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
  scrollbar-color: rgba(59, 130, 246, 0.55) #050a14;
  scrollbar-width: thin;
}

html::-webkit-scrollbar {
  width: 11px;
}

html::-webkit-scrollbar-track {
  background: #050a14;
}

html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.85), rgba(34, 211, 238, 0.75));
  border-radius: 999px;
  border: 2px solid #050a14;
}

html::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #60a5fa, #67e8f9);
}

/* Anchor targets — offset for fixed header */
#about,
#process,
#highlights,
#contact {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

.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;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.35);
}

.btn--primary:hover {
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.5);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.25);
}

.btn--nav {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(59, 130, 246, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(168, 85, 247, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 10% 60%, rgba(34, 211, 238, 0.06), transparent),
    var(--bg-primary);
}

.page-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

/* ── Scroll to top ─────────────────────────────────────────────── */

.scroll-top {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.5rem);
  bottom: clamp(1rem, 2.5vw, 1.5rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #e0f2fe;
  background:
    linear-gradient(155deg, rgba(14, 22, 44, 0.92) 0%, rgba(8, 14, 30, 0.85) 100%);
  border: 1px solid rgba(96, 165, 250, 0.4);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.92);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.scroll-top svg {
  width: 20px;
  height: 20px;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-top:hover {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(59, 130, 246, 0.35);
  transform: translateY(-2px) scale(1);
}

.scroll-top:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top {
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .scroll-top:hover {
    transform: none;
  }
}
