:root {
  --bg: #0f172a; /* slate-900 */
  --surface: #111827; /* gray-900 */
  --muted: #9ca3af; /* gray-400 */
  --text: #e5e7eb; /* gray-200 */
  --accent: #22d3ee; /* cyan-400 */
  --accent-2: #60a5fa; /* blue-400 */
  --border: #1f2937; /* gray-800 */
  --card: #0b1220;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  width: min(1100px, 90%);
  margin-inline: auto;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9rem;
}
.accent {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.3px;
}
.logo span {
  color: var(--accent);
}
.nav {
  display: flex;
  gap: 1rem;
}
.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  transition: background 0.2s;
}
.nav-link.active,
.nav-link:hover {
  background: rgba(96, 165, 250, 0.12);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  gap: 5px;
  flex-direction: column;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  display: block;
}

@media (max-width: 760px) {
  .nav {
    position: absolute;
    right: 0;
    top: 56px;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 14px;
    display: none;
  }
  .nav.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
}
.site-footer .container {
  padding: 18px 0;
  text-align: center;
  color: var(--muted);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  min-height: 65vh;
}
.hero .lead {
  color: var(--muted);
  max-width: 60ch;
}
.hero-cta {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hero-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 4px solid rgba(96, 165, 250, 0.3);
  box-shadow: 0 10px 30px var(--shadow);
  object-fit: cover;
  margin: 0 auto;
}
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
    display: flex;
    justify-content: center;
  }
}

.btn {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1220;
  font-weight: 600;
  border: 0;
  box-shadow: 0 10px 25px rgba(34, 211, 238, 0.15);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

/* About */
.about {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 60vh;
  padding: 40px 0;
}
.about-photo-wrap {
  display: flex;
  justify-content: center;
}
.about-photo {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(96, 165, 250, 0.3);
  box-shadow: 0 10px 30px var(--shadow);
}
.about-list {
  line-height: 1.9;
  color: var(--muted);
  padding: 0;
}
.about-list li {
  margin-bottom: 0.4rem;
}
@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
  }
  .about-photo {
    margin: 0 auto;
  }
}

/* Cards/Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 16px var(--shadow);
}
.card img {
  aspect-ratio: 16/9;
  object-fit: cover;
}
.card-body {
  padding: 0.9rem 1rem;
}
.card h3 {
  margin: 0 0 0.3rem;
}
.project-card,
.cert-card {
  cursor: pointer;
  outline: none;
}
.project-card:focus,
.cert-card:focus {
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.4);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin: 14px 0 18px;
}
.tab {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}
.tab.active {
  background: rgba(96, 165, 250, 0.12);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
}
.modal.open {
  display: block;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.modal-dialog {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 6vh auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
}
#modal-content {
  padding: 1rem 1.2rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}
.form-card {
  padding: 1rem;
}
.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.8rem;
}
.form-row input,
.form-row textarea {
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0a1221;
  color: var(--text);
}
.form-row label {
  margin-bottom: 0.4rem;
}
.contact-info {
  padding: 1rem;
}
.contact-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.9;
}
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Utilities */
main h1 {
  margin: 20px 0;
}

/* pembatas */

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

body {
  font-family: "Poppins", sans-serif;
  background: #111827;
  color: #fff;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Header */
.site-header {
  background: #0f172a;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
}
.logo span {
  color: #38bdf8;
}

.nav {
  display: flex;
  gap: 1rem;
}
.nav-link {
  color: #e5e7eb;
  text-decoration: none;
}
.nav-link:hover {
  color: #38bdf8;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
}
.tab {
  background: #1e293b;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: #fff;
  border-radius: 5px;
}
.tab.active {
  background: #38bdf8;
}

/* Cards */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #1e293b;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
}
.card:hover {
  transform: translateY(-5px);
}
.card img {
  width: 100%;
  display: block;
}
.card-body {
  padding: 1rem;
}
.muted {
  color: #9ca3af;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal.active {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}
.modal-dialog {
  position: relative;
  background: #fff;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 10px;
  padding: 20px;
  z-index: 10000;
  color: #000;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}
.modal img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  margin: 20px auto 0; /* Tambah jarak atas 20px */
  border-radius: 8px; /* opsional biar sudut lembut */
}

/* Button */
.btn {
  display: inline-block;
  background: #38bdf8;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s;
}
.btn:hover {
  background: #0ea5e9;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 0;
  background: #0f172a;
  margin-top: 2rem;
  color: #9ca3af;
}

/* Grid untuk Certificates */
.grid.cards.certificates {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Maksimal 3 kolom */
  gap: 20px; /* Jarak antar kartu */
}

/* Responsif: di layar kecil otomatis 2 atau 1 kolom */
@media (max-width: 992px) {
  .grid.cards.certificates {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid.cards.certificates {
    grid-template-columns: 1fr;
  }
}
