/* Jurnalul Izabelei — Belle Époque
   Source of truth: ~/.claude/memory/jurnal_outline_deployment.md (Bogdan v2 spec) */

:root {
  --parchment:        #F4ECD8;
  --parchment-deep:   #ECE0C4;
  --ink:              #2A1E14;
  --ink-soft:         #4A3A2C;
  --oxblood:          #7A1F2B;
  --oxblood-deep:     #5A1620;
  --emerald:          #1F4F3D;
  --lapis:            #1E3A5F;
  --gilt:             #B8893A;
  --gilt-soft:        #D4B068;

  --serif-display:    "Playfair Display", "EB Garamond", Georgia, serif;
  --serif-body:       "EB Garamond", "Iowan Old Style", Georgia, serif;
  --serif-label:      "Libre Caslon Text", "EB Garamond", Georgia, serif;
}

:root[data-mood="midnight"] {
  --parchment:        #1A1410;
  --parchment-deep:   #221A14;
  --ink:              #E8DCC0;
  --ink-soft:         #C9B98F;
  --oxblood:          #9A2A3A;
  --oxblood-deep:     #C44455;
}

* { box-sizing: border-box; }
html { color-scheme: light; }

body {
  margin: 0;
  background: var(--parchment);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.12  0 0 0 0 0.08  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-blend-mode: multiply;
  color: var(--ink);
  font: 400 clamp(1.0625rem, 1.05rem + 0.25vw, 1.2rem)/1.75 var(--serif-body);
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 64ch;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
@media (min-width: 700px) { .container { padding: 4rem 1.5rem 6rem; } }

/* ===== Header / masthead ===== */
.site-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.masthead {
  display: inline-block;
  font: 900 italic clamp(2.5rem, 8vw, 4.5rem)/1.05 var(--serif-display);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
}
.masthead--small {
  font-size: clamp(1.5rem, 4vw, 2rem);
}
.subtitle {
  font: italic 400 0.95rem/1.4 var(--serif-body);
  color: var(--ink-soft);
  margin: 0.75rem 0 0;
}

/* ===== Ornamental dividers and glyphs ===== */
.divider {
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem;
  color: var(--gilt);
  margin: 1.5rem 0;
  font-size: 1.25rem;
  line-height: 1;
}
.divider::before, .divider::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gilt);
  opacity: 0.6;
}
.asterism {
  text-align: center;
  color: var(--gilt);
  font-size: 1.4rem;
  margin: 3rem 0 2rem;
  letter-spacing: 0.5em;
}
.fleuron-center {
  text-align: center;
  color: var(--oxblood);
  font-size: 1.15rem;
  line-height: 1;
  margin: 0 0 0.5rem;
}

/* ===== Home — collections + lists ===== */
.groups .group + .group { margin-top: 4rem; }
@media (min-width: 700px) { .groups .group + .group { margin-top: 6rem; } }

.collection-h {
  font: 400 0.8rem/1 var(--serif-label);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--oxblood);
  text-align: center;
  margin: 0 0 0.75rem;
}
.collection-rule {
  display: block;
  width: 80px;
  height: 1px;
  background: var(--gilt);
  opacity: 0.4;
  margin: 0 auto 2rem;
  border: 0;
}

ul.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}
ul.post-list li {
  padding: 0;
  margin: 0;
}
ul.post-list li + li { margin-top: 1.75rem; }
ul.post-list a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  padding: 0.25rem 0;
  min-height: 44px;
}
ul.post-list a:hover .item-title,
ul.post-list a:focus-visible .item-title {
  color: var(--oxblood);
}
ul.post-list .item-title {
  font: 700 clamp(1.25rem, 2.2vw, 1.5rem)/1.25 var(--serif-display);
  color: var(--ink);
  margin: 0 0 0.4rem;
  transition: color 200ms ease;
}
ul.post-list .item-date {
  font: italic 400 0.875rem/1.4 var(--serif-body);
  color: var(--ink-soft);
  font-variant-numeric: oldstyle-nums;
}

.empty {
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  padding: 4rem 0;
}

/* ===== Note detail ===== */
.note-title {
  font: 700 clamp(1.875rem, 4vw, 2.5rem)/1.15 var(--serif-display);
  color: var(--ink);
  text-align: center;
  margin: 0 0 1rem;
  letter-spacing: -0.005em;
}
.note-date {
  font: italic 400 0.95rem/1.4 var(--serif-body);
  color: var(--ink-soft);
  text-align: center;
  font-variant-numeric: oldstyle-nums;
  margin: 0 0 2.5rem;
}
.note-date .fleur {
  color: var(--oxblood);
  margin: 0 0.6rem;
  font-style: normal;
}

.note-body {
  font-size: clamp(1.0625rem, 1.05rem + 0.25vw, 1.2rem);
  line-height: 1.75;
}
.note-body > p { margin: 0 0 1.25rem; }

/* Drop cap on first paragraph */
.note-body > p:first-of-type::first-letter {
  font: 900 4.5rem/0.85 var(--serif-display);
  color: var(--oxblood);
  float: left;
  padding: 0.35rem 0.5rem 0 0;
  margin-right: 0.25rem;
}

.note-body h2 {
  font: 500 1.4rem/1.3 var(--serif-display);
  color: var(--ink);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.005em;
}

.note-body blockquote {
  font: italic 400 1.2rem/1.6 var(--serif-body);
  color: var(--ink);
  margin: 2rem 1rem;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 2px solid var(--emerald);
  position: relative;
}
.note-body blockquote::before {
  content: "✥";
  color: var(--emerald);
  position: absolute;
  top: -0.75rem;
  left: -0.5rem;
  font-size: 1rem;
  background: var(--parchment);
  padding: 0 0.3rem;
  line-height: 1;
}

.note-body img {
  display: block;
  max-width: 100%;
  height: auto;
  padding: 12px;
  background: var(--parchment);
  border: 1px solid color-mix(in srgb, var(--gilt) 40%, transparent);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--ink) 6%, transparent);
  margin: 2rem auto;
}

.note-body figcaption {
  font: italic 400 0.875rem/1.4 var(--serif-body);
  color: var(--ink-soft);
  text-align: center;
  margin-top: 0.5rem;
}

.note-body hr {
  border: 0;
  text-align: center;
  margin: 3rem auto;
  height: 1.5rem;
  position: relative;
}
.note-body hr::after {
  content: "❦";
  color: var(--gilt);
  font-size: 1.2rem;
}

/* ===== Back link ===== */
.back-link {
  display: block;
  text-align: center;
  margin-top: 4rem;
  font: italic 400 0.95rem/1 var(--serif-body);
  color: var(--oxblood);
  text-decoration: none;
}
.back-link::before {
  content: "❧ ";
  font-style: normal;
}
.back-link:hover, .back-link:focus-visible {
  color: var(--oxblood-deep);
  text-decoration: underline;
  text-decoration-color: var(--oxblood-deep);
  text-underline-offset: 4px;
}

/* ===== Footer ===== */
.site-footer {
  margin-top: 5rem;
  text-align: center;
  color: var(--ink-soft);
}
.site-footer .fleuron-center {
  margin-bottom: 0.6rem;
  color: var(--gilt);
}
.footer-credit {
  font: 400 0.75rem/1 var(--serif-label);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  font-variant-numeric: oldstyle-nums;
}
.footer-rule {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gilt);
  opacity: 0.4;
  margin: 1.25rem auto 0;
  border: 0;
}

/* ===== Links (in body) ===== */
.note-body a {
  color: var(--oxblood);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--oxblood) 40%, transparent);
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
  transition: color 200ms ease, text-decoration-thickness 200ms ease, text-decoration-color 200ms ease;
}
.note-body a:hover, .note-body a:focus-visible {
  color: var(--oxblood-deep);
  text-decoration-color: var(--oxblood-deep);
  text-decoration-thickness: 1px;
}
.note-body a:focus-visible {
  outline: 1px dashed var(--gilt);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== Desktop margin filigree ===== */
@media (min-width: 900px) {
  body::before, body::after {
    content: "";
    position: fixed;
    top: 0; bottom: 0;
    width: 1px;
    background:
      linear-gradient(to bottom,
        transparent 0,
        transparent 60px,
        var(--gilt) 60px,
        var(--gilt) 66px,
        transparent 66px,
        transparent 240px) 0 0/1px 240px repeat-y;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
  }
  body::before { left: 28px; }
  body::after  { right: 28px; }
}

@media (max-width: 600px) {
  .container { padding: 2.5rem 1.25rem 3rem; }
  .note-body blockquote { margin: 1.75rem 0; }
}
