/* =========================================================
   蒙锡文 · 个人网站  |  flova.tv-inspired dark theme
   ========================================================= */

:root {
  --bg: #06060c;
  --bg-soft: #0c0c16;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ECECF4;
  --text-soft: #A7ACBE;
  --text-dim: #6B7088;
  --violet: #7C5CFF;
  --cyan: #22D3EE;
  --pink: #FF6AD5;
  --grad: linear-gradient(110deg, #7C5CFF 0%, #22D3EE 55%, #FF6AD5 100%);
  --grad-soft: linear-gradient(110deg, rgba(124,92,255,.18), rgba(34,211,238,.14));
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --radius: 18px;
  --maxw: 1120px;
  --font-display: "Space Grotesk", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Space Grotesk", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
strong { color: var(--text); font-weight: 600; }

/* ---------- 背景装饰 ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 35%, transparent 75%);
}
.orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.orb--1 { width: 460px; height: 460px; top: -120px; left: -80px;
  background: radial-gradient(circle, var(--violet), transparent 70%); animation: float1 16s ease-in-out infinite; }
.orb--2 { width: 520px; height: 520px; top: 30%; right: -160px;
  background: radial-gradient(circle, var(--cyan), transparent 70%); animation: float2 20s ease-in-out infinite; }
.orb--3 { width: 420px; height: 420px; bottom: -120px; left: 30%;
  background: radial-gradient(circle, var(--pink), transparent 70%); opacity: .35; animation: float1 22s ease-in-out infinite reverse; }
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px, 50px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px, -40px); } }

/* ---------- 通用 ---------- */
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 999px; cursor: pointer; border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad); color: #0a0a12;
  box-shadow: 0 10px 30px -10px rgba(124,92,255,.6);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(34,211,238,.55); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--violet); transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px clamp(18px, 5vw, 48px);
  background: rgba(6,6,12,0.55); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); background: rgba(6,6,12,0.8); }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px; color: #0a0a12;
  background: var(--grad); box-shadow: 0 8px 22px -8px rgba(124,92,255,.7);
}
.nav__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.1; display: flex; flex-direction: column; }
.nav__name em { font-style: normal; font-size: 11px; color: var(--text-dim); letter-spacing: .12em; text-transform: uppercase; }
.nav__links { display: flex; gap: 28px; font-size: 15px; color: var(--text-soft); }
.nav__links a { position: relative; transition: color .2s ease; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; border-radius: 2px;
  background: var(--grad); transition: width .25s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }
.nav__cta { padding: 9px 20px; font-size: 14px; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ---------- 布局容器 ---------- */
main { position: relative; z-index: 1; }
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 11vw, 130px) clamp(18px, 5vw, 40px); }
.section__head { margin-bottom: 48px; }
.section__tag {
  display: inline-block; font-family: var(--font-display); font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px;
}
.section__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 5vw, 46px); line-height: 1.15; letter-spacing: -.01em; }
.section__title em { font-style: normal; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 120px clamp(18px, 5vw, 40px) 80px;
}
.hero__inner { max-width: 880px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display);
  font-size: 14px; color: var(--text-soft); padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); margin-bottom: 28px;
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(34,211,238,.18); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(34,211,238,.18); } 50% { box-shadow: 0 0 0 8px rgba(34,211,238,.05); } }
.hero__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(56px, 13vw, 132px); line-height: .98; letter-spacing: -.02em; margin-bottom: 26px; }
.hero__sub { font-size: clamp(16px, 2.2vw, 20px); color: var(--text-soft); max-width: 680px; margin: 0 auto 40px; }
.hero__stats { display: flex; justify-content: center; gap: clamp(24px, 6vw, 64px); margin-bottom: 42px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat b { font-family: var(--font-display); font-size: clamp(30px, 5vw, 44px); font-weight: 700; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 13px; color: var(--text-dim); margin-top: 8px; letter-spacing: .04em; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero__scroll { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); width: 26px; height: 44px; border: 2px solid var(--border-strong); border-radius: 14px; display: grid; place-items: start center; padding-top: 8px; }
.hero__scroll-line { width: 4px; height: 10px; border-radius: 4px; background: var(--grad); animation: scrolldot 1.8s infinite; }
@keyframes scrolldot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- ABOUT ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 38px; align-items: start; }
.about__intro p { color: var(--text-soft); margin-bottom: 18px; font-size: 16px; }
.about__meta { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.about__meta li { display: flex; flex-direction: column; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.about__meta li span { font-size: 12px; color: var(--text-dim); letter-spacing: .06em; }
.about__meta li { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.about__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: transform .3s ease, border-color .3s ease, background .3s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.card__icon { font-size: 26px; margin-bottom: 12px; }
.card h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-soft); }

/* ---------- SKILLS ---------- */
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.skill-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; transition: border-color .3s ease; }
.skill-group:hover { border-color: var(--border-strong); }
.skill-group__title { font-family: var(--font-display); font-size: 16px; margin-bottom: 16px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.skill-group__title::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--grad); }
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tag { font-size: 13px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.03); border: 1px solid var(--border); color: var(--text-soft); transition: .2s; }
.tag:hover { color: var(--text); border-color: var(--violet); background: rgba(124,92,255,.1); }

/* ---------- EXPERIENCE TIMELINE ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--violet), var(--cyan), transparent); }
.timeline__item { position: relative; padding-bottom: 36px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: -28px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--violet); box-shadow: 0 0 0 4px rgba(124,92,255,.15); }
.timeline__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; transition: border-color .3s ease, transform .3s ease; }
.timeline__card:hover { border-color: var(--border-strong); transform: translateX(4px); }
.timeline__meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.timeline__company { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.timeline__date { font-size: 13px; color: var(--text-dim); font-family: var(--font-display); }
.timeline__role { color: var(--cyan); font-size: 14px; margin-bottom: 14px; font-weight: 500; }
.timeline__list li { position: relative; padding-left: 18px; color: var(--text-soft); font-size: 14.5px; margin-bottom: 9px; }
.timeline__list li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }

/* ---------- PROJECTS ---------- */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.project { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; position: relative; overflow: hidden; }
.project::after { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.project:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.project:hover::after { opacity: 1; }
.project > * { position: relative; z-index: 1; }
.project--wide { grid-column: 1 / -1; }
.project__top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.project__badge { font-family: var(--font-display); font-size: 12px; padding: 4px 11px; border-radius: 999px; background: rgba(124,92,255,.14); color: var(--violet); border: 1px solid rgba(124,92,255,.3); }
.project__name { font-family: var(--font-display); font-size: 21px; font-weight: 700; }
.project__desc { color: var(--text-soft); font-size: 15px; margin-bottom: 16px; }
.project__stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.project__stack li { font-size: 12px; padding: 5px 11px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--text-soft); font-family: var(--font-display); }
.project__role { color: var(--text-soft); font-size: 14px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: auto; }
.project__more { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.more-item { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; transition: border-color .25s ease; }
.more-item:hover { border-color: var(--violet); }
.more-item b { display: block; font-family: var(--font-display); font-size: 15px; margin-bottom: 4px; }
.more-item span { font-size: 13px; color: var(--text-dim); }

/* ---------- CONTACT ---------- */
.section--contact { max-width: 980px; }
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; align-items: start; }
.contact__info { display: flex; flex-direction: column; gap: 12px; }
.contact__row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color .25s ease, transform .25s ease; }
a.contact__row:hover { border-color: var(--violet); transform: translateX(4px); }
.contact__k { font-family: var(--font-display); font-size: 13px; color: var(--text-dim); width: 64px; flex-shrink: 0; }
.contact__v { font-size: 15px; font-weight: 500; }
.contact__form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 7px; font-family: var(--font-display); }
.field input, .field textarea {
  width: 100%; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 15px; color: var(--text); font-family: var(--font-body); font-size: 15px; resize: vertical;
  transition: border-color .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet); background: rgba(124,92,255,.06); }
.field input.is-error, .field textarea.is-error { border-color: var(--pink); }
.form__hint { font-size: 13.5px; margin-top: 12px; min-height: 18px; }
.form__hint.ok { color: var(--cyan); }
.form__hint.err { color: var(--pink); }

/* ---------- FOOTER ---------- */
.footer { position: relative; z-index: 1; text-align: center; padding: 40px 20px 50px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 13px; }
.footer__note { margin-top: 6px; font-size: 12px; opacity: .7; }

/* ---------- 滚动揭示动画 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .06s; }
.reveal:nth-child(3) { transition-delay: .12s; }
.reveal:nth-child(4) { transition-delay: .18s; }

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 4px; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(8,8,16,.96); backdrop-filter: blur(16px); padding: 16px 24px; border-bottom: 1px solid var(--border);
  }
  .nav.is-open .nav__links a { padding: 12px 0; font-size: 16px; }
  .about, .skills, .projects, .contact { grid-template-columns: 1fr; }
  .about__cards { grid-template-columns: 1fr 1fr; }
  .project__more { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .about__cards { grid-template-columns: 1fr; }
  .about__meta { grid-template-columns: 1fr; }
  .hero__stats { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orb, .hero__scroll-line, .hero__eyebrow .dot { animation: none; }
  html { scroll-behavior: auto; }
}
