/* --- GOOGLE FONTS --- */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap");

/* --- RESET & BASE STYLES --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}

:root {
  --bg-color: #080808;
  --second-bg-color: #131313;
  --text-color: white;
  --main-color: #b74b4b;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* --- SECTIONS SPACING --- */
section {
  min-height: auto;
  padding: 8rem 9% 4rem;
}

/* --- HEADER & NAVBAR --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  font-size: 3rem;
  color: var(--main-color);
  font-weight: 800;
}

.navbar a {
  font-size: 1.8rem;
  color: white;
  margin-left: 4rem;
  transition: 0.3s;
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
}

#menu-icon {
  font-size: 3rem;
  color: var(--text-color);
  cursor: pointer;
  display: none;
}

/* --- HOME SECTION --- */
.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  padding-top: 15rem;
}

.home-content h1 {
  font-size: 5.6rem;
  font-weight: 700;
  line-height: 1.3;
}

.home-content h1 span {
  color: var(--main-color);
  text-shadow: 0 0 10px rgba(183, 75, 75, 0.3);
}

.home-content h3 {
  font-size: 3.2rem;
  margin-bottom: 2rem;
}

.home-content p {
  font-size: 1.6rem;
  margin-bottom: 3rem;
}

.home-img img {
  width: 28vw;
  height: 28vw;
  border-radius: 50%;
  border: 4px solid var(--main-color);
  box-shadow: 0 0 25px var(--main-color);
  object-fit: cover;
}

/* --- TYPING TEXT STYLES --- */
.multiple-text {
  color: var(--main-color);
}

.typed-cursor {
  color: var(--main-color);
  font-size: 3rem;
  opacity: 1;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* --- GENERAL BUTTONS --- */
.btn,
.btn-outline {
  display: inline-block;
  padding: 1.2rem 2.8rem;
  border-radius: 4rem;
  font-size: 1.6rem;
  font-weight: 600;
  transition: 0.5s ease;
  cursor: pointer;
}

.btn {
  background: var(--main-color);
  color: white;
  margin-right: 2rem;
}

.btn-outline {
  border: 2px solid var(--main-color);
  color: var(--main-color);
}

.btn:hover,
.btn-outline:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--main-color);
  background: var(--main-color);
  color: white;
}

/* --- SERVICES & EDUCATION --- */
.heading {
  font-size: 4.5rem;
  text-align: center;
  margin-bottom: 4rem;
}

.services-container,
.education-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.services-box,
.education-card {
  background: var(--second-bg-color);
  padding: 3rem;
  border-radius: 2rem;
  text-align: center;
  border: 2px solid transparent;
  transition: 0.5s;
}

.services-box:hover,
.education-card:hover {
  border-color: var(--main-color);
  transform: translateY(-10px);
}

.services-box i,
.education-card i {
  font-size: 5rem;
  color: var(--main-color);
  margin-bottom: 2rem;
}

/* --- EXPERIENCE & ACHIEVEMENTS --- */
.experience-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
}

.experience-column .title {
  font-size: 2.8rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.experience-card {
  background: var(--second-bg-color);
  padding: 2.5rem;
  border-radius: 2rem;
  margin-bottom: 2rem;
  border-left: 5px solid var(--main-color);
  transition: 0.4s;
  cursor: pointer;
}

.experience-card:hover {
  transform: translateX(10px);
  background: #1a1a1a;
}

.experience-card h3 {
  font-size: 2.2rem;
  color: var(--main-color);
  margin: 1rem 0;
}

.experience-card p {
  font-size: 1.5rem;
  color: #ccc;
}

.experience-card .year {
  font-size: 1.4rem;
  color: var(--main-color);
  font-weight: 600;
}

.badge {
  background: var(--main-color);
  padding: 0.5rem 1.2rem;
  border-radius: 0.8rem;
  font-size: 1.2rem;
  font-weight: 700;
}

/* --- MODAL POP-UP --- */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.modal-content {
  background-color: var(--second-bg-color);
  padding: 4rem;
  border-radius: 2.5rem;
  width: 90%;
  max-width: 550px;
  position: relative;
  border: 2px solid var(--main-color);
  box-shadow: 0 0 30px rgba(183, 75, 75, 0.3);
  animation: modalMuncul 0.4s ease;
}

@keyframes modalMuncul {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  font-size: 4rem;
  color: var(--main-color);
  cursor: pointer;
  line-height: 1;
}

#modalTitle {
  font-size: 2.8rem;
  color: var(--main-color);
  margin-bottom: 2rem;
  border-bottom: 2px solid #333;
  padding-bottom: 1rem;
}

#modalDescription {
  font-size: 1.6rem;
  line-height: 1.8;
  color: #ddd;
}

/* --- CONTACT & COMMENTS SECTION --- */
.sub-heading {
  text-align: center;
  font-size: 1.6rem;
  color: #aaa;
  margin-top: -3rem;
  margin-bottom: 5rem;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.contact-card,
.comment-card {
  background: var(--second-bg-color);
  padding: 3.5rem;
  border-radius: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-card h3,
.comment-card h3 {
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
  border-left: 4px solid var(--main-color);
  padding-left: 1.5rem;
}

.input-box {
  margin-bottom: 2rem;
}

.input-box input,
.input-box textarea,
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 1.5rem;
  background: #1a1a1a;
  border: 1.5px solid #333;
  border-radius: 1.2rem;
  color: white;
  font-size: 1.5rem;
  transition: 0.3s;
}

.input-box input:focus,
.input-box textarea:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 10px rgba(183, 75, 75, 0.2);
}

.contact-card .btn {
  width: 100%;
  height: 5.5rem;
  margin-top: 1rem;
  background: var(--main-color);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 1.7rem;
  letter-spacing: 1px;
  box-shadow: 0 5px 15px rgba(183, 75, 75, 0.3);
}

.contact-card .btn:hover {
  background: #d45a5a;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(183, 75, 75, 0.5);
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.social-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--second-bg-color);
  padding: 1.5rem;
  border-radius: 1.5rem;
  transition: 0.3s;
}

.social-item:hover {
  background: #1a1a1a;
  transform: scale(1.03);
}

.social-icons {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
}

.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4.5rem;
  height: 4.5rem;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--main-color);
  transition: 0.5s ease;
}

.social-icons a:hover {
  background: var(--main-color);
  color: white;
  box-shadow: 0 0 1.5rem var(--main-color);
  transform: translateY(-5px);
}

.icon-box {
  width: 4.5rem;
  height: 4.5rem;
  background: var(--main-color);
  border-radius: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: white;
}

.social-text span {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
}

.social-text small {
  color: #777;
  font-size: 1.1rem;
}

/* FIREBASE COMMENTS STYLE */
.comment-form {
  margin-bottom: 3rem;
}

.btn-comment {
  width: 100%;
  padding: 1.5rem;
  margin-top: 1.5rem;
  background: var(--main-color);
  color: white;
  border-radius: 1.2rem;
  font-weight: 600;
  font-size: 1.5rem;
  cursor: pointer;
  transition: 0.3s;
}

.comment-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 1rem;
}

/* --- PAGE TRANSITION --- */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: 10000;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s;
}

.page-transition.fade-in {
  opacity: 0;
}

/* --- FOOTER --- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem 9%;
  background: var(--second-bg-color);
}

.footer-text p {
  font-size: 1.4rem;
}

.footer-iconTop a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: var(--main-color);
  border-radius: 1rem;
  color: white;
  transition: 0.5s ease;
}

.footer-iconTop a:hover {
  box-shadow: 0 0 1rem var(--main-color);
}

/* =========================================
   RESPONSIVE DESIGN / MEDIA QUERIES
   (Disusun urut dari layar besar ke kecil)
   ========================================= */

/* --- Tablet & Layar Menengah (< 991px) --- */
@media (max-width: 991px) {
  .contact-wrapper,
  .experience-row {
    grid-template-columns: 1fr;
  }

  .navbar a {
    display: block;
    font-size: 2rem;
    margin: 2.5rem 0;
    text-align: center;
  }

  .home {
    flex-direction: column-reverse;
    text-align: center;
  }

  .home-img img {
    width: 60vw;
    height: 60vw;
  }
}

/* --- Layar HP Normal (< 768px) --- */
@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem 4%;
    background: var(--bg-color);
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.3);
  }

  .navbar.active {
    display: block;
  }

  .home {
    flex-direction: column-reverse;
    text-align: center;
  }

  .home-img img {
    width: 60vw;
    height: 60vw;
  }
}

/* --- Layar HP Kecil (< 450px) --- */
@media (max-width: 450px) {
  html {
    font-size: 50%;
  }

  section {
    padding: 6rem 5% 3rem;
  }

  .home {
    padding-top: 10rem;
    gap: 2.5rem;
  }

  .home-img img {
    width: 70vw;
    height: 70vw;
  }

  .home-content h1 {
    font-size: 4.5rem;
  }

  .home-content h3 {
    font-size: 2.5rem;
  }

  .services-container,
  .education-row {
    grid-template-columns: 1fr;
  }

  .contact-wrapper {
    gap: 3rem;
  }

  .contact-card,
  .comment-card {
    padding: 2.5rem;
  }

  .social-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 2.5rem 2rem;
    width: 95%;
  }

  .close-btn {
    top: 1.5rem;
    right: 2rem;
  }
}
