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

:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --bg-card: #16161a;
  --text: #ededef;
  --text-muted: #8b8b8e;
  --accent: #6c63ff;
  --accent-hover: #7b73ff;
  --accent-glow: rgba(108, 99, 255, 0.15);
  --border: #222226;
  --success: #22c55e;
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 200;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  z-index: 100;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

nav.scrolled {
  border-bottom-color: var(--border);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: var(--transition);
  font-weight: 500;
}

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

.nav-resume {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text) !important;
}

.nav-resume:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 120px 48px 80px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 64px;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-visual {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.profile-pic {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.code-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 340px;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.code-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.code-dots span:first-child { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:last-child { background: #28c840; }

.kw { color: #c678dd; }
.fn { color: #61afef; }
.prop { color: #e06c75; }
.str { color: #98c379; }

section {
  padding: 100px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

section > h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 640px;
}

.about-stats {
  display: flex;
  gap: 48px;
  margin-top: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: rgba(108, 99, 255, 0.35);
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.project-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-accent-bar,
.project-card.featured .project-accent-bar {
  opacity: 1;
}

.project-card.coming-soon {
  border-style: dashed;
}

.project-image {
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(108, 99, 255, 0.05) 100%);
}

.project-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
  opacity: 0.25;
}

.project-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.project-tags span {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.project-tags .tag-muted {
  background: rgba(139, 139, 142, 0.1);
  color: var(--text-muted);
}

.project-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.project-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.project-highlights {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.project-highlights li {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.project-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.project-links {
  display: flex;
  gap: 16px;
  margin-top: auto;
}

.project-link {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  transition: var(--transition);
}

.project-link:hover {
  color: var(--accent-hover);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

.skill-category:hover {
  border-color: rgba(108, 99, 255, 0.3);
}

.skill-category h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent);
}

.skill-category li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.skill-category li:last-child {
  border-bottom: none;
}

.contact {
  text-align: center;
}

.contact h2 {
  margin-bottom: 16px;
}

.contact > p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.contact-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-actions .btn-outline {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 0.85rem;
}

.copy-email-text::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  vertical-align: -3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8b8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  opacity: 0.8;
}

#copy-email.copied .copy-email-text::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

.social-links a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}

.social-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.social-links svg {
  width: 20px;
  height: 20px;
}

footer {
  text-align: center;
  padding: 32px 48px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  nav {
    padding: 16px 24px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-resume {
    display: none;
  }

  .hero {
    flex-direction: column;
    padding: 120px 24px 60px;
    text-align: center;
    gap: 48px;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-meta {
    justify-content: center;
  }

  .code-block {
    min-width: 0;
    width: 100%;
  }

  section {
    padding: 60px 24px;
  }

  .about-stats {
    gap: 32px;
  }

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

  footer {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 16px;
    font-size: 0.8rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .about-stats {
    flex-direction: column;
    gap: 20px;
  }

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

@media print {
  nav, .social-links, .hero-visual, .skip-link, #copy-email { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  section { padding: 20px 0; page-break-inside: avoid; }
}
