/* Viktor Marketing — jornvandijk.com typography + Nexus background */
:root {
  --color-bg: #000000;
  --color-text: #ffffff;
  --color-text-body: #aaaaaa;
  --color-text-muted: #777777;
  --color-text-meta: #888888;
  --color-link: #66b2ff;
  --color-link-bg: rgba(102, 178, 255, 0.2);
  --color-link-bg-hover: rgba(102, 178, 255, 0.3);
  --nexus-indigo: #6366f1;
  --nexus-rose: #fb7185;
  --nexus-glow: rgba(99, 102, 241, 0.4);
  --font-sans: "Onest", "Inter", system-ui, -apple-system, sans-serif;
  --text-nav: 10px;
  --text-meta: 10px;
  --text-body: 20px;
  --text-body-mobile: 16px;
  --text-h1: 48px;
  --text-h1-mobile: 28px;
  --content-max: 460px;
  --content-max-mobile: 340px;
  --nav-width: 100px;
  --nav-pad-left: 10px;
  --shell-pl: 60px;
  --home-content-inset: 300px;
  --mobile-pl: 25px;
  --gap-avatar-h1: 40px;
  --gap-h1-body: 40px;
  --gap-paragraph: 20px;
  --gap-list: 120px;
  --gap-block: 80px;
  --home-pad-top: 120px;
  --home-pad-top-mobile: 40px;
  --home-intro-pad-top-mobile: 164px;
  --text-nav-mobile: 12px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 767px) {
  :root {
    --nav-width: 0px;
  }
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.4;
  color: var(--color-text-body);
  background: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 8px 16px;
  background: var(--color-text);
  color: var(--color-bg);
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
}

/* --- Left nav (reference: vertically centered, uppercase, tight) --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  height: 100vh;
  width: var(--nav-width);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: var(--nav-pad-left);
}

.site-nav__links,
.site-nav .menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a,
.site-nav .menu a {
  font-size: var(--text-nav);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text-muted);
  line-height: 1;
  padding: 5px;
  transition: color 0.2s ease;
  border: none;
}

.site-nav__links a:hover,
.site-nav__links a:focus-visible,
.site-nav .menu a:hover,
.site-nav .menu a:focus-visible {
  color: var(--color-text);
}

.site-nav__links a[aria-current="page"],
.site-nav .menu .current-menu-item > a {
  color: var(--color-text);
  font-weight: 600;
}

/* --- Main shell: centered column --- */
.page-shell,
.site-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-left: var(--nav-width);
  position: relative;
  z-index: 10;
}

.page-shell--list {
  justify-content: flex-start;
  padding-top: 80px;
}

.content {
  width: 100%;
  max-width: var(--content-max);
  padding: 40px;
}

.page-shell--list .content {
  padding: 40px 40px 120px;
}

/* --- Avatar (jornvandijk.com: 40px circle, no glow) --- */
.avatar,
.avatar--placeholder {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-bottom: var(--gap-avatar-h1);
  object-fit: cover;
  object-position: center top;
  box-shadow: none;
  border: none;
  flex-shrink: 0;
}

.avatar--placeholder {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* --- Typography --- */
.page-title {
  font-size: var(--text-h1);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0;
  letter-spacing: normal;
}

.page-shell--list .page-title {
  margin-bottom: var(--gap-h1-body);
}

.prose {
  margin-top: var(--gap-h1-body);
}

.prose p {
  margin: 0;
  font-weight: 400;
  color: var(--color-text-body);
}

.prose p + p {
  margin-top: var(--gap-paragraph);
}

/* Inline links in prose */
.text-link,
.prose a:not(.pill-highlight),
.page-title a:not(.pill-highlight),
.entry-content a:not(.pill-highlight) {
  color: var(--color-link);
  background: var(--color-link-bg);
  text-decoration: none;
  padding: 0 2px 2px;
  border-radius: 10px;
  border: none;
  transition: background 0.2s ease;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.text-link:hover,
.prose a:not(.pill-highlight):hover,
.page-title a:not(.pill-highlight):hover,
.entry-content a:not(.pill-highlight):hover {
  background: var(--color-link-bg-hover);
  color: var(--color-link);
}

/* Pill highlights — единый стиль как на главной (все страницы) */
.pill-highlight,
a.pill-highlight {
  color: #66b2ff;
  background: rgba(102, 178, 255, 0.1);
  text-decoration: none;
  padding: 2px 8px;
  margin: 0 2px;
  border-radius: 8px;
  border: none;
  display: inline-block;
  vertical-align: middle;
  transition: background 0.2s ease;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background-image: none;
  background-size: auto;
}

a.pill-highlight:hover,
a.pill-highlight:focus-visible {
  background: rgba(102, 178, 255, 0.16);
  color: #66b2ff;
}

.prose--footer {
  margin-top: var(--gap-block);
}

.signature {
  display: block;
  height: auto;
  width: 67px;
  margin-top: var(--gap-h1-body);
  opacity: 1;
}

/* --- Lists (inner pages) --- */
.stack-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-block);
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-list--compact {
  gap: 48px;
}

.stack-list--compact .stack-item__title {
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}

.stack-item__title {
  font-size: var(--text-h1);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.01em;
}

.stack-item__desc {
  margin: 5px 0 0;
  font-size: var(--text-body);
  line-height: 1.4;
  color: var(--color-text-body);
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-list);
  list-style: none;
  margin: 0;
  padding: 0;
}

.note-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.note-item__date {
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-meta);
  line-height: 1;
}

.note-item__title {
  font-size: var(--text-h1);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0;
}

.note-item__title a {
  color: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
}

/* --- Notes index (reference: jornvandijk.com/notes) --- */
.page-shell--notes .content,
.page-shell--note-single .content {
  max-width: 900px;
}

.page-shell--note-single .wp-post-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 24px 0 32px;
  border-radius: 20px;
}

.page-shell--note-single article header {
  margin-bottom: 8px;
}

.notes-intro,
.notes-intro-wrap {
  margin-bottom: 64px;
}

.notes-intro p,
.notes-intro-wrap p {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--color-text-body);
  max-width: 72ch;
}

html.has-notes-smooth-scroll {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html.has-notes-smooth-scroll {
    scroll-behavior: auto;
  }
}

.notes-toolbar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.notes-search__input {
  width: 100%;
  max-width: 100%;
  padding: 14px 18px;
  font: inherit;
  font-size: 16px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.notes-search__input::placeholder {
  color: var(--color-text-meta);
}

.notes-search__input:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.notes-search__input:focus-visible {
  border-color: var(--color-link);
  background: rgba(255, 255, 255, 0.06);
}

.notes-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.notes-cat {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text-body);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.notes-cat:hover,
.notes-cat:focus-visible {
  color: var(--color-text);
  border-color: rgba(102, 178, 255, 0.4);
  background: rgba(102, 178, 255, 0.08);
}

.notes-cat.is-active {
  color: var(--color-text);
  border-color: var(--color-link);
  background: rgba(102, 178, 255, 0.12);
}

.notes-cat:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

.notes-empty {
  margin: 0;
  font-size: var(--text-body);
  color: var(--color-text-body);
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-list);
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-card {
  margin: 0;
}

.blog-card__link,
.blog-card__inner {
  display: flex;
  flex-direction: column;
  gap: 25px;
  text-decoration: none;
  color: inherit;
}

.blog-card__link:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 4px;
  border-radius: 4px;
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.blog-card__category {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-link);
  line-height: 1.2;
}

.blog-card__date {
  display: block;
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-meta);
  line-height: 1;
  margin: 0;
}

.blog-card__title {
  font-size: var(--text-h1);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.01em;
}

.blog-card__link:hover .blog-card__title,
.blog-card__link:focus-visible .blog-card__title {
  color: var(--color-link);
}

.blog-card__title a {
  color: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
}

.blog-card__excerpt {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.4;
  color: var(--color-text-body);
}

.blog-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1.56;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.blog-card__thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.blog-card__link:hover .blog-card__thumb-img,
.blog-card__link:focus-visible .blog-card__thumb-img {
  transform: scale(1.02);
}

.blog-card__thumb--placeholder {
  background:
    linear-gradient(135deg, rgba(102, 178, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 50%, rgba(102, 178, 255, 0.08) 100%);
}

.blog-card__thumb--placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(102, 178, 255, 0.15), transparent 55%);
}

.blog-list__more {
  margin-top: 48px;
  text-align: center;
}

.notes-messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 64px;
}

.notes-messenger {
  flex: 1 1 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: var(--color-text-body);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.notes-messenger:hover,
.notes-messenger:focus-visible {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}

.notes-messenger:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

.notes-messenger--telegram:hover,
.notes-messenger--telegram:focus-visible {
  border-color: #24a1de;
  color: #24a1de;
}

.notes-messenger--max:hover,
.notes-messenger--max:focus-visible {
  border-color: #9b59ff;
  color: #d8b4fe;
}

.notes-messenger__icon {
  flex-shrink: 0;
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.blog-list__load-more {
  min-height: 44px;
  padding: 14px 32px;
  font: inherit;
  font-size: 16px;
  color: var(--color-text);
  background: transparent;
  border: 1px solid #333;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.blog-list__load-more:hover,
.blog-list__load-more:focus-visible {
  border-color: var(--color-link);
  color: var(--color-link);
}

.blog-list__load-more:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

.blog-list__load-more[aria-busy="true"] {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 767px) {
  .page-shell--notes .content {
    padding-left: var(--mobile-pl);
    padding-right: var(--mobile-pl);
    max-width: none;
  }

  .blog-card__title {
    font-size: var(--text-h1-mobile);
  }

  .blog-card__thumb {
    border-radius: 16px;
  }

  .notes-intro,
  .notes-intro-wrap {
    margin-bottom: 48px;
  }

  .blog-list {
    gap: 80px;
  }

  .notes-messengers {
    flex-direction: column;
  }

  .notes-messenger {
    flex: 1 1 auto;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card__thumb-img {
    transition: none;
    transform: none;
  }
}

/* --- Experience timeline --- */
.experience-intro {
  margin-bottom: 48px;
}

.experience-intro p {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--color-text-body);
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: experience;
}

.experience-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.experience-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.experience-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}

.experience-item__period {
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-link);
  line-height: 1;
}

.experience-item__duration {
  font-size: var(--text-meta);
  letter-spacing: 0.05em;
  color: var(--color-text-meta);
  line-height: 1;
}

.experience-item__company {
  font-size: var(--text-h1);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
  margin: 4px 0 0;
  letter-spacing: -0.01em;
}

.experience-item__company a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.experience-item__company a:hover {
  color: var(--color-link);
}

.experience-item__role {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
}

.experience-item__industry {
  margin: 0;
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-meta);
  line-height: 1.2;
}

.experience-item__summary {
  margin: 8px 0 0;
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--color-text-body);
  max-width: 52ch;
}

.experience-item__result {
  margin: 12px 0 0;
  padding-left: 16px;
  border-left: 2px solid rgba(102, 178, 255, 0.35);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  max-width: 52ch;
}

@media (max-width: 767px) {
  .experience-list {
    gap: 40px;
  }

  .experience-item {
    padding-bottom: 40px;
  }

  .experience-item__company {
    font-size: 28px;
  }
}

.note-item__title a {
  color: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: var(--gap-h1-body);
}

.contact-links a {
  font-size: var(--text-body);
  color: var(--color-text);
  text-decoration: none;
  background: none;
  padding: 0;
  border-radius: 0;
}

.contact-links a:hover {
  color: var(--color-link);
}

.breadcrumbs {
  font-size: var(--text-meta);
  margin-bottom: 24px;
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
  background: none;
  padding: 0;
}

.search-form {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.search-form input {
  flex: 1;
  background: #111;
  border: 1px solid #333;
  color: var(--color-text);
  padding: 8px 12px;
  font-family: inherit;
}

.search-form button {
  background: var(--color-link);
  border: none;
  color: #000;
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
}

.site-footer:empty {
  display: none;
}

.site-footer {
  position: relative;
  z-index: 10;
  padding: 24px 40px 40px calc(var(--nav-width) + 40px);
  color: var(--color-text-muted);
  font-size: var(--text-meta);
}

:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

/* --- Background layers (behind content, z-index 0–1) --- */
.nexus-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.nexus-ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.35;
  animation: nexusOrbPulse 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.nexus-ambient__orb--1 {
  width:  min(52vw, 480px);
  height: min(52vw, 480px);
  top: 8%;
  left: 48%;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.5) 0%,
    rgba(99, 102, 241, 0.12) 45%,
    transparent 72%
  );
  animation-delay: 0s;
}

.nexus-ambient__orb--2 {
  width:  min(40vw, 360px);
  height: min(40vw, 360px);
  bottom: 10%;
  left: 8%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.35) 0%,
    rgba(59, 130, 246, 0.08) 50%,
    transparent 75%
  );
  animation-delay: -2.5s;
}

.nexus-ambient__orb--3 {
  width:  min(32vw, 280px);
  height: min(32vw, 280px);
  bottom: 18%;
  right: 6%;
  background: radial-gradient(
    circle,
    rgba(251, 113, 133, 0.22) 0%,
    rgba(251, 113, 133, 0.06) 50%,
    transparent 75%
  );
  animation-delay: -4.5s;
}

@keyframes nexusOrbPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.28;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.42;
  }
}

.nexus-bg,
.space-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Nav остаётся fixed — не занимает 100vh в document flow */
.home .page-shell,
.home .site-footer {
  position: relative;
  z-index: 10;
}

.home .site-nav {
  position: fixed;
  z-index: 50;
}

/* Главная: block-layout — flex + min-height давали текст внизу экрана */
.page-shell--home,
.site-main.page-shell--home,
body.home .page-shell--home {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding-top: var(--home-pad-top);
  padding-left: var(--nav-width);
  padding-right: 0;
  box-sizing: border-box;
}

.page-shell--home .home-intro,
.page-shell--home .content {
  display: block;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 0 0 var(--home-content-inset) !important;
  margin-top: 0 !important;
  padding: 0 20px 120px 0;
  transform: none !important;
  position: static !important;
}

.page-shell--home .wp-block-spacer {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
}

/* Главная: текст всегда виден; плавность — только transform/blur при загрузке */
@keyframes homeTextReveal {
  0% {
    transform: translateY(16px);
    filter: blur(5px);
  }
  100% {
    transform: translateY(0);
    filter: blur(0);
  }
}

.page-shell--home .entry-content {
  opacity: 1;
}

html.page-enter .page-shell--home .home-intro > .avatar,
html.page-enter .page-shell--home .home-intro > .page-title,
html.page-enter .page-shell--home .home-intro > .prose:not(.entry-content),
html.page-enter .page-shell--home .home-intro > .signature,
html.page-enter .page-shell--home .home-intro > .animate-item,
html.page-enter .page-shell--home .content--stagger > .avatar,
html.page-enter .page-shell--home .content--stagger > .page-title,
html.page-enter .page-shell--home .content--stagger > .prose:not(.entry-content),
html.page-enter .page-shell--home .content--stagger > .signature,
html.page-enter .page-shell--home .content--stagger > .animate-item,
html.page-enter .page-shell--home .entry-content > * {
  opacity: 1;
  visibility: visible;
  animation: homeTextReveal 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

html.page-enter .page-shell--home .home-intro > :nth-child(1),
html.page-enter .page-shell--home .content--stagger > :nth-child(1),
html.page-enter .page-shell--home .entry-content > :nth-child(1) {
  animation-delay: 0.08s;
}

html.page-enter .page-shell--home .home-intro > :nth-child(2),
html.page-enter .page-shell--home .content--stagger > :nth-child(2),
html.page-enter .page-shell--home .entry-content > :nth-child(2) {
  animation-delay: 0.2s;
}

html.page-enter .page-shell--home .home-intro > :nth-child(3),
html.page-enter .page-shell--home .content--stagger > :nth-child(3),
html.page-enter .page-shell--home .entry-content > :nth-child(3) {
  animation-delay: 0.32s;
}

html.page-enter .page-shell--home .home-intro > :nth-child(4),
html.page-enter .page-shell--home .content--stagger > :nth-child(4),
html.page-enter .page-shell--home .entry-content > :nth-child(4) {
  animation-delay: 0.44s;
}

html.page-enter .page-shell--home .home-intro > :nth-child(5),
html.page-enter .page-shell--home .content--stagger > :nth-child(5),
html.page-enter .page-shell--home .entry-content > :nth-child(5) {
  animation-delay: 0.56s;
}

html.page-enter .page-shell--home .home-intro > .signature,
html.page-enter .page-shell--home .content--stagger > .signature {
  animation-delay: 0.64s;
}

html.page-enter .page-shell--home .home-intro > .entry-content ~ .signature,
html.page-enter .page-shell--home .content--stagger > .entry-content ~ .signature {
  animation-delay: 0.76s;
}

/* --- Page entrance (cinematic blur + slide, staggered — lazyweb portfolio pattern) --- */
@keyframes textReveal {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes navFade {
  0% {
    opacity: 0;
    transform: translateX(-12px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

html.page-enter .site-nav {
  opacity: 0;
  animation: navFade 1s var(--ease-out-expo) forwards;
  animation-delay: 0.05s;
  will-change: transform, opacity, filter;
}

html.page-enter .content--stagger > .animate-item,
html.page-enter .entry-content > .animate-item {
  opacity: 0;
  animation: textReveal 1.15s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  will-change: transform, opacity, filter;
}

html.page-enter .content--stagger > .animate-item:nth-child(1),
html.page-enter .entry-content > .animate-item:nth-child(1) {
  animation-delay: 0.12s;
}

html.page-enter .content--stagger > .animate-item:nth-child(2),
html.page-enter .entry-content > .animate-item:nth-child(2) {
  animation-delay: 0.28s;
}

html.page-enter .content--stagger > .animate-item:nth-child(3),
html.page-enter .entry-content > .animate-item:nth-child(3) {
  animation-delay: 0.44s;
}

html.page-enter .content--stagger > .animate-item:nth-child(4),
html.page-enter .entry-content > .animate-item:nth-child(4) {
  animation-delay: 0.6s;
}

html.page-enter .content--stagger > .animate-item:nth-child(5),
html.page-enter .entry-content > .animate-item:nth-child(5) {
  animation-delay: 0.76s;
}

html.page-enter .content--stagger > .animate-item:nth-child(6),
html.page-enter .entry-content > .animate-item:nth-child(6) {
  animation-delay: 0.92s;
}

html.page-enter .content--stagger > .animate-item:nth-child(7),
html.page-enter .entry-content > .animate-item:nth-child(7) {
  animation-delay: 1.08s;
}

html.page-enter .content--stagger > .animate-item:nth-child(8),
html.page-enter .entry-content > .animate-item:nth-child(8) {
  animation-delay: 1.24s;
}

html.page-enter .content--stagger > .signature {
  animation-delay: 0.92s;
}

html.page-enter .content--stagger > .entry-content ~ .signature {
  animation-delay: 1.08s;
}

/* Главная: отменить общие правила (opacity:0 + textReveal = «только при скролле») */
html.page-enter .page-shell--home .home-intro > *,
html.page-enter .page-shell--home .content--stagger > .animate-item,
html.page-enter .page-shell--home .entry-content > .animate-item,
html.page-enter .page-shell--home .content--stagger > .avatar,
html.page-enter .page-shell--home .content--stagger > .page-title,
html.page-enter .page-shell--home .content--stagger > .prose,
html.page-enter .page-shell--home .content--stagger > .signature,
html.page-enter .page-shell--home .entry-content,
html.page-enter .page-shell--home .entry-content > * {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none;
}

html.page-enter .page-shell--home .home-intro > .animate-item,
html.page-enter .page-shell--home .home-intro > .avatar,
html.page-enter .page-shell--home .home-intro > .page-title,
html.page-enter .page-shell--home .home-intro > .prose:not(.entry-content),
html.page-enter .page-shell--home .home-intro > .signature,
html.page-enter .page-shell--home .content--stagger > .animate-item,
html.page-enter .page-shell--home .entry-content > .animate-item,
html.page-enter .page-shell--home .content--stagger > .avatar,
html.page-enter .page-shell--home .content--stagger > .page-title,
html.page-enter .page-shell--home .content--stagger > .prose:not(.entry-content),
html.page-enter .page-shell--home .content--stagger > .signature,
html.page-enter .page-shell--home .entry-content > * {
  animation: homeTextReveal 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@media (prefers-reduced-motion: reduce) {
  .nexus-ambient__orb {
    animation: none;
    opacity: 0.22;
  }

  html.page-enter .site-nav,
  html.page-enter .content--stagger > .animate-item,
  html.page-enter .entry-content > .animate-item,
  html.page-enter .page-shell--home .content--stagger > .animate-item,
  html.page-enter .page-shell--home .entry-content > .animate-item,
  html.page-enter .page-shell--home .content--stagger > .avatar,
  html.page-enter .page-shell--home .content--stagger > .page-title,
  html.page-enter .page-shell--home .content--stagger > .prose,
  html.page-enter .page-shell--home .content--stagger > .signature,
  html.page-enter .page-shell--home .entry-content > * {
    opacity: 1;
    animation: none;
    transform: none;
    filter: none;
  }

}

@media (max-width: 767px) {
  body {
    font-size: var(--text-body-mobile);
    overflow-x: hidden;
  }

  /* Inner pages only — home has its own top bar nav */
  body:not(.home) .site-nav {
    position: relative;
    height: auto;
    width: 100%;
    padding: 40px 20px 20px;
    justify-content: flex-start;
  }

  body:not(.home) .site-nav__links,
  body:not(.home) .site-nav .menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px 24px;
  }

  .page-shell,
  .site-main {
    padding-left: 0;
    justify-content: flex-start;
  }

  .page-shell--list {
    padding-top: 0;
  }

  body:not(.home) .content {
    padding: 20px;
  }

  .page-title,
  .stack-item__title,
  .note-item__title {
    font-size: var(--text-h1-mobile);
  }

  .site-footer {
    padding-left: 20px;
  }

  /* --- Home mobile (jornvandijk.com @ 390px) --- */
  body.home .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 40px;
    min-height: 0;
    padding: 10px 10px 10px 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    z-index: 50;
  }

  body.home .site-nav__links,
  body.home .site-nav .menu {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.home .site-nav__links::-webkit-scrollbar,
  body.home .site-nav .menu::-webkit-scrollbar {
    display: none;
  }

  body.home .site-nav__links a,
  body.home .site-nav .menu a {
    font-size: var(--text-nav-mobile);
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    padding: 5px 8px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }

  body.home .page-shell--home,
  body.home .site-main.page-shell--home {
    padding-top: var(--home-pad-top-mobile) !important;
    padding-left: 0 !important;
  }

  body.home .page-shell--home .home-intro,
  body.home .page-shell--home .content {
    margin-left: var(--mobile-pl) !important;
    margin-right: 0 !important;
    max-width: var(--content-max-mobile) !important;
    width: calc(100vw - (var(--mobile-pl) * 2)) !important;
    padding: var(--home-intro-pad-top-mobile) 0 80px 0 !important;
    box-sizing: border-box !important;
  }

  body.home .page-shell--home .home-intro > .page-title,
  body.home .page-shell--home .home-intro > .prose,
  body.home .page-shell--home .home-intro .prose p,
  body.home .page-shell--home .home-intro .entry-content,
  body.home .page-shell--home .home-intro .entry-content > * {
    max-width: 100%;
    width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.home .page-shell--home .page-title {
    font-size: var(--text-h1-mobile);
    line-height: 33.6px;
  }

  body.home .page-shell--home .prose,
  body.home .page-shell--home .prose p {
    font-size: var(--text-body-mobile);
    line-height: 22.4px;
  }

  body.home .nexus-ambient {
    overflow: hidden;
    max-width: 100vw;
  }

  body.home .nexus-ambient__orb--1 {
    left: auto;
    right: -10%;
    max-width: 52vw;
  }
}

/* --- Legal pages (komandin.com reference) --- */
.page-shell--legal .content--legal {
  max-width: min(960px, 100%);
  padding-bottom: 80px;
}

.page-shell--legal .page-title {
  max-width: none;
  overflow-wrap: break-word;
  hyphens: auto;
}

.legal-layout {
  width: 100%;
}

.legal-intro {
  margin-bottom: 40px;
}

.legal-intro p {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--color-text-body);
  max-width: 72ch;
}

.legal-blocks {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.legal-block__label {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--color-text);
}

.legal-block__text p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-muted, #6f6f70);
  max-width: 72ch;
}

.legal-accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.legal-accordion__item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-accordion__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.legal-accordion__trigger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 22px 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.legal-accordion__trigger:focus-visible {
  outline: 2px solid var(--color-link, #66b2ff);
  outline-offset: 4px;
}

.legal-accordion__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  padding-right: 8px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legal-accordion__icon {
  position: relative;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 1px;
}

.legal-accordion__icon::before,
.legal-accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  background: #ffffff;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.legal-accordion__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.legal-accordion__item.is-open .legal-accordion__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
}

.legal-accordion__panel {
  padding: 0 0 24px;
}

.legal-accordion__text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-muted, #6f6f70);
}

.legal-accordion__text p {
  margin: 0 0 12px;
  max-width: none;
}

.legal-accordion__text p:last-child {
  margin-bottom: 0;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.legal-table th,
.legal-table td {
  padding: 12px 16px 12px 0;
  vertical-align: top;
  text-align: left;
  border: none;
}

.legal-table th {
  width: 38%;
  font-weight: 500;
  color: var(--color-text-muted, #6f6f70);
}

.legal-table td {
  color: var(--color-text-body);
}

.prose--legal a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-shell--legal .contact-legal-footer {
  margin-top: 48px;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

/* Legal footer — shared (contact + legal pages) */
.contact-legal-footer {
  flex-shrink: 0;
  padding-top: 20px;
  padding-bottom: 4px;
  box-sizing: border-box;
}

.contact-legal-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px 24px;
  width: 100%;
  max-width: none;
}

.contact-legal-copyright {
  flex: 0 1 auto;
  font-size: 13px;
  line-height: 1.6;
  color: #6f6f70;
}

.contact-legal-links {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 24px;
}

.contact-legal-link {
  font-size: 13px;
  line-height: 1.5;
  color: #6f6f70;
  text-decoration: none;
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  transition: color 0.2s ease;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 36ch;
}

.contact-legal-link:hover {
  color: #ffffff;
}

@media (max-width: 767px) {
  .page-shell--legal .content--legal {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 48px;
  }

  .page-shell--legal .page-title {
    font-size: clamp(22px, 6.5vw, 28px);
    line-height: 1.25;
  }

  .legal-accordion__trigger {
    align-items: flex-start;
    gap: 12px;
    padding: 18px 0;
  }

  .legal-accordion__icon {
    margin-top: 2px;
  }

  .legal-accordion__title,
  .legal-block__label,
  .legal-block__text p,
  .legal-accordion__text,
  .legal-intro p {
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .legal-accordion__title {
    padding-right: 0;
    flex: 1 1 auto;
    min-width: 0;
  }

  .legal-blocks {
    gap: 24px;
  }

  .legal-block__text p {
    max-width: none;
  }

  .legal-table {
    font-size: 13px;
  }

  .legal-table tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .legal-table tr:last-child {
    border-bottom: none;
  }

  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
    padding: 0;
  }

  .legal-table th {
    padding-bottom: 4px;
    width: 100%;
  }

  .legal-table td {
    padding-bottom: 0;
  }

  .page-shell--legal .contact-legal-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 16px;
  }

  .page-shell--legal .contact-legal-links {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }

  .page-shell--legal .contact-legal-link {
    max-width: none;
    text-align: left;
  }

  .contact-legal-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .contact-legal-links {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }

  .contact-legal-link {
    max-width: none;
    text-align: left;
  }
}
