/* ===== CSS Variables ===== */
:root {
  --bg: #0b1120;
  --bg-alt: #111a2e;
  --surface: #16223c;
  --surface-2: #1c2b49;
  --accent: #38bdf8;
  --accent-2: #22d3ee;
  --text: #e8eef9;
  --text-muted: #9aa9c2;
  --border: rgba(148, 163, 184, 0.16);
  --gold: #fbbf24;
  --silver: #cbd5e1;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-head: "Poppins", system-ui, -apple-system, sans-serif;
  --container: 1100px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-2); }
img { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

/* ===== Header / Navbar ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}
.brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }
.nav-menu { display: flex; gap: 1.6rem; }
.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after, .nav-link:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 4rem;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(56, 189, 248, 0.12), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(34, 211, 238, 0.08), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
}
.hero__eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.hero__title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0.3rem 0 0.5rem;
}
.hero__title span { color: var(--accent); }
.hero__role {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 1.1rem;
}
.hero__desc {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 1.8rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #06121f; }
.btn--primary:hover { background: var(--accent-2); color: #06121f; }
.btn--outline { border: 1px solid var(--border); color: var(--text); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.hero__socials { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.hero__socials a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
}
.hero__socials a:hover { color: var(--accent); border-color: var(--accent); }
.hero__socials svg { width: 18px; height: 18px; }
.hero__location {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--text-muted); font-size: 0.88rem; margin-left: 0.4rem;
}
.hero__location svg { width: 16px; height: 16px; color: var(--accent); }

.hero__media { display: flex; justify-content: center; }

/* ===== Media placeholder ===== */
.media {
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
}
.media__hint {
  color: var(--text-muted);
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 1rem;
  text-align: center;
  word-break: break-all;
}
.media__hint::before {
  content: "\1F5BC\A";
  white-space: pre;
  display: block;
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
  opacity: 0.6;
}
.media--portrait {
  width: min(100%, 360px);
  aspect-ratio: 4 / 5;
  border-radius: 50% 50% 14px 14px;
  box-shadow: var(--shadow);
}

/* ===== Section umum ===== */
.section { padding: 5.5rem 0; }
.section--alt { background: var(--bg-alt); }
.section__head { margin-bottom: 2.5rem; }
.section__eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.subhead {
  font-size: 1.25rem;
  margin: 2.5rem 0 1.2rem;
  color: var(--text);
  padding-left: 0.8rem;
  border-left: 3px solid var(--accent);
}

/* ===== Grid & Card ===== */
.grid-2, .grid-3 { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow);
}
.card__top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.card h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 0.4rem; }
.card__sub { color: var(--accent); font-size: 0.85rem; margin-bottom: 0.7rem; }
.card__desc { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.card__meta { color: var(--text-muted); font-size: 0.85rem; margin: 0.9rem 0 0; }
.card__meta strong { color: var(--text); }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
  white-space: nowrap;
}
.card__number {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.6rem;
  color: rgba(56, 189, 248, 0.35);
  margin-bottom: 0.4rem;
}
.card--icon { padding: 0 0 1.5rem; overflow: hidden; }
.media--training {
  aspect-ratio: 16 / 9;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.card--icon .card__number,
.card--icon h3,
.card--icon .card__sub,
.card--icon .card__desc { margin-inline: 1.4rem; }
.card--icon .card__number { margin-top: 0.2rem; }
.card--icon h3 { margin-bottom: 0.4rem; }

/* ===== Tentang ===== */
.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}
.about__text p { color: var(--text-muted); }
.about__text p:first-child { color: var(--text); font-size: 1.05rem; }
.about__skills { display: grid; gap: 0.9rem; }
.skill {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
}
.skill__icon {
  flex: 0 0 42px; height: 42px;
  display: grid; place-items: center;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 700;
}
.skill h3 { font-size: 1rem; }
.skill p { color: var(--text-muted); font-size: 0.85rem; margin: 0.15rem 0 0; }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 1.6rem; border-left: 2px solid var(--border); }
.timeline__item { position: relative; }
.timeline__dot {
  position: absolute;
  left: calc(-1.6rem - 7px);
  top: 1.6rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}
.timeline .card__top h3 { font-size: 1.2rem; }
.gpa-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
  padding: 1rem 1.3rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(34, 211, 238, 0.04));
}
.gpa-highlight__info { display: grid; gap: 0.15rem; }
.gpa-highlight__label { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.gpa-highlight__note { font-size: 0.8rem; color: var(--text-muted); }
.gpa-highlight__value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
  white-space: nowrap;
}

/* ===== Sertifikat strip ===== */
.cert-strip { margin-top: 2rem; }
.cert-strip h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.cert-strip__items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: start; }
.media--cert {
  aspect-ratio: 210 / 297;
  width: min(100%, 200px);
  margin-inline: auto;
  position: relative;
  z-index: 1;
  cursor: zoom-in;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.media--cert:hover,
.media--cert:focus-visible {
  transform: scale(2.6);
  z-index: 50;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  outline: none;
}
.media--cert .media__hint { font-size: 0.72rem; }

/* ===== Prestasi ===== */
.card--award { text-align: center; padding: 0 0 1.6rem; overflow: hidden; }
.media--award {
  aspect-ratio: 16 / 9;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
}
.medal {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  font-size: 1.6rem;
}
.card--award .medal {
  position: relative;
  z-index: 2;
  margin: -30px auto 1rem;
  border: 4px solid var(--surface);
  box-sizing: content-box;
}
.card--award h3, .card--award .card__sub { padding-inline: 1.2rem; }
.card--award .card__sub { margin-bottom: 0; }
.medal--gold { color: var(--gold); background: rgba(251, 191, 36, 0.12); box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35); }
.medal--silver { color: var(--silver); background: rgba(203, 213, 225, 0.1); box-shadow: 0 0 0 1px rgba(203, 213, 225, 0.3); }

/* ===== Proyek ===== */
.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(56, 189, 248, 0.4); }
.media--project { aspect-ratio: 16 / 9; border-radius: 0; border: 0; border-bottom: 1px solid var(--border); }
.project__body { padding: 1.4rem 1.5rem 1.6rem; }
.project__body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.project__body p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.project__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.1rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.project__link:hover { background: var(--accent); color: #06121f; transform: translateY(-2px); }
.project__link span { font-size: 1rem; line-height: 1; }

/* ===== Kontak ===== */
.contact__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}
.contact__lead { color: var(--text); font-size: 1.05rem; margin-bottom: 1.5rem; }
.contact__list { display: grid; gap: 1.1rem; }
.contact__list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact__icon {
  flex: 0 0 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
}
.contact__icon svg { width: 18px; height: 18px; }
.contact__list strong { display: block; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.contact__list a, .contact__list span { font-size: 0.95rem; word-break: break-word; }
.media--contact { aspect-ratio: 4 / 3; }

/* ===== Footer ===== */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 1.6rem 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }
.footer__top { font-size: 0.85rem; }

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 90;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); color: #06121f; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsif ===== */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__content { order: 2; }
  .hero__media { order: 1; }
  .hero__actions, .hero__socials { justify-content: center; }
  .hero__desc { margin-inline: auto; }
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .nav-menu {
    position: fixed;
    top: 74px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 17, 32, 0.98);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1.25rem 1.2rem;
    transform: translateY(-140%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-link { display: block; padding: 0.65rem 0; font-size: 1rem; }
  .nav-link::after { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .cert-strip__items { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
  .hero { padding-top: 6rem; }
  .hero__title { font-size: 2.5rem; }
  .media--portrait { width: min(60%, 220px); }
  .card__top { flex-direction: column; gap: 0.4rem; }
  .back-to-top { right: 1rem; bottom: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Fullscreen image viewer ===== */
.media--zoomable,
.media--zoomable img { cursor: zoom-in; }

.image-zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(11, 17, 32, 0.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 0.9;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.image-zoom-btn:hover,
.image-zoom-btn:focus-visible {
  opacity: 1;
  background: var(--accent);
  color: #06121f;
  transform: scale(1.08);
  outline: none;
}
.image-zoom-btn svg { width: 18px; height: 18px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 4.5rem;
  background: rgba(3, 7, 16, 0.94);
  backdrop-filter: blur(8px);
}
.lightbox[hidden] { display: none; }
body.lightbox-open { overflow: hidden; }

.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  max-width: 100%;
  max-height: 100%;
}
.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}
.lightbox__caption {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--accent);
  color: #06121f;
  border-color: var(--accent);
}
.lightbox__close {
  top: 1.2rem;
  right: 1.4rem;
  width: 46px;
  height: 46px;
  font-size: 1.8rem;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 2.2rem;
}
.lightbox__nav--prev { left: 1.2rem; }
.lightbox__nav--next { right: 1.2rem; }
.lightbox__nav[hidden] { display: none; }

@media (max-width: 620px) {
  .lightbox { padding: 4rem 1rem; }
  .lightbox__nav { width: 40px; height: 40px; font-size: 1.8rem; }
  .lightbox__nav--prev { left: 0.5rem; }
  .lightbox__nav--next { right: 0.5rem; }
}
