@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;600&family=IBM+Plex+Mono:wght@400&display=swap');

:root {
  color-scheme: dark;
  --lime: #dafa42;
  background: #0c0e08;
  color: #f6f7ee;
}

* { box-sizing: border-box; }
body { margin: 0; }

main {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 44px 18px;
  overflow: hidden;
  background: #151909 url('assets/hero.webp') 65% 52% / cover no-repeat;
}

main::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  background:
    radial-gradient(ellipse at 50% 47%, #090b07b8, #090b0738 68%),
    linear-gradient(0deg, #090b07 0%, #090b0780 48%, #090b076b 100%);
}

h1 {
  display: flex;
  align-items: baseline;
  gap: .16em;
  margin: 0;
  font: 600 clamp(46px, 13.9vw, 210px)/.9 Geist, Arial, sans-serif;
  letter-spacing: -.087em;
  text-shadow: 0 8px 56px #090b0770;
  white-space: nowrap;
}

h1 span { font-weight: 300; color: var(--lime); }

@media (max-width: 560px) {
  main { background-position: 67% center; }
}

.hero-content { position: relative; z-index: 1; display: grid; justify-items: center; gap: clamp(26px, 5vh, 54px); }
.reddit-news { width: min(820px, calc(100vw - 36px)); font-family: Geist, Arial, sans-serif; }
.news-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.news-bar h2 { margin: 0; color: var(--lime); font: 13px 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; }
.news-controls { display: flex; gap: 7px; }
.news-controls button { width: 34px; height: 32px; border: 1px solid #dafa4266; background: #0c0e08e8; color: var(--lime); cursor: pointer; }
.news-controls button:disabled { opacity: .45; cursor: default; }
.news-cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 11px; margin: 0; list-style: none; scrollbar-color: #dafa4266 #0c0e08; }
.news-card { flex: 0 0 clamp(230px, 38vw, 300px); scroll-snap-align: start; padding: 14px 16px; background: #0c0e08ee; border: 1px solid #dafa4255; display: grid; align-content: start; gap: 8px; }
.news-card p { margin: 0; color: var(--lime); font: 11px 'IBM Plex Mono', monospace; }
.news-card h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.news-card a { color: inherit; text-decoration: none; }
.news-card a:hover { text-decoration: underline; }
.reddit-news :focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.news-card .news-summary { color: #d2d5c5; font: 14px/1.48 Geist, Arial, sans-serif; }

.drifting-lights { position: fixed; inset: 0; pointer-events: none; }

.drifting-light {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(110px, 19vw, 265px);
  aspect-ratio: 1;
  margin: calc(clamp(110px, 19vw, 265px) / -2);
  pointer-events: none;
}

.drifting-light-glow {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle,
    #f6ffd0 0 1.8%, #e5ff55 3.5%, #dafa42a8 9%, #b9f34d52 23%, #9bbd1b1e 44%, transparent 70%);
  opacity: .78;
}

.news-heading { display: flex; align-items: baseline; gap: 5px 14px; flex-wrap: wrap; }
.news-updated { margin: 0; color: #d2d5c5; font: 12px/1.4 Geist, Arial, sans-serif; }
.news-updated:empty { display: none; }
.news-controls { flex-shrink: 0; }
.news-bar { gap: 12px; }
