/*
Northline Astro — adapted from the local myWpTheme reference.
The reference layout, colors and locally bundled illustrations are preserved.
*/

:root {
  --nl-bg: #f5f7fa;
  --nl-surface: #ffffff;
  --nl-ink: #172033;
  --nl-muted: #6e788b;
  --nl-line: #e4e9f0;
  --nl-blue: #1688f8;
  --nl-blue-dark: #0870dc;
  --nl-blue-soft: #eaf5ff;
  --nl-navy: #10263f;
  --nl-shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
  --nl-radius-lg: 10px;
  --nl-radius-md: 8px;
  --nl-page: 1200px;
  --nl-header: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--nl-ink);
  background: var(--nl-bg);
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

body.search-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  color: var(--nl-ink);
  background: var(--nl-surface);
  border-radius: 8px;
  box-shadow: var(--nl-shadow);
}

.site-shell {
  width: min(calc(100% - 40px), var(--nl-page));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--nl-header);
  background: rgba(255, 255, 255, 0.91);
  border-bottom: 1px solid rgba(228, 233, 240, 0.8);
  backdrop-filter: blur(18px);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 36px rgba(23, 32, 51, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 36px;
}

.site-branding {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.custom-logo-link img {
  width: auto;
  max-height: 42px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark::before { display: none; }

.brand-mark span {
  color: var(--nl-blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.primary-menu,
.primary-menu ul {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-menu a {
  position: relative;
  display: block;
  padding: 20px 0 18px;
  color: #465166;
  font-size: 14px;
  font-weight: 650;
}

.primary-menu a::after {
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 2px;
  content: "";
  background: var(--nl-blue);
  border-radius: 2px;
  transition: right 180ms ease, left 180ms ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
  color: var(--nl-blue);
}

.primary-menu a:hover::after,
.primary-menu .current-menu-item > a::after,
.primary-menu .current_page_item > a::after {
  right: 0;
  left: 0;
}

.header-search {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #536077;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.search-overlay {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  align-items: start;
  padding-top: min(18vh, 150px);
  visibility: hidden;
  opacity: 0;
  background: rgba(8, 20, 36, 0.72);
  backdrop-filter: blur(14px);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.search-open .search-overlay {
  visibility: visible;
  opacity: 1;
}

.search-dialog {
  width: min(calc(100% - 36px), 760px);
  padding: 32px;
  margin-inline: auto;
  background: var(--nl-surface);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  transform: translateY(-16px) scale(0.985);
  transition: transform 220ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.search-open .search-dialog {
  transform: translateY(0) scale(1);
}

.search-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.search-dialog-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.search-close {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: #566176;
  background: #f2f5f8;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.search-close:hover {
  color: #fff;
  background: var(--nl-blue);
}

.search-close svg {
  width: 18px;
  height: 18px;
}

.search-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-field {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 17px;
  color: var(--nl-ink);
  background: #f5f7fa;
  border: 1px solid var(--nl-line);
  border-radius: 11px;
  outline: 0;
}

.search-field:focus {
  background: #fff;
  border-color: var(--nl-blue);
  box-shadow: 0 0 0 4px var(--nl-blue-soft);
}

.search-submit {
  height: 52px;
  padding: 0 24px;
  color: #fff;
  font-weight: 750;
  background: var(--nl-blue);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.search-submit:hover {
  background: var(--nl-blue-dark);
}

.search-hint {
  margin: 13px 0 0;
  color: var(--nl-muted);
  font-size: 13px;
}

.header-search:hover {
  color: var(--nl-blue);
  background: var(--nl-blue-soft);
}

.header-search svg {
  width: 19px;
  height: 19px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  border-radius: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
}

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

.home-hero { padding: 20px 0 0; color: #fff; }

.hero-carousel,
.hero-slides { position: relative; min-height: 310px; }

.hero-carousel {
  overflow: hidden;
  background: var(--nl-navy);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(27, 43, 63, 0.1);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 420ms ease, transform 650ms ease, visibility 420ms ease;
}

.hero-slide.is-active {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  transform: scale(1);
}

.home-hero::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  display: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 8px;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(8, 27, 48, 0.9), rgba(8, 35, 61, 0.64) 48%, rgba(8, 35, 61, 0.08));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  animation: hero-settle 1.2s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 310px;
  overflow: hidden;
  background: var(--nl-navy);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(27, 43, 63, 0.1);
}

.hero-copy {
	position: relative;
  z-index: 2;
  width: min(600px, 62%);
  padding: 46px 50px 50px;
  animation: hero-copy 700ms 120ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.carousel-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0 0 3px;
  place-items: center;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  background: rgba(6, 18, 31, 0.42);
  border: 0;
  border-radius: 50%;
  opacity: 0;
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity 180ms ease, background 180ms ease;
}

.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }
.hero-carousel:hover .carousel-arrow,
.hero-carousel:focus-within .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: var(--nl-blue); }

.carousel-dots {
  position: absolute;
  z-index: 4;
  right: 22px;
  bottom: 17px;
  display: flex;
  gap: 7px;
}

.carousel-dot {
  width: 19px;
  height: 4px;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.carousel-dot.is-active { width: 30px; background: #fff; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: #9fd1ff;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 24px;
  height: 2px;
  content: "";
  background: var(--nl-blue);
}

.hero-title {
  max-width: 620px;
  margin: 0;
  font-size: clamp(28px, 3.5vw, 45px);
  line-height: 1.22;
  letter-spacing: -0.045em;
}

.hero-title a:hover {
  color: #d8edff;
}

.hero-excerpt {
  max-width: 560px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.hero-meta .dot {
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 9px 15px;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  background: var(--nl-blue);
  border-radius: 5px;
  box-shadow: 0 14px 30px rgba(22, 136, 248, 0.28);
  transition: gap 180ms ease, transform 180ms ease, background 180ms ease;
}

.hero-link:hover {
  gap: 15px;
  background: var(--nl-blue-dark);
  transform: translateY(-2px);
}

.home-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 56px;
}

.posts-panel {
  overflow: hidden;
  background: var(--nl-surface);
  border: 1px solid var(--nl-line);
  border-radius: 8px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 0 22px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--nl-line);
}

.section-kicker {
  margin: 0 0 4px;
  color: var(--nl-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.section-title::before {
  display: inline-block;
  width: 3px;
  height: 17px;
  margin-right: 10px;
  vertical-align: -2px;
  content: "";
  background: var(--nl-blue);
  border-radius: 2px;
  box-shadow: 6px 0 0 rgba(22, 136, 248, 0.35);
}

.section-categories { display: flex; gap: 15px; }
.section-categories a { color: var(--nl-muted); font-size: 12px; }
.section-categories a:hover { color: var(--nl-blue); }

.section-note {
  margin: 0;
  color: var(--nl-muted);
  font-size: 13px;
}

.post-list {
  background: var(--nl-surface);
}

.post-card {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  min-height: 188px;
  padding: 20px 22px;
  transition: background 180ms ease;
}

.post-card:hover { background: #fbfcfe; }

.post-card + .post-card::before {
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  height: 1px;
  content: "";
  background: var(--nl-line);
}

.post-thumbnail {
  position: relative;
  height: 138px;
  min-height: 138px;
  overflow: hidden;
  background: #dce9f5;
  border-radius: 6px;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.055);
}

.post-category {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--nl-blue);
  font-size: 12px;
  font-weight: 800;
}

.sticky-label { display: inline-block; padding: 2px 7px; margin-right: 8px; color: #fff; font-size: 11px; line-height: 1.5; vertical-align: 3px; background: var(--nl-blue); border-radius: 3px; }

.post-category::before {
  width: 6px;
  height: 6px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.post-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.post-title a {
  background-image: linear-gradient(var(--nl-blue), var(--nl-blue));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: color 180ms ease, background-size 220ms ease;
}

.post-title a:hover {
  color: var(--nl-blue);
  background-size: 100% 1px;
}

.post-excerpt {
  display: -webkit-box;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--nl-muted);
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: #9098a7;
  font-size: 12px;
}

.post-meta-primary { display: flex; align-items: center; gap: 9px; }
.post-author-mark { display: grid!important; width: 22px; height: 22px; place-items: center; color: #fff; font-size: 10px; font-weight: 800; background: var(--nl-blue); border-radius: 50%; }

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-meta svg {
  width: 14px;
  height: 14px;
}

.empty-state {
  padding: 64px 28px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--nl-muted);
}

.pagination {
  margin-top: 28px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination .page-numbers {
  display: grid;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  place-items: center;
  color: #5d687a;
  background: var(--nl-surface);
  border-radius: 9px;
}

.pagination .current,
.pagination a:hover {
  color: #fff;
  background: var(--nl-blue);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-panel {
  padding: 20px;
  background: var(--nl-surface);
  border: 1px solid var(--nl-line);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(23, 32, 51, 0.025);
}

.widget-title,
.sidebar-title {
  position: relative;
  padding-left: 14px;
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.5;
}

.widget-title::before,
.sidebar-title::before {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 3px;
  content: "";
  background: var(--nl-blue);
  border-radius: 3px;
}

.about-block {
  overflow: hidden;
  padding: 0;
}

.about-cover {
  height: 84px;
  background: linear-gradient(135deg, #1688f8, #6ec0ff 70%, #c9e8ff);
}

.about-inner {
  padding: 0 20px 20px;
}

.about-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  margin-top: -29px;
  margin-bottom: 14px;
  place-items: center;
  color: #fff;
  font-size: 23px;
  font-weight: 850;
  background: var(--nl-navy);
  border: 4px solid #fff;
  border-radius: 50%;
}

.widget :where(h1,h2,h3):not(.widget-title) { position: relative; padding-left: 14px; margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
.widget :where(h1,h2,h3):not(.widget-title)::before { position: absolute; top: 3px; bottom: 3px; left: 0; width: 3px; content: ""; background: var(--nl-blue); border-radius: 3px; }
.widget .wp-block-search__label { display: block; margin-bottom: 9px; color: var(--nl-ink); font-size: 15px; font-weight: 700; }
.widget .wp-block-search__inside-wrapper { display: flex; gap: 7px; }
.widget .wp-block-search__input { min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--nl-line); border-radius: 5px; outline: none; }
.widget .wp-block-search__input:focus { border-color: var(--nl-blue); }
.widget .wp-block-search__button {
  flex: 0 0 auto;
  min-width: 64px;
  height: 38px;
  padding: 0 14px;
  margin: 0;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
  background: var(--nl-blue);
  border: 0;
  border-radius: 5px;
}
.widget .wp-block-latest-posts,
.widget .wp-block-latest-comments { padding: 0; margin: 0; list-style: none; }
.widget .wp-block-latest-posts li,
.widget .wp-block-latest-comments li { padding: 9px 0; margin: 0; border-bottom: 1px dashed var(--nl-line); }
.widget .wp-block-latest-posts li:last-child,
.widget .wp-block-latest-comments li:last-child { border-bottom: 0; }
.widget .wp-block-latest-comments__comment-meta { color: var(--nl-muted); font-size: 12px; line-height: 1.6; }

.comments-area { padding: 28px 32px; margin-top: 18px; background: #fff; border: 1px solid var(--nl-line); border-radius: 8px; }
.comments-title,
.comment-reply-title { margin: 0 0 22px; font-size: 18px; }
.comment-list { padding: 0; margin: 0 0 28px; list-style: none; }
.comment-list .children { padding-left: 52px; list-style: none; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--nl-line); }
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-author .avatar { border-radius: 50%; }
.comment-metadata { margin: 4px 0 8px 52px; color: var(--nl-muted); font-size: 12px; }
.comment-content { margin-left: 52px; color: #465166; font-size: 14px; }
.comment-content p { margin: 0 0 8px; }
.reply { margin-left: 52px; font-size: 12px; }
.comment-form p { margin: 0 0 14px; }
.comment-form label { display: block; margin-bottom: 5px; color: #58647a; font-size: 13px; }
.comment-form textarea,
.comment-form input:not([type="submit"]):not([type="checkbox"]) { width: 100%; padding: 10px 12px; border: 1px solid var(--nl-line); border-radius: 5px; outline: none; }
.comment-form textarea:focus,
.comment-form input:focus { border-color: var(--nl-blue); }
.form-submit .submit { padding: 10px 18px; color: #fff; font-weight: 700; background: var(--nl-blue); border: 0; border-radius: 5px; cursor: pointer; }

.about-name {
  margin: 0 0 5px;
  font-size: 17px;
}

.about-copy {
  margin: 0;
  color: var(--nl-muted);
  font-size: 13px;
}

.category-list,
.recent-list,
.widget ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.category-list li,
.widget li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  color: #596579;
  font-size: 14px;
  border-bottom: 1px dashed var(--nl-line);
}

.category-list li:last-child,
.widget li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.category-list a:hover,
.widget a:hover {
  color: var(--nl-blue);
}

.category-count {
  display: grid;
  min-width: 28px;
  height: 23px;
  padding: 0 7px;
  place-items: center;
  color: #8490a2;
  font-size: 11px;
  background: #f0f4f8;
  border-radius: 12px;
}

.recent-item {
  counter-increment: recent;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--nl-line);
}

.recent-list {
  counter-reset: recent;
}

.recent-item::before {
  display: grid;
  width: 25px;
  height: 25px;
  content: counter(recent, decimal-leading-zero);
  place-items: center;
  color: var(--nl-blue);
  font-size: 11px;
  font-weight: 800;
  background: var(--nl-blue-soft);
  border-radius: 7px;
}

.recent-item a {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.recent-item a:hover {
  color: var(--nl-blue);
}

.site-footer {
  color: #9eabc0;
  background: #101b2d;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.6fr;
  gap: 54px;
  padding-top: 42px;
  padding-bottom: 34px;
}

.footer-brand {
  margin-bottom: 17px;
  color: #fff;
}

.footer-copy {
  max-width: 450px;
  margin: 0;
  font-size: 14px;
}

.footer-heading {
  margin: 4px 0 17px;
  color: #fff;
  font-size: 14px;
}

.footer-menu,
.footer-menu ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-menu li {
  margin: 7px 0;
}

.footer-menu a {
  font-size: 13px;
}

.footer-menu a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 17px;
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
  margin: 0;
}

.archive-header {
  padding-top: 34px;
  padding-bottom: 22px;
}

.archive-title {
  margin: 0;
  font-size: clamp(27px, 3.4vw, 40px);
  letter-spacing: -0.04em;
}

.archive-description {
  max-width: 720px;
  margin-top: 10px;
  color: var(--nl-muted);
}

.single-main {
  width: min(calc(100% - 40px), 1200px);
  padding-top: 24px;
  padding-bottom: 64px;
}

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 880px) 300px;
  gap: 20px;
  align-items: start;
}

.single-layout > section { min-width: 0; }
.single-layout > .sidebar { position: sticky; top: calc(var(--nl-header) + 20px); }

.single-article {
  overflow: hidden;
  background: var(--nl-surface);
  border: 1px solid #e9edf2;
  border-radius: 8px;
  box-shadow: 0 3px 16px rgba(23, 42, 65, 0.025);
}

.single-header {
  padding: 46px 48px 30px;
  border-bottom: 1px solid #e6ebf0;
}

.single-title {
  max-width: none;
  margin: 0 0 25px;
  color: #263746;
  font-size: clamp(26px, 2.35vw, 30px);
  font-weight: 520;
  line-height: 1.42;
  letter-spacing: -0.025em;
}

.single-meta { display: flex; flex-wrap: wrap; gap: 24px; color: #91a4b8; font-size: 14px; font-weight: 450; }
.single-meta a { color: inherit; }
.single-meta a:hover { color: var(--nl-blue); }

.single-featured {
  max-height: 520px;
  overflow: hidden;
  margin: 30px 48px 0;
  border-radius: 7px;
}

.single-featured img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.entry-content {
  padding: 36px 48px 52px;
  color: #4c5e70;
  font-size: 16px;
  font-weight: 400;
  line-height: 2.05;
}

.entry-content p { margin-top: 0; margin-bottom: 1.65em; }

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

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 1.75em;
  margin-bottom: 0.72em;
  color: #2c96ef;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.entry-content h2 { position: relative; padding-left: 16px; font-size: 23px; }
.entry-content h2::before { position: absolute; top: 0.2em; bottom: 0.2em; left: 0; width: 4px; content: ""; background: #34a0fa; border-radius: 3px; }
.entry-content h3 { font-size: 20px; }
.entry-content h4 { font-size: 18px; }

.entry-content a {
  color: var(--nl-blue-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.entry-content img {
  border-radius: 12px;
}

.entry-content blockquote {
  padding: 18px 22px;
  margin: 28px 0;
  color: #4d5b70;
  background: var(--nl-blue-soft);
  border-left: 4px solid var(--nl-blue);
  border-radius: 0 12px 12px 0;
}

.entry-content pre {
  max-height: 460px;
  overflow: auto;
  padding: 20px;
  color: #dbe8f5;
  background: #101b2d;
  border-radius: 12px;
  overscroll-behavior: contain;
}

.entry-content code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.single-footer {
  padding: 0 48px 42px;
}

.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.single-tags a {
  padding: 6px 11px;
  color: #5c687b;
  font-size: 12px;
  background: #f1f4f7;
  border-radius: 8px;
}

.post-navigation {
  margin-top: 24px;
}

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.post-navigation a {
  display: block;
  padding: 17px 20px;
  color: #556176;
  font-size: 13px;
  background: var(--nl-surface);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(23, 32, 51, 0.05);
}

.post-navigation a:hover {
  color: var(--nl-blue);
}

.post-navigation .nav-next {
  text-align: right;
}

.back-to-top {
  position: fixed;
  right: clamp(18px, 2.4vw, 36px);
  bottom: 28px;
  z-index: 80;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  color: #fff;
  cursor: pointer;
  visibility: hidden;
  background: var(--nl-blue);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(22, 136, 248, 0.28);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms, background-color 180ms ease;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--nl-blue-dark);
  transform: translateY(-2px);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(22, 136, 248, 0.28);
  outline-offset: 3px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 550ms ease, transform 550ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-settle {
  from { opacity: 0.4; transform: scale(1.09); }
  to { opacity: 1; transform: scale(1.02); }
}

@keyframes hero-copy {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .main-navigation {
    position: fixed;
    inset: var(--nl-header) 0 auto;
    display: none;
    padding: 20px;
    background: #fff;
    border-top: 1px solid var(--nl-line);
    box-shadow: 0 24px 40px rgba(23, 32, 51, 0.12);
  }

  .menu-open .main-navigation {
    display: block;
  }

  .primary-menu,
  .primary-menu ul {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  .primary-menu a {
    padding: 12px 4px;
  }

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

  .menu-toggle {
    display: block;
  }

  .menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .home-content {
    grid-template-columns: 1fr;
  }

  .single-layout {
    grid-template-columns: 1fr;
  }

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

  .about-block {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --nl-header: 56px;
  }

  .site-shell {
    width: min(calc(100% - 20px), var(--nl-page));
  }

  body { font-size: 15px; }

  .brand-mark { font-size: 19px; }

  .header-search { width: 36px; height: 36px; }

  .menu-toggle { width: 38px; height: 38px; padding: 8px; }

  .header-inner {
    gap: 10px;
  }

  .header-actions {
    gap: 4px;
  }

  .home-hero { padding-top: 10px; }
  .hero-inner,
  .hero-carousel,
  .hero-slides { min-height: 190px; }

  .carousel-arrow { display: none; }
  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }

  .home-hero::after {
    display: none;
  }

  .hero-copy {
    width: 100%;
    padding: 72px 18px 22px;
    align-self: flex-end;
    background: linear-gradient(transparent, rgba(6, 18, 31, 0.78));
  }

  .hero-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 21px;
    line-height: 1.35;
    letter-spacing: -0.025em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hero-excerpt,
  .hero-link { display: none; }

  .carousel-dots { right: 14px; bottom: 12px; }
  .carousel-dot { width: 13px; height: 3px; }
  .carousel-dot.is-active { width: 22px; }

  .search-dialog {
    padding: 24px 20px;
  }

  .search-form-row {
    grid-template-columns: 1fr;
  }

  .search-submit {
    width: 100%;
  }

  .home-content {
    gap: 0;
    padding-top: 12px;
    padding-bottom: 34px;
  }

  .section-head {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
  }

  .section-title { font-size: 16px; }

  .section-categories {
    max-width: 62%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .section-categories::-webkit-scrollbar { display: none; }

  .topic-count { display: none; }

  .post-list {
    background: #fff;
  }

  .post-card {
    grid-template-columns: 118px minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
    min-height: 0;
    padding: 13px 14px;
    margin-bottom: 0;
    background: var(--nl-surface);
    border-radius: 0;
    box-shadow: none;
  }

  .post-card + .post-card::before {
    display: block;
    right: 14px;
    left: 14px;
  }

  .post-thumbnail {
    height: 82px;
    min-height: 82px;
    border-radius: 4px;
  }

  .post-body {
    padding: 0;
  }

  .post-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .post-excerpt { display: none; }

  .post-meta { align-items: center; margin-top: 9px; font-size: 11px; }
  .post-meta-primary > :not(:last-child) { display: none; }
  .post-author-mark { display: none!important; }
  .sticky-label { padding: 1px 5px; margin-right: 5px; font-size: 9px; vertical-align: 2px; }

  .sidebar {
    display: none;
  }

  .about-block {
    grid-column: auto;
  }

  .single-main {
    width: 100%;
    padding-top: 10px;
    padding-bottom: 28px;
  }

  .single-header {
    padding: 25px 20px 20px;
  }

  .single-title {
    margin-bottom: 16px;
    font-size: 25px;
    line-height: 1.42;
  }

  .single-meta { gap: 9px 14px; font-size: 12px; }

  .single-featured {
    margin: 22px 14px 0;
    border-radius: 12px;
  }

  .entry-content {
    padding: 24px 20px 32px;
    font-size: 16px;
    line-height: 1.9;
  }

  .entry-content p { margin: 0 0 1.15em; }

  .comments-area { padding: 22px 20px; margin-top: 10px; border-radius: 0; }
  .comment-list .children { padding-left: 20px; }
  .comment-metadata,
  .comment-content,
  .reply { margin-left: 0; }

  .single-footer {
    padding: 0 22px 32px;
  }

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

  .post-navigation .nav-next {
    text-align: left;
  }

  .footer-main { display: none; }

  .footer-bottom {
    justify-content: center;
    padding: 14px 0;
    text-align: center;
  }

  .back-to-top {
    right: 14px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 420px) {
  .post-card { grid-template-columns: 104px minmax(0, 1fr); }
  .post-thumbnail { height: 74px; min-height: 74px; }
}

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