/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #000000;
  background-color: #ffffff;
  overflow-x: hidden;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

#loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid #f0f0f0;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.about-description{
  text-align: justify;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Section */
.section {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: #007bff;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f0f0f0;
}

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

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #000000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-logo:hover {
  color: #007bff;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: #000000;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #007bff;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #007bff;
  transition: width 0.3s ease;
}

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

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 2px;
  background-color: #000000;
  margin: 3px 0;
  transition: 0.3s;
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.hero-container {
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: #666666;
  margin-bottom: 1.5rem;
  font-weight: 500;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-description {
  font-size: 1.1rem;
  color: #666666;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button {
  display: inline-block;
  background-color: #007bff;
  color: #ffffff;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease-out 0.8s both;
}

.cta-button:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  transform: rotate(45deg);
}

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

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

/* About Section */
.about {
  background-color: #f8f9fa;
}

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

.about-text {
  padding-right: 2rem;
}

.about-description {
  color: #666666;
  margin-bottom: 2rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #007bff;
}

.stat-label {
  font-size: 0.9rem;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-image {
  text-align: center;
}

.profile-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.profile-image:hover {
  transform: scale(1.05);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-card {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.skill-title {
  margin-bottom: 1rem;
  color: #000000;
}

.skill-description {
  color: #666666;
  font-size: 1rem;
}

/* Music Section */
.music {
  background-color: #f8f9fa;
}

.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.music-card {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.music-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.music-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.music-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10%;
}

.music-icon img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.music-title {
  margin-bottom: 0.5rem;
  color: #000000;
  font-weight: 600;
}

.music-artist {
  color: #666666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.music-controls {
  margin-bottom: 1rem;
}

.play-btn {
  background-color: #007bff;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 auto;
  color: white;
  font-size: 1.5rem;
}

.play-btn:hover {
  background-color: #0056b3;
  transform: scale(1.1);
}

.play-btn.playing i::before {
  content: "\f04c"; /* Pause icon */
}

.music-link {
  display: inline-block;
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid #007bff;
  border-radius: 5px;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.music-link:hover {
  background-color: #007bff;
  color: #ffffff;
}

.spotify-link {
  background-color: #1DB954;
  color: white;
  border-color: #1DB954;
}

.spotify-link:hover {
  background-color: #1ed760;
  border-color: #1ed760;
}

/* Audio element styling */
audio {
  display: none;
}

/* Portfolio Section */
.portfolio {
  background-color: #f8f9fa;
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: transparent;
  border: 2px solid #e0e0e0;
  color: #666666;
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: #007bff;
  border-color: #007bff;
  color: #ffffff;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.portfolio-image {
  position: relative;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 123, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.portfolio-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 2px solid #ffffff;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.portfolio-link:hover {
  background-color: #ffffff;
  color: #007bff;
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-title {
  margin-bottom: 0.5rem;
  color: #000000;
}

.portfolio-description {
  color: #666666;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.portfolio-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background-color: #f0f0f0;
  color: #666666;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Testimonials Section */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.testimonial-card {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.testimonial-text {
  font-size: 1.1rem;
  color: #333333;
  margin-bottom: 1.5rem;
  font-style: italic;
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-weight: 600;
  color: #000000;
  margin-bottom: 0.25rem;
}

.author-title {
  color: #666666;
  font-size: 0.9rem;
}

/* Contact Section */
.contact {
  background-color: #f8f9fa;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  padding-right: 2rem;
}

.contact-description {
  color: #666666;
  margin-bottom: 2rem;
}

.contact-details {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.contact-label {
  font-weight: 600;
  color: #000000;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-link {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #0056b3;
}

.contact-text {
  color: #666666;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-link {
  color: #666666;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: #007bff;
}

/* Contact Form */
.contact-form {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #000000;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #007bff;
}

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

.submit-button {
  background-color: #007bff;
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.submit-button:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Footer */
.footer {
  background-color: #000000;
  color: #ffffff;
  padding: 2rem 0;
}

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

.footer-text {
  color: #cccccc;
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-link {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #ffffff;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

/* Responsive Design */
@media (max-width: 810px) {
  .container {
    padding: 0 1.5rem;
  }

  .section {
    padding: 4rem 0;
  }

  .nav-menu {
    position: fixed;
    right: -100%; /* Change from left to right */
    top: 70px;
    flex-direction: column;
    background-color: rgba(18, 14, 14, 0.7);
    backdrop-filter: blur(140px);
    -webkit-backdrop-filter: blur(140px);
    width: 50vw;
    height: 100vh;
    text-align: center;
    transition: 0.3s;
    box-shadow: none;
    padding: 2rem 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-menu .nav-link {
    color: aliceblue;
    transition: color 0.3s ease
  }

  .nav-menu.active {
    right: 0;
  }

  .hamburger {
    display: flex;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .about-text {
    padding-right: 0;
  }

  .about-stats {
    justify-content: center;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-info {
    padding-right: 0;
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

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

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

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

@media (max-width: 390px) {
  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  .hero-container {
    padding: 0 1rem;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .hero-subtitle{
    font-size: 1.2rem;
  }

  .about-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .portfolio-filters {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }

  .social-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .hero-scroll-indicator,
  .contact-form,
  .footer {
    display: none;
  }

  .section {
    padding: 2rem 0;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  h1,
  h2,
  h3 {
    page-break-after: avoid;
  }

  .portfolio-item,
  .skill-card,
  .testimonial-card {
    page-break-inside: avoid;
  }
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: hidden; /* Disable scroll */
    background-color: rgba(0, 0, 0, 0.8); /* Black w/ opacity */
    display: flex; /* Ensure flex display */
    justify-content: center;
    align-items: flex-start;
    padding-top: 5%;
    animation: fadeInModal 0.3s ease forwards;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1100;
}

/* Animasi fade in modal */
@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive modal untuk mobile */
@media (max-width: 480px) {
    .modal {
        /* display: flex;  Removed to prevent modal showing by default on mobile */
        align-items: flex-start; /* vertikal turun sedikit */
        justify-content: center; /* horizontal center */
        padding-top: 5%;
        overflow: hidden; /* disable scroll */
    }

    .modal.show {
        display: flex; /* Show modal when .show class added */
    }

    .modal-content {
        max-width: 95%;
        max-height: 70%;
        padding: 0.5rem;
        border-radius: 8px;
        margin: 5% auto 0 auto; /* turun ke bawah */
        margin-top: 30%;
    }

    .close {
        top: 5rem;
        right: 15px;
        font-size: 30px;
    }
}

/* Menambahkan aturan untuk slider mobile */
@media (max-width: 810px) {
  .nav-menu {
    right: -100%; /* Memastikan menu berada di luar layar */
    left: auto; /* Menghapus pengaturan left */
  }

  .nav-menu.active {
    right: 0; /* Menampilkan menu dari kanan */
  }

  .nav-logo{
    font-size: 1rem; /* Menyesuaikan ukuran font untuk logo */
  }

  .hero-description{
    text-align: center;
    font-size: 1rem;
  }

  .about-description{
    text-align: justify;
    text-justify: inter-word;
    word-spacing: 0;
    line-height: 1.8;
  }
}
