/* ============================================================
   style.css — 杨振伟个人主页样式
   修改配色只需改 :root 变量
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Outfit:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── 全局变量 ── */
:root {
  --blue:      #2a7fa8;
  --blue-dark: #1a5f80;
  --blue-deep: #0e3d55;
  --accent:    #4cb8c4;
  --accent2:   #f07f4f;
  --text:      #1e2d3a;
  --muted:     #5a7384;
  --light:     #f5fafc;
  --white:     #ffffff;
  --border:    #d0e8f0;
  --tag-bg:    #e0f3f8;
  --radius:    14px;
  --shadow:    0 4px 20px rgba(42,127,168,0.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', 'Noto Serif SC', sans-serif;
  background: var(--light);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ══════════════════════════════════════
   TOP NAV
══════════════════════════════════════ */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(42,127,168,0.07);
  height: 56px;
  display: flex; align-items: center;
}
.topnav-inner {
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-logo {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px; font-weight: 700;
  color: var(--blue-dark); letter-spacing: 2px;
  text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a {
  padding: 5px 13px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { background: var(--tag-bg); color: var(--blue); }
.nav-hub-btn { background: var(--blue) !important; color: #fff !important; }
.nav-hub-btn:hover { background: var(--blue-dark) !important; }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  min-height: 100vh; padding-top: 56px;
  background: linear-gradient(145deg, #dff1f9 0%, #eef8fc 50%, #f5fafc 100%);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero-bg-circle {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.hero-bg-circle.c1 {
  top: -100px; right: -80px; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(76,184,196,.16) 0%, transparent 70%);
}
.hero-bg-circle.c2 {
  bottom: -80px; left: -60px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(42,127,168,.10) 0%, transparent 70%);
}
.hero-grid-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 65% 65% at 50% 50%, black, transparent);
}

.hero-inner {
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 72px 28px;
  display: grid; grid-template-columns: 1fr 340px;
  gap: 72px; align-items: center;
  position: relative; z-index: 1;
}
.hero-left { animation: heroIn .85s cubic-bezier(.22,1,.36,1) both; }
@keyframes heroIn {
  from { opacity:0; transform: translateY(28px); }
  to   { opacity:1; transform: translateY(0); }
}
.hero-right { animation: heroIn .85s .12s cubic-bezier(.22,1,.36,1) both; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--tag-bg); border: 1px solid var(--border);
  color: var(--blue); font-size: 12px; font-weight: 600;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 18px;
  letter-spacing: .5px;
}
.hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.hero-name {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(40px, 5.5vw, 60px);
  font-weight: 700; color: var(--blue-deep);
  letter-spacing: 4px; line-height: 1.1; margin-bottom: 10px;
}
.hero-title { font-size: 17px; color: var(--blue); margin-bottom: 20px; font-weight: 400; }
.hero-desc {
  font-size: 14.5px; color: var(--muted); line-height: 1.9;
  max-width: 500px; margin-bottom: 32px;
}
.hero-desc strong { color: var(--blue-dark); font-weight: 600; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff;
  padding: 10px 22px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  box-shadow: 0 4px 16px rgba(42,127,168,.25);
  transition: background .18s, transform .18s, box-shadow .18s;
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(42,127,168,.3); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); color: var(--blue);
  padding: 10px 22px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  border: 1.5px solid var(--border);
  transition: border-color .18s, transform .18s;
}
.btn-secondary:hover { border-color: var(--blue); transform: translateY(-2px); }

.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hstat-num {
  font-family: 'Noto Serif SC', serif;
  font-size: 30px; font-weight: 700; color: var(--blue); line-height: 1;
}
.hstat-unit { font-size: 14px; }
.hstat-label { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* avatar */
.avatar-blob {
  width: 180px; height: 180px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif SC', serif;
  font-size: 50px; font-weight: 700; color: #fff; letter-spacing: 4px;
  margin: 0 auto 24px;
  box-shadow: 0 14px 44px rgba(42,127,168,.28);
  position: relative;
}
.avatar-blob::after {
  content: '';
  position: absolute; inset: -7px; border-radius: 50%;
  border: 2px dashed rgba(76,184,196,.45);
  animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.meta-list { display: flex; flex-direction: column; gap: 9px; }
.meta-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--border);
  padding: 9px 15px; border-radius: 10px;
  font-size: 13px; color: var(--muted);
}
.meta-row svg { color: var(--accent); flex-shrink: 0; }
.meta-row a { color: var(--blue); text-decoration: none; }

/* ══════════════════════════════════════
   SECTION WRAPPER
══════════════════════════════════════ */
.section-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 72px 28px;
}
.sec-header { text-align: center; margin-bottom: 48px; }
.sec-label {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  color: var(--blue); text-transform: uppercase; margin-bottom: 10px;
}
.sec-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700; color: var(--blue-deep); letter-spacing: 2px;
}
.sec-sub { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

/* ══════════════════════════════════════
   SERVICES HUB
══════════════════════════════════════ */
#hub { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.hub-tabs {
  display: flex; gap: 10px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 28px;
}
.hub-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  color: var(--muted); background: var(--light);
  border: 1.5px solid var(--border);
  cursor: pointer; transition: all .18s; user-select: none;
}
.hub-tab:hover { border-color: var(--accent); color: var(--blue); }
.hub-tab.active {
  background: var(--blue); color: #fff;
  border-color: var(--blue);
  box-shadow: 0 4px 14px rgba(42,127,168,.25);
}
.hub-tab-icon { font-size: 16px; }

/* iframe panel */
.hub-panel {
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  background: var(--light);
  box-shadow: var(--shadow);
  position: relative;
}
.hub-panel-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--white); border-bottom: 1px solid var(--border);
  gap: 12px;
}
.hub-panel-dots { display: flex; gap: 6px; }
.hub-panel-dots span {
  width: 11px; height: 11px; border-radius: 50%;
}
.hub-panel-dots .d1 { background: #ff6058; }
.hub-panel-dots .d2 { background: #ffbd2e; }
.hub-panel-dots .d3 { background: #27c840; }
.hub-panel-url {
  flex: 1; background: var(--light);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hub-panel-actions { display: flex; gap: 8px; }
.hub-panel-actions a {
  font-size: 12px; color: var(--blue); text-decoration: none;
  padding: 3px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--white);
  transition: background .15s;
  white-space: nowrap;
}
.hub-panel-actions a:hover { background: var(--tag-bg); }

.hub-iframe-wrap { position: relative; height: 560px; background: var(--light); }
.hub-iframe-wrap iframe {
  width: 100%; height: 100%; border: none;
  display: block;
}
.hub-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: var(--muted); font-size: 14px;
}
.hub-placeholder .ph-icon { font-size: 48px; }
.hub-placeholder .ph-text { font-size: 15px; color: var(--blue-dark); font-weight: 600; }
.hub-placeholder .ph-sub  { font-size: 13px; color: var(--muted); }

/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
#about { background: var(--light); }
.about-grid {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 40px; align-items: start;
}

.summary-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 30px;
  position: relative; overflow: hidden; margin-bottom: 20px;
}
.summary-box::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(to bottom, var(--accent), var(--blue));
  border-radius: 4px 0 0 4px;
}
.summary-box p { font-size: 14px; color: var(--muted); line-height: 1.9; margin-bottom: 10px; }
.summary-box p:last-child { margin-bottom: 0; }
.summary-box strong { color: var(--blue-dark); }

.skill-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.skill-card-title {
  font-size: 13px; font-weight: 700; color: var(--blue-dark);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.skill-group { margin-bottom: 14px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group-label {
  font-size: 10.5px; color: var(--muted); margin-bottom: 7px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  background: var(--tag-bg); color: var(--blue);
  font-size: 11.5px; font-weight: 500;
  padding: 3px 10px; border-radius: 20px; border: 1px solid var(--border);
}
.tag.hot { background: var(--blue); color: #fff; border-color: var(--blue); }

.side-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px;
}
.side-card:last-child { margin-bottom: 0; }
.side-card-title {
  font-size: 12.5px; font-weight: 700; color: var(--blue-dark);
  margin-bottom: 13px; display: flex; align-items: center; gap: 7px;
}
.cert-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text);
}
.cert-item:last-child { border-bottom: none; }
.cert-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ══════════════════════════════════════
   EXPERIENCE
══════════════════════════════════════ */
#experience { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.exp-timeline { position: relative; }
.exp-timeline::before {
  content: '';
  position: absolute; left: 19px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--blue), var(--border));
}
.exp-item { display: flex; gap: 28px; margin-bottom: 28px; }
.exp-item:last-child { margin-bottom: 0; }
.exp-dot {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  background: var(--white); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; z-index: 1;
}
.exp-body {
  flex: 1; background: var(--light); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 26px;
  transition: box-shadow .2s, transform .2s;
}
.exp-body:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.exp-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.exp-company {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px; font-weight: 700; color: var(--blue-dark);
}
.exp-role {
  display: inline-block; margin-top: 3px;
  background: var(--tag-bg); color: var(--blue);
  font-size: 12px; font-weight: 500;
  padding: 2px 10px; border-radius: 20px;
}
.exp-date {
  font-size: 12px; color: var(--muted);
  background: #f0f4f7; padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.exp-list { padding-left: 17px; font-size: 13px; color: var(--muted); line-height: 1.85; }
.exp-list li { margin-bottom: 3px; }
.exp-list li::marker { color: var(--accent); }
.ach-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ach-tag {
  background: linear-gradient(135deg, #fff8f5, #fff3ef);
  border: 1px solid #ffd4bc; color: var(--accent2);
  font-size: 11.5px; font-weight: 500;
  padding: 2px 10px; border-radius: 20px;
}

/* ══════════════════════════════════════
   PROJECTS
══════════════════════════════════════ */
#projects { background: var(--light); }
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}
.proj-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: transform .2s, box-shadow .2s;
}
.proj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.proj-head {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 8px; flex-wrap: wrap; margin-bottom: 6px;
}
.proj-name { font-size: 14.5px; font-weight: 700; color: var(--blue-dark); }
.proj-role-tag {
  font-size: 11px; background: var(--tag-bg); color: var(--blue);
  padding: 2px 9px; border-radius: 20px; font-weight: 500; white-space: nowrap;
}
.proj-date { font-size: 11.5px; color: var(--muted); margin-bottom: 9px; }
.proj-desc { font-size: 13px; color: var(--muted); line-height: 1.7; }
.proj-bar {
  margin-top: 14px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--blue)); opacity: .35;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer {
  background: var(--blue-deep); color: rgba(255,255,255,.65);
  text-align: center; padding: 28px; font-size: 13px;
}
footer strong { color: #fff; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-right { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links .hide-mobile { display: none; }
  .hub-iframe-wrap { height: 400px; }
  .exp-timeline::before { display: none; }
  .exp-item { flex-direction: column; gap: 0; }
  .exp-dot { display: none; }
  .section-wrap { padding: 52px 18px; }
}
