/* ====== Reset ringan ====== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

:root{
  --bg: #0b1220;
  --card: #111827;
  --muted: #9ca3af;
  --fg: #e5e7eb;
  --brand: #60a5fa;
  --brand-2:#7dd3fc;
}

body{
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--fg);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(96,165,250,.25), transparent 60%), var(--bg);
}

.container{ width: min(1100px, 92%); margin-inline: auto; }

/* ====== Header & Nav ====== */
.site-header{
  background: rgba(17,24,39,.6);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky; top: 0; z-index: 10;
}
.header-inner{
  display: flex; align-items: center; gap: 1rem; padding: .9rem 0;
}
.logo{ width: 36px; height: 36px; object-fit: contain; }
.brand{ font-size: clamp(1.15rem, 1rem + 1vw, 1.5rem); margin: 0; color: white; }

/* >>> penting: batasi ke UL level teratas <<< */
.menu > ul{ list-style: none; padding: 0; margin: 0; display: flex; gap: .75rem; align-items: center; }

.menu a, .dropbtn, .nav-toggle{
  color: var(--fg); text-decoration: none; background: none; border: 0; cursor: pointer;
  padding: .5rem .75rem; border-radius: .6rem;
  display: inline-flex; align-items: center; height: auto;
}
.menu a:hover, .dropbtn:hover, .nav-toggle:hover{ background: rgba(255,255,255,.06); }

.nav-toggle{ margin-left: auto; display: none; }

/* ====== Dropdown ====== */
.dropdown{ position: relative; }
.dropbtn{ font: inherit; }

/* default: TERTUTUP (paksa)  */
.dropdown-menu{
  position: absolute;
  top: 120%;
  left: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .6rem;
  padding: .5rem 0;
  display: none !important;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.dropdown-menu li{ list-style: none; }
.dropdown-menu li a{
  display: block;
  padding: .6rem .9rem;
  color: var(--fg);
  text-decoration: none;
}
.dropdown-menu li a:hover{ background: rgba(255,255,255,.06); }

/* buka hanya saat aria-expanded="true" DI ELEMEN .dropdown */
.dropdown[aria-expanded="true"] > .dropdown-menu{
  display: flex !important;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ====== Layout dengan Flexbox ====== */
.site-main{ display: flex; gap: 1.25rem; padding: 1.25rem 0 2rem; }
.content{ flex: 1 1 auto; display: flex; flex-direction: column; gap: 1rem; }
.sidebar{
  flex: 0 0 300px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1rem;
  padding: 1rem;
  align-self: flex-start;
}
.avatar{ width: 100%; border-radius: .8rem; border: 1px solid rgba(255,255,255,.1); background:#fff; }
.bio h2{ margin-top: .8rem; color: #fff; }
.biodata{ padding-left: 1.1rem; color: var(--muted); }

/* Kartu / Article */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.card h3{ margin-top: .2rem; color:#fff; }
.card footer{ color: var(--muted); }
.hero{ margin: .6rem 0 .2rem; }
.hero figcaption{ color: var(--muted); font-size: .9rem; }

/* Footer */
.site-footer{ border-top: 1px solid rgba(255,255,255,.08); padding: 1.5rem 0; color: var(--muted); }

/* ====== Responsif ====== */
@media (max-width: 900px){
  .site-main{ flex-direction: column; }
  .sidebar{ order: -1; position: relative; top: 0; width: 100%; }
  .nav-toggle{ display: inline-flex; }
  .menu{ display: none; margin-left: auto; }
  .menu.open{ display: block; }

  /* menu utama jadi kolom */
  .menu > ul{ flex-direction: column; gap: .25rem; padding: .5rem 0; }

  /* dropdown di mobile tampil di bawah item, tapi tetap tertutup default */
  .dropdown-menu{
    position: static;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,.08);
    margin-top: .25rem;
  }
  .dropdown[aria-expanded="true"] > .dropdown-menu{
    display: block !important;
    opacity: 1; visibility: visible; transform: none;
  }
}

a{ color: var(--brand); }
a:hover{ color: var(--brand-2); }
