:root {
  --bg: #f8fafc;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --text: #1e293b;
  --text-light: #64748b;
  --card: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.8);
}

body.dark {
  --bg: #0f172a;
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --card: #1e293b;
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --nav-bg: rgba(15, 23, 42, 0.8);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition:
  background 0.4s,
  color 0.4s;
  overflow-x: hidden;
}

/* Dark Mode Toggle Position */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--card);
  border: 1px solid var(--primary);
  color: var(--primary);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

header {
  text-align: center;
  padding: 5rem 1.5rem 2rem;
  position: relative;
}

header img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--primary);
  padding: 5px;
  background: var(--card);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

h1 {
  font-family: "Playfair Display", serif;
  font-size: 2.8rem;
  margin: 1.5rem 0 0.5rem;
  letter-spacing: -0.5px;
}

#typing {
  color: var(--primary);
  font-weight: 600;
  min-height: 1.6em;
  display: inline-block;
}

/* Download CV Button */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.5rem;
  padding: 0.8rem 1.8rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: 0.3s;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.download-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

nav {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.95rem;
  transition: 0.3s;
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--primary);
}

section {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

h2 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
}

.card {
  background: var(--card);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: 0.4s;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

body.dark .card {
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.school-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.school-item {
  background: rgba(79, 70, 229, 0.05);
  padding: 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.3s;
}
body.dark .school-item {
  background: rgba(255, 255, 255, 0.05);
}

.school-item:hover {
  background: rgba(79, 70, 229, 0.1);
}

.school-detail {
  max-height: 0;
  overflow: hidden;
  transition: 0.4s ease-in-out;
  font-size: 0.95rem;
  border-left: 2px solid transparent;
}
.school-detail.active {
  max-height: 300px;
  padding: 1rem;
  border-left: 2px solid var(--primary);
  margin-bottom: 0.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.project-card,
.cert-card {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: 15px;
  transition: 0.3s;
  cursor: pointer;
  border: 1px solid transparent;
}

.project-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
}

.cert-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 10px;
  background: white;
}

.hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.8s ease-out;
}

.show {
  opacity: 1;
  transform: translateY(0);
}

/* Modal Styling */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  padding: 1.5rem;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--card);
  padding: 2.5rem;
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  position: relative;
}

.close-modal {
  margin-top: 1.5rem;
  padding: 0.6rem 2rem;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
}

footer {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }
  header img {
    width: 120px;
    height: 120px;
  }
  nav {
    gap: 1rem;
  }
  .card {
    padding: 1.5rem;
  }
}

/* Style skill */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background: var(--bg-card);
  /* Sesuaikan dengan variabel warna webmu */
  border-radius: 12px;
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

.skill-item:hover {
  transform: translateY(-5px);
}

.skill-item img {
  width: 50px;
  /* Atur ukuran logo */
  height: 50px;
  object-fit: contain;
  margin-bottom: 10px;
}

.skill-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

/* ===== Tentang Azis Section ===== */
#tentang-azis {
  position: relative;
}

/* Highlight keyword */
#tentang-azis strong {
  font-weight: 700;
}

/* Paragraf spacing */
#tentang-azis p {
  margin-bottom: 1rem;
  font-size: 0.98rem;
}

/* Hover effect */
#tentang-azis .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Link styling */
.azis-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: 0.3s;
}

.azis-link:hover {
  border-bottom: 1px solid var(--primary);
}

.fontBold {
  font-weight: bold;
}
/* CSS untuk menyembunyikan teks agar hanya dibaca oleh Bot SEO */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* ===== Social Media Links ===== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.social-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.instagram-btn:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.github-btn:hover {
    background: #333;
}

.linkedin-btn:hover {
    background: #0a66c2;
}

/* ===== Certificate Gallery ===== */
.cert-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cert-filter label {
    font-weight: 600;
    color: var(--text);
}

.cert-dropdown {
    padding: 0.6rem 1rem;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.95rem;
}

.cert-dropdown:hover {
    background: rgba(79, 70, 229, 0.05);
}

.cert-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Gallery Container */
.cert-gallery-wrapper {
    overflow: hidden;
    position: relative;
    border-radius: 15px;
    margin-top: 2rem;
}

.cert-gallery {
    display: flex;
    gap: 1.5rem;
    animation: slideLeft 25s linear infinite;
    padding: 0.5rem;
    width: fit-content;
}

.cert-gallery:hover {
    animation-play-state: paused;
}

.cert-gallery-item {
    min-width: 240px;
    flex-shrink: 0;
    cursor: pointer;
    transition: 0.3s;
    opacity: 1;
}

.cert-gallery-item.hidden-item {
    display: none;
}

.cert-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
    aspect-ratio: auto;
    height: 180px;
}

.cert-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: 0.3s;
    background: white;
    padding: 8px;
}

.cert-gallery-item:hover .cert-gallery-img {
    transform: scale(1.08);
}

.cert-label {
    text-align: center;
    margin-top: 0.6rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

/* Animasi carousel (kanan ke kiri) - DIPERCEPAT */
@keyframes slideLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Modal untuk detail sertifikat */
.cert-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.cert-modal.active {
    display: flex;
    flex-direction: column;
}

.cert-modal img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    background: white;
    padding: 16px;
}

.cert-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 3001;
}

.cert-modal-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

#cert-modal-label {
    color: white;
    text-align: center;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cert-gallery-item {
        min-width: 200px;
    }

    .cert-image-wrapper {
        height: 150px;
    }

    .social-links {
        gap: 1rem;
    }

    .social-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 600px) {
    .cert-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .cert-dropdown {
        width: 100%;
    }

    .cert-gallery-item {
        min-width: 180px;
    }

    .cert-image-wrapper {
        height: 140px;
    }

    .cert-modal img {
        max-width: 95vw;
        max-height: 80vh;
        padding: 12px;
    }
}

/* Modal untuk detail sertifikat */
.cert-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.cert-modal.active {
    display: flex;
}

.cert-modal img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
}

.cert-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.cert-modal-close:hover {
    background: var(--primary);
    color: white;
}

#cert-modal-label {
    color: white;
    text-align: center;
    margin-top: 1rem;
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cert-gallery-item {
        min-width: 240px;
    }

    .social-links {
        gap: 1rem;
    }

    .social-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 600px) {
    .cert-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .cert-dropdown {
        width: 100%;
    }

    .cert-gallery-item {
        min-width: 200px;
    }

    .cert-modal img {
        max-width: 95vw;
        max-height: 80vh;
    }
}