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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f4f6f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fa;
  --text-primary: #111128;
  --text-secondary: #64647f;
  --accent-1: #6c5ce7;
  --accent-2: #00cec9;
  --accent-gradient: linear-gradient(135deg, #6c5ce7, #00cec9);
  --accent-glow: rgba(108, 92, 231, 0.25);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.06);
  --font-main: 'Inter', sans-serif;
  --transition-smooth: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-1);
  border-radius: 4px;
}

/* ===== UTILITY ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3.5rem;
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

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

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

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid rgba(0, 0, 0, 0.15);
}

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

/* ===== ANIMATED BACKGROUND PARTICLES ===== */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: var(--transition-smooth);
  backdrop-filter: blur(0px);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.navbar-links {
  display: flex;
  gap: 36px;
}

.navbar-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  transition: color var(--transition-smooth);
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: width var(--transition-smooth);
}

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

.navbar-links a:hover::after {
  width: 100%;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  opacity: 0.4;
  filter: blur(2px);
  position: absolute;
  top: -10%;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, var(--bg-primary) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.3);
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-badge {
  transition: transform var(--transition-smooth);
}

.hero-badge:hover {
  transform: scale(1.05);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero-title .highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 480px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  animation: fadeInUp 0.8s ease-out 0.45s both;
}

.hero-visual {
  position: relative;
  flex-shrink: 0;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-card {
  width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  animation: floatCard 6s ease-in-out infinite;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.hero-card:hover {
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: 0 20px 40px rgba(108, 92, 231, 0.15);
  animation-play-state: paused;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.hero-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-card:hover .hero-card-avatar {
  transform: rotate(360deg) scale(1.1);
}

.hero-card-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.hero-card-info p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

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

.hero-stat {
  text-align: center;
  padding: 16px 8px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-smooth);
  cursor: default;
}

.hero-stat:hover {
  background: var(--bg-primary);
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(108, 92, 231, 0.1);
  border-color: rgba(108, 92, 231, 0.3);
}

.hero-stat .number {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat .label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ===== SERVICES ===== */
.services {
  padding: 120px 0;
  position: relative;
  z-index: 2;
}

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-smooth);
}

.service-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
  border-color: rgba(108, 92, 231, 0.2);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: rgba(108, 92, 231, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ===== PROJECTS ===== */
.projects {
  padding: 120px 0;
  position: relative;
  z-index: 2;
}

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

.project-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border-color: rgba(108, 92, 231, 0.25);
}

.project-image {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.project-card:hover .project-image::after {
  opacity: 0.15;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-info {
  padding: 28px;
}

.project-info h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

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

.project-tag {
  padding: 4px 12px;
  border-radius: 50px;
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(108, 92, 231, 0.2);
}

/* ===== ABOUT / SKILLS ===== */
.about {
  padding: 120px 0;
  position: relative;
  z-index: 2;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.8;
}

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

.skill-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: var(--transition-smooth);
}

.skill-item:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  border-color: rgba(108, 92, 231, 0.2);
}

.skill-item .skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.skill-item .skill-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.skill-item .skill-percentage {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-1);
}

.skill-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0;
}

.skill-bar-fill.animated {
  box-shadow: 0 0 12px var(--accent-glow);
  position: relative;
}

.skill-bar-fill.animated::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: skill-shine 3s infinite;
}

@keyframes skill-shine {
  0% {
    left: -100%;
  }
  20% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* ===== CONTACT ===== */
.contact {
  padding: 120px 0;
  position: relative;
  z-index: 2;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(10px);
}

.contact-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  transition: transform var(--transition-smooth);
}

.contact-detail:hover {
  transform: translateX(10px);
}

.contact-detail-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(108, 92, 231, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-detail-text span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.contact-detail-text strong {
  font-weight: 500;
}

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

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

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color var(--transition-smooth);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* ===== FOOTER ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 2;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

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

.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.footer-socials a:hover {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
}

/* ===== ANIMATIONS ===== */
@keyframes floatCard {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

/* Observer-based reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }

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

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

  .hero-card {
    width: 100%;
    max-width: 400px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border-subtle);
  }

  .navbar-links.active {
    display: flex;
  }

  .navbar-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.5rem;
  }

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

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

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

  .section-title {
    font-size: 1.75rem;
  }

  .contact-wrapper {
    padding: 28px;
  }
}