/*
Theme Name: Hazel Mist Journal
Author: North Vale Editorial
Description: A mobile-first classic WordPress theme with a bright editor experience, flexible editorial layouts, dynamic navigation, and soft modern visuals.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: hml-theme
*/

:root {
  --hml-bg: #0f140f;
  --hml-bg-soft: #f5f7ec;
  --hml-panel: #ffffff;
  --hml-panel-muted: #edf3dc;
  --hml-text: #101510;
  --hml-text-light: #f8fbf0;
  --hml-muted: #67705f;
  --hml-line: #dbe5c8;
  --hml-line-dark: rgba(255, 255, 255, 0.18);
  --hml-lime: #d8ff63;
  --hml-lime-dark: #b4df37;
  --hml-green: #244f32;
  --hml-green-bright: #47a65b;
  --hml-sky: #9fd2ef;
  --hml-coral: #f5886d;
  --hml-shadow: 0 24px 70px rgba(19, 29, 16, 0.16);
  --hml-radius-sm: 8px;
  --hml-radius-md: 18px;
  --hml-radius-lg: 28px;
  --hml-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--hml-text);
  background: var(--hml-bg);
  font-family: var(--hml-font);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--hml-green);
}

button,
input,
textarea,
select {
  font: inherit;
}

.hml-site {
  min-height: 100vh;
}

.hml-shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.hml-screen-reader-text,
.hml-skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hml-skip-link:focus {
  z-index: 9999;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  color: var(--hml-text);
  background: var(--hml-lime);
  border-radius: var(--hml-radius-sm);
}

.hml-header {
  position: sticky;
  z-index: 100;
  top: 0;
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(15, 20, 15, 0.96), rgba(15, 20, 15, 0.72) 70%, rgba(15, 20, 15, 0));
  backdrop-filter: blur(14px);
}

.hml-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 12px 10px 18px;
  color: var(--hml-text);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
}

.hml-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--hml-text);
  text-decoration: none;
}

.hml-brand:hover {
  color: var(--hml-text);
}

.hml-brand__mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--hml-text);
  background: var(--hml-lime);
  border: 1px solid rgba(16, 21, 16, 0.1);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
}

.hml-brand__name {
  overflow: hidden;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hml-custom-logo {
  max-width: 150px;
  height: auto;
}

.hml-menu-toggle {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: var(--hml-text-light);
  background: var(--hml-text);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.hml-menu-toggle__icon {
  display: grid;
  gap: 4px;
}

.hml-menu-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.hml-navigation {
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  left: 16px;
  display: none;
  padding: 10px;
  color: var(--hml-text);
  background: var(--hml-panel);
  border: 1px solid var(--hml-line);
  border-radius: var(--hml-radius-md);
  box-shadow: var(--hml-shadow);
}

.hml-navigation-open .hml-navigation {
  display: block;
}

.hml-navigation-open .hml-menu-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hml-navigation-open .hml-menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.hml-navigation-open .hml-menu-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hml-menu,
.hml-sub-menu {
  display: grid;
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hml-sub-menu {
  padding: 6px 0 4px 14px;
}

.hml-menu-link {
  display: block;
  padding: 10px 12px;
  color: var(--hml-text);
  border-radius: var(--hml-radius-sm);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.hml-menu-link:hover,
.hml-current > .hml-menu-link {
  color: var(--hml-text);
  background: var(--hml-panel-muted);
}

.hml-main {
  overflow: hidden;
  background: var(--hml-bg-soft);
}

.hml-hero {
  position: relative;
  padding: 56px 0 74px;
  color: var(--hml-text-light);
  background:
    radial-gradient(circle at 16% 20%, rgba(216, 255, 99, 0.14), transparent 26%),
    linear-gradient(180deg, #101610 0%, #151d14 52%, #0f140f 100%);
}

.hml-hero::after {
  position: absolute;
  right: -20vw;
  bottom: -18vw;
  width: 62vw;
  height: 62vw;
  content: "";
  background: radial-gradient(circle, rgba(159, 210, 239, 0.16), transparent 68%);
  pointer-events: none;
}

.hml-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 34px;
}

.hml-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  color: var(--hml-text);
  background: rgba(216, 255, 99, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hml-kicker::before {
  width: 8px;
  height: 8px;
  content: "";
  background: var(--hml-green);
  border-radius: 50%;
}

.hml-hero__title {
  max-width: 760px;
  margin: 18px 0 16px;
  color: var(--hml-text-light);
  font-size: clamp(2.55rem, 13vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hml-hero__copy {
  max-width: 620px;
  margin: 0;
  color: rgba(248, 251, 240, 0.78);
  font-size: 1.05rem;
}

.hml-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hml-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  color: var(--hml-text);
  background: var(--hml-lime);
  border: 1px solid rgba(216, 255, 99, 0.65);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(216, 255, 99, 0.16);
}

.hml-button:hover {
  color: var(--hml-text);
  background: #e7ff96;
}

.hml-button--ghost {
  color: var(--hml-text-light);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--hml-line-dark);
  box-shadow: none;
}

.hml-button--ghost:hover {
  color: var(--hml-text-light);
  background: rgba(255, 255, 255, 0.14);
}

.hml-visual {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  color: var(--hml-text);
  background: #101510;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--hml-radius-lg);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
}

.hml-visual__sky {
  position: absolute;
  inset: 0 0 auto;
  height: 48%;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.95) 0 8%, transparent 9%),
    linear-gradient(180deg, var(--hml-sky), #f2d59f);
}

.hml-visual__hill,
.hml-visual__hill::before,
.hml-visual__hill::after {
  position: absolute;
  right: -16%;
  bottom: -18%;
  left: -18%;
  height: 48%;
  content: "";
  background: linear-gradient(180deg, #6ebe60, #2f6c3f);
  border-radius: 50% 50% 0 0;
}

.hml-visual__hill::before {
  right: 28%;
  bottom: 22%;
  left: -4%;
  height: 74%;
  background: linear-gradient(180deg, #8fdc6f, #3e7d43);
}

.hml-visual__hill::after {
  right: -5%;
  bottom: 38%;
  left: 38%;
  height: 55%;
  background: linear-gradient(180deg, #c8ec72, #57934a);
}

.hml-visual__flowers {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 30%;
  opacity: 0.82;
  background-image:
    radial-gradient(circle, #f5886d 0 3px, transparent 4px),
    radial-gradient(circle, #d8ff63 0 3px, transparent 4px),
    radial-gradient(circle, #f5d469 0 2px, transparent 3px),
    radial-gradient(circle, #ffffff 0 2px, transparent 3px);
  background-position: 10px 18px, 42px 38px, 72px 14px, 102px 48px;
  background-size: 118px 72px;
}

.hml-dashboard {
  position: absolute;
  top: 28px;
  right: 22px;
  left: 22px;
  display: grid;
  gap: 14px;
}

.hml-dashboard__panel {
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

.hml-dashboard__topline,
.hml-mini-card__label {
  color: var(--hml-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hml-dashboard__value {
  margin-top: 6px;
  font-size: clamp(2rem, 10vw, 3.4rem);
  font-weight: 900;
  line-height: 1;
}

.hml-dashboard__bars {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.hml-dashboard__bar {
  height: 10px;
  overflow: hidden;
  background: #e8efdc;
  border-radius: 999px;
}

.hml-dashboard__bar span {
  display: block;
  height: 100%;
  width: 86%;
  background: linear-gradient(90deg, var(--hml-green), var(--hml-lime-dark));
  border-radius: inherit;
}

.hml-dashboard__bar:nth-child(2) span {
  width: 72%;
}

.hml-dashboard__bar:nth-child(3) span {
  width: 48%;
  background: linear-gradient(90deg, var(--hml-coral), #ffd178);
}

.hml-dashboard__cluster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.hml-mini-card {
  min-height: 116px;
  padding: 16px;
  background: var(--hml-lime);
  border: 1px solid rgba(16, 21, 16, 0.08);
  border-radius: 22px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.14);
}

.hml-mini-card--dark {
  color: var(--hml-text-light);
  background: #101510;
  border-color: rgba(255, 255, 255, 0.14);
}

.hml-mini-card--dark .hml-mini-card__label {
  color: rgba(248, 251, 240, 0.66);
}

.hml-mini-card__value {
  margin-top: 10px;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
}

.hml-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hml-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: var(--hml-text);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(16, 21, 16, 0.08);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.hml-feed {
  padding: 54px 0 72px;
  background: var(--hml-bg-soft);
}

.hml-section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.hml-section-head__eyebrow {
  color: var(--hml-green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hml-section-head__title {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 9vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.hml-post-grid {
  display: grid;
  gap: 18px;
}

.hml-card {
  overflow: hidden;
  background: var(--hml-panel);
  border: 1px solid var(--hml-line);
  border-radius: var(--hml-radius-md);
  box-shadow: 0 14px 44px rgba(22, 31, 18, 0.08);
}

.hml-card:nth-child(4n+1) {
  background: var(--hml-lime);
}

.hml-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  color: var(--hml-text-light);
  background: linear-gradient(135deg, #203927, #74bf67 58%, #d8ff63);
  text-decoration: none;
}

.hml-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.hml-card:hover .hml-card__media img {
  transform: scale(1.035);
}

.hml-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: end start;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(15, 20, 15, 0.04), rgba(15, 20, 15, 0.28)),
    url("assets/images/hml-default-thumb.svg") center / cover no-repeat;
}

.hml-card__placeholder span {
  padding: 6px 10px;
  color: var(--hml-text);
  background: rgba(216, 255, 99, 0.88);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hml-card__body {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.hml-card__meta,
.hml-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: var(--hml-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.hml-card__title {
  margin: 0;
  font-size: clamp(1.35rem, 7vw, 2.05rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hml-card__title a {
  color: var(--hml-text);
  text-decoration: none;
}

.hml-card__title a:hover {
  color: var(--hml-green);
}

.hml-card__excerpt {
  margin: 0;
  color: var(--hml-muted);
}

.hml-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hml-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: var(--hml-text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 21, 16, 0.08);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.hml-chip:hover {
  color: var(--hml-text);
  background: var(--hml-panel-muted);
}

.hml-empty {
  padding: 34px;
  background: var(--hml-panel);
  border: 1px solid var(--hml-line);
  border-radius: var(--hml-radius-md);
}

.hml-pagination {
  margin-top: 34px;
}

.hml-pagination__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.hml-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  color: var(--hml-text);
  background: var(--hml-panel);
  border: 1px solid var(--hml-line);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.hml-pagination a:hover {
  background: var(--hml-lime);
}

.hml-single {
  padding: 54px 0 78px;
  background:
    linear-gradient(180deg, var(--hml-bg) 0 260px, var(--hml-bg-soft) 260px);
}

.hml-article {
  width: 80vw;
  max-width: 920px;
  margin-inline: auto;
  color: var(--hml-text);
}

.hml-article__header {
  padding: 30px 0 28px;
  color: var(--hml-text-light);
}

.hml-article__header .hml-chip {
  color: var(--hml-text);
  background: var(--hml-lime);
}

.hml-article__title {
  margin: 16px 0 0;
  color: var(--hml-text-light);
  font-size: clamp(2.35rem, 12vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hml-entry-content {
  padding: clamp(22px, 5vw, 44px);
  background: var(--hml-panel);
  border: 1px solid var(--hml-line);
  border-radius: var(--hml-radius-lg);
  box-shadow: var(--hml-shadow);
}

.hml-entry-content > *:first-child {
  margin-top: 0;
}

.hml-entry-content > *:last-child {
  margin-bottom: 0;
}

.hml-entry-content p,
.hml-entry-content ul,
.hml-entry-content ol {
  margin: 0 0 1.2em;
}

.hml-entry-content h2,
.hml-entry-content h3,
.hml-entry-content h4 {
  margin: 1.45em 0 0.45em;
  line-height: 1.12;
  letter-spacing: 0;
}

.hml-entry-content h2 {
  font-size: clamp(1.8rem, 7vw, 3rem);
}

.hml-entry-content h3 {
  font-size: clamp(1.45rem, 5vw, 2.2rem);
}

.hml-entry-content a {
  color: var(--hml-green);
  font-weight: 800;
}

.hml-entry-content blockquote {
  margin: 1.6em 0;
  padding: 18px 20px;
  background: var(--hml-panel-muted);
  border-left: 5px solid var(--hml-lime-dark);
  border-radius: var(--hml-radius-sm);
}

.hml-entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.hml-entry-content th,
.hml-entry-content td {
  padding: 10px;
  border: 1px solid var(--hml-line);
}

.hml-entry-content pre {
  max-width: 100%;
  overflow: auto;
  padding: 16px;
  color: var(--hml-text-light);
  background: #101510;
  border-radius: var(--hml-radius-sm);
}

.hml-entry-footer,
.hml-post-nav {
  width: 80vw;
  max-width: 920px;
  margin: 22px auto 0;
}

.hml-entry-footer {
  display: grid;
  gap: 14px;
}

.hml-post-nav {
  display: grid;
  gap: 12px;
}

.hml-post-nav a {
  display: block;
  padding: 16px;
  color: var(--hml-text);
  background: var(--hml-panel);
  border: 1px solid var(--hml-line);
  border-radius: var(--hml-radius-md);
  font-weight: 800;
  text-decoration: none;
}

.hml-post-nav a:hover {
  background: var(--hml-lime);
}

.hml-footer {
  padding: 48px 0 30px;
  color: rgba(248, 251, 240, 0.72);
  background: var(--hml-bg);
}

.hml-footer__grid {
  display: grid;
  gap: 26px;
}

.hml-footer__brand {
  max-width: 480px;
}

.hml-footer__title {
  margin: 0 0 8px;
  color: var(--hml-text-light);
  font-size: 1.4rem;
  font-weight: 900;
}

.hml-footer__copy {
  margin: 0;
}

.hml-footer__widgets {
  display: grid;
  gap: 18px;
}

.hml-footer__widgets a {
  color: var(--hml-text-light);
}

.hml-footer__bottom {
  padding-top: 24px;
  margin-top: 34px;
  border-top: 1px solid var(--hml-line-dark);
  font-size: 0.92rem;
}

@media (min-width: 640px) {
  .hml-shell {
    width: min(1120px, calc(100% - 48px));
  }

  .hml-dashboard__cluster {
    grid-template-columns: 1fr 1fr;
  }

  .hml-post-nav {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 820px) {
  .hml-menu-toggle {
    display: none;
  }

  .hml-navigation {
    position: static;
    display: block;
    width: auto;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hml-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
  }

  .hml-menu-item {
    position: relative;
  }

  .hml-sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    display: none;
    min-width: 210px;
    padding: 8px;
    background: var(--hml-panel);
    border: 1px solid var(--hml-line);
    border-radius: var(--hml-radius-md);
    box-shadow: var(--hml-shadow);
  }

  .hml-menu-item:hover > .hml-sub-menu,
  .hml-menu-item:focus-within > .hml-sub-menu {
    display: grid;
  }

  .hml-hero {
    padding: 84px 0 96px;
  }

  .hml-hero__grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.9fr);
    align-items: center;
  }

  .hml-post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hml-card:first-child {
    grid-column: span 2;
  }

  .hml-footer__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 1120px) {
  .hml-hero__title {
    font-size: 6.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
