:root {
  --bg: #f5f5f5;
  --panel: #ffffff;
  --panel-strong: #000000;
  --text: #111111;
  --muted: #666666;
  --line: #d8d8d8;
  --line-soft: #eeeeee;
  --accent: #000000;
  --accent-soft: #f0f0f0;
  --success: #111111;
  --shadow: none;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;

  --page-pad: clamp(16px, 4vw, 40px);
  --sidebar-width: clamp(280px, 30vw, 360px);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --panel: #111111;
    --panel-strong: #ffffff;
    --text: #f5f5f5;
    --muted: #a0a0a0;
    --line: #333333;
    --line-soft: #222222;
    --accent: #ffffff;
    --accent-soft: #1a1a1a;
    --success: #ffffff;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: var(--page-pad);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: var(--page-pad);
  display: grid;
  gap: 16px;
}

.profile-card,
.section-card,
.repo-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: none;
  backdrop-filter: none;
}

.profile-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.profile-top {
  padding: 24px;
  color: #ffffff;
  background: #000000;
  border-bottom: 1px solid var(--line);
}

@media (prefers-color-scheme: dark) {
  .profile-top {
    color: #000000;
    background: #5ef44b;
  }
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  object-fit: cover;
}

.identity {
  min-width: 0;
}

.name {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.handle {
  margin: 6px 0 0;
  color: currentColor;
  opacity: 0.72;
  font-size: 0.95rem;
}

.bio {
  margin: 18px 0 0;
  color: currentColor;
  opacity: 0.78;
  font-size: 0.98rem;
}

.profile-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.meta-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta-item {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.meta-item:first-child {
  padding-top: 0;
}

.meta-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.meta-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.96rem;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.button:hover {
  text-decoration: none;
  background: var(--accent-soft);
}

.button.primary:hover {
  background: var(--text);
  color: var(--bg);
}

.section-card {
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 32px);
}

.hero {
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--text);
  content: "";
}

.headline {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.intro {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.stat-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stat-label {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
}

.toolbar-title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.search {
  width: min(300px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.search:focus {
  border-color: var(--text);
  box-shadow: none;
}

.repo-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.repo-card {
  display: grid;
  gap: 12px;
  border-radius: var(--radius-md);
  padding: 18px;
  transition: none;
}

.repo-card:hover {
  border-color: var(--text);
  transform: none;
}

.repo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.repo-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.repo-title a {
  color: var(--text);
}

.repo-visibility {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
}

.repo-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.repo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.language-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.language-dot::before {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--text);
  content: "";
}

.repo-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  font-weight: 750;
}

.repo-links a {
  color: var(--text);
}

.status {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--panel);
}

.footer-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  .sidebar {
    position: static;
  }

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

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .shell {
    padding: 14px;
  }

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

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

  .repo-header,
  .repo-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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