:root {
  color-scheme: dark;
  --page: #0014a8;
  --page-deep: #020f5d;
  --surface: #f7fbff;
  --surface-soft: #dff6ff;
  --ink: #081127;
  --muted: #52627a;
  --blue: #006de6;
  --cyan: #26b1ff;
  --red: #e5192f;
  --line: rgba(255, 255, 255, 0.22);
  --shadow: 0 24px 70px rgba(0, 6, 55, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--surface);
  background: linear-gradient(180deg, var(--page) 0%, #143fc1 52%, #0a1e70 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 76%);
}

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

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  backdrop-filter: blur(14px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 15, 90, 0.68);
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: var(--surface);
}

.nav-links {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 15, 90, 0.56);
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  min-height: calc(100svh - 80px);
  padding: clamp(1rem, 4vw, 4rem) 0 4rem;
}

.hero-copy,
.hero-art,
.links-section,
.contact-section,
.reference-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(1.25rem, 4vw, 3rem);
  background: rgba(1, 20, 120, 0.72);
}

.avatar {
  width: 164px;
  height: 164px;
  margin-bottom: 1.25rem;
  border: 4px solid #ffffff;
  border-radius: 8px;
  background: #ffffff;
}

.handle,
.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 10ch;
  margin-bottom: 0.75rem;
  font-size: clamp(3rem, 9vw, 6.6rem);
  line-height: 0.9;
}

h2 {
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.tagline {
  max-width: 30rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.2rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: var(--ink);
  background: #ffffff;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.button:hover,
.button:focus-visible,
.link-card:hover,
.link-card:focus-visible,
.character-tab:hover,
.character-tab:focus-visible {
  transform: translateY(-2px);
}

.hero-art {
  overflow: hidden;
  align-self: stretch;
  background: var(--surface);
}

.hero-art img {
  width: 100%;
  height: min(68svh, 620px);
  object-fit: contain;
  padding: 1rem 1rem 0;
  background: linear-gradient(180deg, #ffffff 0%, #dff6ff 100%);
}

.hero-art figcaption {
  margin: 0;
  padding: 1rem;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}

.links-section,
.contact-section,
.reference-section {
  margin: 0 0 1.25rem;
  padding: clamp(1rem, 3vw, 2rem);
  scroll-margin-top: 96px;
  color: var(--ink);
  background: rgba(247, 251, 255, 0.96);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 1.25rem;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.03rem;
}

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

.link-card {
  display: grid;
  gap: 0.1rem;
  min-height: 86px;
  padding: 1rem;
  border: 2px solid #0b2da0;
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 12px 28px rgba(0, 109, 230, 0.18);
}

.link-title {
  font-size: 1.1rem;
  font-weight: 900;
}

.link-detail {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.94rem;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.contact-actions .button.primary {
  color: #ffffff;
  background: var(--page);
}

.character-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.character-tab {
  padding: 0.9rem 1rem;
  border: 2px solid rgba(0, 20, 168, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.character-tab.is-active {
  border-color: var(--page);
  color: #ffffff;
  background: var(--page);
}

.character-panel {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 1rem;
  align-items: start;
}

.character-panel[hidden] {
  display: none;
}

.character-copy {
  position: sticky;
  top: 86px;
  padding: 1.25rem;
  border-radius: 8px;
  color: #ffffff;
  background: var(--page-deep);
}

.character-copy p:last-child {
  margin-bottom: 0;
}

.character-copy .note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
}

.reference-image {
  overflow: hidden;
  margin: 0;
  border: 2px solid #0b2da0;
  border-radius: 8px;
  background: #ffffff;
}

.reference-image img {
  width: 100%;
}

.bolt-sheets {
  display: grid;
  gap: 1rem;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.94rem;
  text-align: center;
}

.site-footer a {
  font-weight: 800;
}

@media (max-width: 780px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    flex: 1;
    text-align: center;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1rem;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.7rem, 16vw, 4.5rem);
  }

  .avatar {
    width: 132px;
    height: 132px;
  }

  .hero-art img {
    height: auto;
    max-height: 520px;
  }

  .link-grid,
  .contact-section,
  .character-panel {
    grid-template-columns: 1fr;
  }

  .contact-actions,
  .hero-actions {
    width: 100%;
  }

  .button,
  .contact-actions .button {
    width: 100%;
  }

  .character-copy {
    position: static;
  }

  .links-section,
  .contact-section,
  .reference-section {
    scroll-margin-top: 14px;
  }
}

@media (max-width: 480px) {
  main,
  .topbar,
  .site-footer {
    width: min(100% - 20px, 1120px);
  }

  .nav-links {
    gap: 4px;
  }

  .nav-links a {
    padding: 8px 6px;
    font-size: 0.86rem;
  }

  .hero-copy,
  .links-section,
  .contact-section,
  .reference-section {
    padding: 1rem;
  }

  .character-tabs {
    gap: 0.5rem;
  }
}

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