/* Twenty Nineteen-faithful theme for Programming Humanity
   Design tokens measured from programminghumanity.wordpress.com (2026-08-25):
   serif body 22px/1.8, bold sans headings, primary #0073a8, grayscale+blue
   duotone featured-image headers with bottom-left entry title. */

:root {
  --bg: #fff;
  --text: #111;
  --text-lt: #767676;
  --accent: #0073aa;
  --accent-dk: #005177;
  --primary: #0073a8;      /* duotone / hero tint */
  --border: #e0e0e0;
  --code-bg: #f5f5f5;
  --draft: #ff9800;
  --priv: #e91e63;
  --fh: "NonBreakingSpaceOverride", "Hoefler Text", Garamond, "Times New Roman", serif;
  --fb: "NonBreakingSpaceOverride", -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --mw: 640px;             /* text column measure */
  --mww: 1168px;
  --col-left: calc(8.33vw + 28px);  /* left offset of the content column */
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--fh);      /* serif reading text (Twenty Nineteen) */
  font-size: 22px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--accent-dk);
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--fb);      /* bold sans headings (Twenty Nineteen) */
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ===================== */
/*   Site Header         */
/* ===================== */

.site-header {
  position: relative;
  color: var(--text);
  background: var(--bg);
  padding: 44px 0 0;
}

/* --- Featured-image variant: full-viewport duotone hero --- */
.site-header.has-featured-image {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: #000e14;
  padding: 66px 0 88px;
  overflow: hidden;
}

.featured-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}
/* blue duotone: multiply keeps shadows black, tints highlights toward primary */
.featured-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary);
  mix-blend-mode: multiply;
}

.header-inner {
  position: relative;
  z-index: 1;
  margin: 0 0 0 var(--col-left);
  max-width: var(--mww);
  padding-right: 2rem;
  text-align: left;
}

/* Branding: "Site Title — Tagline" on one line */
.site-branding {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.75rem;
}
.site-title {
  font-family: var(--fb);
  font-size: 24.75px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}
.site-title a {
  color: inherit;
  text-decoration: none;
}
.site-title a:hover {
  color: inherit;
  text-decoration: none;
}
.site-sep {
  font-family: var(--fh);
  font-size: 24.75px;
}
.site-description,
.site-title .tagline {
  font-family: var(--fh);
  font-size: 24.75px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.25;
  opacity: 1;
}
.site-header.no-featured-image .site-description,
.site-header.no-featured-image .site-title .tagline {
  color: var(--text-lt);
}

/* Navigation */
.main-nav {
  margin-top: 0.6rem;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  column-gap: 1.5rem;
}
.main-nav li a {
  color: inherit;
  font-family: var(--fb);
  font-weight: 700;
  font-size: 24.75px;
  letter-spacing: -0.02em;
  text-transform: none;
  padding: 0;
  text-decoration: none;
}
.main-nav li a:hover,
.main-nav li a.active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  color: inherit;
  background: none;
}
.site-header.no-featured-image .main-nav li a {
  color: var(--accent);
}

.social-nav {
  margin-top: 1.4rem;
}
.social-nav a {
  color: inherit;
  font-family: var(--fb);
  font-size: 16px;
  text-decoration: none;
}
.social-nav a:hover {
  text-decoration: underline;
}

/* ===================== */
/*   Hero / entry title  */
/* ===================== */

/* On featured-image pages the hero sits at the bottom-left of the image;
   on plain pages it flows in the document with a gray dash. */
.hero {
  position: relative;
  z-index: 1;
  background: none;
  color: inherit;
  padding: 0;
  margin: 3rem 0 0 var(--col-left);
  max-width: calc(var(--mw) + 4rem);
  padding-right: 2rem;
}
.hero h1 {
  font-family: var(--fb);
  font-size: 49.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  max-width: none;
}
.hero h1::before {
  content: "";
  display: block;
  width: 2.2em;
  height: 2px;
  margin-bottom: 1rem;
  background: currentColor;
}
.site-header.no-featured-image .hero {
  margin-top: 4rem;
  margin-bottom: 0.5rem;
}
.site-header.no-featured-image .hero h1::before {
  background: var(--text-lt);
}

/* ===================== */
/*   Content             */
/* ===================== */

.content-wrapper {
  max-width: calc(var(--mw) + 4rem);
  margin: 0 0 0 var(--col-left);
  padding: 2.5rem 2rem 4rem 0;
}

/* Breadcrumbs (repo addition — quiet) */
.breadcrumbs {
  font-family: var(--fb);
  font-size: 15px;
  color: var(--text-lt);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
}
.breadcrumbs a {
  color: var(--accent);
  text-decoration-thickness: 1px;
}

/* Page meta (repo addition — quiet) */
.page-meta {
  font-family: var(--fb);
  font-size: 15px;
  color: var(--text-lt);
  margin-bottom: 2rem;
}

/* Blog entry meta (author / date row) */
.entry-meta {
  font-family: var(--fb);
  font-size: 16px;
  color: var(--text-lt);
  margin: 0 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.entry-meta a { color: var(--accent); }

/* Category footer + prev/next (blog) */
.entry-footer {
  font-family: var(--fb);
  font-size: 16px;
  color: var(--text-lt);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1rem;
}
.post-nav {
  font-family: var(--fb);
  font-size: 18px;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}
.share-links {
  font-family: var(--fb);
  font-size: 15px;
  margin-top: 3rem;
  color: var(--text);
}
.share-links > span {
  display: block;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 0.6rem;
}
.share-links > span::before {
  content: "";
  display: block;
  width: 1em;
  height: 1px;
  background: var(--text);
  margin-bottom: 1rem;
}
.share-links a {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  text-decoration: none;
}
.share-links a:hover {
  border-color: var(--text-lt);
  color: var(--text);
}

/* Page content typography */
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4 {
  font-family: var(--fb);
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.page-content h2 { font-size: 36px; }
.page-content h3 { font-size: 28px; }
.page-content h4 { font-size: 22px; }

.page-content p {
  margin: 1.5rem 0;
}

.page-content blockquote {
  border-left: 2px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0 0 0 1.5rem;
  font-style: italic;
  font-size: 1em;
  color: var(--text);
}

.page-content pre,
.page-content code {
  background: var(--code-bg);
  font-size: 0.8em;
  border-radius: 3px;
}
.page-content pre {
  padding: 1rem;
  overflow-x: auto;
  line-height: 1.6;
}
.page-content code {
  padding: 0.15rem 0.4rem;
}
.page-content pre code {
  padding: 0;
  background: none;
}

.page-content ul,
.page-content ol {
  padding-left: 1.5rem;
}
.page-content li {
  margin: 0.35rem 0;
}

.page-content hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2rem 0;
  width: 2.2em;
  margin-left: 0;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.8em;
  font-family: var(--fb);
}
.page-content th,
.page-content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.page-content th {
  background: var(--code-bg);
  font-weight: 700;
}

.page-content figure {
  margin: 2rem 0;
}
.page-content figcaption {
  font-family: var(--fb);
  font-size: 16px;
  color: var(--text-lt);
  font-style: italic;
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* Blog index: live-style post previews */
.post-preview {
  margin-bottom: 3rem;
}
.post-preview h2 {
  font-size: 36px;
  margin: 0 0 0.25rem;
}
.post-preview h2 a {
  color: var(--text);
  text-decoration: none;
}
.post-preview h2 a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.post-preview .entry-meta {
  margin-bottom: 0.75rem;
}
.post-preview p {
  margin: 0;
}
.other-blog-pages {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

/* ===================== */
/*   Badges              */
/* ===================== */

.badge {
  display: inline-block;
  font-family: var(--fb);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 0.5rem;
}
.badge-draft {
  background: var(--draft);
  color: #fff;
}
.badge-private {
  background: var(--priv);
  color: #fff;
}
.badge-placeholder {
  background: #9e9e9e;
  color: #fff;
}

/* Placeholder notice */
.placeholder-notice {
  font-family: var(--fb);
  background: #fff3e0;
  border: 2px dashed var(--draft);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
  text-align: center;
}
.placeholder-notice h3 {
  color: var(--draft);
  margin-top: 0;
}

/* ===================== */
/*   Sections & Lists    */
/* ===================== */

.section {
  margin-bottom: 2.5rem;
}
.section h2 {
  font-family: var(--fb);
  color: var(--text);
  font-size: 32px;
}

.item-list {
  list-style: none;
  padding: 0;
}
.item-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.item-list li:last-child {
  border-bottom: none;
}

.columns {
  column-count: 2;
  column-gap: 2rem;
}

/* ===================== */
/*   WP Block styles     */
/* ===================== */

.wp-block-image {
  margin: 2rem 0;
}
.wp-block-separator {
  border: none;
  border-top: 2px solid var(--text);
  width: 2.2em;
  margin: 2rem 0;
  margin-left: 0;
}

/* ===================== */
/*   Footer              */
/* ===================== */

.site-footer {
  border-top: none;
  background: var(--bg);
  color: var(--text-lt);
  font-family: var(--fb);
  padding: 2rem 2rem 2rem var(--col-left);
  text-align: left;
  font-size: 16px;
}
.site-footer a {
  color: var(--accent);
}

/* ===================== */
/*   Responsive          */
/* ===================== */

@media (max-width: 1024px) {
  :root {
    --col-left: calc(4vw + 16px);
  }
}

@media (max-width: 768px) {
  body {
    font-size: 18px;
  }

  :root {
    --col-left: 1rem;
  }

  /* Live-site mobile behavior: hero collapses to a solid primary block */
  .site-header.has-featured-image {
    background: var(--primary);
    padding: 44px 0 56px;
  }
  .featured-media {
    display: none;
  }

  .site-header {
    padding-top: 32px;
  }

  .site-title,
  .site-sep,
  .site-description,
  .site-title .tagline,
  .main-nav li a {
    font-size: 20px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .content-wrapper {
    padding: 2rem 1rem 3rem 0;
  }

  .columns {
    column-count: 1;
  }

  .post-nav {
    flex-direction: column;
    gap: 0.5rem;
  }
}
