/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;

  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #55556a;

  --accent: #7c5cfc;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 92, 252, 0.3);
  --accent-gradient: linear-gradient(135deg, #7c5cfc, #c084fc);

  --success: #34d399;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 120px 0;
  --container-width: 1140px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.3s var(--ease-out);
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-bracket {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-link {
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 100px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active {
  background: rgba(124, 92, 252, 0.12);
  color: var(--accent-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 100%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  pointer-events: none;
}

.hero-glow--1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -150px;
  right: -100px;
  opacity: 0.15;
}

.hero-glow--2 {
  width: 400px;
  height: 400px;
  background: #c084fc;
  bottom: -100px;
  left: -100px;
  opacity: 0.1;
}

.hero-content {
  text-align: center;
  max-width: 720px;
  position: relative;
  z-index: 1;
  animation: fadeUp 1s var(--ease-out);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 16px;
}

.accent-dot {
  color: var(--accent);
}

.hero-tagline {
  font-size: 1.35rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 2rem;
}

.typed-text {
  color: var(--accent-light);
  font-weight: 600;
}

.cursor {
  animation: blink 1s infinite;
  color: var(--accent);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-hover);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(124, 92, 252, 0.06);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

/* Stats */
.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-plus {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: fadeUp 1s var(--ease-out) 0.5s both;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 4px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {

  0%,
  100% {
    opacity: 1;
    top: 6px;
  }

  50% {
    opacity: 0.3;
    top: 20px;
  }
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  padding: 6px 16px;
  background: rgba(124, 92, 252, 0.1);
  border-radius: 100px;
  border: 1px solid rgba(124, 92, 252, 0.15);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ========================================
   FILTER BAR
   ======================================== */
.filter-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
}

/* ========================================
   PROJECTS GRID
   ======================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  animation: fadeUp 0.6s var(--ease-out) both;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-glow);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--accent-glow);
}

.project-card:nth-child(2) {
  animation-delay: 0.1s;
}

.project-card:nth-child(3) {
  animation-delay: 0.2s;
}

.project-card:nth-child(4) {
  animation-delay: 0.3s;
}

.project-card:nth-child(5) {
  animation-delay: 0.4s;
}

.project-card:nth-child(6) {
  animation-delay: 0.5s;
}

.project-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.project-card:hover .project-image img {
  transform: scale(1.08);
}

.project-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 12px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.9) 0%, transparent 60%);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  gap: 12px;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.project-overlay-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.project-body {
  padding: 24px;
}

.project-category {
  font-size: 0.78rem;
  color: var(--accent-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.project-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-tag {
  padding: 4px 10px;
  background: rgba(124, 92, 252, 0.08);
  border: 1px solid rgba(124, 92, 252, 0.12);
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-content .section-tag {
  display: inline-block;
}

.about-content .section-title {
  text-align: left;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.tech-stack {
  margin-top: 28px;
}

.tech-stack h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  padding: 6px 14px;
  background: rgba(124, 92, 252, 0.08);
  border: 1px solid rgba(124, 92, 252, 0.12);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}

.tech-tag:hover {
  background: rgba(124, 92, 252, 0.18);
  color: var(--accent-light);
  border-color: var(--accent);
}

/* Code window */
.about-visual {
  display: flex;
  justify-content: center;
}

.code-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.code-title-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f57;
}

.dot.yellow {
  background: #febc2e;
}

.dot.green {
  background: #28c840;
}

.code-filename {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.code-block {
  padding: 24px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.88rem;
  line-height: 1.8;
  overflow-x: auto;
}

.code-block .kw {
  color: #c084fc;
}

.code-block .var {
  color: #67e8f9;
}

.code-block .prop {
  color: #7dd3fc;
}

.code-block .str {
  color: #34d399;
}

.code-block .bool {
  color: #fbbf24;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.info-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
}

.info-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.info-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.info-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========================================
   REVIEWS SECTION
   ======================================== */
.reviews {
  background: var(--bg-secondary);
}

.reviews-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.reviews-content:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--accent-glow);
}

.review-stars {
  font-size: 2rem;
  margin-bottom: 20px;
  display: flex;
  gap: 4px;
  justify-content: center;
  color: #FFD700;
}

.review-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.btn-review {
  display: inline-flex;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 100px 32px 32px;
    gap: 4px;
    transition: right 0.4s var(--ease-out);
    border-left: 1px solid var(--border);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-name {
    letter-spacing: -2px;
  }

  .hero-stats {
    gap: 28px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-content .section-title {
    text-align: center;
  }

  .about-content .section-tag {
    text-align: center;
    display: block;
  }

  .about-content p {
    text-align: center;
  }

  .tech-tags {
    justify-content: center;
  }

  .tech-stack h3 {
    text-align: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}

/* ========================================
   ANIMATIONS (scroll-triggered via JS)
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}