@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap");

:root {
  --primaryTextColor: #232e35;
  --secondaryTextColor: #656d72;
  --borderColor: #f1f1f1;
  --lineColor: #d9d9d9;
  --primaryBackgroundColor: #fff;
  --secondaryBackgroundColor: #fbfbfb;
  --thirdBackgroundColor: #f5f3fe;
  --abu-abu: #dcdcdc;
  --primaryIconColor: #2d1ecb;
  --primaryIconColorHover: #5d51e8;
  --sectionPadding: 2rem 0;
  --itemBorderRadius: 0.7rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html {
  /* Berikan offset sebesar tinggi navigasi lu (90px) */
  scroll-padding-top: 90px;
  scroll-behavior: smooth;
}

@media screen and (max-width: 640px) {
  html {
    /* Sesuaikan offset untuk layar kecil jika navigasi lu berubah tinggi */
    scroll-padding-top: 10px;
  }
}

body {
  font-family: "Roboto", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong {
  color: var(--primaryTextColor);
}

p {
  font-size: 1rem;
  line-height: 1.9rem;
}

p,
span,
label,
input,
textarea,
li {
  color: var(--secondaryTextColor);
}

a {
  text-decoration: none;
}

/* ─── Typing animation ─── */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 58%;
  }
}

@keyframes reverseTyping {
  from {
    width: 58%;
  }
  to {
    width: 0;
  }
}

.hero-name {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid black;
  font-family: monospace;
  width: 75%;
}

.typing {
  animation: typing 2.5s steps(30, end) forwards;
}
.reverse-typing {
  animation: reverseTyping 1.5s steps(30, end) forwards;
}

/* ─── Buttons ─── */
.btn {
  padding: 1rem 1.5rem;
  background: white;
  border: 1.5px solid var(--borderColor);
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.btn:hover {
  box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
}

/* ─── Titles ─── */
.section-title {
  margin: 1rem 0 4rem;
  font-size: 2rem;
}

.pre-title {
  text-transform: uppercase;
  letter-spacing: 0.5rem;
  color: var(--secondaryTextColor);
  position: relative;
  padding-left: 40px;
  width: fit-content;
  font-weight: 400;
  font-size: 0.9rem;
}

.pre-title::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--lineColor);
  position: absolute;
  display: block;
  left: 0;
  top: 50%;
}

/* ─── Grid ─── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

/* ─── Navigation ─── */
/* ─── Perbaikan Container ─── */
.main-container {
  max-width: 1200px; /* Batas maksimal lebar */
  width: 90%; /* Otomatis jadi 90% di layar kecil */
  margin: 0 auto; /* Center otomatis */
  position: relative;
}

/* ─── Perbaikan Navigation (Kuncinya di sini) ─── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  color: var(--primaryTextColor);

  background-color: var(--primaryBackgroundColor);
  z-index: 1000;
  height: 90px;
  border-bottom: 2px solid var(--abu-abu);
}

/* Tambahkan wrapper di dalam nav agar sejajar dengan main-container */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 1200px; /* Sama dengan main-container */
  max-width: 90%; /* Sama dengan main-container responsive */
  margin: 0 auto;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 22px;
  margin-left: 0;
  /* Ubah variabel ini dari --primaryIconColor ke --primaryTextColor */
  color: var(--primaryTextColor);
}

.logo a {
  /* Pastikan link di dalamnya juga mengikuti warna induknya */
  color: inherit;
  font-weight: 700;
}

/* Efek Hover: Logo tetap berubah warna saat disentuh kursor agar interaktif */
.logo a:hover {
  color: var(--primaryIconColor) !important;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 3rem;
  margin-right: 0; /* Ubah ke 0 */
  font-weight: 500;
  color: var(--secondaryTextColor);
}

/* Warna Teks Menu Navigasi */
nav ul li a {
  color: var(
    --secondaryTextColor
  ) !important; /* Ubah dari secondary ke primary */
}

/* Efek Hover (Tetap biru ikon jika ingin pembeda, atau ubah sesuai selera) */
nav ul li a:hover,
.logo a:hover {
  color: var(--primaryIconColor) !important;
}

/* ─── Hero Section Adjustment ─── */
#hero {
  margin-top: 90px; /* Biar gak ketutup nav fixed */
  padding: 4rem 0;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 2rem;
}

/* Burger */
.burger div {
  width: 25px;
  height: 2px;
  background-color: var(--primaryTextColor);
  margin: 7px;
  transition: all 0.3s;
  z-index: 99;
}

.burger {
  display: none;
  z-index: 99;
  position: fixed;
  top: 33px;
  right: 35px;
}

/* ─── Hero ─── */
#hero {
  margin-top: 50px;
  height: 700px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.hero-name {
  font-size: 3rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
}

.hero-name span {
  color: var(--primaryIconColor) !important;
}

.hero-right img {
  height: 300px;
  width: 300px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 30px;
  cursor: pointer;
}

.hero-right {
  display: flex;
  justify-content: center;
}

/* ─── Services ─── */
#services {
  background-color: var(--secondaryBackgroundColor);
  padding: var(--sectionPadding);
  border: 1px solid var(--abu-abu);
}

.services .pre-title {
  margin: 0 auto;
}

.services-title {
  text-align: center;
}

.service {
  border: 1px solid var(--abu-abu);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--primaryBackgroundColor);
  border-radius: var(--itemBorderRadius);
}

.service h4 {
  margin: 1.5rem 0;
  font-weight: 500;
  font-size: 1.05rem;
}

.service-icon {
  background: var(--thirdBackgroundColor);
  width: fit-content;
  margin: 0 auto;
  padding: 1rem 1.3rem;
  border-radius: 0.5rem;
}

.service-icon svg {
  fill: var(--primaryIconColor);
  color: var(--primaryIconColor);
}

/* Container Tombol */
.projecto-actions {
  margin-top: auto;
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Base Button Style */
.proj-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

/* Primary: Live Demo */
.btn-demo {
  background-color: var(--primaryIconColor);
  color: white !important;
  border: 1px solid var(--primaryIconColor);
}

.btn-demo:hover {
  background-color: var(--primaryIconColorHover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 30, 203, 0.2);
}

/* Secondary: GitHub / Hugging Face */
.btn-repo {
  background-color: transparent;
  color: var(--primaryTextColor) !important;
  border: 1px solid var(--lineColor);
}

.btn-repo:hover {
  background-color: var(--secondaryBackgroundColor);
  border-color: var(--primaryTextColor);
  transform: translateY(-2px);
}

/* Icon scaling */
.proj-btn svg {
  fill: currentColor;
}

/* ─── Project (projectos) ─── */
#project {
  padding: var(--sectionPadding);
}

.projecto {
  border-radius: var(--itemBorderRadius);
  overflow: hidden;
  border: 2px solid var(--borderColor);
}

.projecto-cover {
  height: 250px;
}

.projecto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projecto-info,
.project-info {
  padding: 2rem 1.5rem;
}

.projecto-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.projecto h4 {
  font-weight: 500;
  font-size: 1.05rem;
}

.projecto-title a svg:hover {
  fill: var(--primaryIconColor);
}

.projecto-title a svg {
  transition: 0.2s ease-in-out;
}

.projecto-tags {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.projecto-tags div {
  font-size: 0.9rem;
  border: 1px solid var(--borderColor);
  padding: 0.4rem 1rem;
  color: var(--secondaryTextColor);
}

/* @media (max-width: 768px) {
  .project-info p,
  .project-tags {
    display: none;
  }
} */

/* ─── Learning & Education ─── */
#learnings {
  border: 1px solid var(--abu-abu);
  padding: var(--sectionPadding);
  background: var(--primaryBackgroundColor);
}

.learnings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
}

.education {
  display: flex;
  gap: 1rem;
}

.learnings-left h2 {
  margin-bottom: 1rem;
}

.education .line {
  padding: 0 0.7rem;
}

.education .line div {
  width: 2px;
  height: 100%;
  background: var(--lineColor);
  position: relative;
}

.education-info p {
  margin: 0.6rem 0 1rem;
}

.education-years {
  margin-bottom: 3rem;
}

.education .line div:before {
  content: "";
  width: 15px;
  height: 15px;
  background: var(--lineColor);
  border-radius: 50%;
  position: absolute;
  left: -6px;
}

.learnings-list {
  margin-top: 1.5rem;
}

.learnings-right {
  padding: 10px;
}

.skill-category {
  margin-bottom: 2rem;
}

.skill-category h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primaryTextColor);
}

.learnings-right ul {
  line-height: 2rem;
  color: var(--secondaryTextColor);
  padding: 0;
  list-style: none;
}

.learnings-right h2 {
  margin-bottom: 0.5rem;
}

.learnings-right ul li {
  display: inline-block;
  background: var(--thirdBackgroundColor);
  padding: 0.5rem 1.2rem;
  border-radius: 25px;
  margin: 0.3rem;
  border: 1px solid var(--borderColor);
  transition: 0.2s ease-in-out;
}

.learnings-right ul li:hover {
  background: var(--primaryIconColor);
  color: white;
}

/* ─── Contact ─── */
#contact {
  padding: var(--sectionPadding);
  border: 1px solid var(--abu-abu);
  border-top: 0;
  background: var(--primaryBackgroundColor);
}

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
}

.contact-form div {
  margin-bottom: 1.4rem;
}

.contact-form input,
.contact-form textarea {
  width: 95%;
  padding: 0.75rem 1.3rem;
  font-family: "Roboto", sans-serif;
  background: var(--secondaryBackgroundColor);
  border: 1px solid var(--borderColor);
  border-radius: 12px;
  resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #9d9fa1;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border: 1px solid #7d7d7d;
}

.btn-submit {
  width: 95%;
  padding: 0.75rem 1.3rem;
  background-color: var(--primaryIconColor);
  color: var(--secondaryBackgroundColor);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.btn-submit:hover {
  background-color: var(--primaryIconColorHover);
}

.contact-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.contact-item-icon {
  background: var(--thirdBackgroundColor);
  width: 53px;
  height: 53px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item-icon svg {
  fill: var(--primaryIconColor);
}

.contact-item-detail h4 {
  margin-bottom: 0.6rem;
}

/* ─── Footer ─── */
footer {
  padding: 3rem 0;
  background: var(--secondaryBackgroundColor);
  text-align: center;
}

.footer-icons {
  margin-bottom: 1rem;
}

.footer-icons a {
  margin: 0 0.5rem;
}

.footer-icons svg {
  fill: #3e3f40;
}

.footer-icons a:hover svg {
  fill: var(--primaryTextColor);
}

/* ═══════════════════════════════════════════════
   NEW ─ Tab Navigation
   ═══════════════════════════════════════════════ */
.tabs-wrapper {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding: 6px;
  background: var(--secondaryBackgroundColor);
  border-radius: 14px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--secondaryTextColor);
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--primaryTextColor);
  background: var(--thirdBackgroundColor);
}

.tab-btn.active {
  background: var(--primaryIconColor);
  color: #fff;
  box-shadow: 0 2px 12px rgba(93, 81, 232, 0.3);
}

/* Tab panels */
.tab-panel {
  display: none;
  animation: fadeUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-panel.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .tabs-wrapper {
    gap: 4px;
  }
  .tab-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}

/* ═══════════════════════════════════════════════
   NEW ─ Sertification Section
   ═══════════════════════════════════════════════ */
#sertification {
  padding: var(--sectionPadding);
  background: var(--secondaryBackgroundColor);
  border: 1px solid var(--abu-abu);
}

/* hide / reveal extra certs */
.sert-hidden {
  display: none;
}

.sert-visible {
  display: block;
  animation: fadeUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Show-all button */
.sert-btn-wrapper {
  text-align: center;
  margin-top: 3rem;
}

.btn-show-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 2rem;
  background: var(--primaryBackgroundColor);
  border: 1.5px solid var(--abu-abu);
  border-radius: 12px;
  font-family: "Roboto", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--primaryIconColor);
  cursor: pointer;
  transition: all 0.25s ease-in-out;
}

.btn-show-all:hover {
  background: var(--primaryIconColor);
  color: #fff;
  border-color: var(--primaryIconColor);
  box-shadow: 0 3px 12px rgba(45, 30, 203, 0.25);
}

.btn-show-all:hover .sert-arrow {
  fill: #fff;
}

.btn-show-all .sert-arrow {
  fill: var(--primaryIconColor);
  transition:
    transform 0.3s ease,
    fill 0.25s ease;
}

.btn-show-all.sert-btn-expanded .sert-arrow {
  transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════
   NEW ─ Placeholder covers (empty Mobile / ML tabs)
   ═══════════════════════════════════════════════ */
.sert-placeholder {
  background: var(--thirdBackgroundColor);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sert-placeholder svg {
  fill: var(--primaryIconColor);
  opacity: 0.2;
}

#certification {
  padding: var(--sectionPadding);
  background-color: var(--secondaryBackgroundColor);
}
