/* SPDX-License-Identifier: BSD-2-Clause */
/* Copyright (c) 2026 REVYTECH, Inc. */
/* Aeolus blog theme — CloudBSD / REVYTECH navy chrome. */

:root {
  --cloudbsd-blue: #00529B;
  --cloudbsd-red: #D32F2F;
  --brand-cyan: #22d3ee;
  --font-display: "Outfit", "Segoe UI", sans-serif;
  --font-ui: "Inter", "Segoe UI", sans-serif;
  --topbar-h: 5rem;
  --void: #0f172a;
  --void-deep: #020617;
  --surface: #1e293b;
  --elevated: #334155;
  --border: #475569;
  --text: #f8fafc;
  --text-strong: #ffffff;
  --muted: #94a3b8;
  --foam: #e2e8f0;
  --line: rgba(34, 211, 238, 0.22);
  --glass-bg: rgba(15, 23, 42, 0.92);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 16px 32px rgba(2, 6, 23, 0.35);
  --nav-link: rgba(255, 255, 255, 0.82);
  --nav-link-hover: #ffffff;
  --hero-grad-a: rgba(0, 82, 155, 0.45);
  --hero-grad-b: rgba(34, 211, 238, 0.12);
  --wordmark-bsd: #22d3ee;
  --menu-bg: rgba(15, 23, 42, 0.98);
  --menu-active: rgba(34, 211, 238, 0.18);
}

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

html {
  scroll-padding-top: calc(var(--topbar-h) + 1.5rem);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--foam);
  background:
    radial-gradient(900px 480px at 12% -10%, var(--hero-grad-a) 0%, transparent 55%),
    radial-gradient(700px 420px at 88% 8%, var(--hero-grad-b) 0%, transparent 50%),
    linear-gradient(180deg, var(--void) 0%, var(--void-deep) 100%);
  background-attachment: fixed;
  font-family: var(--font-ui);
  line-height: 1.55;
}

a {
  color: var(--brand-cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover {
  color: #67e8f9;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--brand-cyan);
  color: #000;
  font-weight: 600;
  padding: 0.65rem 1rem;
  text-decoration: none;
}
.skip:focus {
  top: 1rem;
}

/* Full viewport width — only side gutter; prose keeps its own max-width. */
.wrap {
  width: calc(100% - 2.5rem);
  max-width: none;
  margin-inline: auto;
}

/* —— Floating glass topbar —— */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  width: 100%;
  min-height: var(--topbar-h);
  padding: 0.9rem 0 0;
  pointer-events: none;
}
.topbar .topbar-inner {
  pointer-events: auto;
}
.topbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 1rem;
  background: transparent;
}
.topbar-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  pointer-events: none;
}
.topbar-inner > * {
  position: relative;
  z-index: 1;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-strong);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.topbar-brand img {
  width: clamp(48px, 4.5vw, 64px);
  height: clamp(48px, 4.5vw, 64px);
  border-radius: 0 !important;
  object-fit: contain;
  flex: 0 0 auto;
}
.wordmark-inline {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
  color: #ffffff;
}
.aeo,
.cloud,
.wordmark-inline .by {
  color: #ffffff;
}
.wordmark-inline .lus,
.wordmark-inline .bsd {
  color: var(--brand-cyan);
}
.wordmark-inline .by {
  display: block;
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  /* CloudBSD wordmark: "Cloud" stays title-case — never CLOUD. BSD is already caps in markup. */
  text-transform: none;
  margin-top: 0.1rem;
}
.wordmark-inline .cloud,
.cloud {
  text-transform: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 0.65rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  cursor: pointer;
  color: var(--text-strong);
}
.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  width: 1.15rem;
  margin: 0 auto;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
}

.topbar nav {
  margin-left: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--nav-link);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover,
.nav-links a[aria-current="page"],
.nav-links .current-menu-item > a {
  color: var(--nav-link-hover);
}

@media (max-width: 760px) {
  .topbar-inner {
    padding-right: 3.6rem;
  }
  .nav-toggle {
    display: block;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }
  .topbar nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.45rem);
    height: 0;
    margin: 0;
    overflow: visible;
  }
  /* Scope to topbar so WP pagination .nav-links stays visible on mobile. */
  .topbar .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.55rem;
    border-radius: 1rem;
    background: var(--menu-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
  }
  .topbar.is-open .nav-links {
    display: flex;
  }
  .topbar .nav-links a {
    display: block;
    padding: 0.7rem 0.85rem;
    border-radius: 0.65rem;
  }
  .topbar .nav-links a:hover,
  .topbar .nav-links .current-menu-item > a {
    background: var(--menu-active);
  }
}

/* —— Main / hero —— */
.site-main {
  padding-top: calc(var(--topbar-h) + 1.75rem);
  padding-bottom: 4rem;
  min-height: 70vh;
}

.hero {
  padding: 1.5rem 0 2.25rem;
}
.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-cyan);
}
.eyebrow a {
  color: inherit;
  text-decoration: none;
}
.hero-title,
.article-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  line-height: 1.12;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}
.hero-lede {
  margin: 0 0 1.4rem;
  max-width: 40rem;
  font-size: 1.1rem;
  color: var(--muted);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.65rem;
  padding: 0.55rem 1.15rem;
  border-radius: 0.7rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--cloudbsd-blue);
  color: #fff;
  border-color: var(--cloudbsd-blue);
}
.btn-primary:hover {
  background: #0663b8;
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--glass-border);
}
.btn-ghost:hover {
  border-color: var(--brand-cyan);
  color: var(--text-strong);
}

/* —— Post cards —— */
.post-grid {
  display: grid;
  gap: 1rem;
}
.post-card {
  padding: 1.25rem 1.35rem;
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(71, 85, 105, 0.55);
}
.post-meta {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.post-card-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
}
.post-card-title a {
  color: var(--text-strong);
  text-decoration: none;
}
.post-card-title a:hover {
  color: var(--brand-cyan);
}
.post-card-excerpt {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.post-card-excerpt p {
  margin: 0;
}
.post-card-more {
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.pagination {
  margin-top: 1.5rem;
}
.pagination .nav-links {
  justify-content: center;
  gap: 1rem;
}
.empty {
  color: var(--muted);
}

/* —— Article —— */
.article {
  padding-bottom: 2rem;
}
.article-header {
  margin-bottom: 1.5rem;
}
.article-body {
  font-size: 1.05rem;
  color: var(--foam);
}
.article-body > *:first-child {
  margin-top: 0;
}
.article-body h2,
.article-body h3 {
  font-family: var(--font-display);
  color: var(--text-strong);
  margin: 1.75rem 0 0.65rem;
  line-height: 1.25;
}
.article-body h2 {
  font-size: 1.45rem;
}
.article-body h3 {
  font-size: 1.2rem;
}
.article-body p,
.article-body ul,
.article-body ol {
  margin: 0 0 1rem;
}
.article-body ul,
.article-body ol {
  padding-left: 1.25rem;
}
.article-body li {
  margin-bottom: 0.35rem;
}
.article-body li::marker {
  color: var(--brand-cyan);
}
.article-body code,
.article-body kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(71, 85, 105, 0.6);
  border-radius: 0.35rem;
  padding: 0.1rem 0.35rem;
}
.article-body pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border-radius: 0.85rem;
  background: #0b1220;
  border: 1px solid rgba(71, 85, 105, 0.55);
  margin: 0 0 1.15rem;
}
.article-body pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.88rem;
  color: #e2e8f0;
}
.article-body .lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 1.35rem;
}
.article-body .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(71, 85, 105, 0.55);
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid rgba(71, 85, 105, 0.45);
  background: rgba(2, 6, 23, 0.55);
  padding: 2rem 0 2.5rem;
}
.footer-inner {
  display: grid;
  gap: 1.25rem;
}
@media (max-width: 700px) {
  .site-footer { padding: 1.15rem 0 1.25rem; }
  .footer-inner { gap: 0.65rem; }
  .footer-brand .wordmark-inline { font-size: 1.1rem; }
  .footer-tag {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    line-height: 1.35;
  }
  .footer-links { gap: 0.35rem 0.85rem; }
  .footer-links a { font-size: 0.85rem; }
  .footer-copy { font-size: 0.78rem; gap: 0.3rem; }
}
.footer-brand .wordmark-inline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  flex-direction: row;
  gap: 0;
}
.footer-tag {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 28rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  color: var(--nav-link);
  text-decoration: none;
  font-weight: 500;
}
.footer-links a:hover {
  color: var(--brand-cyan);
}
.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.revy {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.revy-rev {
  color: var(--text-strong);
}
.revy-tech {
  color: var(--brand-cyan);
}
.footer-sep {
  opacity: 0.5;
}

/* WP chrome cleanup */
.wp-block-group,
.alignwide,
.alignfull {
  max-width: 100%;
}
.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;
}
