/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

/*===== VARIABLES CSS =====*/
:root {
  --header-height: 3rem;
  --font-semi: 600;
  
  /*===== Custom Palette (Onyx Black & Crimson Red) =====*/
  --color-1: #F4F4F5; /* Light Gray Background (Bersih dan minimalis) */
  --color-2: #d10101; /* Primary Red (Warna merah yang dipertahankan) */
  --color-3: #b60201; /* Dark Red (Warna merah gelap untuk efek hover) */
  --color-4: #18181B; /* Onyx Black / Charcoal (Hitam elegan pengganti warna biru) */

  --first-color: var(--color-4); /* Warna utama untuk teks besar/judul */
  --second-color: var(--color-2); /* Warna aksen utama (Merah) */
  --text-color: #3F3F46; /* Abu-abu gelap untuk teks paragraf agar sangat nyaman dibaca */
  --bg-color: var(--color-1);
  --bg-color-alt: #FFFFFF;

  /*===== Typography =====*/
  --body-font: "Poppins", sans-serif;
  --big-font-size: 2rem;
  --h2-font-size: 1.25rem;
  --normal-font-size: .938rem;
  --smaller-font-size: .75rem;

  /*===== Margins =====*/
  --mb-2: 1rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;

  /*===== Z Index =====*/
  --z-back: -10;
  --z-fixed: 100;
}

@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 3.5rem;
    --h2-font-size: 2rem;
    --normal-font-size: 1rem;
    --smaller-font-size: .875rem;
  }
}

/*===== BASE =====*/
*, ::before, ::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden; 
}
body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--text-color);
  background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-color-alt) 100%);
  overflow-x: hidden;
}
h1, h2, p {
  margin: 0;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
a {
  text-decoration: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/*===== CLASS CSS ===== */
.section-title {
  position: relative;
  font-size: var(--h2-font-size);
  color: var(--first-color); /* Hitam */
  margin-top: var(--mb-2);
  margin-bottom: var(--mb-4);
  text-align: center;
}
.section-title::after {
  position: absolute;
  content: "";
  width: 64px;
  height: 0.18rem;
  left: 0;
  right: 0;
  margin: auto;
  top: 2rem;
  background-color: var(--color-2); /* Garis bawah merah */
  border-radius: 5px;
}
.section {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

/*===== LAYOUT =====*/
.bd-grid {
  max-width: 1024px;
  display: grid;
  margin-left: var(--mb-4); 
  margin-right: var(--mb-4); 
}
.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(24, 24, 27, 0.1); 
}

/*===== NAV =====*/
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: var(--font-semi);
}

/* Pengaturan Menu Khusus Mobile */
@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 100%; 
    height: calc(100vh - var(--header-height)); 
    background-color: var(--color-4); /* Menu mobile background hitam */
    padding-top: 5rem; 
    transition: right 0.4s ease-in-out; 
    z-index: var(--z-fixed);
  }

  .nav__list {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    row-gap: 3rem; 
  }

  .nav__item {
    margin-bottom: 0; 
  }

  .nav__link {
    font-size: 1.25rem; 
  }
  
  .active-link::after, 
  .nav__link:hover::after {
    background-color: var(--color-2) !important; /* Underline merah di HP */
  }
}

/* Pengaturan Menu Global (Desktop/Umum) */
.nav__item {
  margin-bottom: var(--mb-4);
}
.nav__link {
  position: relative;
  color: #fff;
  transition: 0.3s;
}
.nav__link:hover {
  color: var(--color-2); /* Hover merah */
}
.nav__link:hover::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 0.18rem;
  left: 0;
  top: 1.5rem;
  background-color: var(--color-2);
  border-radius: 5px;
}
.nav__logo {
  color: var(--first-color); /* Logo hitam */
  font-size: 1.2rem;
  font-weight: 700;
}
.nav__toggle {
  color: var(--first-color);
  font-size: 1.5rem;
  cursor: pointer;
  transition: 0.3s;
}
.nav__toggle:hover {
  color: var(--color-2); /* Toggle icon hover merah */
}

/* Garis bawah aktif untuk Desktop */
.active-link::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 0.18rem;
  left: 0;
  top: 1.5rem;
  background-color: var(--color-2); /* Underline merah aktif */
  border-radius: 5px;
}

/*=== Show menu ===*/
.show {
  right: 0 !important;
}

/*===== HOME =====*/
.home {
  position: relative;
  row-gap: 2rem; 
  padding: 4rem 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  
  min-height: calc(100vh - var(--header-height)); 
  justify-content: center; 
}
.home__data {
  align-self: center;
}
.home__title {
  font-size: var(--big-font-size);
  margin-bottom: var(--mb-5);
  line-height: 1.2;
}
.home__title-color {
  color: var(--color-2); /* Nama Hendi menjadi Merah agar menonjol */
  text-shadow: 2px 2px 4px rgba(209, 1, 1, 0.15); /* Soft red glow */
}

/* Sosial Media di HP */
.home__social {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}
.home__social-icon {
  font-size: 1.5rem;
  color: var(--first-color); /* Hitam */
  transition: 0.3s;
}
.home__social-icon:hover {
  color: var(--color-2); /* Hover Merah */
  transform: translateY(-5px);
}

/* Gambar Home */
.home__img {
  position: relative;
  width: 100%;
  max-width: 300px;
  animation: float 6s ease-in-out infinite;
  display: flex;
  justify-content: center;
}
.home__blob {
  fill: var(--color-2); /* Latar blob putih/light gray */
  transition: fill 0.3s ease;
  width: 100%;
  /* Optional: Tambahkan filter drop-shadow merah jika ingin blob terlihat menyala */
  filter: drop-shadow(0px 10px 15px rgba(209, 1, 1, 0.1));
}
.home__blob:hover {
  fill: var(--color-3); /* Berubah Merah saat disentuh */
}

/*BUTTONS*/
.button {
  display: inline-block;
  background-color: var(--color-2); /* Tombol Merah */
  color: #fff;
  padding: 0.75rem 2.5rem;
  font-weight: var(--font-semi);
  border-radius: 2rem;
  transition: 0.3s;
  box-shadow: 0px 8px 15px rgba(209, 1, 1, 0.2); /* Bayangan merah */
}
.button:hover {
  background-color: var(--color-3); /* Hover Merah Gelap */
  box-shadow: 0px 10px 20px rgba(182, 2, 1, 0.4); 
  transform: translateY(-3px);
}

/* ===== ABOUT =====*/
.about {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about__container {
  row-gap: 2rem;
  text-align: center;
}

.about__subtitle {
  margin-bottom: var(--mb-2);
  color: var(--first-color); /* Hitam */
}

.about__img {
  display: flex;
  justify-content: center;
}

.about__img img {
  width: 200px;
  border-radius: 1rem;
  box-shadow: 0px 10px 25px rgba(24, 24, 27, 0.15); /* Bayangan soft charcoal */
  transition: 0.3s;
}

.about__img img:hover {
  transform: scale(1.02);
}

/* ===== SKILLS =====*/
.skills__container {
  row-gap: 2rem;
  text-align: center;
}
.skills__subtitle {
  margin-bottom: var(--mb-2);
  color: var(--first-color); /* Hitam */
}
.skills__text {
  margin-bottom: var(--mb-4);
}
.skills__data {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  font-weight: var(--font-semi);
  padding: 1rem 1.5rem;
  margin-bottom: var(--mb-4);
  border-radius: 0.75rem;
  background-color: #fff;
  border: 1px solid #E4E4E7; /* Border tipis abu-abu agar terlihat rapi */
  box-shadow: 0px 4px 20px rgba(24, 24, 27, 0.05); /* Bayangan tipis */
  transition: 0.3s;
}
.skills__data:hover {
  transform: translateY(-5px);
  box-shadow: 0px 8px 25px rgba(209, 1, 1, 0.15); /* Bayangan kemerahan saat hover */
}
.skills__names {
  display: flex;
  align-items: center;
  flex: 1;
}
.skills__icon {
  font-size: 2rem;
  margin-right: 1rem;
  color: var(--color-2); /* Ikon skill berwarna merah */
}
.skills__name {
  flex: 1;
  text-align: center;
  padding-right: 1rem;
  line-height: 1.4;
}
.skills__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  background-color: var(--color-2); /* Progress bar merah */
  height: 0.35rem;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: var(--z-back);
}
.skills__html { width: 95%; }
.skills__css { width: 95%; }
.skills__js { width: 85%; }
.skills__ux { width: 90%; }

/* ===== FOOTER =====*/
.footer {
  background-color: var(--color-4); /* Background hitam arang */
  color: #fff;
  text-align: center;
  font-weight: var(--font-semi);
  padding: 3rem 0;
  margin-top: 2rem;
  border-top-left-radius: 2rem;
  border-top-right-radius: 2rem;
}
.footer__title {
  font-size: 2rem;
  margin-bottom: var(--mb-4);
  color: #fff; /* Teks putih jelas */
}
.footer__social {
  margin-bottom: var(--mb-4);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
.footer__icon {
  font-size: 1.5rem;
  color: #fff;
  transition: 0.3s;
}
.footer__icon:hover {
  color: var(--color-2); /* Efek merah saat sosmed disentuh */
  transform: scale(1.2);
}
.footer__copy {
  font-size: var(--smaller-font-size);
  color: #A1A1AA; /* Teks abu-abu terang */
}

/* ===== MEDIA QUERIES=====*/
@media screen and (min-width: 576px) {
  .home { 
    padding: 6rem 0 2rem; 
  }
  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
  }
  .skills__container {
    grid-template-columns: 0.8fr;
    justify-content: center;
    column-gap: 1rem;
  }
}

@media screen and (min-width: 768px) {
  body { margin: 0; }
  .section { padding-top: 5rem; padding-bottom: 3rem; }
  .section-title { margin-bottom: var(--mb-6); }
  .section-title::after { width: 80px; top: 3rem; }
  
  .nav { height: calc(var(--header-height) + 1.5rem); }
  .nav__list {
    display: flex;
    padding-top: 0;
  }
  .nav__item {
    margin-left: var(--mb-6);
    margin-bottom: 0;
  }
  .nav__toggle { display: none; }
  
  .nav__link { color: var(--first-color); } /* Di desktop, menu default warna hitam */
  .nav__link:hover { color: var(--color-2); } /* Hover merah */
  .active-link::after { top: 1.8rem; }

  /* Reset Home untuk Desktop dengan Grid Kiri-Kanan */
  .home { 
    padding: 10rem 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr; 
    align-items: center; 
    text-align: left;
    row-gap: 1rem;
    min-height: 100vh;
  }

  .home__data {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .home__social {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    flex-direction: row;
    justify-content: flex-start;
    margin-top: 0.5rem;
    padding-bottom: 0;
  }

  .home__social-icon:hover {
    transform: translateY(-5px);
  }

  .home__img { 
    position: relative; 
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    width: 100%;
    max-width: 420px; 
    margin: 0 auto; 
    bottom: initial; 
    right: initial;
  }
  
  .about__container { padding-top: 2rem; }
  .about__img img { width: 300px; }
  
  /* PENGATURAN SKILLS DITENGAH PADA DESKTOP */
  .skills__container {
    grid-template-columns: 0.7fr; 
    justify-content: center;
    align-items: center;
    margin: 0 auto;
  }

  .skills__subtitle, .skills__text {
    text-align: center;
  }
}

@media screen and (min-width: 992px) {
  .bd-grid { 
    margin-left: auto; 
    margin-right: auto; 
  }
  .home { 
    padding: 12rem 0 4rem; 
  }
  .home__img { 
    max-width: 480px; 
  }
}