/* ====== LAYER URGEN ====== */
.lightbox {
  z-index: 10000;
}

/* ====== THEME / TOKENS ====== */
:root,
[data-theme="dark"] {
  /* Dark theme colors */
  --bg: #0a0c10;
  --bg-gradient-1: rgba(0, 255, 255, .05);
  --bg-gradient-2: rgba(108, 92, 231, .05);
  --bg-gradient-3: rgba(0, 255, 255, .04);

  --card: #0f1218;
  --card-hover: #151a23;
  --text: #e6f1ff;
  --text-secondary: #c5d9ed;
  --muted: #9fb0c0;
  --border: rgba(255, 255, 255, .06);
  --border-hover: rgba(255, 255, 255, .12);

  --primary: #6c5ce7;
  --primary-light: #8b7ef0;
  --accent: #00ffff;
  --accent-dim: #00d4d4;

  --success: #00d97e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --glow: 0 0 24px rgba(0, 255, 255, .25), 0 0 48px rgba(108, 92, 231, .2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .15);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .35);

  /* Avatar scales */
  --avatar-xs: clamp(18px, 3vw, 24px);
  --avatar-sm: clamp(22px, 3.8vw, 30px);
  --avatar-md: clamp(32px, 5.2vw, 48px);
  --avatar-lg: clamp(56px, 14vw, 96px);
}

[data-theme="light"] {
  /* Light theme colors */
  --bg: #f8fafc;
  --bg-gradient-1: rgba(108, 92, 231, .03);
  --bg-gradient-2: rgba(0, 200, 200, .03);
  --bg-gradient-3: rgba(108, 92, 231, .02);

  --card: #ffffff;
  --card-hover: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #64748b;
  --border: rgba(15, 23, 42, .10);
  --border-hover: rgba(15, 23, 42, .18);
  --input-bg: #ffffff;
  --input-border: rgba(15, 23, 42, .15);

  --primary: #6366f1;
  --primary-light: #8b7ef0;
  --accent: #8b5cf6;
  --accent-dim: #0e7490;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --glow: 0 0 24px rgba(108, 92, 231, .15), 0 0 48px rgba(8, 145, 178, .1);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .08);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, .12);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, .15);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--bg-gradient-1), transparent 70%),
    radial-gradient(900px 500px at 10% -10%, var(--bg-gradient-2), transparent 70%),
    radial-gradient(800px 400px at 50% 120%, var(--bg-gradient-3), transparent 70%),
    var(--bg);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ====== DECOR BACKGROUND ====== */
canvas#spiders {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  pointer-events: none;
}

#fx-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .06;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0, rgba(255, 255, 255, .07) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .07) 0, rgba(255, 255, 255, .07) 1px, transparent 1px, transparent 40px);
  -webkit-mask-image:
    radial-gradient(1200px 600px at 50% -10%, #000 65%, transparent 80%),
    radial-gradient(900px 500px at 50% 110%, #000 55%, transparent 80%);
  mask-image:
    radial-gradient(1200px 600px at 50% -10%, #000 65%, transparent 80%),
    radial-gradient(900px 500px at 50% 110%, #000 55%, transparent 80%);
  animation: gridPan 60s linear infinite;
}

@keyframes gridPan {
  to {
    background-position: 200px 0, 0 200px;
  }
}

i {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(500px 280px at 85% 0%, rgba(0, 255, 255, .06), transparent 70%),
    radial-gradient(420px 240px at 10% 0%, rgba(108, 92, 231, .06), transparent 70%),
    radial-gradient(520px 300px at 50% 120%, rgba(0, 255, 255, .05), transparent 75%);
}

/* ====== HEADER / NAV ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(10, 12, 16, .95), rgba(10, 12, 16, .85) 70%, rgba(10, 12, 16, .6));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .site-header {
  background: linear-gradient(180deg, rgba(248, 250, 252, .98), rgba(248, 250, 252, .92) 70%, rgba(248, 250, 252, .8));
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.head-flex {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  position: relative;
}

.head-flex nav {
  margin-left: auto;
  position: relative;
  z-index: 1001;
}

/* Mobile: ensure hamburger is always right-aligned */
@media (max-width:900px) {
  .head-flex {
    justify-content: space-between;
  }

  .head-flex .logo {
    flex-shrink: 0;
  }

  .head-flex nav {
    order: 2;
  }

  .head-flex .nav-toggle {
    order: 3;
    margin-left: auto;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 6px 0;
}

.logo img {
  height: 32px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35));
}

.logo-fallback {
  font-family: Orbitron, Inter, sans-serif;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text)
}

/* UL utama (desktop) */
.site-header nav ul {
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-header nav a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  opacity: .9;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
}

.site-header nav a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, .10);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

[data-theme="light"] .site-header nav a {
  background: rgba(15, 23, 42, .04);
}

[data-theme="light"] .site-header nav a:hover {
  background: rgba(15, 23, 42, .08);
}

/* Hamburger button styling */
.nav-toggle {
  display: none;
  background: rgba(12, 16, 22, .92);
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
  z-index: 1002;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.nav-toggle:hover {
  background: rgba(12, 16, 22, .98);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}

[data-theme="light"] .nav-toggle {
  background: rgba(248, 250, 252, .95);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .1);
}

[data-theme="light"] .nav-toggle:hover {
  background: rgba(241, 245, 249, .98);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .15);
}

/* Hamburger icon (3 lines) */
.hamburger {
  width: 24px;
  height: 24px;
  position: relative;
}

.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  opacity: .9;
  left: 0;
  transform: rotate(0deg);
  transition: all .25s ease-in-out;
}

.hamburger span:nth-child(1) {
  top: 4px;
}

.hamburger span:nth-child(2) {
  top: 11px;
}

.hamburger span:nth-child(3) {
  top: 18px;
}

/* Hamburger animation when open */
.nav-toggle.is-active .hamburger span:nth-child(1) {
  top: 11px;
  transform: rotate(135deg);
}

.nav-toggle.is-active .hamburger span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.nav-toggle.is-active .hamburger span:nth-child(3) {
  top: 11px;
  transform: rotate(-135deg);
}

/* Mobile dropdown: JS toggles .is-open on nav#mainNav */
@media (max-width:900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1100;
    /* HIGH z-index to ensure clickable */
    pointer-events: auto;
    /* Force pointer events */
  }

  .site-header nav ul {
    display: none;
    position: absolute;
    right: 12px;
    top: calc(100% + 8px);
    background: rgba(12, 16, 22, .98);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-hover);
    border-radius: 12px;
    width: min(85vw, 280px);
    padding: 10px;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
    z-index: 1050;
  }

  [data-theme="light"] .site-header nav ul {
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 10px 40px rgba(15, 23, 42, .15);
  }

  /* Show when .is-open */
  .site-header nav.is-open ul {
    display: flex;
  }

  .site-header nav ul li {
    width: 100%;
  }

  .site-header nav ul a {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    min-height: 44px;
    /* Tap target */
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.4;
  }

  .site-header nav ul a:hover {
    background: rgba(255, 255, 255, .08);
  }

  [data-theme="light"] .site-header nav ul a:hover {
    background: rgba(15, 23, 42, .06);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* ====== HERO ====== */
.page {
  position: relative;
  z-index: 1
}

.hero {
  padding: 80px 0 30px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 20px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.1;
  margin: 0 0 10px;
  font-family: Orbitron, Inter, sans-serif;
  text-shadow: var(--glow);
}

.hero .tag {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero .lead {
  color: var(--muted);
  font-size: 18px
}

/* Avatar 90x130 di SAMPING nama */
.hero-media {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.hero-media img {
  width: 90px;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, .18);
  box-shadow: 0 0 0 2px rgba(0, 255, 255, .14), 0 6px 18px rgba(0, 0, 0, .32);
  cursor: zoom-in;
}

.hero-media h1 {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width:520px) {
  .hero-media img {
    width: 72px;
    height: 104px;
  }
}

/* ====== THEME FAB (dark/light toggle) - FLOATING + COLLAPSIBLE ====== */
.theme-fab-container {
  position: fixed;
  z-index: 900;
  /* Di bawah mobile nav (1000+) tapi di atas konten */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mode default: top-right corner (DESKTOP) */
.theme-fab-container[data-mode="default"] {
  top: 16px;
  right: max(16px, env(safe-area-inset-right) + 12px);
}

/* Mode float: middle-right (MOBILE DEFAULT) */
.theme-fab-container[data-mode="float"] {
  top: 50%;
  right: max(12px, env(safe-area-inset-right) + 10px);
  transform: translateY(-50%);
}

/* Tab kecil untuk show (default hidden) */
.theme-fab-tab {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 18, 24, .96);
  border: 1px solid var(--border-hover);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .theme-fab-tab {
  background: rgba(248, 250, 252, .96);
}

.theme-fab-tab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

.theme-fab-tab.is-visible {
  display: inline-flex;
}

/* Wrapper untuk FAB utama + hide button */
.theme-fab-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-fab-wrapper.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
}

/* FAB utama (theme toggle) */
.theme-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 18, 24, .96);
  border: 1px solid var(--border-hover);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 14px;
}

[data-theme="light"] .theme-fab {
  background: rgba(248, 250, 252, .96);
}

.theme-fab:hover {
  transform: translateX(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
}

.theme-fab .icon {
  font-size: 18px;
  line-height: 1;
}

.theme-fab .label {
  display: inline;
}

/* Hide button (X) */
.theme-fab-hide {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 18, 24, .85);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}

[data-theme="light"] .theme-fab-hide {
  background: rgba(248, 250, 252, .85);
}

.theme-fab-hide:hover {
  background: rgba(15, 18, 24, .95);
  color: var(--text);
  transform: scale(1.05);
}

[data-theme="light"] .theme-fab-hide:hover {
  background: rgba(241, 245, 249, .95);
}

/* Mobile: switch to floating middle-right by default */
@media (max-width:900px) {
  .theme-fab-container[data-mode="default"] {
    top: 50%;
    /* Floating middle-right on mobile */
    right: max(12px, env(safe-area-inset-right) + 10px);
    transform: translateY(-50%);
  }

  .theme-fab {
    padding: 10px;
    /* Icon only, more compact */
  }

  .theme-fab .label {
    display: none;
    /* Hide text label on mobile */
  }

  .theme-fab-tab {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .theme-fab-hide {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
}

.hide-sm {
  display: inline;
}

@media (max-width:640px) {
  .hide-sm {
    display: none;
  }
}


/* ====== TABLE SCROLL WRAPPER (for mobile horizontal scroll) ====== */
.table-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}

.table-scroll-wrap .table {
  min-width: 600px;
  /* Ensure scrollable on narrow screens */
}

/* ====== CARDS / GRID ====== */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

/* List wrapper - better spacing for publications etc */
.list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* Desktop gap */
}

@media (max-width: 640px) {
  .list {
    gap: 12px;
    /* Mobile gap */
  }
}

.grid {
  display: grid;
  gap: 16px
}

.grid.cards {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

@media (max-width:980px) {
  .grid.cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:640px) {
  .grid.cards {
    grid-template-columns: 1fr;
  }
}

.section {
  padding: 30px 0
}

h2 {
  font-family: Orbitron, Inter, sans-serif;
  margin: 0 0 10px;
  font-size: 26px
}

.muted {
  color: var(--muted)
}

.reveal {
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transition: all .6s cubic-bezier(.2, .65, .2, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ====== CONTENT / TABLES ====== */
.post,
.project {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.post .title,
.project .title {
  font-weight: 700;
  color: var(--text);
  text-decoration: none
}

.post .meta {
  color: var(--muted);
  font-size: 12px
}

.content {
  color: var(--text);
  line-height: 1.65;
}

.content img {
  max-width: 100%;
  border-radius: 12px;
}

/* ====== THUMBNAILS ====== */
.thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: #0c1016;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
  display: block;
  margin-bottom: 10px;
  cursor: zoom-in;
}

.thumb--xs {
  width: 72px;
  aspect-ratio: 16/10;
  border-radius: 8px;
  box-shadow: none;
}

/* ====== LIGHTBOX ====== */
img.zoomable,
.thumb,
.content img,
.hero-media img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
  z-index: 10000;
  padding: 20px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}

/* ====== ADMIN ====== */
.admin .nav {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin .nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .08)
}

.admin .nav a.active,
.admin .nav a:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .25)
}

.admin .form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr)
}

/* ===== FORM CONTROLS: Consistent, Accessible, Theme-Aware ===== */
.admin input[type="text"],
.admin input[type="email"],
.admin input[type="password"],
.admin input[type="date"],
.admin input[type="url"],
.admin input[type="number"],
.admin textarea,
.admin select,
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-hover);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

[data-theme="light"] .admin input[type="text"],
[data-theme="light"] .admin input[type="email"],
[data-theme="light"] .admin input[type="password"],
[data-theme="light"] .admin input[type="date"],
[data-theme="light"] .admin input[type="url"],
[data-theme="light"] .admin input[type="number"],
[data-theme="light"] .admin textarea,
[data-theme="light"] .admin select,
[data-theme="light"] .form-control,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="url"],
[data-theme="light"] input[type="number"],
[data-theme="light"] textarea,
[data-theme="light"] select {
  box-shadow: 0 2px 6px rgba(15, 23, 42, .06);
}

.admin input:focus,
.admin textarea:focus,
.admin select:focus,
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow:
    0 0 0 3px rgba(108, 92, 231, .15),
    0 4px 12px rgba(0, 0, 0, .12);
}

[data-theme="light"] .admin input:focus,
[data-theme="light"] .admin textarea:focus,
[data-theme="light"] .admin select:focus,
[data-theme="light"] .form-control:focus,
[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
  box-shadow:
    0 0 0 3px rgba(108, 92, 231, .15),
    0 4px 12px rgba(15, 23, 42, .08);
}

.admin textarea,
textarea {
  min-height: 120px;
  resize: vertical;
}

.admin select,
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e6f1ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

[data-theme="light"] .admin select,
[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230f172a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.admin .actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin .badge {
  font-size: 12px;
  color: var(--muted)
}

/* ====== AVATAR UTIL ====== */
.name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.avatar {
  object-fit: cover;
  display: block;
  background: #0c1016;
  border: 2px solid rgba(255, 255, 255, .18);
  box-shadow: 0 0 0 2px rgba(0, 255, 255, .14), 0 6px 18px rgba(0, 0, 0, .32);
}

.avatar--ring {
  border: 2px solid rgba(255, 255, 255, .18);
  box-shadow: 0 0 0 2px rgba(0, 255, 255, .14), 0 6px 18px rgba(0, 0, 0, .32);
}

.avatar--xs {
  width: var(--avatar-xs);
  height: var(--avatar-xs);
}

.avatar--sm {
  width: var(--avatar-sm);
  height: var(--avatar-sm);
}

.avatar--md {
  width: var(--avatar-md);
  height: var(--avatar-md);
}

.avatar--lg {
  width: var(--avatar-lg);
  height: var(--avatar-lg);
}

.avatar--circle {
  border-radius: 50%;
}

.avatar--square {
  border-radius: 10px;
}

.avatar--rounded {
  border-radius: 12px;
}

.avatar--90x130 {
  width: 90px;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width:520px) {
  .avatar--90x130 {
    width: 72px;
    height: 104px;
  }
}

.site-header .avatar {
  width: var(--avatar-xs);
  height: var(--avatar-xs);
}

.hero .name-row .avatar {
  width: var(--avatar-sm);
  height: var(--avatar-sm);
}

/* ====== FOOTER ====== */
.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

@media (max-width: 640px) {
  .footer-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
}

.tagline {
  color: var(--muted);
  font-size: 14px;
}

.footer-follow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

@media (max-width: 640px) {
  .footer-follow {
    align-items: flex-start;
  }
}

.follow-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.socials {
  display: flex;
  gap: 10px;
  /* Desktop gap */
  align-items: center;
  flex-wrap: wrap;
}

.socials a,
.socials .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  /* Optimal frame */
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.2s ease;
  text-decoration: none;
}

[data-theme="light"] .socials a,
[data-theme="light"] .socials .social-link {
  background: rgba(15, 23, 42, .04);
}

.socials a:hover,
.socials .social-link:hover {
  background: rgba(255, 255, 255, .12);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

[data-theme="light"] .socials a:hover,
[data-theme="light"] .socials .social-link:hover {
  background: rgba(15, 23, 42, .08);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .1);
}

/* Bootstrap Icons SVG */
.socials .bi,
.socials svg.bi {
  width: 18px;
  /* Desktop icon size */
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.socials a:hover .bi,
.socials .social-link:hover .bi {
  transform: scale(1.08);
}

/* Font Awesome fallback */
.socials a i {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.socials a:hover i {
  transform: scale(1.08);
}

/* Mobile: slightly larger icons */
@media (max-width: 640px) {
  .socials {
    gap: 8px;
  }

  .socials a,
  .socials .social-link {
    width: 36px;
    height: 36px;
  }

  .socials .bi,
  .socials svg.bi {
    width: 20px;
    height: 20px;
  }

  .socials a i {
    font-size: 20px;
  }
}

/* ====== KILL OLD EFFECTS (safety) ====== */
#matrix,
#cursor,
#cursor-trail {
  display: none !important;
}

/* ===== BUTTONS: Modern, Accessible, Theme-Aware ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  line-height: 1.4;

  /* Primary button (default) */
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(108, 92, 231, .25),
    0 2px 8px rgba(0, 0, 0, .15),
    inset 0 0 0 1px rgba(255, 255, 255, .1);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 32px rgba(108, 92, 231, .35),
    0 4px 12px rgba(0, 0, 0, .2),
    inset 0 0 0 1px rgba(255, 255, 255, .15);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(108, 92, 231, .25),
    0 2px 6px rgba(0, 0, 0, .15) inset;
}

.btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(108, 92, 231, .4),
    0 10px 24px rgba(108, 92, 231, .25);
}

/* Button variants */
.btn.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border-hover);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, .2),
    inset 0 0 0 1px rgba(255, 255, 255, .05);
}

[data-theme="light"] .btn.secondary {
  box-shadow:
    0 8px 20px rgba(15, 23, 42, .12),
    inset 0 0 0 1px rgba(15, 23, 42, .05);
}

.btn.secondary:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px dashed var(--border-hover);
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, .06);
  border-style: solid;
}

[data-theme="light"] .btn.ghost:hover {
  background: rgba(15, 23, 42, .06);
}

.btn.danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(239, 68, 68, .3),
    0 2px 8px rgba(0, 0, 0, .15);
}

.btn.danger:hover {
  box-shadow:
    0 14px 32px rgba(239, 68, 68, .4),
    0 4px 12px rgba(0, 0, 0, .2);
}

.btn.small {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.btn[disabled],
.btn.is-disabled {
  opacity: .5;
  cursor: not-allowed;
  filter: grayscale(.3);
  pointer-events: none;
}

/* Tombol nav (non-.btn) biar nggak polos) */
.site-header nav a:not(.btn) {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
}

.site-header nav a:not(.btn):hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .18);
}

/* Tombol toggle (hamburger) di mobile - styling tambahan */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(12, 16, 22, .75);
  color: var(--text);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  transition: filter .2s ease, box-shadow .2s ease, transform .16s ease;
}

.nav-toggle:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.nav-toggle:active {
  transform: translateY(0);
}

@media (max-width:900px) {
  .nav-toggle {
    display: inline-flex;
  }
}

/* Aksesibilitas: kurangi animasi bila user minta */
@media (prefers-reduced-motion: reduce) {

  .btn,
  .nav-toggle {
    transition: none !important;
  }
}

/* ===== Admin Tables — tidy, aligned, responsive ===== */
.card {
  overflow-x: auto;
}

.card .table {
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.admin .table th,
.admin .table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.admin .table thead th {
  background: rgba(15, 18, 24, .92);
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  z-index: 1;
}

.admin .table tbody tr:hover {
  background: rgba(255, 255, 255, .03);
}

.admin .table td:nth-last-child(-n+2),
.admin .table th:nth-last-child(-n+2) {
  text-align: right;
  white-space: nowrap;
}

.admin .table td form {
  display: inline;
}

.admin .table td.muted,
.admin .table td .muted {
  white-space: nowrap;
}

.admin .table img.thumb--xs {
  width: 72px;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.admin .table .btn.small {
  padding: 6px 10px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .card .table {
    min-width: 680px;
  }
}

/* ===== Education table ===== */
.card {
  overflow-x: auto;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table th,
.table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, .03);
}

.table td:nth-last-child(-n+2),
.table th:nth-last-child(-n+2) {
  white-space: nowrap;
  text-align: right;
}

.table td form {
  display: inline;
}

.table .btn.small {
  padding: 6px 10px;
  font-size: 13px;
}

.table[data-table="education"] {
  min-width: 780px;
}

.table[data-table="education"] th:nth-child(1),
.table[data-table="education"] td:nth-child(1) {
  width: 42%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table[data-table="education"] th:nth-child(2),
.table[data-table="education"] td:nth-child(2) {
  width: 20%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table[data-table="education"] th:nth-child(3),
.table[data-table="education"] td:nth-child(3) {
  width: 18%;
  white-space: nowrap;
  color: var(--muted);
}

.table[data-table="education"] thead th {
  background: rgba(15, 18, 24, .92);
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(6px);
}

@media (max-width: 640px) {
  .table[data-table="education"] {
    min-width: 720px;
  }
}

.table[data-table="education"] td:nth-child(1) strong {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}