/* ============================================================
   global.css — Design System, Reset, Typography, Theme
   ============================================================ */

/* ── Font Face ─────────────────────────────────────────────── */
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-ExtraBold.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

/* ── CSS Custom Properties (Dark Mode — default) ────────────── */
:root {
  --bg-primary:       #0A0E1A;
  --bg-secondary:     #0F1629;
  --bg-card:          #131929;
  --bg-glass:         rgba(255, 255, 255, 0.04);
  --bg-glass-hover:   rgba(255, 255, 255, 0.08);
  --accent-primary:   #6C63FF;
  --accent-secondary: #FF6584;
  --accent-tertiary:  #43CBFF;
  --accent-glow:      rgba(108, 99, 255, 0.35);
  --accent-glow-sm:   rgba(108, 99, 255, 0.12);
  --text-primary:     #EAEAEA;
  --text-secondary:   #C4CDD8;
  --text-muted:       #8892A4;
  --text-inverse:     #0A0E1A;
  --border-color:     rgba(108, 99, 255, 0.2);
  --border-glass:     rgba(255, 255, 255, 0.08);
  --gradient-primary: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
  --gradient-accent:  linear-gradient(135deg, #43CBFF 0%, #6C63FF 100%);
  --gradient-hero:    radial-gradient(ellipse at 60% 40%, rgba(108,99,255,0.18) 0%, transparent 60%),
                      radial-gradient(ellipse at 20% 80%, rgba(255,101,132,0.12) 0%, transparent 50%);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:    0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:    0 16px 64px rgba(0,0,0,0.5);
  --shadow-glow:  0 0 24px rgba(108,99,255,0.4);
  --shadow-card:  0 4px 24px rgba(0,0,0,0.35);
  --navbar-height: 70px;
  --section-gap:   100px;
  --container-max: 1200px;
  --container-pad: clamp(1rem, 5vw, 3rem);
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-xl:   32px;
  --radius-full: 9999px;
  --transition-fast:   0.15s ease;
  --transition-base:   0.3s ease;
  --transition-slow:   0.5s ease;
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --z-base:    1;
  --z-card:    10;
  --z-overlay: 100;
  --z-navbar:  900;
  --z-cursor:  9999;
}

/* ── Light Mode ─────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-primary:     #F5F7FF;
  --bg-secondary:   #EDEEF7;
  --bg-card:        #FFFFFF;
  --bg-glass:       rgba(108,99,255,0.04);
  --bg-glass-hover: rgba(108,99,255,0.08);
  --text-primary:   #1A1A2E;
  --text-secondary: #3D3D5C;
  --text-muted:     #6B7280;
  --border-color:   rgba(108,99,255,0.2);
  --border-glass:   rgba(108,99,255,0.12);
  --shadow-sm:   0 2px 8px rgba(108,99,255,0.08);
  --shadow-md:   0 8px 32px rgba(108,99,255,0.12);
  --shadow-lg:   0 16px 64px rgba(108,99,255,0.15);
  --shadow-card: 0 4px 24px rgba(108,99,255,0.1);
  --shadow-glow: 0 0 24px rgba(108,99,255,0.25);
  --accent-glow:    rgba(108,99,255,0.2);
  --accent-glow-sm: rgba(108,99,255,0.08);
  --gradient-hero: radial-gradient(ellipse at 60% 40%, rgba(108,99,255,0.1) 0%, transparent 60%),
                   radial-gradient(ellipse at 20% 80%, rgba(255,101,132,0.08) 0%, transparent 50%);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 25px;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}
section { scroll-margin-top: 25px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400; line-height: 1.7;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--transition-slow), color var(--transition-base);
  touch-action: manipulation;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; outline: none; border: none; background: none; }
button { cursor: pointer; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; color: var(--text-primary); }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }
p  { color: var(--text-secondary); }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.section { padding-block: var(--section-gap); position: relative; }
.section-alt { background-color: var(--bg-secondary); }
.section-header { text-align: center; margin-bottom: 64px; }

.section-tag {
  display: inline-block;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent-primary);
  background: var(--accent-glow-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 16px; margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 16px;
}
.section-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 560px; margin-inline: auto; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-full);
  font-weight: 600; font-size: 0.95rem;
  transition: all var(--transition-base); cursor: pointer; white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-primary); color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  border: 1.5px solid var(--border-color); color: var(--text-primary);
  background: var(--bg-glass); backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: var(--bg-glass-hover); border-color: var(--accent-primary);
  color: var(--accent-primary); transform: translateY(-2px);
}
.btn-icon {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-glass); border: 1px solid var(--border-glass);
  transition: all var(--transition-base);
}
.btn-icon:hover {
  background: var(--accent-glow-sm); border-color: var(--accent-primary);
  color: var(--accent-primary); transform: scale(1.1);
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-glass); backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass); border-radius: var(--radius-lg);
  padding: 28px; transition: all var(--transition-base);
}
.card:hover {
  background: var(--bg-glass-hover); border-color: var(--border-color);
  box-shadow: var(--shadow-card); transform: translateY(-4px);
}

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
  background: var(--accent-glow-sm); color: var(--accent-primary);
  border: 1px solid var(--border-color);
}

/* ── Gradient Text ──────────────────────────────────────────── */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 3px; }
::selection { background: var(--accent-primary); color: #fff; }

/* ── Scroll to Top ──────────────────────────────────────────── */
#scroll-to-top {
  position: fixed; bottom: 96px; right: 34px;
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--gradient-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px var(--accent-glow);
  opacity: 0; transform: translateY(16px);
  transition: all var(--transition-base);
  z-index: var(--z-overlay); pointer-events: none;
}
#scroll-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
#scroll-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px var(--accent-glow); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --section-gap: 70px; }
  .section-header { margin-bottom: 44px; }
}
@media (max-width: 480px) { :root { --section-gap: 50px; } }

/* ── Page Loader ────────────────────────────────────────────── */
#page-loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; gap: 20px;
  font-size: 0.9rem; color: var(--text-muted);
}
.loader-ring {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--border-glass);
  border-top-color: var(--accent-primary);
  animation: spin-loader 0.8s linear infinite;
}
@keyframes spin-loader { to { transform: rotate(360deg); } }

/* Ensure critical sections are never hidden by animation delays */
#certifications, #contact {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ── Access Mode Indicator Bar (Fixed at the very top, above #navbar) ── */
:root {
  --access-bar-height: 0px;
}

.portfolio-access-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 10001; /* Stays on top of #navbar (z-index 1000) */
  font-size: 0.8rem;
  padding: 6px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.has-access-bar #navbar {
  top: var(--access-bar-height, 38px);
}

body.has-access-bar #hero {
  padding-top: calc(var(--navbar-height) + var(--access-bar-height, 38px));
}

@media (max-width: 900px) {
  body.has-access-bar .nav-links {
    top: calc(var(--navbar-height) + var(--access-bar-height, 38px)) !important;
    max-height: calc(100vh - var(--navbar-height) - var(--access-bar-height, 38px)) !important;
  }
}

.portfolio-access-bar.global {
  background: rgba(15, 23, 42, 0.96);
  border-bottom-color: rgba(0, 210, 255, 0.3);
  color: #94a3b8;
}
.portfolio-access-bar.privileged {
  background: rgba(6, 78, 59, 0.96);
  border-bottom-color: rgba(16, 185, 129, 0.5);
  color: #a7f3d0;
}

.access-bar-inner {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-width: 0;
}

.access-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.access-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
  white-space: nowrap;
  flex-shrink: 0;
}

.access-badge.global {
  background: rgba(0, 210, 255, 0.15);
  color: #38bdf8;
  border-color: rgba(0, 210, 255, 0.35);
}

.access-meta {
  font-size: 0.8rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-btn-request, .access-btn-clear {
  background: linear-gradient(135deg, #00d2ff, #0055ff);
  color: #fff;
  border: none;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.access-btn-request:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0, 210, 255, 0.4);
}
.access-btn-clear {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.access-btn-clear:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}

@media (max-width: 1024px) {
  .access-meta {
    max-width: 480px;
  }
}

@media (max-width: 820px) {
  .access-meta {
    display: none; /* Hide verbose subtitle on mobile and small tablet */
  }
  .portfolio-access-bar {
    padding: 6px 12px;
  }
  .access-bar-inner {
    gap: 8px;
  }
  .access-btn-request, .access-btn-clear {
    padding: 4px 10px;
    font-size: 0.72rem;
  }
}

@media (max-width: 400px) {
  .access-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
  .access-btn-request, .access-btn-clear {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
}

/* ── Request Access Modal ────────────────────────────────────── */

.request-access-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.request-access-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
.request-access-card {
  background: #0b1329;
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 210, 255, 0.15);
  width: 100%;
  max-width: 540px;
  padding: 28px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}
.request-access-backdrop.active .request-access-card {
  transform: translateY(0);
}
.request-access-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.request-access-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.request-access-close:hover { color: #fff; }
.form-group-access {
  margin-bottom: 16px;
}
.form-group-access label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.access-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.access-input:focus {
  border-color: #00d2ff;
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
}
.access-btn-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  font-weight: 600;
}
.access-btn-cancel:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.access-btn-submit {
  background: linear-gradient(135deg, #00d2ff, #0055ff);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.3);
}
.access-btn-submit:hover { opacity: 0.95; transform: translateY(-1px); }


/* ═══════════════════════════════════════════════════════
   AI CHAT WIDGET — Floating Assistant
   ═══════════════════════════════════════════════════════ */

/* FAB Button */
#ai-chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9990;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #00d2ff 100%);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: ai-fab-pulse 3s ease-in-out infinite;
}
#ai-chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.7);
}
#ai-chat-fab.active {
  animation: none;
  transform: scale(0.95);
}
.ai-fab-sparkle {
  font-size: 1.3rem;
  line-height: 1;
}
.ai-fab-label {
  font-size: 0.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
}
@keyframes ai-fab-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5); }
  50% { box-shadow: 0 4px 30px rgba(168, 85, 247, 0.8), 0 0 0 8px rgba(99, 102, 241, 0.08); }
}

/* Chat Panel */
#ai-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 9991;
  width: 360px;
  max-height: 560px;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: rgba(10, 12, 22, 0.92);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: ai-panel-slide-up 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ai-panel-slide-up {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chat Header */
#ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.2) 0%, rgba(168,85,247,0.15) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.ai-close-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.ai-close-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* Messages Area */
#ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  max-height: 380px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99,102,241,0.3) transparent;
}
#ai-chat-messages::-webkit-scrollbar { width: 4px; }
#ai-chat-messages::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.4); border-radius: 4px; }

/* Bubble Rows */
.ai-bubble-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ai-bubble-row.user { align-items: flex-end; }
.ai-bubble-row.ai { align-items: flex-start; }

/* Bubbles */
.ai-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.6;
  word-break: break-word;
}
.ai-bubble.user {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-bubble.ai {
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom-left-radius: 4px;
}
.ai-bubble.ai p { margin: 0 0 6px 0; }
.ai-bubble.ai p:last-child { margin-bottom: 0; }
.ai-bubble.ai code {
  background: rgba(99,102,241,0.2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #a5b4fc;
}
.ai-bubble.ai pre {
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 8px 10px;
  overflow-x: auto;
  margin: 6px 0;
  font-size: 0.78rem;
}
.ai-bubble.ai pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}
.ai-bubble.ai strong { color: #fff; }
.ai-bubble.ai em { color: #c4b5fd; }

/* Lists */
.ai-bubble.ai ul,
.ai-bubble.ai ol {
  margin: 4px 0 4px 16px;
  padding: 0;
}
.ai-bubble.ai li { margin: 3px 0; line-height: 1.5; }
.ai-bubble.ai li > ul,
.ai-bubble.ai li > ol { margin: 2px 0 2px 14px; }

/* Blockquote — compact dengan border kiri berwarna */
.ai-bubble.ai blockquote {
  margin: 6px 0;
  padding: 6px 10px;
  border-left: 3px solid rgba(99,102,241,0.6);
  background: rgba(99,102,241,0.08);
  border-radius: 0 6px 6px 0;
  color: #a5b4fc;
  font-size: 0.82rem;
}
.ai-bubble.ai blockquote p { margin: 0; }

/* Heading disederhanakan */
.ai-bubble.ai h1,
.ai-bubble.ai h2,
.ai-bubble.ai h3,
.ai-bubble.ai h4,
.ai-bubble.ai h5,
.ai-bubble.ai h6 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #c4b5fd;
  margin: 8px 0 4px 0;
  line-height: 1.4;
}

/* HR dihilangkan */
.ai-bubble.ai hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 6px 0;
}

/* Tabel fallback (jika masih ada) */
.ai-bubble.ai table {
  width: 100%;
  font-size: 0.78rem;
  border-collapse: collapse;
  margin: 6px 0;
  overflow-x: auto;
  display: block;
}
.ai-bubble.ai th,
.ai-bubble.ai td {
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}
.ai-bubble.ai th {
  background: rgba(99,102,241,0.15);
  color: #c4b5fd;
  font-weight: 600;
}

/* Typing Dots */
.ai-bubble.ai-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
  min-width: 60px;
}
.ai-bubble.ai-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6366f1;
  display: inline-block;
  animation: ai-dot-bounce 1.2s ease-in-out infinite;
}
.ai-bubble.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-bubble.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Meta Bar */
.ai-meta-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px;
  font-size: 0.68rem;
  color: #475569;
}

/* Input Row */
#ai-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
#ai-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 9px 13px;
  color: #fff;
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
#ai-chat-input::placeholder { color: #475569; }
#ai-chat-input:focus { border-color: rgba(99,102,241,0.5); }
#ai-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
#ai-chat-send:hover { transform: scale(1.05); box-shadow: 0 3px 12px rgba(99,102,241,0.5); }
#ai-chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Mobile responsive */
@media (max-width: 480px) {
  #ai-chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 90px;
  }
  #ai-chat-fab {
    right: 16px;
    bottom: 20px;
  }
  #scroll-to-top {
    right: 22px;
    bottom: 86px;
  }
}

/* ── Gated Read More / Truncate Description Buttons ─────────── */
.desc-read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: #00d2ff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  margin-top: 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.desc-read-more-btn:hover {
  background: rgba(0, 210, 255, 0.1);
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

.desc-read-more-btn.is-locked {
  color: #94a3b8;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.05);
  padding: 3px 8px;
  border-radius: 6px;
}

.desc-read-more-btn.is-locked:hover {
  border-color: rgba(0, 210, 255, 0.6);
  color: #00d2ff;
  background: rgba(0, 210, 255, 0.1);
}

.desc-read-more-btn.is-vip {
  color: #38bdf8;
  border: 1px solid rgba(0, 210, 255, 0.35);
  background: rgba(0, 210, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
}

.desc-read-more-btn.is-vip:hover {
  border-color: rgba(0, 210, 255, 0.7);
  background: rgba(0, 210, 255, 0.16);
  color: #00d2ff;
}

/* ═══════════════════════════════════════════════════════
   PRINT SANITIZATION — Hide access bar & floating AI
   ═══════════════════════════════════════════════════════ */
@media print {
  .portfolio-access-bar,
  #portfolio-access-bar,
  #ai-chat-fab,
  #ai-chat-panel,
  #ai-typing-indicator,
  .contact-token-badge {
    display: none !important;
    visibility: hidden !important;
  }
}


