/* ============================================================
   thedavar.net — DaVaR project hub
   Dark blue interactive theme
   ============================================================ */

:root {
  --bg-0: #030610;
  --bg-1: #060c1c;
  --bg-2: #0a1428;
  --ink: #e6edf8;
  --ink-dim: #8ea3c8;
  --ink-faint: #5a6d92;
  --blue: #3b82f6;
  --sky: #38bdf8;
  --cyan: #22d3ee;
  --indigo: #6366f1;
  --glow: rgba(56, 189, 248, 0.55);
  --card-border: rgba(99, 141, 218, 0.16);
  --card-bg: rgba(13, 25, 48, 0.55);
  --radius: 18px;
  --font: "Sora", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: default;
}

::selection { background: rgba(56, 189, 248, 0.35); color: #fff; }

/* ---------- background layers ---------- */

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 30% at 18% 22%, rgba(37, 99, 235, 0.16), transparent 70%),
    radial-gradient(32% 28% at 82% 12%, rgba(34, 211, 238, 0.10), transparent 70%),
    radial-gradient(45% 38% at 70% 85%, rgba(99, 102, 241, 0.12), transparent 70%);
  animation: aurora-drift 26s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

/* cursor glow follows the mouse */
#cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 560px; height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.10) 0%, rgba(59, 130, 246, 0.05) 35%, transparent 70%);
  transition: opacity 0.4s ease;
  will-change: transform;
}

/* scroll progress bar */
#progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 100;
  background: linear-gradient(90deg, var(--blue), var(--sky), var(--cyan));
  box-shadow: 0 0 12px var(--glow);
}

/* ---------- nav ---------- */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

nav.scrolled {
  padding: 12px clamp(20px, 5vw, 56px);
  background: rgba(4, 9, 22, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(99, 141, 218, 0.14), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.nav-logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}

.nav-logo .accent { color: var(--sky); }

.nav-links { display: flex; gap: 8px; }

.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover { color: #fff; background: rgba(56, 189, 248, 0.12); }

/* ---------- hero ---------- */

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

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 22px;
  opacity: 0;
  animation: rise-in 0.9s ease 0.2s forwards;
}

.hero-title {
  font-size: clamp(4rem, 16vw, 11rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  perspective: 800px;
}

.hero-title .letter {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 10%, #9cc8ff 55%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(60px) rotateX(45deg);
  animation: letter-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  text-shadow: 0 0 80px rgba(56, 189, 248, 0.35);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-title:hover .letter { animation-play-state: paused; }

@keyframes letter-in {
  to { opacity: 1; transform: translateY(0) rotateX(0deg); }
}

.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  color: var(--ink-dim);
  max-width: 640px;
  margin-top: 18px;
  opacity: 0;
  animation: rise-in 0.9s ease 0.9s forwards;
}

.hero-sub strong { color: var(--ink); font-weight: 700; }

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 42px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: rise-in 0.9s ease 1.15s forwards;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.btn {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.btn-primary {
  color: #04101f;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 12px 44px rgba(56, 189, 248, 0.55);
}

.btn-ghost {
  color: var(--ink);
  border-color: rgba(99, 141, 218, 0.35);
  background: rgba(13, 25, 48, 0.4);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover { border-color: var(--sky); box-shadow: 0 0 24px rgba(56, 189, 248, 0.25); }

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-faint);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0;
  animation: rise-in 1s ease 1.6s forwards;
}

.scroll-hint::after {
  content: "";
  display: block;
  width: 1px;
  height: 42px;
  margin: 10px auto 0;
  background: linear-gradient(180deg, var(--sky), transparent);
  animation: drip 1.8s ease-in-out infinite;
}

@keyframes drip {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- sections ---------- */

section { position: relative; padding: 110px clamp(20px, 6vw, 72px); max-width: 1280px; margin: 0 auto; }

.section-head { text-align: center; margin-bottom: 64px; }

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff 30%, #a8c6f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-blurb {
  color: var(--ink-dim);
  max-width: 620px;
  margin: 16px auto 0;
  font-size: 1.05rem;
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 0 clamp(20px, 6vw, 72px);
  max-width: 1280px;
  margin: -20px auto 0;
}

.stat {
  text-align: center;
  padding: 30px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
}

.stat-num {
  font-size: 2.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--ink-dim);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ---------- project grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

/* mouse-tracking sheen */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(56, 189, 248, 0.13), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

/* mouse-tracking border glow */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(56, 189, 248, 0.75), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover::before,
.card:hover::after { opacity: 1; }

.card:hover {
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.6), 0 0 40px rgba(56, 189, 248, 0.12);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(99, 102, 241, 0.18));
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: inset 0 0 18px rgba(56, 189, 248, 0.12);
}

.card-arrow {
  color: var(--ink-faint);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
  font-size: 1.15rem;
}

.card:hover .card-arrow { transform: translate(4px, -4px); color: var(--sky); }

.card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.card .card-domain {
  font-size: 0.8rem;
  color: var(--sky);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.card p {
  color: var(--ink-dim);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(99, 141, 218, 0.25);
  background: rgba(56, 189, 248, 0.06);
}

/* featured (spans 2 cols on wide screens) */
.card.featured { grid-column: span 2; }

@media (max-width: 760px) {
  .card.featured { grid-column: span 1; }
}

/* ---------- about ---------- */

.about-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 900px) {
  .about-wrap { grid-template-columns: 1fr; }
}

.about-text p { color: var(--ink-dim); font-size: 1.08rem; margin-bottom: 18px; }
.about-text p strong { color: var(--ink); }

.about-text .shoutout {
  position: relative;
  padding: 18px 22px;
  border-left: 3px solid var(--sky);
  border-radius: 0 14px 14px 0;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.10), rgba(56, 189, 248, 0.02));
  box-shadow: inset 0 0 30px rgba(56, 189, 248, 0.05);
}

.about-text .shoutout strong { color: var(--sky); }

.about-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.about-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
}

.orbit-core {
  width: 130px; height: 130px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.6rem;
  color: #fff;
  background: radial-gradient(circle at 30% 30%, #3b82f6, #0b2c66 75%);
  box-shadow: 0 0 60px rgba(59, 130, 246, 0.55), inset 0 0 30px rgba(147, 197, 253, 0.35);
  animation: pulse-core 4s ease-in-out infinite;
  z-index: 2;
}

@keyframes pulse-core {
  0%, 100% { box-shadow: 0 0 50px rgba(59, 130, 246, 0.45), inset 0 0 30px rgba(147, 197, 253, 0.3); }
  50%      { box-shadow: 0 0 90px rgba(56, 189, 248, 0.7), inset 0 0 36px rgba(147, 197, 253, 0.45); }
}

.orbit-ring {
  position: absolute;
  border: 1px dashed rgba(99, 141, 218, 0.3);
  border-radius: 50%;
  animation: spin linear infinite;
}

.orbit-ring.r1 { width: 230px; height: 230px; animation-duration: 22s; }
.orbit-ring.r2 { width: 340px; height: 340px; animation-duration: 38s; animation-direction: reverse; }

.orbit-ring .orbit-dot {
  position: absolute;
  top: -7px; left: 50%;
  width: 14px; height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  background: var(--bg-2);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- LLC banner ---------- */

.llc {
  max-width: 1280px;
}

.llc-inner {
  position: relative;
  text-align: center;
  padding: clamp(48px, 8vw, 88px) clamp(24px, 6vw, 72px);
  border-radius: 26px;
  border: 1px solid rgba(99, 141, 218, 0.22);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(37, 99, 235, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(13, 25, 48, 0.75), rgba(6, 12, 28, 0.9));
  overflow: hidden;
}

.llc-inner::before {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(147, 197, 253, 0.07), transparent);
  transform: skewX(-18deg);
  animation: sheen 6s ease-in-out infinite;
}

@keyframes sheen {
  0%, 60% { left: -60%; }
  100%    { left: 140%; }
}

.llc h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.llc p { color: var(--ink-dim); max-width: 560px; margin: 0 auto 30px; }

/* ---------- footer ---------- */

footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 56px 24px 40px;
  color: var(--ink-faint);
  font-size: 0.88rem;
  border-top: 1px solid rgba(99, 141, 218, 0.12);
  margin-top: 60px;
}

footer .foot-name { color: var(--ink-dim); font-weight: 700; }
footer a { color: var(--sky); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-title .letter { opacity: 1; transform: none; }
  .hero-eyebrow, .hero-sub, .hero-cta, .scroll-hint { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}
