/*
Theme Name: conq.blog
Theme URI: https://conq.blog
Author: conq
Description: A personal blog theme with a deep blue surround, cream content area, Georgia serif typography, and a sidebar navigation.
Version: 35.0
License: GNU General Public License v2 or later
Tags: blog, two-columns, right-sidebar, custom-menu
*/

/*
   COLOUR PALETTE
   --blue        site background, header, links
   --cream       content area background, header text
   --ink         body text
   --muted       secondary text (excerpts, footnotes)
   --faint       tertiary text (date, share buttons)
   --rule        horizontal rules and dividers
   --rule-light  post list dividers
   --sidebar-hl  sidebar recent posts links
   --cream-dim   sidebar divider

   TYPE SCALE (rem, base 16px)
   0.9  — date, share buttons
   1.0  — excerpts, footnotes, code, recent posts
   1.1  — body text, lists, blockquote, pagination, sidebar nav, read more
   1.3  — h4
   1.7  — h3
   1.8  — post list title
   2.2  — h2
   2.6  — h1
   2.8  — header brand (mobile)
   4.0  — header brand (desktop)
*/

/* =====================
   CSS VARIABLES
   ===================== */
:root {
  --blue:        #3d5a9e;
  --cream:       #fdf6e3;
  --ink:         #1a1a1a;
  --muted:       #444;
  --faint:       #999;
  --rule:        #b0a080;
  --rule-light:  #d8d0bc;
  --rule-meta:   #e0d8c8;
  --sidebar-hl:  #c8d8f0;
  --cream-dim:   rgba(253, 246, 227, 0.35);
  --serif:       Georgia, 'Times New Roman', serif;
}

/* =====================
   TARGETED MINI-RESET
   ===================== */
#page-wrap,
#page-wrap *,
#page-wrap *::before,
#page-wrap *::after {
  box-sizing: border-box;
}

#page-wrap h1,
#page-wrap h2,
#page-wrap h3,
#page-wrap h4,
#page-wrap h5,
#page-wrap h6,
#page-wrap p,
#page-wrap ul,
#page-wrap ol,
#page-wrap li,
#page-wrap blockquote {
  margin: 0;
  padding: 0;
}

/* =====================
   BODY & PAGE WRAP
   ===================== */
html, body {
  margin: 0 !important;
  padding: 0 !important;
}

body {
  background-color: var(--blue);
  font-family: var(--serif);
  color: var(--ink);
}

#page-wrap {
  width: 100%;
}

/* =====================
   OUTER ROW
   main-col centered,
   sidebar hangs to the right
   ===================== */
#outer-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* =====================
   MAIN COLUMN
   ===================== */
#main-col {
  display: flex;
  flex-direction: column;
  width: 760px;
  flex-shrink: 0;
}

/* =====================
   HEADER
   ===================== */
#site-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 38px 48px 0;
}

#site-header a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-word {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cream);
  line-height: 1;
  transition: color 0.15s;
}

#site-header a:hover .header-word {
  color: var(--sidebar-hl);
}

.header-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
}

/* =====================
   CONTENT AREA
   ===================== */
#content-wrap {
  background-color: var(--cream);
  width: 100%;
  padding: 36px 48px 60px;
}

/* =====================
   TYPOGRAPHY
   All elements inherit font-family
   from body; only exceptions declared.
   max-width: 70ch on text content
   keeps line length readable.
   ===================== */
#content-wrap h1,
#content-wrap h2,
#content-wrap h3,
#content-wrap h4,
#content-wrap h5,
#content-wrap h6 {
  color: var(--ink);
  letter-spacing: 0.01em;
  margin-bottom: 14px;
  line-height: 1.3;
  max-width: 70ch;
}

#content-wrap h1 { font-size: 2.6rem; }
#content-wrap h2 { font-size: 1.7rem; }
#content-wrap h3 { font-size: 1.4rem; }
#content-wrap h4 { font-size: 1.3rem; }

#content-wrap p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 20px;
  max-width: 70ch;
}

#content-wrap a {
  color: var(--blue);
  text-decoration: underline;
}

#content-wrap a:hover {
  color: var(--ink);
}

#content-wrap ul,
#content-wrap ol {
  padding-left: 1.6em;
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 70ch;
}

#content-wrap li {
  margin-bottom: 6px;
}

#content-wrap blockquote {
  border-left: 3px solid var(--rule);
  margin: 24px 0;
  padding: 8px 0 8px 24px;
  color: var(--muted);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 70ch;
}

#content-wrap hr {
  border: none;
  border-top: 2px solid var(--rule);
  margin: 28px 0;
}

#content-wrap img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px 0;
}

/* Image alignment */
#content-wrap .wp-block-image,
#content-wrap figure {
  margin: 24px 0;
}

/* Centered: use flexbox column so caption naturally
   matches image width and stays centered beneath it */
#content-wrap .aligncenter,
#content-wrap figure.aligncenter,
#content-wrap .wp-block-image.aligncenter {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
}

#content-wrap .alignleft,
#content-wrap figure.alignleft {
  float: left;
  margin: 8px 24px 8px 0;
}

#content-wrap .alignright,
#content-wrap figure.alignright {
  float: right;
  margin: 8px 0 8px 24px;
}

/* Captions */
#content-wrap figcaption,
#content-wrap .wp-caption-text,
#content-wrap .wp-element-caption {
  font-size: 0.85rem;
  color: var(--faint);
  text-align: center;
  margin-top: 6px;
  line-height: 1.5;
  font-style: italic;
}

#content-wrap pre,
#content-wrap code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  background-color: #f0ece0;
  border-radius: 3px;
}

#content-wrap pre {
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 20px;
  line-height: 1.6;
}

#content-wrap code {
  padding: 2px 5px;
}

/* =====================
   POST LIST (index)
   ===================== */
.post-list article {
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--rule-light);
}

.post-list article:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.post-list .entry-title,
.entry-title {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: var(--ink);
}

/* Override WP default link styles on post titles */
.post-list .entry-title a,
.post-list .entry-title a:link,
.post-list .entry-title a:visited {
  color: var(--ink) !important;
  text-decoration: none !important;
}

.post-list .entry-title a:hover {
  color: var(--blue) !important;
  text-decoration: underline !important;
}

.post-list .entry-excerpt p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.read-more,
.read-more:link,
.read-more:visited,
body #content-wrap a.read-more,
body #content-wrap a.read-more:link,
body #content-wrap a.read-more:visited {
  display: inline-block;
  margin-top: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--blue) !important;
  text-decoration: none !important;
}

.read-more:hover,
body #content-wrap a.read-more:hover {
  color: var(--blue) !important;
  text-decoration: underline !important;
}

/* =====================
   POST META ROW (single)
   One divider above the row.
   Share buttons left, date right.
   ===================== */
.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-meta);
}

.post-meta-share {
  flex: 1;
  min-width: 0;
}

.post-date {
  font-size: 0.9rem;
  color: var(--faint);
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Jetpack injects .sharedaddy after .entry-content via filter —
   strip all its own spacing/borders; .post-meta-row owns the divider */
.sharedaddy,
.sharedaddy *,
.sd-sharing,
.sd-content,
.sd-block-share {
  border: none !important;
  border-top: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =====================
   FOOTNOTES
   ===================== */
sup {
  vertical-align: baseline;
  font-size: inherit;
}

sup a,
#content-wrap sup a {
  color: var(--blue);
  text-decoration: none !important;
}

#content-wrap sup a:hover {
  text-decoration: underline !important;
}

/* Wrap footnote reference numbers in brackets via CSS.
   Targets <sup><a> patterns generated by footnote plugins. */
sup a::before { content: '['; }
sup a::after  { content: ']'; }

.footnotes,
div.footnotes,
ol.footnotes,
section.footnotes {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid var(--rule);
}

.footnotes ol,
div.footnotes ol {
  padding-left: 1.4em;
  margin: 0;
}

.footnotes li,
div.footnotes li {
  margin-bottom: 6px;
}

.footnotes a,
div.footnotes a {
  color: var(--blue);
}

/* =====================
   PAGINATION
   ===================== */
.pagination {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
}

.pagination a {
  color: var(--blue);
  text-decoration: none;
}

.pagination a:hover {
  text-decoration: underline;
}

/* Push next post to the right when prev is absent */
.pagination a[rel="next"] {
  margin-left: auto;
}

/* =====================
   SIDEBAR
   ===================== */
#sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 160px;
  padding-left: 24px;
  width: 160px;
  min-width: 0;
  flex-shrink: 0;
}

#sidebar a,
#sidebar ul li a {
  text-decoration: none;
  color: var(--cream);
  font-size: 1.1rem;
  letter-spacing: 0.07em;
  text-transform: lowercase;
  font-weight: 600;
  white-space: nowrap;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sidebar a:hover,
#sidebar ul li a:hover {
  color: #fff;
  text-decoration: underline;
}

#sidebar .widget {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#sidebar .widget-title {
  display: none;
}

#sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-divider {
  border: none;
  border-top: 2px solid var(--cream-dim);
  margin: 4px 0;
  width: 60px;
}

/* Recent posts / secondary widget links */
#sidebar .widget_recent_entries ul li a,
#sidebar .widget_recent_entries ul li a:link,
#sidebar .widget_recent_entries ul li a:visited,
#sidebar .widget_pages ul li a,
#sidebar .widget_pages ul li a:link,
#sidebar .widget_pages ul li a:visited,
#sidebar .widget_archive ul li a,
#sidebar .widget_archive ul li a:link,
#sidebar .widget_archive ul li a:visited {
  color: var(--sidebar-hl);
  font-size: 1rem;
  font-weight: normal !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

#sidebar .widget_recent_entries ul li a:hover,
#sidebar .widget_pages ul li a:hover,
#sidebar .widget_archive ul li a:hover {
  color: var(--cream);
}

/* =====================
   JETPACK SHARE & LIKE
   ===================== */
.sharedaddy h3,
.sd-title {
  display: none !important;
}

.sd-content ul {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sd-content ul li {
  margin: 0 !important;
  padding: 0 !important;
}

.sd-content ul li a,
.sd-content ul li a:visited {
  display: inline-block !important;
  font-size: 0.9rem !important;
  color: var(--faint) !important;
  text-decoration: none !important;
  background: none !important;
  border: 1px solid var(--rule-light) !important;
  border-radius: 2px !important;
  padding: 2px 8px !important;
  font-family: var(--serif) !important;
}

.sd-content ul li a:hover {
  color: var(--blue) !important;
  border-color: var(--blue) !important;
  text-decoration: none !important;
}

.sd-content ul li a img,
.sd-content ul li a svg {
  display: none !important;
}

.jetpack-likes-widget-wrapper {
  display: none !important;
}

/* =====================
   RESPONSIVE / MOBILE
   ===================== */
@media (max-width: 860px) {
  #outer-row {
    flex-direction: column;
    width: 100%;
  }

  #main-col {
    width: 100%;
  }

  #site-header {
    padding: 16px 24px 0;
  }

  .header-word {
    font-size: 2.8rem;
  }

  .header-img {
    width: 80px;
    height: 80px;
  }

  #content-wrap {
    padding: 20px 24px 40px;
  }

  #content-wrap h1 { font-size: 1.9rem; }
  #content-wrap h2 { font-size: 1.6rem; }

  #content-wrap p,
  #content-wrap ul,
  #content-wrap ol,
  .read-more,
  body #content-wrap a.read-more {
    font-size: 1rem;
  }

  #sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
    padding: 20px 24px 32px;
    min-width: 0;
    width: 100%;
  }

  #sidebar .widget,
  #sidebar ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
  }

  .sidebar-divider {
    width: 100%;
    margin: 2px 0;
  }
}

/* =====================
   JETPACK SUBSCRIBE FORM
   Hide text, keep no other styling
   ===================== */

/* Hide hr, h3 "Discover more", and p description */
.wp-block-group:has(.wp-block-jetpack-subscriptions) > .wp-block-group__inner-container > hr,
.wp-block-group:has(.wp-block-jetpack-subscriptions) > .wp-block-group__inner-container > h3,
.wp-block-group:has(.wp-block-jetpack-subscriptions) > .wp-block-group__inner-container > p {
  display: none !important;
}

/* Hide spinner */
.jetpack-memberships-spinner {
  display: none !important;
}
