:root {
  --navy: #0B1F3F;
  --navy-deep: #06122A;
  --navy-lift: #15305C;
  --text: #FFFFFF;
  --text-2: rgba(255, 255, 255, 0.62);
  --text-3: rgba(255, 255, 255, 0.38);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-hover: rgba(255, 255, 255, 0.1);
  --hairline: rgba(255, 255, 255, 0.14);
  --hairline-strong: rgba(255, 255, 255, 0.32);
  --error: #FF8A80;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }

html { height: 100%; background: var(--navy-deep); }

body {
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(80, 130, 220, 0.22), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgba(21, 48, 92, 0.9), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  background-attachment: fixed;
}

/* Fine grain so the gradient doesn't band */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main {
  position: relative;
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.reveal { animation: rise 0.9s var(--ease) both; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.16s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

h1 {
  font-size: clamp(2.5rem, 9vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem;
}

/* Pill button / link */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.25rem;
  padding: 0.75rem 1.25rem 0.75rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: var(--glass);
  border: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.pill:hover { background: var(--glass-hover); border-color: var(--hairline-strong); }
.pill:active { transform: scale(0.97); }
.pill svg { transition: transform 0.3s var(--ease); }
.pill:hover svg { transform: translateX(3px); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid rgba(140, 180, 255, 0.8);
  outline-offset: 3px;
}

/* Contact card */
.card {
  margin-top: 2rem;
  padding: 1.75rem;
  border-radius: 28px;
  background: var(--glass);
  border: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

label {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-2);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.field {
  display: flex;
  align-items: center;
  padding: 5px 5px 5px 1.1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--hairline);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field:focus-within {
  border-color: var(--hairline-strong);
  box-shadow: 0 0 0 4px rgba(120, 160, 240, 0.15);
}
.field.shake { animation: shake 0.4s var(--ease); border-color: var(--error); }
@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  padding: 0.55rem 0;
}
input::placeholder { color: var(--text-3); }

button {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: var(--text);
  color: var(--navy);
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
button:hover { transform: scale(1.06); }
button:active { transform: scale(0.94); }

.error {
  min-height: 1.25em;
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  color: var(--error);
}

/* Revealed email */
.email {
  display: inline-block;
  font-size: clamp(1.4rem, 6vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(180deg, #FFFFFF 0%, #B9CCF0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hint { margin-top: 0.75rem; font-size: 0.8125rem; color: var(--text-3); }

.back {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}
.back:hover { color: var(--text); }

[hidden] { display: none !important; }

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