/* Editorial Longform Redesign
   Loaded after main.css to override the Persephone theme.
   Goal: premium editorial reading experience — generous whitespace,
   minimal chrome, content-first. */

/* ==========================================================================
   Palette & Base
   ========================================================================== */

:root {
  --editorial-bg: #faf9f6;
  --editorial-text: #1a1a1a;
  --editorial-text-light: #555;
  --editorial-rule: #d4d0c8;
  --editorial-rule-light: #e8e4dc;
  --editorial-accent: #1a1a1a;
}

body, html {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.7;
  background-color: var(--editorial-bg) !important;
  color: var(--editorial-text);
}

.form-control {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
}

/* ==========================================================================
   Masthead — static, centered
   ========================================================================== */

/* Override fixed logo to static centered */
.logo {
  position: static !important;
  display: block !important;
  text-align: center;
  padding: 3rem 0 0;
  z-index: auto !important;
}

.logo img {
  display: inline-block;
  margin: 0 auto;
}

/* Always show site name, centered below logo */
.logo img + h1 {
  position: static !important;
  display: block !important;
  opacity: 1 !important;
  transform: none !important;
  width: auto !important;
  text-align: center;
  margin: 0.5rem 0 0;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--editorial-text);
}

/* Disable hover animation on logo text */
.logo:hover img + h1 {
  transform: none !important;
}

/* Hide sidebar hamburger toggler */
.sidebar__toggler {
  display: none !important;
}

/* ==========================================================================
   Navigation — centered, between thin rules
   ========================================================================== */

.top-nav {
  text-align: center !important;
  margin: 0 auto 2.5rem !important;
  padding: 0.75rem 0 !important;
  border-top: 1px solid var(--editorial-rule);
  border-bottom: 1px solid var(--editorial-rule);
  max-width: var(--content-width);
}

.nav-link {
  display: inline-block;
  margin: 0 1rem !important;
  padding: 0.25rem 0 !important;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--editorial-text-light);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--editorial-text);
}

/* Remove underline animation, use color change instead */
.nav-link:after {
  display: none !important;
}

.nav-link.active {
  color: var(--editorial-text);
  font-weight: 700;
}

.nav-link.active:after {
  display: none !important;
}

/* ==========================================================================
   Global headings
   ========================================================================== */

h1, h2, h3 {
  font-weight: 400;
  color: var(--editorial-text);
}

h1 {
  font-size: 2.2rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

h2 {
  font-size: 1.65rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.35;
}

/* ==========================================================================
   Homepage — clean post list
   ========================================================================== */

.post__archive {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.post__entry {
  margin: 0 !important;
  padding: 2rem 0;
  border-bottom: 1px solid var(--editorial-rule-light);
}

.post__entry:first-child {
  padding-top: 0;
}

.post__entry:last-child {
  border-bottom: none;
}

.post__entry__link {
  display: block;
  text-decoration: none !important;
}

.post__entry__link:hover h2 {
  color: var(--editorial-text-light);
}

.post__entry h2 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 0.25rem !important;
  color: var(--editorial-text);
  transition: color 0.2s ease;
}

/* Slightly larger title for first/latest post */
.post__entry:first-child h2 {
  font-size: 1.75rem;
}

.post__entry .post__meta {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--editorial-text-light);
  margin: 0.25rem 0 0.75rem !important;
}

.post__entry .post__excerpt,
.post__entry .post__excerpt p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--editorial-text-light);
}

/* Hide animated arrow */
.post__more_arrow {
  display: none !important;
}

/* ==========================================================================
   Post page — editorial layout
   ========================================================================== */

.post__wrapper {
  max-width: var(--content-width);
  margin: 0 auto 1.5rem;
  padding: 1.5rem 1rem;
}

/* --- Back navigation --- */

.post__top_navs {
  margin-bottom: 2rem;
}

/* Hide the SVG circle icon */
.post__archive_icon {
  display: none !important;
}

.post__archive_path a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--editorial-text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post__archive_path a:hover {
  color: var(--editorial-text);
}

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

.post__header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--editorial-rule);
}

.post__header .post__title {
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  color: var(--editorial-text);
}

.post__header .post__meta {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--editorial-text-light);
}

.post__header .post__byline {
  font-size: 0.85rem;
  color: var(--editorial-text-light);
  margin-bottom: 0.25rem;
}

/* --- Post body --- */

.post__content.content {
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

.content {
  line-height: 1.8;
  font-size: 1.05rem;
  text-align: left !important;
}

/* Generous paragraph spacing */
.content blockquote, .content dl,
.content ol, .content p,
.content table, .content ul {
  margin-bottom: 1.4em;
}

/* Subtler content links — underline only */
.content a {
  font-size: inherit;
  color: var(--editorial-text);
  text-decoration: underline;
  text-decoration-color: var(--editorial-rule);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.content a:hover {
  text-decoration-color: var(--editorial-text);
}

/* --- Content headings --- */

.content h1, .content h2, .content h3,
.content h4, .content h5, .content h6 {
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.6em;
  color: var(--editorial-text);
}

.content h1 {
  font-size: 2em;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.content h2 {
  font-size: 1.55em;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.content h3 {
  font-size: 1.25em;
  line-height: 1.3;
}

.content h4 {
  font-size: 1.1em;
  line-height: 1.35;
}

.content h5, .content h6 {
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* --- Blockquotes — editorial style --- */

.content blockquote {
  font-style: italic;
  font-size: 1.15em;
  line-height: 1.65;
  padding: 0.5em 0 0.5em 1.5em;
  margin: 2em 0;
  border-left: 2px solid var(--editorial-text);
  color: var(--editorial-text);
}

.content blockquote p {
  margin-bottom: 0.5em;
}

/* --- Code --- */

.content pre {
  font-size: 0.85rem;
  line-height: 1.55;
}

.content code {
  font-size: 0.85em;
}

/* --- Tables --- */

.content table th {
  font-weight: 700;
  font-size: 0.9em;
  letter-spacing: 0.01em;
}

/* --- Footnotes --- */

.content .footnotes {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--editorial-rule-light);
}

.content .footnotes ol li {
  font-size: 0.875rem;
}

/* ==========================================================================
   Contact / Author section at bottom
   ========================================================================== */

.post__contact {
  padding: 2rem 0 !important;
}

.post__contact:before {
  width: 100% !important;
  background-color: var(--editorial-rule) !important;
}

.post__contact h4 {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--editorial-text);
}

.post__contact p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--editorial-text-light);
}

/* ==========================================================================
   Archive page
   ========================================================================== */

.archive__header {
  border-right-color: var(--editorial-rule-light) !important;
  background-color: var(--editorial-bg);
}

.archive__header h1 {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--editorial-text);
}

.archive__header_intro {
  color: var(--editorial-text-light) !important;
}

.archive__content {
  background-color: var(--editorial-bg);
}

.archive__item {
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
}

.archive__item:hover {
  border-color: var(--editorial-rule-light) !important;
}

.archive__link {
  font-size: 1.05rem;
  color: var(--editorial-text) !important;
}

.archive__time {
  font-size: 0.8rem;
  color: var(--editorial-text-light) !important;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Footer — minimal, thin top rule
   ========================================================================== */

.site-footer {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--editorial-text-light);
  border-top: 1px solid var(--editorial-rule-light);
  padding: 1.5rem 0;
  margin-top: 1rem;
}

.site-footer a {
  color: var(--editorial-text-light);
  font-size: 0.75rem;
}

.site-footer a:hover {
  color: var(--editorial-text);
}

/* ==========================================================================
   Social icons nav
   ========================================================================== */

nav[aria-label="Social links"] a {
  color: var(--editorial-text-light);
  transition: color 0.2s ease;
}

nav[aria-label="Social links"] a:hover {
  color: var(--editorial-text);
}

/* ==========================================================================
   Skip link (accessibility)
   ========================================================================== */

.skip-link:focus {
  background-color: var(--editorial-bg);
  color: var(--editorial-text);
}

/* ==========================================================================
   Mobile responsive
   ========================================================================== */

@media (max-width: 768px) {
  .logo {
    padding: 2rem 0 0;
  }

  .logo img + h1 {
    font-size: 1.1rem;
  }

  .nav-link {
    margin: 0 0.6rem !important;
    font-size: 0.7rem;
  }

  .post__header .post__title {
    font-size: 2rem;
  }

  .post__entry h2 {
    font-size: 1.3rem;
  }

  .post__entry:first-child h2 {
    font-size: 1.5rem;
  }

  .content {
    font-size: 1rem;
  }

  .content h1 { font-size: 1.75em; }
  .content h2 { font-size: 1.4em; }
  .content h3 { font-size: 1.15em; }
}

@media (max-width: 600px) {
  .logo {
    padding: 1.5rem 0 0;
  }

  .logo img + h1 {
    font-size: 1rem;
    letter-spacing: 0.06em;
  }

  .top-nav {
    padding: 0.5rem 0 !important;
  }

  .nav-link {
    margin: 0 0.4rem !important;
    font-size: 0.65rem;
  }

  .post__header .post__title {
    font-size: 1.75rem;
  }

  .post__entry {
    padding: 1.5rem 0;
  }

  .content blockquote {
    margin: 1.5em 0;
    padding-left: 1em;
  }
}

/* ==========================================================================
   Print styles
   ========================================================================== */

@media print {
  .logo, .top-nav, .sidebar__toggler,
  .post__top_navs, .site-footer,
  nav[aria-label="Social links"],
  .post__contact {
    display: none !important;
  }

  body, html {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
  }

  .post__header .post__title {
    font-size: 24pt;
  }

  .content {
    font-size: 11pt;
    line-height: 1.6;
  }

  .content a {
    text-decoration: none;
    color: #000;
  }

  .content a:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
