:root {
  --myWhite: #ebebf0;
  --myBlack: #141010;
  --primary: #14b8a6;
  --primary600: #0d9488;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
}

header ul li a,
header .logo p a {
  color: var(--myWhite);
  font-weight: 600;
  font-size: 1.2em;
  transition: 0.3s;
}

header ul li a:hover,
header .logo p:hover a {
  color: var(--primary600);
}

header ul li a:hover span,
header ul li.active a span {
  width: 100%;
}

header ul li a:hover span,
header ul li.active a span {
  left: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

section {
  padding: 60px;
  width: 100%;
}

section:nth-child(odd) {
  background: var(--myWhite);
}

body {
  background: #fff;
  font-family: "Noto Sans", sans-serif;
  letter-spacing: 1px;
  color: var(--myBlack);
  overflow-x: hidden;
}

header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  backdrop-filter: blur(5px);
  position: fixed;
  z-index: 10000;
  transition: 0.6s;
  padding: 30px 60px;
  /* border-bottom: 1px solid red; */
}

header.sticky {
  background: rgba(235, 235, 240, 0.8);
  padding: 10px 60px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), 0 2px 5px rgba(255, 255, 255, 0.2);
}

header.sticky ul li a,
header.sticky .logo p a {
  color: var(--myBlack);
  transition: 0.3s;
}

header.sticky .logo img {
  background: var(--primary600);
  transition: 0.6s;
}

header.sticky ul li a:hover,
header.sticky .logo p:hover a {
  color: var(--primary600);
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

header .logo img {
  width: 50px;
  background: var(--myWhite);
  border-radius: 50%;
  margin-right: 20px;
  transition: 0.3s;
}

header .logo img:hover {
  background: var(--primary600);
}

header.sticky .logo img:hover {
  background: var(--myWhite);
}

header ul {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.6s;
}

header ul li {
  padding: 0 20px;
}

header ul li a {
  position: relative;
}

header ul li a span {
  height: 2px;
  width: 0;
  left: 50%;
  bottom: -4px;
  transition: all 0.3s;
  display: block;
  background: var(--primary600);
  position: absolute;
}

.hero {
  color: var(--myWhite);
  background: linear-gradient(
      to right,
      rgba(20, 184, 166, 0.8),
      rgba(20, 184, 166, 0.8)
    ),
    url(../../assets/svg/common-bg.svg);
  background-position: center;
  min-height: 100vh;
  display: grid;
  place-items: center;
  grid-template-columns: 1fr 1fr;
  background-attachment: fixed;
}

.hero .sambutan h1 {
  font-weight: 700;
  font-size: 3em;
  line-height: 60px;
  margin-bottom: 10px;
}

.hero .sambutan q {
  font-weight: 400;
  font-size: 1.2em;
  color: rgb(239, 232, 232);
}

.hero .sambutan h1,
.hero .sambutan q {
  text-shadow: 1px 1px 3px rgba(20, 16, 16, 0.5);
}

.hero img {
  width: 400px;
  margin-top: 15px;
}

.hero .sambutan a {
  display: inline-block;
  padding: 10px;
  border-radius: 10px;
  background: var(--myWhite);
  color: var(--primary);
  font-weight: 500;
  margin-top: 20px;
  transition: 0.3s;
}

.hero .sambutan a:hover {
  box-shadow: 3px 3px rgba(20, 16, 16, 0.2);
  transform: translateY(-2px);
}

#about {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
}

.kiri {
  padding-right: 25px;
}

.motif span {
  display: inline-block;
  width: 15px;
  height: 6px;
  background: var(--primary);
  border-radius: 20px;
}

.motif.atas span:first-child {
  width: 50px;
}

.motif.bawah span:last-child {
  width: 50px;
}

.motif.bawah {
  margin-bottom: 1rem;
}

.social-icon {
  margin-top: 20px;
  display: flex;
}

.social-icon a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 41px;
  height: 41px;
  border-radius: 50%;
  transition: 0.3s;
}

.social-icon a:hover {
  background: var(--primary);
  fill: var(--myWhite);
}

#skills {
  width: 100vw;
  display: grid;
  justify-content: center;
  flex-direction: column;
}

#skills h2,
#skills .motif,
#projects .motif,
#projects h2,
#contact h2,
#contact .motif {
  text-align: center;
}

#skills .bar {
  margin: 20px 0;
}

#skills .bar:first-child {
  margin-top: 0;
}

#skills .bar .info {
  margin-bottom: 10px;
}

#skills .bar .progress-line {
  position: relative;
  height: 10px;
  width: 80vw;
  background: #d4d4d4;
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5), 0 1px rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  animation: animasi 1s cubic-bezier(1, 0, 0.5, 1) forwards;
}

#skills .bar .progress-line span {
  height: 100%;
  width: 80%;
  background: var(--primary);
  position: absolute;
  border-radius: 10px;
  transform: scaleX(0);
  transform-origin: left;
  animation: animasi 1s 1s cubic-bezier(1, 0, 0.5, 1) forwards;
}

@keyframes animasi {
  100% {
    transform: scaleX(1);
  }
}

#skills .bar .progress-line.html span {
  width: 90%;
}

#skills .bar .progress-line.css span {
  width: 85%;
}

#skills .bar .progress-line.js span {
  width: 80%;
}

#skills .bar .progress-line.bootstrap span {
  width: 85%;
}

#skills .bar .progress-line.nodejs span {
  width: 75%;
}

#skills .bar .progress-line.postgres span {
  width: 70%;
}

#skills .bar .progress-line span::before {
  position: absolute;
  content: "";
  right: 0;
  top: -10px;
  height: 0;
  width: 0;
  border: 7px solid transparent;
  border-bottom-width: 0;
  border-right-width: 0;
  border-top-color: #000;
}

#skills .bar .progress-line span::after {
  position: absolute;
  right: 0;
  top: -29px;
  color: var(--myWhite);
  background: var(--myBlack);
  padding: 1px 8px;
  border-radius: 3px;
}

.progress-line.html span::after {
  content: "90%";
}

.progress-line.css span::after {
  content: "85%";
}

.progress-line.js span::after {
  content: "80%";
}

.progress-line.bootstrap span::after {
  content: "85%";
}

.progress-line.nodejs span::after {
  content: "75%";
}

.progress-line.postgres span::after {
  content: "70%";
}

.progress-line.go span::after {
  content: "80%";
}

#projects .cards {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.card {
  max-width: 24rem;
  text-align: center;
  position: relative;
  display: flex;
  color: #212529;
  background-color: #fff;
  border-radius: 20px;
  margin: 4em 3em;
}

.card p {
  font-size: 0.8em;
  margin-bottom: 17px;
}

.card-info a {
  font-size: 0.8em;
  color: var(--myWhite);
  background: var(--primary);
  padding: 10px;
  border-radius: 0.5em;
  transition: 0.3s;
}

.card-info a:hover {
  box-shadow: 2px 2px rgb(20, 16, 16);
}

.card img {
  width: 100%;
  padding: 5px 5px 5px;
  background: #fff;
  border-radius: 10px;
  transition: 0.3s;
  z-index: 2;
}

.card img:hover {
  opacity: 0.8;
}

.card.aktif .card-info {
  opacity: 1;
  transform: translateY(90%);
  visibility: visible;
}

.card-info {
  background: #fff;
  border-radius: 0 0 10px 10px;
  transition: 0.3s;
  width: 100%;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  bottom: 0;
}

#contact {
  display: grid;
  place-items: center;
}

#contact form {
  width: 50%;
}

#contact input,
#contact textarea {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 400;
  line-height: 1.5;
  margin: 0.5em 0 1.2em;
  background-color: var(--myWhite);
  background-clip: padding-box;
  border: 1px solid #dee2e6;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  #contact input,
  #contact textarea {
    transition: none;
  }
}

#contact input:focus,
#contact textarea:focus {
  background-color: var(--myWhite);
  border-color: var(--primary);
  outline: transparent;
  box-shadow: 0 0 0 0.25rem rgba(20, 184, 166, 0.25);
}

.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.alert-overlay.show {
  opacity: 1;
  visibility: visible;
}

.alert-box {
  background: white;
  border-radius: 15px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.7);
  transition: all 0.3s ease;
  text-align: center;
}

.alert-overlay.show .alert-box {
  transform: scale(1);
}

.alert-icon {
  font-size: 3em;
  margin-bottom: 15px;
  display: block;
}

.alert-success .alert-icon {
  color: #4caf50;
}

.alert-error .alert-icon {
  color: #f44336;
}

.alert-warning .alert-icon {
  color: #ff9800;
}

.alert-info .alert-icon {
  color: #2196f3;
}

.alert-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.alert-message {
  font-size: 1em;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.5;
}

.alert-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.alert-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.alert-btn-primary {
  background: linear-gradient(45deg, #2196f3, #1976d2);
  color: white;
}

.alert-btn-secondary {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.alert-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pulse {
  animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.submit {
  padding: 0.8rem 1.5rem;
  background: var(--primary);
  outline: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submit:hover {
  box-shadow: 3px 3px rgba(20, 16, 16, 0.5);
  transform: translateY(-2px);
}
.spinner {
  display: flex;
  gap: 2px;
  margin-right: 8px;
}

.spinner div {
  width: 3px;
  height: 16px;
  background-color: white;
  border-radius: 2px;
  animation: bars 1.2s ease-in-out infinite;
}

.spinner div:nth-child(1) {
  animation-delay: -0.24s;
}
.spinner div:nth-child(2) {
  animation-delay: -0.12s;
}
.spinner div:nth-child(3) {
  animation-delay: 0s;
}

@keyframes bars {
  0%,
  40%,
  100% {
    transform: scaleY(0.4);
    opacity: 0.5;
  }
  20% {
    transform: scaleY(1);
    opacity: 1;
  }
}

footer {
  width: 100%;
  background: var(--primary);
  text-align: center;
  padding: 2rem;
  color: var(--myWhite);
  text-shadow: 1px 1px 1px rgb(0, 0, 0, 0.3);
}

footer a {
  color: var(--myWhite);
  font-weight: 700;
}

/* Responsive Breakpoints */
@media (max-width: 1000px) {
  header ul li {
    padding: 0 10px;
  }
}

@media (max-width: 900px) {
  header,
  section {
    padding: 30px 30px;
  }

  header.sticky {
    padding: 10px 30px;
  }

  .hero {
    padding: 0 30px;
  }

  .hero .sambutan {
    font-size: 80%;
  }

  .hero .sambutan h1 {
    line-height: 40px;
  }

  .hero img {
    width: 370px;
  }
}

@media (max-width: 800px) {
  header ul {
    position: absolute;
    top: 115px;
    right: 0;
    flex-direction: column;
    transform: translateX(800px);
    width: 50%;
    background: var(--myWhite);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 7px rgba(20, 16, 16, 0.2);
  }

  header ul li {
    margin-bottom: 50px;
    width: 140px;
  }

  header ul li:hover a {
    color: var(--primary600);
  }

  header ul li:hover a span {
    color: var(--primary600);
  }

  header ul li:last-child {
    margin-bottom: 100vh;
  }

  header ul li a {
    position: absolute;
    left: 0;
    margin: 10px;
    color: var(--myBlack);
  }

  header.sticky ul {
    top: 75px;
  }

  header.sticky .menu-toggle::before,
  header.sticky .menu-toggle::after {
    background: var(--myBlack);
  }

  header.sticky .menu-toggle::before {
    box-shadow: 0 12px var(--myBlack);
  }

  .menu-toggle {
    position: relative;
    width: 40px;
    height: 50px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .menu-toggle::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--myWhite);
    transform: translateY(-12px);
    box-shadow: 0 12px var(--myWhite);
    transition: 0.3s;
  }

  .menu-toggle::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--myWhite);
    transform: translateY(12px);
    transition: 0.3s;
  }

  header.show .menu-toggle::before {
    transform: rotate(45deg);
    box-shadow: none;
  }

  header.show .menu-toggle::after {
    transform: rotate(315deg);
  }

  header.show ul {
    transform: translateX(0);
    right: 0;
  }
}

@media (max-width: 768px) {
  header,
  section {
    padding: 30px 15px;
  }

  header.sticky {
    padding: 10px 15px;
  }

  section.hero {
    grid-template-columns: 1fr;
    padding: 160px 15px 0;
  }

  #about {
    grid-template-columns: 1fr;
  }

  .kanan {
    margin-top: 60px;
  }

  #contact form {
    width: 80%;
  }
}

@media (max-width: 460px) {
  .hero img {
    width: 80%;
  }

  .card {
    margin: 4.8rem 3rem;
  }
}
