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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #222;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #16213e 100%);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  z-index: 1000;
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 10px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

nav .logo {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

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

nav .logo img {
  width: 55px;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

nav .logo-text {
  color: #764ba2;
  font-weight: 700;
  font-size: 1.4rem;
  margin-left: 10px;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 25px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  transition: all 0.3s;
  padding: 8px 15px;
  border-radius: 20px;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #764ba2;
  transition: all 0.3s;
  transform: translateX(-50%);
}

nav ul li a:hover::after {
  width: 80%;
}

nav ul li a:hover {
  color: #764ba2;
}

#about, #portofolio, #projects, #contact {
  scroll-margin-top: 80px;
}

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

.hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #16213e 100%);
  color: white;
  min-height: 100vh;
  padding: 120px 8%;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(118, 75, 162, 0.15), transparent);
  border-radius: 50%;
  top: -200px;
  right: -200px;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1), transparent);
  border-radius: 50%;
  bottom: -150px;
  left: -150px;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  flex-wrap: wrap;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1 1 50%;
  animation: fadeInUp 1s ease forwards;
}

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 10px;
  line-height: 1.2;
  text-align: center;
}

.hero-text h1 span {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text h2 {
  font-size: 1.8rem;
  font-weight: 400;
  color: #ccc;
  margin-bottom: 20px;
}

.hero-text p {
  font-size: 1.1rem;
  color: #ddd;
  max-width: 550px;
  margin-bottom: 30px;
  line-height: 1.7;
  text-align: center;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(118, 75, 162, 0.4);
}

.btn-outline {
  border: 2px solid #764ba2;
  color: #764ba2;
  background: transparent;
}

.btn-outline:hover {
  background: #764ba2;
  color: #fff;
  transform: translateY(-3px);
}

.hero-image {
  flex: 1 1 45%;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 1s ease forwards;
  position: relative;
}

.hero-image::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  opacity: 0.2;
  filter: blur(40px);
  z-index: -1;
}

.hero-image img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

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

/* SECTION GENERAL */
section {
  min-height: 100vh;
  padding: 100px 60px 60px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100%;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* About */
.about-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f7f7f7;
  padding: 100px 0;
}

.about-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

      .about-image {
  
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* gambar otomatis menyesuaikan proporsi tanpa distorsi */
  border-radius: 0;
  transition: transform 0.6s ease;
}

.about-image:hover img {
    transform: scale(1.05); /* efek zoom lembut saat hover */
}

.image-placeholder {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #a78bfa 0%, #c084fc 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  position: relative;
  animation: float 3s ease-in-out infinite;
}

.about-content {
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-label {
  color: #667eea;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.about-title {
  font-size: 38px;
  color: #1a202c;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.about-description {
  color: #4a5568;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 30px;
}

.skills {
  margin-bottom: 30px;
}

.skills-title {
  color: #1a202c;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

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

.skill-item {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.cta-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: fit-content;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

/* Portofolio */
#portofolio {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 20px;
}

#portofolio h2 {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

#portofolio h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: white;
  margin: 10px auto 0;
  border-radius: 2px;
}

.portofolio-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.portofolio-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  width: 45%;
  transition: transform 0.3s ease;
}

.portofolio-card:hover {
  transform: translateY(-10px);
}

.portofolio-card h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.portofolio-card h3 img {
  width: 28px;
  height: 28px;
}

.portofolio-card ul {
  list-style: none;
  padding: 0;
}

.portofolio-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  text-align: justify;
}

.item-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  padding: 5px;
}

.item-text strong {
  display: block;
  color: #fff;
  font-size: 1.05em;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  text-decoration: none;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.project-card h3 {
  padding: 20px 15px 10px;
  color: #764ba2;
  font-size: 1.3rem;
}

.project-card p {
  padding: 0 15px 20px;
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

/* Contact */
#contact {
  background: #f9f9f9;
}

form {
  max-width: 600px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

input, textarea {
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #764ba2;
  box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

button[type="submit"] {
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

button[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(118, 75, 162, 0.4);
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, #10002b, #240046, #3c096c);
  color: #eaeaea;
  padding: 70px 10% 40px;
  font-family: 'Poppins', sans-serif;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(118, 75, 162, 0.25), transparent);
  border-radius: 50%;
  filter: blur(50px);
  z-index: 0;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.footer-brand {
  flex: 1 1 300px;
}

.footer-logo {
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #9d4edd, #7b2cbf);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-desc {
  font-size: 0.95rem;
  color: #ccc;
  line-height: 1.6;
  margin: 15px 0 25px;
  max-width: 380px;
}

.footer-social {
  display: flex;
  gap: 14px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: #fff;
  color: #7b2cbf;
  transform: translateY(-4px);
}

.footer-nav {
  flex: 2 1 600px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-group h3.footer-heading {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: #fff;
  position: relative;
}

.footer-group h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background: #9d4edd;
  border-radius: 2px;
}

.footer-group ul {
  list-style: none;
  padding: 0;
}

.footer-group ul li {
  margin: 8px 0;
}

.footer-group ul li a {
  color: #cfcfcf;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.footer-group ul li a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-credits {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 50px;
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #bbb;
}

.credits-links {
  display: flex;
  gap: 20px;
}

.credits-links a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s ease;
}

.credits-links a:hover {
  color: #fff;
}

.footer-signature {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #aaa;
  opacity: 0.9;
}

/* Scroll To Top Button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(118, 75, 162, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(118, 75, 162, 0.5);
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6936a5 100%);
}

/* Responsive Nav */
@media (max-width: 992px) {
  nav ul {
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.95);
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  nav ul.active {
    max-height: 400px;
  }

  nav ul li {
    margin: 15px 0;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .portofolio-grid div {
    width: 80%;
  }

  .item-logo {
    width: 35px;
    height: 35px;
  }
}

/* Responsive About */
@media (max-width: 768px) {
  .about-wrapper {
    grid-template-columns: 1fr;
  }

  .about-content {
    padding: 40px 30px;
  }

  .about-title {
    font-size: 28px;
  }

  .image-placeholder {
    width: 250px;
    height: 250px;
    font-size: 100px;
  }

  .about-section {
    padding: 60px 0;
  }

  /* Responsive Footer */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-nav {
    flex-direction: column;
    align-items: center;
  }

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

  .footer-credits {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .credits-links {
    flex-direction: column;
    gap: 5px;
  }

  .footer-social {
    justify-content: center;
  }
}

/* Responsive Portofolio */
@media (max-width: 900px) {
  .portofolio-card {
    width: 100%;
  }

  .portofolio-grid div {
    width: 100%;
  }
}

@media (max-width: 600px) {
  #portofolio {
    padding: 60px 15px;
  }

  .portofolio-grid {
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }

  .portofolio-grid div {
    width: 100%;
    padding: 25px 20px;
  }

  .portofolio-grid h3 {
    font-size: 1.5rem;
    text-align: center;
  }

  .portofolio-grid ul li {
    flex-direction: row;
    align-items: center;
    font-size: 0.95rem;
  }

  .portofolio-card h3 {
    font-size: 1.5rem;
  }

  .item-logo {
    width: 30px;
    height: 30px;
  }

  .item-text {
    font-size: 0.95rem;
  }
}

/* ANIMATIONS */
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-30px) translateX(30px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
