/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0e1a;
  --bg2: #111827;
  --bg3: #1a2235;
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --accent3: #06b6d4;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --border: #1e293b;
  --card: #131c2e;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent3); text-decoration: none; transition: color .2s; }
a:hover { color: #67e8f9; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== Nav ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,14,26,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.1rem; font-weight: 700; color: var(--text);
}

.nav-logo .logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text2); font-size: .9rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative; overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6,182,212,.1) 0%, transparent 60%);
}

.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(99,102,241,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content { position: relative; z-index: 1; max-width: 760px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 999px;
  padding: .35rem 1rem;
  font-size: .8rem; color: #a5b4fc;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #e2e8f0 30%, #a5b4fc 70%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem; color: var(--text2);
  max-width: 560px; margin: 0 auto 2.5rem;
}

.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: 8px;
  font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); color: #fff; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
}
.btn-outline:hover { border-color: var(--accent); color: var(--text); }

/* ===== Stats ===== */
.stats {
  display: flex; justify-content: center; gap: 3rem;
  margin-top: 3rem; flex-wrap: wrap;
}

.stat { text-align: center; }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: .8rem; color: var(--text2); margin-top: .2rem; }

/* ===== Section ===== */
section { padding: 5rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
  display: inline-block;
  background: rgba(99,102,241,.12);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 999px;
  padding: .25rem .9rem;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: .8rem;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; margin-bottom: .6rem;
}

.section-header p { color: var(--text2); max-width: 500px; margin: 0 auto; }

/* ===== Cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s, transform .2s;
  position: relative; overflow: hidden;
}

.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
  opacity: 0; transition: opacity .2s;
}

.card:hover { border-color: rgba(99,102,241,.4); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }

.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 1rem;
}

.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.card p { font-size: .88rem; color: var(--text2); line-height: 1.6; }

.card-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tag {
  background: rgba(99,102,241,.1);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,.2);
  border-radius: 4px;
  padding: .15rem .55rem;
  font-size: .75rem;
}

.card-meta { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; font-size: .8rem; color: var(--text2); }

/* ===== Topics ===== */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.topic-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}

.topic-card:hover { border-color: rgba(99,102,241,.4); background: var(--bg3); }

.topic-icon { font-size: 2rem; margin-bottom: .6rem; }
.topic-name { font-size: .9rem; font-weight: 600; margin-bottom: .3rem; }
.topic-count { font-size: .78rem; color: var(--text2); }

/* ===== Timeline ===== */
.timeline { max-width: 700px; margin: 0 auto; }
.timeline-item {
  display: flex; gap: 1.5rem;
  padding-bottom: 2rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute; left: 19px; top: 40px; bottom: 0;
  width: 1px; background: var(--border);
}
.timeline-item:last-child::before { display: none; }

.timeline-dot {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  border: 2px solid var(--border);
  background: var(--card);
  position: relative; z-index: 1;
}

.timeline-content { flex: 1; padding-top: .4rem; }
.timeline-date { font-size: .78rem; color: var(--text2); margin-bottom: .3rem; }
.timeline-content h3 { font-size: .95rem; font-weight: 600; margin-bottom: .3rem; }
.timeline-content p { font-size: .85rem; color: var(--text2); }

/* ===== About ===== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}

.about-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; margin-bottom: 1.5rem;
}

.about-text h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; }
.about-text p { color: var(--text2); margin-bottom: 1rem; font-size: .95rem; }

.skills-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.skill-badge {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .3rem .8rem;
  font-size: .82rem; color: var(--text2);
}

/* ===== Footer ===== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem;
  text-align: center;
}

.footer-logo { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.footer-desc { font-size: .85rem; color: var(--text2); margin-bottom: 2rem; }
.footer-links { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.footer-links a { font-size: .85rem; color: var(--text2); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: .8rem; color: var(--text2); opacity: .6; }

/* ===== Page Header ===== */
.page-hero {
  padding: 8rem 2rem 4rem;
  text-align: center;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(99,102,241,.12) 0%, transparent 70%);
}

.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: .8rem; }
.page-hero p { color: var(--text2); max-width: 500px; margin: 0 auto; }

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex; gap: .6rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .4rem 1rem;
  font-size: .85rem; color: var(--text2);
  cursor: pointer; transition: all .2s;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(99,102,241,.1);
}

/* ===== Note Card ===== */
.note-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all .2s;
  display: flex; flex-direction: column; gap: .8rem;
}

.note-card:hover { border-color: rgba(99,102,241,.4); transform: translateY(-2px); }

.note-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.note-card h3 { font-size: .95rem; font-weight: 600; line-height: 1.4; }
.note-card p { font-size: .85rem; color: var(--text2); line-height: 1.6; }
.note-level {
  flex-shrink: 0;
  padding: .2rem .6rem;
  border-radius: 4px;
  font-size: .72rem; font-weight: 600;
}
.level-beginner { background: rgba(34,197,94,.1); color: #4ade80; border: 1px solid rgba(34,197,94,.2); }
.level-intermediate { background: rgba(234,179,8,.1); color: #facc15; border: 1px solid rgba(234,179,8,.2); }
.level-advanced { background: rgba(239,68,68,.1); color: #f87171; border: 1px solid rgba(239,68,68,.2); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 1rem 2rem; gap: 1rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats { gap: 1.5rem; }
  .hero-btns { flex-direction: column; align-items: center; }
}
