:root {
  --ink: #202923;
  --muted: #667168;
  --paper: #f1f3ee;
  --card: #ffffff;
  --line: #e2e7e0;
  --accent: #456b57;
  --accent-dark: #345341;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 42px 22px 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 12% 12%, rgba(203, 218, 201, .55), transparent 38%),
    radial-gradient(ellipse at 90% 85%, rgba(219, 225, 213, .6), transparent 34%),
    var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.5;
}

.page { width: min(860px, 100%); }

.profile-card {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(35, 55, 42, .07);
  border-radius: 18px;
  box-shadow: 0 22px 65px rgba(34, 52, 39, .10);
}

.portrait-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
  padding: 46px 0 0 40px;
  background: transparent;
}

.portrait {
  display: block;
  width: 150px;
  height: 150px;
  min-height: 0;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
  border: 3px solid white;
}

.profile-content { padding: 46px 48px 38px; }

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

h1 {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: clamp(2.7rem, 5vw, 3.7rem);
  font-weight: 700;
  line-height: .99;
  letter-spacing: -.065em;
}

.bio {
  max-width: 390px;
  margin: 18px 0 25px;
  color: var(--muted);
  font-size: .96rem;
}

.links {
  display: grid;
  gap: 10px;
}

.link-button {
  min-height: 48px;
  padding: 11px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dce3dc;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.link-button:hover {
  transform: translateY(-2px);
  border-color: #9caf9f;
  background: #f8faf7;
}

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

.link-button.primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.arrow, .repo-arrow {
  color: var(--accent);
  font-size: 1rem;
}

.primary .arrow { color: #e6eee8; }

.repositories {
  margin-top: 27px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.repo-heading {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.repo-link {
  padding: 11px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid #edf0ec;
}

.repo-link:last-child { border-bottom: 0; }
.repo-link strong { display: block; font-size: .88rem; font-weight: 700; }

.repo-link small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.4;
}

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

footer {
  padding: 16px 4px 0;
  color: #788279;
  font-size: .75rem;
  text-align: center;
}

@media (max-width: 680px) {
  body {
    padding: 20px 14px;
    align-items: flex-start;
  }

  .page {
    width: min(440px, 100%);
    margin: auto;
  }

  .profile-card {
    grid-template-columns: 85px minmax(0, 1fr);
    border-radius: 14px;
  }

  .portrait-wrap { padding: 30px 0 0 20px; }

  .portrait {
    width: 75px;
    height: 75px;
    min-height: 0;
  }

  .profile-content { padding: 30px 20px 25px; }
  h1 { font-size: 3rem; }
}
