/* elenahorovets.lucheestiy.com
   Literary, restrained, serif-led. Cyrillic-first. */

/* --- tokens --------------------------------------------------------------- */

:root {
  --bg:           #f7f3ec;
  --bg-card:      #ffffff;
  --bg-cover:     #ece5d7;
  --ink:          #1e1a17;
  --ink-soft:     #3a322c;
  --muted:        #7a7166;
  --rule:         #d9d2c6;
  --rule-soft:    #ece5d7;
  --accent:       #6b2a2a;
  --accent-soft:  #8d4040;

  --serif:        "PT Serif", "Liberation Serif", Georgia, "Times New Roman", serif;
  --sans:         "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;

  --measure:      36rem;   /* ideal reading width for poetry body */
  --measure-wide: 56rem;   /* page container */
}

/* --- reset ---------------------------------------------------------------- */

* { box-sizing: border-box; }
html, body { margin: 0; }
img         { max-width: 100%; display: block; }
a           { color: var(--accent); text-decoration: none; }
a:hover     { color: var(--accent-soft); text-decoration: underline; }
ul, ol      { margin: 0; padding: 0; list-style: none; }

/* --- base ----------------------------------------------------------------- */

html {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; display: flex; flex-direction: column; }

.wrap {
  width: 100%;
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.muted   { color: var(--muted); }
.crumbs  { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); margin: 0 0 0.5rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

/* --- header --------------------------------------------------------------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.1;
}
.brand-name {
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}
.brand-tag {
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-top: 0.25rem;
}
.brand:hover { color: var(--accent); text-decoration: none; }

.nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--sans);
}
.nav-link {
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}
.nav-link:hover { color: var(--accent); text-decoration: none; }
.nav-link.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* --- main ----------------------------------------------------------------- */

.site-main { flex: 1; padding: 3rem 1.5rem 5rem; }

/* --- hero (home) ---------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 1.5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}
.hero-name {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: 0.005em;
}
.hero-tag {
  font-family: var(--sans);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin: 0.5rem 0 1.5rem;
}
.hero p {
  max-width: var(--measure);
  margin: 0 auto;
  color: var(--ink-soft);
  font-style: italic;
}

/* --- hero with portrait --------------------------------------------------- */

.hero-with-portrait {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  align-items: center;
  gap: 3rem;
  text-align: left;
  padding: 2rem 0 3rem;
}
.hero-with-portrait .hero-text { max-width: var(--measure); }
.hero-with-portrait .hero-tag { margin-left: 0; margin-right: 0; }
.hero-with-portrait .hero-text p { margin-left: 0; }

.hero-portrait {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-cover);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 14px 32px -20px rgba(30, 26, 23, 0.45),
    0 2px 6px -2px rgba(30, 26, 23, 0.15);
}
.hero-portrait::after {
  /* subtle inner frame line in the cream/rule color */
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--rule);
  border-radius: inherit;
  pointer-events: none;
}
.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 720px) {
  .hero-with-portrait {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
    padding-top: 1rem;
  }
  .hero-with-portrait .hero-portrait {
    max-width: 220px;
    margin: 0 auto;
  }
  .hero-with-portrait .hero-text { max-width: none; }
  .hero-with-portrait .hero-text p { margin: 0 auto; }
}

/* --- block (home sections) ------------------------------------------------ */

.block { margin: 0 0 3.5rem; }
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 0.5rem;
}
.block-head h2 {
  margin: 0;
  font-weight: 400;
  font-size: 1.5rem;
}
.more {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}

/* --- card grid ------------------------------------------------------------ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.5rem;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -10px rgba(30, 26, 23, 0.25);
}
.card-cover {
  background-color: var(--bg-cover);
  background-size: cover;
  background-position: center;
  aspect-ratio: 4 / 3;
}
.card-nocover .card-cover { display: none; }
.card-nocover {
  background: linear-gradient(160deg, #fff 0%, #f5efe2 100%);
}
.card-body {
  padding: 1rem 1.1rem 1.25rem;
}
.card-type {
  font-family: var(--sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.card-title {
  margin: 0.3rem 0 0.4rem;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.2;
}
.card-year {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- list page ------------------------------------------------------------ */

.list-page { }
.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.list-head h1 {
  margin: 0;
  font-weight: 400;
  font-size: 2.25rem;
}
#list-filter {
  font: inherit;
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--ink);
  min-width: 16rem;
}

/* --- work detail ---------------------------------------------------------- */

.work {
  max-width: var(--measure);
  margin: 0 auto;
}
.work-head {
  text-align: center;
  margin: 0 0 2rem;
}
.work-type {
  font-family: var(--sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.work-head h1 {
  margin: 0.25rem 0 0.5rem;
  font-weight: 400;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
}
.work-meta {
  margin: 0.25rem 0 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
}

.work-cover {
  margin: 0 0 2rem;
  border-radius: 4px;
  overflow: hidden;
}
.work-cover img {
  width: 100%;
  height: auto;
}

.player {
  margin: 0 0 2.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.player audio { width: 100%; display: block; }

.work-body {
  font-size: 1.075rem;
  line-height: 1.75;
}

/* --- section markers ----------------------------------------------------- */

.sec { margin: 0 0 1.75rem; }
.sec:last-child { margin-bottom: 0; }
.sec-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.stanza {
  margin: 0 0 1rem;
  white-space: normal;
}
.stanza:last-child { margin-bottom: 0; }

.sec-chorus {
  margin-left: 1.25rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
  font-style: italic;
  color: var(--ink-soft);
}
.sec-chorus .sec-label { color: var(--accent); font-style: normal; }

.sec-bridge {
  padding-left: 1.25rem;
  border-left: 2px dashed var(--rule);
  color: var(--ink-soft);
}

/* --- tags ----------------------------------------------------------------- */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--sans);
  font-size: 0.85rem;
}
.tag-row li a {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--bg-card);
}
.tag-row li a:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  text-decoration: none;
}

/* --- not found ----------------------------------------------------------- */

.notfound {
  text-align: center;
  padding: 4rem 0 5rem;
}
.notfound h1 {
  margin: 0 0 1rem;
  font-weight: 400;
  font-size: 2rem;
}

/* --- footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer p { margin: 0; }

/* --- mobile tweaks -------------------------------------------------------- */

@media (max-width: 640px) {
  html { font-size: 17px; }
  .site-main { padding: 2rem 1rem 4rem; }
  .header-inner { padding-top: 1rem; padding-bottom: 1rem; }
  .nav { gap: 1rem; }
  .list-head h1 { font-size: 1.85rem; }
  #list-filter { min-width: 0; flex: 1; }
  .cards { gap: 1rem; }
  .sec-chorus, .sec-bridge { margin-left: 0; padding-left: 1rem; }
}
