/* ============================================================
   企业级业务中台 — 项目展示站
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --background: #101010;
  --sec: #a476ff;
  --white: #dfdfdf;
  --white-icon: #f3f3f398;
  --white-icon-tr: #f3f3f310;
  --component-bg: #1414149c;
  --nav-dot: #a9ff5b;
  --hairline: #ffffff10;
  --nav-collapsed: 528px;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
  padding: 0;
  margin: 0;
}
* {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
}
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; -webkit-tap-highlight-color: transparent; }
body { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
img, svg, canvas, iframe { display: block; vertical-align: middle; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; background: transparent; font: inherit; letter-spacing: inherit; color: inherit; }
input, textarea { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { opacity: 1; color: #9ca3af; }
ul { list-style: none; }
textarea { resize: vertical; }

*::selection { background-color: var(--sec); color: var(--background); }
*::-moz-selection { background-color: var(--sec); color: var(--background); }

::-webkit-scrollbar { width: 15px; }
::-webkit-scrollbar-track { background: transparent; border-radius: 30px; }
::-webkit-scrollbar-thumb { background: var(--background); border-radius: 10px; }
* { scrollbar-width: thin; }

/* ---------- Body layout ---------- */
body {
  background-color: var(--background);
  padding-left: 2.25rem;
  padding-right: 2.25rem;
}
@media (min-width: 640px) { body { padding-left: 7rem; padding-right: 7rem; } }
@media (min-width: 1024px) { body { padding-left: 5rem; padding-right: 5rem; } }
@media (max-width: 767px) { body { padding-bottom: 70px; } }

/* ============================================================
   NAV — fixed capsule, collapses on scroll
   ============================================================ */
.nav-wrap { display: flex; justify-content: center; width: 100%; }

#main-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  bottom: 0;
  width: 80%;
  background-color: var(--background);
  border: 1px solid transparent;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transition: background-color .3s ease, border-radius .3s ease, border-color .3s ease;
}
@media (min-width: 768px) {
  #main-nav { top: 1.5rem; bottom: auto; }
}
#main-nav.scrolling {
  background-color: transparent;
  border-color: var(--hairline);
  border-radius: 9999px;
}

.nav-container {
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: .75rem;
}
@media (min-width: 1024px) { .nav-container { max-width: 1024px; } }
@media (min-width: 1280px) { .nav-container { max-width: 1280px; } }

.nav-list {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .nav-list { justify-content: center; gap: 3rem; }
  .nav-list > * + * { margin-left: 1.5rem; }
}
.nav-item { flex: 1 1 0%; }
@media (min-width: 768px) { .nav-item { flex: none; } }

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  color: var(--white-icon);
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(.4,0,.2,1);
  transition-duration: .15s;
  font-size: .75rem;
  line-height: 1rem;
  position: relative;
}
@media (min-width: 768px) { .nav-link { font-size: 1rem; line-height: 1.5rem; } }
.nav-link.active { color: #fff !important; }

.nav-indicator {
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: .5rem;
  height: .5rem;
  border-radius: 9999px;
  background-color: var(--nav-dot);
  opacity: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  display: none;
}
@media (min-width: 768px) { .nav-indicator { display: block; } }
.nav-link.active .nav-indicator { transform: translateY(-50%) scale(1); opacity: 1; }

.nav-icon { display: flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; }
.nav-label-desktop { display: none; }
.nav-label-mobile { display: inline; }
@media (min-width: 768px) {
  .nav-icon { display: none; }
  .nav-label-desktop { display: inline-block; }
  .nav-label-mobile { display: none; }
}

@media (max-width: 767px) {
  #main-nav {
    width: 100% !important;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    position: fixed;
    border-radius: 1rem 1rem 0 0;
    border-color: var(--hairline);
  }
  #main-nav.scrolling { border-radius: 1rem 1rem 0 0; background-color: transparent; }
}

/* ============================================================
   Shared helpers
   ============================================================ */
.eyebrow {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--sec);
  margin-bottom: .5rem;
}
.section-title {
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 2rem;
}
@media (min-width: 768px) { .section-title { font-size: 3rem; line-height: 1; } }

.shiny-sec {
  background: linear-gradient(135deg, #a476ff 25%, #eee5ff, #a476ff 75%);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 3s linear infinite;
}
@keyframes shine {
  0% { background-position: 100% 50%; }
  30%, 70% { background-position: 0% 50%; }
}

/* ============================================================
   HOME
   ============================================================ */
.section-home { color: var(--white); margin-top: 3rem; }
@media (min-width: 768px) { .section-home { margin-top: 0; } }

.home-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding-bottom: 3.5rem;
}
.home-inner > * + * { margin-top: 2rem; }
@media (min-width: 768px) {
  .home-inner { padding-top: 9rem; padding-bottom: 9rem; }
}

.home-intro { text-align: left; }
.home-intro > * + * { margin-top: 1rem; }

.intro-greeting {
  font-size: 1rem;
  line-height: 1.5rem;
  color: var(--white-icon);
}
@media (min-width: 768px) { .intro-greeting { font-size: 1.125rem; line-height: 1.75rem; } }

.intro-headline {
  display: flex;
  flex-direction: column;
}
.intro-headline > * + * { margin-top: 1rem; }
@media (min-width: 1024px) {
  .intro-headline { flex-direction: row; align-items: center; gap: 1rem; }
  .intro-headline > * + * { margin-top: 0; margin-left: 2rem; }
}
.intro-title {
  color: var(--white);
  font-size: 3rem;
  line-height: 1;
  font-weight: 500;
  text-wrap: pretty;
}
@media (min-width: 768px) { .intro-title { font-size: 3.75rem; } }
.intro-sub {
  font-size: 1rem;
  line-height: 1.5rem;
  color: var(--white-icon);
}
@media (min-width: 768px) { .intro-sub { font-size: 1.5rem; line-height: 2rem; } }

/* ---------- Tech marquee ---------- */
.marquee { position: relative; overflow-x: hidden; padding-top: 2rem; padding-bottom: 2rem; }
.marquee-fade-left, .marquee-fade-right {
  pointer-events: none;
  position: absolute;
  top: 0; bottom: 0;
  width: 8rem;
  z-index: 20;
}
.marquee-fade-left { left: 0; background-image: linear-gradient(to right, var(--background), transparent); }
.marquee-fade-right { right: 0; background-image: linear-gradient(to left, var(--background), transparent); }

.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: scroll 60s linear infinite;
}
@media (min-width: 768px) { .marquee-track { animation-duration: 50s; } }
@keyframes scroll {
  0% { transform: translateZ(0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-right: 3rem;
  transition: all .3s;
}
@media (min-width: 768px) { .marquee-item { padding-right: 5rem; } }
.marquee-item img {
  height: 1.75rem;
  width: auto;
  object-fit: contain;
  opacity: .6;
  transition: transform .15s;
}
.marquee-item:hover img { transform: scale(1.1); }
.marquee-item span {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 500;
  color: var(--white-icon);
  white-space: nowrap;
}

/* ---------- Home lower (skills + glitch) ---------- */
.home-lower {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .home-lower { flex-direction: row; }
}

/* Skills accordion */
.skills { text-align: left; padding-top: .75rem; }
@media (min-width: 768px) { .skills { padding-top: 2.25rem; } }
.skills-title {
  color: var(--white);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
}
@media (min-width: 768px) { .skills-title { font-size: 2.25rem; line-height: 2.5rem; margin-bottom: 1.5rem; } }
.skills-list { margin-top: 1rem; font-size: 1.125rem; line-height: 1.75rem; }
.skills-list > li + li { margin-top: 1rem; }
.skill-item { width: 100%; }

.skill-card {
  width: 100%;
  background-color: var(--component-bg);
  border-radius: 1rem;
  text-align: left;
  border: 1px solid var(--white-icon-tr);
  cursor: pointer;
  overflow: hidden;
  transition: all .15s;
}
@media (min-width: 768px) { .skill-card { width: 440px; } }

.skill-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
}
.skill-head-icon { width: 1.5rem; height: 1.5rem; color: var(--sec); opacity: .7; flex-shrink: 0; }
.skill-head-mid {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-grow: 1;
  justify-content: space-between;
}
.skill-name-box { min-width: 0; max-width: 240px; overflow: hidden; }
@media (min-width: 768px) { .skill-name-box { max-width: none; } }
.skill-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--white);
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.skill-chevron {
  width: 1.5rem; height: 1.5rem;
  color: var(--white);
  flex-shrink: 0;
  transition: transform .15s;
}
.skill-card.open .skill-chevron { transform: rotate(180deg); }

.skill-body {
  transition: all .3s;
  padding-left: 1rem;
  padding-right: 1rem;
  max-height: 0;
  opacity: 0;
}
.skill-card.open .skill-body { max-height: 500px; padding-bottom: 1rem; opacity: 1; }
.skill-body ul > * + * { margin-top: .5rem; }
.skill-body ul { color: var(--white-icon); font-size: .875rem; line-height: 1.25rem; }
.skill-bullet-row { display: flex; align-items: center; }
.skill-bullet-row .dot { padding-left: .25rem; }
.skill-bullet-row li { padding-left: .75rem; }

/* Letter glitch */
.glitch-wrap {
  display: flex;
  justify-content: center;
  width: 290px;
  height: 290px;
  padding-top: .75rem;
}
@media (min-width: 768px) {
  .glitch-wrap { width: 100%; height: 292px; padding-top: 2.25rem; margin-left: 4rem; }
}
.glitch-box { position: relative; width: 100%; height: 100%; background-color: #101010; overflow: hidden; }
.glitch-canvas { display: block; width: 100%; height: 100%; }
.glitch-vignette {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(16,16,16,0) 60%, rgba(16,16,16,1) 100%);
}

/* ============================================================
   ARCHITECTURE
   ============================================================ */
.section-projects {
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--hairline);
  color: var(--white);
}
.projects-inner { max-width: 72rem; margin: 0 auto; }

.arch-wrap { width: 100%; }
.arch-frame {
  border-radius: 1rem;
  overflow: auto;
  border: 1px solid var(--white-icon-tr);
  background-color: #101010;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.25), 0 4px 6px -4px rgba(0,0,0,.2);
}
.arch-img {
  width: 100%;
  height: auto;
  display: block;
  min-width: 720px;
}

/* ============================================================
   ACHIEVEMENTS
   ============================================================ */
.section-contact {
  width: 100%;
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--hairline);
}
.contact-inner { max-width: 64rem; margin: 0 auto; }
.section-contact .section-title { margin-bottom: 1.5rem; }

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .achievements-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

.achieve-card {
  background-color: var(--component-bg);
  border: 1px solid var(--white-icon-tr);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem;
  text-align: left;
  transition: border-color .25s ease, transform .25s ease, background-color .25s ease;
  min-height: 11rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.achieve-card:hover {
  border-color: color-mix(in srgb, var(--sec) 55%, transparent);
  transform: translateY(-2px);
  background-color: #141414cc;
}
.achieve-metric {
  font-size: 2.5rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}
@media (min-width: 768px) {
  .achieve-metric { font-size: 3rem; }
}
.achieve-title {
  color: var(--white);
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 600;
}
.achieve-desc {
  color: var(--white-icon);
  font-size: .9375rem;
  line-height: 1.5rem;
  margin-top: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  width: 100%;
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--hairline);
}
.footer-inner { max-width: 64rem; margin: 0 auto; }

.footer-copy-wrap { padding-top: 0; }
.footer-copy { text-align: center; font-size: .875rem; line-height: 1.25rem; color: var(--white-icon); }
.footer-copy-line { display: block; }
@media (min-width: 640px) { .footer-copy-line { display: inline; } }

/* ============================================================
   Accessibility
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .shiny-sec { animation: none !important; }
  * { transition-duration: .01ms !important; }
}
