:root {
  /* Core palette (dark theme) */
  --bg: #0c0b10;
  --surface: #16151c;
  --text: #f2efe9;
  --muted: #a39e96;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #f97d4a; /* warm "raw" rust-orange, brightened for dark bg */
  --accent-2: #ffb27a; /* amber complement */
  --accent-soft: rgba(249, 125, 74, 0.14);

  /* Glassmorphism tokens (dark) */
  --glass-bg: rgba(28, 26, 36, 0.55);
  --glass-bg-strong: rgba(28, 26, 36, 0.75);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-soft: rgba(255, 255, 255, 0.07);
  --glass-blur: saturate(160%) blur(20px);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --glass-shadow-hover: 0 18px 50px rgba(249, 125, 74, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);

  --radius: 18px;
  --radius-sm: 12px;

  --max: 720px;
  --max-wide: 1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(900px 600px at 8% -5%, rgba(249, 125, 74, 0.06), transparent 60%),
    radial-gradient(800px 700px at 100% 0%, rgba(194, 65, 12, 0.05), transparent 55%),
    radial-gradient(1000px 800px at 50% 110%, rgba(120, 90, 220, 0.10), transparent 60%),
    linear-gradient(160deg, #070609 0%, #050407 50%, #09070c 100%);
  background-attachment: fixed;
}

/* Floating ambient orbs behind the frosted glass */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}
body::before {
  width: 460px;
  height: 460px;
  top: -120px;
  left: -100px;
  background: radial-gradient(circle at 30% 30%, #b85c2e, #7a2c08);
  opacity: 0.32;
  animation: float-a 22s ease-in-out infinite;
}
body::after {
  width: 520px;
  height: 520px;
  bottom: -160px;
  right: -120px;
  background: radial-gradient(circle at 70% 70%, #9b7bff, #5a37c4);
  opacity: 0.42;
  animation: float-b 26s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.12); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -30px) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header — frosted sticky bar */
.site-header {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border-soft);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
}
.brand-dot { color: var(--accent); }
.nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav a:hover {
  color: var(--accent);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
}

/* Hero */
.hero-section { padding: 3.5rem 0 2rem; max-width: var(--max); }
.hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
  background: linear-gradient(120deg, var(--text) 25%, var(--accent) 115%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--muted); font-size: 1.15rem; margin: 0; }

/* Shared glass surface */
.featured,
.post-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Featured */
.featured {
  display: block;
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(249, 125, 74, 0.12), transparent 55%);
  pointer-events: none;
}
.featured:hover {
  text-decoration: none;
  transform: translateY(-4px);
  border-color: rgba(249, 125, 74, 0.45);
  box-shadow: var(--glass-shadow-hover);
}
.featured-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(249, 125, 74, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  position: relative;
}
.featured h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  position: relative;
}
.featured p { color: var(--muted); margin: 0; position: relative; }

/* Post grid + cards */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding-bottom: 4rem;
}
.post-card {
  border-radius: var(--radius-sm);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 125, 74, 0.45);
  box-shadow: var(--glass-shadow-hover);
}
.post-card-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
}
.post-card-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0;
}
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent); text-decoration: none; }
.post-card-desc { color: var(--muted); font-size: 0.95rem; margin: 0; flex: 1; }
.post-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}
.post-card-tags { display: flex; gap: 0.5rem; }
.post-card-tags a { color: var(--muted); }

/* Archive headers */
.archive-header { padding: 3rem 0 1.5rem; }
.archive-header .eyebrow,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0 0 0.25rem;
}
.archive-header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.25rem;
  margin: 0 0 0.25rem;
}
.archive-header p { color: var(--muted); margin: 0; }

.empty-state {
  color: var(--muted);
  padding: 2rem;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--glass-shadow);
}

/* Article */
.prose { max-width: var(--max); margin: 0 auto; padding: 2.5rem 0 4rem; }
.post-header {
  margin-bottom: 2rem;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  padding: 1.75rem;
}
.post-header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0.5rem 0;
}
.post-lede { font-size: 1.2rem; color: var(--muted); margin: 0.5rem 0 1rem; }
.post-meta { color: var(--muted); font-size: 0.9rem; }
.hero {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.post-body { font-size: 1.075rem; }
.post-body h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.6rem;
  margin: 2.25rem 0 0.75rem;
}
.post-body h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  margin: 1.75rem 0 0.5rem;
}
.post-body p { margin: 1rem 0; }
.post-body ul, .post-body ol { padding-left: 1.4rem; }
.post-body li { margin: 0.4rem 0; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.75rem 0 0.75rem 1.25rem;
  color: var(--muted);
  font-style: italic;
  background: linear-gradient(90deg, rgba(249, 125, 74, 0.10), transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-body pre {
  background: rgba(8, 7, 12, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #f0ece4;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}
.post-body :not(pre) > code {
  background: rgba(249, 125, 74, 0.14);
  border: 1px solid rgba(249, 125, 74, 0.22);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
}
.post-body img { max-width: 100%; border-radius: var(--radius-sm); }

.post-tags {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--glass-border-soft);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.post-tags a {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.25rem 0.7rem;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.post-tags a:hover {
  color: var(--accent);
  text-decoration: none;
  border-color: rgba(249, 125, 74, 0.5);
  transform: translateY(-1px);
}

/* Footer — frosted bar */
.site-footer {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border-soft);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-links { display: flex; gap: 1rem; }
