:root {
  --bg: #07111f;
  --bg-deep: #030712;
  --text: #f4f7fb;
  --muted: rgba(228, 235, 248, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(11, 22, 36, 0.46);
  --glass-strong: rgba(15, 27, 45, 0.68);
  --accent: #8ed8ff;
  --accent-strong: #67b8ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --radius-sm: 18px;
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top, rgba(51, 118, 255, 0.18), transparent 30%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
  overflow-x: hidden;
}

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

.page-shell {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px;
  isolation: isolate;
  overflow: clip;
}

.hero {
  position: relative;
  width: min(100%, 700px);
  z-index: 1;
}

h1 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.6vw, 0.95rem);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.8rem, 14vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.name-mark {
  width: clamp(3.2rem, 11vw, 5.6rem);
  height: clamp(3.2rem, 11vw, 5.6rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  animation: mark-enter 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.name-duck {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform-origin: center;
  transition: transform 220ms ease, filter 220ms ease;
}

.hero:hover .name-duck,
.hero:focus-within .name-duck {
  transform: scale(1.04) rotate(-2deg);
  filter: drop-shadow(0 10px 22px rgba(103, 184, 255, 0.16));
}

.name-text {
  display: inline-block;
  transform: translateY(0.08em);
  animation: text-enter 0.82s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.link-pill {
  min-width: 180px;
  padding: 16px 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 100%),
    var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.link-pill:hover,
.link-pill:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(142, 216, 255, 0.45);
  background-color: var(--glass-strong);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(142, 216, 255, 0.12),
    0 14px 36px rgba(79, 152, 255, 0.18);
}

.link-pill:focus-visible {
  outline: 2px solid rgba(142, 216, 255, 0.65);
  outline-offset: 3px;
}

.link-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.link-list .link-pill:nth-child(1) {
  animation: pill-enter 0.64s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

.link-list .link-pill:nth-child(2) {
  animation: pill-enter 0.64s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.link-list .link-pill:nth-child(3) {
  animation: pill-enter 0.64s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both;
}

.link-list .link-pill:nth-child(4) {
  animation: pill-enter 0.64s cubic-bezier(0.22, 1, 0.36, 1) 0.48s both;
}

.link-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex: 0 0 auto;
}

.link-icon svg {
  width: 100%;
  height: 100%;
}

.ambient,
.grid-glow {
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.ambient {
  width: 36rem;
  aspect-ratio: 1;
  filter: blur(12px);
  opacity: 0.82;
  animation: float-shift 16s ease-in-out infinite;
}

.ambient-left {
  top: -10rem;
  left: -10rem;
  background: radial-gradient(circle, rgba(67, 139, 255, 0.45), transparent 62%);
}

.ambient-right {
  right: -12rem;
  bottom: -12rem;
  animation-delay: -8s;
  background: radial-gradient(circle, rgba(48, 196, 173, 0.28), transparent 64%);
}

.grid-glow {
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 28%, transparent 78%);
  opacity: 0.26;
}

.hidden {
  display: none;
}

@keyframes mark-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.9) rotate(-8deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes text-enter {
  from {
    opacity: 0;
    transform: translate3d(-10px, 0.16em, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0.08em, 0);
  }
}

@keyframes pill-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes float-shift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, 18px, 0) scale(1.04);
  }
}

@media (max-width: 720px) {
  .page-shell {
    min-height: 100dvh;
    padding:
      max(20px, env(safe-area-inset-top))
      18px
      max(20px, env(safe-area-inset-bottom));
    align-items: center;
  }

  .hero {
    width: 100%;
  }

  .link-list {
    flex-direction: column;
  }

  .link-pill {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .ambient {
    width: 24rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
