/* ============================================================
   New Music Matters — Year Index & Archive Pages
   Clean stylesheet with no Blogger overrides needed
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Lora:wght@400;500&display=swap');

/* --- CSS Variables --- */
:root {
  --background: #FFFDF0;
  --foreground: #0a0a0a;
  --primary: #1A1AFF;
  --secondary: #8c1aff;
  --accent: #ffff1a;
  --muted: #eeeeff;
  --muted-foreground: #5a5a00;
  --border: #d4d4c0;
  --font-sans: "Lora", Georgia, serif;
  --font-heading: "Playfair Display", Georgia, serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: #FFFDF0;
  color: #0a0a0a;
  font-family: "Lora", Georgia, serif;
  font-size: 16px;
  line-height: 1.7;
}

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

/* ============================================================
   NMM HEADER (shared across archive pages)
   ============================================================ */

.nmm-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #f5f5e8;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 0.75rem 1.5rem;
}

.nmm-site-header-inner {
  max-width: 72rem;
  margin: 0 auto;
}

.nmm-site-header-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nmm-site-header-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex: 1 1 auto;
  min-width: 0;
}

.nmm-portrait {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .nmm-portrait { width: 56px; height: 56px; min-width: 56px; }
}
@media (min-width: 768px) {
  .nmm-portrait { width: 64px; height: 64px; min-width: 64px; }
}

.nmm-site-title-block {
  min-width: 0;
}

.nmm-site-title {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.1rem, 5vw, 2.5rem);
  font-weight: 700;
  color: #0a0a0a;
  line-height: 1;
}

.nmm-site-subtitle {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.3;
}

.nmm-site-subtitle a {
  color: var(--primary);
  text-decoration: none;
}
.nmm-site-subtitle a:hover { text-decoration: underline; }

/* Search form */
.nmm-search-form {
  flex-shrink: 0;
  display: none;
}
@media (min-width: 640px) {
  .nmm-search-form { display: flex; align-items: center; }
}

.nmm-search-form-mobile {
  display: flex;
  margin-top: 0.5rem;
  width: 100%;
}
@media (min-width: 640px) {
  .nmm-search-form-mobile { display: none; }
}

.nmm-search-wrap {
  position: relative;
}
.nmm-search-wrap.full { width: 100%; }

.nmm-search-input {
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 0 2rem 0 0.75rem;
  font-size: 0.75rem;
  color: var(--foreground);
  font-family: "Lora", Georgia, serif;
  outline: none;
  width: 11rem;
}
.nmm-search-wrap.full .nmm-search-input { width: 100%; }
.nmm-search-input:focus { box-shadow: 0 0 0 2px var(--primary); }
.nmm-search-input::placeholder { color: var(--muted-foreground); }

.nmm-search-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  padding: 0;
  display: flex;
  align-items: center;
}
.nmm-search-btn:hover { color: var(--primary); }

/* ============================================================
   YEAR INDEX LAYOUT
   ============================================================ */

.nmm-year-header {
  background: var(--primary);
  color: #fff;
  padding: 2rem 1.5rem 1.5rem;
}

.nmm-year-header h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  margin: 0 0 0.25rem;
  color: #fff;
}

.nmm-year-header p {
  margin: 0;
  opacity: 0.85;
  font-size: 0.95rem;
}

.nmm-year-nav {
  background: var(--muted);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.nmm-year-nav a {
  color: var(--primary);
  text-decoration: none;
  margin-right: 1rem;
}

.nmm-year-nav a:hover { text-decoration: underline; }

.nmm-year-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.nmm-month-group { margin-bottom: 2rem; }

.nmm-month-heading {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  color: var(--secondary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
  margin-top: 0;
}

.nmm-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nmm-post-item {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nmm-post-item a {
  color: var(--foreground);
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 0;
}

.nmm-post-item a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.nmm-post-date {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.nmm-back-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
}

.nmm-back-link:hover { text-decoration: underline; }

/* ============================================================
   ARCHIVE.HTML LAYOUT
   ============================================================ */

.nmm-archive-header {
  background: var(--primary);
  color: #fff;
  padding: 2rem 1.5rem 1.5rem;
}

.nmm-archive-header h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  margin: 0 0 0.25rem;
  color: #fff;
}

.nmm-archive-header p {
  margin: 0;
  opacity: 0.85;
  font-size: 0.95rem;
}

.nmm-archive-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.nmm-year-section { margin-bottom: 2.5rem; }

.nmm-year-heading {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
}

.nmm-year-heading a {
  color: var(--primary);
  text-decoration: none;
}

.nmm-year-heading a:hover { text-decoration: underline; }

.nmm-year-count {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  font-family: "Lora", Georgia, serif;
  font-weight: normal;
  margin-left: 0.5rem;
}

.nmm-more a {
  color: var(--secondary);
  font-style: italic;
}

.nmm-home-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary);
  text-decoration: none;
}

.nmm-home-link:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .nmm-year-header h1,
  .nmm-archive-header h1 { font-size: 1.5rem; }
  .nmm-year-body,
  .nmm-archive-body { padding: 1.5rem 1rem; }
  .nmm-post-item { flex-direction: column; gap: 0.1rem; }
  .nmm-post-date { font-size: 0.75rem; }
}
