@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&family=Noto+Sans+TC:wght@400;700&display=swap');

:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --text: #e5e5e5;
  --text-dim: #737373;
  --text-muted: #525252;
  --border: #262626;
  --border-hover: #404040;
  --accent: #3b82f6;
  --accent-dim: rgba(59, 130, 246, 0.15);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --orange: #f97316;
  --orange-dim: rgba(249, 115, 22, 0.15);
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.15);
  --red: #ef4444;
  --yellow: #eab308;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  --mono: "JetBrains Mono", "Fira Code", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #60a5fa; }

/* ═══ Layout ═══ */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ═══ Nav ═══ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}
.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  transition: all 0.2s;
}
.nav-pill:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--bg-card);
}
.nav-pill svg { width: 14px; height: 14px; }

/* Language Selector */
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 28px 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23737373' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
}
.lang-select:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background-color: var(--bg-card);
}
.lang-select option {
  background: var(--bg);
  color: var(--text);
}

/* ═══ Hero ═══ */
.hero {
  padding: 5rem 0 3rem;
}
.hero-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.hero-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}
.hero-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #fff;
}
.hero-aka {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-weight: 400;
  margin-top: 0.25rem;
}
.hero-tagline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid;
}
.tag-blue { color: var(--accent); background: var(--accent-dim); border-color: rgba(59,130,246,0.25); }
.tag-green { color: var(--green); background: var(--green-dim); border-color: rgba(34,197,94,0.25); }
.tag-orange { color: var(--orange); background: var(--orange-dim); border-color: rgba(249,115,22,0.25); }
.tag-purple { color: var(--purple); background: var(--purple-dim); border-color: rgba(168,85,247,0.25); }

.hero-bio {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 600px;
}

/* ═══ Section ═══ */
.section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ═══ About List ═══ */
.about-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.about-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.about-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.about-icon.blue { background: var(--accent-dim); }
.about-icon.green { background: var(--green-dim); }
.about-icon.orange { background: var(--orange-dim); }
.about-icon.purple { background: var(--purple-dim); }
.about-text {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.about-text strong {
  color: var(--text);
  font-weight: 600;
}

/* ═══ Tech Stack ═══ */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--mono);
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}
.tech-badge:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}
.tech-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ═══ Project Cards ═══ */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.project-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.project-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.project-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
  flex-grow: 1;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s;
}
.project-link:hover { gap: 10px; }
.project-link svg { width: 14px; height: 14px; }

/* ═══ GitHub Stats ═══ */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--mono);
  color: #fff;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}
.github-chart {
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.github-chart img {
  width: 100%;
  display: block;
}

/* ═══ Contact ═══ */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
}
.contact-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}
.contact-item svg { width: 16px; height: 16px; color: var(--text-dim); flex-shrink: 0; }

/* ═══ Minecraft Server ═══ */
.mc-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
  transition: all 0.2s;
}
.mc-banner:hover {
  border-color: var(--border-hover);
}
.mc-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--green-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.mc-info { flex: 1; }
.mc-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}
.mc-addr {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  margin-top: 2px;
}
.mc-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══ Footer ═══ */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.footer-inner {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.footer-links a {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
}
.footer-links a:hover { color: var(--text); }

/* ═══ Animations ═══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* Status dot pulse */
@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.status-pulse {
  animation: statusPulse 2s ease-in-out infinite;
}

/* ═══ Responsive ═══ */
@media (max-width: 640px) {
  .hero { padding: 3rem 0 2rem; }
  .hero-header { flex-direction: column; text-align: center; }
  .hero-avatar { width: 64px; height: 64px; }
  .hero-name { font-size: 1.5rem; }
  .hero-tagline { justify-content: center; }
  .hero-bio { text-align: center; }
  .project-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .site-nav .container { flex-direction: column; gap: 0.75rem; }
  .mc-banner { flex-direction: column; text-align: center; }
  .about-item { flex-direction: column; align-items: center; text-align: center; }
}
