:root {
  color-scheme: dark;
  --bg: #06111e;
  --surface: #0b1b2a;
  --surface-soft: #0e2234;
  --text: #eef7fb;
  --muted: #a9bbc7;
  --accent: #86c8eb;
  --line: rgba(134, 200, 235, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  margin: 0;
  background:
    radial-gradient(circle at 82% 5%, rgba(52, 126, 168, 0.2), transparent 27rem),
    linear-gradient(180deg, #071426 0%, var(--bg) 32rem);
  color: var(--text);
  line-height: 1.65;
}

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

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

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
footer {
  width: min(72rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 5rem;
  border-bottom: 1px solid var(--line);
}

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

.site-identity > span {
  display: grid;
  width: 2.3rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  font: 700 0.72rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.08em;
}

.site-header nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.site-header nav a,
footer nav a {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"],
footer nav a:hover {
  color: var(--accent);
}

main {
  padding-block: clamp(2.5rem, 7vw, 6rem);
}

.breadcrumbs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: clamp(3rem, 7vw, 6rem);
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-hero {
  max-width: 57rem;
  margin-bottom: clamp(3rem, 8vw, 6rem);
}

.page-hero > p:first-child,
.profile-card__eyebrow,
.related-pages > p {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font: 650 0.7rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.7rem);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.page-hero__rule {
  width: min(14rem, 42vw);
  height: 1px;
  margin-block: 2rem;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.page-hero__intro {
  max-width: 50rem;
  margin: 0;
  color: #c7d7e1;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

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

.profile-card {
  min-width: 0;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(14, 34, 52, 0.9), rgba(7, 20, 38, 0.88));
  scroll-margin-top: 1rem;
}

.profile-card:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(134, 200, 235, 0.28);
}

.profile-card h2,
.related-pages h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.18;
}

.profile-card__summary {
  margin: 1rem 0 0;
  color: #c8d6df;
}

.profile-card__details {
  display: grid;
  gap: 0.7rem;
  margin: 1.25rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.profile-card__details li::marker {
  color: var(--accent);
}

.tag-list,
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(134, 200, 235, 0.18);
  color: #b7d8e9;
  font: 550 0.7rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.profile-links a,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.2rem;
  color: var(--accent);
  font-weight: 650;
}

.profile-links a {
  margin-top: 0;
}

.related-pages {
  margin-top: clamp(4rem, 10vw, 8rem);
  padding-top: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}

.related-pages > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.related-pages a {
  display: flex;
  min-height: 9rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.15rem;
  border: 1px solid var(--line);
  background: rgba(11, 27, 42, 0.7);
  text-decoration: none;
}

.related-pages a:hover {
  border-color: var(--accent);
}

.related-pages a span {
  color: var(--muted);
  font-size: 0.82rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    padding-block: 1rem;
  }

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

  .profile-grid,
  .related-pages > div {
    grid-template-columns: 1fr;
  }

  .related-pages a {
    min-height: 7rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
