/* Mercedes Tucker — Journal + Admin (light theme).
   Same Cormorant + Jost type system as the main site, but flipped to a bright
   paper background with cosmic-navy ink and pink + blue accents, per the
   client's request for "more white to go with the blue and pink." Layered on
   top of style.css; this file only overrides what the light pages need. */

:root {
  --paper: #f6f4ee;        /* warm white page */
  --card: #ffffff;         /* card surface */
  --navy: #0a0c22;         /* headings / cosmic navy from the main site */
  --ink-2: #3c3f54;        /* body text */
  --ink-mute: #6b6e82;     /* meta / muted */
  --blue: #4b5fe0;         /* cosmic blue accent */
  --blue-soft: rgba(75, 95, 224, 0.10);
  --line-2: rgba(10, 12, 34, 0.10);
  --line-3: rgba(10, 12, 34, 0.06);
}

.theme-light,
.theme-light body {
  background: var(--paper);
  color: var(--ink-2);
}
.theme-light { min-height: 100%; }

/* ---- Header on light pages ---- */
.theme-light .site-header {
  position: sticky;
  background: rgba(246, 244, 238, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-3);
}
.theme-light .logo { color: var(--navy); text-shadow: none; }
.theme-light .nav a { color: var(--navy); text-shadow: none; }
.theme-light .nav a:hover { color: var(--pink); }
.theme-light .menu-toggle .bar { background: var(--navy); box-shadow: none; }
@media (max-width: 720px) {
  .theme-light .nav {
    background: var(--card);
    box-shadow: 0 26px 60px rgba(10, 12, 34, 0.16);
    border-bottom: 1px solid var(--line-2);
  }
  .theme-light .nav a { color: var(--navy); border-bottom-color: var(--line-2); }
}

/* ---- Page shell ---- */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(7rem, 12vw, 9rem) 6vw clamp(4rem, 8vw, 6rem);
}
.page.narrow { max-width: 940px; }

.masthead { margin-bottom: clamp(3rem, 7vw, 5rem); }
.masthead .eyebrow { color: var(--blue); }
.masthead .eyebrow::before { background: var(--blue); }
.j-title {
  font-family: var(--display);
  font-weight: 500;
  color: var(--navy);
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0.4rem 0 0.8rem;
}
.j-title em { font-style: italic; color: var(--pink); }
.j-sub {
  max-width: 56ch;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--ink-mute);
}

.eyebrow { /* reused light variant */ }
.theme-light .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
}
.theme-light .eyebrow::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: var(--blue);
}

/* ---- Entries: every post is the same horizontal card, stacked newest first.
   Uniform shape means a one-post or ten-post journal both read consistently,
   and any image (portrait iPhone shot or landscape) crops into the same frame. */
.entries { display: flex; flex-direction: column; gap: clamp(1.4rem, 3vw, 2.2rem); }
.entry {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(10, 12, 34, 0.12);
  border-color: rgba(75, 95, 224, 0.35);
}
.entry:hover .read-link { border-bottom-color: var(--blue); }
.entry-media { overflow: hidden; background: var(--blue-soft); min-height: 220px; }
.entry-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.entry-body {
  padding: clamp(1.5rem, 3.2vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
}
.entry-h {
  font-family: var(--display);
  font-weight: 500;
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.08;
  text-decoration: none;
}
.entry-excerpt { color: var(--ink-2); font-size: 1.02rem; text-decoration: none; }

.post-meta {
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.post-meta .tag { color: var(--pink); font-weight: 500; }
.post-meta .dot { margin: 0 0.5rem; opacity: 0.5; }

.post-meta {
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.post-meta .tag { color: var(--pink); font-weight: 500; }
.post-meta .dot { margin: 0 0.5rem; opacity: 0.5; }

/* Read link / pill button */
.read-link {
  align-self: flex-start;
  font-family: var(--ui);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.read-link:hover { border-bottom-color: var(--blue); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.9rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-family: var(--ui);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}
.pill:hover { background: var(--blue); transform: translateY(-1px); }
.pill.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line-2); }
.pill.ghost:hover { background: var(--blue-soft); color: var(--blue); border-color: rgba(75,95,224,0.4); }
.pill.danger { background: transparent; color: #c2476b; border: 1px solid rgba(194,71,107,0.35); }
.pill.danger:hover { background: rgba(194,71,107,0.08); }

.empty { color: var(--ink-mute); padding: 2rem 0; }

/* ---- Single post page ----
   The hero image spans the full column; the text sits in a tighter reading
   measure so lines stay comfortable on wide monitors. */
.back-link,
.article-head,
.article-body { max-width: 680px; margin-left: auto; margin-right: auto; }
.article-head { margin-bottom: clamp(1.6rem, 4vw, 2.4rem); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-decoration: none;
  margin-bottom: 1.4rem;
}
.back-link:hover { color: var(--blue); }
.article-title {
  font-family: var(--display);
  font-weight: 500;
  color: var(--navy);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 0.8rem;
}
.article-hero {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin: clamp(1.4rem, 4vw, 2.4rem) 0;
  border: 1px solid var(--line-2);
}
.article-hero img { width: 100%; display: block; }
.article-body p {
  font-family: var(--display);
  font-size: clamp(1.18rem, 2vw, 1.4rem);
  line-height: 1.7;
  color: #2c2f44;
  margin-bottom: 1.3rem;
}
.article-body p:first-of-type::first-letter {
  font-size: 3.4em;
  line-height: 0.8;
  float: left;
  padding: 0.05em 0.12em 0 0;
  color: var(--pink);
  font-weight: 500;
}

/* ---- Footer override ---- */
.theme-light .site-footer {
  background: transparent;
  border-top: 1px solid var(--line-2);
  color: var(--ink-mute);
}
.theme-light .foot-name { color: var(--navy); }
.theme-light .foot-mark { color: var(--ink-mute); }

/* ---- Admin ---- */
.admin-gate {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gate-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 2.4rem 2rem;
  text-align: center;
}
.gate-card h1 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--navy);
  font-size: 2rem;
  margin-bottom: 0.3rem;
}
.gate-card p { color: var(--ink-mute); font-size: 0.95rem; margin-bottom: 1.4rem; }

.field { text-align: left; margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-family: var(--ui);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.45rem;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font-family: var(--ui);
  font-size: 1rem;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 220px; resize: vertical; line-height: 1.6; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.field .hint { font-size: 0.78rem; color: var(--ink-mute); margin-top: 0.4rem; text-transform: none; letter-spacing: 0; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin-top: 0.6rem; }

.editor-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: start; }
.admin-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.admin-head h1 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 2.8rem);
}
.admin-panel {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: clamp(1.4rem, 3vw, 2rem);
}
.admin-panel h2 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--navy);
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
}

.manage-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line-3);
}
.manage-item:last-child { border-bottom: none; }
.manage-thumb { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--blue-soft); flex: none; }
.manage-meta { flex: 1; min-width: 0; }
.manage-meta .mt { font-family: var(--display); font-size: 1.15rem; color: var(--navy); line-height: 1.15; }
.manage-meta .md { font-size: 0.8rem; color: var(--ink-mute); }
.manage-actions { display: flex; gap: 0.5rem; flex: none; }
.manage-actions .pill { padding: 0.5rem 1rem; font-size: 0.82rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #c2476b; }

.thumb-preview { margin-top: 0.7rem; max-width: 200px; border-radius: 10px; border: 1px solid var(--line-2); display: none; }
.thumb-preview.show { display: block; }

@media (max-width: 760px) {
  .entry { grid-template-columns: 1fr; }
  .entry-media { aspect-ratio: 16 / 10; min-height: 0; }
  .form-row { grid-template-columns: 1fr; }
  .admin-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 900px) {
  .editor-wrap { grid-template-columns: 1fr; }
}
