@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
  --bg: #fdfaf6;
  --primary: #a47148;
  --secondary: #d9b99b;
  --accent: #f5eadd;
  --text: #3e2c23;
  --light: #ffffff;
  --shadow: rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* NAVBAR */
header {
  background-color: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px var(--shadow);
}

.navbar {
  max-width: 1100px;
  margin: auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--light);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  width: 0;
  height: 2px;
  background: var(--secondary);
  position: absolute;
  bottom: -4px;
  left: 0;
  transition: 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* SECTION GENERAL */
.section {
  padding: 4rem 2rem;
  max-width: 1350px;
  margin: auto;
  animation: fadeIn 0.8s ease-in-out;
  scroll-margin-top: 100px; /* Biar tidak tertutup navbar */
  border-top: 1px solid #e6dbd0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-align: center;
}

/* HOME */
.home {
  height: 87.5vh;
  background: linear-gradient(135deg, #d9b99b, #fdfaf6);
  border-radius: 0 0 0 0;
  text-align: center;
  padding: 6rem 2rem 4rem;
  margin-top: 0;
  box-shadow: 0 5px 15px var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.profile-img {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--primary);
  margin: 0 auto 1rem;
}

#home h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

#home p {
  font-size: 1rem;
  color: #444;
}

/* ABOUT */
.about-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
  min-height: 25vh;
  justify-content: center;
  font-family: 'Josefin Sans', sans-serif;
}

.about-img {
  width: 225px;
  border-radius: 20px;
  border: 4px solid var(--secondary);
}

.about-text {
  max-width: 700px;
}

.light-bg {
  background-color: #f9f6f2;
  border-radius: 10px;
  padding: 6rem 5rem;
}

/* SKILLS */
.skill {
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.skill p {
  font-weight: 600;
  margin-bottom: 0.3rem;
  text-align: left;
}

.progress-bar {
  background-color: var(--accent);
  border-radius: 50px;
  height: 20px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fill {
  background-color: var(--primary);
  height: 100%;
  transition: width 1s ease-in-out;
}

/* EDUCATION */
.container {
  max-width: 1000px;
  margin: auto;
  position: relative;
  padding: 2rem 0;
}

.timeline {
  position: relative;
  list-style: none;
  padding: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ccc;
  transform: translateX(-50%);
  z-index: 0;
}

.timeline li {
  position: relative;
  width: 50%;
  padding: 1.5rem 2rem;
  box-sizing: border-box;
  min-height: 120px;
}

.timeline li.left {
  float: left;
  text-align: right;
  clear: both;
}

.timeline li.right {
  float: right;
  text-align: left;
  clear: both;
}

.timeline li .content {
  background: #f0f0f0;
  padding: 1rem;
  border-radius: 6px;
  position: relative;
  z-index: 1;
}

/* Arrow for left and right */
.timeline li.left .content::after {
  content: "";
  position: absolute;
  top: 1rem;
  right: -8px;
  border: 8px solid transparent;
  border-left-color: #f0f0f0;
}

.timeline li.right .content::after {
  content: "";
  position: absolute;
  top: 1rem;
  left: -8px;
  border: 8px solid transparent;
  border-right-color: #f0f0f0;
}

/* Bullet in the middle */
.timeline li::before {
  position: absolute;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--primary, #007bff);
  z-index: 2;
}

/* Clearfix */
.timeline::after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .timeline::before {
    left: 8px;
    transform: none;
  }

  .timeline li {
    width: 100%;
    float: none;
    padding-left: 2.5rem;
    padding-right: 1rem;
    text-align: left;
  }

  .timeline li.left,
  .timeline li.right {
    text-align: left;
  }

  .timeline li .content {
    text-align: left;
  }

  .timeline li.left .content::after,
  .timeline li.right .content::after {
    left: -8px;
    right: auto;
    border: 8px solid transparent;
    border-right-color: #f0f0f0;
  }

  .timeline li::before {
    left: 0;
    transform: none;
  }
}




/* CONTACT */
#contact {
  background-color: #fffaf5;
  border-radius: 12px;
  padding: 2rem 2rem;
  text-align: center;
  max-width: 700px;   /* batasi lebar biar tidak terlalu melebar */
  margin: 2rem auto;  /* tengah-tengah & beri jarak atas bawah */
  box-shadow: 0 2px 8px var(--text);
}

#contact p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* popup */
.show-animation .popup-content {
  animation: popupFadeIn 0.4s ease;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.popup-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  color: black;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.popup-content h3, 
.popup-content p {
  margin-bottom: 15px;
}

.popup-content input,
.popup-content textarea {
  padding: 8px;
  margin: 10px 0;
  width: 80%;
  max-width: 400px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.popup-content textarea {
  height: 80px;
}

.popup-content button {
  padding: 10px 20px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
}

.popup-content button:hover {
  background-color: var(--secondary);
}

.popup-content #formResult {
  margin-top: 15px;
  font-weight: bold;
}

/* Animasinya */
@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.show-animation .popup-content {
  animation: popupFadeIn 0.4s ease;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 0.3rem 1.5rem;
  background-color: var(--primary);
  color: var(--light);
  margin-top: 3rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
  }

  .navbar {
    flex-direction: column;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding: 3rem 1rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  #contact {
    text-align: center;
  }

  @keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

}
