@font-face {
  font-family: "OPPOSans";
  src: url("../fonts/OPPOSans-R.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "OPPOSans";
  src: url("../fonts/OPPOSans-M.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --text: #1f2329;
  --muted: #646a73;
  --subtle: #8f959e;
  --line: #dee0e3;
  --soft-line: #eff0f1;
  --page: #f5f6f7;
  --surface: #ffffff;
  --primary: #3370ff;
  --primary-deep: #245bdb;
  --primary-soft: #eef4ff;
  --tech: #14c8d4;
  --tech-soft: #e8fbfd;
  --green: #00b578;
  --orange: #f59e0b;
  --shadow: 0 10px 30px rgba(31, 35, 41, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(222, 224, 227, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(222, 224, 227, 0.42) 1px, transparent 1px),
    var(--page);
  background-size: 42px 42px;
  font-family: "OPPOSans", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

body.is-locked {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--page);
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
  padding: 0 clamp(20px, 5vw, 72px);
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--soft-line);
  backdrop-filter: blur(16px);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.hero {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100svh - 132px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  margin: 0 auto;
  padding: clamp(46px, 7vw, 82px) 0 clamp(58px, 8vw, 92px);
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: min(1180px, 100%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(51, 112, 255, 0.28), rgba(20, 200, 212, 0.2), transparent);
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.reveal-group > *,
.reveal-card,
.reveal-section,
.reveal-item,
.footer-grid > *,
.copyright {
  animation: softEnter 1120ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal-group > :nth-child(1) {
  animation-delay: 120ms;
}

.reveal-group > :nth-child(2) {
  animation-delay: 220ms;
}

.reveal-group > :nth-child(3) {
  animation-delay: 320ms;
}

.reveal-group > :nth-child(4) {
  animation-delay: 420ms;
}

.reveal-group > :nth-child(5) {
  animation-delay: 520ms;
}

.reveal-card {
  animation-delay: 440ms;
}

.reveal-section {
  animation-delay: 180ms;
}

.project-card:nth-child(1) {
  animation-delay: 180ms;
}

.project-card:nth-child(2) {
  animation-delay: 260ms;
}

.project-card:nth-child(3) {
  animation-delay: 340ms;
}

.project-card:nth-child(4) {
  animation-delay: 420ms;
}

.project-card:nth-child(n + 5) {
  animation-delay: 500ms;
}

.footer-grid > :nth-child(1) {
  animation-delay: 80ms;
}

.footer-grid > :nth-child(2) {
  animation-delay: 140ms;
}

.footer-grid > :nth-child(3) {
  animation-delay: 200ms;
}

.footer-grid > :nth-child(4) {
  animation-delay: 260ms;
}

.copyright {
  animation-delay: 320ms;
}

@keyframes softEnter {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.scroll-cue {
  position: absolute;
  left: 0;
  bottom: 18px;
  z-index: 2;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 16px;
  border: 1px solid #bacefd;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(51, 112, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
  animation: cueEnter 1280ms cubic-bezier(0.16, 1, 0.3, 1) 760ms both;
}

.scroll-cue::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tech);
  box-shadow: 0 0 0 5px rgba(20, 200, 212, 0.12);
}

.scroll-cue::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 1px solid rgba(51, 112, 255, 0.16);
  animation: cuePulse 2200ms ease-in-out infinite;
  pointer-events: none;
}

.scroll-cue:hover {
  color: var(--primary);
  border-color: #bacefd;
  background: rgba(238, 244, 255, 0.9);
  transform: translateY(-1px);
}

.scroll-cue i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  position: relative;
}

.scroll-cue i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 6px;
  height: 6px;
  border-right: 1.7px solid var(--primary);
  border-bottom: 1.7px solid var(--primary);
  transform: translate(-50%, -50%) rotate(45deg);
  animation: arrowFloat 1800ms ease-in-out infinite;
}

@keyframes cuePulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.96);
  }

  45% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cueEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes arrowFloat {
  0%,
  100% {
    transform: translate(-50%, -58%) rotate(45deg);
  }

  50% {
    transform: translate(-50%, -32%) rotate(45deg);
  }
}

.hero-grid {
  position: absolute;
  inset: 34px -28px 34px auto;
  width: min(520px, 48vw);
  border: 1px solid rgba(51, 112, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(51, 112, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(20, 200, 212, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 85%, transparent);
  pointer-events: none;
}

.hero-grid::before,
.hero-grid::after {
  content: "";
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tech), transparent);
  opacity: 0.64;
}

.hero-grid::before {
  left: 42px;
  right: 88px;
  top: 32%;
}

.hero-grid::after {
  left: 116px;
  right: 28px;
  top: 68%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 18px;
  padding: 0 10px;
  border: 1px solid #bacefd;
  border-radius: 6px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--text);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(51, 112, 255, 0.22);
}

.button.primary:hover {
  background: var(--primary-deep);
}

.button.secondary {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}

.button.secondary:hover {
  border-color: #bacefd;
  color: var(--primary);
  background: var(--primary-soft);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-meta span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
}

.hero-meta[hidden],
.workspace-metrics[hidden],
.stats[hidden] {
  display: none;
}

.hero-workspace {
  min-width: 0;
}

.workspace-window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workspace-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(51, 112, 255, 0.06), transparent 36%),
    linear-gradient(240deg, rgba(20, 200, 212, 0.08), transparent 32%);
  pointer-events: none;
}

.workspace-window > * {
  position: relative;
}

.window-top {
  height: 50px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--soft-line);
}

.window-top strong {
  font-size: 14px;
}

.window-top em {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--green);
  background: #e8fff6;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dee0e3;
}

.window-dots span:first-child {
  background: #ff7875;
}

.window-dots span:nth-child(2) {
  background: #ffc53d;
}

.window-dots span:nth-child(3) {
  background: #34c759;
}

.workspace-profile {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 20px 20px 12px;
}

.workspace-profile img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.workspace-profile b,
.workspace-profile span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-profile b {
  font-size: 18px;
  line-height: 1.25;
}

.workspace-profile span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.workspace-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 18px;
}

.workspace-skills[hidden] {
  display: none;
}

.workspace-skills span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #bacefd;
  border-radius: 6px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
}

.workspace-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--soft-line);
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}

.workspace-metrics div {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  background: #fbfcfd;
}

.workspace-metrics strong {
  color: var(--primary);
  font-size: 24px;
  line-height: 1.1;
}

.workspace-metrics span {
  margin-top: 6px;
  color: var(--subtle);
  font-size: 12px;
}

.section {
  padding: clamp(56px, 7vw, 92px) 0;
}

.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}

.section.dark {
  color: #fff;
  background: #1f2329;
}

.section-head,
.stats,
.projects-grid,
.footer-grid,
.copyright {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: 28px;
}

.section-head.compact {
  grid-template-columns: minmax(0, 720px);
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: 0;
}

.section.dark h2 {
  color: #fff;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.section.dark p {
  color: rgba(255, 255, 255, 0.68);
}

.section.dark .section-kicker {
  color: #7aa2ff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.stat {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 24px;
  background: var(--surface);
}

.stat strong {
  color: var(--primary);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.stat span {
  margin-top: 8px;
  color: var(--muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  min-height: 238px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: #bacefd;
  box-shadow: var(--shadow);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.project-top img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--page);
}

.tag {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.project-card h3 {
  margin: 22px 0 8px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.project-link::after {
  content: "↗";
  line-height: 1;
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}

.social-list a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transition: color 160ms ease, background 160ms ease;
}

.social-list a:hover {
  color: #fff;
  background: var(--primary);
}

.social-list svg {
  display: block;
  width: 20px;
  height: 20px;
}

.footer {
  padding: 52px 0 34px;
  color: rgba(255, 255, 255, 0.65);
  background: #1f2329;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(140px, 1fr));
  gap: 24px;
}

.footer h3,
.footer h4 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
}

.footer p {
  margin: 0;
}

.footer-socials {
  margin-top: 18px;
}

.footer a {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

.footer a:hover {
  color: #fff;
}

.copyright {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.locked-card {
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.locked-card h1 {
  margin: 0 0 10px;
  font-size: 26px;
}

.locked-card p {
  margin: 0;
  color: var(--muted);
}

.mobile-shell .hero {
  min-height: auto;
  grid-template-columns: 1fr;
  padding-top: 38px;
}

.mobile-shell .nav {
  display: none;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 72px;
  }

  .hero-grid {
    inset: auto -20px 30px auto;
    width: min(420px, 82vw);
    height: 360px;
  }

  .hero-workspace {
    max-width: 620px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    height: 58px;
    padding: 0 16px;
  }

  .nav {
    display: none;
  }

  .hero,
  .section-head,
  .stats,
  .projects-grid,
  .footer-grid,
  .copyright {
    width: min(100% - 32px, 1180px);
  }

  .hero {
    padding: 44px 0 72px;
  }

  .scroll-cue {
    bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(34px, 11vw, 52px);
  }

  .section {
    padding: 48px 0;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 560px) {
  .brand span {
    max-width: 150px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-metrics {
    grid-template-columns: 1fr;
  }


  .projects-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* ==========================================================================
   10. 社交图标极致对齐与尺寸重塑 - 防外部干扰强效版
   ========================================================================== */
.social-list a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

.social-list a svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

/* 2026-05-25: Projects section alignment tune */
.section-head {
  grid-template-columns: minmax(0, 520px) minmax(320px, 520px);
  align-items: center;
  gap: clamp(28px, 6vw, 84px);
}

.section-head p {
  max-width: 520px;
  line-height: 1.9;
  align-self: center;
}

.section h2 {
  max-width: 560px;
  font-size: clamp(30px, 3.3vw, 42px);
  line-height: 1.18;
}

.projects-grid {
  margin-top: 18px;
}

@media (min-width: 821px) {
  .section-head {
    margin-bottom: 24px;
  }

  .section-head p {
    padding-top: 28px;
  }
}

@media (max-width: 820px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-head p {
    max-width: none;
    padding-top: 0;
  }
}

/* 2026-05-25: keep projects title on one line on desktop */
@media (min-width: 821px) {
  .section-head h2 {
    max-width: none;
    white-space: nowrap;
  }
}

@media (max-width: 820px) {
  .section-head h2 {
    white-space: normal;
  }
}

/* 2026-05-25: real fix for Projects title single-line desktop layout */
@media (min-width: 821px) {
  #projects .section-head {
    grid-template-columns: minmax(620px, 0.95fr) minmax(300px, 0.75fr);
    gap: clamp(28px, 4vw, 52px);
  }

  #projects .section-head h2 {
    max-width: none !important;
    white-space: nowrap !important;
    word-break: keep-all;
    overflow-wrap: normal;
    font-size: clamp(30px, 3vw, 40px);
  }
}
