:root {
  --primary: #2cbbcb;
  --bg: #010101;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #01ffff;
  color: #2c2c2c;
}

/* Splash screen */

.intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--primary);
  transition: 1s;
  z-index: 1;
  opacity: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-header {
  align-items: center; /* sejajarkan logo & teks */
  font-style: italic;
  font-size: 22px;
  font-weight: 700;
  color: #0a0404;
  text-decoration: none;
}

.logo-intro {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary);
}

.logo-header img {
  width: 100px;
  height: auto;
  display: block;
  margin: 0 auto;
  animation: calc(1s * 1) 2s linear infinite;
  animation-name: rotate;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.logo {
  position: relative;
  display: inline-block;
  bottom: -20px;
  opacity: 0;
}

.logo.active {
  bottom: 0;
  opacity: 1;
  transition: ease-in-out 0.5s;
}

.logo.fade {
  bottom: 150px;
  opacity: 0;
  transition: ease-in-out 0.5s;
}

/* ==================== NAVBAR ==================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  overflow: hidden;
  background: #978d8d4b;
  background-color: rgba(168, 144, 144, 0.152);
  color: #fff;
  backdrop-filter: blur(10px);
  border-bottom: 4px solid rgba(52, 6, 6, 0.122);
}

.navbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: 0.5s;
}

.navbar:hover::before {
  left: 100%;
}

.navbar-nav a {
  position: relative; /* supaya span hover tetap sejajar */
  color: rgb(0, 0, 0);
  text-decoration: none;
  padding: 8px;
  height: 35px;
  width: auto;
  transition: color 0.3s ease;
  z-index: 1000;
}

.navbar .navbar-nav a:hover {
  color: var(--primary);
}

.navbar .navbar-nav a span {
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.87);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}

.navbar .navbar-nav a:hover span {
  transform: scaleX(1);
  opacity: 1;
}

.navbar .navbar-logo {
  display: flex;
  align-items: center; /* sejajarkan logo & teks */
  font-style: italic;
  font-size: 22px;
  font-weight: 700;
  color: #0a0404;
  text-decoration: none;
}

.navbar .navbar-logo img {
  width: 35px;
  height: auto;
  display: block;
}

.navbar .navbar-logo span {
  color: var(--primary);
}

/* Navbar menu (desktop) */
.navbar-nav {
  display: flex;
  gap: 15px;
}

/* Extra icons */
.navbar-ekstra {
  display: flex;
  gap: 10px;
}

.jumbotron {
  color: rgb(28, 53, 99);
  text-align: center;
  padding: 2rem;
  border-radius: 10px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin-top: 50px;
}
.fancy-line {
  border: none;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(1, 98, 79, 0.69),
    transparent
  );
  margin: 1rem auto;
  width: 10%;
}

/* ==================== HERO SECTION ==================== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero .content-home {
  padding: 1.4rem 7%;
  max-width: 60rem;
}

.hero .content-home h1 {
  font-size: 56px;
  font-weight: 700;
  margin-bottom: 3px;
  margin-block: 0;
  color: #010101;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.341);
}

.hero .content-home h2 {
  font-size: 3em;
  color: #010101;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.341);
}

.hero .content-home span {
  color: var(--primary);
}

.hero .image {
  width: 50px;
  height: auto;
  vertical-align: middle;
  margin-left: 10px;
}

.hero .image:hover {
  transform: scale(1.1);
  transition: 0.3s;
}

.hero .content-home p {
  font-size: 20px;
  margin-top: 1rem;
  line-height: 1.4;
  font-weight: 100;
  font-family: "Times New Roman", Times, serif;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.341);
}

.hero .content-home .hower {
  position: relative;
  display: inline-block;
  padding: 10px;
  background-color: var(--primary);
  border: 2px solid;
  border-radius: 5px;
  color: rgb(8, 7, 7);
  text-decoration: none;
  transition: 0.1s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.341);
}

.hero .content-home .hower:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: rgb(0, 0, 0);
  box-shadow: 0 0 2px #000000, 0 0 4px var(--primary), 0 0 20px var(--primary),
    0 0 100px var(--primary);
  -webkit-box-reflect: below 1px linear-gradient(transparent, #0005);
}

/* Sosial media */
.sosmed a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  margin: 25px 15px 30px 0;
  font-size: 20px;
  color: var(--primary);
  background: transparent;
  text-decoration: none;
  border: 2px solid var(--primary);
  border-radius: 50%;
  transition: 0.5s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sosmed a:hover {
  background-color: var(--primary);
  color: #000000;
  transform: scale(1.2);
  transition: 0.5s;
}

.hero .image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero .image img {
  width: 100%;
  max-width: 800px;
  height: auto;
}

/* ==================== SKILL ==================== */
.skill {
  align-items: center;
  justify-content: space-between;
}

.skill .container-chart {
  display: flex;
  gap: 80px;
  justify-content: center;
}

.skill .carousel {
  margin: 100px auto;
  width: 90%;
  border: 5px solid rgba(102, 51, 153, 0);
  display: flex;
  overflow-x: auto;
  gap: 0.1em;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.skill .group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  animation: scroll 7s infinite linear;
  padding-right: 1em;
}

.skill .carousel .card {
  flex: 0 0 5em;
  height: 5em;
  padding: 1em;
  background: #8d8d974b;
  font-size: 3rem;
  border-radius: 0.2em;
  text-align: center;
  align-content: center;
}

@keyframes scroll {
  from {
    translate: 0;
  }
  to {
    translate: -100%;
  }
}

.chart {
  padding: 2rem 8rem;
  border: 1px solid --primary;
  border-radius: 1rem;
  background: #8786862c;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
}

.accordion-wrapper {
  justify-content: center;
}

.accordion-wrapper .container {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 1rem;
  margin-bottom: 30px;
  border: 1px solid var();
  border-radius: 1rem;
  background: #8786862c;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
}

details {
  display: flex;
  flex-direction: row;
  background: transparent;
  color: white;
  height: 30rem;
  border-radius: 2rem;
  overflow: hidden;

  /* To make the image work …*/
  position: relative;
  z-index: 1;

  --open-size: min(30vw, 300px);

  /* Hide marker */
  ::marker {
    content: "";
  }

  /* The image is tucked in the summary, because otherwise it would be hidden when not [open] as it ends up in the ::details-content pseudo */
  summary img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    transition: filter 0.5s ease;
  }
  /* Animate the image */
  &[open] summary img {
    filter: brightness(0.5);
  }

  summary {
    padding: 1rem 1em;
    width: 5rem;
    flex-shrink: 0; /* Prevent shrinking */
    text-align: center;

    span {
      display: grid;
      place-content: center;
      width: 100%;
      aspect-ratio: 1;
      border-radius: 50%;
      background: rgb(0 0 0 / 0.25);
    }
  }
}

.details-content-wrapper {
  /* We need margin-trim … */
  :first-child {
    margin-top: 20px;
  }
  :last-child {
    margin-bottom: 0;
  }

  h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
  }

  /* Animate-in the text when open */
  p {
    transform: translateY(2rem);
    opacity: 0;
    transition: all 1s ease;
    transition-delay: 1s;
  }
}

.details-content-wrapper h3 {
  font-size: 1.2rem;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
  margin-bottom: 0.5rem;
}

.details-content-wrapper p {
  font-size: 0.9rem;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
  margin-bottom: 1rem;
}

.details-content-wrapper p:nth-child(1) {
  transition-delay: 0.1s;
}

.details-content-wrapper p:nth-child(2) {
  transition-delay: 0.2s;
}

.details-content-wrapper p:nth-child(3) {
  transition-delay: 0.3s;
}
.details-content-wrapper p:nth-child(4) {
  transition-delay: 0.4s;
}

[open] .details-content-wrapper p {
  transform: translateY(0);
  opacity: 1;
}

/* Animation */
::details-content {
  transition: width 0.5s ease, content-visibility 0.5s ease allow-discrete;
  width: 0;
}

[open]::details-content {
  width: var(--open-size);
}

@layer baselayout {
  html {
    background: white;
    color: #444;
    font-family: system-ui;
    line-height: 1.42;

    overscroll-behavior-x: none;
    overflow: auto;
  }

  main {
    max-width: 90ch;
    margin: 0 auto;
    padding-bottom: 10rem;
  }

  p {
    margin-bottom: 1em;
  }

  h1,
  h2 {
    margin: 4em 0 1em;
  }
  h3 {
    margin: 1em 0 0.5em;
    margin-top: 20px;
  }

  #demo {
    padding: 1em;
    border: 1px solid #ccc;
    background: #f4f6f9;
  }
}

/* ==================== GALLERY ==================== */
.gallery-container {
  max-width: 1140px;
  margin: 0px auto 0;
  text-align: center;
}

.filter-button {
  margin-bottom: 50px;
  font-weight: 500;
}

.filter-btn {
  font-size: 16px;
  color: gray;
  background-color: transparent;
  border: none;
  padding: 12px 24px;
  margin: 10px;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.filter-btn.active {
  background-color: #333;
  color: #fff;
}

.filter-btn:hover {
  background-color: rgba(0, 0, 0, 0.168);
  color: #000000;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.gallery-item {
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gallery-grid .overlay {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  flex-direction: column;
  left: 0;
  border-radius: 10%;
  bottom: 0;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7) 60%);
  padding: 0 50px;
  font-size: 14px;
  width: 100%;
  text-align: center;
  opacity: 0;
  transform: translateY(20px); /* geser dikit ke bawah */
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-item .overlay h3 {
  margin-top: 25%;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
  margin-bottom: 5px;
  font-size: 30px;
  font-weight: 500;
}

.gallery-item:hover .overlay {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none;
}

/* ==================== APP ==================== */
.app {
  display: flex;
  justify-content: center;
  gap: 20px;
  cursor: default;
}

.app .container {
  display: flex;
  gap: 200px;
  justify-content: center;
  padding: 1rem;
  margin-bottom: 30px;
  border: 1px solid --primary;
  border-radius: 1rem;
  background: #8786862c;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
}

.contact {
  display: flex;
  justify-content: center;
  text-align: center;
  align-items: center;
}

.contact .container {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 1rem;
  margin-bottom: 30px;
  border: 1px solid --primary;
  border-radius: 1rem;
  background: #8786862c;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
}

.contact iframe {
  border: 2px solid var(--primary);
  border-radius: 10px;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
}

.contact .form {
  display: flex;
  width: 300px;
  height: auto;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-left: 20px;
}

.contact .form label {
  font-weight: bold;
  color: var(--primary);
}

@layer demo {
  .form {
    textarea,
    input {
      field-sizing: content;
    }
  }

  textarea {
    min-block-size: 3.5rlh;
    min-inline-size: 20ch;
    max-inline-size: 50ch;
  }

  input {
    min-inline-size: 20ch;
    max-inline-size: 50ch;
  }
}

.contact .form input,
.contact .form textarea {
  padding: 10px;
  border: 1px solid var(--primary);
  border-radius: 5px;
  background: transparent;
  color: #000000;
}

.contact .form input::placeholder,
.contact .form textarea::placeholder {
  color: #ccc;
}

.contact .form button {
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: var(--primary);
  color: #000000;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact .form button:hover {
  background-color: #17a2b8;
}

/* ==================== FOOTER ==================== */
footer {
  text-align: center;
  padding: 20px;
  background-color: #333;
  color: #fff;
}

footer p {
  margin: 0;
  font-size: 16px;
}

/*Hamburger*/
/* Hamburger */
#hamburger-menu {
  display: none;
}

/* Navbar menu untuk mobile */
@media (max-width: 758px) {
  #hamburger-menu {
    display: block;
    cursor: pointer;
    z-index: 1100;
  }

  #hamburger-menu div {
    width: 25px;
    height: 3px;
    background-color: #000;
    margin: 5px;
    transition: 0.4s;
  }
  #hamburger-menu.active .bar1 {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  #hamburger-menu.active .bar2 {
    opacity: 0;
  }

  #hamburger-menu.active .bar3 {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .navbar-nav {
    position: fixed;
    top: 0;
    right: -250px;
    height: 100vh;
    width: 250px;
    z-index: 1000;
    flex-direction: column;
    background: transparent;
    background: #978d8d4b;
    background-color: rgba(168, 144, 144, 0.152);
    color: #fff;
    backdrop-filter: blur(10px);
    border-bottom: 4px solid rgba(52, 6, 6, 0.122);
    padding-top: 60px;
    transition: 0.4s ease;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
  }

  .navbar-nav.active {
    right: 0; /* geser masuk */
  }

  .navbar-nav a {
    position: relative; /* supaya span hover tetap sejajar */
    color: rgb(0, 0, 0);
    text-decoration: none;
    padding: 8px;
    height: 35px;
    width: auto;
    padding-left: 30px;
    transition: color 0.3s ease;
  }

  .navbar-nav a span {
    display: none; /* sembunyikan garis bawah pada mobile */
  }

  .navbar-nav a:hover {
    background: rgba(0, 0, 0, 0.1);
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    gap: 20px;
  }

  .hero .content-home h1 {
    font-size: 32px;
  }

  .hero .image {
    width: 100%;
    max-width: 300px;
  }

  .skill .container-chart {
    flex-direction: column;
    gap: 40px;
    padding: 0 40px;
  }

  .accordion-wrapper {
    gap: 20px;
    padding: 20px 10px;
  }

  .details-content-wrapper {
    --open-size: 80vw;
  }

  .details {
    height: auto;
  }

  .details-content-wrapper h3 {
    font-size: 1rem;
  }

  .gallery-container {
    padding: 10px 10px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .contact {
    flex-direction: column;
  }

  .contact .container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 60%;
  }

  .contact iframe {
    width: 100%;
    max-width: 600px;
    height: 300px;
  }

  .contact .form {
    margin-left: 0;
    width: 100%;
    max-width: 400px;
  }

  .contact .form input,
  .contact .form textarea {
    padding: 10px;
    border: 1px solid var(--primary);
    border-radius: 5px;
    background: transparent;
    color: #000000;
  }

  .contact .form input::placeholder,
  .contact .form textarea::placeholder {
    color: #ccc;
  }

  .contact .form button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary);
    color: #000000;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .contact .form button:hover {
    background-color: #17a2b8;
  }
}

/* ======== FIX ACCORDION DI DESKTOP BIAR TENGAH ======== */
@media (min-width: 769px) {
  main.accordion-wrapper {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start;
    margin: 0 auto !important;
    padding: 0;
  }

  main.accordion-wrapper > .container {
    width: 100% !important;
    max-width: 1300px !important;
    display: flex !important;
    justify-content: center !important;
    gap: 20px;
    margin: 0 auto !important;
  }
}
