/* Leung Labs — the holding page. One screen, no script. */

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070605;
  --ink: #efe9dd;
  --ink-2: #aaa294;
  --rule: rgba(239, 233, 221, 0.16);
  --ember: #e8835f;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; position: relative; isolation: isolate;
  display: grid; grid-template-rows: 1fr auto; justify-items: center;
  background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.5 var(--serif);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* a warm breath of light behind the name */
body::after {
  content: ""; position: fixed; z-index: -2; left: 50%; top: 50%; width: 90vmax; height: 90vmax; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(232, 131, 95, 0.1), rgba(232, 131, 95, 0.03) 45%, transparent 70%);
  pointer-events: none;
}
h1, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 6px; border-radius: 2px; }
::selection { background: var(--ember); color: var(--bg); }

/* fixed, so a ring wider than a phone screen adds no scrolling */
.ring { position: fixed; z-index: -1; left: 50%; top: 50%; width: max(96vmin, 44rem); height: auto; transform: translate(-50%, -50%); pointer-events: none; }
.ring circle, .ring path { fill: none; }
.ring-line { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ring-min { stroke: rgba(239, 233, 221, 0.22); stroke-width: 9; stroke-dasharray: 0.13 0.87; }
.ring-maj { stroke: rgba(239, 233, 221, 0.42); stroke-width: 25; stroke-dasharray: 0.2 9.8; }
.ring-needle { stroke: var(--ember); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
/* on a tall screen only the top and bottom of the ring show: bring the needle round to the top */
@media (max-aspect-ratio: 4/5) { .ring-needle { transform: rotate(-33deg); } }

main { align-self: center; display: grid; justify-items: center; text-align: center; gap: clamp(1.1rem, 2.4vmin, 1.7rem); padding: 2rem 1.5rem; }
.name { font-weight: 400; font-size: clamp(3.6rem, 13.5vmin, 8.6rem); line-height: 0.9; letter-spacing: -0.03em; white-space: nowrap; }
.line { color: var(--ink-2); font-size: clamp(1.15rem, 2.6vmin, 1.5rem); font-style: italic; max-width: 22em; text-wrap: balance; }
.mail {
  display: inline-block; margin-top: clamp(0.4rem, 1.6vmin, 1.1rem); padding: 0.75em 1.3em; border: 1px solid var(--rule); border-radius: 999px;
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 450;
  color: var(--ink); text-decoration: none; background: rgba(7, 6, 5, 0.5);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.mail:hover { border-color: var(--ember); color: var(--ember); }
.mono { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 450; }
footer { color: var(--ink-2); padding: 0 1.5rem 1.6rem; }

/* not found */
.small .name { font-size: clamp(2.6rem, 9vmin, 5.6rem); white-space: normal; text-wrap: balance; }
.small .name em { color: var(--ember); }

@media (prefers-reduced-motion: no-preference) {
  .ring { animation: ring 2.8s var(--out) both; }
  .up { animation: up 1.2s var(--out) both; }
  .u1 { animation-delay: 0.2s; } .u2 { animation-delay: 0.45s; } .u3 { animation-delay: 0.62s; } .u4 { animation-delay: 1s; }
  @keyframes ring { from { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(1.04); } }
  @keyframes up { from { opacity: 0; transform: translateY(1.2rem); } }
}
@media print { .ring, body::before, body::after { display: none; } }
