/* ============================= */
/* VARIABEL & RESET GLOBAL       */
/* ============================= */

/* FIX: variabel ini dipakai di Education tapi dulu tidak pernah didefinisikan */
:root {
  --bg-color: #030303;
  --card-border: #2a2a2a;
  --btn-primary: #3cc063;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: black;
  color: #f3f3f3;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* FIX: Chrome & Edge punya font default berbeda untuk form/button */
button,
input,
textarea {
  font: inherit;
}

header {
  margin: 0;
  padding: 0;
}

/* ============================= */
/* NAVBAR                        */
/* ============================= */

.navbar {
  display: flex;
  align-items: center;
  position: fixed;
  top: 10px;
  left: 15px;
  right: 15px;          /* FIX: sebelumnya width: 98% (bergeser kalau scrollbar beda) */
  padding: 10px 45px;
  z-index: 9999;

  background: rgba(0, 0, 0, 0.35);   /* fallback kalau blur tidak jalan */
  -webkit-backdrop-filter: blur(15px); /* FIX: prefix untuk Edge/Safari lama */
  backdrop-filter: blur(15px);
  border: 1px solid rgba(71, 255, 104, 0.2);
  border-radius: 35px;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  margin-right: clamp(2rem, 6vw, 7rem);
}

.navbar ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: clamp(1.5rem, 4vw, 75px);
  margin: 0 clamp(2rem, 5vw, 6rem) 0 0;
  padding: 0;
}

.navbar li a {
  color: #f3f3f3;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  transition: 0.3s;
  margin-right: 1.5rem;
}

.navbar li a:hover {
  color: #3cc063;
}

.btn {
  background: #fff;
  color: #040303;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  margin-left: 25px;
  white-space: nowrap;
  transition: 0.3s;
}

.btn:hover {
  background: #040303;
  color: #ffffff;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 23px;
  cursor: pointer;
}

/* ============================= */
/* HERO                          */
/* ============================= */

.hero-container1 {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 110px 8% 50px;
}

.hero-content1 {
  flex: 1 1 55%;
}

.hero-content1 h3 {
  margin-bottom: 3rem;
}

/* FIX: dulu absolute (top:70%, right:1%) -> sekarang item flex biasa */
.hero-image {
  flex: 0 1 45%;
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 700px;
  height: auto;
  object-fit: contain;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* FIX: dulu absolute left:550px bottom:142px */
.btn-socialmedia {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0;
  font-size: 30px;
}

.ctc-btn,
.ptf-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.3s;
}

.ctc-btn {
  background-color: #040303;
  color: #ffffff;
}

.ctc-btn:hover {
  background-color: #ffffff;
  color: #040303;
  transform: translateY(-3px);
}

.ptf-btn {
  background-color: #ffffff;
  color: #040303;
}

.ptf-btn:hover {
  background-color: #040303;
  color: #ffffff;
  transform: translateY(-3px);
}

.wa-btn {
  background: #3cc063;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #07862d;
  border-radius: 4px;
  border: 1.5px solid #07862d;
  transition: 0.3s;
}

.wa-btn:hover {
  background: #37ad5a;
  color: #09a437;
  transform: translateY(-3px);
}

.btn-github {
  background: #9d9c9c;
  color: #040303;
  transition: 0.3s;
}

.btn-github:hover {
  background: #f3f0f0;
}

.btn-instagram {
  background: #9d9c9c;
  color: #6e6e6e;
  transition: 0.3s;
}

.btn-instagram:hover {
  color: #cd5eaf;
}

/* ============================= */
/* ABOUT                         */
/* ============================= */

.about-container {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 520px);
  justify-content: center;
  align-content: center;
  align-items: start;
  gap: 2rem 3rem;
  padding: 110px 8% 60px;
  background: #030303;
}

.about-container h2 {
  grid-column: 1 / -1;
  font-size: 3rem;
  text-align: center;
}

.about-container p {
  font-size: 1.2rem;
  margin-bottom: 15px;
  text-align: justify;
}

.card-about {
  width: 100%;
  min-height: 340px;
  padding: 1.5rem;
  font-size: small;
  border: 1px solid #1f1f1f;
  border-radius: 25px;
  background: linear-gradient(#1f1f1f, #34333330, #151515);
  transition: 0.5s ease;
}

.card-about:hover {
  border: 1px solid #07862d;
  transform: translateY(-10px);
}

.card-identify {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 250px));
  grid-template-areas:
    "status nama"
    "sekolah ttl";
  gap: 20px;
}

/* Kartu identitas: isi di-center pakai flex (tanpa absolute / inline style) */
.nama,
.ttl,
.status,
.sekolah {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 140px;
  padding: 8px;
  text-align: center;
  border: 1px solid;
  border-radius: 25px;
  transition: 0.3s ease;
}

.nama { grid-area: nama; }
.ttl { grid-area: ttl; }
.status { grid-area: status; }
.sekolah { grid-area: sekolah; }

.nama:hover,
.ttl:hover,
.status:hover,
.sekolah:hover {
  border: 1px solid #37ad5a;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(22, 249, 67, 0.3),
              0 10px 10px -36px rgba(37, 249, 22, 0.3);
}

.card-identify .frame {
  position: relative;
  top: auto;
  left: auto;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}

.card-identify .frame i { font-size: 38px; }

.card-identify h3 {
  font-size: 1rem;
  line-height: 1.3;
}

/* Judul + ikon teknologi */
.img-setting {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
}

.img-setting-title {
  position: relative;
  flex-basis: 100%;
  padding-left: 20px;
  font-size: 1.5rem;
}

.line-skills {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 40px;
  background: #3cc069;
  border: 2px solid #3cc063;
  border-radius: 5px;
}

.img-setting img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border: 1px solid;
  border-radius: 15px;
}

/* ============================= */
/* EDUCATION                     */
/* ============================= */

.education {
  min-height: 100vh;
  background: #030303;
  padding: 100px 8%;
  color: #fff;
}

.education h2 {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 60px;
}

.education-timeline,
.education-grid {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.education-timeline::before {
  content: "";
  position: absolute;
  width: 3px;
  height: 100%;
  background: #3cc063;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.education-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--btn-primary);
}

/* FIX: dulu .education-card didefinisikan dua kali dengan nilai bertabrakan
   (width 48% vs 45%, height 145px vs padding). Digabung jadi satu. */
.education-card {
  position: relative;
  z-index: 2;
  width: 45%;
  min-height: 145px;
  padding: 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: rgba(19, 21, 26, 0.3);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  border: 2px solid var(--card-border);
  border-radius: 16px;
  transition: 0.3s all ease;
}

.education-card.right { align-self: flex-end; }
.education-card.left { align-self: flex-start; }

.education-card:nth-child(odd) { margin-left: auto; }
.education-card:nth-child(even) { margin-right: auto; }

.education-card h3 {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.education-card p {
  font-size: 1.2rem;
  margin: 0;
}

.education-card:hover {
  border: 2px solid var(--btn-primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(22, 249, 67, 0.3),
              0 10px 10px -36px rgba(37, 249, 22, 0.3);
}

/* Titik di garis timeline (absolute di sini memang tepat dipakai) */
.education-card::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--bg-color);
  border: 2px solid var(--btn-primary);
}

.education-card:hover::before {
  background-color: var(--btn-primary);
  box-shadow: 0 0 12px var(--btn-primary);
}

.education-card:nth-child(odd)::before { left: calc(-11.11% - 3px); }
.education-card:nth-child(even)::before { right: calc(-11.11% - 3px); }

/* ============================= */
/* SKILLS                        */
/* ============================= */

.skills-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 110px 8% 60px;
  background: #040303;
}

.heading-skills {
  font-size: 3rem;
  text-align: center;
}

.all-position-skills {
  width: 100%;
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  justify-content: center;
  gap: 25px;
}

.html,
.css,
.js,
.react,
.uiux {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 90px;
  font-size: 20px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: linear-gradient(#1f1f1f, #34333330, #151515);
  transition: 0.3s ease;
}

.html:hover,
.css:hover,
.js:hover,
.react:hover,
.uiux:hover {
  border: 1px solid #37ad5a;
  transform: translateY(-3px);
}

.html h5,
.css h5,
.js h5,
.react h5,
.uiux h5 {
  position: absolute;
  left: 80px;
  top: 20px;
}

.html p,
.css p,
.js p,
.react p,
.uiux p {
  position: absolute;
  right: 20px;
  top: 40px;
  font-size: 12px;
  color: #858585;
}

.frame {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 50px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #1f1f1f;
}

.frame i { font-size: 20px; }
.react .frame i,
.uiux .frame i { font-size: 28px; }

.skill-bar {
  position: absolute;
  bottom: 15px;
  left: 15px;
  width: calc(100% - 30px);
  height: 7px;
  background: #242424;
  border-radius: 10px;
  overflow: hidden;
}

.skill-bar span {
  display: block;
  height: 100%;
  background: #37ad5a;
  border-radius: 10px;
  animation: fillBar 1.5s ease forwards;
}

.skill-bar span:hover { background: #50c573; }

@keyframes fillBar {
  from { width: 0; }
}

.glow-effect-skills {
  position: absolute;
  top: 50px;
  right: 210px;
  transform: translateY(-45%);
  width: 60px;
  height: 200px;
  border-radius: 40% 60% 50% 50%;
  background: radial-gradient(circle, rgba(177, 176, 175, 0.98) 0%, rgba(0, 0, 0, 0), transparent 90%);
  filter: blur(67px);
  pointer-events: none;
  z-index: 1;
}

/* ============================= */
/* PORTOFOLIO                    */
/* ============================= */

#Portofolio {
  padding: 100px 8%;
  background: #111;
}

/* FIX: judul dulu absolute (right: 935px; top: -50px) */
.portofolio-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.portofolio-container h2 {
  font-size: 45px;
  color: white;
  text-align: center;
}

.card {
  border: 1px solid #07862d;
  border-radius: 15px;
}

.card-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.cards {
  width: 300px;
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 15px;
  overflow: hidden;
  transition: 0.3s ease;
}

.cards:hover {
  transform: translateY(-10px);
  border-color: #50c573;
  box-shadow: 0 10px 25px #50c57325;
}

.cards a {
  text-decoration: none;
  color: white;
}

.frame-project {
  width: 100%;
  height: 190px;
  overflow: hidden;
}

.frame-project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s ease;
}

/* FIX: dulu .card:hover img (class salah, harusnya .cards) */
.cards:hover img {
  transform: scale(1.08);
}

.projek-description {
  padding: 20px;
}

.projek-description h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #50c573;
}

.projek-description p {
  font-size: 14px;
  color: #aaa;
  line-height: 1.6;
}

/* ============================= */
/* CONTACT                       */
/* ============================= */

#Contact {
  padding: 100px 8%;
  background: #080808;
}

.contact-container {
  max-width: 1400px;
  margin: auto;
}

.contact-heading h2 {
  font-size: 36px;
  color: white;
  margin-bottom: 10px;
}

.contact-heading p {
  font-size: 18px;
  color: #aaa;
  margin-bottom: 35px;
}

.contact-content {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 35px;
  align-items: start;
}

.contact-info {
  background: #101012;
  border: 1px solid #292929;
  border-radius: 24px;
  padding: 35px;
}

.info-group {
  margin-bottom: 32px;
}

.info-group span {
  display: block;
  color: #777;
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.info-group h3 {
  color: white;
  font-size: 18px;
  font-weight: 500;
}

.social-links {
  border-top: 1px solid #292929;
  padding-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.social-links a {
  color: #ddd;
  text-decoration: none;
  font-size: 16px;
  transition: 0.3s;
}

.social-links i {
  color: #50c573;
  font-size: 20px;
  width: 30px;
}

.social-links a:hover {
  color: #50c573;
  transform: translateX(5px);
}

.contact-form {
  background: #101012;
  border: 1px solid #292929;
  border-radius: 24px;
  padding: 40px 35px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form label {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-top: 5px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: #19191c;
  border: 1px solid #303034;
  border-radius: 17px;
  padding: 18px 24px;
  color: white;
  font-size: 16px;
  outline: none;
  transition: 0.3s;
}

.contact-form input { height: 62px; }

.contact-form textarea {
  height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #50c573;
  box-shadow: 0 0 10px #50c57320;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #666;
}

.contact-form button {
  margin-top: 15px;
  height: 60px;
  border: none;
  border-radius: 17px;
  background: #0dbb89;
  color: #050505;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.contact-form button i { margin-right: 10px; }

.contact-form button:hover {
  background: #50c573;
  transform: translateY(-3px);
  box-shadow: 0 5px 20px #50c57330;
}

/* ============================= */
/* FOOTER                        */
/* ============================= */

footer {
  background-color: #040303;
  color: #ffffff;
  padding: 1rem;
  text-align: center;
}

/* ============================= */
/* TABLET                        */
/* ============================= */

@media screen and (max-width: 1024px) {
  .about-container {
    grid-template-columns: minmax(0, 520px);
  }
}

/* ============================= */
/* MOBILE                        */
/* ============================= */

@media screen and (max-width: 768px) {

  /* NAVBAR */
  .navbar {
    left: 5%;
    right: 5%;
    padding: 12px 18px;
    border-radius: 22px;
    flex-wrap: wrap;                 /* FIX: tombol hamburger tidak lagi absolute */
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.9);
  }

  .navbar .logo {
    font-size: 1.5rem;
    margin: 0;
  }

  .navbar .menu-toggle {
    display: block;
  }

  .navbar ul {
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    margin: 0;
    padding: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.4s ease;
  }

  .navbar.active ul {
    max-height: 400px;
    opacity: 1;
    padding: 25px 0 15px;
  }

  .navbar .btn {
    display: block;
    flex-basis: 100%;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    text-align: center;
    transition: opacity 0.4s ease, max-height 0.5s ease, padding 0.4s ease;
  }

  .navbar.active .btn {
    max-height: 50px;
    opacity: 1;
    padding: 12px 20px;
    margin-bottom: 5px;
  }

  /* HERO: hack margin 33rem / 40rem dan absolute dihapus */
  .hero-container1 {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 120px 6% 60px;
    gap: 30px;
  }

  .hero-content1 {
    width: 100%;
    flex: none;
  }

  .hero-content1 h1 { font-size: 2.2rem; }
  .hero-content1 h2 { font-size: 1.5rem; }
  .hero-content1 h3 { font-size: 1rem; margin-bottom: 1.5rem; }

  .hero-image {
    flex: none;
    width: 100%;
  }

  .hero-image img { max-width: 400px; }

  .hero-buttons,
  .btn-socialmedia {
    justify-content: center;
  }

  .btn-socialmedia {
    font-size: 25px;
    margin-top: 0;
  }

  /* ABOUT */
  .about-container {
    grid-template-columns: minmax(0, 1fr);
    padding: 100px 6% 60px;
    gap: 25px;
  }
  .about-container h2 { font-size: 2.3rem; }
  .card-about { max-width: 440px; min-height: 300px; justify-self: center; }
  .card-identify { grid-template-columns: 1fr; grid-template-areas: none; gap: 12px; }
  .nama, .ttl, .status, .sekolah { grid-area: auto; min-height: 155px; }
  .img-setting { display: none; }

  /* EDUCATION */
  .education { padding: 100px 6%; }
  .education h2 { font-size: 2.3rem; }

  .education-timeline,
  .education-grid { gap: 25px; }

  .education-timeline::before,
  .education-grid::before { left: 10px; }

  .education-card,
  .education-card.left,
  .education-card.right,
  .education-card:nth-child(odd),
  .education-card:nth-child(even) {
    width: calc(100% - 35px);
    margin-left: 35px;
    margin-right: 0;
    align-self: flex-start;
    min-height: 130px;
    padding: 20px;
  }

  .education-card::before {
    left: -34px !important;
    right: auto !important;
  }

  /* SKILLS */
  .skills-container { padding: 110px 6% 60px; gap: 35px; }
  .heading-skills { font-size: 2.3rem; }
  .all-position-skills { grid-template-columns: 1fr; justify-items: center; }
  .html, .css, .js, .react, .uiux { max-width: 420px; height: 110px; }
  .glow-effect-skills { display: none; }

  /* PORTOFOLIO */
  #Portofolio { padding: 100px 6%; }
  .portofolio-container h2 { font-size: 28px; }
  .card-container { gap: 20px; }

  .cards {
    width: 100%;
    max-width: 400px;
  }

  /* CONTACT */
  #Contact { padding: 80px 6%; }

  .contact-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .contact-info,
  .contact-form { padding: 25px 20px; }

  .contact-heading h2 { font-size: 28px; }
  .contact-heading p { font-size: 15px; }
}

/* ============================= */
/* SMALL MOBILE                  */
/* ============================= */

@media screen and (max-width: 480px) {
  .hero-content1 h1 { font-size: 1.8rem; }
  .hero-content1 h2 { font-size: 1.3rem; }
  .hero-content1 h3 { font-size: 0.9rem; }

  .hero-buttons a {
    font-size: 13px;
    padding: 10px 13px;
  }

  .about-container h2 { font-size: 2rem; }
  .about-container p { font-size: 1rem; }

  .education h2 { font-size: 2rem; }
  .education-card h3 { font-size: 1.2rem; }
  .education-card p { font-size: 0.95rem; }

  .heading-skills { font-size: 2rem; }

  .contact-form input { height: 55px; }
  .contact-form textarea { height: 120px; }
}
