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

:root {
  --bg: #050816;
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #a7a9be;
  --primary: #6d5dfc;
  --secondary: #ff4d6d;
  --gradient: linear-gradient(135deg, #7b61ff, #4f46e5);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Enhanced animated background with floating animation */
body::before {
  content: "";
  position: fixed;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(123, 97, 255, 0.35), transparent 70%);
  top: -300px;
  left: -300px;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
  filter: blur(80px);
}

body::after {
  content: "";
  position: fixed;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255, 77, 109, 0.25), transparent 70%);
  bottom: -250px;
  right: -250px;
  z-index: -1;
  animation: float 25s ease-in-out infinite reverse;
  filter: blur(80px);
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 30px) scale(0.9);
  }
}

/* NAVBAR - Enhanced with glassmorphism */
nav {
  width: 100%;
  padding: 1.3rem 5%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(5, 8, 22, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 1rem 5%;
  background: rgba(5, 8, 22, 0.85);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.logo {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff, #a7a9be);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo span {
  background: linear-gradient(135deg, var(--secondary), #ff6b8a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
}

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

.nav-links a:hover {
  color: white;
  transform: translateY(-2px);
}

/* HERO - Enhanced layout and animations */
.hero {
  min-height: 100vh;
  padding: 150px 5% 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 5rem;
  align-items: center;
}

.hero-content {
  max-width: 700px;
  animation: fadeInUp 0.8s ease-out;
}

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

.hero-kicker {
  color: var(--secondary);
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
  font-weight: 900;
  margin-bottom: 1.8rem;
  letter-spacing: -0.04em;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-title span {
  background: linear-gradient(135deg, #7b61ff, #ff4d6d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-description {
  color: var(--muted);
  max-width: 650px;
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.hero-skills span {
  padding: 0.8rem 1.2rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
  color: #f5f7ff;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.hero-skills span:hover {
  background: rgba(123, 97, 255, 0.15);
  border-color: rgba(123, 97, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(123, 97, 255, 0.2);
}

.hero-buttons {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.btn {
  padding: 1.1rem 2rem;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary), #ff6b8a);
  color: white;
  box-shadow: 0 10px 35px rgba(255, 77, 109, 0.35);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 45px rgba(255, 77, 109, 0.45);
}

.btn-secondary {
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: white;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

/* HERO IMAGE - Enhanced with better styling */
.hero-image {
  width: 100%;
  height: 580px;
  padding: 1.2rem;
  border-radius: 40px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(17, 17, 17, 0.9), rgba(20, 20, 30, 0.9));
  position: relative;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  animation: fadeInRight 0.8s ease-out 0.4s both;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.1), rgba(255, 77, 109, 0.1));
  z-index: 1;
  border-radius: 32px;
  pointer-events: none;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 30px;
  display: block;
  transform: scale(0.96);
  transition: transform 0.5s ease;
}

.hero-image:hover img {
  transform: scale(1);
}

/* STATS - Enhanced cards with better hover */
.hero-stats {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.stat-card {
  padding: 1.8rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

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

.stat-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(123, 97, 255, 0.4);
  box-shadow: 0 20px 50px rgba(123, 97, 255, 0.2);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.2), rgba(123, 97, 255, 0.1));
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.3), rgba(255, 77, 109, 0.2));
}

.stat-card h3 {
  margin-bottom: 0.3rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.stat-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* SECTION HEADER - Enhanced typography */
.section-header {
  max-width: 750px;
  margin-bottom: 3.5rem;
}

.section-kicker {
  color: var(--secondary);
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1.2rem;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.section-desc {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.1rem;
}

/* ABOUT - Enhanced cards */
.about,
.projects,
.contact {
  padding: 100px 5%;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.about-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 2rem;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.about-card:hover::before {
  opacity: 1;
}

.about-card:hover {
  transform: translateY(-8px);
  border-color: rgba(123, 97, 255, 0.4);
  box-shadow: 0 20px 50px rgba(123, 97, 255, 0.15);
}

.about-card h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.about-card p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.about-tags span {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #f5f7ff;
  font-weight: 600;
  transition: all 0.3s ease;
}

.about-tags span:hover {
  background: rgba(123, 97, 255, 0.15);
  border-color: rgba(123, 97, 255, 0.4);
  transform: translateY(-2px);
}

/* PROJECTS - Enhanced cards with better hover */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(123, 97, 255, 0.5);
  box-shadow: 0 25px 60px rgba(123, 97, 255, 0.2);
}

.project-thumb {
  height: 240px;
  background: var(--gradient);
  position: relative;
  overflow: hidden;
}

.project-thumb::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-thumb::after {
  opacity: 1;
}

.thumb-1 {
  background: linear-gradient(135deg, #7b61ff, #ff4d6d);
}

.thumb-2 {
  background: linear-gradient(135deg, #4f46e5, #7b61ff);
}

.thumb-3 {
  background: linear-gradient(135deg, #ff4d6d, #f59e0b);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

.project-body {
  padding: 1.8rem;
}

.project-body h3 {
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.project-body p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.project-tags span {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.project-tags span:hover {
  background: rgba(123, 97, 255, 0.15);
  border-color: rgba(123, 97, 255, 0.4);
}

/* Special thumbnails */
.dashboard-thumb img {
  object-fit: contain;
  background: #fff;
  padding: 10px;
}

.siakad-thumb img {
  width: 70%;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: auto;
  padding-top: 10px;
}

.ui-thumb {
  height: 240px;
  overflow: hidden;
}

.ui-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 14px;
  background: #0f1226;
}

.restaurant-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 12px;
  background: #0d1020;
}

.coding-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 12px;
  background: #0b1020;
}

/* CONTACT - Enhanced cards */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
  color: white;
  padding: 2rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.contact-card:hover::before {
  opacity: 1;
}

.contact-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(123, 97, 255, 0.4);
  box-shadow: 0 20px 50px rgba(123, 97, 255, 0.2);
}

.contact-card i {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.15), rgba(123, 97, 255, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #7b61ff;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.contact-card:hover i {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, rgba(123, 97, 255, 0.25), rgba(255, 77, 109, 0.15));
}

.contact-card div {
  display: flex;
  flex-direction: column;
}

.contact-card span {
  color: #a7a9be;
  font-size: 0.9rem;
  margin-bottom: 4px;
  font-weight: 500;
}

.contact-card strong {
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
}

/* RESPONSIVE - Enhanced breakpoints */
@media (max-width: 1000px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-image {
    height: 520px;
  }

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

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

@media (max-width: 700px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 120px;
  }

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

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

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

  .btn {
    width: 100%;
    text-align: center;
  }

  .hero-image {
    height: 450px;
    padding: 1rem;
  }

  .hero-image img {
    transform: scale(1);
  }

  .stat-card {
    padding: 1.5rem;
  }

  .about,
  .projects,
  .contact {
    padding: 70px 5%;
  }
}

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

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

/* Selection style */
::selection {
  background: rgba(123, 97, 255, 0.3);
  color: white;
}

::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}
