/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2333;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #58a6ff;
  --accent-glow: rgba(88, 166, 255, 0.25);
  --accent2: #f0883e;
  --accent3: #3fb950;
  --border: #30363d;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: #79c0ff; }

/* ===== Navbar ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-brand { font-family: "Space Mono", monospace; font-size: 1.4rem; font-weight: 700; color: var(--accent); letter-spacing: 2px; }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-secondary); font-size: 0.92rem; font-weight: 500; padding: 0.4rem 0; border-bottom: 2px solid transparent; transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); border-bottom-color: var(--accent); }

.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.6rem; cursor: pointer; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; padding: 6rem 2rem 4rem; text-align: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(88, 166, 255, 0.08) 0%, transparent 70%),
              radial-gradient(ellipse at 80% 70%, rgba(240, 136, 62, 0.06) 0%, transparent 60%);
}

.hero-avatar { font-size: 5rem; margin-bottom: 1.5rem; animation: float 3s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; margin-bottom: 0.75rem; }
.accent { color: var(--accent); }

.hero-subtitle { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.hero-desc { font-size: 1rem; color: var(--text-secondary); max-width: 480px; margin: 0 auto 2.5rem; }

.hero-stats { display: flex; gap: 3rem; justify-content: center; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--accent); font-family: "Space Mono", monospace; }
.stat-label { font-size: 0.85rem; color: var(--text-secondary); }

.scroll-indicator { position: absolute; bottom: 2rem; font-size: 1.5rem; color: var(--text-secondary); animation: bounce 1.5s infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ===== Sections ===== */
.section { padding: 6rem 2rem; max-width: 1200px; margin: 0 auto; }

.section-title { font-size: 2.2rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.section-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 3rem; font-size: 1.05rem; }
.subsection-title { font-size: 1.4rem; font-weight: 600; margin: 3rem 0 1.5rem; color: var(--text-primary); }

/* ===== Life Timeline ===== */
.life-section { background: var(--bg-secondary); max-width: 100%; padding: 6rem 2rem; }
.life-section .section-title, .life-section .section-subtitle { max-width: 1200px; margin-left: auto; margin-right: auto; }

.timeline { max-width: 800px; margin: 0 auto; position: relative; }
.timeline::before { content: ""; position: absolute; left: 2rem; top: 0; bottom: 0; width: 2px; background: var(--border); }

.timeline-item { display: flex; gap: 1.5rem; margin-bottom: 2.5rem; position: relative; }
.timeline-date { flex-shrink: 0; width: 80px; text-align: right; font-family: "Space Mono", monospace; font-size: 0.85rem; color: var(--accent); padding-top: 0.3rem; }
.timeline-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; flex: 1; transition: var(--transition); }
.timeline-card:hover { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.card-icon { font-size: 2rem; margin-bottom: 0.8rem; }
.timeline-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.timeline-card p { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 0.8rem; }

.tag { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 100px; font-size: 0.75rem; font-weight: 500; background: rgba(88, 166, 255, 0.15); color: var(--accent); }

/* ===== AI Skill Tree ===== */
.ai-section { background: var(--bg-primary); }

.skill-tree { max-width: 900px; margin: 0 auto; }
.skill-root { text-align: center; }
.center-node { display: inline-block; padding: 0.8rem 2rem; border-radius: 100px; font-size: 1.3rem; font-weight: 700; background: linear-gradient(135deg, var(--accent), #a371f7); color: #fff; margin-bottom: 2.5rem; box-shadow: 0 0 30px rgba(88, 166, 255, 0.3); }

.skill-branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.branch-label { font-weight: 600; font-size: 1.05rem; margin-bottom: 1rem; color: var(--accent); text-align: center; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }
.branch-items { display: flex; flex-direction: column; gap: 0.6rem; }

.skill-tag { display: block; padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-size: 0.88rem; background: var(--bg-card); border: 1px solid var(--border); text-align: center; transition: var(--transition); }
.skill-tag.mastered { border-color: var(--accent3); background: rgba(63, 185, 80, 0.08); }
.skill-tag.mastered::after { content: " ✓"; color: var(--accent3); }
.skill-tag.learning { border-color: var(--accent2); background: rgba(240, 136, 62, 0.08); }
.skill-tag.learning::after { content: " ⌛"; color: var(--accent2); }

/* ===== Notes ===== */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

.note-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: var(--transition); }
.note-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.note-card h4 { font-size: 1.05rem; margin-bottom: 0.6rem; color: var(--accent); }
.note-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }
.note-meta { display: flex; gap: 1.5rem; font-size: 0.8rem; color: var(--text-secondary); }

/* ===== Moto ===== */
.moto-section { background: var(--bg-secondary); max-width: 100%; padding: 6rem 2rem; }
.moto-section .section-title, .moto-section .section-subtitle, .moto-section .subsection-title, .moto-section .moto-showcase { max-width: 1200px; margin-left: auto; margin-right: auto; }

.moto-card.main { display: flex; gap: 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; margin-bottom: 2rem; transition: var(--transition); }
.moto-card.main:hover { border-color: var(--accent2); box-shadow: 0 0 30px rgba(240, 136, 62, 0.15); }
.moto-img-placeholder { flex-shrink: 0; width: 200px; height: 200px; border-radius: var(--radius); background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); display: flex; align-items: center; justify-content: center; font-size: 5rem; border: 1px solid var(--border); }
.moto-info h3 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.moto-spec { color: var(--accent2); font-size: 0.95rem; font-weight: 500; margin-bottom: 0.8rem; }
.moto-desc { color: var(--text-secondary); font-size: 0.93rem; margin-bottom: 1rem; line-height: 1.8; }
.moto-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.moto-stats span { font-size: 0.85rem; color: var(--accent); font-family: "Space Mono", monospace; }

/* ===== Routes ===== */
.route-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }

.route-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: var(--transition); }
.route-card:hover { border-color: var(--accent2); }
.route-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.route-icon { font-size: 1.5rem; }
.route-header h4 { font-size: 1.05rem; flex: 1; }
.route-badge { padding: 0.15rem 0.6rem; border-radius: 100px; font-size: 0.72rem; font-weight: 600; }
.route-badge.done { background: rgba(63, 185, 80, 0.2); color: var(--accent3); }
.route-badge.plan { background: rgba(240, 136, 62, 0.2); color: var(--accent2); }
.route-path { font-size: 0.88rem; color: var(--text-primary); margin-bottom: 0.4rem; }
.route-detail { font-size: 0.8rem; color: var(--text-secondary); }

/* ===== Gear ===== */
.gear-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.gear-item { display: flex; gap: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; align-items: flex-start; transition: var(--transition); }
.gear-item:hover { border-color: var(--border); background: #1e293b; }
.gear-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.gear-item strong { display: block; font-size: 0.95rem; margin-bottom: 0.2rem; }
.gear-item p { color: var(--text-secondary); font-size: 0.82rem; }

/* ===== Contact ===== */
.contact-section { background: var(--bg-primary); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; max-width: 800px; margin: 0 auto; }

.contact-card { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2rem 1.5rem; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border); text-align: center; transition: var(--transition); color: var(--text-primary); }
.contact-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.contact-icon { font-size: 2rem; }
.contact-label { font-size: 0.85rem; color: var(--text-secondary); }
.contact-value { font-size: 0.95rem; color: var(--accent); font-family: "Space Mono", monospace; }

/* ===== Footer ===== */
.footer { text-align: center; padding: 3rem 2rem; border-top: 1px solid var(--border); background: var(--bg-primary); }
.footer p { color: var(--text-secondary); font-size: 0.9rem; }
.footer-quote { margin-top: 0.5rem; font-style: italic; font-size: 0.85rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar { padding: 0.8rem 1.2rem; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-primary); border-bottom: 1px solid var(--border); flex-direction: column; padding: 1rem 2rem; gap: 1rem; }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }

  .section { padding: 4rem 1.2rem; }
  .life-section, .moto-section { padding: 4rem 1.2rem; }

  .hero { padding: 5rem 1.2rem 3rem; }
  .hero-stats { gap: 1.5rem; }

  .timeline::before { left: 1.2rem; }
  .timeline-item { flex-direction: column; gap: 0.3rem; }
  .timeline-date { width: auto; text-align: left; font-size: 0.8rem; }

  .moto-card.main { flex-direction: column; align-items: center; text-align: center; }
  .moto-img-placeholder { width: 150px; height: 150px; font-size: 3.5rem; }
  .moto-stats { justify-content: center; }

  .skill-branches { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .section-title { font-size: 1.6rem; }
}
