/*
Theme Name: FlyingTechman
Theme URI: https://flyingtechman.com
Author: Alex + Codex
Author URI: https://flyingtechman.com
Description: Clean editorial theme for homelab, self-hosting, networking, and retro tech writing.
Version: 0.1.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.2
Text Domain: flyingtechman
*/

:root {
  color-scheme: dark;
  --bg: #03060c;
  --bg-soft: #071120;
  --bg-deep: #010204;
  --surface: rgba(9, 16, 29, 0.7);
  --surface-strong: rgba(10, 19, 34, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --line: rgba(157, 190, 255, 0.14);
  --line-strong: rgba(157, 190, 255, 0.26);
  --text: #eef5ff;
  --text-soft: #d8e4f6;
  --muted: #96a8c4;
  --accent: #5bd6e7;
  --accent-strong: #a9f7ff;
  --accent-soft: rgba(91, 214, 231, 0.14);
  --retro: #f7b76c;
  --shadow: 0 34px 100px rgba(0, 0, 0, 0.42);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --content: 760px;
  --wrap: 1180px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 16%, rgba(31, 186, 205, 0.22), transparent 24%),
    radial-gradient(circle at 86% 0%, rgba(50, 112, 214, 0.2), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(9, 109, 154, 0.16), transparent 32%),
    linear-gradient(180deg, #071122 0%, #040811 44%, #020306 100%);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: 18px;
  line-height: 1.72;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.04), transparent 36%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.02), transparent 58%);
  pointer-events: none;
  z-index: -3;
}

::selection {
  background: rgba(169, 247, 255, 0.24);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration-color: rgba(169, 247, 255, 0.35);
  text-underline-offset: 0.16em;
}

a:hover {
  color: #ffffff;
}

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

.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin: 0 auto;
}

.site-shell {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.site-shell::before,
.site-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  filter: blur(28px);
}

.site-shell::before {
  top: 6rem;
  left: -12rem;
  width: 28rem;
  height: 28rem;
  background: radial-gradient(circle, rgba(79, 212, 233, 0.18), transparent 72%);
}

.site-shell::after {
  top: 18rem;
  right: -8rem;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(74, 128, 225, 0.16), transparent 72%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(150%) blur(18px);
  background: rgba(4, 9, 18, 0.62);
  border-bottom: 1px solid rgba(157, 190, 255, 0.1);
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.2);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  text-decoration: none;
}

.brand__mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand__logo {
  display: block;
  width: 58px;
  height: auto;
  filter: drop-shadow(0 0 16px rgba(91, 214, 231, 0.16));
}

.brand__copy {
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.brand__eyebrow {
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  width: 48px;
  height: 48px;
  padding: 0;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
}

.nav-toggle__bars {
  display: inline-grid;
  gap: 5px;
}

.nav-toggle__bars span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transform-origin: center;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

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

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

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

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

.menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

.menu > li {
  position: relative;
}

.menu a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
  border: 1px solid transparent;
}

.menu-item-has-children {
  display: flex;
  align-items: center;
}

.menu-item-has-children > a {
  padding-right: 0.75rem;
}

.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: 0.55rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.08rem) rotate(45deg);
  transition: transform 180ms ease;
}

.menu-item-has-children:hover > a::after,
.menu-item-has-children:focus-within > a::after,
.menu-item-has-children.is-expanded > a::after {
  transform: translateY(0.06rem) rotate(225deg);
}

.sub-menu-toggle {
  display: none;
}

.sub-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 220px;
  display: grid;
  gap: 0.3rem;
  padding: 0.75rem;
  border-radius: 22px;
  background: rgba(8, 13, 22, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0ms linear 180ms;
}

.sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 0.55rem;
}

.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu,
.menu-item-has-children.is-expanded > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0ms linear 0ms;
}

.sub-menu a {
  width: 100%;
  justify-content: flex-start;
  border-radius: 16px;
  padding: 0.75rem 0.95rem;
}

.menu a:hover,
.menu .current-menu-item > a,
.menu .current_page_item > a {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: var(--text);
  transform: translateY(-1px);
}

.site-main {
  padding: 2.4rem 0 4rem;
}

.hero {
  padding: 2rem 0 3.4rem;
}

.featured-carousel,
.promise-card,
.section-card,
.post-card,
.article-shell,
.empty-card,
.archive-head,
.site-footer__panel {
  background:
    linear-gradient(180deg, rgba(18, 29, 47, 0.78), rgba(7, 12, 21, 0.86)),
    rgba(9, 16, 29, 0.72);
  border: 1px solid rgba(157, 190, 255, 0.12);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px) saturate(145%);
  border-radius: var(--radius-lg);
}

.featured-carousel {
  position: relative;
  overflow: hidden;
}

.featured-carousel__stack {
  display: grid;
}

.featured-slide {
  grid-area: 1 / 1;
  position: relative;
  min-height: clamp(440px, 58vw, 640px);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 18px, 0) scale(0.985);
  transition:
    opacity 320ms ease,
    transform 480ms ease,
    visibility 0ms linear 480ms;
}

.featured-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 320ms ease,
    transform 480ms ease;
}

.featured-slide__media,
.featured-slide__media-link,
.featured-slide__fallback {
  position: absolute;
  inset: 0;
  display: block;
}

.featured-slide__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-slide__fallback {
  background:
    radial-gradient(circle at 18% 18%, rgba(91, 214, 231, 0.26), transparent 24%),
    radial-gradient(circle at 84% 20%, rgba(74, 128, 225, 0.24), transparent 28%),
    linear-gradient(145deg, #0b1626 0%, #07101d 48%, #04070f 100%);
}

.featured-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 5, 11, 0.88) 0%, rgba(4, 10, 18, 0.72) 38%, rgba(4, 10, 18, 0.28) 100%),
    linear-gradient(180deg, rgba(91, 214, 231, 0.16) 0%, transparent 32%, rgba(2, 4, 8, 0.75) 100%);
}

.featured-slide__content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: stretch;
  min-height: clamp(440px, 58vw, 640px);
  padding: clamp(1.5rem, 4vw, 3rem);
  width: calc(100% - 3rem);
  max-width: none;
}

.featured-slide__header,
.featured-slide__footer {
  display: grid;
  align-content: start;
}

.featured-slide__header {
  gap: 0.9rem;
  align-self: start;
  max-width: min(720px, calc(100% - 3rem));
}

.featured-slide__footer {
  align-self: end;
  gap: 0.95rem;
  width: min(70%, 920px);
  max-width: none;
}

.featured-slide__eyebrow-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.featured-slide__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(91, 214, 231, 0.1);
  border: 1px solid rgba(91, 214, 231, 0.18);
  color: var(--accent-strong);
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.featured-slide__index {
  color: rgba(238, 245, 255, 0.78);
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.featured-slide__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  color: var(--accent-strong);
}

.featured-slide__meta a {
  color: inherit;
}

.featured-slide__title,
.article-title,
.section-title,
.archive-title,
.page-title {
  margin: 0;
  font-family: "Avenir Next", "Helvetica Neue", "Trebuchet MS", sans-serif;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: #fbfdff;
}

.featured-slide__title {
  font-size: clamp(1.45rem, 2.55vw, 2.2rem);
  width: 100%;
  max-width: none;
  text-wrap: balance;
}

.featured-slide__title a {
  text-decoration: none;
}

.featured-slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.15rem;
}

.featured-carousel__controls {
  position: absolute;
  right: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(1rem, 3vw, 1.8rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.featured-carousel__dots {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.6rem;
  border-radius: 999px;
  background: rgba(3, 8, 16, 0.5);
  border: 1px solid rgba(157, 190, 255, 0.14);
  backdrop-filter: blur(18px);
}

.featured-carousel__dot {
  border: 0;
  cursor: pointer;
}

.featured-carousel__dot {
  width: 38px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.featured-carousel__dot.is-active {
  background: linear-gradient(135deg, #c9f9ff 0%, #6ee5f4 38%, #26bfd4 100%);
}

.featured-carousel__dot:hover {
  transform: translateY(-1px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--solid {
  background: linear-gradient(135deg, #c9f9ff 0%, #6ee5f4 38%, #26bfd4 100%);
  color: #061018;
  box-shadow: 0 18px 40px rgba(56, 205, 231, 0.26);
}

.button--solid:hover {
  box-shadow: 0 22px 46px rgba(56, 205, 231, 0.32);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--text);
}

.signal-list {
  display: grid;
  gap: 0.9rem;
}

.signal,
.article-toc,
.article-callout {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(157, 190, 255, 0.1);
}

.signal strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 1rem;
  color: #f4f8ff;
}

.signal span {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.section {
  margin-top: 2rem;
}

.section--compact {
  margin-top: 1.3rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-title,
.archive-title,
.page-title,
.article-title {
  font-size: clamp(2rem, 3vw, 3rem);
}

.section-note,
.archive-intro,
.meta-line,
.site-footer__note {
  color: var(--muted);
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

.track-grid,
.posts-grid,
.promise-grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.latest-feed {
  display: grid;
  gap: 1.2rem;
}

.latest-feed__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 1.4rem;
  margin: 0 auto;
  color: var(--muted);
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  text-align: center;
}

.latest-feed__status.is-loading::before {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid rgba(169, 247, 255, 0.16);
  border-top-color: var(--accent-strong);
  border-radius: 999px;
  animation: latest-feed-spin 900ms linear infinite;
}

.latest-feed__sentinel {
  width: 100%;
  height: 1px;
}

@keyframes latest-feed-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes post-card-fade-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.posts-grid--editorial {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr) minmax(0, 0.85fr);
}

.section-card,
.promise-card,
.post-card,
.empty-card,
.archive-head {
  padding: 1.45rem;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.section-card:hover,
.promise-card:hover,
.post-card:hover,
.signal:hover,
.archive-head:hover,
.empty-card:hover {
  transform: translateY(-4px);
  border-color: rgba(169, 247, 255, 0.2);
  box-shadow:
    0 38px 100px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.post-card--enter {
  opacity: 0;
  transform: translateY(22px);
  will-change: opacity, transform;
}

.post-card--enter.post-card--enter-active {
  animation: post-card-fade-in 560ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--enter-delay, 0ms);
}

.track-tag,
.post-meta,
.article-meta,
.micro-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-card h3,
.promise-card h2,
.post-card h2,
.post-card h3,
.empty-card h2 {
  margin: 0.7rem 0;
  font-family: "Avenir Next", "Helvetica Neue", "Trebuchet MS", sans-serif;
  line-height: 1.08;
  color: #fbfdff;
}

.section-card p,
.promise-card p,
.post-card p,
.empty-card p {
  margin: 0;
  color: var(--text-soft);
}

.promise-card h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.post-card {
  display: grid;
  gap: 0.95rem;
}

.post-card--title-only {
  min-height: 100%;
  align-content: start;
  gap: 0.55rem;
}

.post-card--title-only h2,
.post-card--title-only h3 {
  margin: 0;
}

.post-card--feature {
  grid-column: span 2;
}

.post-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-top: 0.3rem;
  color: var(--muted);
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

.post-card__footer .button {
  min-height: 42px;
  padding: 0.72rem 1rem;
}

.post-card__thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(91, 214, 231, 0.22), transparent 60%),
    linear-gradient(160deg, rgba(30, 53, 95, 0.8), rgba(6, 10, 19, 0.95));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__link,
.article-title a {
  text-decoration: none;
}

.article-wrap {
  width: min(var(--content), calc(100vw - 2rem));
  margin: 0 auto;
}

.article-shell {
  padding: clamp(1.5rem, 2.5vw, 2.9rem);
}

.article-shell > *:first-child {
  margin-top: 0;
}

.article-shell > *:last-child {
  margin-bottom: 0;
}

.article-lead {
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: var(--text-soft);
  font-size: 1.14rem;
  line-height: 1.76;
}

.article-shell h2,
.article-shell h3,
.article-shell h4 {
  font-family: "Avenir Next", "Helvetica Neue", "Trebuchet MS", sans-serif;
  line-height: 1.12;
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  color: #fbfdff;
}

.article-shell p,
.article-shell ul,
.article-shell ol,
.article-shell blockquote,
.article-shell pre,
.article-shell figure {
  margin-top: 1.1rem;
  margin-bottom: 1.1rem;
}

.article-shell p,
.article-shell li {
  color: var(--text-soft);
}

.article-shell blockquote {
  margin-left: 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--retro);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-shell img {
  border-radius: var(--radius-md);
}

.article-shell figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

.article-shell pre,
.article-shell code,
.article-shell kbd {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
}

.article-shell pre {
  overflow: auto;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #0b1626, #060c16);
  color: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.article-shell code {
  background: rgba(91, 214, 231, 0.1);
  color: var(--accent-strong);
  padding: 0.18rem 0.38rem;
  border-radius: 0.3rem;
}

.article-shell pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-shell table {
  display: block;
  width: 100%;
  min-width: 640px;
  margin: 1.3rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-collapse: collapse;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(157, 190, 255, 0.12);
}

.article-shell th,
.article-shell td {
  padding: 0.95rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(157, 190, 255, 0.1);
  color: var(--text-soft);
}

.article-shell th {
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: var(--accent-strong);
  background: rgba(91, 214, 231, 0.07);
}

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

.article-shell hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid rgba(157, 190, 255, 0.1);
}

.article-toc,
.article-callout {
  margin: 1.4rem 0;
}

.article-toc strong,
.article-callout strong {
  display: block;
  margin-bottom: 0.55rem;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  color: #fbfdff;
}

.article-toc ol,
.article-toc ul,
.article-callout ol,
.article-callout ul {
  margin: 0.5rem 0 0 1.2rem;
}

.article-callout--note {
  border-left: 4px solid var(--accent);
}

.article-callout--warning {
  border-left: 4px solid var(--retro);
}

.article-shell .article-checklist {
  padding-left: 1.2rem;
}

.article-shell .article-checklist li + li {
  margin-top: 0.45rem;
}

.article-faq-heading {
  margin-bottom: 1rem;
}

.faq-accordion {
  display: grid;
  gap: 0.9rem;
  margin: 1.1rem 0 1.6rem;
}

.faq-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(157, 190, 255, 0.12);
}

.faq-item[open] {
  box-shadow: inset 0 0 0 1px rgba(91, 214, 231, 0.28), 0 18px 44px rgba(5, 10, 18, 0.3);
}

.faq-item__question {
  position: relative;
  display: block;
  margin: 0;
  padding: 1.1rem 3.8rem 1.1rem 1.2rem;
  cursor: pointer;
  list-style: none;
  font-family: "Avenir Next", "Helvetica Neue", "Trebuchet MS", sans-serif;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fbfdff;
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::after,
.faq-item__question::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.3rem;
  width: 0.95rem;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-strong);
  transform: translateY(-50%);
  transition: transform 180ms ease, opacity 180ms ease;
}

.faq-item__question::before {
  transform: translateY(-50%) rotate(90deg);
}

.faq-item[open] .faq-item__question::before {
  opacity: 0;
}

.faq-item__answer {
  padding: 0 1.2rem 1.2rem;
}

.faq-item__answer > *:first-child {
  margin-top: 0;
}

.faq-item__answer > *:last-child {
  margin-bottom: 0;
}

.article-tags {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(157, 190, 255, 0.1);
}

.article-tags__label {
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(91, 214, 231, 0.09);
  color: var(--accent-strong);
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid rgba(91, 214, 231, 0.12);
}

.tag-chip:hover {
  background: rgba(91, 214, 231, 0.14);
}

.article-related {
  display: grid;
  gap: 1.1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(157, 190, 255, 0.1);
}

.article-related__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.article-related__title {
  margin: 0.3rem 0 0;
}

.article-related__intro {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.posts-grid--compact {
  gap: 1rem;
}

.pagination,
.post-navigation {
  margin-top: 2rem;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

.post-navigation .nav-links,
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}

.post-navigation a,
.pagination a,
.pagination .current {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
}

.pagination .current {
  background: rgba(91, 214, 231, 0.14);
  color: var(--accent-strong);
}

.archive-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(18rem, 1.2fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  margin-bottom: 1.25rem;
}

.archive-title {
  font-size: clamp(1.9rem, 2.8vw, 2.75rem);
  text-wrap: balance;
}

.archive-intro {
  max-width: 58ch;
  padding-left: clamp(1.25rem, 2.5vw, 2rem);
  border-left: 1px solid rgba(169, 247, 255, 0.18);
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.6;
  color: var(--accent-strong);
}

.archive-intro > :first-child {
  margin-top: 0;
}

.archive-intro > :last-child {
  margin-bottom: 0;
}

.empty-card {
  text-align: center;
}

.site-footer {
  padding: 1.8rem 0 2.9rem;
}

.site-footer__panel {
  display: grid;
  gap: 1.7rem;
  padding: clamp(1.45rem, 2.4vw, 2.15rem);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: 1.35rem;
}

.site-footer__intro,
.site-footer__column {
  min-width: 0;
}

.site-footer__intro {
  display: grid;
  gap: 0.8rem;
  padding-right: 0.75rem;
}

.site-footer__column {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.site-footer__heading {
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer__heading {
  margin: 0;
  color: var(--accent-strong);
}

.site-footer__title {
  margin: 0;
  display: inline-grid;
  gap: 0.01em;
  font-family: "Avenir Next", "Helvetica Neue", "Trebuchet MS", sans-serif;
  font-size: clamp(1.72rem, 3vw, 2.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: #fbfdff;
  text-transform: uppercase;
}

.site-footer__title span {
  display: block;
}

.site-footer__note {
  margin: 0;
  max-width: 26ch;
  line-height: 1.5;
}

.site-footer__status {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  border: 1px solid rgba(157, 190, 255, 0.1);
}

.site-footer__status p {
  margin: 0;
  color: var(--text-soft);
}

.footer-menu,
.footer-topics,
.footer-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.52rem;
}

.footer-menu a,
.footer-topics a {
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  color: var(--text-soft);
  text-decoration: none;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.footer-menu a:hover,
.footer-topics a:hover {
  color: #ffffff;
  transform: translateX(2px);
}

.footer-highlights li {
  color: var(--text-soft);
  line-height: 1.6;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(157, 190, 255, 0.1);
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer__brand {
  font-weight: 700;
  color: #fbfdff;
}

.site-footer__meta {
  color: var(--muted);
}

.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;
}

@media (max-width: 1080px) {
  .site-header__inner {
    flex-wrap: wrap;
    align-items: center;
    padding: 0.9rem 0;
  }

  .nav-toggle {
    display: inline-flex;
    flex: none;
    margin-left: auto;
  }

  .primary-nav {
    flex: 1 0 100%;
    display: none;
    width: 100%;
  }

  .primary-nav.is-open {
    display: block;
    margin-top: 0.65rem;
    padding: 0.9rem;
    border-radius: 24px;
    background: rgba(8, 13, 22, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding-top: 0.1rem;
  }

  .menu > li,
  .menu-item-has-children {
    display: block;
  }

  .menu a {
    justify-content: flex-start;
  }

  .menu-item-has-children > a {
    width: calc(100% - 3.5rem);
    padding-right: 0.95rem;
  }

  .menu-item-has-children > a::after {
    display: none;
  }

  .menu-item-has-children {
    position: relative;
  }

  .sub-menu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.15rem;
    height: 3rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    transition:
      color 180ms ease,
      background-color 180ms ease,
      border-color 180ms ease,
      transform 180ms ease;
  }

  .sub-menu-toggle::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-0.08rem) rotate(45deg);
    transition: transform 180ms ease;
  }

  .sub-menu-toggle:hover,
  .sub-menu-toggle:focus-visible,
  .menu-item-has-children.is-expanded > .sub-menu-toggle {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--line);
  }

  .menu-item-has-children.is-expanded > .sub-menu-toggle::before {
    transform: translateY(0.08rem) rotate(225deg);
  }

  .sub-menu {
    position: static;
    min-width: 0;
    display: none;
    gap: 0.3rem;
    margin-top: 0.45rem;
    padding: 0.55rem;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.03);
  }

  .menu-item-has-children.is-expanded > .sub-menu {
    display: grid;
  }

  .sub-menu a {
    justify-content: flex-start;
    padding-left: 1rem;
  }
}

@media (max-width: 980px) {
  .promise-grid,
  .track-grid,
  .posts-grid,
  .posts-grid--editorial {
    grid-template-columns: 1fr;
  }

  .featured-slide,
  .featured-slide__content {
    min-height: clamp(420px, 72vw, 560px);
  }

  .featured-slide__footer {
    width: min(82%, 680px);
    max-width: none;
  }

  .featured-slide__title {
    font-size: clamp(1.35rem, 2.9vw, 1.95rem);
    width: 100%;
    max-width: none;
  }

  .post-card--feature {
    grid-column: auto;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.3rem;
    row-gap: 1.25rem;
  }

  .site-footer__intro {
    grid-column: 1 / -1;
    padding-right: 0;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .hero {
    padding-top: 1rem;
  }

  .brand__tagline {
    max-width: 21ch;
    font-size: 0.9rem;
  }

  .brand__logo {
    width: 46px;
  }

  .featured-slide,
  .featured-slide__content,
  .section-card,
  .post-card,
  .article-shell,
  .archive-head,
  .empty-card,
  .site-footer__panel {
    border-radius: 26px;
  }

  .archive-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.85rem;
  }

  .archive-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .archive-intro {
    max-width: none;
    padding-top: 0.85rem;
    padding-left: 0;
    border-top: 1px solid rgba(169, 247, 255, 0.18);
    border-left: 0;
    font-size: 0.96rem;
  }

  .featured-slide__title {
    font-size: clamp(1.2rem, 5vw, 1.55rem);
    max-width: 18ch;
  }

  .featured-slide__content {
    width: calc(100% - 2.2rem);
    max-width: none;
    padding: 1.25rem;
  }

  .featured-slide__header,
  .featured-slide__footer {
    width: 100%;
    max-width: 100%;
  }

  .featured-carousel__controls {
    position: static;
    justify-content: space-between;
    padding: 0 1rem 1rem;
  }

  .featured-carousel__dots {
    flex: 1 1 auto;
    justify-content: center;
  }

  .section-head,
  .site-footer__panel {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    row-gap: 1.15rem;
  }

  .site-footer__intro {
    grid-column: auto;
    gap: 0.85rem;
  }

  .site-footer {
    padding: 1.25rem 0 2.2rem;
  }

  .site-footer__panel {
    gap: 1.35rem;
    padding: 1.25rem;
  }

  .site-footer__title {
    font-size: clamp(1.5rem, 8vw, 1.95rem);
  }

  .site-footer__note {
    max-width: none;
  }

  .article-shell table {
    min-width: 560px;
  }

  .faq-item__question {
    padding-right: 3.3rem;
    font-size: 0.98rem;
  }

  .article-related__head {
    align-items: start;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
