:root {
  --profile-stroke: #111; /* stroke hitam ringan */
}
body.dark-mode {
  --profile-stroke: #e9eef6; /* stroke putih kebiruan */
}

:root {
  --bg: #f8f9fa;
  --text: #111;
  --muted: #555;
  --accent: #0070f3;
  --card: #fff;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Poppins", system-ui, Arial;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* layout container */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.header-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 0;
}
.logo img {
  height: 48px;
  width: auto;
  display: block;
  margin-left: 2px;
}
.nav {
  justify-self: center;
}
.nav a {
  margin-left: 26px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: 0.25s;
}
.nav a:hover::after {
  width: 100%;
}

/* header-right */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
}
.hamburger {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  height: 3px;
  width: 22px;
  background: #222;
  margin: 4px 0;
  border-radius: 3px;
}

/* hero */
.hero {
  padding: 70px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  align-items: center;
}
.hero-title {
  font-size: 2.2rem;
  margin-bottom: 8px;
}
.lead {
  color: var(--muted);
  margin-bottom: 16px;
  max-width: 640px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.hero-photo img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);

  /* OUTLINE ADAPTIF */
  border: 4px solid var(--profile-stroke);
}

/* buttons */
.btn {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.btn-outline {
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

/* sections */
.about,
.projects,
.certificate,
.contact {
  padding: 56px 0;
}
h3 {
  font-size: 1.6rem;
  margin-bottom: 14px;
  font-weight: 700;
}

/* projects */
.projects-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
.projects-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.projects-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.pill {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
.pill.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 12px;
}

/* project card */
.project-card {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transition: transform 0.18s, box-shadow 0.18s;
}
.project-thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  flex: 0 0 120px;
}
.project-body {
  flex: 1;
}
.project-body h4 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}
.muted {
  color: var(--muted);
  margin-bottom: 10px;
}
.project-links {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

/* ===========================
   CERTIFICATE SECTION (NEW)
=========================== */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.cert-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.cert-thumb {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.cert-body {
  padding: 18px;
}

.cert-body h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.cert-body p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.cert-view {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.cert-view:hover {
  text-decoration: underline;
}

/* Dark mode support */
body.dark-mode .cert-card {
  background: var(--card);
}

/* preview modal */
.preview-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
}
.preview-modal.open {
  display: flex;
}
.preview-inner {
  width: 94%;
  max-width: 1100px;
  height: 86vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.preview-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}
.preview-content {
  width: 100%;
  height: 100%;
}

/* footer */
.site-footer {
  padding: 28px 0;
  background: transparent;
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
}

/* reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s ease-out;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* responsive */
@media (max-width: 1000px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-grid {
    grid-template-columns: 1fr 220px;
  }
}
@media (max-width: 720px) {
  .header-grid {
    grid-template-columns: 1fr auto;
  }
  .nav {
    display: none;
  }
  .hamburger {
    display: block;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .cert-grid {
    grid-template-columns: 1fr;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }
  .hero-photo {
    order: -1;
  }
  .hero-photo img {
    margin: 0 auto;
  }
}

/* dark mode */
body.dark-mode {
  --bg: #0f1112;
  --text: #e9eef6;
  --muted: #bfc9d6;
  --card: #0f1316;
}
body.dark-mode .site-header {
  background: rgba(10, 10, 12, 0.7);
}
body.dark-mode .card {
  background: var(--card);
}
body.dark-mode .project-card {
  background: var(--card);
}
body.dark-mode .nav a {
  color: var(--text);
}
/* toggle UI */
.theme-toggle {
  cursor: pointer;
}
.toggle-track {
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #ccc;
  position: relative;
}
.toggle-thumb {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: all 0.25s;
}
body.dark-mode .toggle-track {
  background: var(--accent);
}
body.dark-mode .toggle-thumb {
  left: 24px;
}

/* ================================
   PROJECT PAGE — MINIMAL LAW STYLE
================================ */

.project-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 0 80px;
}

.project-hero {
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.project-hero h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.project-hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 700px;
}

body.dark-mode .project-hero {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 20px;
  transition: 0.2s;
}

.back-btn:hover {
  opacity: 0.85;
}

.project-gallery {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.project-gallery img {
  width: 100%;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.12);
  transition: 0.25s ease;
}

.project-gallery img:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

/* PDF Viewer */
.pdf-frame {
  width: 100%;
  height: 75vh;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.pdf-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Dark mode support */
body.dark-mode .project-gallery img {
  background: #111;
  box-shadow: 0 4px 22px rgba(255, 255, 255, 0.08);
}

body.dark-mode .pdf-frame {
  background: #111;
}

/* ======================
   PROJECT SLIDER
====================== */
.slider-container {
  position: relative;
  max-width: 900px;
  margin: 40px auto;
  overflow: hidden;
}

.slider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.4s ease, filter 0.4s ease;
  position: absolute;
  inset: 0;
}

.slide.active {
  opacity: 1;
  filter: blur(0);
  position: relative;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 20, 0.45);
  color: white;
  border: none;
  font-size: 28px;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 8px;
  backdrop-filter: blur(6px);
  transition: 0.3s;
  user-select: none;
}

.slider-btn:hover {
  background: rgba(20, 20, 20, 0.7);
}

.slider-btn.prev {
  left: 10px;
}
.slider-btn.next {
  right: 10px;
}

/* DARK MODE SUPPORT */
body.dark-mode .slider-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
body.dark-mode .slider-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* TWO COLUMN LAYOUT */
.doc-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.doc-section {
  background: var(--card);
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.doc-title {
  margin-bottom: 18px;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
}

/* SLIDER */
.slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.slider {
  position: relative;
  height: 420px;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.slide.active {
  opacity: 1;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 22px;
  cursor: pointer;
  border-radius: 6px;
  z-index: 10;
  transition: 0.25s;
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .doc-columns {
    grid-template-columns: 1fr;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-links {
  margin-top: auto; /* BIAR NANGKRING DI BAWAH */
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
