/*
Theme Name: N₂OAtmo — Climate & Atmospheric Science
Theme URI: https://example.com/n2oatmo
Author: N₂OAtmo Team
Author URI: https://example.com
Description: Atmospheric science and climate research portal tracking nitrous oxide emissions and environmental impact
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: n2oatmo
Tags: science, environment, dark, sidebar, custom-colors, custom-menu, featured-images, threaded-comments, widgets
*/

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --clr-bg:         #060d08;
  --clr-card:       #0b1810;
  --clr-accent:     #16a34a;
  --clr-accent2:    #4ade80;
  --clr-text:       #d1fae5;
  --clr-steel:      #6b7280;
  --clr-border:     #1a3322;
  --clr-header-bg:  #040a06;
  --clr-danger:     #ef4444;
  --clr-warn:       #f59e0b;

  --ff-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --ff-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --ff-display: 'Space Grotesk', var(--ff-sans);

  --radius:    6px;
  --radius-lg: 12px;
  --shadow:    0 2px 12px rgba(0,0,0,.5);
  --glow:      0 0 20px rgba(22,163,74,.25);
  --glow-lg:   0 0 40px rgba(22,163,74,.4);

  --sidebar-w: 260px;
  --gap:       24px;
  --max-w:     1280px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  background: var(--clr-bg);
  color: var(--clr-text);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--clr-accent2);
  text-decoration: none;
  transition: color .2s;
}
a:hover { color: #fff; }
a:focus-visible {
  outline: 2px solid var(--clr-accent2);
  outline-offset: 3px;
  border-radius: 2px;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  color: #fff;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: .35rem; }

code, pre {
  font-family: var(--ff-mono);
  font-size: .88em;
  background: rgba(22,163,74,.08);
  border: 1px solid var(--clr-border);
}
code { padding: .1em .4em; border-radius: 3px; }
pre {
  padding: 1.2rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
pre code { background: none; border: none; padding: 0; font-size: 1em; }

blockquote {
  border-left: 3px solid var(--clr-accent);
  padding: .75rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(22,163,74,.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--clr-text);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin-bottom: 1.5rem;
}
th {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  padding: .6rem 1rem;
  text-align: left;
  font-family: var(--ff-mono);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--clr-accent2);
}
td {
  border: 1px solid var(--clr-border);
  padding: .6rem 1rem;
}
tr:hover td { background: rgba(22,163,74,.04); }

hr {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin: 2rem 0;
}

/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  background: var(--clr-accent);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: var(--radius);
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ============================================================
   HEADER
   ============================================================ */
.atmo-header {
  background: var(--clr-header-bg);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.atmo-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 64px;
}

.atmo-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
  text-decoration: none;
}
.atmo-logo__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.atmo-logo__text {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  line-height: 1;
}
.atmo-logo__sub {
  font-family: var(--ff-mono);
  font-size: .6rem;
  color: var(--clr-accent2);
  letter-spacing: .1em;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

/* Ticker */
.atmo-ticker {
  flex: 1;
  overflow: hidden;
  font-family: var(--ff-mono);
  font-size: .72rem;
  color: var(--clr-steel);
  white-space: nowrap;
}
.atmo-ticker__inner {
  display: inline-flex;
  gap: 2.5rem;
  animation: ticker-scroll 30s linear infinite;
}
.atmo-ticker__item { display: inline-flex; align-items: center; gap: .4rem; }
.atmo-ticker__label { color: var(--clr-accent2); }
.atmo-ticker__val { color: #fff; font-weight: 600; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Nav */
.atmo-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
}
.atmo-nav a {
  padding: .4rem .75rem;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 500;
  color: var(--clr-text);
  transition: background .2s, color .2s;
}
.atmo-nav a:hover,
.atmo-nav a.current-menu-item {
  background: rgba(22,163,74,.15);
  color: var(--clr-accent2);
}

/* Search */
.atmo-header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  padding: .25rem .25rem .25rem .9rem;
  gap: .5rem;
  flex-shrink: 0;
}
.atmo-header-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--clr-text);
  font-size: .85rem;
  width: 150px;
  font-family: var(--ff-sans);
}
.atmo-header-search input::placeholder { color: var(--clr-steel); }
.atmo-header-search button {
  background: var(--clr-accent);
  border: none;
  border-radius: 16px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.atmo-header-search button:hover { background: var(--clr-accent2); }
.atmo-header-search button svg { width: 14px; height: 14px; fill: #fff; }

/* Burger */
.atmo-burger {
  display: none;
  background: none;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: .45rem .55rem;
  cursor: pointer;
  color: var(--clr-text);
  flex-shrink: 0;
}
.atmo-burger svg { width: 20px; height: 20px; fill: currentColor; }

/* Mobile nav */
.atmo-mobile-nav {
  display: none;
  background: var(--clr-header-bg);
  border-bottom: 1px solid var(--clr-border);
  padding: 1rem 20px;
}
.atmo-mobile-nav.is-open { display: block; }
.atmo-mobile-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.atmo-mobile-nav a {
  display: block;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--clr-text);
}
.atmo-mobile-nav a:hover { background: rgba(22,163,74,.1); color: var(--clr-accent2); }

/* ============================================================
   LAYOUT
   ============================================================ */
.atmo-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.atmo-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--gap);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 20px;
  align-items: start;
}

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

/* ============================================================
   SIDEBAR
   ============================================================ */
.atmo-sidebar {
  min-width: 0;
  position: sticky;
  top: 88px;
}

.atmo-widget {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.atmo-widget__title {
  font-family: var(--ff-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--clr-accent2);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.atmo-widget__title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--clr-accent);
  border-radius: 50%;
}

/* N₂O meter widget */
.atmo-meter {
  text-align: center;
  padding: .5rem 0;
}
.atmo-meter__value {
  font-family: var(--ff-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--clr-accent2);
  line-height: 1;
  display: block;
  letter-spacing: -.02em;
}
.atmo-meter__unit {
  font-family: var(--ff-mono);
  font-size: .75rem;
  color: var(--clr-steel);
  margin-top: .25rem;
  display: block;
}
.atmo-meter__label {
  font-size: .78rem;
  color: var(--clr-text);
  margin-top: .5rem;
  line-height: 1.4;
}
.atmo-meter__bar {
  height: 4px;
  background: var(--clr-border);
  border-radius: 2px;
  margin-top: .75rem;
  overflow: hidden;
}
.atmo-meter__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent2));
  border-radius: 2px;
  width: 84%;
  animation: meter-pulse 3s ease-in-out infinite;
}
@keyframes meter-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}

.atmo-stats-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.atmo-stats-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .82rem;
  margin: 0;
}
.atmo-stats-list .key { color: var(--clr-steel); }
.atmo-stats-list .val {
  font-family: var(--ff-mono);
  color: var(--clr-accent2);
  font-weight: 600;
}

.widget ul { list-style: none; padding: 0; }
.widget ul li { margin-bottom: .5rem; }
.widget ul li a { color: var(--clr-text); font-size: .875rem; }
.widget ul li a:hover { color: var(--clr-accent2); }

.widget_tag_cloud a {
  display: inline-block;
  background: rgba(22,163,74,.1);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  padding: .2rem .65rem;
  font-size: .75rem !important;
  color: var(--clr-text) !important;
  margin: .2rem;
  transition: background .2s;
}
.widget_tag_cloud a:hover {
  background: rgba(22,163,74,.25);
  color: var(--clr-accent2) !important;
}

.widget_search .search-form {
  display: flex;
  gap: .5rem;
}
.widget_search input[type="search"] {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: .5rem .75rem;
  color: var(--clr-text);
  font-size: .85rem;
  outline: none;
  font-family: var(--ff-sans);
}
.widget_search input[type="search"]::placeholder { color: var(--clr-steel); }
.widget_search button {
  background: var(--clr-accent);
  border: none;
  border-radius: var(--radius);
  padding: .5rem .9rem;
  color: #fff;
  cursor: pointer;
  font-size: .85rem;
  transition: background .2s;
}
.widget_search button:hover { background: var(--clr-accent2); color: #000; }

/* ============================================================
   CARDS
   ============================================================ */
.atmo-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s, transform .25s;
  opacity: 1;
}
.atmo-card:hover {
  border-color: rgba(22,163,74,.5);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

/* Reveal animation — only after JS adds .reveal-ready */
.reveal-ready { opacity: 0; transition: opacity .5s ease, transform .5s ease; transform: translateY(16px); }
.reveal-ready.is-visible { opacity: 1; transform: translateY(0); }

.atmo-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}
.atmo-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.atmo-card:hover .atmo-card__thumb img { transform: scale(1.04); }

.atmo-card__body {
  padding: 1.25rem;
}

.atmo-card__cat {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: rgba(22,163,74,.12);
  color: var(--clr-accent2);
  border: 1px solid rgba(22,163,74,.25);
  border-radius: 20px;
  padding: .15rem .65rem;
  margin-bottom: .75rem;
}

.atmo-card__title {
  font-size: 1rem;
  margin-bottom: .6rem;
  line-height: 1.35;
}
.atmo-card__title a { color: #fff; text-decoration: none; }
.atmo-card__title a:hover { color: var(--clr-accent2); }

.atmo-card__excerpt {
  font-size: .84rem;
  color: var(--clr-steel);
  line-height: 1.6;
  margin-bottom: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.atmo-card__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  font-family: var(--ff-mono);
  font-size: .7rem;
  color: var(--clr-steel);
  border-top: 1px solid var(--clr-border);
  padding-top: .75rem;
  margin-top: auto;
}
.atmo-card__meta-item { display: inline-flex; align-items: center; gap: .3rem; }
.atmo-card__meta-item svg { width: 12px; height: 12px; fill: currentColor; opacity: .7; }

/* Featured card */
.atmo-card--featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.atmo-card--featured .atmo-card__thumb {
  aspect-ratio: auto;
  min-height: 220px;
}
.atmo-card--featured .atmo-card__body { padding: 1.75rem; }
.atmo-card--featured .atmo-card__title { font-size: 1.3rem; }

/* Grid layout */
.atmo-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

.atmo-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.atmo-card--list {
  display: grid;
  grid-template-columns: 160px 1fr;
}
.atmo-card--list .atmo-card__thumb {
  aspect-ratio: auto;
  min-height: 120px;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.atmo-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.atmo-section-head h2 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.atmo-section-head h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--clr-accent);
  border-radius: 2px;
}
.atmo-view-all {
  font-family: var(--ff-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--clr-accent2);
  border: 1px solid rgba(22,163,74,.3);
  padding: .3rem .75rem;
  border-radius: 20px;
  white-space: nowrap;
  transition: background .2s;
}
.atmo-view-all:hover { background: rgba(22,163,74,.1); color: var(--clr-accent2); }

/* ============================================================
   HERO / FEATURED
   ============================================================ */
.atmo-hero {
  background: linear-gradient(135deg, var(--clr-card) 0%, rgba(22,163,74,.06) 100%);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.atmo-hero::before {
  content: 'N₂O';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--ff-mono);
  font-size: 8rem;
  font-weight: 900;
  color: rgba(22,163,74,.04);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.atmo-hero__eyebrow {
  font-family: var(--ff-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--clr-accent2);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.atmo-hero__eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--clr-accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,.4); }
  50% { box-shadow: 0 0 0 6px rgba(22,163,74,0); }
}
.atmo-hero h1 { margin-bottom: 1rem; }
.atmo-hero p { color: var(--clr-text); max-width: 55ch; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.atmo-single__header {
  margin-bottom: 2rem;
}
.atmo-single__cats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}
.atmo-single__cat {
  font-family: var(--ff-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: rgba(22,163,74,.12);
  color: var(--clr-accent2);
  border: 1px solid rgba(22,163,74,.3);
  border-radius: 20px;
  padding: .2rem .75rem;
}
.atmo-single__title { margin-bottom: 1rem; }
.atmo-single__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--ff-mono);
  font-size: .75rem;
  color: var(--clr-steel);
  padding: 1rem 0;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}
.atmo-single__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.atmo-single__meta svg { width: 13px; height: 13px; fill: currentColor; }

.atmo-single__thumb {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--clr-border);
}
.atmo-single__thumb img { width: 100%; max-height: 480px; object-fit: cover; }

.atmo-entry-content {
  max-width: 70ch;
}
.atmo-entry-content h2 { margin: 2rem 0 1rem; }
.atmo-entry-content h3 { margin: 1.5rem 0 .75rem; }
.atmo-entry-content ul, .atmo-entry-content ol { margin-bottom: 1.25rem; }

.atmo-data-box {
  background: rgba(22,163,74,.06);
  border: 1px solid rgba(22,163,74,.2);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
  font-family: var(--ff-mono);
  font-size: .85rem;
}
.atmo-data-box__title {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--clr-accent2);
  margin-bottom: .75rem;
}

/* Related posts */
.atmo-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--clr-border);
}

/* ============================================================
   LOAD MORE
   ============================================================ */
.atmo-loadmore-wrap {
  text-align: center;
  margin-top: 2.5rem;
}
.atmo-btn-loadmore {
  background: transparent;
  border: 1px solid var(--clr-accent);
  border-radius: 30px;
  padding: .7rem 2rem;
  color: var(--clr-accent2);
  font-family: var(--ff-mono);
  font-size: .82rem;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.atmo-btn-loadmore:hover {
  background: rgba(22,163,74,.12);
  box-shadow: var(--glow);
}
.atmo-btn-loadmore:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.atmo-btn-loadmore.loading::after {
  content: '...';
  animation: dots 1s steps(3, end) infinite;
}
@keyframes dots {
  0%   { content: '.'; }
  33%  { content: '..'; }
  66%  { content: '...'; }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.atmo-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.atmo-pagination a,
.atmo-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 .5rem;
  border-radius: var(--radius);
  font-family: var(--ff-mono);
  font-size: .82rem;
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  transition: background .2s, border-color .2s;
}
.atmo-pagination a:hover {
  background: rgba(22,163,74,.1);
  border-color: var(--clr-accent);
  color: var(--clr-accent2);
}
.atmo-pagination .current {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  color: #fff;
}

/* ============================================================
   COMMENTS
   ============================================================ */
.atmo-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--clr-border);
}
.atmo-comments__title {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}
.comment-list {
  list-style: none;
  padding: 0;
}
.comment {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--clr-card);
}
.comment-meta { margin-bottom: .5rem; }
.comment-author .fn { font-weight: 600; color: var(--clr-accent2); }
.comment-metadata {
  font-family: var(--ff-mono);
  font-size: .72rem;
  color: var(--clr-steel);
  margin-top: .15rem;
}
.comment-content { font-size: .9rem; }
.children {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  margin-left: 1.5rem;
}
.comment-respond {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2rem;
}
.comment-reply-title { margin-bottom: 1.25rem; font-size: 1rem; }
.comment-form label {
  display: block;
  font-size: .82rem;
  color: var(--clr-steel);
  margin-bottom: .35rem;
  font-family: var(--ff-mono);
}
.comment-form input,
.comment-form textarea {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: .6rem .9rem;
  color: var(--clr-text);
  font-size: .9rem;
  font-family: var(--ff-sans);
  outline: none;
  margin-bottom: 1rem;
  transition: border-color .2s;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--clr-accent); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .form-submit input {
  width: auto;
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  padding: .6rem 1.5rem;
  transition: background .2s;
}
.comment-form .form-submit input:hover { background: #15803d; }

/* ============================================================
   ARCHIVE & SEARCH
   ============================================================ */
.atmo-archive-head {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.atmo-archive-head__eyebrow {
  font-family: var(--ff-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--clr-accent2);
  margin-bottom: .4rem;
}
.atmo-archive-head h1 { font-size: 1.4rem; margin-bottom: .25rem; }
.atmo-archive-head p { font-size: .85rem; color: var(--clr-steel); margin: 0; }

/* ============================================================
   404
   ============================================================ */
.atmo-404 {
  text-align: center;
  padding: 4rem 1rem;
}
.atmo-404__code {
  font-family: var(--ff-mono);
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 900;
  color: rgba(22,163,74,.15);
  line-height: 1;
  display: block;
  margin-bottom: .5rem;
}
.atmo-404 h1 { margin-bottom: 1rem; }
.atmo-404 p { color: var(--clr-steel); max-width: 45ch; margin: 0 auto 2rem; }

/* ============================================================
   AUTHOR
   ============================================================ */
.atmo-author-box {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.atmo-author-box img {
  border-radius: 50%;
  width: 72px;
  height: 72px;
  border: 2px solid var(--clr-border);
}
.atmo-author-box h2 { font-size: 1rem; margin-bottom: .25rem; }
.atmo-author-box p { font-size: .85rem; color: var(--clr-steel); margin: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.atmo-footer {
  background: var(--clr-header-bg);
  border-top: 1px solid var(--clr-border);
  margin-top: 4rem;
}
.atmo-footer__widgets {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 20px 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.atmo-footer__widget-title {
  font-family: var(--ff-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--clr-accent2);
  margin-bottom: 1rem;
}
.atmo-footer__widget ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.atmo-footer__widget a {
  font-size: .85rem;
  color: var(--clr-steel);
}
.atmo-footer__widget a:hover { color: var(--clr-text); }
.atmo-footer__bottom {
  border-top: 1px solid var(--clr-border);
  padding: 1.25rem 20px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--ff-mono);
  font-size: .72rem;
  color: var(--clr-steel);
}
.atmo-footer__bottom a { color: var(--clr-steel); }
.atmo-footer__bottom a:hover { color: var(--clr-accent2); }
.atmo-footer__molecule {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--clr-accent2);
  font-weight: 600;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.atmo-breadcrumb {
  font-family: var(--ff-mono);
  font-size: .72rem;
  color: var(--clr-steel);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}
.atmo-breadcrumb a { color: var(--clr-steel); }
.atmo-breadcrumb a:hover { color: var(--clr-accent2); }
.atmo-breadcrumb__sep { opacity: .4; }

/* ============================================================
   NOTICE / ALERT
   ============================================================ */
.atmo-notice {
  background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.2);
  border-left: 3px solid var(--clr-accent);
  border-radius: var(--radius);
  padding: .9rem 1.2rem;
  font-size: .875rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   READING PROGRESS
   ============================================================ */
.atmo-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--clr-accent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .1s linear;
  z-index: 200;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .atmo-layout {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .atmo-sidebar {
    position: static;
    order: -1;
  }
  .atmo-card--featured {
    grid-template-columns: 1fr;
  }
  .atmo-card--list {
    grid-template-columns: 1fr;
  }
  .atmo-nav { display: none; }
  .atmo-burger { display: flex; }
  .atmo-ticker { display: none; }
  .atmo-header-search { display: none; }
}

@media (max-width: 600px) {
  .atmo-hero { padding: 1.5rem; }
  .atmo-posts-grid { grid-template-columns: 1fr; }
  .atmo-footer__widgets { grid-template-columns: 1fr 1fr; }
  .atmo-author-box { flex-direction: column; }
}

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