/* Start Global Rules */
*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  outline: none;
}

*::placeholder {
  font-size: 15px;
  font-family: "poppins", sans-serif;
  font-weight: 500;
}

#about,
#projects,
#youtube,
#skills,
#welcome-section {
  scroll-margin-top: 60px;
  /* sesuaikan tinggi navbar (60px) + sedikit jarak */
}

:root {
  --f-transition: 0.2s;
  /*  Fast Transition */
  --main-transition: 0.3s;
  /* Main Transition */
  --m-transition: 0.4s;
  /* Medium Transition */
  --s-transition: 0.5s;
  /* Slow Transition */
  --header-height: 60px;
  --sections-padding: 60px;
  --main-color: hsl(206, 92%, 46%);
  --second-color: hsl(247, 74%, 63%);
  --third-color: hsl(247, 74%, 63%);
  --light-main-color: hsl(206, 92%, 50%);
  --light-second-color: hsl(247, 74%, 67%);
  --light-third-color: hsl(179, 79%, 50%);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  font-size: 16px;
}

a {
  text-decoration: none;
}

a:active {
  transform: scale(0.91);
  transition: transform var(--f-transition);
}

p {
  line-height: 1.5;
}

ul,
ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  background-size: cover;
}

.container {
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

/* Small Screens */
@media (min-width: 768px) {
  .container {
    width: 750px;
  }
}

/* Medium Screens */
@media (min-width: 992px) {
  .container {
    width: 970px;
  }
}

/* Large Screens */
@media (min-width: 1200px) {
  .container {
    width: 1170px;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 1s ease;
}

.fade-in.active {
  opacity: 1;
}

.typewriter {
  display: inline-block;
  overflow: hidden;
  border-right: 2px solid #2e5871;
  /* cursor */
  white-space: nowrap;
  letter-spacing: .05em;
  width: 0;
  animation: typing 3s steps(25, end) forwards, blink-caret .75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0
  }

  to {
    width: 14ch
  }

  /* panjang maksimal teks, hitung jumlah karakter */
}

@keyframes blink-caret {

  from,
  to {
    border-color: transparent
  }

  50% {
    border-color: #2e5871
  }
}

#typing {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: .05em;
  line-height: 1.2;
  min-height: 3.5rem;
}

.landing {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInLanding 1s ease forwards;
  animation-delay: 0.3s;
  /* kasih delay dikit biar smooth */
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 60px;
  /* kasih jarak aman dari navbar */
  box-sizing: border-box;
}


@media (max-width: 768px) {
  .landing {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    /* teks ditarik ke atas */
    padding-top: 100px;
    /* atur jaraknya dari navbar */
    box-sizing: border-box;
  }
}


@keyframes fadeInLanding {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* End Global Rules */

/* Start Utility Classes */
.btn {
  text-transform: capitalize;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  padding: 6px 15px;
  transition: var(--main-transition), background-color var(--f-transition);
}

.btn-primary {
  background-color: #2e5871;
  /* sama dengan Selamat datang */
  color: #fff;
}

.btn-primary:hover {
  background-color: #427da7;
  /* lebih muda saat hover */
}

.scale-effect:active {
  transform: scale(0.88);
  transition: transform var(--f-transition);
}


.fill::after {
  position: absolute;
  content: "";
  left: 0;
  bottom: -6px;
  width: 0;
  height: 3px;
  background: #2e5871;
  /* ganti sama dengan Selamat datang */
  transition: var(--main-transition);
}

.fill:hover::after {
  width: 100%;
}

body .section-title {
  font-size: 40px !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  color: #2e5871 !important;
  margin-bottom: 50px;
  text-align: center;
}

@media (max-width: 767px) {
  .section-title {
    margin-bottom: 40px;
  }
}

.btns-group {
  margin-top: 20px;
  display: flex;
  text-align: center;
  gap: 10px;
}

/* End Utility Classes */

/* Start Header */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 10px;
  background: transparent;
  /* transparan di awal */
  transition: all 0.3s ease;
  z-index: 1000;
}

/* Besarkan navbar khusus desktop */
@media (min-width: 1024px) {
  .navbar {
    padding: 35px 60px;
    /* lebih besar di desktop */
  }
}

.navbar.scrolled {
  background: #fff;
  /* jadi putih */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  /* kasih shadow */
}

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

.navbar .logo {
  color: #2e5871;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
}

.navbar .logo:active {
  transform: scale(1);
}

.nav-links {
  transition: var(--main-transition);
}

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

@media (max-width: 992px) {
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: aliceblue;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translatex(100%);
    opacity: 0;
    visibility: hidden;
  }
}

.nav-links a {
  position: relative;
  display: inline-block;
  text-transform: capitalize;
  margin-right: 25px;
  color: var(--second-color);
  font-weight: 600;
  font-size: 16px;
  color: #2e5871;
}

@media (max-width: 992px) {
  .nav-links a {
    margin-right: 0;
    margin-bottom: 25px;
    font-size: 20px;
  }
}

.nav-links .toggle-menu {
  position: absolute;
  top: 15px;
  right: 20px;
}

.navbar .toggle-menu {
  width: 40px;
  height: 40px;
  text-align: center;
  line-height: 40px;
  color: var(--second-color);
  font-size: 22px;
  cursor: pointer;
  display: none;
  transition: var(--main-transition);
  color: #2e5871;
}

@media (max-width: 992px) {
  .navbar .toggle-menu {
    display: block;
  }
}

/* End Header */


/* Start Landing Section */
.landing {
  padding-top: 50px;
  padding-bottom: 40px;
}

.landing .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  height: 100%;
}

.landing .text {
  text-align: justify;
  flex: 1;
}

@media (max-width: 992px) {
  .landing .text {
    text-align: justify;
  }
}

.landing .text h1 {
  font-size: 40px;
  text-transform: capitalize;
  font-weight: 700;
  letter-spacing: 1px;
  color: #2e5871;
}

@media (max-width: 1200px) {
  .landing .text h1 {
    font-size: 36px;
  }
}

@media (max-width: 500px) {
  .landing .text h1 {
    font-size: 30px;
  }
}

.landing .text span {
  font-size: 18px;
  text-transform: capitalize;
  color: var(--second-color);
  font-weight: 500;
}

@media (max-width: 992px) {
  .landing .text span {
    font-size: 17px;
  }
}

.landing .text p {
  margin-top: 14px;
  max-width: 600px;
  line-height: 1.7;
  font-size: 17px;
}

@media (max-width: 992px) {
  .landing .text p {
    font-size: 16px;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 992px) {
  .landing .btns-group {
    justify-content: center;
  }
}

.landing .image {
  flex: 0.85;
  z-index: -1;
}

@media (max-width: 992px) {
  .landing .image {
    display: none;
  }
}

/* End Landing Section */

/* YouTube Section */
.youtube {
  padding-top: 40px;
  padding-bottom: 60px;
  background: aliceblue;
}

.youtube .playlist-text {
  text-align: center;
  margin-bottom: 25px;
}

.playlist-text h1 {
  font-size: 40px;
  text-transform: capitalize;
  font-weight: 700;
  letter-spacing: 1px;
  color: #2e5871;
  margin-bottom: 15px;
}

.youtube .playlist-text p {
  font-size: 17px;
  line-height: 1.6;
  color: #333;
  max-width: 700px;
  margin: 0 auto;
}

.video-wrapper {
  position: relative;
  max-width: 700px;   /* batasi lebar biar nggak full */
  margin: 0 auto;     /* center */
  aspect-ratio: 16 / 9; /* jaga proporsinya */
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border-radius: 10px; /* biar clean */
  border: none;
}

@media (max-width: 768px) {
  .youtube .playlist-text h1 {
    font-size: 35px;
    white-space: nowrap;
  }
}

/* Responsive YouTube Embed */
.playlist-box {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}

.playlist-box iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* End Youtube */

/* About */
.about {
  padding-top: 40px;
  padding-bottom: 40px;
}

.about-container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
  text-align: justify;
}

.about-container p {
  margin-bottom: 15px;
}
.about-image {
  margin: 20px 0;
}

.about-image img {
  width: 100%;
  max-height: 400px;  /* batasi tinggi biar nggak terlalu panjang */
  object-fit: cover;  /* crop kalau foto kepanjangan */
  border-radius: 8px; /* opsional, biar lebih clean */
}


@media (max-width: 768px) {
  section#about .section-title {
    font-size: 35px !important;
    white-space: nowrap !important;
  }
}

#about .section-title {
  margin-bottom: 25px;
  /* dari 50px jadi lebih dekat */
}

/* End About */

/* Start Projects */
.projects {
  padding-top: 40px;
  padding-bottom: 40px;
  background: aliceblue;
}

.projects-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.projects-content .project {
  position: relative;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.07);
}

.project .project-details {
  padding: 15px;
  text-align: start;
  color: #000;
}

.project .project-tile {
  text-transform: capitalize;
  margin-bottom: 8px;
  color: #3a6f94;
  font-size: 22px;
  font-weight: 600;
}

.project .project-description {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}

.project .btn {
  font-weight: 500;
  padding: 5px 10px;
  font-size: 15px;
}

.projects .more-projects {
  display: flex;
  /* sejajarkan tombol */
  justify-content: center;
  gap: 20px;
  /* jarak antar tombol */
  margin-top: 60px;
  flex-wrap: wrap;
  /* biar di HP turun */
}

.projects .more-projects a {
  flex: 1 1 220px;
  /* semua tombol minimal 220px, rata */
  max-width: 130px;
  /* batas lebar maksimal */
  text-align: center;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  background: #2e5871;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* jarak teks dengan ikon */
  transition: background 0.3s ease, transform 0.2s ease;
}

.projects .more-projects .btn-primary {
  background: #2e5871;
}

.projects .more-projects .btn-primary:hover {
  background: #427da7;
}


.projects .more-projects a i {
  font-size: 14px;
  /* ukuran icon biar pas */
}

@media (max-width: 768px) {
  section#projects .section-title {
    font-size: 35px !important;
    white-space: nowrap !important;
  }
}

/* Projects section */
.projects .section-title {
  font-size: 36px;
  font-weight: 700;
  color: #2e5871;
  text-align: center;
  margin-bottom: 15px;
}

.projects .section-desc {
  max-width: 700px;
  margin: 0 auto 20px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #444;
  text-align: center;
}

.projects .projects-content {
  margin-top: 0;
  padding-top: 0;
}
/* End Projects */

/* Start contact */
.skills {
  padding-top: 40px;
  padding-bottom: 40px;
}

.skills-intro {
  max-width: 700px;
  margin: 20px auto 40px; /* kasih jarak 20px dari judul */
  color: #444;
  font-size: 16px;
  text-align: center;
}

.skills-subtitle {
  margin: 40px 0 20px;
  font-size: 20px;
  font-weight: 600;
  color: #2e5871;
  text-align: center;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 25px;
  justify-items: center;
}

.skill-item {
  background: #fff;
  width: 150px;
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
}

.skill-item i,
.skill-icon {
  font-size: 35px;
  color: #2e5871;  /* warna seragam */
  margin-bottom: 10px;
}

.skill-icon {
  width: 40px;
  height: 40px;
  display: block;
  color: #2e5871;   /* warna seragam theme */
  margin-bottom: 10px;
}

.skill-item span {
  font-weight: 500;
  font-size: 14px;
}


/* Skills section */
.skills .section-title {
  font-size: 36px;
  font-weight: 700;
  color: #2e5871;
  text-align: center;
  margin-bottom: 15px; /* jarak ke deskripsi */
}

.skills .section-desc {
  max-width: 700px;
  margin: 0 auto 20px; /* rapat ke konten */
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #444;
  text-align: center;
}

.skills .skills-content {
  margin-top: 0;   /* hapus jarak bawaan */
  padding-top: 0;
}
/* End contact */

/* Start Footer */
.footer {
  background: #000;
  color: #fff;
  padding: 50px 20px 20px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* hanya 3 kolom */
  gap: 20px;
  max-width: 900px;   /* biar nggak melebar, pas di tengah */
  margin: 0 auto;     /* center ke tengah */
  text-align: center; /* isi text rata tengah */
}


.footer-links {
  text-align: center; /* geser ke tengah */
}

.footer-col {
  flex: 1 1 50px;
}

.footer-logo {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-desc {
  font-size: 14px;
  color: #bbb;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 25px;
  margin-bottom: 15px;
  font-weight: 600;
  color: #fff;
}

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

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #bbb;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: #2e5871;
}

.footer-socials a {
  display: inline-block;
  margin: 0 8px;
  font-size: 20px;
  color: #fff;
  transition: color 0.3s;
}

.footer-socials a:hover {
  color: #2e5871;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #333;
  font-size: 13px;
  color: #777;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr; /* jadi 1 kolom di HP */
    text-align: center;
  }
}


/* End Footer */