:root {
  --light: oklch(0.9735 0.0052 308.12);
  --dark: oklch(0.2329 0.0152 308.12);
  --light-grey: oklch(0.9365 0.0107 279.53);
  --dark-grey: oklch(0.3841 0.0247 279.53);
  --light-blue: oklch(0.8873 0.061 264.65);
  --dark-blue: oklch(0.5059 0.111 263.65);

  --background: light-dark(var(--light), var(--dark));
  --foreground: light-dark(var(--dark), var(--light));
  --label: light-dark(var(--light-grey), var(--dark-grey));
  --label-selected: light-dark(var(--light-blue), var(--dark-blue));
  --label-border: light-dark(oklch(from var(--label) calc(l - 0.05) c h), oklch(from var(--label) calc(l + 0.05) c h));
  --label-border-selected: light-dark(oklch(from var(--label-selected) calc(l - 0.05) c h), oklch(from var(--label-selected) calc(l + 0.05) c h));
}

* {
  margin: 0;
  padding: 0;
}

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

html,
body {
  background-color: var(--background);
  color: var(--foreground);
  min-height: 100vh;
}

body {
  font-family: sans-serif;
  padding: 2rem;
}

.grid {
  display: grid;
  gap: 1em;
  grid-template-columns: repeat(auto-fit, minmax(calc(3cm + 4vi), 1fr));

}

img,
picture {
  width: 100%;
  display: block;
  height: fit-content;
  aspect-ratio: 1/1;
}

img {
  outline: 1px solid color-mix(in srgb, var(--foreground), transparent 85%);
  outline-offset: -1px;
}

.album-title {
  font-weight: bold;
  padding-block-start: 0.2em;
  color: color-mix(in srgb, currentColor, transparent 10%);
}

.center {
  box-sizing: content-box;
  margin-inline: auto;
  max-inline-size: 120ch;
  padding-inline: 1em;
}

/* sidebar */

:has(> .sidebar) {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sidebar-gap, 1rem);
}

.sidebar {
  /* ↓ The width when the sidebar *is* a sidebar */
  flex-basis: var(--sidebar-size, 20rem);
  flex-grow: 1;
}

:has(> .sidebar)> :not(.sidebar) {
  /* ↓ Grow from nothing */
  flex-basis: 0;
  flex-grow: 999;
  /* ↓ Wrap when the elements are of equal width */
  min-inline-size: var(--sidebar-wrap-at, 50%);
}



/* card links */
div {
  position: relative;
}

a {
  color: currentColor;
  text-decoration-line: none;


  &::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
  }

  &:hover {
    text-decoration: underline currentColor;
    text-decoration-thickness: 2pt;
  }
}


.shine {
  --gradient-1: light-dark(oklch(0.8205 0.1001 22 / 74.44%), oklch(0.5012 0.1201 22 / 74.44%));
  --gradient-2: light-dark(oklch(0.9362 0.1001 110.12 / 74.44%), oklch(0.5589 0.1201 110.12 / 74.44%));
  background: linear-gradient(210deg, var(--gradient-1), var(--gradient-2));
  background-size: 200% 200%;
  margin: -0.5rem;
  padding: 0.5rem;
  border-radius: 4px;

  animation: gradient-sweep 5s ease infinite;

  &:hover {
    animation: gradient-sweep 1s ease infinite;
  }
}

@keyframes gradient-sweep {
  0% {
    background-position: 0% 50%
  }

  50% {
    background-position: 100% 50%
  }

  100% {
    background-position: 0% 50%
  }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

fieldset {
  border: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em 1em;
  padding-block-end: 2rem;
}

label {
  background-color: var(--label);
  border: 1px solid var(--label-border);
  border-radius: 1em;
  padding: 0.3em 0.5em;

  &:hover {
    background-color: oklch(from var(--label) calc(l + 0.05) c h);
    border-color: oklch(from var(--label-border) calc(l + 0.05) c h);
  }
}

/* visually hidden */
input[type="checkbox"],
legend {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

input[type="checkbox"] {
  &:focus+label {
    outline: 2px solid var(--foreground);
    outline-offset: 2px;
  }

  &:checked+label {
    background-color: var(--label-selected);
    border: 1px solid var(--label-border-selected);

    &:hover {
      background-color: oklch(from var(--label-selected) calc(l + 0.05) c h);
      border-color: oklch(from var(--label-border-selected) calc(l + 0.05) c h);
    }
  }
}