:root {
    --indigo-deep: #0f0d3d;
    --cream: #fdf8f0;
    --link: #8b7cff;
    --link-hover: #e879f9;

    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100svh;            
}

html {
    box-sizing: border-box;
    scroll-padding-top: 52px;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

*, *:before, *:after {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
    margin:0;
    background: var(--indigo-deep);
    color: var(--cream);
    font-family: "Lato", sans-serif;
    line-height: 1.6;
}
        
#previousevents {
    color:var(--indigo-deep);
}

.previous-events {
    max-width: calc(100% - 3ch);
    display: flex;
    margin-inline:auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    justify-content: space-evenly;
    color:var(--cream);
    anchor-name: --previous-events;

    &::-webkit-scrollbar {
        display: none;
    }
    &::scroll-button(right), &::scroll-button(left)
    {
        content: '>';
        border: none;
        background-color: var(--link);
        color: var(--cream);
        height:5ch;
        width:5ch;
        border-radius: 50%;
        padding-bottom: .1em;
        cursor: pointer;
        position:fixed;
        position-anchor: --previous-events;
        position-area: right center;
        translate: -50% 0;
    }
    &::scroll-button(left)
    {
        content: '<';
        position-area: left center;
        translate: 50%;
    }
    &::scroll-button(right):disabled, &::scroll-button(left):disabled
    {
        opacity: 0.5;
        cursor: default;
    }
    &::scroll-button(right):hover, &::scroll-button(left):hover
    {
        background-color: var(--link-hover);
    }
    scroll-marker-group: after;

    &::scroll-marker-group {
        display:flex;
        justify-content: center;
        gap:0.5em;
    }
}

img {
    width:100%;
    height:auto;
}

.previous-event {
    scroll-snap-align: start;
    flex: 0 0 300px;
    aspect-ratio:300/331;
    align-items: center;
    display: flex;

    &::scroll-marker {
        content: '';
        height: 1em;
        width: 1em;
        background-color: var(--link);
        border-radius: 50%;
    }
    &::scroll-marker:target-current {
        background-color: var(--link-hover);
    }
}

/* animated space background */
#space-bg {
  position: fixed;
  inset:0;
  width: 100%;
  height: 100%;
  background: #05050a;
  z-index:-1;
  overflow: hidden;
}

/* Base nebula clouds: soft, irregular, overlapping color fields like a Hubble photo */
.nebula {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 60% 45% at 25% 30%, rgba(88, 40, 130, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 70% 60%, rgba(30, 90, 110, 0.5) 0%, transparent 65%),
    radial-gradient(ellipse 45% 55% at 55% 20%, rgba(20, 70, 90, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 25%, rgba(60, 30, 100, 0.4) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 15% 75%, rgba(15, 40, 70, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 45% 85%, rgba(35, 100, 85, 0.35) 0%, transparent 60%);
  filter: blur(20px) saturate(115%);
  animation: driftNebula 60s ease-in-out infinite alternate;
}

@keyframes driftNebula {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2%, 1.5%) scale(1.04); }
}

/* A second, dimmer layer at a different scale/speed for depth */
.nebula2 {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 35% 30% at 60% 45%, rgba(70, 35, 110, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse 30% 25% at 30% 55%, rgba(20, 60, 80, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse 25% 30% at 80% 70%, rgba(25, 80, 70, 0.25) 0%, transparent 60%);
  filter: blur(30px);
  mix-blend-mode: screen;
  animation: driftNebula 90s ease-in-out infinite alternate-reverse;
}

/* Fine dust texture, subtle */
.dust {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(180,150,220,0.08), transparent),
    radial-gradient(1px 1px at 80% 40%, rgba(120,200,190,0.08), transparent),
    radial-gradient(1px 1px at 50% 80%, rgba(150,160,220,0.08), transparent);
  background-size: 600px 600px;
  mix-blend-mode: screen;
  opacity: 0.6;
}

/* Star field: two layers, twinkling and drifting */
.stars, .stars2 {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
}

.stars {
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 90px 120px, #fff, transparent),
    radial-gradient(1.3px 1.3px at 160px 60px, #fff, transparent),
    radial-gradient(1px 1px at 230px 180px, #fff, transparent),
    radial-gradient(1px 1px at 300px 40px, #fff, transparent),
    radial-gradient(1.3px 1.3px at 40px 200px, #fff, transparent),
    radial-gradient(1px 1px at 130px 240px, #fff, transparent);
  background-size: 350px 250px;
  opacity: 0.75;
  animation: driftStars1 160s linear infinite, twinkle 4s ease-in-out infinite;
}

.stars2 {
  background-image:
    radial-gradient(1px 1px at 60px 80px, #cfe0ff, transparent),
    radial-gradient(1px 1px at 190px 30px, #cfe0ff, transparent),
    radial-gradient(1px 1px at 260px 140px, #cfe0ff, transparent),
    radial-gradient(1px 1px at 340px 200px, #cfe0ff, transparent);
  background-size: 400px 300px;
  opacity: 0.5;
  animation: driftStars2 260s linear infinite, twinkle 6s ease-in-out infinite reverse;
}

@keyframes driftStars1 {
  0% { transform: translate(0, 0); }
  100%   { transform: translate(-350px, 250px); }
}
@keyframes driftStars2 {
  0% { transform: translate(0, 0); }
  100%   { transform: translate(400px, 300px); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* A single faint bright point standing in for a remnant star, barely pulsing */
.core {
  position: absolute;
  top: 42%;
  left: 60%;
  width: 6px;
  height: 6px;
  background: #eef4ff;
  border-radius: 50%;
  box-shadow: 0 0 8px 2px rgba(200, 220, 255, 0.9), 0 0 40px 12px rgba(140, 170, 255, 0.25);
  animation: corebreathe 5s ease-in-out infinite;
}

@keyframes corebreathe {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .nebula, .nebula2, .stars, .stars2, .core {
    animation: none !important;
  }
}
/* end ofanimated space background */

.gridimage {
    display:table-cell;
    grid-row:1;
    max-width: 100%;
    width:400px;
    aspect-ratio: 400/225;
    object-fit:cover;
    vertical-align:middle;
}

.overspace {
    padding:1ch;
    position: relative;
    max-width: min(1200px, calc(100vw - 3ch));
    margin-inline: auto;
    margin-block-end: 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(145deg, rgba(55, 48, 163, 0.3), rgba(15, 13, 61, 0.6)) !important;
    color: var(--cream) !important;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 6px 0 rgba(255, 255, 255, 0.9);
}

footer {
    color: var(--cream);
    text-align: center;
}

a {
    color: var(--link);
}

a:hover {
    color: var(--link-hover);
}

nav {
    background: var(--indigo-deep);
    color: var(--cream);
    text-align: center;
}

.lhc-center {
    text-align: center;
}

.lhc-columns {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    justify-content: center;
}

.lhc-columns > div {
    /* background: rgba(255, 255, 255, 0.1); */
    padding: 1ch;
    border-radius: 0.5rem;
    min-width: 200px;
    max-width: 300px;
}

@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 400;
    src: url(/fonts/S6uyw4BMUTPHjxAwXjeu.woff2) format("woff2");
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 400;
    src: url(/fonts/S6uyw4BMUTPHjx4wXg.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@media(max-width: 500px) {
    .previous-event {
        flex: 0 0 100%;
    }
}