*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: light;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", ui-monospace, monospace;

  --bg: #f1e3d4;
  --bg-deep: #e7d4c0;
  --card: #fff8f1;
  --panel: #f8eee3;
  --panel-alt: #f1e1d1;
  --border: #d8c0ab;
  --border-soft: rgba(125, 103, 87, 0.16);
  --text: #2d1d14;
  --muted: #6f594b;
  --muted-2: #8c7363;
  --primary: #a35d2a;
  --secondary: #7d6757;
  --accent: #c56a2b;
  --accent-2: #7d431f;
  --bg-glow-1: rgba(197, 112, 40, 0.16);
  --bg-glow-2: rgba(255, 255, 255, 0.42);
  --bg-glow-3: rgba(129, 80, 44, 0.11);
  --vignette: rgba(73, 41, 22, 0.10);
  --grain-opacity: 0.04;
  --surface-soft: rgba(255, 255, 255, 0.54);
  --surface-strong: #f2e4d6;
  --surface-hover: #f4e7d9;
  --surface-contrast: #ead7c3;
  --shadow: 0 32px 90px rgba(78, 45, 22, 0.16);
  --shadow-strong: 0 12px 24px rgba(78, 45, 22, 0.12);
  --banner-base: #d7bda4;
  --banner-overlay-1: linear-gradient(180deg, rgba(73, 41, 25, 0.05), rgba(73, 41, 25, 0.22));
  --banner-overlay-2: linear-gradient(90deg, rgba(73, 41, 25, 0.16), transparent 28%, transparent 70%, rgba(73, 41, 25, 0.10));
  --tile-bg: #f7ebde;
  --tile-bg-hover: #f0dfcf;
  --tile-bg-soft: #ecdac8;
  --tile-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 18px rgba(78, 45, 22, 0.07);
  --tile-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.56), 0 16px 30px rgba(78, 45, 22, 0.14);
  --chip-bg: rgba(255, 255, 255, 0.56);
  --chip-bg-hover: rgba(163, 93, 42, 0.12);
  --chip-border: rgba(125, 103, 87, 0.22);
  --chip-border-hover: rgba(163, 93, 42, 0.38);
  --icon-muted: #826858;
  --section-label: #946b50;
  --status: #2f8f5b;
  --control-bg: rgba(255, 248, 241, 0.74);
  --control-text: #40291f;
  --control-border: rgba(125, 93, 73, 0.2);
  --control-shadow: 0 16px 28px rgba(78, 45, 22, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-theme="dark"] {
  color-scheme: dark;
  /* elegant azure → cyan: cool, atmospheric, deliberately not the overused violet */
  --bg: #0a0e18;
  --bg-deep: #05080f;
  --card: #0f1421;
  --panel: #101726;
  --panel-alt: #0b101b;
  --border: #1e2740;
  --border-soft: rgba(255, 255, 255, 0.05);
  --text: #e9eefc;
  --muted: #8e9bbd;
  --muted-2: #6c789e;
  --primary: #79b4ff;
  --secondary: #97a4c8;
  --accent: #4f9cf9;
  --accent-2: #56c2e6;
  --bg-glow-1: rgba(79, 156, 249, 0.18);
  --bg-glow-2: rgba(86, 194, 230, 0.10);
  --bg-glow-3: rgba(99, 140, 255, 0.07);
  --vignette: rgba(2, 4, 9, 0.74);
  --grain-opacity: 0.05;
  --surface-soft: rgba(255, 255, 255, 0.022);
  --surface-strong: #0f1421;
  --surface-hover: #161f31;
  --surface-contrast: #11182699;
  --shadow: 0 40px 120px rgba(0, 0, 0, 0.72);
  --shadow-strong: 0 12px 24px rgba(0, 0, 0, 0.2);
  --banner-base: #0a0e1a;
  --banner-overlay-1: linear-gradient(180deg, rgba(7, 10, 18, 0.0), rgba(7, 10, 18, 0.36));
  --banner-overlay-2: linear-gradient(90deg, rgba(7, 10, 18, 0.30), transparent 30%, transparent 70%, rgba(7, 10, 18, 0.22));
  --tile-bg: #111726;
  --tile-bg-hover: #161f32;
  --tile-bg-soft: #0d1320;
  --tile-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 10px 24px rgba(0, 0, 0, 0.34);
  --tile-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px rgba(0, 0, 0, 0.52), 0 0 0 1px rgba(79, 156, 249, 0.16);
  --chip-bg: rgba(255, 255, 255, 0.025);
  --chip-bg-hover: rgba(79, 156, 249, 0.14);
  --chip-border: rgba(255, 255, 255, 0.06);
  --chip-border-hover: rgba(79, 156, 249, 0.48);
  --icon-muted: #8893b7;
  --section-label: #586394;
  --status: #4fd6a6;
  --control-bg: rgba(15, 20, 33, 0.82);
  --control-text: #e9eefc;
  --control-border: rgba(255, 255, 255, 0.08);
  --control-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 44px 16px 72px;
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}

/* atmosphere: layered glows + radial vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(820px 520px at 16% 8%, var(--bg-glow-1), transparent 60%),
    radial-gradient(700px 500px at 88% 4%, var(--bg-glow-2), transparent 58%),
    radial-gradient(900px 700px at 50% 112%, var(--bg-glow-3), transparent 60%),
    radial-gradient(1200px 900px at 50% 50%, transparent 55%, var(--vignette) 100%),
    linear-gradient(180deg, transparent, var(--bg-deep) 140%);
  transition: background 0.5s ease;
}

/* atmosphere: extremely subtle film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

main, .theme-toggle {
  position: relative;
  z-index: 2;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

::selection {
  background: rgba(163, 93, 42, 0.22);
  color: var(--text);
}

body[data-theme="dark"] ::selection {
  background: rgba(79, 156, 249, 0.30);
  color: var(--text);
}

.portfolio-wrap,
.page-shell {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: page-enter 520ms var(--ease) both;
}

.portfolio-wrap {
  max-width: 588px;
}

.page-shell {
  max-width: 780px;
}

/* ---------- hero / banner ---------- */
.banner {
  width: 100%;
  height: 224px;
  background: var(--banner-base);
  position: relative;
  overflow: hidden;
}

.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 38%, color-mix(in srgb, var(--card) 88%, transparent) 100%),
    var(--banner-overlay-1),
    var(--banner-overlay-2);
  pointer-events: none;
}

.banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 38%;
  display: block;
  filter: saturate(1.02) contrast(1.03);
  animation: banner-drift 24s ease-in-out infinite alternate;
}

body[data-theme="dark"] .banner-image {
  filter: saturate(0.92) contrast(1.05) brightness(0.92);
}

.profile-section {
  padding: 22px 26px 16px;
  background: var(--card);
  position: relative;
}

.username {
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  background: var(--accent);
  margin-left: 4px;
  border-radius: 1px;
  animation: blink 1.15s step-end infinite;
  vertical-align: middle;
  opacity: 0.85;
}

.real-name {
  font-size: 15px;
  color: var(--secondary);
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

/* asymmetric live status row */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.2px;
}

.hero-meta .dot-sep {
  opacity: 0.4;
}

.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--status) 70%, transparent);
  animation: pulse 2.6s ease-out infinite;
}

.title-line {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
  letter-spacing: 0.1px;
  line-height: 1.5;
}

.title-line strong {
  color: var(--secondary);
  font-weight: 600;
}

.tagline {
  font-size: 12.5px;
  color: var(--primary);
  margin-top: 12px;
  font-family: var(--font-mono);
  letter-spacing: -0.1px;
}

.tagline::before {
  content: "› ";
  opacity: 0.6;
}

.status-note {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-2);
  font-family: var(--font-mono);
  letter-spacing: 0.1px;
}

.status-note .rotator {
  color: var(--secondary);
  transition: opacity 0.45s ease;
}

.status-note .rotator.swap {
  opacity: 0;
}

.divider {
  height: 1px;
  margin: 14px 0 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 45%, transparent), color-mix(in srgb, var(--accent) 18%, transparent), transparent);
}

/* ---------- mosaic nav ---------- */
.portfolio-nav {
  display: block;
  position: relative;
}

.section-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--section-label);
  padding: 13px 22px 9px;
  background: var(--panel-alt);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.section-label .label-aside {
  letter-spacing: 1.4px;
  color: var(--muted-2);
  opacity: 0.7;
  text-transform: none;
}

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 7px;
  padding: 9px 10px 12px;
  background: var(--panel-alt);
}

.grid-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--tile-bg);
  box-shadow: var(--tile-shadow);
  overflow: hidden;
  transition: transform 0.32s var(--ease), background 0.32s ease, color 0.24s ease, box-shadow 0.32s var(--ease), border-color 0.24s ease;
  -webkit-tap-highlight-color: transparent;
}

/* soft directional sheen on hover */
.grid-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 45%);
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}

.grid-link:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  color: var(--primary);
  border-color: var(--chip-border-hover);
  box-shadow: var(--tile-shadow-hover);
}

.grid-link:hover::after {
  opacity: 1;
}

.grid-link:active {
  transform: translateY(-1px);
}

.grid-link:focus-visible {
  outline: none;
  border-color: var(--chip-border-hover);
  box-shadow: var(--tile-shadow-hover), 0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent);
}

.grid-link i {
  font-size: 17px;
  color: var(--icon-muted);
  transition: transform 0.32s var(--ease), color 0.24s ease;
}

.grid-link:hover i {
  transform: translateX(2px) translateY(-1px);
  color: var(--primary);
}

.svg-icon {
  width: 17px;
  height: 17px;
  opacity: 0.66;
  flex-shrink: 0;
  transition: transform 0.32s var(--ease), opacity 0.24s ease, color 0.24s ease;
  color: var(--icon-muted);
}

.grid-link:hover .svg-icon {
  opacity: 1;
  color: var(--primary);
  transform: translateY(-1px);
}

.mosaic-tile {
  min-height: 92px;
  align-items: flex-start;
  justify-content: flex-end;
  flex-direction: column;
  text-align: left;
  padding: 13px 14px;
}

.mosaic-tile:hover {
  transform: translateY(-3px);
}

.mosaic-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.1px;
  text-transform: lowercase;
  color: var(--text);
  transition: color 0.24s ease;
}

.grid-link:hover .mosaic-label {
  color: var(--primary);
}

/* hover-revealed build note / handle */
.mosaic-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2px;
  color: var(--muted-2);
  opacity: 0;
  max-height: 0;
  transform: translateY(4px);
  transition: opacity 0.32s ease, transform 0.32s var(--ease), max-height 0.32s ease;
  pointer-events: none;
}

.mosaic-tile:hover .mosaic-note {
  opacity: 0.85;
  max-height: 2.4em;
  transform: translateY(0);
}

.mosaic-index {
  position: absolute;
  top: 11px;
  right: 13px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1px;
  color: var(--muted-2);
  opacity: 0.5;
}

.tile-about .mosaic-label,
.tile-projects .mosaic-label {
  font-size: 17px;
}

.tile-wide {
  grid-column: span 4;
  min-height: 156px;
}

.tile-medium {
  grid-column: span 3;
  min-height: 124px;
}

.tile-compact {
  grid-column: span 2;
  min-height: 92px;
  background: var(--tile-bg-soft);
}

.tile-tall {
  grid-column: span 2;
  min-height: 156px;
}

.tile-left {
  align-items: flex-start;
  justify-content: flex-end;
  text-align: left;
}

.tile-center {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tile-center .mosaic-label,
.tile-center i,
.tile-center .svg-icon {
  margin-left: auto;
  margin-right: auto;
}

.tile-center .mosaic-label {
  font-size: 12px;
  letter-spacing: 0.1px;
}

.tile-about,
.tile-projects,
.tile-web3,
.tile-events,
.tile-social,
.tile-contact {
  gap: 7px;
}

.mosaic-grid > .tile-wide,
.mosaic-grid > .tile-medium,
.mosaic-grid > .tile-compact,
.mosaic-grid > .tile-tall {
  min-width: 0;
}

/* terminal footer under the mosaic */
.node-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 11px 22px 16px;
  background: var(--panel-alt);
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2px;
  color: var(--muted-2);
}

.node-footer span {
  opacity: 0.78;
}

.node-footer b {
  color: var(--secondary);
  font-weight: 500;
}

/* ---------- inner pages ---------- */
.page-top {
  padding: 24px 26px 18px;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--border);
}

.page-kicker {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--section-label);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 33px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 58ch;
}

.page-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.page-chip,
.page-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.page-link {
  color: var(--primary);
  text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent);
  text-underline-offset: 3px;
}

.page-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.page-chip {
  padding: 7px 13px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.2px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
}

.page-chip[href]:hover {
  color: var(--primary);
  border-color: var(--chip-border-hover);
  background: var(--chip-bg-hover);
  transform: translateY(-2px);
}

.page-content {
  padding: 22px 26px 26px;
}

.about-article {
  color: var(--text);
  font-size: 15px;
  line-height: 1.85;
  max-width: 68ch;
}

.about-article p {
  margin-bottom: 14px;
  color: var(--muted);
}

.about-article .lead {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 16px;
}

.bio-quote {
  margin: 18px 0 18px;
  padding: 4px 0 4px 16px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--secondary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  font-style: normal;
}

.closing {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--primary);
}

.about-signoff {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.2px;
}

/* ---------- cards ---------- */
.content-card {
  position: relative;
  background: var(--tile-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 13px;
  box-shadow: var(--tile-shadow);
  transition: transform 0.32s var(--ease), border-color 0.28s ease, box-shadow 0.32s var(--ease), background 0.28s ease;
}

.content-card:hover {
  transform: translateY(-3px);
  border-color: var(--chip-border-hover);
  background: var(--tile-bg-hover);
  box-shadow: var(--tile-shadow-hover);
}

.content-card h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 9px;
  line-height: 1.25;
}

.content-card p,
.content-card li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.content-card p {
  margin-bottom: 10px;
}

.content-card p:last-of-type {
  margin-bottom: 0;
}

.content-list {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.content-list li {
  list-style: none;
  padding: 11px 13px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 13px;
}

.content-list li strong {
  color: var(--secondary);
  font-weight: 600;
}

.content-meta {
  font-size: 10.5px;
  color: var(--section-label);
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin-bottom: 9px;
  font-family: var(--font-mono);
}

/* small status tag for projects */
.proj-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--secondary);
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
}

.proj-tag.live {
  color: var(--status);
  border-color: color-mix(in srgb, var(--status) 35%, transparent);
}

/* award strip below a project heading */
.proj-award {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--secondary);
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  padding: 4px 11px;
  border-radius: 999px;
  margin: 2px 0 12px;
}

.proj-award i {
  color: var(--status);
  font-size: 13px;
}

.proj-tag.live::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--status);
  margin-right: 5px;
  vertical-align: middle;
}

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

.ladder-note {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  letter-spacing: 0.2px;
}

.ladder-track {
  position: relative;
  display: grid;
  gap: 13px;
}

.ladder-track::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 6px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 50%, transparent), color-mix(in srgb, var(--accent) 12%, transparent));
}

.ladder-item {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.ladder-marker {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 17px;
}

.ladder-step {
  position: relative;
  z-index: 1;
  min-width: 40px;
  text-align: center;
  padding: 6px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--primary);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.ladder-dot {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 10%, transparent), 0 0 14px color-mix(in srgb, var(--accent) 40%, transparent);
}

.ladder-card {
  margin-bottom: 0;
}

.ladder-card h2 {
  margin-bottom: 8px;
  font-size: 16px;
}

.ladder-card p {
  margin-bottom: 9px;
}

.ladder-card-end {
  margin-bottom: 0;
}

/* ---------- theme toggle ---------- */
.theme-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-radius: 999px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--control-text);
  box-shadow: var(--control-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform 0.24s var(--ease), border-color 0.24s ease, background 0.24s ease, color 0.24s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--chip-border-hover);
  color: var(--primary);
}

.theme-toggle i {
  font-size: 16px;
}

.theme-toggle span {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.3px;
}

/* ---------- motion ---------- */
@keyframes page-enter {
  from { opacity: 0; transform: translateY(16px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes banner-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(0, -1.5%, 0); }
}

@keyframes subtle-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0; }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--status) 60%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.profile-section,
.page-top,
.page-content {
  animation: subtle-rise 600ms var(--ease) both;
}

.page-content {
  animation-delay: 80ms;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- responsive: handcrafted, not collapsed ---------- */
@media (max-width: 560px) {
  body {
    padding: 24px 12px 64px;
  }

  .mosaic-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .tile-wide { grid-column: span 4; min-height: 138px; }
  .tile-medium { grid-column: span 2; min-height: 120px; }
  .tile-compact { grid-column: span 2; }
  .tile-tall { grid-column: span 2; min-height: 138px; }

  .banner { height: 188px; }
}

@media (max-width: 420px) {
  .mosaic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tile-wide { grid-column: span 2; min-height: 120px; }
  .tile-medium,
  .tile-compact,
  .tile-tall { grid-column: span 1; min-height: 96px; }

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

  .ladder-track::before { left: 26px; }
  .ladder-item { grid-template-columns: 54px minmax(0, 1fr); }
  .ladder-step { min-width: 32px; padding: 5px 7px; font-size: 10px; }

  .page-top,
  .page-content,
  .profile-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .grid-link { font-size: 12px; }
  .banner { height: 168px; }
  .page-title { font-size: 26px; }
  .username { font-size: 27px; }

  .theme-toggle {
    right: 14px;
    bottom: 14px;
    padding: 10px 13px;
  }

  .hero-meta { font-size: 10px; gap: 6px 10px; }
}
