@charset "UTF-8";

/* =========================
   Base variables
========================= */
:root {
  --space: 1.4rem;
  --text-color: rgb(235, 235, 235);
  --bg-color: rgb(49, 49, 49);
  /*--accent-color: rgb(230, 230, 80);*/
  --accent-color: #66CDAA;
}

/* =========================
   Reset & structure
========================= */
h1, h2, h3, h4, h5, h6,
p, ul {
  margin: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'EB Garamond', serif;

  font-size: 1.05rem;
  line-height: 1.65;

  margin-left: calc(20px + 10vw);
  max-width: 720px;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* vertical rhythm */
body > * + * {
  margin-top: var(--space);
}

/* =========================
   Typography
========================= */
h1, h2, h3 {
  font-weight: normal;
  letter-spacing: 0.02em;
}

h1 {
  font-size: 1.9rem;
  margin-top: 0.5rem;
}

h2 {
  font-size: 1.2rem;
}

h3 {
  font-size: 1.05rem;
}

.piece-title {
   padding-bottom: 0;   
}

.piece-title + ol {
  margin-top: 0;
}

/* paragraphs */
p {
  text-indent: 1.5em;
}

p:first-of-type {
  text-indent: 0;
}

/* =========================
   Links
========================= */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* =========================
   Navigation / lists
========================= */
/* =========================
   Lists (global)
========================= */
ol {
  list-style: none;
}

ul {
  list-style: none;
  padding: 0;
}

/* movement list (vertical spacing) */
.movement-list li + li {
  margin-top: 0.3rem;
}

.responsive-list {
  display: flex;
  flex-direction: column; /* mobile = vertical */
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .responsive-list {
    flex-direction: row; /* desktop = horizontal */
    gap: 16px; /* spacing between items */
  }
}

/* =========================
   Navigation (default: horizontal)
========================= */
#nav-toggle {
  display: none;
}

.main-nav {
  position: relative;
}

.main-nav ul {
  margin: 0;
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  white-space: nowrap; /* prevent wrapping */
}

.main-nav li {
  margin: 0;
}

/* =========================
   Hamburger (hidden by default)
========================= */
.nav-toggle-label {
  display: none;

  width: 22px;
  height: 16px;
  position: absolute;
  right: 0;
  top: -2.4rem;

  cursor: pointer;
  opacity: 0.75;
}

.nav-toggle-label:hover {
  opacity: 1;
}

/* hamburger lines */
.nav-toggle-label::before,
.nav-toggle-label::after,
.nav-toggle-label span {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-color);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle-label::before { top: 0; }
.nav-toggle-label span { top: 7px; }
.nav-toggle-label::after { bottom: 0; }

/* animate to X */
#nav-toggle:checked + .nav-toggle-label::before {
  transform: translateY(7px) rotate(45deg);
}

#nav-toggle:checked + .nav-toggle-label span {
  opacity: 0;
}

#nav-toggle:checked + .nav-toggle-label::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================
   Small screens → hamburger
========================= */
@media (max-width: 520px) {

  .nav-toggle-label {
    display: inline-block;
  }

  .main-nav ul {
    display: block;

    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;

    transition: opacity 0.25s ease, transform 0.25s ease;

    /* panel styling */
    background: rgba(60, 60, 60, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);

    padding: 0.75rem 1rem;
    margin-top: 0.5rem;

    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);

    /* positioning */
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    z-index: 10;
  }

  #nav-toggle:checked + .nav-toggle-label + ul {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav li {
    margin: 0.4rem 0;
  }

  .main-nav li a {
    display: block;
    padding: 0.15rem 0;
  }
}

/* =========================
   Divider
========================= */
.linediv {
  border-top: 1px solid rgba(238, 238, 238, 0.4);
  width: 100vw;
  margin-left: calc(0px - 20px - 10vw);
}

#movements:empty,
#description:empty,
#score-link:empty {
  display: none;
}

.active {
  background: rgba(255,255,255,0.08);
  padding: 2px 4px;
  border-radius: 4px;
}

mark {
  background: transparent;
  color: var(--accent-color);
}

#search {
  width: 60%;
  max-width: 320px;

  padding: 2px 0;
  margin-bottom: 0.8rem;

  font-family: inherit;
  font-size: 1rem;

  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);

  color: var(--text-color);
}

#search:focus {
  outline: none;
  border-bottom-color: var(--accent-color);
}
