/*
 * Portfolio landing page — converted from the Figma Make design (React + Tailwind).
 */

:root {
  --bg: #050810;
  --acid: #c8f135;
  --ink: #e8f0d8;
  --muted: #3a5040;
  --soft: #8ab090;
  --dim: #1e3a2a;
  --line: #1a3020;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Work Sans", sans-serif;
}

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

html { line-height: 1.5; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, p { margin: 0; padding: 0; font-weight: inherit; font-size: inherit; }
canvas, svg { display: block; }

::selection { background: var(--acid); color: #0a0a0a; }

/* ─── Stage ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.hero__grid,
.hero__orb,
.hero__water,
.hero__glow,
.hero__vignette,
.hero__grain {
  position: absolute;
  pointer-events: none;
}

.hero__grid,
.hero__water,
.hero__glow,
.hero__vignette,
.hero__grain { inset: 0; }

.hero__grid {
  z-index: 1;
  background-image:
    linear-gradient(rgba(200, 241, 53, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 241, 53, 0.012) 1px, transparent 1px);
  background-size: 80px 80px;
}

.hero__orb {
  z-index: 2;
  border-radius: 9999px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 20, 50, 0.4) 0%, transparent 70%);
}

.hero__orb--primary {
  background: radial-gradient(circle, rgba(0, 40, 80, 0.6) 0%, transparent 70%);
}

.hero__water { z-index: 4; mix-blend-mode: screen; }

.hero__glow {
  z-index: 6;
  background: radial-gradient(280px circle at 50% 50%, rgba(200, 241, 53, 0.06) 0%, transparent 70%);
}

/* Porthole-style edge darkening that contains the water */
.hero__vignette {
  z-index: 8;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 55%, rgba(2, 4, 8, 0.55) 80%, rgba(2, 4, 8, 0.92) 100%);
}

.hero__grain {
  z-index: 38;
  width: 100%;
  height: 100%;
  opacity: 0.25;
  mix-blend-mode: overlay;
}

/* ─── Corner labels ─────────────────────────────────────────────────────── */

.corner {
  position: absolute;
  z-index: 20;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--dim);
}

.corner--caps { text-transform: uppercase; letter-spacing: 0.2em; }
.corner--tl { top: 1.5rem; left: 2rem; }
.corner--tr { top: 1.5rem; right: 2rem; display: flex; align-items: center; gap: 0.5rem; }
.corner--bl { bottom: 3.75rem; left: 2rem; }
.corner--br { bottom: 3.75rem; right: 2rem; }

.status-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--acid);
  animation: pulse 2s ease-in-out infinite;
}

/* ─── Center content ────────────────────────────────────────────────────── */

.hero__content {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
}

.role-badge {
  position: relative;
  overflow: hidden;
  height: 28px;
  min-width: 140px;
  margin-bottom: 1.5rem;
  padding: 0.375rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-align: center;
}

.role-badge__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--acid);
  animation: slideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.name { line-height: 0.88; text-align: center; }

.name__line { display: flex; justify-content: center; }

.name__char {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(64px, 14vw, 200px);
  letter-spacing: -0.04em;
  transition: transform 0.12s ease-out;
}

.name__char--light {
  font-weight: 300;
  color: var(--ink);
  text-shadow: 0 0 60px rgba(200, 241, 53, 0.15);
}

.name__char--bold {
  font-weight: 900;
  font-style: italic;
  color: var(--acid);
  text-shadow: 0 0 80px rgba(200, 241, 53, 0.3);
}

.name__char--bold.is-glitching { text-shadow: 2px 0 #ff0080, -2px 0 #00ffff; }
.name__char--bold.is-glitching[data-glitch="1"] { animation: glitch1 0.35s steps(2); }
.name__char--bold.is-glitching[data-glitch="2"] { animation: glitch2 0.35s steps(2); }
.name__char--bold.is-glitching[data-glitch="3"] { animation: glitch3 0.35s steps(2); }

.tagline {
  max-width: 340px;
  margin-top: 2rem;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}

@media (min-width: 768px) {
  .tagline { font-size: 1rem; }
}

.contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: var(--soft);
  text-decoration: none;
  transition: color 0.2s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact:hover { color: var(--acid); }
.contact.is-magnetic { transition: color 0.2s, transform 0.12s ease-out; }

.contact__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.socials {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.socials a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}

.socials a:hover { color: var(--acid); }

/* ─── Status ticker ─────────────────────────────────────────────────────── */

.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  overflow: hidden;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(26, 48, 32, 0.6);
  font-size: 0.6875rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--dim);
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.ticker__track { display: flex; width: max-content; animation: marquee 80s linear infinite; }
.ticker__group { display: flex; }
.ticker__group > span { padding: 0 0.9rem; }
.ticker__dot { color: var(--acid); opacity: 0.6; }

/* ─── Load-in ───────────────────────────────────────────────────────────── */

/* "backwards" so the start state holds during the delay, then releases transforms back to JS */
.reveal { animation: reveal 1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s) backwards; }
.corner.reveal, .ticker.reveal { animation-name: fadeIn; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .ticker__track { animation: none; }
}

/* ─── Keyframes ─────────────────────────────────────────────────────────── */

@keyframes slideUp { from { transform: translateY(110%); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes reveal { from { opacity: 0; transform: translateY(24px); filter: blur(6px) } to { opacity: 1; transform: none; filter: none } }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.3 } }
@keyframes glitch1 { 0% { clip-path: inset(0 0 90% 0); transform: translate(-3px, 0) } 50% { clip-path: inset(40% 0 50% 0); transform: translate(3px, 0) } 100% { clip-path: inset(0); transform: translate(0) } }
@keyframes glitch2 { 0% { transform: translate(4px, -1px) skewX(-2deg) } 33% { transform: translate(-3px, 1px) skewX(3deg) } 66% { transform: translate(2px, 0) } 100% { transform: translate(0) } }
@keyframes glitch3 { 0% { clip-path: inset(60% 0 20% 0); transform: translate(2px, 0) } 50% { clip-path: inset(10% 0 70% 0); transform: translate(-4px, 0) } 100% { clip-path: inset(0); transform: translate(0) } }
