/* GEEP Engineering Journal — aligned with main site design tokens */

:root {
  /* shadcn / main-site HSL tokens */
  --background: 0 0% 0%;
  --foreground: 0 0% 98%;
  --card: 0 0% 7%;
  --card-foreground: 0 0% 98%;
  --primary: 25 95% 53%;
  --primary-foreground: 0 0% 100%;
  --muted: 0 0% 12%;
  --muted-foreground: 0 0% 63%;
  --border: 0 0% 100%;
  --ring: 25 95% 53%;
  --radius: 0.5rem;

  /* convenience aliases */
  --bg: hsl(var(--background));
  --bg-elevated: hsl(var(--card));
  --surface: hsl(0 0% 100% / 0.04);
  --surface-hover: hsl(0 0% 100% / 0.07);
  --text: hsl(var(--foreground));
  --muted-text: hsl(var(--muted-foreground));
  --muted-2: hsl(0 0% 45%);
  --primary-color: hsl(var(--primary));
  --primary-light: hsl(25 95% 70%);
  --primary-glow: hsl(25 95% 53% / 0.32);
  --border-color: hsl(var(--border) / 0.1);
  --border-strong: hsl(var(--border) / 0.16);
  --danger: hsl(0 84% 60%);

  --radius-lg: 0.75rem;
  --shadow: 0 24px 80px hsl(0 0% 0% / 0.55);
  --header-h: 4.5rem;
  --page-max: 1280px;
  --article-max: 720px;
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Scroll reveal (matches main-site motion feel) */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

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

/* Article text is never hidden while animations load */
.post-content,
.article-single__lede,
.article-single__header {
  opacity: 1;
  transform: none;
}

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

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

/* Ambient background */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.ambient-orb--1 {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  animation: float 14s ease-in-out infinite;
}

.ambient-orb--2 {
  width: 400px;
  height: 400px;
  bottom: 10%;
  left: -140px;
  background: radial-gradient(circle, hsl(25 95% 53% / 0.14), transparent 70%);
  animation: float 18s ease-in-out infinite reverse;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -18px); }
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 hsl(25 95% 53% / 0.2); }
  50% { box-shadow: 0 0 0 8px hsl(25 95% 53% / 0); }
}

/* Layout shell */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1;
  width: 100%;
  max-width: var(--page-max);
  min-width: 0;
  margin: 0 auto;
  padding: calc(var(--header-h) + 2rem) 1.5rem 4rem;
}

.journal--article .main {
  max-width: calc(var(--article-max) + 3rem);
}

/* Header — mirrors main-site nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: hsl(0 0% 0% / 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.site-header--scrolled {
  background: hsl(0 0% 0% / 0.82);
  border-bottom-color: var(--border-color);
  box-shadow: 0 12px 40px hsl(0 0% 0% / 0.35);
}

.site-header__inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.site-header__cta {
  justify-self: end;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: start;
  transition: opacity 0.25s var(--ease-out);
}

.brand:hover { opacity: 0.88; }

.brand__logo {
  height: auto;
  width: auto;
  max-height: 2rem;
}

.brand__logo--mobile { display: none; max-height: 2.25rem; }

.brand__wordmark {
  display: none;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary-color);
}

.brand__tag {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: hsl(var(--primary) / 0.75);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  justify-self: center;
}

.site-nav__link {
  position: relative;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: hsl(0 0% 100% / 0.65);
  transition: color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}

.site-nav__link:hover {
  color: hsl(0 0% 100%);
  background: var(--surface);
}

.site-nav__link--active {
  color: var(--primary-color);
}

.site-nav__link--active::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.2rem;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary-color);
  color: hsl(var(--primary-foreground));
  box-shadow: 0 8px 28px hsl(25 95% 53% / 0.28);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s var(--ease-out);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px hsl(25 95% 53% / 0.38);
  background: hsl(25 95% 48%);
}

.btn--ghost {
  background: hsl(0 0% 100% / 0.08);
  border: 1px solid var(--border-strong);
  color: hsl(0 0% 100%);
  box-shadow: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: hsl(0 0% 100% / 0.14);
  border-color: hsl(var(--primary) / 0.45);
  box-shadow: none;
  transform: none;
}

.btn--sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: var(--danger);
  box-shadow: none;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.28);
  background: hsl(var(--primary) / 0.1);
  color: var(--primary-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.badge--glow {
  animation: badge-pulse 3s ease-in-out infinite;
}

/* Page hero (listing) */
.page-hero {
  margin-bottom: 3rem;
  max-width: 38rem;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 0.65rem;
}

.page-hero__tagline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--muted-text);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.text-gradient {
  background: linear-gradient(135deg, hsl(0 0% 100%) 15%, var(--primary-light) 55%, var(--primary-color) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s ease-in-out infinite;
}

.page-hero__intro {
  color: var(--muted-text);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.medium-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--muted-text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.25s var(--ease-out), color 0.25s var(--ease-out), background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.medium-chip:hover {
  border-color: hsl(var(--primary) / 0.45);
  color: var(--primary-light);
  background: hsl(var(--primary) / 0.08);
  transform: translateY(-1px);
}

/* Featured card */
.card-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.card-featured:hover {
  border-color: hsl(var(--primary) / 0.4);
  transform: translateY(-4px);
  box-shadow: 0 28px 70px hsl(0 0% 0% / 0.5);
}

.card-featured__media {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}

.card-featured__media img,
.card-featured__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
  transition: transform 0.5s ease;
}

.card-featured:hover .card-featured__media img {
  transform: scale(1.04);
}

.card-featured__placeholder {
  background: linear-gradient(135deg, #1a1a1a, #262626);
}

.card-featured__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 40%, rgba(17, 17, 17, 0.9) 100%);
  pointer-events: none;
}

.card-featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2.25rem;
}

.card-featured__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.card-featured__body time {
  display: block;
  color: var(--muted-2);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.card-featured__body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.card-featured__body p {
  color: var(--muted-text);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
  left: 1rem;
}

/* Keyboard focus */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.site-nav__link:focus-visible,
.back-link:focus-visible,
.card-featured:focus-visible,
.card-article:focus-visible,
.related-card:focus-visible,
.medium-chip:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.site-nav__link--active:focus-visible {
  outline-color: #fff;
}

/* Article grid */
.section-label,
h2.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 1.25rem;
}

.article-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card-article {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.card-article:hover {
  border-color: hsl(var(--primary) / 0.35);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px hsl(0 0% 0% / 0.4);
}

.card-article__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1a1a1a;
}

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

.card-article:hover .card-article__media img {
  transform: scale(1.06);
}

.card-article__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1c1c1c, #2a2a2a);
}

.card-article__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.4rem 1.5rem;
}

.card-article__body time {
  font-size: 0.8rem;
  color: var(--muted-2);
  margin-bottom: 0.5rem;
}

.card-article__body h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.card-article__body p {
  color: var(--muted-text);
  font-size: 0.92rem;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-light);
  transition: gap 0.2s;
}

.card-article:hover .card-link,
.card-featured:hover .card-link {
  gap: 0.55rem;
}

/* Single article */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted-text);
  transition: color 0.25s var(--ease-out), gap 0.25s var(--ease-out);
}

.back-link:hover { color: var(--primary-color); gap: 0.5rem; }

.article-single__header {
  margin-bottom: 2rem;
}

.article-single__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.article-single__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-2);
  font-size: 0.9rem;
}

.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-2);
}

.article-single__figure {
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.article-single__hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #1a1a1a;
}

.article-single__lede {
  font-size: 1.2rem;
  line-height: 1.7;
  color: hsl(0 0% 100% / 0.82);
  margin-bottom: 2rem;
  padding-left: 1rem;
  border-left: 3px solid var(--primary-color);
}

.article-single {
  min-width: 0;
  max-width: 100%;
}

.post-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: hsl(0 0% 100% / 0.9);
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow-wrap: break-word;
}

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

.post-content > p:first-of-type {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.post-kicker {
  margin-bottom: 0.65rem !important;
  color: hsl(0 0% 100% / 0.92);
}

.post-arrow-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.75rem;
}

.post-arrow-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.55rem;
}

.post-arrow-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary-color);
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1.25;
}

.post-content h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  margin: 2.75rem 0 1rem;
}

.post-content h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--primary-light);
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content strong {
  color: #fff;
  font-weight: 700;
}

.post-content em {
  color: hsl(0 0% 100% / 0.82);
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.75rem;
  padding-left: 1.5rem;
}

.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }

.post-content li {
  margin-bottom: 0.65rem;
  padding-left: 0.25rem;
}

.post-content li::marker {
  color: var(--primary-color);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2.5rem 0;
}

.post-content img {
  border-radius: var(--radius-lg);
  margin: 2rem auto;
  border: 1px solid var(--border-color);
  max-width: 100%;
  height: auto;
}

.post-content figure {
  margin: 2rem 0;
}

.post-content figcaption {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  color: var(--muted-text);
  text-align: center;
}

.post-content a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease-out);
}

.post-content a:hover { color: var(--primary-color); }

.post-content blockquote {
  margin: 2rem 0;
  padding: 1.15rem 1.35rem;
  border-left: 3px solid var(--primary-color);
  background: var(--surface);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: hsl(0 0% 100% / 0.8);
  font-style: italic;
  font-size: 1.05rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.article-tag {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted-text);
  letter-spacing: 0.02em;
}

.article-cta {
  margin-top: 3.5rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--primary) / 0.22);
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--primary) / 0.03));
  text-align: center;
}

.article-cta p {
  color: var(--muted-text);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.article-single__readtime {
  color: var(--muted-2);
}

/* Related posts — internal linking */
.related-posts {
  max-width: 100%;
  margin: 3.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.related-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.related-card:hover {
  border-color: hsl(var(--primary) / 0.35);
  transform: translateY(-3px);
}

.related-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a1a;
}

.related-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.1rem 1.15rem;
}

.related-card__body time {
  font-size: 0.78rem;
  color: var(--muted-2);
}

.related-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text);
}

.journal--preview .main {
  padding-top: calc(var(--header-h) + 1rem);
}

.preview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--primary) / 0.35);
  background: hsl(var(--primary) / 0.1);
  font-size: 0.92rem;
  color: hsl(0 0% 100% / 0.88);
}

.preview-banner p {
  margin: 0;
}

.preview-banner strong {
  color: var(--primary-light);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--muted-text);
}

.empty-state p { margin-bottom: 1.25rem; }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: hsl(0 0% 0% / 0.75);
}

.site-footer__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.site-footer__brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 0.35rem;
}

.site-footer__brand p {
  color: var(--muted-text);
  font-size: 0.9rem;
  max-width: 22rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: flex-start;
}

.site-footer__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: hsl(0 0% 100% / 0.72);
  transition: color 0.25s var(--ease-out);
}

.site-footer__links a:hover { color: var(--primary-color); }

.site-footer__copy {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1.5rem 1.75rem;
  color: var(--muted-2);
  font-size: 0.82rem;
}

/* ─── Admin (polished to match) ─── */
body.admin {
  background: var(--bg);
  font-family: var(--font-body);
}

body.admin::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 80% 0%, rgba(249, 115, 22, 0.08), transparent);
  pointer-events: none;
}

.admin-wrap {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.85rem 0.6rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.admin-table th {
  color: var(--muted-2);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-table tr:hover td { background: var(--surface); }

.label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #d4d4d4;
  letter-spacing: 0.02em;
}

.input,
.textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: hsl(0 0% 0% / 0.45);
  color: var(--text);
  font: inherit;
  margin-bottom: 1rem;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.input:focus,
.textarea:focus {
  outline: 2px solid hsl(var(--primary) / 0.75);
  outline-offset: 2px;
  border-color: hsl(var(--primary) / 0.55);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.14);
}

.textarea { min-height: 240px; resize: vertical; line-height: 1.6; }

.textarea--content {
  min-height: 420px;
  font-size: 0.95rem;
  line-height: 1.65;
}

.format-help {
  margin: -0.5rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: hsl(0 0% 100% / 0.03);
  font-size: 0.88rem;
  color: var(--muted-text);
}

.format-help summary {
  cursor: pointer;
  font-weight: 600;
  color: #d4d4d4;
}

.format-help ul {
  margin: 0.75rem 0 0 1.1rem;
}

.format-help li { margin-bottom: 0.35rem; }

.format-help code {
  font-size: 0.82em;
  color: var(--primary-light);
}

.format-example {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: hsl(0 0% 0% / 0.35);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #d4d4d4;
  white-space: pre-wrap;
  overflow-x: auto;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--surface);
  transform: none;
  box-shadow: none;
}

.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

.flash {
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  border: 1px solid transparent;
}

.flash-ok {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.flash-err {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.hero-preview {
  max-width: 360px;
  width: 100%;
  border-radius: var(--radius);
  margin: 0.5rem 0 1rem;
  border: 1px solid var(--border-color);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.checkbox-row input { accent-color: var(--primary-color); }

.meta-muted { color: var(--muted-text); font-size: 0.85rem; margin-bottom: 0.75rem; }

.label-hint {
  font-weight: 500;
  color: var(--muted-2);
  text-transform: none;
  letter-spacing: 0;
}

.rich-editor-wrap {
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: hsl(0 0% 0% / 0.45);
  overflow: hidden;
}

.rich-editor-wrap .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--border-color);
  background: hsl(0 0% 100% / 0.03);
  font-family: var(--font-body);
}

.rich-editor-wrap .ql-container.ql-snow {
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  min-height: 360px;
}

.rich-editor-wrap .ql-editor {
  min-height: 360px;
  line-height: 1.75;
  color: var(--text);
  padding: 1rem 1.1rem 1.5rem;
}

.rich-editor-wrap .ql-editor.ql-blank::before {
  color: var(--muted-2);
  font-style: normal;
}

.rich-editor-wrap .ql-snow .ql-stroke {
  stroke: #d4d4d4;
}

.rich-editor-wrap .ql-snow .ql-fill {
  fill: #d4d4d4;
}

.rich-editor-wrap .ql-snow .ql-picker {
  color: #d4d4d4;
}

.rich-editor-wrap .ql-snow .ql-picker-options {
  background: #1a1a1a;
  border-color: var(--border-color);
}

.rich-editor-wrap .ql-snow .ql-picker-item:hover {
  color: var(--primary-light);
}

.rich-editor-wrap .ql-snow.ql-toolbar button:hover,
.rich-editor-wrap .ql-snow.ql-toolbar button.ql-active {
  color: var(--primary-color);
}

.rich-editor-wrap .ql-snow.ql-toolbar button:hover .ql-stroke,
.rich-editor-wrap .ql-snow.ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--primary-color);
}

.rich-editor-wrap .ql-snow.ql-toolbar button:hover .ql-fill,
.rich-editor-wrap .ql-snow.ql-toolbar button.ql-active .ql-fill {
  fill: var(--primary-color);
}

.login-box {
  max-width: 420px;
  margin: 3rem auto 0;
}

/* Responsive */
@media (max-width: 960px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .site-header__cta {
    justify-self: end;
  }
}

@media (max-width: 860px) {
  .card-featured {
    grid-template-columns: 1fr;
  }

  .card-featured__media { min-height: 220px; }

  .card-featured__overlay {
    background: linear-gradient(0deg, hsl(var(--card) / 0.95) 0%, transparent 60%);
  }

  .card-featured__body { padding: 1.5rem; }
}

@media (max-width: 640px) {
  .brand__logo--desktop { display: none; }
  .brand__logo--mobile { display: block; }

  .main { padding-left: 1.1rem; padding-right: 1.1rem; }

  .article-grid { grid-template-columns: 1fr; }

  .page-hero__title { font-size: clamp(2rem, 9vw, 2.75rem); }
}

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