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

:root {
  --bg: #07060e;
  --text: rgba(203, 213, 225, 0.7);
  --text-bright: rgba(255, 255, 255, 0.95);
  --accent-1: #a78bfa;
  --accent-2: #f472b6;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  position: relative;
}

/* ── Animated gradient background orbs ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: drift 18s ease-in-out infinite alternate,
             hueShift 12s linear infinite;
  will-change: transform, filter;
  pointer-events: none;
}

.orb--1 {
  width: 55vmax;
  height: 55vmax;
  top: -18%;
  left: -12%;
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  animation-duration: 22s, 12s;
}

.orb--2 {
  width: 45vmax;
  height: 45vmax;
  bottom: -20%;
  right: -10%;
  background: linear-gradient(315deg, #3b82f6, #8b5cf6, #d946ef);
  animation-duration: 26s, 15s;
  animation-delay: -4s, -3s;
}

.orb--3 {
  width: 30vmax;
  height: 30vmax;
  top: 40%;
  left: 55%;
  background: linear-gradient(225deg, #2563eb, #7c3aed, #f472b6);
  opacity: 0.25;
  animation-duration: 20s, 10s;
  animation-delay: -8s, -6s;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(6vw, -4vh) scale(1.08); }
  66%  { transform: translate(-4vw, 6vh) scale(0.95); }
  100% { transform: translate(3vw, 3vh) scale(1.03); }
}

@keyframes hueShift {
  0%   { filter: blur(120px) hue-rotate(0deg); }
  100% { filter: blur(120px) hue-rotate(360deg); }
}

/* ── Grain overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  opacity: 0.035;
  pointer-events: none;
  z-index: 10;
}

/* ── Floating particles ── */
.particles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  animation-name: rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-105vh) translateX(24px); opacity: 0; }
}

/* ── Cursor glow ── */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 3;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

/* ── Shared entrance animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Gradient text utility ── */
.gradient-text {
  background: linear-gradient(
    135deg,
    #93c5fd 0%,
    #a78bfa 25%,
    #c084fc 50%,
    #f472b6 75%,
    #93c5fd 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientFlow 8s ease infinite;
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ── Link styles ── */
a.styled-link {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.4s ease, letter-spacing 0.4s ease;
  position: relative;
}

a.styled-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width 0.4s ease, left 0.4s ease;
}

a.styled-link:hover {
  color: var(--text-bright);
  letter-spacing: 0.09em;
}

a.styled-link:hover::after {
  width: 100%;
  left: 0;
}

/* ── Hero ── */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 5;
  text-align: center;
  flex-direction: column;
  gap: 2rem;
  padding: 0 1.25rem;
}

.logo {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: clamp(3.5rem, 17vw, 11rem);
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1;
  animation: fadeUp 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* ── Acronym line ── */
.acronym {
  font-family: 'Sora', sans-serif;
  font-weight: 300;
  font-size: clamp(0.95rem, 3.1vw, 1.6rem);
  letter-spacing: 0.06em;
  line-height: 1.3;
  white-space: nowrap;
  animation: fadeUp 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.acronym .k {
  color: var(--text-bright);
  font-weight: 600;
}

.acronym .r {
  color: rgba(203, 213, 225, 0.45);
}

/* ── The flipping tail ── */
.flip {
  display: inline-block;
  position: relative;
  overflow: hidden;
  vertical-align: bottom;
  height: 1.35em;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.flip-word {
  display: inline-block;
  white-space: pre;
  color: transparent;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.38s ease;
}

.flip-word.out {
  transform: translateY(-0.9em);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .flip-word { transition: none; }
  .orb { animation: none; }
  .particle { display: none; }
}

.divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 139, 250, 0.6), transparent);
  animation: fadeUp 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both,
             pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; width: 48px; }
  50%      { opacity: 1; width: 64px; }
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  animation: fadeUp 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

.contact a {
  font-size: clamp(0.85rem, 2vw, 1.05rem);
}

/* Final I of the acronym shares the flipping tail's gradient */
.acronym .k--i {
  color: transparent;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  font-weight: 400;
}

@media (max-width: 400px) {
  .acronym { font-size: 0.85rem; letter-spacing: 0.04em; }
}
