:root {
  --night: #04051a;
  --ink-night: #efeaf9;
  --muted-night: #aeaad0;
  --glow: #ffe28a;
  --ink-day: #13284f;
  --sea-ink: #06324f;
  --sea-top: #a6e6f8;
  --serif: "Fraunces", Georgia, serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--night);
  color: var(--ink-night);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }

.wrap {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 32px);
}

/* ---------- canvases ---------- */

#stars, #fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#stars { z-index: 0; }
#fx    { z-index: 5; }

/* ---------- the sky ---------- */

.sky {
  background: linear-gradient(180deg,
    #04051a 0%,
    #070a26 22%,
    #0f1744 42%,
    #233477 60%,
    #5a74b8 75%,
    #9ebde6 88%,
    #cdeaf8 100%);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 12vh 0 16vh;
}
.hero .wrap { width: 100%; }

.moon {
  position: absolute;
  z-index: 1;
  top: 11vh;
  right: 11vw;
  font-size: clamp(56px, 9vw, 110px);
  width: 1em;
  height: 1em;
  border-radius: 50%;
  box-shadow: inset -0.24em 0.1em 0 0 #fff4d6;
  filter: drop-shadow(0 0 22px rgba(255, 244, 214, 0.45));
  transform: rotate(-12deg);
}

.kicker {
  font-family: var(--hand);
  font-size: 1.7rem;
  color: var(--glow);
  transform: rotate(-2deg);
  transform-origin: left;
  margin-bottom: 0.4rem;
}

h1 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
h1 .name {
  color: var(--glow);
  text-shadow: 0 0 34px rgba(255, 226, 138, 0.35);
}

.lede {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.25;
  margin-top: 1.4rem;
  max-width: 24ch;
}

.aside {
  margin-top: 1.1rem;
  max-width: 38ch;
  color: var(--muted-night);
}

.cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 5vh;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90vw;
  text-align: center;
  font-family: var(--hand);
  font-size: 1.45rem;
  color: var(--muted-night);
  text-decoration: none;
}
.cue .arrow {
  display: block;
  font-family: "Nunito", sans-serif;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* tech stack */
.stack { padding: 18vh 0 12vh; }

h2 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 650;
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.sub {
  font-family: var(--hand);
  font-size: 1.5rem;
  color: var(--muted-night);
  margin-top: 0.3rem;
}

.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 2.6rem;
}

.col {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 26px 24px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.col:nth-child(1) { rotate: -1.2deg; }
.col:nth-child(2) { rotate: 0.8deg; }
.col:nth-child(3) { rotate: -0.5deg; }

.col h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  font-family: var(--mono);
  font-size: 0.88rem;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  background: rgba(255, 226, 138, 0.12);
  border: 1px solid rgba(255, 226, 138, 0.32);
  color: #ffeebf;
}
.google .chips li {
  background: rgba(160, 190, 255, 0.1);
  border-color: rgba(160, 190, 255, 0.32);
  color: #dbe4ff;
}

.scribble {
  font-family: var(--hand);
  font-size: 1.45rem;
  color: var(--glow);
  margin-top: 0.9rem;
  transform: rotate(-2deg);
}

.everything {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  line-height: 1.1;
}

/* the long way down */
.descent {
  position: relative;
  height: 200vh;
}
.sign {
  position: absolute;
  z-index: 2;
  max-width: 70vw;
  font-family: var(--hand);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: rgba(239, 234, 249, 0.8);
}
.sign.dark { color: rgba(19, 40, 79, 0.75); }

/* ---------- the sea ---------- */

.sea {
  position: relative;
  color: var(--sea-ink);
  /* sunny shallows → twilight zone → proper deep */
  background: linear-gradient(180deg,
    var(--sea-top) 0%,
    #7fd4f1 12%,
    #4fb8e3 28%,
    #2a8fc6 42%,
    #1a639c 56%,
    #103d6e 72%,
    #0a2449 88%,
    #071a36 100%);
}

/* sunlight rays */
.rays {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  height: 130vh;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 0%, transparent 100%);
  mask-image: linear-gradient(#000 0%, transparent 100%);
}
.rays span {
  position: absolute;
  top: -10%;
  width: var(--w);
  height: 120%;
  background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  transform: skewX(-14deg);
  transform-origin: top;
  filter: blur(8px);
  animation: ray 7s ease-in-out infinite alternate;
  animation-delay: var(--delay);
}
@keyframes ray {
  0%   { opacity: 0.25; transform: skewX(-14deg) translateX(0); }
  100% { opacity: 0.7;  transform: skewX(-8deg) translateX(30px); }
}

/* fish */
.swimmers {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.fish {
  position: absolute;
  left: 0;
  font-size: var(--s);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.3em;
  animation: swim var(--d) linear infinite;
  animation-delay: var(--delay);
}
.fish.r { animation-name: swim-r; }
@keyframes swim {
  from { transform: translateX(110vw); }
  to   { transform: translateX(-30vw); }
}
@keyframes swim-r {
  from { transform: translateX(-30vw) scaleX(-1); }
  to   { transform: translateX(110vw) scaleX(-1); }
}

/* depth markers */
.deep {
  position: relative;
  height: 140vh;
}
.deep .sign { color: rgba(214, 240, 255, 0.75); }
.deep .sign.dark { color: rgba(6, 50, 79, 0.75); }

.waves {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 1px;
  height: 56px;
  transform: translateY(-100%);
  overflow: hidden;
  pointer-events: none;
}
.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  animation: drift 14s linear infinite;
}
.wave.back  { fill: #d4f4fc; opacity: 0.7; animation-duration: 22s; animation-direction: reverse; }
.wave.front { fill: var(--sea-top); }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.surfaced {
  text-align: center;
  padding-top: 10vh;
}

.label {
  font-family: var(--hand);
  font-size: 1.6rem;
  color: #0b4a70;
}

.leap {
  position: relative;
  height: 140px;
  max-width: 480px;
  margin: 0 auto -0.4rem;
  overflow: hidden;
}
.dolph-x, .dolph-y { position: absolute; display: block; }
.dolph-x {
  left: 50%;
  bottom: 0;
  margin-left: -0.5em;
  font-size: 3.4rem;
  line-height: 1;
  animation: leap-x 6s linear infinite;
}
.dolph-y {
  position: relative;
  animation: leap-y 6s infinite;
}
@keyframes leap-x {
  0%        { transform: translateX(120px); }
  50%, 100% { transform: translateX(-120px); }
}
@keyframes leap-y {
  0%        { transform: translateY(80px) rotate(38deg);  animation-timing-function: ease-out; }
  25%       { transform: translateY(-40px) rotate(0deg);  animation-timing-function: ease-in; }
  50%, 100% { transform: translateY(80px) rotate(-38deg); }
}

.sea h2 { color: var(--sea-ink); }

.dolphin-card {
  max-width: 720px;
  margin: 2.2rem auto 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 24px 60px -24px rgba(6, 50, 79, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--sea-ink);
  color: #bff0ff;
  padding: 0.3em 0.85em;
  border-radius: 999px;
}
.dolphin-card h3 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 650;
  margin: 0.7rem 0 0.5rem;
}
.dolphin-card p { max-width: 56ch; }

.how {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: 14px;
  counter-reset: step;
}
.how li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  font-size: 1rem;
}
.how li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sea-ink);
  color: #bff0ff;
  font-weight: 800;
  font-size: 0.9rem;
}
.step {
  display: block;
  font-family: var(--hand);
  font-size: 1.4rem;
  line-height: 1.1;
}

.chips.hw { margin-top: 1.4rem; }
.chips.hw li {
  background: rgba(6, 50, 79, 0.08);
  border-color: rgba(6, 50, 79, 0.25);
  color: var(--sea-ink);
}

.status {
  margin-top: 1.2rem;
  font-size: 0.95rem;
  opacity: 0.85;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 1.4rem;
  background: var(--sea-ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(6, 50, 79, 0.6);
}
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.url {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  opacity: 0.7;
  word-break: break-all;
}

.floor {
  padding: 6vh 0 4vh;
  text-align: center;
  color: #e8f8ff;
}
.bye {
  font-family: var(--hand);
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
}
.links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 1rem;
  font-weight: 700;
}
.links a {
  text-decoration: none;
  border-bottom: 2px solid rgba(232, 248, 255, 0.4);
  padding-bottom: 2px;
}
.links a:hover { border-bottom-color: #fff; }
.tiny {
  margin-top: 1.6rem;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* the sea floor */
.seabed {
  position: relative;
  z-index: 2;
  height: 260px;
}

.kelp span {
  position: absolute;
  bottom: 50px;
  width: 16px;
  height: var(--h);
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(90deg, #1f6b4a, #3a9a68 50%, #1f6b4a);
  transform-origin: bottom center;
  animation: sway 4.5s ease-in-out infinite alternate;
  animation-delay: var(--delay);
  opacity: 0.9;
}
@keyframes sway {
  from { transform: rotate(-7deg); }
  to   { transform: rotate(7deg); }
}

.rock {
  position: absolute;
  bottom: 44px;
  border-radius: 50% 50% 12px 12px;
  background: linear-gradient(#3a4a63, #1f2a3d);
}
.rock.r1 { left: 16%; width: 90px; height: 44px; }
.rock.r2 { right: 20%; width: 60px; height: 30px; }

.sand {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  overflow: hidden;
  border-radius: 50% 50% 0 0 / 18px 18px 0 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.25) 1px, transparent 2px) 0 0 / 23px 17px,
    linear-gradient(#d9c08e, #b89c68);
}
.crab {
  position: absolute;
  bottom: 12px;
  left: 2%;
  font-size: 1.8rem;
  animation: scuttle 16s ease-in-out infinite alternate;
}
@keyframes scuttle {
  from { left: 2%; }
  to   { left: calc(98% - 2rem); }
}

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  .cols { grid-template-columns: 1fr; }
  .moon { top: 7vh; right: 8vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
