/* ryanv.xyz: what every page shares. Tokens, the one left edge, the bar, the footer, reading type.
   Rule: every left-aligned block starts on --edge, the same line as the logo in the bar (AGENTS.md, "One left edge"). */
:root {
  --bg: #000; --ink: #f3f4f6; --muted: rgba(243, 244, 246, .64); --faint: rgba(243, 244, 246, .42);
  --line: rgba(243, 244, 246, .16); --hair: rgba(243, 244, 246, .09);
  --accent: #8fe8d6; --accent-ink: #001510; --glow: rgba(143, 232, 214, .2); --field: rgba(255, 255, 255, .06);
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", "New York", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --edge: clamp(22px, 6.7vw, 96px);  /* 96px at 1440, about 26px on a phone (Ryan, 2026-11-01: "C, 96px") */
  --measure: 680px;
  /* The oil-slick spectrum, for the one shimmer. */
  --film: linear-gradient(100deg, var(--ink) 0%, var(--ink) 38%, #7fe9ff 44%, #b49cff 49%, #ff9fd8 53%, #ffe7a0 57%, #8fe8d6 61%, var(--ink) 68%, var(--ink) 100%);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f1f2f3; --ink: #0d1014; --muted: rgba(13, 16, 20, .68); --faint: rgba(13, 16, 20, .5);
  --line: rgba(13, 16, 20, .14); --hair: rgba(13, 16, 20, .08);
  --accent: #0a6b5c; --accent-ink: #fff; --glow: rgba(10, 107, 92, .14); --field: rgba(255, 255, 255, .72);
  --film: linear-gradient(100deg, var(--ink) 0%, var(--ink) 38%, #0a8fb0 44%, #6b4fd8 49%, #c2338f 53%, #b07a00 57%, #0a6b5c 61%, var(--ink) 68%, var(--ink) 100%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--bg); scrollbar-width: none; -webkit-text-size-adjust: 100%; }
html::-webkit-scrollbar { display: none; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
::selection { background: var(--glow); }

/* The bar. */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: 88px; padding: 8px var(--edge) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font: 500 14px/1 var(--sans); letter-spacing: .01em; transition: background .5s var(--ease), border-color .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.bar.glass { background: color-mix(in srgb, var(--bg) 62%, transparent); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); border-color: var(--hair); }
.mark { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.mark svg { width: 21px; height: 21px; flex: none; margin-left: -1px; transition: filter .9s var(--ease); }
.mark .who {
  font: 500 17px/1 var(--sans); letter-spacing: -.005em;
  background: var(--film); background-size: 320% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: background-position 1.3s var(--ease), opacity .6s var(--ease);
}
.mark:hover .who, .mark:focus-visible .who { background-position: 0% 0; }
.mark:hover svg { filter: drop-shadow(0 0 10px var(--glow)); }
.bar nav { display: flex; align-items: center; gap: 2px; }
.bar nav a, .bar nav button {
  font: inherit; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer;
  min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 22px;
  transition: color .4s var(--ease), background .4s var(--ease);
}
.bar nav a:hover, .bar nav button:hover { color: var(--ink); background: var(--field); }
.bar nav a[aria-current="page"] { color: var(--ink); }
.bar nav .ext::after { content: "↗"; font-size: 11px; opacity: .55; margin-left: -2px; }
.bar nav .sub { color: var(--accent); }
.bar nav .sub:hover { color: var(--accent); background: var(--glow); }
.bar nav .sep { width: 1px; height: 16px; background: var(--line); margin: 0 6px; }

/* Sound: four bars that breathe while it plays. */
.snd i { display: inline-flex; gap: 2px; align-items: end; height: 12px; }
.snd i b { width: 2px; height: 5px; background: currentColor; border-radius: 1px; transition: height .4s var(--ease); }
.snd i b:nth-child(2) { height: 9px; } .snd i b:nth-child(3) { height: 6px; } .snd i b:nth-child(4) { height: 11px; }
.snd[aria-pressed="true"] { color: var(--accent); }
.snd[aria-pressed="true"] i b { animation: breathe 1.6s var(--ease) infinite alternate; }
.snd[aria-pressed="true"] i b:nth-child(2) { animation-delay: .3s; } .snd[aria-pressed="true"] i b:nth-child(3) { animation-delay: .7s; } .snd[aria-pressed="true"] i b:nth-child(4) { animation-delay: 1s; }
@keyframes breathe { from { height: 3px; } to { height: 12px; } }

/* Labels, fields, buttons. */
.label { font: 400 11px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--faint); margin: 0 0 18px; }
.field {
  display: flex; gap: 8px; padding: 6px; border-radius: 30px; border: 1px solid var(--line); background: var(--field);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); max-width: 480px;
  transition: border-color .5s var(--ease), box-shadow .6s var(--ease);
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 6px var(--glow); }
.field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 400 16px/1 var(--sans); padding: 0 16px; min-height: 44px; }
.field input::placeholder { color: var(--faint); }
.field button {
  border: 0; border-radius: 24px; min-height: 44px; padding: 0 22px; font: 500 15px/1 var(--sans); cursor: pointer;
  background: var(--ink); color: var(--bg); transition: background .4s var(--ease), color .4s var(--ease);
}
.field button:hover { background: var(--accent); color: var(--accent-ink); }
.fine { font-size: 13px; color: var(--faint); margin: 12px 0 0 4px; }
.fine a { color: var(--muted); text-underline-offset: 3px; transition: color .3s var(--ease); }
.fine a:hover { color: var(--accent); }

/* The footer. */
.foot {
  position: relative; z-index: 6; margin: 0; padding: 28px var(--edge) 40px; border-top: 1px solid var(--hair);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font: 400 12px/1 var(--mono); letter-spacing: .08em; color: var(--faint);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 2px; margin: -14px -12px; }
.foot a { color: var(--muted); text-decoration: none; min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; transition: color .3s var(--ease); }
.foot a:hover { color: var(--accent); }

/* Pages that are read: bio, writing, privacy. */
.page { position: relative; z-index: 2; padding: 184px var(--edge) 120px; min-height: 80vh; }
.page .kicker { font: 400 11px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--faint); margin: 0 0 26px; }
.page h1 { margin: 0; font-weight: 300; font-size: clamp(44px, 6vw, 92px); line-height: .98; letter-spacing: -.04em; max-width: 16ch; }
.page .dek { margin: 26px 0 0; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.4; color: var(--muted); max-width: 40ch; }
.prose { max-width: var(--measure); margin-top: 72px; font: 400 20px/1.66 var(--serif); font-optical-sizing: auto; }
.prose p { margin: 0 0 1.05em; }
.prose h2 { font: 500 13px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin: 2.4em 0 1em; }
.prose blockquote { margin: 1.6em 0; padding: 0; font-style: italic; font-weight: 300; font-size: 1.32em; line-height: 1.32; color: var(--ink); }
.prose a { text-decoration-color: var(--line); text-underline-offset: 4px; transition: color .3s var(--ease), text-decoration-color .3s var(--ease); }
.prose a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.prose em { font-style: italic; }

/* Arrival: fade, rise and a little blur, staggered. */
.in { opacity: 0; transform: translateY(10px); filter: blur(5px); animation: arrive .75s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes arrive { to { opacity: 1; transform: none; filter: none; } }
html.still .in { animation: none; opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .in { animation: none; opacity: 1; transform: none; filter: none; } }

@media (max-width: 860px) {
  .bar { height: 70px; padding-top: 6px; }
  .bar nav .wide { display: none; }
  .mark .who { font-size: 16px; }
  .page { padding-top: 136px; }
  .prose { font-size: 18.5px; margin-top: 52px; }
}

/* A page's name in the one shimmer, as "coherence." has it on the home page: the oil-slick film passes in once the
   heading has arrived, then drifts slowly back and forth. */
.iris-name {
  background: var(--film); background-size: 320% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em;
  animation: iris-in 2s var(--ease) .6s both, iris-drift 9s ease-in-out 2.6s infinite;
}
@keyframes iris-in { from { background-position: 100% 0; } to { background-position: 50% 0; } }
@keyframes iris-drift { 0%, 100% { background-position: 50% 0; } 50% { background-position: 18% 0; } }
html.still .iris-name { animation: none; background-position: 50% 0; }
@media (prefers-reduced-motion: reduce) { .iris-name { animation: none; background-position: 50% 0; } }
