/* Octagonal by Vít Condák (fonty.condak.cz) */
@font-face {
  font-family: "Octagonal";
  src: url("../fonts/Octagonal-UltraLight.woff2") format("woff2");
  font-weight: 200; /* file reports 400; registered as 200 so it doesn't clash with Regular */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Octagonal";
  src: url("../fonts/Octagonal-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Octagonal";
  src: url("../fonts/Octagonal-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Octagonal";
  src: url("../fonts/Octagonal-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #cdeae6;
  --text: #000000;
  --text-secondary: #000000;
  --accent: #69632f; /* darker #dbd5ab, 4.8:1 on --bg */
  --divider: #69632f;

  --name-size: 60px;
  --sub-size: 30px; /* half the artist name */
  --small-size: 20px;
  --text-size: 18px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Octagonal", sans-serif;
  font-weight: 400;
  line-height: 1.4;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

a:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

.page {
  position: relative;
  z-index: 1; /* above the falling emojis */
  max-width: 760px;
  margin: 0 auto;
  padding: 43px 16px 64px;
}

/* Header */
.artist {
  text-align: center;
  padding-bottom: 40px;
}

.artist-name {
  margin: 0;
  font-size: var(--name-size);
  font-weight: 700;
  text-transform: lowercase;
  line-height: 1;
}

.pronunciation,
.tagline,
.stars,
.site-nav {
  margin: 24px 0 0;
  font-size: var(--sub-size);
  font-weight: 300;
  line-height: 1.25;
}

.pronunciation {
  margin-top: 12px;
  font-size: var(--small-size);
}

.stars {
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.2em;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 1.2em;
  line-height: 1;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

/* Mixes */
.mixes {
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  padding: 24px 0; /* matches the gap between mixes */
}

.mix + .mix {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
}

.mix-title {
  margin: 0 0 24px; /* same as the gap above the title and below the player */
  font-size: 18px;
  font-weight: 400;
  line-height: 1; /* no extra leading, so the gap above matches the gap below the player */
  color: var(--text-secondary);
}

.mix iframe {
  display: block;
  width: 100%;
  height: 166px;
  border: 0;
}

/* Blog */
.posts {
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  padding: 24px 0;
}

.post + .post {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
}

.post-date {
  margin: 0 0 24px;
  font-size: var(--text-size);
  line-height: 1;
}

.post-title {
  /* Negative half-leading so gaps are measured from the text, not the line
     box; the extra 1px and 2px offset the title's taller font box. */
  margin: 0 0 16px; /* fallback for browsers without the lh unit */
  margin: calc(0.5em - 0.5lh - 1px) 0 calc(22px + 0.5em - 0.5lh);
  font-size: var(--sub-size);
  font-weight: 300;
  line-height: 1.2;
}

/* Posts over 300 characters show an excerpt here and link to their own page */
.post-body p,
.read-more {
  margin: 0 0 16px;
  font-size: var(--text-size);
  font-weight: 300;
  line-height: 1.6;
}

.post-body p:first-child {
  margin-top: 0;
  margin-top: calc(0.5em - 0.5lh);
}

.post-body p:last-child,
.read-more {
  margin-bottom: 0;
  margin-bottom: calc(0.5em - 0.5lh);
}

.read-more {
  margin-top: 16px;
}

/* Footer */
.links {
  padding-top: 24px; /* same gap as everywhere else below a divider */
  text-align: center;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
}

@media (max-width: 480px) {
  .page {
    padding-top: 32px;
    padding-bottom: 48px;
  }
}

/* Falling emojis (assets/js/emoji-rain.js), behind the page content */
.emoji-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.emoji-rain img {
  position: absolute;
  top: 0;
  opacity: 0.8;
  will-change: transform;
}

/* Compact name bar (assets/js/sticky-name.js): slides in once the full-size
   name has scrolled out of view, so nothing on the page shifts or jumps. */
.name-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  text-align: center;
  font-size: var(--sub-size);
  font-weight: 700;
  line-height: 1;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.2s ease, visibility 0.2s;
}

.name-bar.is-visible {
  transform: none;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .name-bar {
    transition: none;
  }
}
