/* ==========================================================================
   DevStudyHub — main stylesheet
   1  Tokens            7  Section heading & cards    13 Article
   2  Base              8  Home layouts              14 Comments
   3  Utilities         9  Trending & load more      15 Responsive
   4  Buttons & labels  10 Footer & newsletter       16 Reduced motion
   5  Header & nav      11 Social
   6  Search            12 Archive & 404
   ========================================================================== */

/* 1 · Tokens ---------------------------------------------------------------- */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root,
:root[data-theme="dark"] {
  --font:
    "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #0d0f14;
  --bg-elev: #151820;
  --bg-sunken: #0a0c10;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #c4cad6;
  --text-strong: #f3f5f9;
  --muted: #8c94a6;
  --accent: #5df0a8;
  --accent-solid: #10b981;
  --accent-solid-hover: #34d399;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --on-accent: #03140d;
  --logo-hub: #34d399;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  --overlay: linear-gradient(
    to top,
    rgba(6, 7, 12, 0.92),
    rgba(6, 7, 12, 0.5) 55%,
    rgba(6, 7, 12, 0.05)
  );

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --gutter: 16px;
  --container: 1240px;
  --sidebar: 340px;
  --gap: 28px;
  --header-h: 50px;
}

:root[data-theme="light"] {
  --bg: #f5f6fa;
  --bg-elev: #ffffff;
  --bg-sunken: #e9ebf3;
  --line: rgba(15, 18, 32, 0.1);
  --line-strong: rgba(15, 18, 32, 0.22);
  --text: #3b4255;
  --text-strong: #0e1120;
  --muted: #687086;
  --accent: #0a7a55;
  --accent-solid: #10b981;
  --accent-solid-hover: #0e9f6e;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --logo-hub: #0e9f6e;
  --shadow: 0 12px 32px rgba(20, 24, 50, 0.14);
}

/* 2 · Base ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--text-strong);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.site-main {
  flex: 1;
}

/* 3 · Utilities ------------------------------------------------------------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.container--narrow {
  --container: 780px;
}

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

.skip-link:focus {
  z-index: 1000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 16px;
  clip: auto;
  background: var(--accent-solid);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
}

.grid {
  display: grid;
  gap: var(--gap);
}

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

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

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

.grid--spaced {
  margin-top: 36px;
}

.thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-elev);
  border-radius: var(--radius-sm);
}

.thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

a.thumb:hover .thumb__img {
  transform: scale(1.04);
}

.thumb__fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  color: var(--accent);
  font-size: 2rem;
  font-weight: 800;
}

/* 4 · Buttons, labels, meta ------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-solid);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.btn:hover {
  background: var(--accent-solid-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

.btn--sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 12px;
}

.btn--pill {
  padding: 0 32px;
  border-radius: 999px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-strong);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.icon-btn:hover {
  background: var(--accent-soft);
}

.label {
  display: inline-block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.label:hover {
  color: var(--text-strong);
}

.label--solid {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-solid);
  color: var(--on-accent);
}

.label--solid:hover {
  background: var(--accent-solid-hover);
  color: var(--on-accent);
}

.meta,
.hero-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 12px;
}

.meta__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta__sep {
  opacity: 0.55;
}

/* 5 · Header & navigation --------------------------------------------------- */

.site-header {
  display: contents;
}

.site-header__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 88px;
}

.site-header__side {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-header__side--end {
  justify-content: flex-end;
}

.site-header__burger {
  display: none;
}

.site-header__subscribe {
  margin-left: 8px;
}

.logo,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--text-strong);
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.logo__icon {
  flex: none;
  width: 1.5em;
  height: 1.5em;
  border-radius: 0.4em;
}

.logo__dev {
  font-weight: 500;
}

.logo__hub {
  color: var(--logo-hub);
}

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


/* Light/dark logo swap: icon + live wordmark in light mode, dark lockup SVG in dark mode. */ .logo__dark { display: none; } .logo__dark svg { display: block; width: auto; height: 2.2em; } :root[data-theme="dark"] .logo__light { display: none; } :root[data-theme="dark"] .logo__dark { display: block; }.theme-icon--moon {
  display: none;
}

:root[data-theme="light"] .theme-icon--sun {
  display: none;
}

:root[data-theme="light"] .theme-icon--moon {
  display: block;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.admin-bar .site-nav {
  top: 32px;
}

.site-nav__inner {
  display: flex;
  justify-content: center;
}

.primary-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

.primary-menu li {
  position: relative;
}

.primary-menu a {
  position: relative;
  display: block;
  padding: 15px 14px;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.primary-menu > li > a::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 9px;
  left: 14px;
  height: 2px;
  background: var(--accent-solid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.primary-menu > li:hover > a::after,
.primary-menu > li:focus-within > a::after,
.primary-menu > .current-menu-item > a::after,
.primary-menu > .current-menu-ancestor > a::after {
  transform: scaleX(1);
}

.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.primary-menu .sub-menu a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.primary-menu .sub-menu a:hover {
  background: var(--accent-soft);
}

/* 6 · Search ---------------------------------------------------------------- */

.search-panel {
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}

.search-form {
  display: flex;
  gap: 8px;
  width: 100%;
}

.search-form__input,
.newsletter__input,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-strong);
  font: inherit;
  transition: border-color 0.2s ease;
}

.search-form__input {
  flex: 1;
}

.search-form__input:focus,
.newsletter__input:focus,
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent-solid);
  outline: none;
}

/* 7 · Section heading & cards ----------------------------------------------- */

.section-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-heading::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 56px;
  height: 2px;
  background: var(--accent-solid);
}

.section-heading__title {
  font-size: 17px;
}

.section-heading__link {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.section-heading__link:hover {
  border-color: var(--accent-solid);
  color: var(--text-strong);
}

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.card--accent {
  border-color: var(--accent-solid);
  border-color: color-mix(in srgb, var(--accent-solid) 60%, transparent);
}

.card__title {
  margin-bottom: 14px;
  font-size: 14px;
}

.card__title--accent {
  color: var(--accent);
}

.hero-card {
  position: relative;
  isolation: isolate;
  height: 100%;
  min-height: 460px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.hero-card__media {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.hero-card__media::after,
.overlay-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.hero-card__body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: clamp(20px, 3vw, 36px);
}

.hero-card__title {
  max-width: 24ch;
  color: #fff;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-card__title a::after,
.overlay-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-card .label,
.overlay-card .label {
  position: relative;
  z-index: 2;
}

.hero-card__meta {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.mini-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 14px;
  align-items: center;
}

.mini-card + .mini-card {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.mini-card__thumb {
  width: 68px;
  height: 68px;
  border-radius: var(--radius);
}

.mini-card__title {
  margin: 4px 0 6px;
  font-size: 14px;
  line-height: 1.35;
}

.tile-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.tile-card__media {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
}

.tile-card__body {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: start;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--line);
}

.tile-card__body::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-solid);
  transition: width 0.35s ease;
}

.tile-card:hover .tile-card__body::after,
.tile-card:focus-within .tile-card__body::after {
  width: 100%;
}

.tile-card__title {
  font-size: 17px;
  line-height: 1.3;
}

.tile-card__excerpt {
  color: var(--muted);
}

.tile-card--large {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.tile-card--large .tile-card__media {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
}

.tile-card--large .tile-card__body {
  padding-bottom: 0;
  border-bottom: 0;
}

.tile-card--large .tile-card__body::after {
  display: none;
}

.tile-card--large .tile-card__title {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  letter-spacing: -0.03em;
}

.row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 172px;
  gap: 22px;
  align-items: center;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

.list > .row-card:first-child {
  padding-top: 0;
}

.tile-card--large + .row-card {
  padding-top: 28px;
}

.row-card__body {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.row-card__title {
  font-size: 18px;
  line-height: 1.3;
}

.row-card__thumb {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
}

.ranked__item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.ranked__item:first-child {
  padding-top: 0;
  border-top: 0;
}

.ranked__num {
  color: var(--accent);
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.ranked__title {
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.4;
}

.side-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}

.side-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.side-item__thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
}

.side-item__title {
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.4;
}

.grid-mini {
  display: grid;
  gap: 10px;
  align-content: start;
}

.grid-mini__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}

.grid-mini__title {
  font-size: 14px;
  line-height: 1.35;
}

.card .grid--2 {
  gap: 18px 16px;
}

.overlay-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0c0e14;
}

.overlay-card__media {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.overlay-card__body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 18px;
}

.overlay-card__title {
  color: #fff;
  line-height: 1.25;
}

.overlay-card .meta {
  color: rgba(255, 255, 255, 0.75);
}

.overlay-card--lg {
  min-height: 440px;
}

.overlay-card--lg .overlay-card__body {
  padding: clamp(20px, 3vw, 32px);
}

.overlay-card--lg .overlay-card__title {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  letter-spacing: -0.03em;
}

.overlay-card--sm {
  min-height: 210px;
}

.overlay-card--sm .overlay-card__title {
  font-size: 15px;
}

.overlay-card--sm .label--solid {
  padding: 3px 8px;
  font-size: 10px;
}

/* 8 · Home layouts ---------------------------------------------------------- */

.front {
  display: grid;
  gap: 60px;
  padding-block: 28px 72px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: var(--gap);
  align-items: stretch;
}

.home-hero__side {
  display: flex;
  flex-direction: column;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
  gap: 44px;
  align-items: start;
}

.split__side {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.home-banner .promo {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

/* 9 · Trending & load more -------------------------------------------------- */

.trending {
  padding: clamp(20px, 3.5vw, 44px);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #0f8a62 0%, #0a4a3c 100%);
}

.trending__title {
  margin-bottom: 28px;
  color: #fff;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.trending__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
}

.trending__lead:only-child {
  grid-column: 1 / -1;
}

.trending__rest {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.load-more {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 32px;
}

.load-more__status {
  color: var(--muted);
  font-size: 13px;
}

/* 10 · Footer & newsletter -------------------------------------------------- */

.site-footer {
  margin-top: 48px;
  border-top: 3px solid var(--accent-solid);
  background: var(--bg-sunken);
}

.site-footer__main {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 48px;
  padding-block: 52px;
}

.footer-title {
  margin-bottom: 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-about {
  max-width: 42ch;
  color: var(--muted);
}

.site-footer__bottom {
  border-top: 1px solid var(--line);
  padding-block: 30px;
}

.site-footer__bottom-inner {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.footer-menu a:hover {
  color: var(--accent);
}

.site-footer__copy {
  color: var(--muted);
  font-size: 12px;
}

.newsletter {
  display: grid;
  gap: 10px;
}

.newsletter__title {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.newsletter__text,
.newsletter__note {
  color: var(--muted);
  font-size: 13px;
}

.newsletter__note {
  font-size: 12px;
}

.newsletter__form {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

/* 11 · Social --------------------------------------------------------------- */

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.social__link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-strong);
  font-size: 16px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.social__link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.social--card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.social--card .social__link {
  width: auto;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 18px;
}

/* 12 · Archive, pagination, empty, 404 -------------------------------------- */

.archive-layout,
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
  gap: 52px;
  align-items: start;
  padding-block: 32px 80px;
}

.article-layout {
  grid-template-columns: minmax(0, 780px) var(--sidebar);
  justify-content: space-between;
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 20px;
}

.sidebar__sticky {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 20px;
}

.page-header {
  padding-block: 12px 28px;
}

.page-header__eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-header__title {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.page-header__desc {
  max-width: 60ch;
  margin-top: 10px;
  color: var(--muted);
}

.page-layout {
  padding-block: 40px 80px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}

.page-numbers {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

a.page-numbers:hover {
  border-color: var(--accent-solid);
}

.page-numbers.current {
  border-color: var(--accent-solid);
  background: var(--accent-solid);
  color: var(--on-accent);
}

.empty-state {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding-block: 56px;
  text-align: center;
}

.empty-state__text {
  max-width: 46ch;
  color: var(--muted);
}

.empty-state .search-form {
  max-width: 480px;
  margin-top: 8px;
}

.not-found {
  display: grid;
  gap: 16px;
  justify-items: center;
  padding-block: 72px 88px;
  text-align: center;
}

.not-found__code {
  color: var(--accent);
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.not-found__text {
  max-width: 52ch;
  color: var(--muted);
}

.not-found .search-form {
  max-width: 520px;
  margin-top: 8px;
}

.not-found .related {
  width: 100%;
  margin-top: 40px;
  text-align: left;
}

/* 13 · Article -------------------------------------------------------------- */

.breadcrumbs {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.breadcrumbs__list li {
  flex: none;
}

.breadcrumbs__list li + li::before {
  content: "»";
  margin-right: 6px;
  opacity: 0.6;
}

.breadcrumbs__list li[aria-current] {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.article__header {
  display: grid;
  gap: 16px;
  justify-items: start;
  margin-bottom: 28px;
}

.article__title {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.article__lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.article__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.article__author strong {
  color: var(--text-strong);
}

.article__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-block: 14px;
  border-block: 1px solid var(--line);
}

.share__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
}

.share__btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text-strong);
  font-size: 16px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.share__btn:hover,
.share__btn.is-done {
  border-color: var(--accent-solid);
  background: var(--accent-solid);
  color: var(--on-accent);
}

.article__figure {
  margin-bottom: 34px;
}

.article__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.article__figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.prose {
  color: var(--text);
  font-size: 17px;
  line-height: 1.78;
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2 {
  margin-top: 2.1em;
  font-size: 1.65em;
  line-height: 1.22;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.3em;
}

.prose h4 {
  margin-top: 1.6em;
  font-size: 1.1em;
}

.prose strong {
  color: var(--text-strong);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--text-strong);
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--accent);
}

.prose img {
  height: auto;
  margin-inline: auto;
  border-radius: var(--radius);
}

.prose figure {
  margin-block: 1.8em;
}

.prose figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82em;
  text-align: center;
}

.prose blockquote {
  padding-left: 1.2em;
  border-left: 3px solid var(--accent-solid);
  color: var(--text-strong);
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.55;
}

.prose hr {
  margin-block: 2.4em;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose code {
  padding: 0.15em 0.4em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-elev);
  font: 0.88em var(--mono);
}

.prose pre {
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-sunken);
  font-size: 0.88em;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 1em;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prose table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.9em;
  line-height: 1.55;
}

.prose th,
.prose td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--bg-elev);
  color: var(--text-strong);
  font-weight: 700;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose details {
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.prose details + details {
  margin-top: 10px;
}

.prose summary {
  position: relative;
  padding: 15px 28px 15px 0;
  color: var(--text-strong);
  font-weight: 700;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
}

.prose summary::-webkit-details-marker {
  display: none;
}

.prose summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 2px;
  color: var(--accent);
  font-size: 1.4em;
  font-weight: 500;
  transform: translateY(-50%);
}

.prose details[open] summary::after {
  content: "–";
}

.prose details[open] summary {
  border-bottom: 1px solid var(--line);
}

.prose details > :not(summary) {
  margin-block: 14px;
}

.prose .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--accent-solid);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}

.page-links {
  display: flex;
  gap: 8px;
  margin-top: 28px;
}

.article__tags {
  margin-top: 36px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.tag-list a::before {
  content: "#";
  margin-right: 1px;
  color: var(--accent);
}

.tag-list a:hover {
  border-color: var(--accent-solid);
  color: var(--text-strong);
}

.author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 44px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.author-box__avatar {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.author-box__eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.author-box__name {
  margin-block: 2px 6px;
  font-size: 20px;
}

.author-box__bio {
  color: var(--muted);
}

.author-box__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.author-box__link:hover {
  color: var(--text-strong);
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.post-nav__link {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.post-nav__link:hover {
  border-color: var(--accent-solid);
}

.post-nav__link--next {
  grid-column: 2;
  text-align: right;
}

.post-nav__label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-nav__title {
  color: var(--text-strong);
  font-weight: 700;
  line-height: 1.35;
}

.related {
  margin-top: 60px;
}

/* 14 · Comments ------------------------------------------------------------- */

.comments {
  margin-top: 60px;
}

.comment-list,
.comment-list .children {
  display: grid;
  gap: 18px;
}

.comment-list .children {
  margin: 18px 0 0 30px;
}

.comment-body {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  font-weight: 700;
}

.comment-author .avatar {
  border-radius: 50%;
}

.comment-author .says {
  display: none;
}

.comment-metadata {
  color: var(--muted);
}

.comment-content {
  font-size: 15px;
}

.comment-content > * + * {
  margin-top: 0.8em;
}

.reply {
  margin-top: 10px;
}

.reply a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.comment-respond {
  margin-top: 36px;
}

.comment-reply-title {
  font-size: 20px;
}

.comment-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.comment-form p {
  display: grid;
  gap: 6px;
}

.comment-form label {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
}

.comment-form textarea {
  min-height: 150px;
  resize: vertical;
}

.comment-form-cookies-consent {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.comment-form-cookies-consent label {
  font-weight: 500;
}

.comment-notes,
.logged-in-as {
  color: var(--muted);
  font-size: 13px;
}

.comment-form .form-submit {
  justify-items: start;
}

.comments__closed {
  color: var(--muted);
}

/* 15 · Responsive ----------------------------------------------------------- */

@media (max-width: 1100px) {
  :root,
  :root[data-theme="dark"],
  :root[data-theme="light"] {
    --sidebar: 300px;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .archive-layout,
  .article-layout {
    gap: 36px;
  }
}

@media (max-width: 1000px) {
  .home-hero,
  .split,
  .archive-layout,
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .split__side,
  .sidebar__sticky {
    position: static;
  }

  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__main {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .site-footer__col--wide {
    grid-column: 1 / -1;
  }

  .trending__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .overlay-card--lg {
    min-height: 360px;
  }
}

@media (max-width: 900px) {
  .site-header__top {
    min-height: 68px;
  }

  .site-header__burger {
    display: inline-grid;
  }

  .site-header__side--start .social {
    display: none;
  }

  .site-nav {
    position: static;
    display: none;
    border-top: 1px solid var(--line);
    background: var(--bg-elev);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__inner {
    justify-content: stretch;
  }

  .primary-menu {
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    gap: 0;
    padding-block: 6px;
  }

  .primary-menu a {
    padding: 14px 2px;
    border-bottom: 1px solid var(--line);
  }

  .primary-menu > li > a::after {
    display: none;
  }

  .primary-menu .sub-menu {
    position: static;
    padding: 0 0 0 16px;
    border: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

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

@media (max-width: 680px) {
  .front {
    gap: 44px;
  }

  .hero-card {
    min-height: 380px;
  }

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

  .row-card {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 14px;
  }

  .row-card__title {
    font-size: 16px;
  }

  .site-header__subscribe {
    display: none;
  }

  .site-footer__main {
    grid-template-columns: 1fr;
  }

  .trending__rest {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .post-nav__link--next {
    grid-column: 1;
  }

  .author-box {
    flex-direction: column;
  }

  .prose {
    font-size: 16.5px;
  }

  .article__meta {
    gap: 8px 16px;
  }

  .article__meta .meta__sep {
    display: none;
  }

  .social--card {
    grid-template-columns: repeat(2, 1fr);
  }

  .comment-list .children {
    margin-left: 14px;
  }

  .search-form {
    flex-direction: column;
  }
}

@media (max-width: 782px) {
  .admin-bar .site-nav {
    top: 46px;
  }
}

@media (max-width: 600px) {
  .admin-bar .site-nav {
    top: 0;
  }
}

/* 16 · Reduced motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
