:root {
  --bg: #f3f1ea;
  --bg-accent: #e6dfd2;
  --surface: rgba(255, 251, 245, 0.8);
  --surface-strong: #fffdf8;
  --surface-inverse: #171d27;
  --text: #18212b;
  --muted: #5e6773;
  --border: rgba(24, 33, 43, 0.12);
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --shadow: 0 24px 60px rgba(25, 36, 49, 0.09);
  --shadow-soft: 0 10px 30px rgba(25, 36, 49, 0.06);
  --radius: 26px;
  --radius-sm: 18px;
  --transition: 180ms ease;
}

body.dark-mode {
  --bg: #11161d;
  --bg-accent: #1a232d;
  --surface: rgba(21, 28, 37, 0.86);
  --surface-strong: #161d26;
  --surface-inverse: #eef2f4;
  --text: #eff4f7;
  --muted: #9aa8b4;
  --border: rgba(239, 244, 247, 0.12);
  --accent: #64d2c6;
  --accent-strong: #8de8de;
  --accent-soft: rgba(100, 210, 198, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(196, 153, 83, 0.14), transparent 24%),
    linear-gradient(180deg, var(--bg-accent), var(--bg));
  transition: background-color var(--transition), color var(--transition);
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 36px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 28px;
  background: rgba(255, 253, 248, 0.72);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

body.dark-mode .topbar {
  background: rgba(18, 24, 31, 0.74);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-inverse);
  color: var(--bg);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.navbar a,
.dark-mode-toggle,
.primary-link,
.secondary-link,
.project-links a,
.footer-links a,
.notes-links a {
  transition: transform var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition);
}

.navbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.96rem;
}

.nav-github svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.navbar a:hover,
.navbar a:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
}

.navbar .nav-live {
  background: var(--accent);
  color: #f7fffe;
}

.navbar .nav-ukraine {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all var(--transition);
}

.navbar .nav-ukraine img {
  width: 20px;
  height: auto;
  border-radius: 2px;
}

.navbar .nav-ukraine:hover,
.navbar .nav-ukraine:focus-visible {
  background: linear-gradient(180deg, #0057b7 50%, #ffd700 50%);
  color: #fff !important;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 87, 183, 0.2);
}

body.dark-mode .navbar .nav-ukraine:hover,
body.dark-mode .navbar .nav-ukraine:focus-visible {
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.15);
}

.navbar .nav-live:hover,
.navbar .nav-live:focus-visible {
  background: var(--accent-strong);
  color: #f7fffe;
}

.dark-mode-toggle {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  padding: 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.dark-mode-toggle:hover,
.dark-mode-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.container {
  display: grid;
  gap: 24px;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 24px;
}

.post-list {
  display: grid;
  gap: 18px;
  grid-column: 1;
}

.hn-panel {
  position: sticky;
  top: 116px;
  grid-column: 2;
  justify-self: end;
  width: min(100%, 360px);
}

.hn-panel-shell {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(200, 157, 84, 0.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.16), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hn-panel-header,
.hn-story-meta {
  color: var(--muted);
}

.hn-panel-header {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.hn-sort-btn {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.hn-sort-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-soft);
}

.hn-sort-btn:active {
  transform: translateY(0);
}

.hn-story-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hn-story-link {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  text-decoration: none;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: var(--shadow-soft);
}

body.dark-mode .hn-story-link {
  background: rgba(255, 255, 255, 0.03);
}

.hn-story-link:hover,
.hn-story-link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.hn-story-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hn-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hn-source-pill .hn-source-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hn-source-pill[data-tone="warm"] {
  background: rgba(200, 157, 84, 0.18);
  color: #8b5a13;
  border: 1px solid rgba(200, 157, 84, 0.25);
}

body.dark-mode .hn-source-pill[data-tone="warm"] {
  color: #ffd895;
  background: rgba(200, 157, 84, 0.16);
}

.hn-source-pill[data-tone="cool"] {
  background: rgba(15, 118, 110, 0.14);
  color: #0b5f59;
  border: 1px solid rgba(15, 118, 110, 0.2);
}

body.dark-mode .hn-source-pill[data-tone="cool"] {
  color: #98efe4;
  background: rgba(100, 210, 198, 0.12);
}

.hn-story-score {
  flex: none;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 800;
}

.hn-story-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hn-story-meta {
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.4;
}

.post-list-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.sort-toggle {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sort-toggle:hover,
.sort-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.post-list-heading {
  margin-bottom: 0;
}

.post-list-heading h2 {
  max-width: none;
}

.post-list-copy {
  margin: 16px 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1rem;
}

.post-preview {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.post-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 28px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 10px;
}

.post-link {
  text-decoration: none;
}

.post-toggle:hover,
.post-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

body.dark-mode .post-toggle:hover,
body.dark-mode .post-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.03);
}

.post-meta,
.post-hint {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.post-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.post-summary {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.post-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.post-hint::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.post-body {
  display: none;
  padding: 0 28px 28px;
}

.post-preview.is-open .post-body {
  display: block;
}

.post-preview.is-open .post-toggle {
  border-bottom: 1px solid var(--border);
}

.post-body-grid {
  padding-top: 28px;
}

.post-preview-static .post-body {
  display: block;
}

.post-toggle-static {
  cursor: default;
}

.post-toggle-static:hover,
.post-toggle-static:focus-visible {
  background: transparent;
}

.blog-hero,
.blog-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 24px;
  align-items: center;
  padding: 42px;
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(circle at top left, rgba(200, 157, 84, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.16), transparent 34%),
    var(--surface);
}

.blog-hero-copy h1 {
  margin: 14px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.blog-dek {
  max-width: 30ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.blog-hero-visual {
  min-height: 280px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(15, 118, 110, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03));
  overflow: hidden;
}

.thought-orbit {
  position: relative;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 1px solid rgba(24, 33, 43, 0.1);
}

.thought-orbit::before,
.thought-orbit::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1px solid rgba(24, 33, 43, 0.08);
}

.thought-orbit::after {
  inset: 56px;
}

.thought-orbit span {
  position: absolute;
  display: inline-grid;
  place-items: center;
  min-width: 76px;
  min-height: 76px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.thought-orbit span:nth-child(1) {
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
}

.thought-orbit span:nth-child(2) {
  bottom: 18px;
  left: 0;
}

.thought-orbit span:nth-child(3) {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.blog-card {
  padding: 28px;
  border-radius: var(--radius);
}

.blog-card h2 {
  margin: 16px 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.blog-card p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.blog-card p + p {
  margin-top: 14px;
}

.blog-card-wide {
  grid-column: span 2;
}

.blog-card-hope {
  background:
    radial-gradient(circle at top right, rgba(200, 157, 84, 0.18), transparent 26%),
    radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.16), transparent 34%),
    var(--surface);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.section-card,
.profile-card,
.mini-panel,
.timeline-card,
.signal-card,
.project-card,
.capability-card,
.insight-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-copy,
.section-card,
.profile-card,
.mini-panel,
.timeline-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
}

.hero-copy {
  padding: 42px;
  border-radius: calc(var(--radius) + 8px);
}

.hero-copy-ai {
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    var(--surface);
}

.eyebrow,
.section-tag,
.project-type,
.signal-label,
.insight-label,
.mini-label,
.profile-kicker,
.capability-card span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 11px;
}

.hero h1,
.section-heading h2 {
  margin: 16px 0 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 5.1vw, 4.6rem);
}

.hero-copy-ai h1 {
  max-width: 14ch;
}

.hero-text,
.profile-summary,
.value-item p,
.timeline-item p,
.project-card p,
.mini-panel p {
  color: var(--muted);
}

.hero-text {
  max-width: 62ch;
  margin: 20px 0 0;
  font-size: 1.08rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.execution-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.execution-chip,
.stack-column {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--border);
}

body.dark-mode .execution-chip,
body.dark-mode .stack-column {
  background: rgba(255, 255, 255, 0.03);
}

.execution-chip span,
.stack-label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.execution-chip strong {
  display: block;
  margin-top: 10px;
  line-height: 1.45;
}

.hero-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.metric-card,
.matrix-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.18rem;
  font-family: "Space Grotesk", sans-serif;
}

.sparkline-bars,
.vertical-bars {
  display: flex;
  align-items: end;
  gap: 7px;
  height: 72px;
  margin-top: 16px;
}

.sparkline-bars i,
.vertical-bars i {
  display: block;
  flex: 1;
  border-radius: 999px 999px 12px 12px;
  background: linear-gradient(180deg, #c89d54, var(--accent));
  opacity: 0.95;
}

.ring-meter {
  --fill: 82%;
  width: 78px;
  height: 78px;
  margin-top: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  background:
    radial-gradient(circle at center, var(--surface-strong) 55%, transparent 56%),
    conic-gradient(var(--accent) var(--fill), rgba(24, 33, 43, 0.1) 0);
}

.ring-meter span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
}

.ring-agents {
  --fill: 82%;
}

.mini-graph {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
  min-height: 72px;
  align-items: end;
}

.mini-graph i {
  display: block;
  border-radius: 16px 16px 8px 8px;
  background: linear-gradient(180deg, rgba(200, 157, 84, 0.55), rgba(15, 118, 110, 0.95));
}

.mini-graph i:nth-child(1) {
  height: 44%;
}

.mini-graph i:nth-child(2) {
  height: 68%;
}

.mini-graph i:nth-child(3) {
  height: 88%;
}

.dot-matrix {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.dot-matrix i,
.grid-map i,
.pulse-grid i {
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.16);
  border: 1px solid rgba(15, 118, 110, 0.18);
}

.dot-matrix i:nth-child(3n),
.pulse-grid i:nth-child(4n-1) {
  background: rgba(200, 157, 84, 0.28);
  border-color: rgba(200, 157, 84, 0.34);
}

.primary-link,
.secondary-link,
.notes-links a,
.project-links a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.primary-link {
  background: var(--accent);
  color: #f7fffe;
}

.primary-link:hover,
.primary-link:focus-visible {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.secondary-link,
.project-links a,
.notes-links a,
.footer-links a {
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.secondary-link:hover,
.secondary-link:focus-visible,
.project-links a:hover,
.project-links a:focus-visible,
.notes-links a:hover,
.notes-links a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.signal-card {
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.signal-card strong {
  display: block;
  margin-top: 14px;
  line-height: 1.45;
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.profile-card,
.mini-panel,
.section-card,
.timeline-card {
  border-radius: var(--radius);
}

.profile-card {
  padding: 28px;
}

.profile-card-visual {
  background:
    radial-gradient(circle at top, rgba(200, 157, 84, 0.14), transparent 34%),
    radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.14), transparent 30%),
    var(--surface);
}

.profile-image {
  width: 146px;
  height: 146px;
  border-radius: 28px;
  overflow: hidden;
  margin-bottom: 18px;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card h2 {
  margin: 14px 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
  line-height: 1.05;
}

.orbital-visual {
  position: relative;
  min-height: 250px;
  margin: 18px 0 10px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(15, 118, 110, 0.16), transparent 48%),
    radial-gradient(circle at center, rgba(200, 157, 84, 0.08), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02));
}

.orbital-visual::before,
.orbital-visual::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1px solid rgba(24, 33, 43, 0.08);
}

.orbital-visual::after {
  inset: 56px;
}

.orbital-core,
.orbit {
  position: absolute;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.orbital-core {
  inset: 50%;
  width: 84px;
  height: 84px;
  margin: -42px;
  background: linear-gradient(135deg, var(--accent), #c89d54);
  color: #f7fffe;
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.24);
}

.orbit {
  min-width: 68px;
  min-height: 68px;
  padding: 0 16px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.orbit-a {
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.orbit-b {
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
}

.orbit-c {
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
}

.orbit-d {
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.badge-list,
.notes-links,
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}

.badge-list li {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 700;
}

.focus-meter {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.focus-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 700;
}

.meter {
  height: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #c89d54);
}

.mini-panel {
  padding: 22px 24px;
}

.mini-panel-visual {
  display: grid;
  gap: 14px;
}

.mini-panel p {
  margin: 14px 0 0;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  min-height: 110px;
}

.pulse-grid i:nth-child(3n) {
  background: rgba(15, 118, 110, 0.4);
  transform: scale(1.08);
}

.pulse-grid i:nth-child(5n) {
  background: rgba(200, 157, 84, 0.34);
}

.section-card {
  padding: 34px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  max-width: 14ch;
}

.project-grid,
.capability-grid,
.insights-grid {
  display: grid;
  gap: 16px;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-grid {
  align-items: stretch;
}

.skill-grid-simple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  padding: 24px;
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.project-card h3,
.value-item h3,
.timeline-card h3 {
  margin: 18px 0 12px;
  font-size: 1.2rem;
}

.project-card p {
  margin: 0 0 22px;
}

.card-notes {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.stack-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.stack-map-visual {
  margin-top: 16px;
}

.stack-column strong {
  display: block;
  margin-top: 10px;
  font-size: 1.04rem;
}

.stack-column p {
  margin: 10px 0 0;
  color: var(--muted);
}

.split-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 22px;
}

.value-list {
  display: grid;
  gap: 14px;
}

.value-list-visual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.value-item {
  padding: 20px 22px;
  border-radius: 22px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.value-item-visual {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.value-item h3,
.timeline-item strong {
  display: block;
}

.value-track,
.pipeline-band {
  height: 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}

.value-track i,
.pipeline-band i,
.matrix-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #c89d54);
}

.timeline-card {
  padding: 26px;
}

.timeline-card-visual {
  background:
    radial-gradient(circle at top right, rgba(200, 157, 84, 0.14), transparent 28%),
    var(--surface);
}

.workflow-diagram {
  display: grid;
  grid-template-columns: repeat(7, auto);
  gap: 10px;
  align-items: center;
  margin: 8px 0 20px;
}

.workflow-step {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-weight: 800;
}

.workflow-arrow {
  width: 100%;
  min-width: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #c89d54);
  position: relative;
}

.workflow-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #c89d54;
}

.timeline-item + .timeline-item {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.timeline-item span {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.timeline-item p {
  margin: 12px 0 0;
}

.capability-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capability-card {
  padding: 22px;
  border-radius: 20px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.capability-card strong {
  display: block;
  margin-top: 16px;
  font-size: 1.08rem;
  line-height: 1.45;
}

.notes-links {
  margin-top: 22px;
}

.section-heading-compact {
  margin-bottom: 18px;
}

.section-heading-compact h2 {
  max-width: none;
}

.capability-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.matrix-card {
  min-height: 210px;
}

.matrix-card-wide {
  grid-column: span 2;
}

.matrix-bars {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.matrix-bars div,
.pipeline-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.matrix-bars label,
.pipeline-row span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.matrix-bars i {
  min-height: 12px;
}

.grid-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.grid-map i {
  border-radius: 12px;
}

.grid-map i.hot {
  background: linear-gradient(180deg, rgba(200, 157, 84, 0.38), rgba(15, 118, 110, 0.42));
  border-color: rgba(15, 118, 110, 0.32);
}

.split-card-visual {
  align-items: stretch;
}

.workflow-diagram-visual {
  margin-bottom: 22px;
}

.pipeline-grid {
  display: grid;
  gap: 14px;
}

.source-links {
  margin-top: 26px;
}

.roadmap-grid .capability-card,
.positioning-grid .insight-card,
.skill-grid .project-card {
  height: 100%;
}

.code-section {
  margin-top: 10px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-button {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--muted);
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.tab-button.active {
  background: var(--surface-inverse);
  color: var(--bg);
  border-color: transparent;
}

body.dark-mode .tab-button.active {
  color: #10161d;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.code-container {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.code-container pre {
  margin: 0;
  padding: 54px 22px 22px;
  overflow: auto;
}

.copy-button {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #e8edf3;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
}

.copy-button.copied {
  background: rgba(100, 210, 198, 0.24);
  border-color: rgba(100, 210, 198, 0.44);
}

.compact-card .section-heading h2 {
  max-width: none;
}

.insights-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.insight-card {
  padding: 20px;
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.insight-value {
  display: block;
  margin-top: 14px;
  font-weight: 800;
  font-size: 1.05rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 26px;
  padding: 24px 12px 10px;
}

.footer-copy p {
  margin: 0;
}

.footer-copy p + p {
  margin-top: 6px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}

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

@media (max-width: 980px) {
  .blog-hero,
  .hero,
  .split-card,
  .project-grid,
  .capability-grid,
  .insights-grid,
  .signal-grid,
  .execution-strip,
  .stack-map,
  .hero-dashboard,
  .capability-matrix,
  .value-list-visual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .blog-hero {
    grid-template-columns: 1fr;
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .post-list,
  .hn-panel {
    grid-column: 1;
  }

  .hn-panel {
    position: static;
    justify-self: stretch;
    width: 100%;
  }

  .matrix-card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
    margin-top: 12px;
  }

  .topbar {
    position: static;
    border-radius: 28px;
    padding: 16px;
  }

  .topbar,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy,
  .blog-hero,
  .section-card,
  .profile-card,
  .timeline-card {
    padding: 24px;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(2.6rem, 12vw, 4.2rem);
  }

  .project-grid,
  .capability-grid,
  .insights-grid,
  .signal-grid,
  .split-card,
  .execution-strip,
  .stack-map,
  .hero-dashboard,
  .capability-matrix,
  .value-list-visual {
    grid-template-columns: 1fr;
  }

  .matrix-card-wide {
    grid-column: span 1;
  }

  .matrix-bars div,
  .pipeline-row {
    grid-template-columns: 1fr;
  }

  .workflow-diagram {
    grid-template-columns: 1fr;
  }

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

  .blog-card-wide {
    grid-column: span 1;
  }

  .post-toggle,
  .post-body {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hn-panel-shell {
    padding: 18px;
  }

  .workflow-arrow {
    width: 2px;
    min-width: 2px;
    min-height: 18px;
    justify-self: center;
    background: linear-gradient(180deg, var(--accent), #c89d54);
  }

  .workflow-arrow::after {
    right: -4px;
    top: auto;
    bottom: -1px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid #c89d54;
    border-bottom: 0;
  }

  .navbar {
    justify-content: flex-start;
  }

  .orbital-visual {
    min-height: 220px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 14px, 1240px);
  }

  .hero-copy,
  .blog-hero,
  .section-card,
  .profile-card,
  .timeline-card,
  .mini-panel {
    border-radius: 22px;
    padding: 20px;
  }

  .brand-text {
    font-size: 0.92rem;
  }

  .blog-card {
    padding: 22px;
    border-radius: 22px;
  }

  .hn-panel-shell,
  .post-preview {
    border-radius: 22px;
  }

  .post-toggle,
  .post-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .post-body {
    padding-bottom: 20px;
  }

  .hn-story-link {
    padding: 11px 13px;
    border-radius: 16px;
  }

  .post-body-grid {
    padding-top: 20px;
  }

  .blog-hero-visual {
    min-height: 220px;
  }

  .thought-orbit {
    width: 190px;
    height: 190px;
  }

  .thought-orbit span {
    min-width: 64px;
    min-height: 64px;
  }

  .cta-row,
  .notes-links,
  .project-links,
  .footer-links {
    width: 100%;
  }

  .primary-link,
  .secondary-link,
  .notes-links a,
  .project-links a,
  .footer-links a,
  .dark-mode-toggle {
    width: 100%;
  }
}

.price-chart-card {
  padding: 20px;
  margin-bottom: 12px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.price-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.price-current-value {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent);
}

.price-chart-viz {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
  padding-bottom: 4px;
}

.price-bar {
  flex: 1;
  background: var(--accent);
  opacity: 0.6;
  border-radius: 99px 99px 2px 2px;
  transition: opacity 200ms ease, transform 200ms ease;
  position: relative;
}

.price-bar:hover {
  opacity: 1;
  transform: scaleY(1.05);
}

.price-bar.is-current {
  background: #c89d54;
  opacity: 1;
}

.price-bar.is-negative {
  background: transparent;
  border: 1px dashed var(--accent);
  opacity: 0.4;
}

.weather-chart-row {
  display: flex;
  gap: 3px;
  margin-top: 18px; /* Increased to avoid overlap with hour labels */
  padding-bottom: 4px;
  position: relative;
}

.weather-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0.8;
}

.weather-icon {
  font-size: 0.8rem;
}

.weather-temp {
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--muted);
}

.weather-wind {
  font-size: 0.45rem;
  font-weight: 500;
  color: var(--muted);
}

.price-chart-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.price-chart-viz {
  position: relative;
}

.price-max-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1px dashed var(--accent);
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}

.quote-card {
  padding: 42px;
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(circle at top left, rgba(200, 157, 84, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.16), transparent 34%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 12px;
}

.quote-text {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text);
}

.quote-author {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--muted);
  font-style: normal;
}

.quote-refresh-btn {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid rgba(200, 157, 84, 0.45);
  border-radius: 999px;
  background: rgba(200, 157, 84, 0.08);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.quote-refresh-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.4s ease;
}

.quote-refresh-btn:hover {
  background: rgba(200, 157, 84, 0.18);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 157, 84, 0.2);
}

.quote-refresh-btn:active {
  transform: translateY(0);
}

@keyframes spin-once {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.quote-refresh-btn.spinning svg {
  animation: spin-once 0.5s ease-in-out;
}


.price-max-line span {
  position: absolute;
  right: 0;
  top: -14px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent);
}

.price-hour-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed var(--accent);
  opacity: 0.2;
  pointer-events: none;
  z-index: 1;
}

.price-hour-label {
  position: absolute;
  bottom: -16px;
  left: 0;
  transform: translateX(-50%);
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
