/* =====================
   Variables
===================== */
:root {
  --bg: #0a0a0f;
  --primary: #7c65f6;
  --accent: #ff5e8f;
  --text: #ffffff;
  --muted: #babacd;
  --border: #1e1e2e;
  --surface: #13131a;
  --radius: 14px;
  --font-display: "Syne", sans-serif;
  --font-body: "JetBrains Mono", monospace;
  --space: 8px;
  --space-lg: 64px;
  --width: 100svw;
}

/* =====================
   Reset
===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none; !important;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--primary);
  color: var(--text);
}

/* =====================
   Background
===================== */
body {
  background: #0a0a0f;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  justify-content: space-between;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  /* Grid overlay */
  background-image:
    linear-gradient(rgba(102, 102, 125, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 102, 125, 0.1) 1px, transparent 1px);
  background-size: 64px 64px;
}

.bg-orbs {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 200vw;
  height: 200vh;
  translate: -50% -50%;
  z-index: 0;
  pointer-events: none;
  animation: orb-rotate 60s linear infinite;
  transform-origin: center center;

  /* Coloured orbs */
  background:
    radial-gradient(
      ellipse 640px 640px at 20% 20%,
      rgba(49, 42, 127, 0.7) 10%,
      transparent 100%
    ),
    radial-gradient(
      ellipse 640px 640px at 80% 80%,
      rgba(107, 37, 67, 0.7) 25%,
      transparent 100%
    ),
    radial-gradient(
      ellipse 640px 640px at 30% 90%,
      rgba(57, 57, 57, 0.5) 10%,
      transparent 100%
    );
  filter: blur(80px);
}

@keyframes orb-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

main {
  position: relative;
  z-index: 1;
}

.site-footer {
  position: relative;
  z-index: 1;
}

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

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

ul {
  list-style: none;
}

/* =====================
   Header
===================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  max-width: var(--width);
  padding: var(--space-lg);
  z-index: 100;
}

.header-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  color: var(--text) !important;
  background: rgba(124, 101, 246, 0.2);
  border: 1px solid var(--primary);
  padding: calc(var(--space) * 1) calc(var(--space) * 3);
  border-radius: 99px;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: rgba(124, 101, 246, 0.6);
}

/* =====================
   Hero
===================== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin-bottom: calc(var(--space) * 3);
  background: linear-gradient(90deg, #ffffff 0%, #7c65f6 50%, #ff5e8f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subheading {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--muted);
  margin-bottom: calc(var(--space) * 3);
  line-height: 1.3;
  letter-spacing: -0.05em;
}

.hero-body {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: calc(var(--space) * 5);
  max-width: 340px;
  line-height: 1.6;
  letter-spacing: -0.05em;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: calc(var(--space) * 3);
  font-family: var(--font-body);
}

.btn-primary {
  color: var(--text) !important;
  background: rgba(124, 101, 246, 0.2);
  border: 1px solid var(--primary);
  padding: calc(var(--space) * 1) calc(var(--space) * 3);
  border-radius: 99px;
  transition: background 0.2s !important;
  font-size: 14px;
}

.btn-primary:hover {
  background: rgba(124, 101, 246, 0.6);
}

.btn-secondary {
  font-size: 14px;
  color: var(--accent);
  transition: text-decoration 0.2s;
}

.btn-secondary:hover {
  text-decoration: underline;
}

/* =====================
   Hero text animation
===================== */
.heading-line {
  display: inline;
}

.sub-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(-12px);
  transition: none;
}

.sub-char--animate {
  animation: char-drop 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes char-drop {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================
   Footer
===================== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--width);
  padding: var(--space-lg);
  font-size: 12px;
  color: var(--muted);
}

.footer-left a {
  color: var(--muted);
  transition: color 0.2s;
}

.footer-left a:hover {
  color: var(--text);
}

.footer-github {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  transition: color 0.2s;
}

.footer-github:hover {
  color: var(--text);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.scroll-indicator {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  .bg-orbs {
    animation: none;
  }
}

/* =====================
   Custom cursor
===================== */

#cursor {
  position: fixed;
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 500;
  color: var(--primary);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -60%);
  line-height: 1;
  transition: color 0.15s;
  user-select: none;
}