/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #080810;
  --bg2:     #0d0d1c;
  --surface: rgba(255,255,255,0.03);
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(167,139,250,0.25);
  --accent:  #7c3aed;
  --accent2: #a78bfa;
  --accent3: #c4b5fd;
  --cyan:    #22d3ee;
  --text:    #e2e8f0;
  --text2:   #64748b;
  --text3:   #94a3b8;
  --radius:  12px;
  --r-sm:    8px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
}
.mono { font-family: 'JetBrains Mono', monospace; }

/* ===== 背景网格 ===== */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(124,58,237,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* 光晕 */
.glow {
  position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0;
}
.glow-1 { width: 600px; height: 600px; top: -200px; left: -100px; background: rgba(124,58,237,0.1); }
.glow-2 { width: 500px; height: 500px; bottom: -150px; right: -100px; background: rgba(34,211,238,0.06); }

/* ===== 导航 ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 60px;
  background: rgba(8,8,16,0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 1rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--accent2);
}
.nav-logo .mono { color: var(--text2); font-size: 0.85em; }
.nav-links { list-style: none; display: flex; gap: 32px; }
.nav-links a {
  color: var(--text2); text-decoration: none; font-size: 0.88rem;
  letter-spacing: 0.05em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent3); }
.nav-indicator {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }

/* ===== HERO ===== */
.hero {
  min-height: 70vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 60px 40px; position: relative; z-index: 1;
}
.hero-inner {
  display: flex; align-items: center; gap: 80px;
  max-width: 1100px; width: 100%;
}

/* 头像 */
.hero-visual { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.avatar-wrap {
  width: 220px; height: 220px; border-radius: 50%; position: relative;
  border: 1px solid var(--border2);
  box-shadow: 0 0 40px rgba(124,58,237,0.2), inset 0 0 40px rgba(124,58,237,0.05);
}
.avatar-scanner {
  position: absolute; inset: -2px; border-radius: 50%;
  background: conic-gradient(transparent 70%, var(--accent2) 80%, transparent 90%);
  animation: scanSpin 3s linear infinite;
}
@keyframes scanSpin { to { transform: rotate(360deg); } }
.avatar-placeholder {
  position: absolute; inset: 6px; border-radius: 50%;
  background: var(--bg2); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; overflow: hidden;
}
.avatar-placeholder svg { width: 80px; height: 80px; opacity: 0.6; }
.photo-hint { font-size: 0.65rem; color: var(--text2); font-family: 'JetBrains Mono', monospace; opacity: 0.6; }
.avatar-img {
  position: absolute; inset: 6px; border-radius: 50%;
  width: calc(100% - 12px); height: calc(100% - 12px);
  object-fit: cover;
}
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 220px; }
.tag {
  font-size: 0.72rem; padding: 4px 12px; border-radius: 20px;
  background: rgba(124,58,237,0.12); border: 1px solid rgba(124,58,237,0.3);
  color: var(--accent3); letter-spacing: 0.03em;
}
.tag-special {
  background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.4);
  color: #fbbf24;
}

/* 文字 */
.hero-text { flex: 1; }
.hero-label { font-size: 0.78rem; color: var(--text2); letter-spacing: 0.1em; margin-bottom: 16px; }
.hero-name {
  font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700;
  line-height: 1.15; margin-bottom: 16px; letter-spacing: -0.02em;
}
.gradient-text {
  background: linear-gradient(90deg, var(--accent2), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-typed { display:none; }
.cursor { display:none; }

.hero-desc { color: var(--text3); font-size: 0.92rem; line-height: 1.85; margin-bottom: 32px; max-width: 500px; }
.hero-stats { display: flex; align-items: center; gap: 0; margin-bottom: 36px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 0 24px; }
.stat:first-child { padding-left: 0; }
.stat-n {
  font-size: 1.4rem; font-weight: 700;
  background: linear-gradient(90deg, var(--accent2), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-l { font-size: 0.75rem; color: var(--text2); letter-spacing: 0.03em; }
.stat-div { width: 1px; height: 36px; background: var(--border); }
.hero-btns { display: flex; gap: 14px; }
.btn {
  padding: 11px 28px; border-radius: var(--r-sm); font-size: 0.88rem;
  font-weight: 600; cursor: pointer; border: none; text-decoration: none;
  display: inline-flex; align-items: center; transition: all 0.25s;
  letter-spacing: 0.04em; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 0 20px rgba(124,58,237,0.3); }
.btn-primary:hover { background: #6d28d9; box-shadow: 0 0 32px rgba(124,58,237,0.5); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text3); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent2); color: var(--accent3); transform: translateY(-1px); }
.scroll-line { display: none; }

/* ===== ASCII Art 展示区 ===== */
.ascii-section {
  width: 100%;
  min-height: 190px;
  padding: 8px 0 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 50%, rgba(124,58,237,0.16), transparent 28%),
    radial-gradient(circle at 78% 48%, rgba(34,211,238,0.12), transparent 30%),
    linear-gradient(180deg, transparent 0%, rgba(124,58,237,0.06) 50%, transparent 100%);
  position: relative;
  isolation: isolate;
}
.ascii-section::before {
  content: '';
  position: absolute;
  inset: 8px 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(34,211,238,0.12) 50%, transparent 52% 100%),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(167,139,250,0.08) 39px, transparent 40px),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(34,211,238,0.05) 19px, transparent 20px);
  opacity: 0.55;
  transform: perspective(460px) rotateX(58deg) scaleX(1.25);
  animation: ascii-grid-drift 6s linear infinite;
}
.ascii-section::after {
  content: '<RIOCOOL/> 0101 BUILD CREATE HACK FUTURE';
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 0;
  transform: translateX(-50%);
  color: rgba(34,211,238,0.22);
  font-family: 'Cascadia Mono', Consolas, 'Courier New', monospace;
  font-size: clamp(0.7rem, 1.2vw, 1rem);
  letter-spacing: 0.22em;
  white-space: nowrap;
  text-shadow: 0 0 16px rgba(34,211,238,0.45);
  animation: ascii-hud-blink 2.8s steps(2, end) infinite;
}
.ascii-art-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 1.2vw, 18px);
  max-width: calc(100vw - 32px);
  padding: 20px 26px;
  overflow: visible;
}
.ascii-art-wrap::before {
  content: '';
  position: absolute;
  inset: 8px -18px;
  z-index: 0;
  border: 1px solid rgba(167,139,250,0.2);
  background: rgba(8,8,16,0.18);
  box-shadow: inset 0 0 28px rgba(124,58,237,0.18), 0 0 34px rgba(34,211,238,0.08);
  clip-path: polygon(4% 0, 96% 0, 100% 16%, 100% 84%, 96% 100%, 4% 100%, 0 84%, 0 16%);
}
.ascii-bg {
  position: absolute;
  inset: -32px -42px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.72;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.ascii-bg span {
  position: absolute;
  top: -120%;
  color: rgba(34,211,238,0.32);
  font-family: 'Cascadia Mono', Consolas, 'Courier New', monospace;
  font-size: 0.72rem;
  line-height: 1.15;
  white-space: pre;
  text-shadow: 0 0 10px rgba(34,211,238,0.45);
  animation: ascii-rain var(--dur, 8s) linear infinite;
  animation-delay: var(--delay, 0s);
}
.ascii-letter {
  position: relative;
  z-index: 2;
  margin: 0;
  white-space: pre;
  font-family: 'Cascadia Mono', Consolas, 'Courier New', monospace;
  font-size: clamp(1rem, 2.2vw, 1.9rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
  color: #c4b5fd;
  background: linear-gradient(90deg, #7c3aed 0%, #c4b5fd 28%, #22d3ee 50%, #c4b5fd 72%, #7c3aed 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ascii-flow 4s linear infinite, ascii-float 3.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.22s), calc(var(--i, 0) * -0.16s);
  filter: drop-shadow(0 0 6px rgba(167,139,250,0.72)) drop-shadow(0 0 18px rgba(34,211,238,0.28));
}
.ascii-letter::before,
.ascii-letter::after {
  content: attr(data-letter);
  position: absolute;
  inset: 0;
  white-space: pre;
  font: inherit;
  line-height: inherit;
  opacity: 0;
  pointer-events: none;
  -webkit-text-fill-color: currentColor;
}
.ascii-letter::before { color: rgba(34,211,238,0.55); transform: translateX(2px); }
.ascii-letter::after { color: rgba(124,58,237,0.55); transform: translateX(-2px); }
.ascii-letter.is-glitch {
  animation: ascii-flow 4s linear infinite, ascii-jitter 90ms steps(2, end) 2;
  filter: drop-shadow(2px 0 0 rgba(34,211,238,0.7)) drop-shadow(-2px 0 0 rgba(124,58,237,0.7));
}
.ascii-letter.is-glitch::before,
.ascii-letter.is-glitch::after { opacity: 0.7; }
.ascii-scanline {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(167,139,250,0.04) 48%,
    rgba(34,211,238,0.2) 50%,
    rgba(167,139,250,0.04) 52%,
    transparent 100%);
  background-size: 100% 220%;
  mix-blend-mode: screen;
  animation: ascii-scan 2.4s linear infinite;
}
@keyframes ascii-flow {
  0%   { background-position: 0% 0%; }
  100% { background-position: 220% 0%; }
}
@keyframes ascii-scan {
  0%   { background-position: 0 -120%; }
  100% { background-position: 0 220%; }
}
@keyframes ascii-jitter {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(2px); }
  100% { transform: translateX(-1px); }
}
@keyframes ascii-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes ascii-rain {
  0% { transform: translateY(-20%); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(210%); opacity: 0; }
}
@keyframes ascii-grid-drift {
  0% { background-position: 0 0, 0 0, 0 0; }
  100% { background-position: 0 0, 80px 0, 0 40px; }
}
@keyframes ascii-hud-blink {
  0%, 78%, 100% { opacity: 0.32; }
  80%, 86% { opacity: 0.85; }
}


/* ===== 通用 Section ===== */
.section { padding: 100px 0; position: relative; z-index: 1; }
.section-alt { background: var(--bg2); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 60px; }

.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 48px; }
.sec-label { font-size: 0.78rem; color: var(--accent2); letter-spacing: 0.1em; }
.sec-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700;
  letter-spacing: -0.02em;
}

/* ===== 置顶高亮卡 ===== */
.highlight-card {
  display: flex; gap: 32px; align-items: stretch;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(34,211,238,0.05));
  border: 1px solid var(--border2); border-radius: var(--radius);
  padding: 32px; margin-bottom: 40px; position: relative; overflow: hidden;
}
.highlight-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
}
.hc-left { flex: 1; }
.hc-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; letter-spacing: 0.1em;
  background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.4);
  color: #fbbf24; margin-bottom: 14px;
}
.hc-left h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 12px; }
.hc-left p { color: var(--text3); font-size: 0.88rem; line-height: 1.8; }

/* 图片插槽通用 */
.hc-img-slot {
  width: 240px; flex-shrink: 0; border-radius: var(--r-sm);
  border: 1px dashed rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.04);
  display: flex; align-items: center; justify-content: center;
  min-height: 140px; overflow: hidden;
}
.hc-img-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); }
.img-hint { font-size: 0.68rem; color: var(--text2); opacity: 0.5; }

/* ===== 轮播 ===== */
.carousel { position: relative; overflow: hidden; }
.carousel-track {
  display: flex; gap: 20px;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}
.two-row-carousel .carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: max-content;
  column-gap: 20px;
  row-gap: 20px;
}
.two-row-carousel .slide {
  width: 280px;
  height: 100%;
}
.two-row-carousel .slide-wide {
  width: 380px;
}

/* 轮播卡片 */
.slide {
  flex: 0 0 280px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: border-color 0.3s;
  display: flex; flex-direction: column;
}
.slide:hover { border-color: var(--border2); }
.slide-wide { flex: 0 0 380px; }
.slide-proj  { flex: 0 0 320px; }

/* 幻灯片图片插槽 */
.slide-img-slot {
  height: 160px; background: rgba(124,58,237,0.04);
  border-bottom: 1px dashed rgba(124,58,237,0.2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.slide-img-slot.tall { height: 200px; }
.slide-img-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.slide-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.slide-tag {
  display: inline-block; font-size: 0.68rem; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; letter-spacing: 0.05em; width: fit-content;
}
.slide-tag.national   { background: rgba(239,68,68,0.1);   color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.slide-tag.provincial { background: rgba(59,130,246,0.1);  color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.slide-tag.tech       { background: rgba(16,185,129,0.1);  color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.slide-tag.intl       { background: rgba(34,211,238,0.1);  color: #22d3ee; border: 1px solid rgba(34,211,238,0.25); }
.slide-tag.media      { background: rgba(251,191,36,0.1);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
.slide-tag.cert       { background: rgba(167,139,250,0.1); color: var(--accent3); border: 1px solid rgba(167,139,250,0.25); }

.slide-body h4 { font-size: 0.92rem; font-weight: 600; line-height: 1.4; }
.slide-body p  { color: var(--text3); font-size: 0.82rem; line-height: 1.7; flex: 1; }
.slide-meta    { font-size: 0.7rem; color: var(--text2); letter-spacing: 0.05em; margin-top: 4px; }

/* 轮播控制 */
.carousel-controls { display: none; }
.carousel-dots { display: none; }
.dot { display: none; }

/* ===== 联系 ===== */
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: start; }
.contact-meta { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.cm-item { display: flex; flex-direction: column; gap: 4px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.cm-item:last-child { border-bottom: none; }
.cm-key { font-size: 0.72rem; color: var(--accent2); letter-spacing: 0.08em; }
.cm-val { font-size: 0.9rem; color: var(--text3); }

.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form input,
.contact-form textarea {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 16px;
  color: var(--text); font-family: inherit; font-size: 0.88rem;
  outline: none; transition: border-color 0.2s; resize: vertical; width: 100%;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text2); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }
.contact-form .btn { align-self: flex-start; }

/* ===== 页脚 ===== */
.footer {
  text-align: center; padding: 28px; font-size: 0.78rem;
  color: var(--text2); border-top: 1px solid var(--border);
  position: relative; z-index: 1; letter-spacing: 0.05em;
}

/* ===== 入场动画 ===== */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .navbar { padding: 14px 24px; }
  .nav-links { gap: 18px; }
  .hero { padding: 90px 24px 60px; }
  .hero-inner { flex-direction: column; gap: 36px; text-align: center; }
  .hero-visual { align-items: center; }
  .hero-desc { margin-inline: auto; }
  .hero-stats { justify-content: center; }
  .hero-btns { justify-content: center; }
  .container { padding: 0 24px; }
  .contact-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .highlight-card { flex-direction: column; }
  .hc-img-slot { width: 100%; min-height: 120px; }
}
@media (max-width: 540px) {
  .nav-links { display: none; }
  .hero-name { font-size: 1.8rem; }
  .slide { flex: 0 0 240px; }
  .slide-wide { flex: 0 0 280px; }
  .slide-proj  { flex: 0 0 260px; }
}
