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

:root {
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-elevated: #1c2128;
  --border: #30363d;
  --border-subtle: #21262d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --accent: #58a6ff;
  --accent-dim: rgba(88, 166, 255, 0.15);
  --accent-glow: rgba(88, 166, 255, 0.08);
  --green: #3fb950;
  --yellow: #d29922;
  --radius: 8px;
  --radius-lg: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover {
  color: var(--text-primary);
}

/* Banner */
.banner-wrap {
  margin-top: 53px; /* height of fixed nav */
  width: 100%;
  overflow: hidden;
  line-height: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.banner-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - 280px - 53px);
  display: flex;
  align-items: center;
  padding: 60px 24px 80px;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.25);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(44px, 8vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.hero-bio {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
}

.btn-primary:hover {
  background: #79c0ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(88, 166, 255, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

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

/* Skills */
.skills {
  padding: 40px 0 80px;
  border-top: 1px solid var(--border-subtle);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  transition: all 0.15s;
}

.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* Projects */
.projects {
  padding: 80px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, var(--accent-glow), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.project-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
}

.project-arrow {
  color: var(--text-muted);
  transition: color 0.15s, transform 0.15s;
}

.project-card:hover .project-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.project-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.project-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}

.project-footer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.project-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.lang-dot--yellow {
  background: var(--yellow);
}

/* Connect */
.connect {
  padding: 80px 0;
  border-top: 1px solid var(--border-subtle);
}

.connect-inner {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.connect-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.connect-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.connect-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 20px;
  transition: all 0.15s;
}

.social-link:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  transform: translateY(-1px);
}

/* Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
}

.footer .container {
  display: flex;
  justify-content: center;
}

.footer span {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Responsive */
@media (max-width: 640px) {
  .hero {
    padding: 40px 24px 60px;
  }

  .hero-title {
    letter-spacing: -1.5px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .connect-links {
    flex-direction: column;
    align-items: center;
  }
}
