:root {
  --bg: #f6f7f2;
  --panel: #ffffff;
  --ink: #151712;
  --muted: #5b6257;
  --line: #d9ded2;
  --accent: #12664f;
  --accent-strong: #0b3d31;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(246, 247, 242, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand { font-weight: 800; letter-spacing: 0; }

nav { display: flex; gap: 18px; color: var(--muted); font-size: 14px; }
nav a:hover { color: var(--accent); }

main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px) 56px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 32px;
  align-items: end;
  min-height: calc(100dvh - 72px);
  padding: 72px 0 48px;
}

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

h1, h2, p { margin-top: 0; }
h1 { max-width: 880px; font-size: clamp(40px, 6vw, 78px); line-height: 0.98; letter-spacing: 0; margin-bottom: 24px; }
h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: 0; margin-bottom: 0; }

.summary { max-width: 720px; color: var(--muted); font-size: 18px; margin-bottom: 28px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
}
.actions a:first-child { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.actions a:active { transform: translateY(1px); }

.profile-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.profile-card img { width: 96px; height: 96px; border-radius: var(--radius); object-fit: cover; }
.profile-card strong, .profile-card span { display: block; }
.profile-card span { color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 24px 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 34px; line-height: 1; }
.stat span { color: var(--muted); font-size: 14px; }

.section { padding: 72px 0 0; }
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 42px; align-items: start; }
.skill-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.skill-list li { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--muted); }

.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 24px; }
.project-grid, .repo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card, .repo-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.project-card img, .repo-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e7eadf; display: block; }
.project-card div, .repo-card div { padding: 16px; }
.project-card h3, .repo-card h3 { margin: 0 0 8px; font-size: 18px; }
.project-card p, .repo-card p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.project-card a, .repo-card a { color: var(--accent); font-weight: 800; font-size: 14px; }
.repo-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.repo-topics { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 !important; margin-bottom: 14px; }
.repo-topics small { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.repo-actions { display: flex; gap: 12px; padding: 0 !important; }
.repo-status { color: var(--muted); }

.contact {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: center;
  margin-top: 80px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.contact p { color: var(--muted); margin-bottom: 0; }

@media (max-width: 860px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .hero, .split, .contact { grid-template-columns: 1fr; display: grid; }
  .hero { min-height: auto; padding-top: 52px; }
  .stats, .project-grid, .repo-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
}

@media (max-width: 560px) {
  nav { width: 100%; justify-content: space-between; }
  h1 { font-size: 40px; }
  .stats, .project-grid, .repo-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .contact { padding: 20px; }
}
