/* Hegrok 1.0.2 — readability + H1 emphasis. Keeps dark/hacky palette. */

:root {
  --hegrok-bg: #1a1818;
  --hegrok-fg: #a6a3a2;
  --hegrok-fg-strong: #e8e4e3;
  --hegrok-accent: #4dcc33;
  --hegrok-measure: 50rem; /* ~800px — wider reading column */
}

/* Narrow reading column on tablet/desktop (overrides Hello's up-to-1140px) */
@media (min-width: 768px) {
  body:not([class*="elementor-page-"]) .site-main,
  .page-header .entry-title,
  .site-header .header-inner,
  .site-header:not(.dynamic-header),
  .site-footer .footer-inner,
  .site-footer:not(.dynamic-footer) {
    max-width: var(--hegrok-measure) !important;
  }

  body {
    font-size: 1.175rem;
    line-height: 1.7;
  }

  .site-main p {
    margin-block-end: 1.15em;
  }

  .site-main li {
    line-height: 1.65;
    margin-block-end: 0.35em;
  }

  .site-main pre,
  .site-main code {
    font-size: 0.92em;
  }
}

/* Main post/page title — clearer hierarchy on all devices */
.page-header .entry-title,
h1.entry-title {
  color: var(--hegrok-fg-strong);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  font-size: clamp(1.7rem, 1.15rem + 3vw, 2.6rem);
  margin-block-start: 0.25rem;
  margin-block-end: 0.85rem;
  /* wrap at spaces only; break mid-word only if one word is longer than the line */
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

/* Soft accent underline under the main heading (hacky, not corporate) */
.page-header .entry-title {
  padding-block-end: 0.55rem;
  border-block-end: 2px dashed var(--hegrok-accent); /* match article frame */
  display: block;
}

/* Archive / list titles quieter than H1 */
h2.entry-title {
  font-size: clamp(1.15rem, 1rem + 1.1vw, 1.5rem);
  font-weight: 600;
  line-height: 1.28;
  overflow-wrap: break-word;
  word-break: normal;
  margin-block-end: 0.35rem;
}

h2.entry-title a {
  color: var(--hegrok-fg-strong);
}

h2.entry-title a:hover,
h2.entry-title a:focus {
  color: var(--hegrok-accent);
}

/* In-article headings sit under the page H1 */
.site-main .entry-content h2,
.site-main article .entry-content h2,
.site-main .page-content h2 {
  color: var(--hegrok-fg-strong);
  font-size: clamp(1.25rem, 1.1rem + 0.9vw, 1.6rem);
  line-height: 1.25;
  margin-block-start: 1.75em;
  margin-block-end: 0.55em;
}

.site-main .entry-content h3,
.site-main article .entry-content h3,
.site-main .page-content h3 {
  color: var(--hegrok-fg-strong);
  font-size: clamp(1.08rem, 1rem + 0.5vw, 1.3rem);
  margin-block-start: 1.4em;
}

/* Mobile: keep existing feel, only slight line-height relief + H1 pop */
@media (max-width: 575px) {
  body {
    line-height: 1.5;
  }

  .page-header .entry-title,
  h1.entry-title {
    font-size: clamp(1.55rem, 5.2vw, 1.95rem);
  }
}
