:root {
  --bg: #0a0a0a;
  --fg: #e8e6e1;
  --dim: #6b6862;
  --line: #1f1d1a;
  --accent: #e8e6e1;
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.005em;
  min-height: 100vh;
  overflow-x: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.crosshair {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.crosshair::before, .crosshair::after {
  content: '';
  position: absolute;
  background: var(--line);
}
.crosshair::before { left: 0; right: 0; top: var(--my, 50%); height: 1px; }
.crosshair::after  { top: 0; bottom: 0; left: var(--mx, 50%); width: 1px; }

.ticker {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 3;
  border-bottom: 1px solid var(--line);
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 8px 0;
}
.ticker__track {
  display: inline-flex;
  white-space: nowrap;
  animation: drift 60s linear infinite;
  gap: 48px;
  padding-left: 48px;
}
.ticker__track span::before {
  content: '◇';
  margin-right: 14px;
  color: var(--line);
}
@keyframes drift { to { transform: translateX(-50%); } }

.rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--dim);
  z-index: 3;
  pointer-events: none;
}
#rail-left { left: 18px; transform: translateY(-50%) rotate(180deg); }
#rail-right { right: 18px; }

@media (max-width: 720px) { .rail { display: none; } }

main {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 128px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 96px;
  min-height: 100vh;
}

.spinner {
  display: inline-block;
  width: 1ch;
  margin-right: 10px;
  color: var(--dim);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0;
}

/* Real letter is always present so layout is fixed; dot overlay is a pseudo
   that only animates opacity. */
[data-reveal] .ch {
  display: inline-block;
  position: relative;
  color: transparent;
  filter: blur(0.4px);
  transition: color 70ms ease, filter 70ms ease;
  white-space: pre;
}
[data-reveal] .ch::after {
  content: '⠿';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--dim);
  opacity: 1;
  pointer-events: none;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.85em;
  transition: opacity 70ms ease;
}
[data-reveal].is-revealed .ch {
  color: var(--fg);
  filter: blur(0);
  transition:
    color 200ms cubic-bezier(.2, .9, .2, 1) var(--d, 0ms),
    filter 200ms cubic-bezier(.2, .9, .2, 1) var(--d, 0ms);
}
[data-reveal].is-revealed .ch::after {
  opacity: 0;
  transition: opacity 200ms ease var(--d, 0ms);
}

header {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.mark {
  display: inline-block;
  font-size: 18px;
  animation: rotate 12s linear infinite;
}

@keyframes rotate { to { transform: rotate(360deg); } }

.lede h1 {
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 24px;
}

.lede p {
  color: var(--dim);
  max-width: 36ch;
  font-size: 15px;
  line-height: 1.55;
}

.contact {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.label {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.email {
  color: var(--fg);
  text-decoration: none;
  font-size: 16px;
  position: relative;
  width: fit-content;
}

.email::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--fg);
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(.7,0,.2,1);
}

.email:hover::after {
  transform-origin: left;
  transform: scaleX(1);
}

footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

@media (max-width: 520px) {
  main { padding: 72px 22px 32px; gap: 56px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .lede h1 { font-size: 56px; }
  .email { font-size: 15px; word-break: break-all; }
  .ticker { font-size: 9px; letter-spacing: 0.24em; padding: 6px 0; }
}

@media (hover: none) {
  .crosshair { display: none; }
}
