:root {
  --bg: #03030a;
  --bg-elevated: #0a0a14;
  --bg-card: #08080f;
  --text: #e6e8f0;
  --text-muted: #8a90a8;
  --accent: #a5b4fc;
  --accent-glow: #6366f1;
  --border: #1f2233;
  --card-border: #1a1d2b;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Canvas Night Sky */
#sky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: linear-gradient(to bottom, rgba(3,3,10,0.85), transparent);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
}

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

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

/* Hero */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 120px 32px 80px;
  position: relative;
}

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

.eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 500;
}

.hero h1 {
  font-size: clamp(56px, 7.2vw, 92px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.94;
  margin-bottom: 20px;
}

.tagline {
  font-size: clamp(19px, 2.1vw, 24px);
  color: var(--text-muted);
  max-width: 460px;
  margin-bottom: 40px;
  line-height: 1.45;
}

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

.meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.dot {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.23, 1.0, 0.32, 1);
  border: 1px solid transparent;
}

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

.btn-primary:hover {
  background: #c3c9ff;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(165, 180, 252, 0.3);
}

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

.btn-secondary:hover {
  background: rgba(255,255,255,0.03);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 13px;
  padding: 10px 18px;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.btn-large {
  padding: 16px 30px;
  font-size: 15px;
  gap: 12px;
}

/* Sections */
.section {
  padding: 96px 32px;
  max-width: 1080px;
  margin: 0 auto;
}

.section-dark {
  background: var(--bg-elevated);
  margin: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
}

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--accent);
  background: rgba(165, 180, 252, 0.08);
  padding: 2px 9px;
  border-radius: 4px;
}

.section-header h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.about-text {
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 42ch;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), 
              border-color 0.2s ease,
              box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 168px;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px -15px rgba(0, 0, 0, 0.5);
}

.project-name {
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}

.project-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.project-stats {
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-skeleton {
  height: 168px;
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

.projects-footer {
  margin-top: 32px;
  text-align: center;
}

/* Connect */
.connect-container {
  text-align: center;
  max-width: 540px;
}

.connect-text {
  font-size: 15.5px;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.connect-meta {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.connect-meta a {
  color: inherit;
  text-decoration: none;
}

.connect-meta a:hover {
  color: var(--text);
}

/* Footer */
.footer {
  padding: 52px 32px 42px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer .container {
  max-width: 1080px;
  margin: 0 auto;
}

/* Responsive */
@media (max-width: 640px) {
  .nav-inner {
    padding: 0 20px;
  }
  
  .nav-links {
    gap: 20px;
  }
  
  .hero {
    padding: 110px 20px 60px;
    min-height: 92dvh;
  }
  
  .section {
    padding: 70px 20px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Subtle accessibility focus */
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
