/* Reset & global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Hero Section */
.hero {
  height: 100vh;
  background: 
    linear-gradient(rgba(10, 10, 10, 0.7), rgba(10, 10, 10, 0.9)),
    url('../img/header-bg2.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(10, 10, 10, 0.9));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  color: #d1d5db;
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #a5b4fc;
  font-size: 0.9rem;
  animation: bounce 2s infinite;
}

.scroll-indicator i {
  font-size: 1.2rem;
}

/* Portfolio Section */
.portfolio-section {
  padding: 100px 50px;
  background: 
    linear-gradient(rgba(10, 10, 10, 0.95), rgba(10, 10, 10, 0.98)),
    url('../img/header-bg2.png') center/cover fixed;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeIn 1s ease;
}

.section-header h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: 1.2rem;
  color: #d1d5db;
  max-width: 600px;
  margin: 0 auto;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.portfolio-card {
  height: 400px;
  background: rgba(30, 30, 30, 0.9);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 40px rgba(165, 180, 252, 0.2);
  border-color: rgba(165, 180, 252, 0.3);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .card-overlay {
  opacity: 1;
}

.card-content {
  text-align: center;
  z-index: 2;
}

.card-icon {
  font-size: 3rem;
  color: #a5b4fc;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.portfolio-card:hover .card-icon {
  transform: scale(1.2);
}

.card-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #ffffff;
}

.card-desc {
  font-size: 1rem;
  color: #d1d5db;
  margin-bottom: 25px;
  line-height: 1.5;
}

.card-hover-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #a5b4fc;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.portfolio-card:hover .card-hover-content {
  opacity: 1;
  transform: translateY(0);
}

.card-logo {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .card-logo {
  opacity: 1;
}

.card-logo img {
  max-width: 180px;
  max-height: 60px;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

/* About Section */
.about-section {
  padding: 100px 50px;
  background: rgba(20, 20, 20, 0.95);
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.about-content h2 {
  font-size: 3rem;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-content p {
  font-size: 1.2rem;
  color: #d1d5db;
  max-width: 800px;
  margin: 0 auto 50px;
  line-height: 1.8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.stat-item {
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-10px);
  background: rgba(165, 180, 252, 0.1);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1rem;
  color: #d1d5db;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: rgba(30, 30, 30, 0.95);
  margin: 80px auto;
  padding: 40px;
  border-radius: 20px;
  max-width: 800px;
  text-align: left;
  position: relative;
  animation: slideUp 0.4s ease;
  border: 1px solid rgba(165, 180, 252, 0.2);
  backdrop-filter: blur(10px);
}

/* Hide the X close button */
.close {
  display: none;
}

/* Modal Styles */
.modal-header {
  text-align: center;
  margin-bottom: 30px;
}

.modal-header h2 {
  font-size: 2.5rem;
  color: #a5b4fc;
  margin-bottom: 15px;
}

.modal-underline {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #a5b4fc, #6366f1);
  margin: 0 auto;
  border-radius: 2px;
}

.modal-info {
  margin-top: 20px;
}

.modal-section {
  margin-bottom: 30px;
}

.modal-section h3 {
  color: #a5b4fc;
  font-size: 1.3rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #a5b4fc;
}

.modal-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 40px 0 30px;
  flex-wrap: wrap;
}

.modal-btn {
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border: none;
  font-family: 'Poppins', sans-serif;
  color: #FFFFFF !important;
}

.modal-btn i {
  font-size: 1rem;
  color: #FFFFFF !important;
}

.modal-btn.primary {
  background: linear-gradient(135deg, #a5b4fc, #6366f1);
  color: #FFFFFF !important;
  box-shadow: 0 4px 15px rgba(165, 180, 252, 0.3);
}

.modal-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(165, 180, 252, 0.4);
  background: linear-gradient(135deg, #9399ff, #4f46e5);
  color: #FFFFFF !important;
}

.modal-footer {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  margin-top: 30px;
}

.modal-footer p {
  color: #9ca3af;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.modal-footer i {
  color: #a5b4fc;
}

/* Footer */
footer {
  background: rgba(10, 10, 10, 0.95);
  padding: 60px 50px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-brand h3 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #a5b4fc;
}

.footer-brand p {
  color: #d1d5db;
}

.footer-contact h4,
.footer-social h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #ffffff;
}

.footer-contact a {
  color: #a5b4fc;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s ease;
}

.footer-contact a:hover {
  color: #ffffff;
}

.social-icons {
  display: flex;
  gap: 20px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: #a5b4fc;
  transform: translateY(-5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d5db;
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .portfolio-section,
  .about-section {
    padding: 60px 20px;
  }
  
  .section-header h2,
  .about-content h2 {
    font-size: 2rem;
  }
  
  .modal-header h2 {
    font-size: 2rem;
  }
  
  .modal-desc {
    font-size: 1rem;
    padding: 15px;
  }
  
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .modal-btn {
    justify-content: center;
    padding: 12px 24px;
  }
  
  footer {
    padding: 40px 20px 20px;
  }
}

/* Grid Layout for 8 cards */
@media (min-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 479px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio-card {
    height: 350px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .modal-content {
    width: 95%;
    padding: 30px 20px;
    margin: 40px auto;
  }
}