@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Source+Serif+4:wght@400;600;700&display=swap');

:root{
  --siteBase: 1100px;
  --siteExtra: 1cm;                 /* total +1cm => 0.5cm each side */
  --siteMax: calc(var(--siteBase) + var(--siteExtra));

  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
               "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", Times,
                "Songti SC", "STSong", "SimSun", serif;

  --heroMaxW: 680px;
  --heroMaxH: 320px;

  --collapseBp: 980px;              /* <= 980px show hamburger */
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: var(--font-serif);
  color: var(--text);
  background: #fff;
}

/* ===================== Topbar ===================== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner{
  max-width: var(--siteMax);
  margin: 0 auto;
  padding: 16px 22px;

  display: flex;
  align-items: center;
  justify-content: flex-start;   /* ✅ tabs 靠近姓名，不留大空白 */
  gap: 60px;                     /* ✅ 姓名与 tabs 的距离（想更近改 18px） */
  position: relative;            /* dropdown 定位 */
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand-name{
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap;
}

/* desktop nav */
.nav{
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a{
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  padding: 6px 2px;
  white-space: nowrap;
}
.nav a:hover{ text-decoration: underline; }
.nav a.active{ color: #111827; }

/* ===================== Layout ===================== */
.container{
  max-width: var(--siteMax);
  margin: 0 auto;
  padding: 22px 22px 60px;
}

/* ✅ Title auto scaling */
.page-title{
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-align: center;
  margin: 26px 0 18px;
}

/* ===================== About helpers ===================== */
.hero{
  display: flex;
  justify-content: center;
  margin: 6px 0 22px;
}

.hero-img{
  width: auto;
  height: auto;
  max-width: min(var(--heroMaxW), 100%);
  max-height: var(--heroMaxH);
  object-fit: contain;
  display: block;
}

.name-title{
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 22px;
  margin: 0 0 10px;
}

.section p{
  font-size: 16.5px;
  line-height: 1.85;
  margin: 10px 0;
}

/* ===================== Hamburger ===================== */
.nav-toggle{
  display: none;                 /* default hidden on desktop */
  margin-left: auto;             /* ✅ push to right when shown */
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,0.10);
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.nav-menu{
  display: none;
  position: absolute;
  right: 22px;
  top: calc(100% + 10px);
  width: min(360px, calc(100vw - 44px));
  background: #fff;
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(17,24,39,0.15);
  padding: 10px;
  z-index: 50;
}

.nav-menu a{
  display: block;
  padding: 14px 14px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}
.nav-menu a:hover{ background: rgba(17,24,39,0.05); }
.nav-menu.open{ display: block; }

/* ✅ Collapse to hamburger */
@media (max-width: 980px){
  .nav-desktop{ display: none; }
  .nav-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Smaller screens */
@media (max-width: 820px){
  :root{
    --siteExtra: 0px;
    --siteMax: 100%;
    --heroMaxW: 100%;
    --heroMaxH: 280px;
  }
  .topbar-inner{ padding: 12px 14px; gap: 14px; }
  .avatar{ width: 36px; height: 36px; }
  .brand-name{ font-size: 17px; }
  .container{ max-width: 100%; }
}
