/* ============================================================
   FONTS
   ============================================================ */
@font-face {
  font-family: 'Mona-Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: fallback;
  src: url('/fonts/MonaSans-Regular.ttf') format('truetype');
}

/* ============================================================
   DESIGN TOKENS  (mirrors live site WP custom properties)
   ============================================================ */
:root {
  --bg-color:       #1E1E1E;
  --text-color:     #DBDBDB;
  --text-muted:     #888888;
  --accent-color:   #3b82f6;
  --border-color:   #333333;
  --code-bg:        #2d2d2d;
  --card-bg:        #252525;

  --font-body:  'Mona-Sans', system-ui, -apple-system, sans-serif;
  --font-title: 'Mona-Sans', system-ui, -apple-system, sans-serif;

  /* spacing matching live site outer padding */
  --spacing-outer: clamp(1rem, 5vw, 3rem);
  --spacing-small: 1.25rem;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-color);
  text-decoration-thickness: 1px;
  text-underline-offset: .25ch;
  text-decoration-style: dotted;
  transition: color 0.2s ease;
}

a:hover, a:focus {
  text-decoration-style: solid;
  color: #60a5fa;
}

a:active {
  text-decoration: none;
}

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

/* ============================================================
   HEADER  — compact bar: hamburger icon + small site title
   ============================================================ */
.site-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: var(--spacing-small) var(--spacing-outer);
}

/* ---- Hamburger toggle (always visible) ---- */
.nav-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-toggle svg path {
  fill: currentColor;
}

/* ---- Site title (small, inline, uppercase) ---- */
.site-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0;
  color: var(--text-color);
  line-height: 1;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* ============================================================
   NAV OVERLAY  — full-screen, centred links
   ============================================================ */
.primary-nav {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.primary-nav.is-open {
  opacity: 1;
}

/* Hide completely when not open (set by JS) */
.primary-nav[hidden] {
  display: none;
}
.primary-nav.is-open[hidden] {
  display: flex;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  font-weight: 300;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
}

.primary-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-style: normal;
}

.primary-nav a:hover,
.primary-nav a:focus {
  text-decoration: underline;
  text-decoration-style: solid;
  color: #ffffff;
}

/* ---- Close button (top-right inside overlay) ---- */
.nav-close {
  position: absolute;
  top: var(--spacing-small);
  right: var(--spacing-outer);
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.nav-close svg path {
  fill: currentColor;
}

body.nav-open {
  overflow: hidden;
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.site-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem var(--spacing-outer);
}

/* ============================================================
   PAGE TITLE  (matches wp-block-post-title)
   ============================================================ */
.page-title-wrap {
  margin-bottom: 1px; /* spacer like live site */
}

.page-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 2rem;
  color: var(--text-color);
}

/* ============================================================
   MEDIA + TEXT BLOCK  (40 % image / rest text)
   ============================================================ */
.media-text {
  display: grid;
  grid-template-columns: 40% auto;
  grid-template-rows: auto;
  gap: 0;
  margin-bottom: 3rem;
}

.media-text__media {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

.media-text__media img {
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.media-text__content {
  grid-column: 2;
  grid-row: 1;
  padding: 0 8%;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro-large {
  font-size: 1.75rem;
  line-height: 1.4;
  margin-top: 0;
}

/* Stack on mobile */
@media (max-width: 600px) {
  .media-text {
    grid-template-columns: 100% !important;
  }
  .media-text__media {
    grid-column: 1;
    grid-row: 1;
  }
  .media-text__content {
    grid-column: 1;
    grid-row: 2;
    padding: 1.5rem 0 0;
  }
}

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-heading {
  font-family: var(--font-title);
  font-weight: 300;
  font-size: 1.4rem;
  margin: 0 0 1.5rem;
  color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

/* ============================================================
   POST LIST  (home + section)
   ============================================================ */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

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

.post-item-title {
  font-family: var(--font-title);
  font-weight: 300;
  font-size: 1.75rem;
  margin: 0;
}

.post-item-title a {
  color: #ffffff;
  text-decoration: none;
}

.post-item-title a:hover {
  text-decoration: underline;
  text-decoration-style: solid;
}

.post-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.post-description {
  margin: 0;
  color: var(--text-color);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-family: var(--font-title);
  font-weight: 300;
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: #ffffff;
}

.post-content {
  font-size: 1.1rem;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--font-title);
  font-weight: 300;
  color: #ffffff;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* ============================================================
   CODE BLOCKS
   ============================================================ */
pre {
  background-color: var(--code-bg);
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  position: relative;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9em;
}

.copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.copy-button:hover {
  background: var(--border-color);
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.toc {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.toc summary {
  cursor: pointer;
  font-weight: 600;
  color: #ffffff;
}

.toc ul {
  margin-top: 1rem;
  padding-left: 1.5rem;
}

.toc li {
  margin-bottom: 0.5rem;
}

/* ============================================================
   TAGS
   ============================================================ */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.tag {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}

.tag:hover {
  background: var(--border-color);
  color: #ffffff;
  text-decoration: none;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.pagination-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pagination-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-title {
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
}

.pagination-title:hover {
  color: #ffffff;
}

/* ============================================================
   SEARCH
   ============================================================ */
#search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 2rem;
}

#search-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}



