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

:root {
  --purple-900: #1e1030;
  --purple-800: #2d1b4e;
  --purple-700: #4c1d95;
  --purple-600: #6d28d9;
  --purple-500: #7c3aed;
  --purple-400: #8b5cf6;
  --purple-300: #a78bfa;
  --purple-200: #c4b5fd;
  --purple-100: #ddd6fe;

  --gray-950: #0a0a0c;
  --gray-900: #0f0f11;
  --gray-800: #1a1a20;
  --gray-750: #1e1e26;
  --gray-700: #24242e;
  --gray-600: #2d2d39;
  --gray-500: #3f3f4d;
  --gray-400: #6b6b7b;
  --gray-300: #9494a3;
  --gray-200: #bdbdcc;
  --gray-100: #e1e1ed;
  --gray-50: #f0f0f5;

  --bg-primary: var(--gray-950);
  --bg-secondary: var(--gray-900);
  --bg-card: var(--gray-800);
  --bg-elevated: var(--gray-750);
  --border-color: var(--gray-600);
  --border-light: var(--gray-500);

  --text-primary: var(--gray-100);
  --text-secondary: var(--gray-300);
  --text-muted: var(--gray-400);

  --accent: var(--purple-500);
  --accent-hover: var(--purple-400);
  --accent-dim: var(--purple-700);
  --accent-glow: rgba(124, 58, 237, 0.15);

  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.15);

  --transition: 200ms ease;
  --transition-slow: 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

::selection {
  background: var(--accent);
  color: white;
}

img {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

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

section {
  padding: 100px 0;
  position: relative;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  line-height: 1.2;
  font-weight: 600;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  opacity: 0.7;
  display: block;
  margin-bottom: 4px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text-primary);
  margin: 8px 0;
}

.section-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: -32px auto 48px;
}

.highlight {
  color: var(--accent);
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border-color);
  background: rgba(10, 10, 12, 0.95);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-greeting {
  display: block;
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 8px;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-name {
  display: block;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -2px;
  white-space: pre-wrap;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  background: rgba(30, 30, 38, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-width: 420px;
}

.hero-decoration {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  pointer-events: none;
  overflow: hidden;
}

.decoration-circle {
  position: absolute;
  top: 50%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
  transform: translateY(-50%);
}

.decoration-dots {
  position: absolute;
  top: 20%;
  right: 15%;
  width: 200px;
  height: 200px;
  background-image: radial-gradient(var(--gray-600) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  opacity: 0.4;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

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

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

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

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

.btn-full {
  width: 100%;
}

/* ===== ABOUT ===== */
.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

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

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.stat {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

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

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

.about-tech h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.tech-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
}

.tech-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124, 58, 237, 0.06);
}

/* ===== PROJECTS ===== */
.projects {
  background: var(--bg-primary);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-slow);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-dim);
  box-shadow: var(--shadow-glow);
}

.project-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-image-content {
  opacity: 0.7;
  transition: var(--transition);
}

.project-card:hover .project-image-content {
  opacity: 1;
  transform: scale(1.05);
}

.project-info {
  padding: 24px;
}

.project-info h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.project-info p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

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

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 12px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 100px;
  color: var(--purple-300);
}

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

.project-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

/* ===== SNIPPETS ===== */
.snippets {
  background: var(--bg-secondary);
}

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

.snippet-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.snippet-card:hover {
  border-color: var(--accent-dim);
  box-shadow: var(--shadow-glow);
}

.snippet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
}

.snippet-lang {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.snippet-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.snippet-code {
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
}

.snippet-code code {
  font-family: inherit;
}

.snippet-code .code-keyword { color: var(--purple-300); }
.snippet-code .code-string { color: #86efac; }
.snippet-code .code-type { color: #67e8f9; }
.snippet-code .code-func { color: #fbbf24; }
.snippet-code .code-number { color: #fda4af; }
.snippet-code .code-comment { color: var(--gray-400); font-style: italic; }
.snippet-code .code-selector { color: #fbbf24; }
.snippet-code .code-value { color: #86efac; }
.snippet-code .code-builtin { color: #67e8f9; }
.snippet-code .code-decorator { color: #fbbf24; }
.snippet-code .code-op { color: var(--purple-300); }
.snippet-code .code-var { color: var(--text-primary); }

/* ===== CONTACT ===== */
.contact {
  background: var(--bg-primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.contact-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.08);
  border-radius: var(--radius-sm);
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-item strong {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.contact-item span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124, 58, 237, 0.06);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.heart {
  color: var(--accent);
}

/* ===== CURSOR FOLLOWER ===== */
.cursor-follower {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  mix-blend-mode: difference;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

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

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

  section {
    padding: 72px 0;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 12, 0.98);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition-slow);
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-decoration {
    display: none;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-bottom .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

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

  .hero-actions .btn {
    width: 100%;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
}
