:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1f2430;
  --text: #f1f4f8;
  --muted: #9aa4b2;
  --line: #303642;
  --accent: #6cc5b0;
  --accent-2: #f0b75a;
  --danger: #f06c64;
  --radius: 8px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 21, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: .92rem;
}

.nav-links a {
  text-decoration: none;
}

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

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

.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 56px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
}

.intro {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

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

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #07110f;
}

.profile-card,
.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile-card {
  padding: 24px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  margin-bottom: 18px;
}

.profile-name {
  font-weight: 800;
  font-size: 1.15rem;
}

.profile-meta {
  color: var(--muted);
  margin-bottom: 20px;
}

.stats {
  display: grid;
  gap: 14px;
  margin: 0;
}

.stats div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.stats dt {
  color: var(--muted);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.stats dd {
  margin: 4px 0 0;
  font-weight: 650;
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

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

h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 4vw, 2.6rem);
  line-height: 1.1;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  min-height: 260px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.project-card.featured {
  background: var(--panel-2);
}

.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  align-items: center;
}

.language,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
}

.language {
  background: rgba(255,255,255,.08);
}

.language.js { color: #f0d56b; }
.language.html { color: #f29f79; }
.language.cpp { color: #8db4ff; }
.language.rust { color: #e6a276; }
.language.py { color: #80d08b; }
.language.shell { color: #d7dce5; }

.status {
  color: var(--accent);
  border: 1px solid rgba(108, 197, 176, .35);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.project-card p,
.split p {
  color: var(--muted);
}

.project-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 18px;
}

.project-links a {
  color: var(--text);
  font-weight: 800;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.split {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.cv-strip {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 56px;
}

.cv-copy p {
  color: var(--muted);
  margin-bottom: 20px;
}

.cv-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.split p {
  max-width: 720px;
  font-size: 1.08rem;
}

.repo-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.repo-row {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.repo-row:last-child {
  border-bottom: 0;
}

.repo-row:hover {
  background: var(--panel-2);
}

.repo-row span:first-child {
  font-weight: 750;
}

.repo-row span:last-child {
  color: var(--muted);
  text-align: right;
}

.footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
}

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

@media (max-width: 860px) {
  .hero,
  .cv-strip,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .profile-card {
    max-width: 460px;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .nav {
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

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

  .repo-row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 12px 16px;
  }

  .repo-row span:last-child {
    text-align: left;
  }

  .footer {
    flex-direction: column;
  }
}
