/* ---------- Warna & tipografi ---------- */
/* --brand dan huruf diisi dari admin → Tampilan (lihat theme_css di inc/public_data.php) */
:root {
  --bg: #fbfaf7;
  --bg-alt: #f2efe8;
  --surface: #ffffff;
  --side-bg: #f2efe8;
  --text: #1d2321;
  --muted: #5d6763;
  --line: #e2ddd2;
  --accent: var(--brand, #0f6b5c);
  --accent-soft: color-mix(in srgb, var(--brand, #0f6b5c) 14%, white);
  --accent-text: #ffffff;
  --gold: #b7791f;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 6px 20px rgb(0 0 0 / .05);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121615; --bg-alt: #181d1b; --surface: #1d2321; --side-bg: #171c1a; --text: #e8ece9; --muted: #9aa5a0;
    --line: #2d3532; --accent: color-mix(in srgb, var(--brand, #0f6b5c) 50%, white); --accent-soft: color-mix(in srgb, var(--brand, #0f6b5c) 32%, #121615); --accent-text: #0c1513; --gold: #e0a84a;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #121615; --bg-alt: #181d1b; --surface: #1d2321; --side-bg: #171c1a; --text: #e8ece9; --muted: #9aa5a0;
  --line: #2d3532; --accent: color-mix(in srgb, var(--brand, #0f6b5c) 50%, white); --accent-soft: color-mix(in srgb, var(--brand, #0f6b5c) 32%, #121615); --accent-text: #0c1513; --gold: #e0a84a;
  --shadow: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 650; line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; margin-top: 1.6em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 28px; } }

/* ---------- Menu atas ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 650; font-size: 1.15rem; color: var(--text); white-space: nowrap; }
.brand img { height: 32px; width: auto; }
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.nav > a { color: var(--muted); font-size: .9rem; font-weight: 500; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.nav > a:hover, .nav > a.active { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.nav-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: 8px; }
.theme-toggle {
  background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px;
  width: 34px; height: 34px; cursor: pointer; font-size: 1rem;
}
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }

/* Pemilih bahasa (menu tarik-turun) */
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: .85rem; font-weight: 600; color: var(--text); white-space: nowrap;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-menu[open] summary { border-color: var(--accent); color: var(--accent); }
.lang-pop {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 170px; z-index: 20;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.lang-pop a { padding: 8px 12px; border-radius: 7px; color: var(--text); font-size: .9rem; }
.lang-pop a:hover { background: var(--accent-soft); text-decoration: none; }
.lang-pop a[aria-current="true"] { color: var(--accent); font-weight: 600; }

@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none;
    max-height: calc(100vh - 60px); overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav > a { padding: 10px 12px; }
  .nav-tools { margin: 10px 0 0; justify-content: space-between; }
  .lang-menu { flex: 1; }
  .lang-pop { position: static; margin-top: 6px; box-shadow: none; }
}

/* ---------- Pembuka (hero) ---------- */
.hero { padding: 56px 0 40px; background: radial-gradient(1200px 400px at 80% -10%, var(--accent-soft), transparent 70%); }
.hero-inner { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.hero-photo {
  width: 220px; height: 220px; object-fit: cover; border-radius: 50%;
  border: 6px solid var(--surface); box-shadow: var(--shadow); background: var(--bg-alt);
}
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: .25em; }
.hero-title { color: var(--muted); margin: 0 0 12px; font-weight: 500; }
.tagline { font-family: var(--font-head); font-style: italic; font-size: 1.15rem; margin: 0 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 44px 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stats div { background: var(--surface); padding: 18px 20px; }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: 0; font-family: var(--font-head); font-size: 1.9rem; font-weight: 650; color: var(--text); }
.mt-note { font-size: .78rem; color: var(--muted); margin: 14px 0 0; }

/* Latar pembuka berwarna / gambar: teks menjadi putih */
.hero.cover { color: #fff; }
.cover-solid { background: var(--brand, #0f6b5c); }
.cover-gradient {
  background:
    radial-gradient(circle at 88% 12%, rgb(255 255 255 / .16) 0 140px, transparent 141px),
    radial-gradient(circle at 6% 105%, rgb(255 255 255 / .10) 0 220px, transparent 221px),
    linear-gradient(135deg, var(--brand, #0f6b5c), color-mix(in srgb, var(--brand, #0f6b5c) 45%, black));
}
.cover-image {
  background: linear-gradient(rgb(0 0 0 / .55), rgb(0 0 0 / .35)), var(--cover) center / cover no-repeat;
}
.hero.cover .eyebrow, .hero.cover .hero-title, .hero.cover .mt-note { color: rgb(255 255 255 / .85); }
.hero.cover .hero-photo { border-color: rgb(255 255 255 / .9); }
.hero.cover .btn-primary { background: #fff; color: var(--brand, #0f6b5c); }
.hero.cover .btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .6); }
.hero.cover .stats { border-color: rgb(255 255 255 / .25); background: rgb(255 255 255 / .25); }
.hero.cover .stats div { background: rgb(255 255 255 / .12); backdrop-filter: blur(6px); }
.hero.cover .stats dt { color: rgb(255 255 255 / .8); }
.hero.cover .stats dd { color: #fff; }

@media (max-width: 720px) {
  .hero { padding-top: 36px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .hero-photo { width: 150px; height: 150px; margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Bagian ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.lead { color: var(--muted); margin: -6px 0 24px; }
.prose p { margin: 0 0 1em; }
.prose ul { margin: 0 0 1em; padding-inline-start: 1.3em; }
.prose li { margin-bottom: .3em; }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; gap: 28px; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3:first-child { margin-top: 0; }
.side-label {
  display: block; text-transform: uppercase; letter-spacing: .08em;
  font-size: .7rem; font-weight: 600; color: var(--muted); margin: 0 0 6px;
}

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .tag {
  background: var(--accent-soft); color: var(--accent); border-radius: 999px;
  padding: 4px 12px; font-size: .85rem; font-weight: 500;
}
.tag { font-size: .75rem; padding: 2px 10px; }

.btn { display: inline-block; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: .95rem; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Profil akademik */
.id-list { list-style: none; padding: 0; margin: 0; }
.id-list li { border-top: 1px solid var(--line); }
.id-list li:first-child { border-top: 0; }
.id-list a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; color: var(--text); }
.id-list a:hover { color: var(--accent); text-decoration: none; }
.id-list .id-name { font-weight: 600; white-space: nowrap; }
.id-list .id-val { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: end; }

/* ---------- Kartu riset & mahasiswa ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.cards-sm { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 20px; }
@media (max-width: 400px) { .cards, .cards-sm { grid-template-columns: 1fr; } }
.cards .card h3 { font-size: 1.05rem; margin: 6px 0 8px; }
.card .meta { color: var(--muted); font-size: .85rem; margin: 0; }
.card p { margin: 0 0 12px; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--bg-alt); color: var(--muted); }
.badge.ok { background: var(--accent-soft); color: var(--accent); }

/* ---------- Publikasi ---------- */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button {
  font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px;
}
.filters button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.toolbar input {
  font: inherit; font-size: .92rem; padding: 8px 14px; border-radius: 10px; min-width: 0; flex: 0 1 280px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
@media (max-width: 560px) { .toolbar input { flex-basis: 100%; } }

.pub-year { font-family: var(--font-head); font-size: 1.3rem; color: var(--accent); margin: 28px 0 8px; }
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub { padding: 14px 0; border-top: 1px solid var(--line); }
.pub-title { font-weight: 600; color: var(--text); }
a.pub-title:hover { color: var(--accent); }
.pub-authors, .pub-venue { color: var(--muted); font-size: .9rem; margin: 2px 0 0; }
.pub .badges { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.empty { color: var(--muted); }

/* ---------- Timeline prestasi ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 54px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 44px 1fr; gap: 28px; padding: 10px 0; position: relative; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: 49px; top: 18px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--bg);
}
.section.alt .timeline li::before { border-color: var(--bg-alt); }
.timeline .t-year { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .t-title { font-weight: 600; }
.timeline .t-org { color: var(--muted); font-size: .9rem; }

/* ---------- Tabel mata kuliah ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: start; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--bg-alt); }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- Kontak: satu kolom ---------- */
.contact-list { list-style: none; margin: 0; padding: 4px 22px; max-width: 720px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); }
.contact-item:first-child { border-top: 0; }
.contact-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.contact-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.contact-body .side-label { margin: 0; }
.contact-body > a:not(.contact-map) { color: var(--text); font-weight: 500; }
.contact-body > a:not(.contact-map):hover { color: var(--accent); }
.contact-map { font-size: .82rem; margin-top: 2px; }
@media (max-width: 480px) { .contact-list { padding: 4px 16px; } }

/* ---------- Footer ---------- */
.footer { background: #14211e; color: #d6dfdb; padding: 48px 0 24px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-name { font-family: var(--font-head); font-size: 1.3rem; font-weight: 650; color: #fff; margin: 0 0 4px; }
.footer-aff { margin: 0; color: #a9b8b2; font-size: .92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; max-width: 560px; }
.footer-links a { border: 1px solid #2f413c; padding: 6px 12px; border-radius: 8px; font-size: .88rem; color: #8fd8c6; }
.footer-links a:hover { border-color: #8fd8c6; text-decoration: none; }
.copyright { margin-top: 36px; padding-top: 20px; border-top: 1px solid #2a3935; font-size: .85rem; color: #8b9a95; }

/* ---------- Google Translate: sembunyikan bilah, halaman tidak terdorong ke bawah ---------- */
iframe.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
#google_translate_element { display: none; }

/* ---------- Arab (kanan ke kiri) & Jepang ---------- */
:root[dir="rtl"] body { font-family: "Noto Naskh Arabic", "Geeza Pro", var(--font-body); }
:root[dir="rtl"] .tagline, :root[lang="ja"] .tagline { font-style: normal; }
:root[lang="ja"] body { font-family: var(--font-body), "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif; }
/* Teks berbahasa asli (nama, judul publikasi) di halaman Arab: arah tulis mengikuti isinya */
:root[dir="rtl"] .notranslate, :root[dir="rtl"] .hero-title, :root[dir="rtl"] .eyebrow { unicode-bidi: plaintext; }

/* ---------- Publikasi: ikon akses di sisi kanan ---------- */
.pub { display: flex; gap: 16px; align-items: flex-start; }
.pub-main { flex: 1; min-width: 0; }
.pub-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 170px; padding-top: 2px; }
.pub-link {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.pub-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pub-link:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.pub-link-pdf { color: #b42318; }
@media (max-width: 480px) { .pub-links { max-width: 80px; } .pub-link { width: 34px; height: 34px; } }
