/* ===== RESET & VARIABLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #3a5ce5;
  --primary-light: #6c8aff;
  --primary-dark: #2a4bc4;
  --secondary: #6c757d;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --gray: #6c757d;
  --gray-light: #e9ecef;
  --success: #28a745;
  --transition: all 0.3s ease;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --border-radius: 10px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: #fff;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 100px 0;
}

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

/* ===== PRELOADER ===== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader {
  display: flex;
  gap: 10px;
}

.loader-square {
  width: 20px;
  height: 60px;
  background-color: var(--primary);
  animation: loaderAnimation 1.2s infinite ease-in-out;
}

.loader-square:nth-child(1) {
  animation-delay: -0.4s;
}
.loader-square:nth-child(2) {
  animation-delay: -0.2s;
}
.loader-square:nth-child(3) {
  animation-delay: 0s;
}
.loader-square:nth-child(4) {
  animation-delay: 0.2s;
}

@keyframes loaderAnimation {
  0%,
  40%,
  100% {
    transform: scaleY(0.6);
  }
  20% {
    transform: scaleY(1);
  }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  padding: 20px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 15px 0;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

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

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

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, rgba(58, 92, 229, 0.05) 0%, rgba(108, 138, 255, 0.02) 100%);
  border-radius: 0 0 0 100px;
  z-index: -1;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.hero-text {
  flex: 1;
  max-width: 600px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.line-1 {
  display: block;
  font-size: 1.2rem;
  color: var(--gray);
  margin-bottom: 5px;
  animation: fadeInUp 0.8s ease;
}

.line-2 {
  display: block;
  animation: fadeInUp 0.8s 0.2s ease both;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 15px;
  animation: fadeInUp 0.8s 0.4s ease both;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--gray);
  margin-bottom: 30px;
  animation: fadeInUp 0.8s 0.6s ease both;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  animation: fadeInUp 0.8s 0.8s ease both;
}

.hero-social {
  display: flex;
  gap: 15px;
  animation: fadeInUp 0.8s 1s ease both;
}

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: rgba(58, 92, 229, 0.1);
  border-radius: 50%;
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-5px);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.image-container {
  position: relative;
  width: 350px;
  height: 350px;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gray-light), #fff);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 10px solid white;
  box-shadow: var(--shadow-lg);
}

.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.image-placeholder:has(img) i {
  display: none;
}

.image-placeholder:not(:has(img)) i {
  font-size: 5rem;
  color: var(--primary);
}

.image-border {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary), var(--primary-light));
  animation: rotate 20s linear infinite;
  z-index: 1;
}

.profile-badge {
  position: absolute;
  bottom: 20px;
  right: 0;
  background-color: var(--primary);
  color: white;
  padding: 15px 20px;
  border-radius: 50px;
  box-shadow: var(--shadow);
  animation: bounce 2s infinite;
  z-index: 3;
}

.badge-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-text {
  font-weight: 700;
  font-size: 1.2rem;
}

.badge-subtext {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* ===== ABOUT SECTION ===== */
.about {
  background-color: var(--light);
}

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

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-image {
  flex: 1;
}

.about-img {
  width: 100%;
  max-width: 400px;
  height: 400px;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--gray-light), #fff);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
  overflow: hidden;
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.about-img:has(img) i {
  display: none;
}

.about-img:not(:has(img)) i {
  font-size: 5rem;
  color: var(--primary);
}

.about-text {
  flex: 1;
}

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

.about-text p {
  margin-bottom: 15px;
  color: var(--gray);
  line-height: 1.7;
}

.about-info {
  margin: 30px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.info-value {
  color: var(--gray);
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.skill-item {
  background: white;
  padding: 30px;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.skill-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.skill-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
}

.skill-icon i {
  font-size: 1.8rem;
  color: white;
}

.skill-item h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.skill-item p {
  color: var(--gray);
  font-size: 0.95rem;
}

.skills-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.skill-category h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--dark);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  display: inline-block;
  padding: 8px 15px;
  background-color: rgba(58, 92, 229, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.skill-tag:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* ===== WORK/PROJECTS SECTION ===== */
.work {
  background-color: var(--light);
}

.project-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  background-color: white;
  border: 2px solid rgba(58, 92, 229, 0.2);
  border-radius: 30px;
  color: var(--dark);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
}

.work-item {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 400px;
  width: 100%;
}

.work-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.work-image {
  height: 220px;
  width: 100%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.work-item:hover .work-image img {
  transform: scale(1.1);
}

.work-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(58, 92, 229, 0.85), rgba(108, 138, 255, 0.85));
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.work-item:hover .work-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  color: white;
  padding: 20px;
}

.overlay-content h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.overlay-content i {
  font-size: 1.3rem;
}

.work-info {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.work-info h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--dark);
  line-height: 1.4;
}

.work-info p {
  color: var(--gray);
  margin-bottom: 15px;
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
}

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

.work-tag {
  display: inline-block;
  padding: 6px 12px;
  background-color: rgba(58, 92, 229, 0.1);
  color: var(--primary);
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.work-cta {
  text-align: center;
  margin-top: 50px;
  padding: 30px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.work-cta p {
  margin-bottom: 20px;
  color: var(--gray);
  font-size: 1.1rem;
}

/* Fallback untuk gambar yang tidak ada */
.work-image:has(img[src=""]) img,
.work-image:not(:has(img)) {
  background: linear-gradient(45deg, #667eea, #764ba2);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  position: relative;
}

.work-image:has(img[src=""])::after,
.work-image:not(:has(img))::after {
  content: "Project Image";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.8;
  font-size: 0.9rem;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
  display: flex;
  gap: 50px;
}

.contact-info {
  flex: 1;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding: 20px;
  background: var(--light);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.info-card:hover {
  transform: translateX(10px);
  background: white;
  box-shadow: var(--shadow);
}

.info-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.info-icon i {
  color: white;
  font-size: 1.2rem;
}

.info-text h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--dark);
}

.info-text p {
  color: var(--gray);
  font-size: 0.95rem;
}

.social-links h4 {
  font-family: "Inter", sans-serif;
  margin-bottom: 15px;
  color: var(--dark);
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  background-color: var(--light);
  border-radius: 50%;
  color: var(--dark);
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.1rem;
}

.social-icons a:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-5px);
}

.contact-form {
  flex: 1;
  background-color: white;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(58, 92, 229, 0.1);
}

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

/* ===== FOOTER ===== */
.footer {
  background-color: var(--dark);
  color: white;
  padding: 80px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.footer-logo .logo-text {
  color: white;
  margin-bottom: 15px;
  display: block;
}

.footer-logo p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-links h4,
.footer-newsletter h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: white;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.footer-newsletter p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.newsletter-form {
  display: flex;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 15px;
  border: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
}

.newsletter-form button {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 0 20px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

.newsletter-form button:hover {
  background-color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-note i {
  color: #ff6b6b;
  margin: 0 5px;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-light);
  transform: translateY(-5px);
}

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

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

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

  .hero-text {
    max-width: 100%;
    margin-bottom: 50px;
  }

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

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

  .about-content {
    flex-direction: column;
  }

  .contact-content {
    flex-direction: column;
  }

  .image-container {
    width: 300px;
    height: 300px;
  }

  .about-img {
    max-width: 350px;
    height: 350px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .image-container {
    width: 250px;
    height: 250px;
  }

  .about-img {
    max-width: 300px;
    height: 300px;
  }

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

  .work-image {
    height: 200px;
  }
}

@media (max-width: 576px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

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

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

  .project-filter {
    flex-direction: column;
    align-items: center;
  }

  .filter-btn {
    width: 200px;
  }

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

  .image-container {
    width: 220px;
    height: 220px;
  }

  .about-img {
    max-width: 280px;
    height: 280px;
  }

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

/* ===== VIEW DETAIL BUTTON ===== */
.btn-view-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Inter", sans-serif;
  box-shadow: 0 4px 15px rgba(58, 92, 229, 0.3);
}

.btn-view-detail:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(58, 92, 229, 0.4);
}

.btn-view-detail i {
  transition: transform 0.3s ease;
}

.btn-view-detail:hover i {
  transform: translateX(4px);
}

/* ===== PROJECT MODAL ===== */
.project-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 30, 0.75);
  backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.project-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.project-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  transform: translateY(40px) scale(0.96);
  transition: transform 0.35s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) #f0f0f0;
}

.project-modal-overlay.active .project-modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--dark);
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg);
}

/* Modal Header - Image */
.modal-header {
  position: relative;
}

.modal-image-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

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

.modal-image-wrap.gradient-bg {
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image-wrap.gradient-bg .modal-img {
  display: none;
}

.modal-image-wrap.gradient-bg::after {
  content: "\f03e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 4rem;
  color: rgba(255,255,255,0.5);
}

.modal-category-badge {
  position: absolute;
  bottom: 16px;
  left: 20px;
  padding: 6px 16px;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(58, 92, 229, 0.4);
}

/* Modal Body */
.modal-body {
  padding: 28px 32px 32px;
}

.modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}

.modal-title-row h2 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

.modal-status {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(40, 167, 69, 0.12);
  color: #28a745;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 6px;
}

.modal-desc {
  color: var(--gray);
  line-height: 1.75;
  font-size: 1rem;
  margin-bottom: 24px;
}

/* Modal Sections */
.modal-section {
  margin-bottom: 24px;
}

.modal-section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section h4 i {
  color: var(--primary);
  font-size: 0.95rem;
}

.modal-features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.modal-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(58, 92, 229, 0.05);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--dark);
  font-weight: 500;
  border-left: 3px solid var(--primary);
}

.modal-features li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--primary);
  font-size: 0.8rem;
  flex-shrink: 0;
}

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

.modal-tech-tag {
  padding: 7px 16px;
  background: linear-gradient(135deg, rgba(58,92,229,0.08), rgba(108,138,255,0.12));
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(58, 92, 229, 0.2);
  transition: var(--transition);
}

.modal-tech-tag:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Modal Meta */
.modal-meta {
  display: flex;
  gap: 20px;
  margin: 24px 0;
  padding: 20px;
  background: var(--light);
  border-radius: 14px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 120px;
}

.meta-item > i {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.meta-item > div {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  margin-top: 2px;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.modal-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Scrollbar for modal */
.project-modal::-webkit-scrollbar {
  width: 6px;
}

.project-modal::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.project-modal::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

/* Responsive Modal */
@media (max-width: 600px) {
  .modal-body {
    padding: 20px 20px 28px;
  }

  .modal-title-row {
    flex-direction: column;
  }

  .modal-title-row h2 {
    font-size: 1.4rem;
  }

  .modal-features {
    grid-template-columns: 1fr;
  }

  .modal-meta {
    flex-direction: column;
    gap: 14px;
  }

  .modal-image-wrap {
    height: 180px;
  }
}
