:root {
  --bg: #0b0a09;
  --bg-2: #161310;
  --ink: #f3ece1;
  --muted: rgba(243, 236, 225, 0.42);
  --rule: rgba(243, 236, 225, 0.18);
  --accent: #ff6b4a;
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 40%, var(--bg-2) 0%, var(--bg) 60%, #050403 100%);
  color: var(--ink);
  font-family: 'Instrument Serif', 'Cormorant Garamond', 'Times New Roman', serif;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  opacity: 0.5;
  mix-blend-mode: overlay;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* hero centerpiece */
.hero {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  font-size: clamp(7rem, 22vw, 24rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.9;
  user-select: none;
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
  text-shadow: 0 0 80px rgba(0,0,0,0.4);
}
.hero-word { font-style: italic; }
.hero-dot {
  font-style: normal;
  color: var(--accent);
  display: inline-block;
  margin-left: -0.05em;
  animation: pulse 4.8s ease-in-out infinite;
  text-decoration: none;
  pointer-events: auto;
  cursor: none;
  transition: transform 360ms cubic-bezier(.2,.7,.2,1), color 360ms ease, text-shadow 360ms ease;
}
.hero-dot:hover {
  transform: translateY(-0.05em) scale(1.18);
  color: #ffd166;
  text-shadow: 0 0 40px rgba(255, 209, 102, 0.5);
}
.hero-dot:active { transform: scale(0.94); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50%      { opacity: 0.72; transform: translateY(-0.02em); }
}

/* meta header / footer */
.meta {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 2.25rem;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 10;
  pointer-events: none;
}
.meta-top { top: 0; }
.meta-bottom { bottom: 0; }

.meta-mark {
  color: var(--ink);
  letter-spacing: 0.3em;
}
.meta-sep {
  flex: 1;
  height: 1px;
  background: var(--rule);
  margin: 0 1.25rem;
}
.meta-status { color: var(--muted); }

.hint { font-style: italic; text-transform: none; letter-spacing: 0.05em; font-family: 'Instrument Serif', serif; font-size: 0.95rem; color: var(--muted); }

/* mailto morph link */
.meta .mail, .meta .hint { pointer-events: auto; }
.mail {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.22em;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.72rem;
  text-transform: uppercase;
  overflow: hidden;
  height: 1.2em;
  min-width: 16ch;
  text-align: right;
  cursor: none;
}
.mail-line {
  display: block;
  transition:
    transform 520ms cubic-bezier(.2,.7,.2,1),
    opacity 380ms ease,
    color 360ms ease;
}
.mail-line-a { transform: translateY(0); }
.mail-line-b {
  position: absolute;
  top: 0; right: 0;
  transform: translateY(110%);
  opacity: 0;
  color: var(--ink);
}
.mail-dot, .mail-at { color: var(--accent); transition: color 360ms ease; }
.mail:hover .mail-line-a { transform: translateY(-110%); opacity: 0; }
.mail:hover .mail-line-b { transform: translateY(0); opacity: 1; }
.mail:hover .mail-at { color: #ffd166; }

/* physics chips */
.bobby-chip {
  position: absolute;
  top: 0;
  left: 0;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  white-space: nowrap;
  user-select: none;
  will-change: transform;
  z-index: 5;
  padding: 0.1em 0.25em;
  transform-origin: center center;
  color: var(--ink);
}
.bobby-chip .dot { font-style: normal; display: inline-block; }
.bobby-chip.italic { font-style: italic; }

/* email pill — joins the playground physics */
.bobby-chip.is-mail {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-style: normal;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.32em 0.9em;
  background: rgba(255, 107, 74, 0.06);
  backdrop-filter: blur(2px);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.bobby-chip.is-mail:hover {
  background: rgba(255, 107, 74, 0.14);
  border-color: rgba(243, 236, 225, 0.35);
  box-shadow: 0 0 40px rgba(255, 107, 74, 0.15);
}
.bobby-chip.is-mail .at,
.bobby-chip.is-mail .dot { color: var(--accent); }

/* custom cursor */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
  z-index: 100;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 240ms cubic-bezier(.2,.7,.2,1), height 240ms cubic-bezier(.2,.7,.2,1), opacity 200ms ease;
}
.cursor.is-near { width: 72px; height: 72px; background: transparent; border: 1px solid var(--ink); }
.cursor.is-down { width: 36px; height: 36px; }

@media (max-width: 640px) {
  .meta { padding: 1.1rem 1.25rem; font-size: 0.62rem; letter-spacing: 0.14em; }
  .hint { font-size: 0.82rem; }
  .hero { transform: translate(-50%, -50%); }
}
