:root {
  --bg: #0d0c0a;
  --ink: #f2e9d8;
  --muted: #aaa192;
  --dim: #6f685d;
  --gold: #d8b46f;
  --gold-deep: #a9874a;
  --line: rgba(242, 233, 216, 0.14);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --text: "Spectral", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --pad: clamp(24px, 8.4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.page { position: relative; max-width: 520px; margin: 0 auto; overflow: hidden; }

/* ---- photo on top, fading into the page ---- */
.hero { position: relative; margin: 0; height: clamp(300px, 92vw, 500px); overflow: hidden; }
.hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 30%);
  filter: var(--photo-filter, none);
}
@media (min-width: 560px) {
  .hero img {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 12, 10, 0) 30%, rgba(13, 12, 10, 0.6) 68%, var(--bg) 100%);
}

/* ---- name block ---- */
.intro { position: relative; z-index: 1; padding: 0 var(--pad); margin-top: clamp(-92px, -17vw, -56px); }
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(52px, 16.5vw, 86px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144;
}
h1 span { display: block; }
.mark { flex: none; margin-top: 0.35em; font-size: clamp(30px, 10vw, 52px); line-height: 1; color: var(--gold); }
.bio { margin: 22px 0 0; max-width: 30ch; font-size: 19px; font-weight: 300; line-height: 1.62; color: var(--muted); }
.tagline {
  margin: 30px 0 22px;
  font-family: var(--serif);
  font-size: clamp(23px, 6.8vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--gold);
}

/* ---- link rows ---- */
.links { list-style: none; margin: 0; padding: 0 var(--pad); }
.links li { border-top: 1px solid var(--line); }
.links li:last-child { border-bottom: 1px solid var(--line); }
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 84px;
  padding: 14px 2px;
  text-decoration: none;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.row::before {
  content: "";
  position: absolute;
  inset: 0 -14px;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.2s;
}
.row:hover::before, .row:active::before { opacity: 0.07; }
.row:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
.ic { position: relative; flex: none; width: 24px; height: 24px; color: var(--gold); }
.label { position: relative; flex: 1; min-width: 0; font-family: var(--serif); font-size: clamp(26px, 8vw, 34px); font-weight: 500; line-height: 1.1; }
.note {
  display: block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}
.arrow { position: relative; flex: none; width: 15px; height: 15px; color: var(--muted); transition: transform 0.25s, color 0.25s; }
.row:hover .arrow { transform: translate(3px, -3px); color: var(--gold); }

/* ---- contact ---- */
.contact { padding: 40px var(--pad) 18px; }
.contact h2 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: clamp(10.5px, 2.9vw, 12.5px);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.mail-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; }
.email {
  font-family: var(--serif);
  font-size: clamp(19px, 5.6vw, 23px);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-deep);
  overflow-wrap: anywhere;
}
.copy {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
}
.foot { padding: 40px var(--pad) 44px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }

/* ---- entrance ---- */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }
  .hero img { animation: settle 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.06); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* ---- story link screen (/yt/<id>) ---- */
.go {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px var(--pad);
  background: var(--bg);
  text-align: center;
}
.go[hidden] { display: none; }
.redirecting .page { display: none; }
.go-in { width: 100%; max-width: 380px; }
.go-avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--gold-deep), 0 0 0 6px var(--bg), 0 0 0 7px var(--line); }
.go .eyebrow { margin: 26px 0 10px; }
.go h2 { margin: 0 0 30px; font-family: var(--serif); font-size: clamp(30px, 9vw, 40px); font-weight: 600; line-height: 1.05; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 0 24px;
  background: var(--gold);
  color: #17120a;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { background: var(--gold-deep); }
.go-hint { min-height: 1.4em; margin: 14px 0 0; font-size: 16px; color: var(--muted); opacity: 0; transition: opacity 0.4s; }
.go.tap .go-hint { opacity: 1; }
.go-web, .go-home {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
}
.go-web { border-bottom: 1px solid var(--line); }
.go-home { display: block; margin-top: 18px; }

.debug {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  margin: 0;
  max-height: 45vh;
  overflow: auto;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.92);
  color: #9fe29f;
  font: 11px/1.5 ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}
