/* Variables */
:root {
  --main-color: #fa3120;
  --text-color: #0E1320;
  --muted-icon: #6e7480;
  --bg-color: #fff;
  --font-family: 'Poppins', sans-serif;
  --transition: 0.3s ease;
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  background: var(--bg-color);
  color: var(--text-color);
}

/* Header */
.l-header {
  position: fixed; width: 100%; top: 0; left: 0; z-index: 100;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.nav.bd-grid {
  max-width: 1024px; margin: 0 auto; padding: 1rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
}
.bd-grid { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.nav__logo { font-weight: bold; font-size: 1.3rem; color: var(--text-color); text-decoration: none; }
.nav__menu { display: flex; }
.nav__list { display: flex; list-style: none; gap: 1.5rem; }
.nav__link {
  position: relative; font-weight: 600; color: var(--text-color); text-decoration: none;
}
.nav__link:hover::after, .nav__link.active-link::after {
  content: ""; position: absolute; bottom: -5px; left: 0; width: 100%; height: 2px;
  background: var(--main-color);
}
.nav__toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* Home */
.home {
  padding: 8rem 2rem 4rem; display: flex; flex-wrap: wrap; gap: 2rem;
  align-items: center; justify-content: space-between;
}
.home__data { flex: 1 1 45%; max-width: 500px; padding-left: 4vw; }
.home__title { font-size: 2.5rem; font-weight: 700; color: var(--text-color); }
.home__title-color { color: var(--main-color); }
.home__buttons { margin-top: 1.5rem; }
.button, .button-outline {
  display: inline-block; text-decoration: none; text-align: center; width: 130px;
  padding: 0.75rem 0; border-radius: 0.5rem; font-weight: 600; border: none;
  transition: background-color var(--transition), color var(--transition), border var(--transition);
}
.button { background-color: var(--main-color); color: #fff; }
.button-outline { background: transparent; border: 2px solid var(--main-color); color: var(--main-color); }
.button-outline:hover, .button:hover { background: var(--main-color); color: #fff; }
.button:hover { background: #d12b1c; }
.home__social { margin-top: 1.5rem; display: flex; gap: 1rem; }
.home__social-icon { font-size: 1.5rem; color: var(--text-color); transition: color var(--transition); }
.home__social-icon:hover { color: var(--main-color); }
.home__img { flex: 1 1 45%; max-width: 450px; display: flex; justify-content: center; }
.home__blob-wrapper { width: 100%; max-width: 400px; }
.home__blob { width: 100%; display: block; }
.section-title { 
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #fa3120; /* Orange */
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* About */
.about.section { padding: 4rem 2rem; background: #fff; text-align: center; }
.about__container {
  display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: center;
  max-width: 1024px; margin: 0 auto;
}
.about__img { flex: 1 1 300px; max-width: 400px; }
.about__img img { width: 100%; border-radius: 0.75rem; }
.about__subtitle { text-align: left; font-size: 1.75rem; font-weight: 600; margin-bottom: 1rem; }
.about__text { text-align: justify; font-size: 1.3rem; line-height: 1.6; color: #444; max-width: 600px; }
.indo_color { color: #d60000; font-weight: bold; }
.qatar_color { color: #8d1b3d; font-weight: bold; }

/* Work */
.work__container {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 2rem 0;
}
.work__card {
  max-width: 600px; /* or larger if you want */
  width: 100%;
  background: #fff; border-radius: 0.75rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08); overflow: hidden; text-align: center;
  transition: transform 0.3s ease; text-decoration: none; margin: 0 auto;
}
.work__card:hover { transform: translateY(-5px); }
.work__card img {
  width: 100%;
  aspect-ratio: 16 / 9; /* Ensures 1920x1080 ratio */
  object-fit: cover;
  display: block;
  border-radius: 0.75rem 0.75rem 0 0;
}
.work__label { font-size: 1rem; padding: 1rem; background: var(--main-color); color: #fff; }
.work-detail__container { max-width: 800px; margin: 6rem auto 4rem; text-align: center; padding: 0 1rem; }
.work-detail__image { width: 100%; max-width: 600px; margin: 1rem 0; border-radius: 0.5rem; }
.work-detail__text { font-size: 1rem; line-height: 1.8; margin-bottom: 2rem; color: #444; }

/* Technology */
.technology.section { padding: 4rem 2rem; text-align: center; background: #fff; }
.technology__container {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 400px;
  margin: 0 auto; justify-items: center;
}
.tech__card {
  background: #f0f0f0; padding: 1.5rem; border-radius: 0.75rem; display: flex;
  align-items: center; justify-content: center; transition: transform 0.3s, box-shadow 0.3s;
  width: 100%;
}
.tech__card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.tech__card img, .tech__card i, .tech__card svg {
  width: 48px; height: 48px; fill: var(--muted-icon); color: var(--muted-icon); transition: fill 0.3s, color 0.3s;
}
.tech__card:hover img, .tech__card:hover i, .tech__card:hover svg {
  fill: var(--main-color); color: var(--main-color);
}

/* Contact */
.contact.section { padding: 4rem 1rem; text-align: center; }
.contact__container { max-width: 600px; margin: 0 auto; }
.contact__form { display: flex; flex-direction: column; gap: 1rem; }
.contact__input {
  padding: 1rem; font-size: 1rem; border: 1px solid #ccc; border-radius: 0.5rem; width: 100%;
}
.contact__button {
  align-self: flex-end; padding: 0.75rem 2rem; font-weight: 600; border: none;
  border-radius: 0.5rem; background: var(--main-color); color: #fff; cursor: pointer;
  transition: background-color var(--transition);
}
.contact__button:hover { background: #d12b1c; }

/* Footer */
.footer { padding: 2rem 1rem; text-align: center; background: #f9f9f9; color: var(--text-color); }
.footer__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.footer__social { margin-bottom: 1rem; }
.footer__icon { font-size: 1.5rem; margin: 0 0.5rem; color: var(--text-color); transition: color var(--transition); }
.footer__icon:hover { color: var(--main-color); }
.footer__copy { font-size: 0.875rem; color: #666; }

/* Project Gallery */
.project-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem; margin-bottom: 2rem;
}
.project-card {
  background: #fff; border-radius: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden; transition: box-shadow 0.2s; padding: 1rem; text-align: center;
}
.project-thumb {
  width: 100%; height: 180px; object-fit: cover; border-radius: 0.5rem;
}
.project-info h3 {
  margin: 1rem 0 0.5rem 0; font-size: 1.1rem; display: flex; align-items: center;
  justify-content: center; gap: 0.5rem;
}
.project-info p { color: #555; }
body.dark-mode .project-info p { color: #ccc; }

/* Center the section title */
.work.section .section-title {
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .nav__menu {
    display: none; position: absolute; top: 3.5rem; right: 1rem; padding: 1rem;
    flex-direction: column; border-radius: 0.5rem; background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  .nav__menu.show { display: flex; }
  .nav__toggle { display: block; }
  .home, .about__container { flex-direction: column; text-align: center; }
  .home__data { padding-left: 0; }
  .work__container {
    grid-template-columns: 1fr;
  }
  .work__card {
    max-width: 100%;
    margin-bottom: 1.5rem;
  }
  .technology__container {
    grid-template-columns: repeat(2, 1fr);
  }
  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .section-title {
    font-size: 1.3rem;
  }
  .work__label {
    font-size: 0.95rem;
  }
}

/* Dark Mode */
body.dark-mode {
  background-color: #18191a; color: #e0e0e0;
}
body.dark-mode .l-header,
body.dark-mode .footer,
body.dark-mode .section,
body.dark-mode .about.section,
body.dark-mode .technology.section,
body.dark-mode .contact.section {
  background-color: #18191a; color: inherit;
}
body.dark-mode .work__card,
body.dark-mode .project-card,
body.dark-mode .tech__card {
  background-color: #232425; color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
body.dark-mode .contact__input {
  background-color: #232425; color: #fff; border: 1px solid #444;
}
body.dark-mode .nav__logo,
body.dark-mode .home__social-icon,
body.dark-mode .dark-toggle,
body.dark-mode .footer__icon,
body.dark-mode .nav__link {
  color: #fff;
}
body.dark-mode .nav__link:hover::after,
body.dark-mode .nav__link.active-link::after {
  background-color: #fff;
}
body.dark-mode .button {
  background-color: #fff; color: #121212;
}
body.dark-mode .button:hover { background-color: #ccc; }
body.dark-mode .button-outline {
  background-color: transparent; border: 2px solid #fff; color: #fff;
}
body.dark-mode .button-outline:hover {
  background-color: #fff; color: #121212;
}
body.dark-mode .work__label { background-color: #333; color: #fff; }
body.dark-mode .tech__card img,
body.dark-mode .tech__card svg { filter: brightness(0.8); }
body.dark-mode .footer__copy,
body.dark-mode .section-title,
body.dark-mode .home__title,
body.dark-mode .about__subtitle,
body.dark-mode .about__text { color: inherit; }
body.dark-mode .indo_color { color: #ff4c4c; }
body.dark-mode .qatar_color { color: #b22222; }
/* Make sure the icon inside the button is centered and has no border/background */
.dark-toggle {
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-toggle i.bx {
  font-size: 2rem;
  color: inherit;
  background: none;
  border: none;
  box-shadow: none;
  display: inline-block;
  line-height: 1;
}

