:root {
  --bg: #0b0819;
  --bg-2: #120d28;
  --ink: #f8f2e4;
  --ink-dim: rgba(248, 242, 228, 0.62);
  --ink-faint: rgba(248, 242, 228, 0.14);
  --line: rgba(248, 242, 228, 0.11);
  --accent: #ffcd6b;
  --accent-warm: #ffb86b;
  --accent-cool: #8aa7ff;
  --accent-rose: #ff8fa3;
  --accent-mint: #7ee0c6;
  --radius: 22px;
  --max: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --paper: 248, 242, 228;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: default;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin: 0;
}

.serif-italic {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.handwritten {
  font-family: "Caveat", cursive;
  font-weight: 500;
}

/* ---------- Starfield canvas ---------- */
#stars {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Aurora background ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora .blob {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: drift 28s ease-in-out infinite;
}
.aurora .b1 {
  background: radial-gradient(circle at 30% 30%, #ff9f6b, transparent 60%);
  top: -25vmax; left: -10vmax;
}
.aurora .b2 {
  background: radial-gradient(circle at 70% 40%, #6d8dff, transparent 60%);
  top: 5vmax; right: -25vmax;
  animation-delay: -8s;
}
.aurora .b3 {
  background: radial-gradient(circle at 50% 60%, #ff7fa7, transparent 60%);
  bottom: -30vmax; left: 20vmax;
  animation-delay: -16s;
}
.aurora .b4 {
  background: radial-gradient(circle at 50% 50%, #7ee0c6, transparent 60%);
  bottom: -10vmax; right: -10vmax;
  opacity: 0.25;
  animation-delay: -22s;
}

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

/* ---------- Cursor sparkle trail ---------- */
.cursor-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}
.sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: sparkle-fade 900ms ease-out forwards;
}
.sparkle::before,
.sparkle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px currentColor;
}
.sparkle::before { width: 100%; height: 2px; }
.sparkle::after { width: 2px; height: 100%; }
@keyframes sparkle-fade {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0); }
  40% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(45deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(90deg); }
}

/* ---------- Floating doodles ---------- */
.doodle {
  position: fixed;
  color: rgba(255, 205, 107, 0.35);
  pointer-events: none;
  z-index: -1;
}
.doodle-star { width: 34px; top: 18%; left: 4%; animation: float-a 9s ease-in-out infinite; }
.doodle-planet { width: 80px; top: 55%; right: 3%; color: rgba(138, 167, 255, 0.3); animation: float-b 12s ease-in-out infinite; }
.doodle-spark { width: 24px; top: 8%; right: 12%; color: rgba(255, 143, 163, 0.45); animation: float-c 7s ease-in-out infinite; }
.doodle-wiggle { width: 120px; bottom: 18%; left: 6%; color: rgba(126, 224, 198, 0.35); animation: float-a 10s ease-in-out infinite; }
.doodle-cloud { width: 80px; top: 38%; left: 8%; color: rgba(248, 242, 228, 0.25); animation: float-b 14s ease-in-out infinite; }

@keyframes float-a {
  0%, 100% { transform: translate(0,0) rotate(0); }
  50% { transform: translate(10px,-18px) rotate(8deg); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0,0) rotate(0); }
  50% { transform: translate(-14px,12px) rotate(-6deg); }
}
@keyframes float-c {
  0%, 100% { transform: translate(0,0) rotate(0); }
  50% { transform: translate(6px,10px) rotate(20deg); }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: linear-gradient(
    to bottom,
    rgba(11, 8, 25, 0.8),
    rgba(11, 8, 25, 0.4)
  );
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "Fraunces", serif;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 32px;
  height: 32px;
  color: var(--accent);
  display: grid;
  place-items: center;
  animation: spin 38s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.brand-word em {
  font-style: italic;
  opacity: 0.9;
}
.brand-word .dot {
  margin: 0 6px;
  opacity: 0.4;
  color: var(--accent);
}

.nav nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav nav a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink-dim);
  border-radius: 999px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}
.nav nav a[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 205, 107, 0.12);
}
.nav nav a.cta[aria-current="page"] {
  background: var(--accent);
}
.page-outro {
  margin: 80px auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.page-outro p {
  color: var(--ink-dim);
  margin: 0;
}
.nav nav a.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bg);
  background: var(--ink);
  font-weight: 500;
  padding-right: 18px;
}
.nav nav a.cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
}
.cta-wave {
  color: var(--accent-rose);
  display: inline-block;
  animation: wave 3s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(25deg); }
}

/* ---------- Main ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  position: relative;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(60px, 12vh, 140px) 0 clamp(80px, 14vh, 140px);
  text-align: center;
  position: relative;
}

.hero-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.hero-orbit .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
}
.hero-orbit .o1 {
  width: 12px; height: 12px;
  background: var(--accent);
  box-shadow: 0 0 24px var(--accent);
  top: 15%; left: 12%;
  animation: orbit-a 9s ease-in-out infinite;
}
.hero-orbit .o2 {
  width: 8px; height: 8px;
  background: var(--accent-cool);
  box-shadow: 0 0 18px var(--accent-cool);
  top: 25%; right: 15%;
  animation: orbit-b 7s ease-in-out infinite;
}
.hero-orbit .o3 {
  width: 6px; height: 6px;
  background: var(--accent-rose);
  box-shadow: 0 0 14px var(--accent-rose);
  top: 65%; left: 18%;
  animation: orbit-c 8s ease-in-out infinite;
}
.hero-orbit .o4 {
  width: 10px; height: 10px;
  background: var(--accent-mint);
  box-shadow: 0 0 20px var(--accent-mint);
  top: 55%; right: 10%;
  animation: orbit-a 11s ease-in-out infinite reverse;
}
.hero-orbit .o5 {
  width: 5px; height: 5px;
  background: #fff;
  box-shadow: 0 0 12px #fff;
  top: 80%; left: 48%;
  animation: orbit-b 6s ease-in-out infinite;
}
@keyframes orbit-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}
@keyframes orbit-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-25px, 25px); }
}
@keyframes orbit-c {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, 30px); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 36px;
  opacity: 0;
  animation: fade 0.8s var(--ease) 0.2s forwards;
}
.eyebrow-line {
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.headline {
  font-size: clamp(42px, 7.5vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 auto;
  max-width: 15ch;
  position: relative;
}
.headline .line {
  display: block;
  overflow: visible;
  position: relative;
}
.headline .word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  animation: rise 0.9s var(--ease) forwards;
  margin-right: 0.22em;
}
.headline .accent {
  position: relative;
  overflow: visible;
}
.headline .accent-inner {
  font-style: italic;
  font-weight: 300;
}

.headline .line[data-act="imagine"] .accent-inner { color: var(--accent-warm); }
.headline .line[data-act="create"] .accent-inner { color: var(--accent-cool); }
.headline .line[data-act="exist"] .accent-inner { color: var(--accent-rose); }

.headline .underline {
  position: absolute;
  bottom: -0.18em;
  left: 0;
  width: 100%;
  height: 0.22em;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  color: currentColor;
  animation: draw 1.2s var(--ease) forwards;
}
.headline .line[data-act="imagine"] .underline { color: var(--accent-warm); animation-delay: 1s; }
.headline .line[data-act="create"] .underline { color: var(--accent-cool); animation-delay: 1.3s; }
.headline .line[data-act="exist"] .underline { color: var(--accent-rose); animation-delay: 1.6s; }

@keyframes draw { to { stroke-dashoffset: 0; } }

/* word stagger */
.headline .line:nth-child(1) .word:nth-child(1) { animation-delay: .05s; }
.headline .line:nth-child(1) .word:nth-child(2) { animation-delay: .15s; }
.headline .line:nth-child(1) .word:nth-child(3) { animation-delay: .25s; }
.headline .line:nth-child(2) .word:nth-child(1) { animation-delay: .4s; }
.headline .line:nth-child(2) .word:nth-child(2) { animation-delay: .5s; }
.headline .line:nth-child(2) .word:nth-child(3) { animation-delay: .6s; }
.headline .line:nth-child(3) .word:nth-child(1) { animation-delay: .75s; }
.headline .line:nth-child(3) .word:nth-child(2) { animation-delay: .85s; }
.headline .line:nth-child(3) .word:nth-child(3) { animation-delay: .95s; }

@keyframes rise {
  to { transform: translateY(0); opacity: 1; }
}

.sub {
  margin: 40px auto 0;
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--accent-mint);
  max-width: 28ch;
  line-height: 1.3;
  opacity: 0;
  animation: fade 0.8s var(--ease) 1.8s forwards;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade .8s var(--ease) 2s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), color 0.25s var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-warm) 100%);
  color: #2a1a05;
  box-shadow: 0 12px 30px -12px rgba(255, 205, 107, 0.6);
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -15px rgba(255, 205, 107, 0.8);
}
.btn.primary:hover svg { transform: translateX(3px); }
.btn.ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 205, 107, 0.05);
}

.scroll-hint {
  margin-top: 80px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0;
  animation: fade 0.8s var(--ease) 2.2s forwards;
}
.scroll-hint svg { width: 14px; height: 46px; color: var(--ink-dim); }

@keyframes fade { to { opacity: 1; } }

/* ---------- Section heads ---------- */
.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 80px;
  position: relative;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.tag-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.section-head h2,
.contact h2 {
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.05;
}
.section-head p {
  margin-top: 20px;
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Loop section ---------- */
.loop-section {
  padding: 80px 0 120px;
  position: relative;
}

.loop {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.loop-card {
  padding: 32px 28px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(var(--paper), 0.04), transparent 60%),
    rgba(255, 255, 255, 0.02);
  position: relative;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
  overflow: hidden;
}
.loop-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 40% at 50% 0%, var(--tint), transparent 70%);
  opacity: 0.12;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.loop-card:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  border-color: color-mix(in srgb, var(--tint) 40%, transparent);
}
.loop-card:hover::before { opacity: 0.22; }
.loop-card:nth-child(2):hover { transform: translateY(-6px) rotate(0.4deg); }
.loop-card:nth-child(3):hover { transform: translateY(-6px) rotate(-0.3deg); }

.loop-art {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  position: relative;
}
.loop-art svg { width: 80%; height: 80%; }
.float-slow { animation: float-slow 5s ease-in-out infinite; transform-origin: center; }
@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(1deg); }
}
.sparkle-group circle, .tool-group circle {
  animation: twinkle 2.4s ease-in-out infinite;
}
.sparkle-group circle:nth-child(2) { animation-delay: -.6s; }
.sparkle-group circle:nth-child(3) { animation-delay: -1.2s; }
.sparkle-group circle:nth-child(4) { animation-delay: -1.8s; }
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.loop-num {
  font-family: "Caveat", cursive;
  font-size: 22px;
  color: var(--tint);
  opacity: 0.9;
  display: block;
  margin-bottom: 6px;
}
.loop-card h3 {
  font-size: 32px;
  margin-bottom: 12px;
}
.loop-card p {
  color: var(--ink-dim);
  font-size: 15px;
  margin: 0 0 18px;
  line-height: 1.6;
}
.loop-hand {
  display: inline-block;
  font-family: "Caveat", cursive;
  font-size: 22px;
  color: var(--tint);
  transform: rotate(-4deg);
  padding: 2px 10px;
  border: 1.5px dashed color-mix(in srgb, var(--tint) 50%, transparent);
  border-radius: 999px;
}

/* ---------- Work ---------- */
.work {
  padding: 60px 0 140px;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 140px;
}

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.project.reverse .project-visual { order: 2; }

.project-visual {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.6s var(--ease);
  transform: rotate(-1.5deg);
}
.project.reverse .project-visual { transform: rotate(1.5deg); }
.project-visual:hover { transform: rotate(0) translateY(-6px) scale(1.01); }

.polaroid-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 80px;
  height: 22px;
  background: rgba(248, 242, 228, 0.35);
  backdrop-filter: blur(4px);
  border-left: 1px dashed rgba(255,255,255,.3);
  border-right: 1px dashed rgba(255,255,255,.3);
  z-index: 3;
}

.visual-caption {
  position: absolute;
  bottom: 16px;
  right: 24px;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.85);
  transform: rotate(-4deg);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.project-visual.mg {
  background:
    radial-gradient(120% 80% at 50% 20%, #ffe0a6 0%, #f0944c 45%, #6b2f1a 100%);
}
.project-visual.pys {
  background:
    radial-gradient(120% 80% at 50% 30%, #c8d4ff 0%, #6a7fd6 50%, #1f2349 100%);
}

/* Phone mockups */
.phone {
  width: 62%;
  aspect-ratio: 9 / 19;
  background: #0d0d12;
  border-radius: 36px;
  position: relative;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  padding: 10px;
}
.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 18px;
  background: #000;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  position: relative;
  overflow: hidden;
  background: #0d0d12;
}
.phone-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mg .phone { aspect-ratio: 19 / 9; width: 88%; }

/* Mini Guinea */
.mg .phone-screen {
  background: linear-gradient(to bottom, #ffd38f 0%, #ffae5a 60%, #7fbf6a 60.1%, #4f9a52 100%);
}
.mg-sky { position: absolute; inset: 0 0 40% 0; overflow: hidden; }
.mg-sun {
  position: absolute;
  top: 20%; right: 15%;
  width: 22%; aspect-ratio: 1;
  background: radial-gradient(circle, #fff5b0 0 40%, transparent 70%);
  animation: twinkle 3s ease-in-out infinite;
}
.mg-cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: 0.85;
}
.mg-cloud-1 { top: 30%; left: -10%; width: 35%; height: 12%; animation: drift-cloud 14s linear infinite; }
.mg-cloud-2 { top: 55%; left: -20%; width: 22%; height: 9%; animation: drift-cloud 20s linear infinite -8s; }
@keyframes drift-cloud {
  to { transform: translateX(500%); }
}

.mg-ground {
  position: absolute; inset: 60% 0 0 0;
  background:
    repeating-linear-gradient(90deg, #4f9a52 0 24px, #57a859 24px 48px),
    linear-gradient(to bottom, #5fa860 0%, #3c7a40 100%);
  background-blend-mode: multiply;
}
.mg-guinea {
  position: absolute;
  left: 50%; top: 52%;
  width: 46%; aspect-ratio: 1.4;
  transform: translate(-50%, -50%);
  animation: hop 1.6s var(--ease) infinite;
}
.mg-body {
  position: absolute; inset: 15% 0 0 0;
  background: radial-gradient(circle at 30% 30%, #fff 0 30%, #d7a76b 31% 100%);
  border-radius: 50% 50% 45% 45%;
}
.mg-ear { position: absolute; top: 5%; width: 22%; aspect-ratio: 1; background: #9a6b3a; border-radius: 50%; }
.mg-ear.l { left: 18%; transform: rotate(-15deg); }
.mg-ear.r { right: 18%; transform: rotate(15deg); }
.mg-eye { position: absolute; top: 42%; width: 8%; aspect-ratio: 1; background: #1a1208; border-radius: 50%; }
.mg-eye.l { left: 34%; }
.mg-eye.r { right: 34%; }
.mg-nose { position: absolute; top: 58%; left: 50%; transform: translateX(-50%); width: 6%; aspect-ratio: 1; background: #ff8fa3; border-radius: 50%; }

.mg-coin {
  position: absolute; width: 10%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff3a6, #e9b875 70%);
  box-shadow: 0 0 16px rgba(255, 220, 130, 0.9);
  animation: bob 2.2s ease-in-out infinite;
}
.mg-coin.c1 { left: 18%; top: 22%; }
.mg-coin.c2 { right: 20%; top: 35%; animation-delay: -0.6s; }
.mg-coin.c3 { left: 28%; top: 42%; animation-delay: -1.2s; }

@keyframes hop {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, -58%); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(12deg); }
}

/* Plan My Stress */
.pys .phone-screen {
  background: linear-gradient(160deg, #1a1e3a 0%, #2a2f58 50%, #4a4d80 100%);
  color: #fff;
  padding: 18px 14px;
  position: relative;
}
.pys-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pys-stars span {
  position: absolute;
  width: 2px; height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 2.4s ease-in-out infinite;
}
.pys-stars span:nth-child(1) { top: 8%; left: 15%; }
.pys-stars span:nth-child(2) { top: 14%; left: 78%; animation-delay: -0.5s; }
.pys-stars span:nth-child(3) { top: 6%; left: 55%; animation-delay: -1s; }
.pys-stars span:nth-child(4) { top: 22%; left: 35%; animation-delay: -1.5s; }
.pys-stars span:nth-child(5) { top: 92%; left: 20%; animation-delay: -0.2s; }
.pys-stars span:nth-child(6) { top: 88%; left: 80%; animation-delay: -0.7s; }
.pys-stars span:nth-child(7) { top: 78%; left: 10%; animation-delay: -1.2s; }
.pys-stars span:nth-child(8) { top: 85%; left: 60%; animation-delay: -1.7s; }

.pys-header { height: 20px; border-radius: 6px; background: rgba(255,255,255,.14); width: 60%; margin: 14px auto 24px; position: relative; z-index: 1; }
.pys-ring { position: relative; width: 60%; aspect-ratio: 1; margin: 0 auto 24px; display: grid; place-items: center; z-index: 1; }
.pys-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 6; }
.ring-fg {
  fill: none;
  stroke: #b9c9ff;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 80;
  animation: breathe 4s ease-in-out infinite;
}
.pys-label {
  position: absolute;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 16px;
  color: #dde4ff;
}
.pys-bar {
  height: 10px;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  margin: 10px 6px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.pys-bar span {
  display: block;
  height: 100%;
  width: var(--w, 82%);
  background: linear-gradient(90deg, #b9c9ff, #e9b875);
  border-radius: 4px;
  animation: fill 2s var(--ease) forwards;
  transform-origin: left;
}
@keyframes breathe {
  0%, 100% { stroke-dashoffset: 80; }
  50% { stroke-dashoffset: 30; }
}
@keyframes fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.project-copy { padding: 10px 0; }
.project-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
}
.project-tag .tag-dot {
  width: 6px; height: 6px; box-shadow: 0 0 8px currentColor;
}
.project-copy h3 {
  font-size: clamp(36px, 4.5vw, 52px);
  margin-bottom: 18px;
  line-height: 1.05;
}
.project-copy p {
  color: var(--ink-dim);
  font-size: 17px;
  max-width: 42ch;
  line-height: 1.6;
}

.platforms {
  list-style: none;
  padding: 0;
  margin: 28px 0 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.platforms li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
}
.platforms li svg { width: 14px; height: 14px; }
.platforms li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.platforms li a:hover { text-decoration: underline; }
.platforms li.live {
  color: var(--ink);
  border-color: rgba(255, 205, 107, 0.5);
  background: rgba(255, 205, 107, 0.08);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  padding: 12px 18px;
  border: 1px solid var(--ink-faint);
  border-radius: 999px;
  transition: all 0.25s var(--ease);
}
.project-link svg { width: 18px; height: 18px; }
.project-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 205, 107, 0.05);
}

/* ---------- Contact ---------- */
.contact {
  padding: 80px 0 120px;
}
.contact-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(52px, 9vw, 100px) clamp(32px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255, 205, 107, 0.12), transparent 60%),
    radial-gradient(80% 120% at 50% 100%, rgba(138, 167, 255, 0.08), transparent 60%),
    rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}
.contact-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  pointer-events: none;
}
.contact-stars circle {
  animation: twinkle 2.4s ease-in-out infinite;
}
.contact-stars circle:nth-child(even) { animation-delay: -1.2s; }
.contact h2 { margin: 18px 0 14px; position: relative; }
.contact p { color: var(--ink-dim); margin-bottom: 34px; position: relative; }

.email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 30px;
  border: 1.5px solid var(--ink-faint);
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  position: relative;
  background: rgba(11, 8, 25, 0.4);
}
.email-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.email-label {
  font-size: 16px;
  color: var(--accent);
  transform: rotate(-4deg);
  margin-bottom: -4px;
}
.email-addr {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 24px);
}
.email svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.email:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 205, 107, 0.08);
  transform: translateY(-2px);
}
.email:hover svg { transform: translate(2px, -2px); }

.contact-psst {
  margin-top: 24px;
  font-size: 22px;
  color: var(--accent-mint);
  transform: rotate(-2deg);
  display: inline-block;
  position: relative;
}

/* ---------- Contact form ---------- */
.contact-form {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  gap: 16px;
}
.contact-form .field {
  display: grid;
  gap: 6px;
}
.contact-form label {
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--ink);
  background: rgba(11, 8, 25, 0.5);
  border: 1.5px solid var(--ink-faint);
  border-radius: 14px;
  padding: 12px 16px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  width: 100%;
  resize: vertical;
}
.contact-form textarea { min-height: 120px; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(11, 8, 25, 0.7);
}
.contact-form .cf-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form button {
  justify-self: start;
  margin-top: 4px;
}
.contact-form button.is-loading {
  opacity: 0.7;
  cursor: wait;
}
.cf-status {
  margin: 0;
  min-height: 1.4em;
  font-size: 14px;
  color: var(--ink-dim);
}
.cf-status.is-ok { color: var(--accent-mint); }
.cf-status.is-error { color: var(--accent-rose); }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 28px clamp(20px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-dim);
  max-width: var(--max);
  margin: 0 auto;
}
.foot-mark {
  color: var(--accent);
  margin-right: 4px;
}
.foot-links a:hover { color: var(--accent); }
.foot-links span { margin: 0 8px; opacity: 0.4; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav nav a:not(.cta) { display: none; }
  .project { grid-template-columns: 1fr; }
  .project.reverse .project-visual { order: 0; }
  .project-visual { aspect-ratio: 4 / 4.2; }
  .phone { width: 45%; }
  .loop { grid-template-columns: 1fr; }
  .brand-word em:nth-child(3),
  .brand-word em:nth-child(5) { display: none; }
  .brand-word .dot { display: none; }
  .doodle-planet, .doodle-wiggle { display: none; }
}

/* ---------- Scroll reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal-in {
  opacity: 1;
  transform: translateY(0);
}
.loop-card.reveal { transition-delay: 0s; }
.loop-card:nth-child(2).reveal { transition-delay: 0.12s; }
.loop-card:nth-child(3).reveal { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; animation-delay: 0s !important; transition: none !important; }
  .headline .word { transform: none; opacity: 1; }
  .headline .underline { stroke-dashoffset: 0; }
  .hero-actions, .hero-meta, .sub, .eyebrow, .scroll-hint { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}
