:root {
  --bg: #edf2f8;
  --bg-deep: #dfe8f5;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --surface-muted: rgba(233, 239, 248, 0.88);
  --ink: #172538;
  --muted: #64748b;
  --accent: #315b8c;
  --accent-deep: #162d4b;
  --accent-soft: #dce7f5;
  --highlight: #b98558;
  --line: rgba(23, 37, 56, 0.11);
  --shadow: 0 28px 70px rgba(20, 31, 51, 0.13);
  --hero-start: #10223a;
  --hero-end: #274a73;
  --hero-glow: rgba(123, 170, 233, 0.18);
  --hero-wire: rgba(255, 255, 255, 0.09);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1180px;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --bg-deep: #0f1729;
  --surface: rgba(17, 27, 44, 0.84);
  --surface-strong: rgba(18, 29, 48, 0.96);
  --surface-muted: rgba(27, 40, 63, 0.88);
  --ink: #e7eefb;
  --muted: #9fb0ca;
  --accent: #77a8e7;
  --accent-deep: #bdd8ff;
  --accent-soft: rgba(119, 168, 231, 0.16);
  --highlight: #e7b07b;
  --line: rgba(189, 216, 255, 0.12);
  --shadow: 0 28px 74px rgba(3, 9, 18, 0.46);
  --hero-start: #071321;
  --hero-end: #193455;
  --hero-glow: rgba(89, 137, 206, 0.18);
  --hero-wire: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  color: var(--ink);
  line-height: 1.72;
  background:
    radial-gradient(circle at top left, rgba(49, 91, 140, 0.18), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(185, 133, 88, 0.14), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  transition: background-color 220ms ease, color 220ms ease;
}

body.modal-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -100px;
  right: -80px;
  background: rgba(49, 91, 140, 0.22);
}

body::after {
  left: -90px;
  bottom: -120px;
  background: rgba(185, 133, 88, 0.18);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

.site-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1rem 0 2.6rem;
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: var(--surface-strong);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, opacity 220ms ease, box-shadow 220ms ease;
  will-change: transform, opacity;
}

.site-header.is-hidden {
  transform: translateY(calc(-100% - 1.35rem));
  opacity: 0;
  pointer-events: none;
}

.brand-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-avatar {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(49, 91, 140, 0.95), rgba(185, 133, 88, 0.9));
  box-shadow: 0 12px 24px rgba(20, 31, 51, 0.18);
}

.brand-avatar-button {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.brand-avatar-button:hover,
.brand-avatar-button:focus-visible {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 16px 28px rgba(20, 31, 51, 0.24);
}

.brand-avatar-button:focus-visible {
  outline: 2px solid rgba(49, 91, 140, 0.45);
  outline-offset: 3px;
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.avatar-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.avatar-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 18, 0.8);
  backdrop-filter: blur(10px);
}

.avatar-modal-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 640px);
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  background: rgba(13, 20, 31, 0.92);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
}

.avatar-modal-image {
  display: block;
  width: 100%;
  max-height: min(78vh, 760px);
  border-radius: 24px;
  object-fit: contain;
}

.avatar-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  transition: background-color 180ms ease, transform 180ms ease;
}

.avatar-modal-close:hover,
.avatar-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.04);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.brand-text strong,
h1,
h2,
h3 {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

.brand-text strong {
  font-size: 1.18rem;
  letter-spacing: 0.01em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.85rem;
}

.header-center {
  display: flex;
  justify-content: center;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.site-nav a {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(49, 91, 140, 0.1);
  color: var(--accent);
  transform: translateY(-1px);
}

.site-nav a.is-active {
  background: var(--accent);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

.mode-menu {
  position: relative;
}

.mode-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.9rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.mode-toggle:hover,
.mode-toggle:focus-visible,
.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(49, 91, 140, 0.08);
  border-color: rgba(49, 91, 140, 0.2);
  transform: translateY(-1px);
}

.mode-toggle[aria-expanded="true"],
.nav-toggle[aria-expanded="true"],
.nav-toggle.is-active {
  background: rgba(49, 91, 140, 0.12);
  border-color: rgba(49, 91, 140, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.action-icon-shell,
.nav-toggle-glyph {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 12px;
  background: rgba(49, 91, 140, 0.08);
  flex-shrink: 0;
}

.action-icon {
  width: 0.92rem;
  height: 0.92rem;
  fill: currentColor;
}

.action-label {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
}

.mode-caret {
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.mode-options {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  display: grid;
  gap: 0.35rem;
  min-width: 170px;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.mode-option {
  border: 0;
  border-radius: 12px;
  padding: 0.78rem 0.9rem;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.mode-option:hover,
.mode-option:focus-visible,
.mode-option.is-active {
  background: rgba(49, 91, 140, 0.1);
  color: var(--accent);
}

.nav-toggle {
  display: none;
}

.nav-toggle-glyph {
  gap: 0.16rem;
}

.nav-toggle-glyph span {
  display: block;
  width: 0.9rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-toggle .nav-toggle-label {
  white-space: nowrap;
}

html[data-theme="dark"] .action-icon-shell,
html[data-theme="dark"] .nav-toggle-glyph {
  background: rgba(189, 216, 255, 0.08);
}

.site-main {
  display: grid;
  gap: 1.55rem;
}

.hero-card,
.section-card,
.page-intro,
.post-card,
.contact-card,
.timeline-card,
.article-intro,
.article-content,
.wide-card,
.profile-card,
.tech-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.hero-card {
  padding: clamp(1.6rem, 4vw, 3.3rem);
  border-radius: var(--radius-xl);
  color: #eef5ff;
  background:
    radial-gradient(circle at 85% 18%, var(--hero-glow), transparent 22%),
    linear-gradient(135deg, var(--hero-start), var(--hero-end));
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, transparent 48.5%, var(--hero-wire) 48.5%, var(--hero-wire) 51.5%, transparent 51.5%, transparent 100%),
    repeating-linear-gradient(90deg, transparent 0 74px, var(--hero-wire) 74px 75px),
    repeating-linear-gradient(0deg, transparent 0 74px, var(--hero-wire) 74px 75px);
  opacity: 0.2;
}

.hero-card::after,
.quote-card::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 290px;
  height: 290px;
  border-radius: 42px;
  transform: rotate(18deg);
  background: rgba(255, 255, 255, 0.06);
}

.page-intro,
.section-card,
.post-card,
.contact-card,
.timeline-card,
.article-intro,
.article-content,
.wide-card {
  padding: clamp(1.3rem, 3vw, 1.9rem);
  border-radius: var(--radius-lg);
}

.profile-card,
.tech-panel {
  padding: 1.3rem;
  border-radius: var(--radius-lg);
}

.hero-card .profile-card,
.hero-card .tech-panel {
  background: rgba(8, 18, 32, 0.32);
  border-color: rgba(255, 255, 255, 0.12);
}

.hero-grid,
.panel-grid,
.split-grid,
.timeline-grid,
.contact-grid,
.post-list {
  display: grid;
  gap: 1.3rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.92fr);
  align-items: stretch;
}

.hero-side {
  display: grid;
  gap: 1rem;
}

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

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

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

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

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

.eyebrow,
.mini-label {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.78rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
}

.page-intro .eyebrow,
.section-card .eyebrow,
.contact-card .eyebrow,
.post-card .eyebrow,
.timeline-card .eyebrow,
.article-intro .eyebrow,
.wide-card .eyebrow {
  background: rgba(49, 91, 140, 0.12);
  color: var(--accent);
}

.mini-label {
  background: rgba(255, 255, 255, 0.1);
  color: #edf5ff;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 1.02;
}

h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.48rem, 3vw, 2.15rem);
  line-height: 1.14;
}

h3 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  max-width: 54rem;
  font-size: 1.07rem;
}

.hero-copy-wrap {
  position: relative;
  z-index: 1;
}

.hero-card .lead,
.hero-card .hero-copy,
.profile-card,
.profile-card li,
.terminal-screen,
.tech-chip {
  color: rgba(237, 245, 255, 0.92);
}

.detail-list,
.article-content ul,
.article-content ol {
  margin: 0;
  padding-left: 1.15rem;
}

.detail-list li,
.article-content li {
  margin-bottom: 0.65rem;
}

.detail-list li::marker,
.profile-list li::marker {
  color: var(--highlight);
}

.profile-list strong {
  color: #ffffff;
}

.terminal-frame {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(6, 14, 27, 0.4);
}

.terminal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
}

.terminal-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.terminal-dot.red {
  background: #ff7b7b;
}

.terminal-dot.amber {
  background: #f0c069;
}

.terminal-dot.green {
  background: #69d39a;
}

.terminal-label {
  margin-left: auto;
  color: rgba(237, 245, 255, 0.74);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-screen {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 0.95rem 1.15rem;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.9rem;
}

.code-line {
  display: block;
}

.code-line.prompt::before {
  content: ">";
  margin-right: 0.45rem;
  color: var(--highlight);
}

.chip-cloud,
.signal-grid,
.hero-actions,
.button-row,
.badge-row,
.meta-cluster,
.post-labels,
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.chip-cloud {
  margin-top: 1rem;
}

.tech-chip,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.tech-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
}

.signal-node {
  position: relative;
  width: 100%;
  min-height: 0.95rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(123, 170, 233, 0.38));
}

.signal-node::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--highlight);
  box-shadow: 0 0 14px rgba(185, 133, 88, 0.5);
}

.hero-actions,
.button-row {
  margin-top: 1.45rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible,
.text-link:hover,
.text-link:focus-visible,
.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  background: #ffffff;
  color: var(--accent-deep);
  box-shadow: 0 16px 28px rgba(7, 15, 27, 0.2);
}

.button.secondary {
  color: #eef5ff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.button.ghost {
  color: var(--accent);
  border: 1px solid rgba(49, 91, 140, 0.18);
  background: rgba(49, 91, 140, 0.06);
}

.badge {
  background: var(--accent-soft);
  color: var(--accent);
}

.filter-panel {
  background: linear-gradient(135deg, var(--surface-strong), var(--surface-muted));
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.25rem;
}

.filter-pill {
  border: 1px solid rgba(49, 91, 140, 0.15);
  border-radius: 999px;
  padding: 0.68rem 1rem;
  background: rgba(49, 91, 140, 0.06);
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.filter-pill:hover,
.filter-pill:focus-visible {
  transform: translateY(-2px);
  background: rgba(49, 91, 140, 0.12);
  border-color: rgba(49, 91, 140, 0.28);
}

.filter-pill.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 14px 24px rgba(49, 91, 140, 0.18);
}

.filter-state {
  margin: 1rem 0 0;
  color: var(--muted);
  font-weight: 700;
}

.filter-card {
  height: 100%;
}

.filter-empty {
  margin: 0;
  padding: 1rem 1.2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: rgba(49, 91, 140, 0.05);
  color: var(--muted);
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 700;
}

.post-meta {
  margin-bottom: 0.7rem;
  color: var(--highlight);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.post-card h2 a {
  transition: color 180ms ease;
}

.journal-cover {
  margin: 0 0 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(225, 235, 247, 0.95), rgba(240, 245, 252, 0.92));
  box-shadow: 0 18px 36px rgba(20, 31, 51, 0.12);
}

.journal-cover--listing {
  margin: -1.9rem -1.9rem 1.15rem;
  border-radius: 26px 26px 0 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.journal-cover-image {
  display: block;
  width: 100%;
  height: auto;
}

.journal-cover-generated {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(230px, 0.9fr);
  gap: 1rem;
  min-height: 320px;
  padding: 1.35rem;
  background:
    linear-gradient(180deg, rgba(112, 162, 213, 0.14), transparent 18%),
    linear-gradient(0deg, rgba(112, 162, 213, 0.14), transparent 16%),
    linear-gradient(180deg, rgba(251, 252, 255, 0.98), rgba(236, 244, 252, 0.94));
}

.journal-cover--listing .journal-cover-generated {
  min-height: 290px;
  padding: 1.1rem 1.2rem 1.2rem;
}

.journal-cover-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.journal-cover-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(98, 145, 198, 0.18);
  color: #2f5b8b;
  font-size: 0.85rem;
  font-weight: 700;
}

.journal-cover-title {
  margin: 0;
  color: #1c304d;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  line-height: 1.08;
}

.journal-cover--listing .journal-cover-title {
  font-size: 1.7rem;
}

.journal-cover-subtitle {
  margin: 0;
  color: #425972;
  font-size: 1rem;
  line-height: 1.6;
}

.journal-cover-note {
  max-width: 25rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 28px rgba(35, 58, 87, 0.08);
}

.journal-cover-note-title {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: #214b7d;
  font-weight: 700;
}

.journal-cover-note p {
  margin: 0;
  color: #304862;
  font-size: 0.98rem;
  line-height: 1.58;
}

.journal-cover-visual {
  position: relative;
  min-height: 100%;
  border-radius: 24px;
  background:
    radial-gradient(circle at 72% 18%, rgba(241, 204, 113, 0.78), rgba(241, 204, 113, 0.78) 15%, transparent 16%),
    linear-gradient(180deg, rgba(69, 116, 170, 0.15), rgba(69, 116, 170, 0));
}

.cover-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.2px);
}

.cover-orb--one {
  top: 1rem;
  right: 2rem;
  width: 5rem;
  height: 5rem;
  background: rgba(244, 207, 120, 0.95);
}

.cover-orb--two {
  left: 1.2rem;
  bottom: 1.4rem;
  width: 4rem;
  height: 4rem;
  background: rgba(99, 151, 210, 0.18);
}

.cover-station {
  position: absolute;
  right: 3rem;
  bottom: 3.3rem;
  width: 7.6rem;
  height: 7rem;
}

.station-screen {
  position: absolute;
  top: 0;
  left: 1.2rem;
  width: 5rem;
  height: 3.8rem;
  border: 4px solid #2e5f95;
  border-radius: 16px;
  background: #f6f1e4;
}

.station-screen::before,
.station-screen::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  height: 0.22rem;
  border-radius: 999px;
}

.station-screen::before {
  top: 0.75rem;
  width: 2rem;
  background: #2f5f92;
}

.station-screen::after {
  top: 1.45rem;
  width: 1.3rem;
  background: #c08a52;
}

.station-base {
  position: absolute;
  bottom: 1.55rem;
  left: 0;
  width: 7.5rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #336699;
}

.station-leg {
  position: absolute;
  bottom: 0;
  width: 0.95rem;
  height: 2.2rem;
  border-radius: 999px;
  background: #28578b;
}

.station-leg--left {
  left: 1rem;
}

.station-leg--right {
  right: 1rem;
}

.cover-signal {
  position: absolute;
  border-radius: 999px;
  background: rgba(72, 125, 181, 0.18);
}

.cover-signal--one {
  left: 0.8rem;
  right: 8.6rem;
  bottom: 3.25rem;
  height: 0.95rem;
}

.cover-signal--two {
  left: 1.6rem;
  right: 6.5rem;
  bottom: 1rem;
  height: 0.6rem;
}

.journal-cover--connection .journal-cover-generated,
.journal-cover--achievement .journal-cover-generated {
  background:
    linear-gradient(180deg, rgba(38, 73, 120, 0.22), transparent 22%),
    linear-gradient(0deg, rgba(38, 73, 120, 0.18), transparent 16%),
    linear-gradient(180deg, rgba(252, 249, 239, 0.98), rgba(246, 242, 230, 0.95));
}

.journal-cover--faith .journal-cover-generated,
.journal-cover--future .journal-cover-generated {
  background:
    linear-gradient(180deg, rgba(44, 74, 117, 0.22), transparent 20%),
    linear-gradient(0deg, rgba(44, 74, 117, 0.18), transparent 14%),
    linear-gradient(180deg, rgba(252, 249, 242, 0.98), rgba(245, 239, 228, 0.95));
}

.journal-cover--labs .journal-cover-generated,
.journal-cover--systems .journal-cover-generated,
.journal-cover--resilience .journal-cover-generated {
  background:
    linear-gradient(180deg, rgba(56, 92, 138, 0.2), transparent 20%),
    linear-gradient(0deg, rgba(56, 92, 138, 0.16), transparent 14%),
    linear-gradient(180deg, rgba(247, 249, 253, 0.98), rgba(235, 242, 249, 0.95));
}

.journal-cover--listing .journal-cover-note {
  padding: 0.9rem;
}

.journal-cover--listing .journal-cover-note p {
  font-size: 0.92rem;
}

.post-card h2 a:hover,
.post-card h2 a:focus-visible {
  color: var(--accent);
}

.contact-link {
  display: inline-block;
  font-size: clamp(1.18rem, 2.4vw, 1.62rem);
  font-weight: 700;
  color: var(--accent);
  word-break: break-word;
}

.contact-form-card {
  position: relative;
}

.contact-form-card::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(119, 168, 231, 0.18), transparent 68%);
  pointer-events: none;
}

.contact-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  margin-top: 1.3rem;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-field {
  display: grid;
  gap: 0.5rem;
}

.contact-field span {
  color: var(--ink);
  font-weight: 700;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

html[data-theme="dark"] .contact-field input,
html[data-theme="dark"] .contact-field textarea {
  background: rgba(12, 22, 37, 0.7);
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--muted);
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: rgba(49, 91, 140, 0.4);
  box-shadow: 0 0 0 4px rgba(49, 91, 140, 0.12);
}

.contact-field textarea {
  min-height: 200px;
  resize: vertical;
}

.contact-field--full {
  grid-column: 1 / -1;
}

.contact-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.contact-word-count,
.contact-status,
.contact-footnote {
  margin: 0;
}

.contact-word-count {
  color: var(--muted);
  font-weight: 700;
}

.contact-word-count.is-over-limit {
  color: #bf4d4d;
}

.contact-status {
  color: var(--accent);
  font-weight: 700;
  text-align: right;
}

.contact-footnote {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.wide-card {
  background: linear-gradient(135deg, var(--surface-strong), var(--surface-muted));
}

.quote-card {
  color: #edf5ff;
  background:
    radial-gradient(circle at 82% 18%, rgba(123, 170, 233, 0.14), transparent 20%),
    linear-gradient(135deg, var(--hero-start), var(--hero-end));
}

.quote-card .eyebrow,
.quote-card .text-link {
  color: #edf5ff;
}

.quote-card .eyebrow {
  background: rgba(255, 255, 255, 0.12);
}

.article-shell {
  display: grid;
  gap: 1.3rem;
}

.article-intro {
  background: linear-gradient(135deg, var(--surface-strong), var(--surface-muted));
}

.article-content {
  background: var(--surface-strong);
}

.article-content p,
.article-content li {
  max-width: 72ch;
}

.article-content h2 {
  margin-top: 1.65rem;
}

.article-content h3 {
  margin-top: 1.35rem;
}

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--highlight);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(185, 133, 88, 0.08);
  color: var(--ink);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.45rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.footer-branding {
  max-width: 41rem;
}

.footer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.footer-title {
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: var(--ink);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
}

.footer-socials {
  align-items: center;
  justify-content: flex-end;
}

.social-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 82px;
  color: var(--ink);
  transition: transform 180ms ease;
}

.social-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.7rem;
  height: 3.7rem;
  border-radius: 16px;
  color: #ffffff;
  box-shadow: 0 18px 28px rgba(23, 37, 56, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.social-tile:hover .social-badge,
.social-tile:focus-visible .social-badge {
  transform: translateY(-3px);
  box-shadow: 0 22px 34px rgba(23, 37, 56, 0.24);
  filter: saturate(1.08);
}

.social-tile.facebook .social-badge {
  background: linear-gradient(180deg, #5ea3ff 0%, #1877f2 100%);
}

.social-tile.instagram .social-badge {
  background: linear-gradient(135deg, #ffd86f 0%, #f58529 22%, #dd2a7b 54%, #8134af 76%, #515bd4 100%);
}

.social-tile.threads .social-badge {
  background: linear-gradient(180deg, #202020 0%, #050505 100%);
}

.social-icon {
  width: 1.38rem;
  height: 1.38rem;
  fill: currentColor;
}

.threads-icon {
  width: 1.52rem;
  height: 1.52rem;
}

.social-name {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.footer-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

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

@media (max-width: 1080px) {
  .hero-grid,
  .panel-grid,
  .split-grid,
  .post-list {
    grid-template-columns: 1fr;
  }

  .timeline-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-cover-generated {
    grid-template-columns: 1fr;
  }

  .journal-cover-visual {
    min-height: 220px;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    border-radius: 30px;
    row-gap: 0.8rem;
  }

  .header-center {
    grid-column: 1 / -1;
    order: 3;
    justify-content: stretch;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.75rem;
    margin-top: 0.2rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, var(--surface-strong), var(--surface-muted));
    box-shadow: 0 18px 34px rgba(20, 31, 51, 0.1);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(49, 91, 140, 0.08);
    background: rgba(49, 91, 140, 0.06);
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  html[data-theme="dark"] .site-nav a {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(189, 216, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .brand-shell {
    max-width: calc(100vw - 8rem);
  }

  .mode-options {
    min-width: 180px;
  }

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

  .footer-actions {
    align-items: flex-start;
  }

  .footer-socials {
    justify-content: flex-start;
  }

  .journal-cover--listing {
    margin-left: -1.15rem;
    margin-right: -1.15rem;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 1rem), var(--max-width));
  }

  .timeline-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    grid-template-columns: 1fr;
  }

  .site-header {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.95rem;
    border-radius: 30px;
  }

  .header-center {
    grid-column: auto;
    order: 3;
  }

  .header-actions {
    order: 2;
    width: 100%;
    justify-content: flex-end;
    gap: 0.55rem;
  }

  .brand-shell {
    width: 100%;
    max-width: none;
  }

  .mode-toggle,
  .nav-toggle {
    min-width: 4.5rem;
    min-height: 3.5rem;
    padding: 0.58rem 0.72rem;
    border-radius: 18px;
    flex-direction: column;
    gap: 0.34rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.18));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  .action-icon-shell,
  .nav-toggle-glyph {
    width: 1.72rem;
    height: 1.72rem;
    border-radius: 14px;
  }

  .action-label {
    font-size: 0.63rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .mode-caret {
    display: none;
  }

  .mode-options {
    top: calc(100% + 0.45rem);
    min-width: 11rem;
  }

  .contact-form-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-status {
    text-align: left;
  }

  h1 {
    font-size: 2.5rem;
  }

  .hero-card,
  .page-intro,
  .section-card,
  .post-card,
  .contact-card,
  .timeline-card,
  .article-intro,
  .article-content,
  .wide-card,
  .profile-card,
  .tech-panel {
    padding: 1.15rem;
  }

  .site-header {
    padding: 0.95rem;
  }

  .brand-text strong {
    font-size: 1rem;
  }

  .brand-avatar {
    width: 2.75rem;
    height: 2.75rem;
  }

  .brand-text strong,
  .brand-text small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .avatar-modal-panel {
    width: min(94vw, 560px);
    padding: 0.75rem;
    border-radius: 24px;
  }

  .avatar-modal-image {
    border-radius: 18px;
  }

  .journal-cover-title {
    font-size: 1.55rem;
  }

  .journal-cover-note {
    padding: 0.9rem;
  }

  .cover-station {
    right: 1.8rem;
    bottom: 2rem;
    transform: scale(0.88);
    transform-origin: bottom right;
  }

  html[data-theme="dark"] .mode-toggle,
  html[data-theme="dark"] .nav-toggle {
    background: linear-gradient(180deg, rgba(18, 29, 46, 0.96), rgba(10, 19, 32, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
}
