/*
Theme Name: EtherNinja Omarchy Blue Lab
Theme URI: https://etherninja.org
Author: Michael Walton
Author URI: https://etherninja.org
Description: Standalone blog theme for etherninja.org. Deep navy lab field, cyan and teal glass panels, hex mesh, and the blue lockup. The homepage is a featured post, latest notes, browse lanes, and an about/categories sidebar.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: etherninja-omarchy-blue-lab
Tags: blog, dark, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --lab-navy: #0a1628;
  --lab-navy-2: #0d1f38;
  --lab-panel: rgba(12, 28, 48, 0.72);
  --lab-panel-solid: #0e1c32;
  --bg: #071018;
  --bg-soft: #0a1628;
  --surface: rgba(14, 28, 50, 0.55);
  --surface-solid: #101e34;
  --glass: rgba(18, 36, 58, 0.45);
  --ink: #e8f4fc;
  --text: #c5d8ea;
  --muted: #7a9bb4;
  --rule: rgba(61, 184, 232, 0.18);
  --accent: #3db8e8;
  --accent-2: #5eead4;
  --accent-deep: #7dd3f0;
  --glow: rgba(61, 184, 232, 0.45);
  --glow-teal: rgba(94, 234, 212, 0.35);
  --chip-bg: rgba(61, 184, 232, 0.14);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;
  --sans: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --header-offset: 108px;
}

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

html {
  color-scheme: dark;
  scroll-padding-top: var(--header-offset);
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 12% -5%, rgba(61, 184, 232, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 8%, rgba(94, 234, 212, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(61, 184, 232, 0.08), transparent 55%),
    linear-gradient(180deg, #050d16 0%, var(--lab-navy) 40%, #071420 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(61, 184, 232, 0.18) 1px, transparent 0),
    linear-gradient(rgba(61, 184, 232, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 184, 232, 0.04) 1px, transparent 1px),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px);
  background-size: 28px 24px, 48px 48px, 48px 48px, 100% 4px;
}

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

a {
  color: var(--accent-deep);
}

a:hover {
  color: var(--accent-2);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

::selection {
  background: rgba(61, 184, 232, 0.35);
  color: #fff;
}

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

.screen-reader-text:focus {
  background: var(--accent-2);
  border-radius: 4px;
  clip: auto !important;
  clip-path: none;
  color: #041018;
  display: block;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 12px;
  line-height: normal;
  padding: 12px 16px;
  text-decoration: none;
  top: 12px;
  width: auto;
  z-index: 100000;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 12px 18px;
  margin: 12px -6px 0;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: rgba(8, 18, 32, 0.75);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  position: sticky;
  top: 10px;
  z-index: 50;
  box-shadow:
    0 0 0 1px rgba(94, 234, 212, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  opacity: 0.7;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, var(--glow-teal) 35%, transparent 70%);
  opacity: 0.85;
  filter: blur(6px);
  animation: halo-pulse 4s ease-in-out infinite;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid rgba(61, 184, 232, 0.35);
  box-shadow: 0 0 20px var(--glow), inset 0 0 12px rgba(61, 184, 232, 0.1);
  pointer-events: none;
}

@keyframes halo-pulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.brand-logo {
  height: 56px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 14px var(--glow)) drop-shadow(0 0 28px var(--glow-teal));
  border-radius: 10px;
  background: #070912;
}

.brand-name {
  min-width: 0;
  font-weight: 750;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.brand-name span {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.68rem;
  display: block;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(61, 184, 232, 0.1);
  border: 1px solid rgba(61, 184, 232, 0.35);
  border-radius: 6px;
  padding: 7px 11px;
  cursor: pointer;
}

.menu-toggle:hover {
  background: rgba(61, 184, 232, 0.18);
  color: var(--accent-2);
}

.menu-toggle-bars {
  width: 14px;
  height: 10px;
  background:
    linear-gradient(var(--accent-2), var(--accent-2)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) 0 100% / 100% 2px no-repeat;
}

.site-nav {
  display: flex;
  align-items: center;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 3px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: color 0.12s, background 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a,
.primary-nav a[aria-current="page"] {
  color: var(--accent-2);
  background: rgba(61, 184, 232, 0.1);
  border-color: rgba(61, 184, 232, 0.3);
  box-shadow: 0 0 12px rgba(61, 184, 232, 0.15);
}

.primary-nav > li {
  position: relative;
}

.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 190px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: rgba(8, 18, 32, 0.96);
  border: 1px solid var(--rule);
  border-radius: 8px;
  z-index: 60;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  display: block;
}

.primary-nav .sub-menu a {
  display: block;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  margin-top: 28px;
  align-items: start;
}

.site-main {
  min-width: 0;
}

/* Featured hero */
.featured,
.single-article,
.page-article {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(61, 184, 232, 0.28);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(94, 234, 212, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(61, 184, 232, 0.08);
  position: relative;
}

.featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  margin-bottom: 32px;
}

.featured::before,
.single-article::before,
.page-article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 3;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.8;
  pointer-events: none;
}

.featured-media,
.single-media {
  min-height: 300px;
  position: relative;
  background:
    radial-gradient(ellipse 70% 60% at 30% 40%, rgba(61, 184, 232, 0.35), transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(94, 234, 212, 0.2), transparent 50%),
    linear-gradient(145deg, #0a2038 0%, #0d2a48 40%, #061018 100%);
  overflow: hidden;
}

.single-media {
  min-height: 210px;
}

.featured-photo {
  position: absolute;
  inset: 0;
}

.featured-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.featured-media .grid-overlay,
.single-media .grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(61, 184, 232, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 184, 232, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 90% 80% at 40% 50%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 40% 50%, #000 20%, transparent 75%);
}

.featured-media .hex-layer,
.single-media .hex-layer {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48' viewBox='0 0 56 48'%3E%3Cpath d='M28 2 L52 16 L52 40 L28 54 L4 40 L4 16 Z' fill='none' stroke='%233db8e8' stroke-width='0.8'/%3E%3C/svg%3E");
  background-size: 56px 48px;
}

.streak,
.streak2 {
  position: absolute;
  height: 2px;
  pointer-events: none;
}

.streak {
  top: 18%;
  left: -10%;
  width: 70%;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  box-shadow: 0 0 12px var(--glow);
  opacity: 0.7;
  transform: rotate(-8deg);
}

.streak2 {
  bottom: 28%;
  right: -5%;
  width: 55%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
  box-shadow: 0 0 8px var(--glow-teal);
  opacity: 0.55;
  transform: rotate(12deg);
}

.term-line {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent-2);
  background: rgba(4, 12, 22, 0.75);
  border: 1px solid rgba(61, 184, 232, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 0 20px rgba(61, 184, 232, 0.12);
}

.featured .term-line {
  bottom: 48px;
}

.term-line .prompt {
  color: var(--accent);
  margin-right: 6px;
}

.term-line .cursor {
  display: inline-block;
  width: 7px;
  height: 12px;
  background: var(--accent-2);
  margin-left: 2px;
  vertical-align: -1px;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.featured-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #041018;
  background: var(--accent-2);
  padding: 4px 10px;
  border-radius: 3px;
  box-shadow: 0 0 16px var(--glow-teal);
}

.featured-body,
.single-body,
.page-body {
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(8, 16, 28, 0.35);
  min-width: 0;
}

.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--chip-bg);
  color: var(--accent);
  border: 1px solid rgba(61, 184, 232, 0.3);
  margin-bottom: 12px;
  width: fit-content;
  text-decoration: none;
  line-height: 1.4;
}

a.chip:hover {
  color: var(--accent-2);
  border-color: rgba(94, 234, 212, 0.5);
}

.chip.omarchy {
  background: rgba(94, 234, 212, 0.12);
  color: var(--accent-2);
  border-color: rgba(94, 234, 212, 0.35);
}

.chip.god {
  background: rgba(120, 140, 220, 0.14);
  color: #a8b8f0;
  border-color: rgba(120, 140, 220, 0.3);
}

.chip.ai {
  background: rgba(61, 184, 232, 0.14);
  color: var(--accent);
  border-color: rgba(61, 184, 232, 0.35);
}

.chip.howto {
  background: rgba(122, 155, 180, 0.14);
  color: #9bb4c8;
  border-color: rgba(122, 155, 180, 0.3);
}

.chip.security {
  background: rgba(232, 120, 100, 0.12);
  color: #f0a090;
  border-color: rgba(232, 120, 100, 0.3);
}

.chip.news {
  background: rgba(61, 184, 232, 0.08);
  color: var(--muted);
  border-color: var(--rule);
}

.featured h1,
.single-article h1,
.page-article h1,
.archive-header h1,
.empty-copy h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 10px;
}

.meta,
.post-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.meta {
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}

.meta time::before {
  content: "// ";
  color: var(--accent);
  opacity: 0.6;
}

.meta a {
  color: var(--muted);
  text-decoration: none;
}

.meta a:hover {
  color: var(--accent-2);
}

.featured .excerpt,
.empty-copy .excerpt {
  font-size: 0.98rem;
  color: var(--text);
  max-width: 42em;
  margin: 0 0 18px;
  line-height: 1.65;
}

.read-more,
.comment-form .submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
  color: var(--lab-navy);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 9px 18px;
  border-radius: 6px;
  border: 0;
  box-shadow: 0 0 24px var(--glow), 0 4px 12px rgba(0, 0, 0, 0.3);
  width: fit-content;
  cursor: pointer;
  transition: box-shadow 0.15s, filter 0.15s;
}

.read-more:hover,
.comment-form .submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 36px var(--glow), 0 0 16px var(--glow-teal);
  color: var(--lab-navy);
}

/* Latest posts */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.section-head h2,
.lanes h2,
.comments-title,
.comment-reply-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
  margin: 0;
}

.section-head h2::before {
  content: "▸ ";
  opacity: 0.7;
}

.section-head a {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}

.section-head a:hover {
  color: var(--accent-2);
}

.posts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

article.post {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 16px 14px;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
  position: relative;
  min-width: 0;
}

article.post::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61, 184, 232, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.12s;
}

article.post:hover {
  border-color: rgba(61, 184, 232, 0.5);
  background: rgba(18, 40, 64, 0.65);
  box-shadow: 0 0 28px rgba(61, 184, 232, 0.12);
}

article.post:hover::before {
  opacity: 1;
}

article.post h3,
.entry-title {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 8px 0 6px;
}

article.post h3 a,
.entry-title a {
  text-decoration: none;
  color: var(--ink);
}

article.post h3 a:hover,
.entry-title a:hover {
  color: var(--accent);
}

article.post .excerpt {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  margin-top: 10px;
}

.empty-note {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 28px;
}

/* Lanes */
.lanes {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  margin-bottom: 8px;
}

.lanes h2 {
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 0.68rem;
}

.lane-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.lane {
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
  position: relative;
  overflow: hidden;
}

.lane::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.12s;
}

.lane:hover {
  border-color: rgba(61, 184, 232, 0.45);
  background: rgba(14, 32, 52, 0.8);
  box-shadow: 0 0 20px rgba(61, 184, 232, 0.12);
  color: inherit;
}

.lane:hover::after {
  opacity: 1;
}

.lane strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 750;
  color: var(--ink);
  margin-bottom: 2px;
}

.lane span {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.widget {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.widget-title,
.widget h2,
.widget h3 {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.widget p {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
}

.widget p + p {
  margin-top: 8px;
}

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

.widget li,
.cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem;
}

.widget li:last-child,
.cat-list li:last-child {
  border-bottom: none;
}

.widget a,
.cat-list a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

.widget a:hover,
.cat-list a:hover {
  color: var(--accent);
}

.cat-list .count,
.widget .count {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.widget .children {
  margin: 4px 0 0 8px;
  width: 100%;
}

.ext-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--accent-2);
  border: 1px solid rgba(94, 234, 212, 0.35);
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.1);
}

.ext-link:hover {
  background: rgba(94, 234, 212, 0.1);
  color: var(--accent-2);
}

/* Archive, search, entry */
.archive-header {
  margin-bottom: 18px;
}

.archive-description,
.result-count {
  color: var(--text);
  max-width: 62ch;
  margin: 0 0 8px;
}

.result-count {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.entry-content {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text);
}

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

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
  max-width: 68ch;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
  scroll-margin-top: var(--header-offset);
}

.entry-content h2 {
  font-size: 1.4rem;
  margin: 1.5em 0 0.45em;
}

.entry-content h3 {
  font-size: 1.15rem;
  margin: 1.3em 0 0.4em;
}

.entry-content h4 {
  font-size: 1rem;
  margin: 1.2em 0 0.35em;
}

.entry-content a {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25em;
  margin: 0.6em 0 1em;
}

.entry-content li {
  margin: 0.28em 0;
}

.entry-content li::marker {
  color: var(--accent);
}

.entry-content blockquote {
  margin: 1.2em 0;
  padding: 0.15em 0 0.15em 1em;
  border-left: 2px solid var(--accent);
  color: var(--ink);
}

.entry-content code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--accent-2);
  background: rgba(61, 184, 232, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.entry-content pre {
  max-width: none;
  background: rgba(4, 12, 22, 0.75);
  border: 1px solid rgba(61, 184, 232, 0.25);
  border-radius: 8px;
  padding: 14px 16px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--accent-2);
}

.entry-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.entry-content img,
.entry-content video,
.entry-content iframe {
  border-radius: 10px;
}

.entry-content figure {
  margin: 1.2em 0;
}

.entry-content figcaption,
.wp-caption-text {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1em 0 1.2em;
}

.entry-content th,
.entry-content td {
  border-bottom: 1px solid var(--rule);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.entry-content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 1.6em 0;
}

.alignleft {
  float: left;
  margin: 0.2em 1.2em 0.8em 0;
}

.alignright {
  float: right;
  margin: 0.2em 0 0.8em 1.2em;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.entry-content::after {
  content: "";
  display: table;
  clear: both;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.tag-list a {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 9px;
}

.tag-list a:hover {
  color: var(--accent-2);
  border-color: rgba(94, 234, 212, 0.4);
}

.page-links {
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-top: 16px;
  color: var(--muted);
}

.page-links a {
  text-decoration: none;
  margin-left: 6px;
}

.single-article,
.page-article {
  margin-bottom: 20px;
}

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

.post-navigation .nav-links,
.comment-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.post-navigation a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  background: rgba(10, 22, 40, 0.6);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  max-width: 100%;
}

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

.nav-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav-title {
  color: var(--ink);
  font-weight: 700;
}

.pagination {
  margin: -8px 0 28px;
}

.pagination .nav-links,
.comment-navigation .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-numbers,
.comment-navigation a {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 6px 10px;
  background: rgba(10, 22, 40, 0.45);
}

.page-numbers.current,
a.page-numbers:hover,
.comment-navigation a:hover {
  color: var(--accent-2);
  border-color: rgba(61, 184, 232, 0.45);
  background: rgba(61, 184, 232, 0.1);
}

.page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

/* Comments and forms */
.comments-area {
  margin-top: 8px;
}

.comment-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.comment-list .children {
  list-style: none;
  margin: 0 0 0 1.1rem;
  padding: 0;
}

.comment-body {
  background: var(--glass);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.comment-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.comment-meta a {
  color: var(--muted);
  text-decoration: none;
}

.comment-meta .fn {
  color: var(--ink);
  font-style: normal;
  font-weight: 700;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-author .avatar {
  border-radius: 8px;
}

.comment-content p {
  margin: 0 0 0.6em;
}

.comment-reply-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-2);
}

.comments-closed {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.comment-reply-title {
  margin: 18px 0 10px;
}

.comment-form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-field {
  width: 100%;
  background: rgba(4, 12, 22, 0.72);
  border: 1px solid rgba(61, 184, 232, 0.28);
  border-radius: 8px;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
}

.search-field {
  font-family: var(--mono);
  font-size: 0.82rem;
}

.comment-form input:focus-visible,
.comment-form textarea:focus-visible,
.search-field:focus-visible {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.search-field::placeholder {
  color: var(--muted);
}

.comment-form p {
  margin: 0 0 12px;
}

.comment-form .comment-notes,
.comment-form .logged-in-as {
  font-size: 0.82rem;
  color: var(--muted);
}

.search-form {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  flex-wrap: wrap;
  align-items: center;
}

.search-form label {
  flex: 1 1 180px;
  margin: 0;
}

.search-submit {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: transparent;
  color: var(--accent-2);
  border: 1px solid rgba(94, 234, 212, 0.4);
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
}

.search-submit:hover {
  background: rgba(94, 234, 212, 0.1);
}

.not-found-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.not-found-actions .search-form {
  width: min(100%, 440px);
}

/* Footer */
.site-footer {
  margin-top: 36px;
  padding: 18px 0 8px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .sep {
  opacity: 0.7;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 3;
  }
}

@media (max-width: 780px) {
  .has-js .site-header {
    flex-wrap: wrap;
  }

  .has-js .brand {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }

  .has-js .menu-toggle {
    order: 2;
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: 8px;
  }

  .has-js .site-nav {
    order: 3;
    display: none;
    flex-basis: 100%;
  }

  .has-js .site-nav.is-open {
    display: block;
  }

  .has-js .site-nav.is-open .primary-nav {
    width: 100%;
    padding-top: 6px;
  }

  .has-js .primary-nav .sub-menu {
    position: static;
    display: block;
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0 10px;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 0 16px 36px;
  }

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

  .featured .term-line {
    bottom: 16px;
  }

  .featured h1,
  .single-article h1,
  .page-article h1,
  .archive-header h1 {
    font-size: 1.45rem;
  }

  .featured-body,
  .single-body,
  .page-body {
    padding: 20px;
  }

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

  .post-navigation .nav-links {
    flex-direction: column;
  }

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

@media (max-width: 640px) {
  .posts {
    grid-template-columns: 1fr;
  }

  .brand-name {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark::before,
  .term-line .cursor {
    animation: none;
  }

  .primary-nav a,
  article.post,
  .lane,
  .read-more {
    transition: none;
  }
}

@media (forced-colors: active) {
  .read-more,
  .chip,
  .featured-tag,
  .menu-toggle,
  .search-submit {
    border: 1px solid CanvasText;
  }

  .brand-mark::before,
  body::before,
  body::after {
    display: none;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  body::before,
  body::after,
  .site-header,
  .sidebar,
  .site-footer,
  .read-more,
  .term-line,
  .lanes,
  .comment-reply-title,
  .comment-form {
    display: none !important;
  }

  .shell,
  .layout {
    display: block;
    max-width: none;
    padding: 0;
  }

  .featured,
  .single-article,
  .page-article,
  article.post {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    color: #111;
  }

  .featured h1,
  article.post h3 a,
  .entry-title a {
    color: #111;
  }
}
