:root {
  --bg: #0b0b0b;
  --fg: #f2f2f2;
  --muted: #8a8a8a;
  --line: #242424;
  --card: #161616;
  --btn-primary-hover: #dcdcdc;
  --hover-line: #4a4a4a;
  --repo-hover-line: #3a3a3a;
  --arrow: #4a4a4a;
  --shimmer: #232323;
  --online: #3ac16b;
  --idle: #d99a2b;
  --dnd: #e0524f;
  --offline: #5a5a5a;
  --accent: #f2f2f2;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-font: "Space Grotesk", "DM Sans", sans-serif;
}

html[data-theme="light"] {
  --bg: #fff;
  --fg: #0b0b0b;
  --muted: #616161;
  --line: #e5e5e5;
  --card: #f5f5f5;
  --btn-primary-hover: #2b2b2b;
  --hover-line: #c2c2c2;
  --repo-hover-line: #c2c2c2;
  --arrow: #a3a3a3;
  --shimmer: #e9e9e9;
  --online: #3ac16b;
  --idle: #d99a2b;
  --dnd: #e0524f;
  --offline: #5a5a5a;
  --accent: #0b0b0b;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  background:
    radial-gradient(ellipse at 86% 7%, rgba(255, 255, 255, .07), transparent 31rem),
    var(--bg);
  transition: background-color .35s ease, color .35s ease;
}

.page {
  width: min(100% - 48px, 860px);
  max-width: 860px;
  padding: 28px 0 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  animation: arrive .55s both;
}

.wordmark {
  color: var(--fg);
  font: 700 28px/1 var(--display-font);
  letter-spacing: -.08em;
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

.topbar-note,
.topbar-link {
  color: var(--muted);
  font-size: 13px;
}

.topbar-link {
  color: var(--fg);
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}

.topbar-link span,
.section-action span {
  display: inline-block;
  color: var(--accent);
  transition: transform .2s ease;
}

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

.topbar-link:hover span,
.section-action:hover span {
  transform: translate(2px, 2px);
}

.hero {
  padding: 86px 0 68px;
  animation: arrive .7s .08s both;
}

.profile {
  gap: 16px;
  margin-bottom: 23px;
}

.avatar {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  border-color: var(--line);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--card) 70%, transparent);
  transition: border-radius .25s ease, transform .25s ease;
}

.avatar-wrap:hover .avatar {
  border-radius: 50%;
  transform: rotate(-5deg);
}

.status-dot {
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  border-color: var(--bg);
}

.name {
  font: 600 18px/1.3 var(--display-font);
  letter-spacing: -.025em;
}

.handle {
  margin-top: 3px;
  font-size: 13px;
}

.status-line {
  margin-top: 7px;
  font-size: 12px;
}

.status-line .dot-inline {
  width: 7px;
  height: 7px;
}

.bio {
  max-width: 54ch;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.hero h1 {
  margin: 0;
  font: 600 clamp(42px, 7vw, 72px)/1.02 var(--display-font);
  letter-spacing: -.075em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-note {
  max-width: 40ch;
  margin: 19px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.actions {
  gap: 10px;
  margin-top: 25px;
}

.btn {
  min-height: 44px;
  padding: 11px 17px;
  border-radius: 12px;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), background .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .18);
  transform: translateY(-3px);
}

.btn-secondary {
  border-color: var(--line);
  background: color-mix(in srgb, var(--card) 50%, transparent);
}

.btn-secondary:hover {
  border-color: var(--hover-line);
  background: var(--card);
  transform: translateY(-3px);
}

.section {
  margin-top: 0;
  padding: 34px 0 54px;
  border-top: 1px solid var(--line);
  animation: arrive .65s .16s both;
}

.projects-section {
  padding-bottom: 60px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-kicker {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.section-heading h2 {
  margin: 0;
  font: 600 clamp(27px, 4vw, 36px)/1.12 var(--display-font);
  letter-spacing: -.055em;
}

.project-count {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.project-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--fg);
  text-decoration: none;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), border-color .28s ease, box-shadow .28s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--hover-line);
  box-shadow: 0 20px 55px rgba(4, 7, 23, .28);
}

.project-card:focus-visible,
.topbar a:focus-visible,
.section-action:focus-visible,
.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.project-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1200 / 600;
  background: #d6d8dd;
}

.project-preview::after {
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .24));
  content: "";
  pointer-events: none;
}

.project-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1), filter .35s ease;
}

.project-card:hover .project-preview img {
  transform: scale(1.035);
  filter: saturate(1.08);
}

.preview-label {
  position: absolute;
  z-index: 1;
  bottom: 17px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(11, 11, 11, .74);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.preview-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f2f2f2;
  box-shadow: 0 0 12px rgba(255, 255, 255, .65);
}

.preview-open {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(11, 11, 11, .72);
  color: #fff;
  font-size: 18px;
  backdrop-filter: blur(12px);
  transition: transform .2s ease, background .2s ease;
}

.project-card:hover .preview-open {
  transform: translate(2px, -2px);
  background: rgba(11, 11, 11, .95);
}

.project-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 21px 24px 23px;
}

.project-info h3 {
  margin: 0;
  font: 600 21px/1.2 var(--display-font);
  letter-spacing: -.035em;
}

.project-info p {
  max-width: 58ch;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.project-link,
.section-action {
  flex: none;
  color: var(--fg);
  font-size: 13px;
  text-decoration: none;
}

.project-link span {
  display: inline-block;
  color: var(--accent);
  transition: transform .2s ease;
}

.project-card:hover .project-link span {
  transform: translate(3px, -3px);
}

.repo-heading {
  margin-bottom: 20px;
}

.repo-heading .section-action {
  padding-bottom: 5px;
}

.repo-heading .section-action:hover {
  color: var(--accent);
}

.section-title {
  margin-bottom: 14px;
  color: var(--muted);
  font: 600 12px/1.3 var(--display-font);
  letter-spacing: .01em;
  text-transform: none;
}

.repo-card {
  border-radius: 14px;
  background: color-mix(in srgb, var(--card) 55%, transparent);
  transition: border-color .22s ease, background .22s ease, transform .22s ease, box-shadow .22s ease;
}

.repo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(4, 7, 23, .15);
}

.activity-card {
  border-color: var(--line);
  border-radius: 14px;
  background: var(--card);
}

footer {
  margin-top: 14px;
  padding-top: 18px;
  gap: 14px;
  border-color: var(--line);
}

.footer-note {
  margin-right: auto;
}

.theme-toggle {
  border-radius: 9px;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.theme-toggle:hover {
  background: var(--card);
  transform: translateY(-2px);
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .page {
    width: min(100% - 36px, 860px);
    padding-top: 18px;
  }

  .hero {
    padding: 64px 0 48px;
  }

  .topbar-note {
    display: none;
  }

  .hero h1 {
    font-size: clamp(42px, 12vw, 62px);
  }

  .project-info {
    align-items: start;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
  }

  .project-count {
    display: none;
  }

  .project-preview {
    aspect-ratio: 4 / 3;
  }

  .repo-meta {
    gap: 8px;
  }

  footer {
    flex-wrap: wrap;
    gap: 12px;
  }

  .footer-note {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
