@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  color-scheme: dark;
  color: #f2f4ff;
  background: #07131f;
  font-family: 'DM Sans', Arial, sans-serif;
  font-synthesis: none;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { overflow-x: hidden; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 30;
  top: 1rem;
  left: 1rem;
  padding: .7rem 1rem;
  color: #07131f;
  background: #fff;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Top bar: sits over the sky, aligned with the hero's side padding. */
.site-nav {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  justify-content: flex-end;
  padding: 1.75rem clamp(1.4rem, 9vw, 10rem);
  pointer-events: none;
}
/* The comet's tail crosses the top right, so fade the top edge darker behind the links. */
.site-nav::before {
  position: absolute;
  inset: 0 0 -2.5rem;
  z-index: -1;
  content: '';
  background: linear-gradient(180deg, rgb(4 12 23 / .78), rgb(4 12 23 / .45) 55%, transparent);
}
.site-nav nav { display: flex; gap: 1.75rem; pointer-events: auto; }
.site-nav a, dt {
  font-family: 'DM Mono', monospace;
  font-size: .8125rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.site-nav a {
  /* Padding grows the tap area to ~44px; the negative margin keeps the visual spacing. */
  display: inline-block;
  padding: .85rem .25rem;
  margin: -.85rem -.25rem;
  color: #d4e3ef;
  text-decoration: none;
  text-shadow: 0 0 6px #061221, 0 1px 12px #061221;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: #f4a7c4; text-decoration: underline; text-underline-offset: .45em; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100svh;
  /* Extra bottom padding lifts the centred text above the skyline on desktop. */
  padding: 6rem clamp(1.4rem, 9vw, 10rem) clamp(3rem, 20vh, 13rem);
  overflow: hidden;
  background: #081728;
}
.hero.mote-hover { cursor: grab; }
.hero.mote-dragging { cursor: grabbing; }
#sky, #sky-motion, #sky-foreground, .scene-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#sky, #sky-motion, #sky-foreground { display: block; pointer-events: none; }
.scene-vignette {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgb(3 13 25 / .54) 0%, rgb(3 13 25 / .22) 34%, transparent 68%),
    linear-gradient(180deg, rgb(3 9 20 / .2), transparent 35%, rgb(4 12 23 / .32) 86%, rgb(4 12 23 / .66));
}
.scene-vignette::after {
  position: absolute;
  inset: 0;
  content: '';
  pointer-events: none;
  opacity: .12;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
.hero-content {
  position: relative;
  z-index: 3;
  width: min(100%, 29rem);
}
.hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 6vw, 5.75rem);
  font-weight: 500;
  letter-spacing: -.09em;
  line-height: .83;
  text-shadow: 0 5px 36px rgb(1 8 20 / .75), 0 1px 3px rgb(1 8 20 / .4);
}
.updates { margin: 2rem 0 0; text-shadow: 0 1px 8px #061221; }
/* Every row, Spotify included, uses the same label | value grid so the pairs scan together. */
.updates > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
  padding: .7rem 0;
}
dt { color: #a4bcd0; }
dd { margin: 0; color: #e1ecf5; font-size: 1rem; line-height: 1.4; }
dd a { text-underline-offset: .3em; }
.updates > .listening-row { align-items: start; }
.listening-row dt { padding-top: .2rem; }
.listening-row dd { min-width: 0; }
.spotify-card { display: flex; align-items: center; gap: .85rem; min-height: 4rem; }
.spotify-cover { display: grid; flex: 0 0 3.6rem; width: 3.6rem; height: 3.6rem; place-items: center; overflow: hidden; border: 1px solid rgb(180 213 239 / .24); background: linear-gradient(140deg, #223d58, #121728 62%, #563750); color: #f8b8d4; font-size: 1.4rem; }
.spotify-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.spotify-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: .2rem; line-height: 1.3; }
.spotify-copy strong, .spotify-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotify-copy strong { color: #f4f7fb; font-size: 1rem; font-weight: 500; }
.spotify-copy > span:last-child { color: #b9c9d8; font-size: .875rem; }
.spotify-status { color: #f4a7c4; font-family: 'DM Mono', monospace; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; }
.spotify-link { display: grid; place-items: center; flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem; color: #d4e9f3; font-size: 1.1rem; text-decoration: none; }
.spotify-link:hover, .spotify-link:focus-visible { color: #fff; }
.spotify-link[hidden] { display: none; }

/* Work: same palette and label | value rhythm as the hero's update rows. */
.work {
  padding: clamp(4rem, 10vw, 7rem) clamp(1.4rem, 9vw, 10rem) clamp(5rem, 12vw, 9rem);
  background: #07131f;
}
.work h2 {
  margin: 0 0 2rem;
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: -.04em;
}
.work-list {
  max-width: 52rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgb(180 213 239 / .14);
}
.work-list li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgb(180 213 239 / .14);
}
.work-list p { margin: 0; max-width: 38rem; color: #b9c9d8; line-height: 1.55; }
.work-list .work-kind {
  padding-top: .3rem;
  color: #a4bcd0;
  font-family: 'DM Mono', monospace;
  font-size: .8125rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.work-list h3 { margin: 0 0 .5rem; font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em; }
.work-list h3 a { color: #f4f7fb; text-decoration: none; }
.work-list h3 a:hover,
.work-list h3 a:focus-visible { color: #f4a7c4; text-decoration: underline; text-underline-offset: .3em; }
.work-list .work-stack {
  margin-top: .75rem;
  color: #7f9ab0;
  font-family: 'DM Mono', monospace;
  font-size: .8125rem;
}
.work-list .work-links { margin-top: .75rem; color: #7f9ab0; font-size: .9375rem; }
.work-links a { color: #a6c2d8; text-underline-offset: .3em; }
.work-links a:hover, .work-links a:focus-visible { color: #f4a7c4; }
.work-download { margin-top: 1.5rem; }
@media (max-width: 720px) {
  .hero { padding: 8rem 1.4rem 2.5rem; align-items: flex-end; }
  .hero-content { width: 100%; }
  .hero h1 { font-size: clamp(3.5rem, 14vw, 4.5rem); }
  .site-nav { padding: 1.25rem 1.4rem; }
  .site-nav nav { gap: 1.25rem; }
  /* Stack label over value: the narrow screen can't fit a label column beside the card. */
  .updates { margin-top: 1.8rem; }
  .updates > div { grid-template-columns: 1fr; gap: .35rem; padding: .55rem 0; }
  .listening-row dt { padding-top: 0; }
  .work h2 { font-size: 1.875rem; margin-bottom: 1.5rem; }
  .work-list li { grid-template-columns: 1fr; gap: .5rem; padding: 1.5rem 0; }
  .work-list .work-kind { padding-top: 0; }
  /* The text sits over the lit skyline here, so darken the lower part of the scene behind it. */
  .scene-vignette {
    background:
      linear-gradient(180deg, rgb(3 9 20 / .2), transparent 30%, rgb(4 12 23 / .45) 55%, rgb(4 12 23 / .82) 78%, rgb(4 12 23 / .9));
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
