/* ------------------------------------------------------------------
   Luke Grecki — site styles
   The page follows the visitor's clock: <html data-time="dawn|day|dusk|night">
   switches every color below. Pixel texture lives in the edges only.
   ------------------------------------------------------------------ */

:root,
html[data-time="day"] {
  color-scheme: light;
  --ground: #f3f1e6; --surface: #e3e6d8; --ink: #1f2a2e; --muted: #55605f; --rule: #c4c9b8; --accent: #2f6a72; --orb: #6aa3aa;
  --sky0: #7fb7cc; --sky3: #f1efd8; --water0: #6aa3aa; --water2: #2f5f68;
  --scene-text: #f8f4e6; --scene-nav: #e9efe6; --scene-readout: #1f3a41;
}
html[data-time="dawn"] {
  color-scheme: light;
  --ground: #f4f0e4; --surface: #e9e1cf; --ink: #26242e; --muted: #5f5a64; --rule: #cfc4ad; --accent: #9a4f4a; --orb: #e59a8f;
  --sky0: #3a3760; --sky3: #f6c79c; --water0: #5a4f74; --water2: #262340;
  --scene-text: #fbeedd; --scene-nav: #f2d9c4; --scene-readout: #fbe2d0;
}
html[data-time="dusk"] {
  color-scheme: dark;
  --ground: #1c1626; --surface: #2a2036; --ink: #f2e4d2; --muted: #bba893; --rule: #43354f; --accent: #f0a35a; --orb: #f7b866;
  --sky0: #2b2445; --sky3: #efa365; --water0: #4a3150; --water2: #18121f;
  --scene-text: #f7e6d2; --scene-nav: #ecc9ad; --scene-readout: #f3d9c2;
}
html[data-time="night"] {
  color-scheme: dark;
  --ground: #0d1024; --surface: #161b36; --ink: #ece4cc; --muted: #a9a38f; --rule: #2b3152; --accent: #e9c977; --orb: #f2d88c;
  --sky0: #0c1027; --sky3: #2e3866; --water0: #1a2148; --water2: #070918;
  --scene-text: #ece4cc; --scene-nav: #cfc6ab; --scene-readout: #bfb8a0;
}
:root { --dots: repeating-linear-gradient(90deg, var(--rule) 0 4px, transparent 4px 8px); }
html[data-time] { --dots: repeating-linear-gradient(90deg, var(--rule) 0 4px, transparent 4px 8px); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Spectral', Georgia, serif;
  font-size: 20px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--ground); }

.pixel {
  font-family: 'Silkscreen', ui-monospace, monospace;
  font-weight: 400;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dots { height: 2px; background: var(--dots); }
.skip {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  padding: 10px 14px; background: var(--ink); color: var(--ground);
  font-family: 'Silkscreen', monospace; font-size: 12px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- links ---------- */
.navlink { position: relative; display: inline-block; padding: 14px 0; text-decoration: none; }
.navlink::before {
  content: ""; position: absolute; left: -14px; top: 50%;
  width: 6px; height: 6px; margin-top: -3px;
  background: currentColor; opacity: 0; transition: opacity .4s ease;
}
.navlink:hover::before, .navlink:focus-visible::before, .navlink[aria-current="page"]::before { opacity: 1; }
.rowlink { text-decoration: none; color: inherit; }
.rowlink:hover .rowtitle, .rowlink:focus-visible .rowtitle { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.textlink {
  display: inline-block; padding: 10px 0;
  color: var(--accent);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.textlink:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px dashed currentColor; outline-offset: 4px; }

/* ---------- layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: clamp(24px, 5vw, 72px); }
.wrap--narrow { max-width: 760px; padding-inline: clamp(24px, 5vw, 48px); }
.wrap--poem { max-width: 620px; padding-inline: clamp(24px, 5vw, 40px); }
.page { padding-block: clamp(56px, 8vw, 104px) 96px; }
.page--poem { padding-top: clamp(40px, 6vw, 72px); }

.eyebrow { margin: 0; font-size: 12px; letter-spacing: 0.16em; color: var(--accent); }
.title {
  margin: 18px 0 0; max-width: 20ch;
  font-weight: 300; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.1; letter-spacing: -0.01em;
}
.lede { margin: 24px 0 0; max-width: 54ch; font-size: 20px; line-height: 1.6; color: var(--muted); }
.prose { margin-top: 32px; max-width: 60ch; display: flex; flex-direction: column; gap: 20px; line-height: 1.65; }
.prose p { margin: 0; }

.site-footer { padding-bottom: 48px; color: var(--muted); }
.site-footer p { margin: 0; }

/* ---------- inner-page header + horizon strip ---------- */
.site-header__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 32px; padding-top: 22px; padding-bottom: 14px;
}
.site-name { font-size: 24px; font-weight: 300; letter-spacing: -0.005em; }
.site-nav { list-style: none; margin: 0; padding: 0 0 0 14px; display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 12px; color: var(--muted); }
.site-nav a[aria-current="page"] { color: var(--ink); }

.horizon {
  position: relative; height: 52px; overflow: hidden;
  background: linear-gradient(to bottom, var(--sky0), var(--sky3) 32px, var(--water0) 32px, var(--water2));
}
.horizon > div, .scene div { position: absolute; }
.horizon__sky { left: 0; right: 0; top: 0; height: 32px; display: flex; flex-direction: column; }
.horizon__orb { top: 11px; left: calc(50% - 9px); width: 18px; height: 18px; }
.horizon__hills { left: 0; right: 0; top: 26px; height: 6px; display: flex; align-items: flex-end; }
.horizon__water { left: 0; right: 0; top: 32px; bottom: 0; display: flex; flex-direction: column; }
.horizon__refl { left: 0; right: 0; top: 32px; bottom: 0; }
.horizon__sky > div, .horizon__water > div, .horizon__hills > div,
.scene .bands > div, .scene__hills > div { position: static; }
.horizon__orb > div, .horizon__refl > div { position: absolute; }

/* ---------- home scene ---------- */
.scene {
  position: relative; width: 100%; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden;
  background: var(--water2); color: var(--scene-text);
}
.scene__sky { left: 0; right: 0; top: 0; height: 60%; overflow: hidden; background: linear-gradient(var(--sky0), var(--sky3)); }
.scene__water { left: 0; right: 0; bottom: 0; height: 40%; overflow: hidden; background: linear-gradient(var(--water0), var(--water2)); }
.scene .bands { inset: 0; display: flex; flex-direction: column; }
.scene__orb { left: calc(50% - 96px); width: 192px; height: 192px; bottom: 60px; }
.scene__hills { left: 0; right: 0; bottom: 0; height: 30px; display: flex; align-items: flex-end; }
.scene__refl { inset: 0; }
.scene__readout {
  position: absolute; top: clamp(20px, 4vw, 44px); left: clamp(24px, 5vw, 72px); margin: 0;
  letter-spacing: 0.12em; color: var(--scene-readout);
}
.scene__id {
  position: absolute; left: clamp(24px, 5vw, 72px); right: clamp(24px, 5vw, 72px); bottom: clamp(20px, 5vh, 56px);
  display: flex; flex-direction: column; gap: 10px;
}
.scene__name { margin: 0; font-weight: 300; font-size: clamp(38px, 5.2vw, 64px); line-height: 1; letter-spacing: -0.01em; color: var(--scene-text); }
.scene__nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 32px; font-size: 13px; color: var(--scene-nav); }

/* ---------- motion ---------- */
.drift { animation: drift 7s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-5px); } to { transform: translateX(5px); } }
.twinkle { animation: twinkle 4s steps(4, end) infinite alternate; }
@keyframes twinkle { from { transform: scaleX(.25); } to { transform: scaleX(1); } }
.breathe { animation: breathe 11s ease-in-out infinite alternate; transform-origin: 50% 0; }
@keyframes breathe { from { transform: scaleX(.965); } to { transform: scaleX(1.035); } }
@media (prefers-reduced-motion: reduce) {
  .drift, .twinkle, .breathe { animation: none !important; }
  .navlink::before { transition: none; }
}

/* ---------- work ---------- */
.elsewhere { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: baseline; }
.elsewhere h2 { flex: 0 0 160px; margin: 0; font-size: 12px; letter-spacing: 0.16em; color: var(--muted); }
.elsewhere ul { flex: 1 1 400px; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 36px; }
.section-gap { margin-top: clamp(56px, 8vw, 88px); }

/* ---------- music ---------- */
.release { margin-top: clamp(56px, 8vw, 96px); display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-end; }
.cover { position: relative; flex: 0 0 auto; width: min(320px, 100%); aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface); }
.cover > div { position: absolute; }
.cover__orb { left: calc(50% - 48px); top: 16.25%; width: 96px; height: 96px; }
.cover__orb > div, .cover__refl > div { position: absolute; background: var(--orb); }
.cover__line { left: 0; right: 0; top: 52.5%; height: 2px; background: var(--dots); }
.cover__refl { left: 0; right: 0; top: 55%; bottom: 0; }
.release__info { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.release__info p, .release__info h2 { margin: 0; }
.release__kicker { font-size: 12px; letter-spacing: 0.16em; color: var(--muted); }
.release__title { font-weight: 300; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.1; }
.release__meta { font-size: 18px; line-height: 1.5; color: var(--muted); }
.release__links { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 19px; }

.tracklist { list-style: none; margin: 48px 0 0; padding: 0; position: relative; }
.tracklist::before, .track::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--dots); }
.tracklist::before { top: 0; }
.track { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 0; }
.track::after { bottom: 0; }
.track__btn {
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--accent); border-radius: 0; background: transparent; color: var(--accent);
  cursor: pointer;
}
.track__btn:disabled { opacity: .35; cursor: default; }
.track__btn svg { display: block; }
.track .icon-pause, .track.is-playing .icon-play { display: none; }
.track.is-playing .icon-pause { display: block; }
.track.is-playing .track__btn { background: var(--accent); color: var(--ground); }
.track__n { flex: 0 0 28px; font-size: 12px; letter-spacing: 0.12em; color: var(--muted); }
.track__title { flex: 1 1 220px; min-width: 0; font-size: 21px; line-height: 1.3; }
.track__bar { position: relative; flex: 1 1 200px; height: 22px; cursor: pointer; }
.track__bar::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--dots); }
.track__fill { position: absolute; left: 0; top: 10px; height: 2px; width: 0; background: var(--accent); }
.track__time { flex: 0 0 auto; min-width: 9ch; text-align: right; font-size: 12px; letter-spacing: 0.12em; color: var(--muted); }

/* ---------- writing ---------- */
.entries { margin-top: clamp(48px, 7vw, 80px); }
.entry { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding: 26px 0; }
.entry__title { font-size: 28px; font-style: italic; font-weight: 300; line-height: 1.25; }
.entry__meta { color: var(--muted); }

/* ---------- poem ---------- */
.back { display: inline-flex; align-items: center; gap: 10px; padding: 12px 0; color: var(--muted); }
.poem { margin-top: clamp(40px, 6vw, 64px); }
.poem__head { display: flex; flex-direction: column; gap: 14px; }
.poem__head h1 { margin: 0; font-weight: 300; font-style: italic; font-size: clamp(36px, 4.4vw, 48px); line-height: 1.1; }
.poem__head p { margin: 0; color: var(--muted); }
.poem__body { margin-top: 56px; display: flex; flex-direction: column; gap: 56px; }
.poem__part { display: flex; flex-direction: column; gap: 20px; }
.poem__num { margin: 0; font-size: 12px; letter-spacing: 0.16em; color: var(--accent); }
.stanza { margin: 0 0 1.75em; font-size: 21px; line-height: 1.75; }
.stanza:last-child { margin-bottom: 0; }
.endmark { position: relative; width: 48px; height: 40px; margin: 64px auto 0; }
.endmark span { position: absolute; display: block; background: var(--accent); }

/* ---------- about ---------- */
.about { display: flex; flex-wrap: wrap; gap: 48px 72px; align-items: flex-start; }
.portrait { flex: 0 1 320px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; background: var(--surface); }
.about__text { flex: 1 1 440px; min-width: 0; max-width: 620px; }
.about__text > p:not(.eyebrow) { margin: 20px 0 0; line-height: 1.65; }
.about__text > p.first { margin-top: 28px; }
.contact { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 32px; }
.contact > div { padding-top: 24px; }
.contact dt { color: var(--muted); }
.contact dd { margin: 6px 0 0; font-size: 19px; display: flex; flex-wrap: wrap; gap: 0 20px; }

/* ---------- 404 ---------- */
.lost { min-height: 60vh; }
