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

/* ===== Variables ===== */
:root {
  --bg: #0a0a0f;
  --surface: #13131a;
  --surface-2: #1a1a25;
  --border: #2a2a35;
  --text: #f8fafc;
  --text-dim: #94a3b8;
  --text-mute: #64748b;
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.15);
  --gradient: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --radius: 12px;
  --max-w: 1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===== Navigation ===== */
nav {
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--text);
}

.logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* ===== Hero ===== */
.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  padding: 80px 0;
}

.hero-content { max-width: 720px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -2px;
  font-weight: 800;
  margin-bottom: 24px;
}

.hero h1 .accent-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.25);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}

/* ===== Sections ===== */
section { padding: 80px 0; }

.section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.section-heading {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 600px;
  margin-bottom: 48px;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.about-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.about-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.about-card .num {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
  letter-spacing: -1px;
}

.about-card .label {
  font-size: 13px;
  color: var(--text-dim);
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.project {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
  position: relative;
}

.project:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.project .icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: inline-block;
}

.project h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.project p {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.65;
}

.project a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.project a:hover { text-decoration: underline; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.project-tag {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--surface-2);
  border-radius: 4px;
  color: var(--text-mute);
}

/* ===== Contact ===== */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}

.contact-card h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.contact-card p {
  color: var(--text-dim);
  margin-bottom: 28px;
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-mute);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-inner a {
  color: var(--text-dim);
  text-decoration: none;
}

.footer-inner a:hover { color: var(--text); }

/* ===== Article (privacy page) ===== */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  position: relative;
  z-index: 1;
}

.article h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.article .meta {
  color: var(--text-mute);
  font-size: 14px;
  margin-bottom: 40px;
}

.article h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.article p {
  color: var(--text-dim);
  margin-bottom: 16px;
}

.article ul {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--text-dim);
}

.article li { margin-bottom: 8px; }

.article a {
  color: var(--accent);
  text-decoration: none;
}

.article a:hover { text-decoration: underline; }

/* ===== Reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .nav-links { gap: 16px; font-size: 13px; }
  .hero { padding: 48px 0; min-height: auto; }
  section { padding: 56px 0; }
  .contact-card { padding: 32px 20px; }
  .contact-card h2 { font-size: 24px; }
}
