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

:root {
  --bg: #0a0a0f;
  --bg-card: rgba(18, 18, 30, 0.8);
  --bg-card-hover: rgba(24, 24, 40, 0.9);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #e4e4ed;
  --text-dim: #8888a0;
  --text-muted: #5a5a72;
  --accent: #6c5ce7;
  --accent-glow: rgba(108, 92, 231, 0.3);
  --accent2: #00d2ff;
  --accent2-glow: rgba(0, 210, 255, 0.2);
  --font-sans: 'Inter', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

html { scroll-behavior: smooth; }

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

#particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 32px;
  height: 64px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }
.nav-gh {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  transition: background var(--transition);
}
.nav-gh:hover { background: rgba(255,255,255,0.1); }

/* --- Hero --- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 32px 80px;
}

.hero-content {
  max-width: 680px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--accent2);
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.15);
  margin-bottom: 28px;
}

.hero-title { margin-bottom: 24px; }
.title-line {
  display: block;
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.1;
}
.title-line.accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; }

.btn-primary, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
}

/* Hero visual */
.hero-visual {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.geometric-sphere {
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(108,92,231,0.12), transparent 60%),
              radial-gradient(circle at 60% 60%, rgba(0,210,255,0.08), transparent 60%);
  filter: blur(60px);
  animation: spherePulse 6s ease-in-out infinite;
}

.geometric-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.04);
  transform: translate(-50%, -50%) rotateX(60deg);
  animation: ringRotate 20s linear infinite;
}

@keyframes spherePulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

@keyframes ringRotate {
  from { transform: translate(-50%, -50%) rotateX(60deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateX(60deg) rotateZ(360deg); }
}

/* --- Section Common --- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -1px;
}

/* --- Projects --- */
.work {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px 32px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(108, 92, 231, 0.06), transparent 40%);
  transition: opacity 0.4s;
}

.project-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.project-card:hover::before { opacity: 1; }

.card-glow {
  position: absolute;
  top: -40%; right: -20%;
  width: 200px; height: 200px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.card-index {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.card-tags { display: flex; gap: 8px; }
.tag {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent);
  border: 1px solid rgba(108, 92, 231, 0.15);
}

.card-body {
  flex: 1;
  position: relative;
  z-index: 1;
}

.card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.icon-chainbrand { background: rgba(108, 92, 231, 0.1); }
.icon-ims { background: rgba(0, 210, 255, 0.1); color: var(--accent2); }
.icon-geo { background: rgba(46, 213, 115, 0.1); color: #2ed573; }
.icon-serial { background: rgba(255, 165, 0, 0.1); color: #ffa502; }

.card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.card-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.card-stats {
  display: flex;
  gap: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.stat-label { font-size: 12px; color: var(--text-muted); }

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.card-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.card-arrow {
  font-size: 18px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.project-card:hover .card-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

/* --- About --- */
.about {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 100px 32px 120px;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-card {
  display: flex;
  gap: 32px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.avatar-placeholder {
  width: 80px; height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: #fff;
  flex-shrink: 0;
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.info-label {
  color: var(--text-muted);
  min-width: 48px;
  font-weight: 500;
}

.info-value { color: var(--text); }
.info-value.link {
  color: var(--accent2);
  text-decoration: none;
  transition: opacity var(--transition);
}
.info-value.link:hover { opacity: 0.8; }

.about-text {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.about-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dim);
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 32px 32px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-logo {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-brand p { font-size: 13px; color: var(--text-muted); }

.footer-links { display: flex; gap: 24px; }
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header { padding: 0 20px; }
  .hero { padding: 80px 20px 60px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-visual { display: none; }
  .work { padding: 80px 20px; }
  .projects-grid { grid-template-columns: 1fr; }
  .about { padding: 80px 20px 100px; }
  .about-card { flex-direction: column; text-align: center; }
  .info-row { justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .section-header { margin-bottom: 40px; }
}

@media (max-width: 480px) {
  .nav { gap: 16px; }
  .nav a { font-size: 13px; }
  .project-card { padding: 24px; }
  .card-stats { gap: 20px; }
}
