:root {
  --blue: #00aeec;
  --blue-dark: #008ac5;
  --text: #18191c;
  --muted: #9499a0;
  --line: #e3e5e7;
  --surface: #ffffff;
  --background: #f6f7f8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, "Noto Sans SC", sans-serif;
}

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

.page-shell {
  min-height: 100svh;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(227, 229, 231, 0.9);
  position: relative;
  z-index: 2;
}

.brand {
  color: var(--blue);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.profile-links a:hover {
  color: var(--blue);
}

.cover {
  height: 290px;
  position: relative;
  background-image: url("/avatar.jpg");
  background-position: center 36%;
  background-size: cover;
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 19, 37, 0.24), transparent 55%),
    linear-gradient(0deg, rgba(5, 16, 30, 0.72), transparent 62%);
}

.profile-hero {
  width: min(1100px, calc(100% - 48px));
  display: flex;
  align-items: center;
  gap: 22px;
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 1;
  transform: translateX(-50%);
}

.avatar {
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  border: 4px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: white;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
  object-fit: cover;
  object-position: 32% 34%;
  transform: translateY(76px);
}

.identity {
  min-width: 0;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.52);
}

.identity h1 {
  width: 136px;
  margin: 0;
  position: absolute;
  top: calc(100% + 82px);
  left: -16px;
  z-index: 2;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  text-align: center;
  text-shadow: none;
}

.identity p {
  margin: 0;
  font-size: 14px;
}

.profile-nav {
  height: 80px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1100px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.profile-links {
  display: flex;
  align-items: stretch;
  gap: 36px;
  margin-left: 126px;
}

.profile-links a {
  display: grid;
  place-items: center;
  position: relative;
  color: #61666d;
  font-size: 15px;
  font-weight: 600;
}

.profile-links a.active {
  color: var(--blue);
}

.profile-links a.active::after {
  content: "";
  height: 3px;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 2px 2px 0 0;
  background: var(--blue);
}

.profile-stats {
  display: flex;
  align-items: center;
  gap: 27px;
}

.profile-stats span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.profile-stats b {
  color: #61666d;
  font-size: 15px;
}

.content-grid {
  width: min(1100px, calc(100% - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  margin: 22px auto 48px;
}

.content-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.card-title {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

.card-title h2,
.side-card h2 {
  margin: 0;
  font-size: 18px;
}

.card-title span {
  color: var(--muted);
  font-size: 13px;
}

.empty-post {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border-radius: 50%;
  background: #e5f6fc;
  color: var(--blue);
  font-size: 26px;
}

.empty-post h3 {
  margin: 0 0 9px;
  color: #61666d;
  font-size: 16px;
}

.empty-post p,
.side-card p {
  margin: 0;
  font-size: 14px;
}

.side-card {
  align-self: start;
  padding: 21px;
}

.side-card > p {
  margin: 15px 0 20px;
  color: #61666d;
}

.side-card dl {
  display: grid;
  gap: 13px;
  margin: 0;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.side-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: #61666d;
}

@media (max-width: 760px) {
  .topbar {
    height: 56px;
    padding: 0 18px;
  }

  .cover {
    height: 250px;
    background-position: 37% 36%;
  }

  .profile-hero {
    width: calc(100% - 32px);
    gap: 15px;
    bottom: 18px;
  }

  .avatar {
    width: 82px;
    height: 82px;
    transform: translateY(59px);
  }

  .identity h1 {
    width: 112px;
    top: calc(100% + 58px);
    left: -15px;
    font-size: 18px;
  }

  .identity p {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-nav {
    height: 70px;
    overflow: hidden;
    padding: 0 16px;
  }

  .profile-links {
    width: calc(100% - 98px);
    justify-content: space-between;
    gap: 16px;
    margin-left: 98px;
  }

  .profile-stats {
    display: none;
  }

  .content-grid {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    margin-top: 12px;
  }

  .side-card {
    grid-row: 1;
  }
}

@media (max-width: 430px) {
  .profile-links a:nth-child(4) {
    display: none;
  }
}
