:root {
  /* ============================================================
     Theme: Midnight / Emerald — technology gateway
     ============================================================ */
  --bg-dark: #040D14;

  --glow-core: rgba(16, 185, 129, 0.35); /* Emerald */
  --glow-edge: rgba(6, 182, 212, 0.15);  /* Cyan */
  --accent: #10B981;
  --accent-soft: #34D399;
  --accent-cyan: #06B6D4;

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-soft: #E7EAF0;

  --glass-bg: rgba(15, 23, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 24px;
  --orb-blur: 65px;

  --radius-panel: 24px;
  --shadow-panel: 0 25px 50px -12px rgba(0, 0, 0, 0.6);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --focus-ring: 2px solid #34D399;
}

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

html { overflow-x: hidden; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

/* ---------- Ambient glow orb: organic multi-stage drift ---------- */
.ambient-orb {
  position: absolute;
  width: clamp(320px, 45vw, 600px);
  height: clamp(320px, 45vw, 600px);
  background: radial-gradient(circle, var(--glow-core) 0%, var(--glow-edge) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(var(--orb-blur));
  z-index: 0;
  animation: drift 29s var(--ease) infinite;
  will-change: transform, opacity;
  pointer-events: none;
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1);        opacity: 0.75; }
  22%  { transform: translate3d(-30px, 36px, 0) scale(1.08); opacity: 0.9; }
  46%  { transform: translate3d(20px, 62px, 0) scale(0.95);  opacity: 1; }
  68%  { transform: translate3d(44px, -14px, 0) scale(1.05); opacity: 0.85; }
  86%  { transform: translate3d(-16px, -42px, 0) scale(0.97); opacity: 0.92; }
  100% { transform: translate3d(0, 0, 0) scale(1);        opacity: 0.75; }
}

.gateway-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 800px;
  padding: clamp(1rem, 4vw, 2rem);
}

/* ---------- Glassmorphism panel ---------- */
.glass-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-panel);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  box-shadow: var(--shadow-panel);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-panel { background: rgba(4, 13, 20, 0.92); }
}

/* Real content always sits above the decorative glow layers */
.glass-panel .logo-mark,
.glass-panel .welcome-text {
  position: relative;
  z-index: 2;
}

/* ---------- Interactive glass spotlight ---------- */
/* Default state + touch fallback: a static, gently breathing glow */
.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.14), transparent 55%);
  opacity: 0.55;
  pointer-events: none;
  animation: glow-breathe 7s ease-in-out infinite;
  transition: opacity 0.4s var(--ease);
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.6; }
}

/* Enhanced state: a real layer moved with transform, driven by JS on fine pointers only */
.spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  transform: translate3d(var(--spot-x, 30%), var(--spot-y, 20%), 0);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: soft-light;
  will-change: transform, opacity;
  transition: opacity 0.4s var(--ease);
}

.glass-panel.has-pointer-tracking::before { opacity: 0; animation: none; }
.glass-panel.has-pointer-tracking .spotlight { opacity: 1; }

/* ---------- Staggered load choreography + accent pulses ---------- */
@keyframes revealUp {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes accentPulse {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%      { opacity: 0.88; transform: scale(1.015); }
}

.logo-mark {
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.15rem);
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  color: var(--text-muted);
  animation: revealUp 0.7s var(--ease) 0.05s both;
}

.logo-mark span {
  display: inline-block;
  color: var(--accent);
  animation: accentPulse 4.5s ease-in-out 1.6s infinite;
}

.title {
  font-size: clamp(1.5rem, 1.1rem + 2.2vw, 2.25rem);
  font-weight: 300;
  line-height: 1.4;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  animation: revealUp 0.7s var(--ease) 0.20s both;
}

.title .highlight {
  font-weight: 800;
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-cyan));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-top: 0.5rem;
  animation: accentPulse 5.5s ease-in-out 1.4s infinite;
}

.role {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: clamp(0.85rem, 0.78rem + 0.35vw, 1rem);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
  animation: revealUp 0.7s var(--ease) 0.35s both;
}

.divider {
  height: 1px;
  width: 60px;
  background: var(--glass-border);
  margin: 0 auto 2.5rem;
  animation: revealUp 0.6s var(--ease) 0.50s both;
}

.bio {
  font-size: clamp(0.95rem, 0.88rem + 0.35vw, 1.15rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-soft);
  animation: revealUp 0.7s var(--ease) 0.62s both;
}

/* ---------- Performance & accessibility guardrails ---------- */
@media (prefers-reduced-motion: reduce) {
  .ambient-orb,
  .logo-mark,
  .title,
  .role,
  .divider,
  .bio,
  .title .highlight,
  .logo-mark span,
  .glass-panel::before {
    animation: none !important;
  }

  .logo-mark,
  .title,
  .role,
  .divider,
  .bio {
    opacity: 1;
    transform: none;
  }
}

a:focus-visible,
button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

@media (max-width: 420px) {
  .ambient-orb { filter: blur(45px); }
}
