:root {
  color-scheme: dark;
  --bg: #0d0f14;
  --panel: #13161d;
  --panel-soft: #191d26;
  --text: #e9edf4;
  --muted: #8f98a8;
  --line: #2a2f3a;
  --accent: #7ea7e8;
  --accent-soft: rgba(126, 167, 232, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(126, 167, 232, 0.14), transparent 24rem),
    linear-gradient(180deg, #10131b 0%, var(--bg) 42%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

.page {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(36px, 7vw, 78px) 0 34px;
}

.profile {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(126, 167, 232, 0.16);
  border-radius: 12px;
  background: rgba(19, 22, 29, 0.72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.avatar {
  width: 76px;
  aspect-ratio: 1;
  border: 1px solid rgba(126, 167, 232, 0.24);
  border-radius: 12px;
  object-fit: cover;
  background: var(--panel);
}

.handle {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.handle a {
  border-bottom: 1px solid rgba(126, 167, 232, 0.38);
}

.handle a:hover {
  border-bottom-color: var(--accent);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
}

h2 {
  font-size: 1.05rem;
}

h3 {
  font-size: 1.1rem;
}

.profile-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.profile-copy p:not(.handle) {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--muted);
}

.repo-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  font-weight: 700;
}

.repo-link:hover {
  border-color: var(--accent);
}

.stats {
  min-width: 132px;
  margin: 0;
  border: 1px solid rgba(126, 167, 232, 0.14);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(19, 22, 29, 0.72);
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  font-size: 1.8rem;
  font-weight: 800;
}

.repos {
  margin-top: 38px;
}

.repos h2 {
  margin-bottom: 10px;
  color: var(--muted);
}

.section-note {
  max-width: 62ch;
  margin: -6px 0 18px;
  color: var(--muted);
}

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

.repo {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(143, 152, 168, 0.16);
  border-radius: 12px;
  padding: 19px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    rgba(19, 22, 29, 0.86);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.repo:hover {
  border-color: rgba(126, 167, 232, 0.48);
  background:
    linear-gradient(180deg, rgba(126, 167, 232, 0.05), transparent),
    rgba(19, 22, 29, 0.96);
  transform: translateY(-1px);
}

.repo p {
  margin: 0;
  color: var(--muted);
}

.repo-detail {
  color: #c8d0de;
}

.repo-points {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.repo-points li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
}

.repo-points li::before {
  position: absolute;
  left: 0;
  color: var(--accent);
  content: "-";
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(126, 167, 232, 0.08);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.repo-link {
  width: max-content;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.02);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(820px, calc(100% - 36px));
  margin: 0 auto;
  padding: 0 0 30px;
  color: var(--muted);
  font-size: 0.92rem;
}

footer a {
  color: var(--accent);
}

footer a:hover {
  text-decoration: underline;
}

.policy-page {
  width: min(780px, calc(100% - 36px));
}

.policy-card {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid rgba(126, 167, 232, 0.16);
  border-radius: 12px;
  background: rgba(19, 22, 29, 0.78);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.policy-card h1 {
  font-size: clamp(2rem, 6vw, 3.6rem);
}

.policy-card p {
  max-width: 68ch;
  margin: 0;
  color: var(--muted);
}

.policy-card .handle {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 280ms ease, transform 280ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 620px) {
  .profile {
    grid-template-columns: 1fr;
  }

  .profile-title-row {
    align-items: start;
    flex-direction: column;
  }

  .stats {
    width: 100%;
  }

  .repo-list {
    grid-template-columns: 1fr;
  }

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
