:root {
  --bg: #180d24;
  --bg-page: #2f1d44;
  --bg-page-end: #251736;
  --page-glow: rgba(173, 119, 255, 0.16);
  --header-band: rgba(12, 8, 20, 0.96);
  --header-line: rgba(229, 214, 255, 0.12);
  --footer-band: #140b1f;
  --footer-line: rgba(236, 222, 255, 0.18);
  --footer-ink: #f5ecff;
  --footer-muted: #d5c2eb;
  --paper: rgba(69, 46, 102, 0.76);
  --paper-strong: rgba(85, 58, 124, 0.88);
  --paper-soft: rgba(58, 38, 89, 0.64);
  --surface-strong: rgba(42, 27, 66, 0.98);
  --ink: #fbf6ff;
  --muted: #d8c8ea;
  --line: rgba(235, 223, 255, 0.18);
  --accent: #d7afff;
  --accent-strong: #f0daff;
  --accent-soft: rgba(122, 79, 186, 0.28);
  --shadow: 0 26px 60px rgba(8, 4, 14, 0.34);
  --header-ink: #f7f1ff;
  --header-nav: rgba(233, 220, 255, 0.78);
  --header-nav-hover: #fbf6ff;
  --header-nav-active: #fbf6ff;
  --header-nav-active-bg: rgba(255, 255, 255, 0.12);
  --header-nav-active-border: rgba(255, 255, 255, 0.16);
  --brand-mark-bg: rgba(231, 215, 255, 0.18);
  --brand-mark-border: rgba(231, 215, 255, 0.16);
  --nav-underline: rgba(242, 227, 255, 0.72);
  --button-text: #221131;
  --chip-bg: rgba(55, 36, 84, 0.92);
  --chip-border: rgba(227, 212, 255, 0.14);
  --chip-active-bg: rgba(88, 57, 132, 0.96);
  --chip-active-border: rgba(241, 227, 255, 0.3);
  --control-bg: rgba(38, 24, 61, 0.96);
  --control-border: rgba(227, 212, 255, 0.16);
  --control-divider: rgba(227, 212, 255, 0.12);
  --link-strong: #f3e2ff;
  --radius-xl: 14px;
  --radius-lg: 10px;
  --radius-md: 6px;
  --shell: 1120px;
  --display-font: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --body-font: "Avenir Next", "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  --bg: #f4ecfb;
  --bg-page: #efe4fa;
  --bg-page-end: #e7dbf4;
  --page-glow: rgba(162, 118, 217, 0.2);
  --header-band: rgba(58, 34, 87, 0.98);
  --header-line: rgba(255, 255, 255, 0.1);
  --footer-band: #ddd0ec;
  --footer-line: rgba(89, 54, 122, 0.18);
  --footer-ink: #38204f;
  --footer-muted: #5c466f;
  --paper: rgba(255, 255, 255, 0.72);
  --paper-strong: rgba(255, 255, 255, 0.88);
  --paper-soft: rgba(255, 255, 255, 0.56);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --ink: #29173a;
  --muted: #5c466f;
  --line: rgba(89, 54, 122, 0.16);
  --accent: #7a4db8;
  --accent-strong: #512d7d;
  --accent-soft: rgba(122, 77, 184, 0.14);
  --shadow: 0 22px 48px rgba(86, 53, 121, 0.12);
  --header-ink: #fcf8ff;
  --header-nav: rgba(248, 241, 255, 0.84);
  --header-nav-hover: #ffffff;
  --header-nav-active: #ffffff;
  --header-nav-active-bg: rgba(255, 255, 255, 0.14);
  --header-nav-active-border: rgba(255, 255, 255, 0.18);
  --brand-mark-bg: rgba(255, 255, 255, 0.18);
  --brand-mark-border: rgba(255, 255, 255, 0.12);
  --nav-underline: rgba(255, 255, 255, 0.92);
  --button-text: #fffaff;
  --chip-bg: rgba(119, 82, 161, 0.08);
  --chip-border: rgba(89, 54, 122, 0.12);
  --chip-active-bg: rgba(122, 77, 184, 0.16);
  --chip-active-border: rgba(89, 54, 122, 0.24);
  --control-bg: rgba(255, 255, 255, 0.72);
  --control-border: rgba(89, 54, 122, 0.18);
  --control-divider: rgba(89, 54, 122, 0.1);
  --link-strong: #5d3596;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, var(--page-glow), transparent 28rem),
    linear-gradient(180deg, var(--bg-page) 0%, var(--bg-page) 18rem, var(--bg-page-end) 100%);
  font-family: var(--body-font);
  line-height: 1.65;
  transition: background 220ms ease, color 220ms ease;
}

a {
  color: inherit;
  text-underline-offset: 0.16em;
}

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

.shell {
  width: min(calc(100% - 2rem), var(--shell));
  margin: 0 auto;
}

.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;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 24rem;
  height: 24rem;
  border-radius: 24px;
  filter: blur(30px);
  opacity: 0.08;
}

.ambient-left {
  top: -8rem;
  left: -10rem;
  background: rgba(139, 77, 255, 0.32);
}

.ambient-right {
  top: 14rem;
  right: -8rem;
  background: rgba(91, 48, 178, 0.26);
}

.site-header,
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-header-band {
  position: relative;
  background: var(--header-band);
  border-bottom: 1px solid var(--header-line);
  box-shadow: 0 14px 34px rgba(4, 1, 11, 0.18);
}

.site-footer-band {
  position: relative;
  margin-top: 1.35rem;
  background: var(--footer-band);
  border-top: 1px solid var(--footer-line);
  box-shadow: none;
}

.site-header {
  padding: 0.95rem 0;
}

.site-footer {
  padding: 0.95rem 0 1.1rem;
  color: var(--footer-muted);
  font-size: 0.72rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.3rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 8px;
  background: var(--brand-mark-bg);
  border: 1px solid var(--brand-mark-border);
  color: var(--header-ink);
  font-weight: 700;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--header-ink);
}

.site-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
}

.site-nav {
  display: inline-flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--header-nav);
  padding: 0.48rem 0.78rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.site-nav a.is-active,
.site-nav a:hover {
  color: var(--header-nav-hover);
}

.site-nav a.is-active {
  color: var(--header-nav-active);
  background: var(--header-nav-active-bg);
  border-color: var(--header-nav-active-border);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.28rem;
  height: 1px;
  background: var(--nav-underline);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms ease;
}

.site-nav a.is-active::after,
.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

#page-content {
  padding: 4rem 0 2rem;
}

.hero,
.page-hero,
.section-block {
  margin-bottom: 2rem;
}

.hero-grid,
.split-copy,
.section-grid,
.card-grid {
  display: grid;
  gap: 1.2rem;
}

.hero-grid,
.split-copy {
  grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.9fr);
}

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

.hero-stack,
.home-focus,
.home-summary,
.site-footer-main,
.site-footer-nav,
.contact-strip,
.social-icon-list {
  display: flex;
  gap: 1rem;
}

.hero-stack,
.home-focus,
.home-summary {
  flex-direction: column;
}

.site-footer-main,
.contact-strip,
.social-icon-list {
  align-items: center;
  flex-wrap: wrap;
}

.site-footer-main {
  justify-content: center;
  gap: 0.65rem;
}

.site-footer-nav,
.social-icon-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer-nav {
  gap: 0.55rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.08;
}

h1,
h2 {
  font-family: var(--display-font);
  letter-spacing: -0.04em;
}

h1 {
  max-width: 13ch;
  font-size: clamp(3rem, 8vw, 6rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

h3,
h4 {
  font-size: 1.2rem;
}

.eyebrow,
.card-index {
  margin: 0 0 0.85rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
}

.section-intro,
.hero-copy,
.meta,
.hero-panel,
.card p,
.empty-state,
.page-intro,
.prose {
  color: var(--muted);
}

.hero-panel,
.card,
.timeline-item,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero-panel,
.card,
.timeline-item,
.empty-state {
  padding: 1.4rem;
}

.post-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper-soft);
  box-shadow: none;
  padding: 0.95rem 1rem;
}

.button-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--button-text);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(139, 77, 255, 0.2);
}

.button-secondary {
  background: var(--paper-soft);
  border: 1px solid var(--control-border);
  color: var(--ink);
  box-shadow: none;
}


.panel-label {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.panel-value {
  margin-top: 0.65rem;
  font-family: var(--display-font);
  font-size: 1.9rem;
}

.panel-copy {
  color: var(--muted);
}

.home-heading {
  max-width: 42rem;
}

.home-hero {
  gap: 1.4rem;
  max-width: 68rem;
  margin: 0 auto;
}

.home-hero-copy {
  justify-content: center;
}

.home-identity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.home-identity-mark {
  display: inline-grid;
  place-items: center;
  width: 4.8rem;
  height: 4.8rem;
  border: 1px solid rgba(240, 224, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at top, rgba(222, 188, 255, 0.18), transparent 60%),
    rgba(251, 246, 255, 0.06);
  color: var(--accent-strong);
  font-family: var(--display-font);
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow);
}

.home-identity-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.home-identity-name {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.home-identity-meta {
  margin: 0;
  color: var(--muted);
}

.home-callout {
  position: absolute;
  top: 50%;
  left: calc(100% + 0.55rem);
  transform: translateY(-50%);
  min-height: 0;
  pointer-events: none;
}

.home-callout-message {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  margin: 0;
  padding: 0.28rem 0.65rem;
  border: 1px solid rgba(221, 194, 255, 0.24);
  border-radius: 999px;
  background: rgba(89, 57, 133, 0.96);
  color: var(--accent-strong);
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(8, 4, 14, 0.18);
}

.home-callout-message::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -0.36rem;
  width: 0.62rem;
  height: 0.62rem;
  border-left: 1px solid rgba(221, 194, 255, 0.24);
  border-bottom: 1px solid rgba(221, 194, 255, 0.24);
  background: rgba(89, 57, 133, 0.96);
  transform: translateY(-50%) rotate(45deg);
}

.home-focus {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.home-focus-label {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
}

.home-focus-copy,
.site-footer-copy,
.site-footer-note {
  margin: 0;
}

.site-footer-copy,
.site-footer-note {
  color: var(--footer-muted);
  line-height: 1.3;
}

.site-footer-copy {
  color: var(--footer-ink);
}

.site-footer-note {
  font-size: 0.96em;
}

.home-summary {
  max-width: 46rem;
}

.home-summary p {
  margin: 0;
}

.contact-strip {
  gap: 1.1rem;
}

.social-icon-list {
  gap: 0.75rem;
}

.home-social-row {
  justify-content: flex-end;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--ink);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.social-icon-link:hover,
.social-icon-link:focus-visible {
  border-color: var(--chip-active-border);
  background: var(--chip-active-bg);
  color: var(--ink);
  transform: translateY(-1px);
}

.social-icon-link svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.email-copy-button {
  font: inherit;
  cursor: pointer;
}

.email-copy-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.obfuscated-email {
  color: var(--ink);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

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

.explore-card h3 {
  margin-bottom: 0.4rem;
}

.tag-list {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.tag-list li,
.inline-tags span,
.tag-link {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.inline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag-link:hover,
.tag-link:focus-visible,
.tag-link.is-active {
  color: var(--ink);
  border-color: var(--chip-active-border);
  background: var(--chip-active-bg);
}

.compact-list {
  margin: 0.9rem 0 0;
  padding-left: 1.15rem;
}

.compact-list li + li {
  margin-top: 0.45rem;
}

.post-card + .post-card {
  margin-top: 1.2rem;
}

.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem);
  gap: 1.5rem;
  align-items: start;
}

.blog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 1.5rem;
  margin-top: 0.75rem;
}

.blog-toolbar-spacer {
  display: inline-block;
  width: 1px;
  height: 1px;
}

.blog-filter-panel {
  display: grid;
  gap: 0.55rem;
}

.blog-filter-label,
.blog-results-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-heading {
  max-width: 42rem;
}

.page-heading h1 {
  max-width: 100%;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
}

.page-intro {
  margin: 0.9rem 0 0;
  font-size: 1.02rem;
}

.blog-filter-label {
  font-weight: 700;
}

.blog-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 3rem;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-md);
  background: var(--control-bg);
  overflow: hidden;
}

.blog-filter:focus-within {
  border-color: var(--chip-active-border);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.blog-filter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 100%;
  color: var(--muted);
  border-right: 1px solid var(--control-divider);
}

.blog-filter-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-filter-input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.blog-filter-input::placeholder {
  color: var(--muted);
}

.blog-filter-input:focus {
  outline: none;
}

.post-link {
  color: var(--ink);
  text-decoration: none;
}

.post-link:hover,
.post-link:focus-visible {
  color: var(--ink);
}

.post-title {
  max-width: 18ch;
  margin-top: 0.45rem;
}

.post-detail {
  max-width: 44rem;
  margin-bottom: 2rem;
}

.legal-page {
  max-width: 44rem;
  margin-bottom: 2rem;
}

.legal-section + .legal-section {
  margin-top: 1.4rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--ink);
}

.prose h1,
.prose h2,
.prose h3 {
  font-size: 1.3rem;
  margin-top: 1.2rem;
}

.prose p,
.prose ul {
  margin: 0.9rem 0;
}

.timeline-list {
  display: grid;
  gap: 1rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--header-ink);
  cursor: pointer;
}

.theme-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 3.95rem;
  min-width: 3.95rem;
  height: 2.15rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.theme-toggle-thumb {
  position: absolute;
  top: 0.18rem;
  left: 0.2rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--header-ink);
  box-shadow: 0 8px 18px rgba(8, 4, 14, 0.24);
  transition: transform 180ms ease, background 180ms ease;
}

html[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(1.96rem);
}

.theme-toggle-icon {
  position: relative;
  z-index: 1;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  transition: opacity 180ms ease, transform 180ms ease;
}

.theme-toggle-icon-dark {
  border: 1.5px solid currentColor;
  background: currentColor;
  opacity: 0.95;
}

.theme-toggle-icon-light {
  border: 1.5px solid currentColor;
  box-shadow: 0 0 0 0.12rem transparent;
  opacity: 0.72;
}

html[data-theme="light"] .theme-toggle-icon-dark {
  opacity: 0.5;
}

html[data-theme="light"] .theme-toggle-icon-light {
  opacity: 1;
  transform: scale(1.05);
}

.text-link {
  color: var(--link-strong);
  font-weight: 700;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--link-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover,
.text-button:focus-visible,
.text-link:hover,
.button-link:hover,
.button-link:focus-visible {
  filter: brightness(1.06);
}

.prose a {
  color: var(--link-strong);
}

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

@media (max-width: 900px) {
  .hero-grid,
  .blog-hero,
  .split-copy,
  .section-grid,
  .card-grid,
  .site-header,
  .site-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: center;
  }

  h1 {
    max-width: 100%;
  }


  .site-footer-main,
  .site-footer-nav {
    justify-content: center;
  }

  .blog-filter {
    width: 100%;
  }

  .blog-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 0.9rem 1rem;
  }

  .site-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .home-explore-grid {
    grid-template-columns: 1fr;
  }

  .home-identity-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .home-social-row {
    justify-content: flex-start;
  }

  .email-copy-button span {
    white-space: normal;
  }

  .home-identity-mark {
    width: 4.2rem;
    height: 4.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .theme-toggle-thumb,
  .theme-toggle-icon {
    transition: none;
  }
}
