@import url("https://cdn.jsdelivr.net/npm/computer-modern@0.1.2/index.min.css");

:root {
  color-scheme: dark;
  --bg: #0f141b;
  --bg-soft: #141b24;
  --text: #c3cedd;
  --muted: #8898b1;
  --line: #2a3444;
  --clickable-hover: #d6b36a;
  --page-width: 1080px;
  --page-gap: 14px;
  --page-radius: 14px;
  --page-border: rgba(123, 142, 182, 0.28);
  --page-shadow: 0 22px 46px rgba(2, 6, 12, 0.36);
  --brand: #7188c3;
  --brand-strong: #9cadcf;
  --accent-hover-text: #b7ebf6;
  --accent-hover-border: rgba(125, 199, 217, 0.55);
  --accent-hover-bg: rgba(125, 199, 217, 0.14);
}

body.theme-lavender {
  --accent-hover-text: #d7dcf8;
  --accent-hover-border: rgba(154, 168, 217, 0.55);
  --accent-hover-bg: rgba(154, 168, 217, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #090e14;
}

body {
  width: min(var(--page-width), calc(100vw - (var(--page-gap) * 2)));
  min-height: calc(100vh - (var(--page-gap) * 2));
  margin: var(--page-gap) auto;
  position: relative;
  display: flex;
  flex-direction: column;
  font-family: "CMU Serif", "Times New Roman", serif;
  line-height: 1.6;
  color: var(--text);
  border: 1px solid var(--page-border);
  border-radius: var(--page-radius);
  box-shadow: var(--page-shadow);
  background:
    radial-gradient(circle at 85% -10%, rgba(113, 136, 195, 0.1), transparent 36%),
    radial-gradient(circle at 10% 0%, rgba(57, 83, 130, 0.1), transparent 34%),
    var(--bg);
}

h1,
h2,
h3 {
  font-family: "CMU Serif", "Times New Roman", serif;
  line-height: 1.2;
  margin-top: 0;
}

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

.container {
  width: min(1000px, 90vw);
  margin: 0 auto;
}

.hero {
  padding: 26px 0 8px;
}

.hero + main {
  padding-top: 0;
}

.hero + main .panel:first-child {
  margin-top: 4px;
  border-bottom: 0;
}

.hero-grid {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-top {
  margin-bottom: 6px;
}

.lang-corner {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px 0;
  z-index: 1000;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 1.04rem;
  font-weight: 400;
  font-family: "CMU Sans Serif", Arial, sans-serif;
  color: var(--text);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: var(--bg-soft);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: "CMU Sans Serif", Arial, sans-serif;
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
}

.lang-btn[data-lang="en"]::before {
  content: "🌐";
  line-height: 1;
}

.lang-btn[data-lang="id"]::before {
  content: "🇮🇩";
  line-height: 1;
}

.lang-btn.active {
  background: #1b2432;
  color: var(--brand-strong);
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: #d6b36a;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 10px;
}

.hero-copy h1 {
  font-size: clamp(1.82rem, 3.45vw, 2.35rem);
  font-weight: 400;
  margin-bottom: 6px;
}

.subtitle {
  font-size: clamp(0.9rem, 1.35vw, 1rem);
  margin: 0;
  max-width: 62ch;
  text-align: justify;
  text-justify: inter-word;
  color: var(--text);
  font-style: italic;
}

.subtitle-highlight {
  color: var(--text);
  font-weight: 400;
}

.cta-group {
  display: flex;
  gap: 12px;
  margin: 22px 0 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-family: "CMU Sans Serif", Arial, sans-serif;
  border-radius: 8px;
  padding: 10px 15px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: #dbe4f6;
  background: linear-gradient(135deg, #5369a0, #445684);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  color: var(--clickable-hover);
  border-color: var(--accent-hover-border);
  background: var(--accent-hover-bg);
}

.social-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.social-links a:hover {
  color: #a5b4d2;
}

.hero-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-social {
  margin-top: 14px;
  gap: 12px;
  align-items: center;
}

.social-icon-btn {
  width: 36px;
  height: 36px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9fb0d4;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 8px;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-icon-btn:visited {
  color: #9fb0d4;
}

.social-icon-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.social-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.cv-icon-btn {
  font-family: "CMU Sans Serif", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.social-icon-btn:hover {
  color: #a5b4d2;
  border-color: #324055;
  transform: translateY(-1px);
}

.social-icon-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-4px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #324055;
  background: #111a25;
  color: #dbe4f6;
  font-family: "CMU Sans Serif", Arial, sans-serif;
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 18px rgba(2, 6, 12, 0.34);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.social-icon-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  transform: translateX(-50%) translateY(-4px);
  opacity: 0;
  pointer-events: none;
  border-width: 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent #111a25;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 19;
}

.social-icon-btn:hover::after,
.social-icon-btn:hover::before,
.social-icon-btn:focus-visible::after,
.social-icon-btn:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.profile-img {
  width: 162px;
  height: 162px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #33435d;
  box-shadow: 0 6px 16px rgba(3, 6, 12, 0.24);
}

main {
  flex: 1;
  padding: 10px 0;
}

.panel {
  border-bottom: 1px solid var(--line);
  margin: 4px 0;
  padding: 8px 0 10px;
}

.panel h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.section-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  padding: 14px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.section-card:hover,
.section-card:focus-within {
  background: #1a2535;
  border-color: #3a4f72;
  box-shadow: 0 8px 18px rgba(3, 6, 12, 0.22);
  transform: translateY(-2px);
}

.section-card h3 {
  margin-bottom: 8px;
  color: var(--text);
}

.section-card p {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--muted);
}

.section-card-button {
  padding: 0;
  border: 0;
  background: transparent;
}

.section-card-button:hover,
.section-card-button:focus-within {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.section-action-btn {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
  font-weight: 400;
  padding: 12px 14px;
}

.section-action-btn:hover,
.section-action-btn:focus-visible {
  color: #d6b36a;
}

.recent-updates-panel {
  border-bottom: 0;
}

.recent-updates-panel h2 {
  margin-bottom: 14px;
}

.updates-list {
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

body[data-page="news-events"] .updates-list {
  margin-top: 0;
  border-top: 0;
}

body[data-page] .page-main {
  padding-top: 8px;
}

body[data-page] .page-main > .panel:first-child {
  margin-top: 0;
  padding-top: 10px;
}

.home-recent-updates .updates-list .update-item:nth-child(n + 11) {
  display: none;
}

.update-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.update-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-family: "CMU Sans Serif", Arial, sans-serif;
}

.news-new-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.66rem;
  line-height: 1.35;
  letter-spacing: 0.08em;
  font-family: "CMU Sans Serif", Arial, sans-serif;
  color: #2d1e03;
  background: linear-gradient(135deg, #f5d37e, #d6b36a);
  box-shadow: 0 0 0 1px rgba(214, 179, 106, 0.4), 0 0 10px rgba(214, 179, 106, 0.28);
  animation: newsBadgeBlink 1.1s steps(2, start) infinite;
}

@keyframes newsBadgeBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-new-badge {
    animation: none;
  }
}

.update-text {
  margin: 0;
  font-size: clamp(0.95rem, 1.75vw, 1.08rem);
  line-height: 1.45;
  text-align: justify;
  text-justify: inter-word;
  color: var(--text);
}

.update-text a.update-highlight {
  text-decoration: none;
}

.update-title {
  color: inherit;
}

.update-text a.update-title {
  text-decoration: none;
}

.update-highlight {
  color: #7dc7d9;
}

body[data-page="news-events"] .update-highlight {
  color: inherit;
}

body[data-page="news-events"] .update-title,
.home-recent-updates .update-title {
  color: #6f8fcb;
}

body[data-page="news-events"] .update-text a.update-title,
.home-recent-updates .update-text a.update-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

body[data-page="news-events"] .update-text a:not(.update-title),
.home-recent-updates .update-text a:not(.update-title) {
  color: inherit;
  text-decoration: none;
}

body[data-page="news-events"] .update-text a.update-title:hover,
body[data-page="news-events"] .update-text a.update-title:focus-visible,
.home-recent-updates .update-text a.update-title:hover,
.home-recent-updates .update-text a.update-title:focus-visible {
  color: #d6b36a;
  text-decoration-color: #d6b36a;
}

body[data-page="news-events"] .update-text a:not(.update-title):hover,
body[data-page="news-events"] .update-text a:not(.update-title):focus-visible,
.home-recent-updates .update-text a:not(.update-title):hover,
.home-recent-updates .update-text a:not(.update-title):focus-visible {
  color: inherit;
}

body[data-page="current-research"] .research-topic-inline {
  color: #6f8fcb;
}

.updates-more-btn {
  margin-top: 14px;
  min-height: 40px;
  padding: 9px 14px;
  font-weight: 400;
  color: var(--muted);
}

.btn-small {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.profile-strip {
  border-bottom: 1px solid var(--line);
  padding: 16px 0 18px;
}

.profile-strip-inner {
  display: block;
}

.profile-strip-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.profile-strip-identity {
  display: inline-flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 0;
  text-decoration: none;
  color: var(--text);
}

.profile-strip-image {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid #33435d;
  object-fit: cover;
}

.profile-strip-name {
  font-family: "CMU Serif", "Times New Roman", serif;
  font-size: clamp(1.32rem, 2.2vw, 1.62rem);
  font-weight: 400;
  line-height: 1.05;
}

.profile-strip-meta {
  margin: 0;
}

.profile-strip-name-link {
  display: inline-block;
  margin-bottom: 1px;
  text-decoration: none;
  color: var(--text);
}

.profile-strip-eyebrow {
  margin-bottom: 2px;
}

.profile-strip-social {
  margin-top: 0;
}

.profile-strip-grid {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

body[data-page] .profile-strip-grid {
  margin-top: 18.5px;
}

body[data-page] .profile-strip-grid .section-card {
  flex: 0 0 auto;
  max-width: none;
}

body[data-page] .profile-strip-grid .section-action-btn {
  width: 104px;
  min-height: 26px;
  padding: 2px 6px;
  font-size: 0.90rem;
  white-space: nowrap;
}

body:not([data-page]) .section-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

body:not([data-page]) .section-grid .section-card {
  flex: 0 0 auto;
  max-width: none;
}

body:not([data-page]) .section-grid .section-action-btn {
  width: 118px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 1.02rem;
  white-space: nowrap;
}

.profile-strip-grid .section-action-btn.is-active {
  color: var(--clickable-hover);
  border-color: var(--accent-hover-border);
  background: var(--accent-hover-bg);
}

.sub-header {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.sub-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sub-header-inner h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.back-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.back-link:hover {
  color: var(--brand-strong);
}

.page-main {
  min-height: 55vh;
}

.education-list {
  margin: 0;
  padding-left: 20px;
}

.education-list li {
  margin-bottom: 8px;
  color: var(--muted);
}

.education-list strong {
  color: var(--text);
}

.publication-list {
  margin: 0;
  padding-left: 20px;
}

.publication-list li {
  margin-bottom: 8px;
}

body[data-page="publications"] .publication-list li,
body[data-page="publications"] .hint {
  text-align: justify;
  text-justify: inter-word;
}

body[data-page="publications"] .publication-list a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease;
}

body[data-page="publications"] .publication-list a:hover,
body[data-page="publications"] .publication-list a:focus-visible {
  color: #d6b36a;
}

body[data-page="current-research"] .research-summary {
  margin: 0;
  color: var(--muted);
  text-align: justify;
  text-justify: inter-word;
}

body[data-page="current-research"] .research-topic-inline {
  color: #6f8fcb;
  font-weight: 700;
}

body[data-page="current-research"] .research-illustration {
  margin: 18px 0 0;
  padding: 0;
}

body[data-page="current-research"] .research-illustration-img {
  display: block;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0f192a;
  box-shadow: 0 12px 28px rgba(8, 14, 26, 0.34);
}

.publication-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.publication-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: "CMU Sans Serif", Arial, sans-serif;
  font-size: 0.9rem;
}

.publication-select {
  min-width: 140px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text);
  background: var(--bg-soft);
  font-family: "CMU Sans Serif", Arial, sans-serif;
  font-size: 0.9rem;
}

.status {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-strong);
  background: #172131;
  border: 1px solid #25344f;
  border-radius: 999px;
  padding: 3px 8px;
}

.hint {
  color: var(--muted);
  margin-bottom: 0;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-links a {
  text-decoration: none;
  font-weight: 600;
}

footer {
  text-align: center;
  padding: 14px 0 8px;
  color: var(--muted);
}

footer p {
  margin: 6px 0;
}

.last-updated {
  font-size: 0.95rem;
}

a:hover,
a:focus-visible,
button:hover,
button:focus-visible {
  color: var(--clickable-hover);
}

@media (max-width: 920px) {
  .hero {
    padding-top: 20px;
  }

  .section-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  html {
    background: var(--bg);
  }

  body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hero-top {
    margin-bottom: 4px;
  }

  .lang-corner {
    top: 6px;
    padding: 8px 10px 0;
  }

  .hero-grid {
    justify-content: center;
    text-align: left;
  }

  .profile-strip-image {
    width: 80px;
    height: 80px;
  }

  .profile-strip-social {
    gap: 10px;
  }

  .sub-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel {
    padding: 12px 0 16px;
  }

  .profile-img {
    width: 138px;
    height: 138px;
  }

  .profile-social {
    gap: 10px;
  }

  .social-icon-btn {
    width: 32px;
    height: 32px;
  }

  .update-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .update-date {
    font-size: 0.9rem;
  }

  .update-text {
    font-size: 0.95rem;
  }

}
