/* =========================================================
   Academic Portfolio - Custom Styles
   Semua warna utama masih dapat ditimpa melalui Tailwind.
   File ini berisi komponen reusable + animasi.
   ========================================================= */

:root {
  color-scheme: light;
}

html.dark {
  color-scheme: dark;
}

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

body {
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

.font-serif-accent {
  font-family: "Playfair Display", serif;
}

.text-gradient {
  background: linear-gradient(100deg, #d6b25e 15%, #14b8a6 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.container-custom {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.section-anchor {
  scroll-margin-top: 86px;
}

/* Ambient background */
.bg-orb {
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: .18;
}
.orb-one {
  top: 4rem;
  left: -10rem;
  background: #14b8a6;
}
.orb-two {
  top: 20rem;
  right: -12rem;
  background: #d6b25e;
}
.dark .bg-orb { opacity: .10; }

/* Navbar */
#navbar.nav-scrolled {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(226, 232, 240, .85);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, .06);
}
.dark #navbar.nav-scrolled {
  background: rgba(11, 17, 32, .84);
  border-color: rgba(51, 65, 85, .55);
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
}

.nav-link {
  position: relative;
  padding: .7rem 1rem;
  border-radius: .75rem;
  font-size: .9rem;
  font-weight: 650;
  color: #64748b;
  transition: .2s ease;
}
.dark .nav-link { color: #94a3b8; }
.nav-link:hover,
.nav-link.active {
  color: #0f172a;
  background: rgba(15, 23, 42, .05);
}
.dark .nav-link:hover,
.dark .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.06);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: .3rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6, #d6b25e);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: .85rem;
  border: 1px solid #e2e8f0;
  background: rgba(255,255,255,.75);
  color: #334155;
  transition: .2s ease;
}
.icon-button:hover {
  transform: translateY(-1px);
  color: #0f172a;
  background: white;
}
.dark .icon-button {
  border-color: #334155;
  background: rgba(15, 23, 42, .8);
  color: #cbd5e1;
}
.dark .icon-button:hover {
  background: #1e293b;
  color: white;
}

.mobile-nav-link {
  display: block;
  padding: .8rem 1rem;
  border-radius: .8rem;
  font-weight: 600;
  color: #475569;
}
.mobile-nav-link:hover { background: #f1f5f9; color: #0f172a; }
.dark .mobile-nav-link { color: #cbd5e1; }
.dark .mobile-nav-link:hover { background: #1e293b; color: white; }

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 1.2rem;
  border-radius: .85rem;
  font-weight: 750;
  font-size: .92rem;
  transition: .2s ease;
}
.btn-primary {
  background: #0f172a;
  color: white;
  box-shadow: 0 10px 25px rgba(15,23,42,.16);
}
.btn-primary:hover { transform: translateY(-2px); background: #1e293b; }
.dark .btn-primary { background: #f8fafc; color: #0f172a; }

.btn-secondary {
  border: 1px solid #cbd5e1;
  color: #334155;
  background: rgba(255,255,255,.66);
}
.btn-secondary:hover { transform: translateY(-2px); border-color: #94a3b8; background: white; }
.dark .btn-secondary {
  color: #e2e8f0;
  border-color: #475569;
  background: rgba(30,41,59,.65);
}

.social-pill {
  font-size: .78rem;
  font-weight: 650;
  padding: .55rem .8rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  color: #64748b;
  background: rgba(255,255,255,.68);
  transition: .2s ease;
}
.social-pill:hover {
  border-color: #14b8a6;
  color: #0f766e;
  transform: translateY(-1px);
}
.dark .social-pill {
  border-color: #334155;
  color: #94a3b8;
  background: rgba(30,41,59,.6);
}

/* Stats */
.stat-card {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255,255,255,.68);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 35px rgba(15, 23, 42, .05);
}
.dark .stat-card { background: rgba(15,23,42,.55); border-color: #334155; }
.stat-card strong {
  display: block;
  font-size: 1.45rem;
  color: #0f172a;
}
.dark .stat-card strong { color: white; }
.stat-card span { display:block; margin-top:.25rem; font-size:.72rem; color:#64748b; }

/* Headings */
.section-heading { max-width: 760px; }
.eyebrow,
.card-label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #0f766e;
}
.dark .eyebrow,
.dark .card-label { color: #5eead4; }
.section-heading h2 {
  margin-top: .5rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -.04em;
  font-weight: 800;
  color: #0f172a;
}
.dark .section-heading h2 { color: white; }
.section-heading > p:last-child {
  margin-top: 1rem;
  color: #64748b;
  line-height: 1.8;
}
.dark .section-heading > p:last-child { color: #94a3b8; }

.card-title {
  margin-top: .4rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #0f172a;
}
.dark .card-title { color: white; }

/* Tabs */
.tabs {
  display: inline-flex;
  gap: .4rem;
  padding: .4rem;
  border-radius: 1.1rem;
  border: 1px solid #e2e8f0;
  background: rgba(255,255,255,.72);
  overflow-x: auto;
  max-width: 100%;
}
.dark .tabs { border-color:#334155; background:rgba(15,23,42,.64); }
.tab-button {
  white-space: nowrap;
  padding: .75rem 1rem;
  border-radius: .8rem;
  color: #64748b;
  font-weight: 700;
  font-size: .86rem;
  transition: .2s;
}
.tab-button.active {
  color: white;
  background: #0f172a;
  box-shadow: 0 8px 20px rgba(15,23,42,.16);
}
.dark .tab-button.active { background:#f8fafc; color:#0f172a; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: tabFade .35s ease; }
@keyframes tabFade { from {opacity:0; transform:translateY(7px)} to {opacity:1; transform:none} }

/* Cards */
.glass-card,
.award-card {
  border: 1px solid #e2e8f0;
  background: rgba(255,255,255,.76);
  border-radius: 1.35rem;
  padding: 1.4rem;
  box-shadow: 0 18px 55px rgba(15,23,42,.06);
}
.dark .glass-card,
.dark .award-card {
  border-color:#334155;
  background:rgba(15,23,42,.56);
  box-shadow:0 18px 55px rgba(0,0,0,.15);
}

.course-card {
  display:flex;
  gap: .9rem;
  padding:1rem;
  border-radius:1rem;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}
.dark .course-card { background:#0f172a; border-color:#334155; }
.course-card > span {
  min-width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:.75rem;
  font-size:.72rem;
  font-weight:800;
  color:#0f766e;
  background:#ccfbf1;
}
.dark .course-card > span { background:rgba(45,212,191,.12); color:#5eead4; }
.course-card h4 {font-weight:800;color:#0f172a;}
.dark .course-card h4 {color:white;}
.course-card p {margin-top:.25rem;color:#64748b;font-size:.82rem;line-height:1.55;}
.dark .course-card p {color:#94a3b8;}

.timeline-list li {
  position: relative;
  padding: .8rem .9rem .8rem 1.5rem;
  border-left: 1px solid #cbd5e1;
  color:#475569;
}
.timeline-list li::before {
  content:"";
  position:absolute;
  left:-5px;
  top:1.1rem;
  width:9px;height:9px;border-radius:999px;
  background:#d6b25e;
}
.dark .timeline-list li { border-color:#475569; color:#cbd5e1; }

/* Gallery */
.gallery-item {
  overflow:hidden;
  border-radius:1rem;
  border:1px solid #e2e8f0;
  background:white;
  transition:.22s ease;
}
.gallery-item:hover { transform:translateY(-4px); box-shadow:0 18px 35px rgba(15,23,42,.10); }
.dark .gallery-item { background:#0f172a; border-color:#334155; }
.gallery-item img {
  width:100%; height:175px; object-fit:cover;
  transition:.3s ease;
}
.gallery-item:hover img { transform:scale(1.035); }
.gallery-item span { display:block; padding:.9rem 1rem; font-weight:700; font-size:.9rem; }

/* Filters / Research */
.filter-button {
  padding:.55rem .8rem;
  border-radius:999px;
  border:1px solid #e2e8f0;
  background:#fff;
  font-size:.76rem;
  font-weight:700;
  color:#64748b;
  transition:.2s;
}
.dark .filter-button {background:#0f172a;border-color:#334155;color:#94a3b8;}
.filter-button.active {
  border-color:#14b8a6;
  color:#0f766e;
  background:#f0fdfa;
}
.dark .filter-button.active {background:rgba(20,184,166,.12);color:#5eead4;}

.research-card {
  padding:1.25rem;
  border:1px solid #e2e8f0;
  border-radius:1.1rem;
  background:#fff;
  transition:.22s;
}
.research-card:hover {transform:translateY(-3px);box-shadow:0 14px 30px rgba(15,23,42,.07);}
.dark .research-card {background:#0f172a;border-color:#334155;}
.research-card.hidden-by-filter {display:none;}
.research-card h4 {
  margin-top:1rem;
  color:#0f172a;
  font-weight:800;
  font-size:1.05rem;
  line-height:1.55;
}
.dark .research-card h4 {color:#fff;}
.research-card > p {margin-top:.5rem;color:#64748b;font-size:.82rem;}
.dark .research-card > p {color:#94a3b8;}
.badge {
  display:inline-flex;
  border-radius:999px;
  padding:.32rem .6rem;
  font-size:.68rem;
  font-weight:750;
  background:#f1f5f9;
  color:#475569;
}
.dark .badge {background:#1e293b;color:#cbd5e1;}
.card-actions {
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  margin-top:1rem;
  padding-top:1rem;
  border-top:1px solid #e2e8f0;
}
.dark .card-actions {border-color:#334155;}
.text-link {
  font-size:.78rem;
  font-weight:750;
  color:#0f766e;
}
.dark .text-link {color:#5eead4;}
.text-link:hover {text-decoration:underline;}

/* PKM */
.project-card {
  overflow:hidden;
  border-radius:1.35rem;
  border:1px solid #e2e8f0;
  background:white;
  box-shadow:0 18px 55px rgba(15,23,42,.06);
  transition:.25s ease;
}
.project-card:hover {transform:translateY(-5px);}
.dark .project-card {background:#0f172a;border-color:#334155;}
.project-card img {width:100%;height:210px;object-fit:cover;}
.project-card h3 {margin-top:1rem;font-size:1.1rem;font-weight:800;color:#0f172a;}
.dark .project-card h3 {color:#fff;}
.project-card p {margin-top:.65rem;color:#64748b;font-size:.86rem;line-height:1.7;}
.dark .project-card p {color:#94a3b8;}
.impact-box {
  margin-top:1.2rem;
  border-radius:.9rem;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  padding:.8rem 1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.dark .impact-box {background:#111827;border-color:#334155;}
.impact-box strong {color:#0f766e;font-size:1.2rem;}
.dark .impact-box strong {color:#5eead4;}
.impact-box span {font-size:.76rem;color:#64748b;}

/* Awards */
.award-card { transition:.22s ease; }
.award-card:hover { transform:translateY(-4px); }
.award-icon {
  width:50px;height:50px;display:grid;place-items:center;
  border-radius:1rem;
  background:linear-gradient(135deg,#0f172a,#334155);
  color:white;
  font-weight:800;
  margin-bottom:1.3rem;
  box-shadow:0 10px 25px rgba(15,23,42,.15);
}
.award-card h3 {margin-top:.5rem;font-size:1.05rem;font-weight:800;color:#0f172a;}
.dark .award-card h3 {color:#fff;}
.award-card > p:last-child {margin-top:.5rem;font-size:.82rem;line-height:1.6;color:#64748b;}
.dark .award-card > p:last-child {color:#94a3b8;}

/* Contact */
.contact-pattern {
  background-image:
    radial-gradient(circle at 15% 15%, rgba(45,212,191,.16), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(214,178,94,.14), transparent 30%);
}
.contact-info {
  padding-bottom:1rem;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.contact-info span {display:block;font-size:.7rem;text-transform:uppercase;letter-spacing:.12em;color:#94a3b8;}
.contact-info a,.contact-info p {display:inline-block;margin-top:.35rem;color:#f8fafc;font-weight:650;}

.contact-form {
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  backdrop-filter:blur(12px);
  border-radius:1.5rem;
  padding:clamp(1.2rem,4vw,2rem);
  display:grid;
  gap:1rem;
}
.contact-form label {
  display:block;
  margin-bottom:.45rem;
  font-size:.8rem;
  font-weight:700;
  color:#e2e8f0;
}
.contact-form input,
.contact-form textarea {
  width:100%;
  border:1px solid rgba(255,255,255,.13);
  background:rgba(15,23,42,.7);
  color:white;
  border-radius:.9rem;
  padding:.85rem 1rem;
  outline:none;
  transition:.2s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {color:#64748b;}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color:#2dd4bf;
  box-shadow:0 0 0 3px rgba(45,212,191,.10);
}
.contact-form .input-error {border-color:#fb7185;}
.error-message {display:none;margin-top:.35rem;color:#fda4af;font-size:.72rem;}
.error-message.show {display:block;}
.btn-contact {
  min-height:48px;
  border-radius:.9rem;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  background:linear-gradient(90deg,#2dd4bf,#14b8a6);
  color:#042f2e;
  font-weight:800;
  transition:.2s;
}
.btn-contact:hover {transform:translateY(-2px);filter:brightness(1.04);}

/* Modal */
.modal {
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  padding:1rem;
}
.modal.hidden {display:none;}
.modal-backdrop {
  position:absolute;
  inset:0;
  background:rgba(2,6,23,.72);
  backdrop-filter:blur(5px);
}
.modal-dialog {
  position:relative;
  z-index:1;
  width:min(680px,100%);
  max-height:calc(100vh - 2rem);
  overflow:auto;
  border-radius:1.5rem;
  padding:1.5rem;
  border:1px solid #e2e8f0;
  background:white;
  box-shadow:0 30px 80px rgba(0,0,0,.35);
  animation:modalIn .2s ease;
}
.dark .modal-dialog {background:#0f172a;border-color:#334155;}
.modal-close {
  position:absolute;
  z-index:2;
  right:1rem;
  top:1rem;
  width:38px;height:38px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(15,23,42,.82);
  color:white;
  font-size:1.5rem;
}
@keyframes modalIn {from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}

/* Scroll reveal */
.reveal {
  opacity:0;
  transform:translateY(24px);
  transition:opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity:1;
  transform:none;
}

@media (prefers-reduced-motion: reduce) {
  html {scroll-behavior:auto;}
  *, *::before, *::after {
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
  .reveal {opacity:1;transform:none;}
}

@media (max-width: 640px) {
  .container-custom {width:min(100% - 1.25rem, 1180px);}
  .tabs {width:100%;}
  .tab-button {flex:1;}
  .gallery-item img {height:200px;}
}
