/* FASE 02: FOUNDATION CSS - Rizky Afriza Rosal Fino Portfolio */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --gold-light: #f7e7a0;
    --gold-primary: #c9a962;
    --gold-dark: #8b6914;
    --white: #ffffff;
    --text-primary: rgba(255,255,255,0.9);
    --text-secondary: rgba(255,255,255,0.7);
    --text-muted: rgba(255,255,255,0.5);
    --text-dim: rgba(255,255,255,0.3);
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Chat widget motion & sizing tokens */
    --chat-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --chat-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
    --chat-ease-spring: cubic-bezier(0.34, 1.5, 0.64, 1);
    --chat-radius: 20px;
    --chat-radius-sm: 12px;
    --chat-bg: #14141f;
    --chat-surface: rgba(255,255,255,0.05);
    --chat-border: rgba(201,169,98,0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    position: relative;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(10, 10, 15, 0.5); }
::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, var(--gold-dark), var(--gold-primary)); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(to bottom, var(--gold-primary), var(--gold-light)); }
::selection { background: rgba(201,169,98,0.3); }

.gold-text {
    background: linear-gradient(135deg, #f7e7a0 0%, #c9a962 25%, #8b6914 50%, #c9a962 75%, #f7e7a0 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShimmer 4s ease-in-out infinite;
}
@keyframes goldShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.glass-card {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(201,169,98,0.15);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}

.luxury-border { position: relative; }
.luxury-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(201,169,98,0.5), transparent, rgba(201,169,98,0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,169,98,0.5), transparent);
    margin: 4rem 0;
    border: none;
}

.reveal, .reveal-left, .reveal-right {
    opacity: 0;
    transition: all 0.8s var(--transition-smooth);
}
.reveal { transform: translateY(30px); }
.reveal-left { transform: translateX(-30px); }
.reveal-right { transform: translateX(30px); }
.reveal.active, .reveal-left.active, .reveal-right.active {
    opacity: 1;
    transform: translate(0, 0);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.section { padding: 4rem 0; position: relative; }
.section-label { font-size: 0.75rem; text-transform: uppercase; margin-bottom: 0.5rem; color: var(--text-muted); letter-spacing: 0.1em; }
.section-title { font-size: 2rem; margin-bottom: 1.5rem; }
.section-description { font-family: var(--font-body); font-weight: 300; color: var(--text-secondary); max-width: 40rem; margin: 0 auto 2.5rem; text-align: center; }
.section-header { text-align: center; }
.section-divider-top { margin: 0 0 2.5rem; }

/* ======================================== */
/* FASE 03: BACKGROUND EFFECTS */
/* ======================================== */

#particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.particle { position: absolute; width: 2px; height: 2px; background: rgba(201,169,98,0.4); border-radius: 50%; animation: particleFloat linear infinite; }
@keyframes particleFloat {
    0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

#cursorGlow {
    position: fixed; top: 0; left: 0; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(201,169,98,0.08) 0%, transparent 70%);
    filter: blur(40px); pointer-events: none; z-index: 9999;
    opacity: 0; transition: opacity 0.3s ease; transform: translate(-50%, -50%);
}
#cursorGlow.active { opacity: 1; }

.loader-letter-wrapper { display: flex; gap: 0.5rem; }

#loadingScreen {
    position: fixed; inset: 0; z-index: 99999;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.8s ease;
}
#loadingScreen.hidden { opacity: 0; pointer-events: none; }

.loader-letter { font-family: var(--font-display); font-size: 4rem; display: inline-block; animation: letterBounce 1.5s ease infinite, goldShimmer 3s ease-in-out infinite; }
.loader-letter:nth-child(1) { animation-delay: 0s; }
.loader-letter:nth-child(2) { animation-delay: 0.1s; }
.loader-letter:nth-child(3) { animation-delay: 0.2s; }
@keyframes letterBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.loader-progress-track { width: 200px; height: 3px; background: rgba(255,255,255,0.1); margin-top: 2rem; border-radius: 3px; overflow: hidden; }
.loader-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary), var(--gold-light)); animation: loadProgress 2s ease forwards; }
@keyframes loadProgress { from { width: 0%; } to { width: 100%; } }

.loader-text { font-family: var(--font-body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255,255,255,0.5); margin-top: 1.5rem; }

.loader-particle-rise { position: absolute; width: 4px; height: 4px; background: var(--gold-primary); border-radius: 50%; bottom: 0; left: var(--x); animation: particleRise var(--duration) ease-out var(--delay) infinite; }
@keyframes particleRise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(-100vh); opacity: 0; } }

/* ======================================== */
/* FASE 04: NAVBAR + HERO SECTION */
/* ======================================== */

.navbar {
    position: fixed; top: 1rem; left: 50%;
    transform: translate(-50%, -100%); opacity: 0; z-index: 1000;
    width: 90%; max-width: 1400px;
    transition: transform 0.7s var(--transition-smooth), opacity 0.7s var(--transition-smooth), background 0.3s ease;
}
.navbar.loaded { transform: translate(-50%, 0); opacity: 1; }
.navbar-inner { border-radius: 50px; display: flex; align-items: center; justify-content: space-between; padding: 1rem 2rem; transition: background 0.3s ease; }
.navbar.scrolled .navbar-inner { background: rgba(10,10,15,0.9); }
.navbar-brand { font-size: 1.5rem; font-weight: 600; letter-spacing: 0.1em; }
.nav-links { display: none; gap: 2rem; }
.nav-links a { font-family: var(--font-body); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-secondary); text-decoration: none; position: relative; transition: color 0.3s ease; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: linear-gradient(90deg, var(--gold-primary), transparent); transition: width 0.3s ease; }
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }
.navbar-cta { display: none; }
.hamburger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 24px; height: 2px; background: var(--gold-primary); }
.mobile-menu-overlay { position: fixed; inset: 0; background: rgba(10,10,15,0.98); backdrop-filter: blur(20px); z-index: 1001; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; }
.mobile-menu-overlay.active { display: flex; }
.mobile-menu-overlay a { font-size: 1.5rem; color: var(--text-primary); text-decoration: none; }
@media (min-width: 768px) {
    .nav-links { display: flex; }
    .navbar-cta { display: inline-flex; }
    .hamburger { display: none; }
}

#hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8rem 1.5rem 4rem; position: relative; overflow: hidden; }
.hero-container { display: grid; grid-template-columns: 1fr; gap: 4rem; max-width: 1400px; margin: 0 auto; width: 100%; position: relative; z-index: 1; }
@media (min-width: 1024px) { .hero-container { grid-template-columns: 1fr 1fr; align-items: center; } }

.hero-content { opacity: 0; transform: translateX(-20px); transition: all 1s var(--transition-smooth); }
.hero-content.animate-in { opacity: 1; transform: translateX(0); }
.hero-label { font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--gold-primary); margin-bottom: 1rem; }
.hero-title { font-size: clamp(3rem, 8vw, 6rem); }
.cursor-blink { animation: cursorBlink 0.8s steps(1) infinite; }
@keyframes cursorBlink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
/* Setelah nama selesai diketik: kedip persis 3x lalu hilang permanen (sampai halaman di-refresh) */
.cursor-blink.cursor-finish { animation: cursorBlink 0.5s steps(1) 3; }
.cursor-blink.cursor-done { opacity: 0; animation: none; }
.hero-description { font-family: var(--font-body); font-size: 1.125rem; font-weight: 300; max-width: 28rem; margin: 2rem 0; line-height: 1.8; color: var(--text-secondary); text-align: justify; text-justify: inter-word; }
.hero-description strong { color: var(--text-primary); font-weight: 500; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }
.btn { padding: 0.9rem 2rem; border-radius: 50px; font-family: var(--font-body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; transition: all 0.4s var(--transition-bounce); cursor: pointer; }
.btn-email { text-transform: none; letter-spacing: 0.02em; }
.btn-primary { background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary), var(--gold-light)); color: #0a0a0f; border: none; }
.btn-outline { background: transparent; border: 1px solid rgba(201,169,98,0.4); color: var(--text-primary); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(201,169,98,0.3); }
.btn-sm { padding: 0.55rem 1.25rem; font-size: 0.7rem; }
.btn-lg { padding: 1rem 2rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

.hero-stats { display: flex; gap: 3rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero-stat-number { font-size: 1.75rem; font-weight: 600; }
.hero-stat-label { font-family: var(--font-body); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }

.hero-image-wrap { opacity: 0; transform: translateX(20px); transition: all 1s var(--transition-smooth) 0.5s; position: relative; display: flex; align-items: center; justify-content: center; }
.hero-image-wrap.animate-in { opacity: 1; transform: translateX(0); }
.hero-photo-frame {
    width: 18rem; height: 18rem;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    animation: floating 6s ease-in-out infinite;
}
@media (min-width: 768px) { .hero-photo-frame { width: 24rem; height: 24rem; } }
/* Bingkai utama: cincin solid tipis + satu ambient glow lembut (satu-satunya "glow"
   di area ini, sesuai batas 1-2 elemen supaya tidak berlebihan) + drop shadow untuk depth. */
.hero-photo-frame::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid var(--gold-primary);
    box-shadow:
        0 0 0 1px rgba(201,169,98,0.15) inset,
        0 0 55px 8px rgba(201,169,98,0.16),
        0 25px 60px -15px rgba(0,0,0,0.55);
    z-index: 0;
    pointer-events: none;
}
/* Foto lingkaran penuh, pas mengisi cincinnya (tidak menembus keluar lagi).
   draggable="false" (di HTML) + rules di bawah ini mencegah foto bisa di-drag
   keluar dari frame-nya saat diklik-tahan, atau muncul menu "simpan gambar"
   saat ditekan-tahan di HP. */
.hero-photo {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 1;
    -webkit-user-drag: none;
    user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}
.hero-photo-gradient {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: linear-gradient(to bottom right, rgba(139,105,20,0.35), transparent 60%);
    pointer-events: none;
    z-index: 2;
}
@keyframes floating { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(2deg); } }
/* Cincin teks berputar: identitas/skill jadi elemen dekoratif sekaligus informatif
   di sekeliling foto. viewBox 200x200 di-scale otomatis oleh SVG mengikuti ukuran
   kotak pembungkusnya, jadi teks & jarak antar-karakter ikut proporsional baik di
   mobile (frame 18rem) maupun desktop (frame 24rem) — tidak perlu diatur ulang manual. */
.hero-text-ring {
    position: absolute;
    inset: -2.25rem;
    width: calc(100% + 4.5rem);
    height: calc(100% + 4.5rem);
    z-index: 0;
    animation: rotateRing 24s linear infinite;
    overflow: visible;
}
@media (min-width: 768px) {
    .hero-text-ring { inset: -3rem; width: calc(100% + 6rem); height: calc(100% + 6rem); }
}
.hero-text-ring-label {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 2.5px;
    fill: var(--gold-primary);
}
@keyframes rotateRing { to { transform: rotate(360deg); } }
.hero-badge { position: absolute; padding: 0.5rem 1rem; border-radius: 50px; font-size: 0.7rem; white-space: nowrap; animation: floating 6s ease-in-out infinite; background: rgba(255,255,255,0.05); border: 1px solid rgba(201,169,98,0.2); backdrop-filter: blur(10px); z-index: 3; font-family: var(--font-body); }
/* Offset dikecilkan supaya badge tidak terdorong keluar viewport di lebar layar laptop umum (~1280-1440px) — sebelumnya -15% membuatnya kepotong di edge browser. */
.hero-badge.b1 { top: 10%; left: -2%; animation-delay: 1s; }
.hero-badge.b2 { bottom: 20%; right: -2%; animation-delay: 2s; }
.hero-badge.b3 { bottom: -5%; left: 6%; animation-delay: 1.5s; }
@media (min-width: 1024px) and (max-width: 1360px) {
    /* Kolom hero paling sempit di rentang ini (grid 2 kolom sudah aktif, container belum selebar max-width) */
    .hero-badge.b1 { left: 0%; }
    .hero-badge.b2 { right: 0%; }
}

.scroll-indicator { position: relative; margin-top: 3rem; text-align: center; animation: bounce 2s infinite; z-index: 1; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
.scroll-indicator span { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); display: block; margin-bottom: 0.25rem; }

/* ======================================== */
/* FASE 06: ABOUT SECTION */
/* ======================================== */

.about-container { display: grid; grid-template-columns: 1fr; gap: 3rem; margin-top: 2rem; }
@media (min-width: 1024px) { .about-container { grid-template-columns: 1.2fr 1fr; } }

.about-description { font-family: var(--font-body); font-weight: 300; color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.8; text-align: justify; text-justify: inter-word; }

.about-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 2rem 0; }
.about-info-label { font-family: var(--font-body); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.25rem; }
.about-info-value { font-size: 1.05rem; }
.about-info-value a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(201,169,98,0.35); transition: color 0.25s ease, border-color 0.25s ease; }
.about-info-value a:hover { color: var(--gold-light); border-color: var(--gold-light); }

.about-stats { display: flex; gap: 2.5rem; margin-top: 1.5rem; flex-wrap: wrap; }
.stat-number { font-size: 1.75rem; font-weight: 600; }
.stat-label { font-family: var(--font-body); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }

.skills-card { padding: 2rem; border-radius: 16px; }
.skills-title { font-size: 1.5rem; margin-bottom: 1.5rem; }
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 420px) { .skills-grid { grid-template-columns: repeat(3, 1fr); } }
.skill-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(201,169,98,0.15);
    border-radius: 12px;
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.skill-card:hover { border-color: rgba(201,169,98,0.5); transform: translateY(-4px); }
.skill-card:hover .skill-card-icon { background: rgba(201,169,98,0.16); }
.skill-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.9);
    transition: background 0.3s ease;
}
.skill-card-icon img { width: 24px; height: 24px; object-fit: contain; }
.skill-card-label { font-family: var(--font-body); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }

/* ======================================== */
/* FASE 06: TOOLS SECTION */
/* ======================================== */

.tools-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .tools-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .tools-grid { grid-template-columns: repeat(5, 1fr); } }
.ai-card { padding: 1.75rem; border-radius: 14px; text-align: center; opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--transition-smooth), transform 0.6s var(--transition-smooth), border-color 0.3s ease; }
.ai-card.active { opacity: 1; transform: translateY(0); }
.ai-card:hover { transform: translateY(-6px); border-color: rgba(201,169,98,0.4); }
.ai-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.9);
}
.ai-card-icon img { width: 28px; height: 28px; object-fit: contain; }
.ai-card-title { font-size: 1.1rem; margin-bottom: 0.4rem; }
.ai-card-description { font-family: var(--font-body); font-size: 0.8rem; color: var(--text-muted); }

/* ======================================== */
/* FASE 06: TIMELINE (EXPERIENCE) — zigzag kiri/kanan di desktop */
/* ======================================== */

.timeline { position: relative; max-width: 48rem; margin: 2rem auto 0; padding-left: 2rem; border-left: 1px solid rgba(201,169,98,0.25); }
.timeline-item { position: relative; margin-bottom: 2.5rem; opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--transition-smooth), transform 0.6s var(--transition-smooth); }
.timeline-item.active { opacity: 1; transform: translateY(0); }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -2.44rem; top: 0.4rem; width: 12px; height: 12px; border-radius: 50%; background: var(--gold-primary); box-shadow: 0 0 0 4px rgba(201,169,98,0.15); }
.timeline-card { padding: 1.5rem; border-radius: 14px; }
.timeline-period { font-family: var(--font-body); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.timeline-role { font-size: 1.25rem; margin-bottom: 0.25rem; }
.timeline-company { font-family: var(--font-body); font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.timeline-location { font-family: var(--font-body); font-size: 0.75rem; color: var(--text-muted); margin-bottom: 1rem; }
.timeline-tasks { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.timeline-tasks li { font-family: var(--font-body); font-size: 0.85rem; color: var(--text-secondary); padding-left: 1rem; position: relative; text-align: justify; text-justify: inter-word; }
.timeline-tasks li::before { content: '•'; position: absolute; left: 0; color: var(--gold-primary); font-size: 1.1em; line-height: 1; }
.timeline-achievement, .timeline-impact { font-family: var(--font-body); font-size: 0.8rem; color: var(--gold-primary); padding-top: 0.75rem; border-top: 1px solid rgba(201,169,98,0.15); text-align: justify; text-justify: inter-word; }

@media (min-width: 900px) {
    .timeline {
        max-width: 62rem;
        border-left: none;
        padding-left: 0;
    }
    .timeline::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 1px;
        background: linear-gradient(to bottom, transparent, rgba(201,169,98,0.35), transparent);
        transform: translateX(-50%);
    }
    .timeline-item {
        width: 50%;
        margin-bottom: 3rem;
    }
    .timeline-item:nth-child(odd) {
        left: 0;
        padding-right: 3rem;
    }
    .timeline-item:nth-child(even) {
        left: 50%;
        padding-left: 3rem;
    }
    .timeline-dot { left: auto; top: 0.4rem; }
    .timeline-item:nth-child(odd) .timeline-dot { right: -6px; }
    .timeline-item:nth-child(even) .timeline-dot { left: -6px; }
    .timeline-card { max-width: 26rem; }
    .timeline-item:nth-child(odd) .timeline-card { margin-left: auto; }
}

/* ======================================== */
/* FASE 06: PROJECTS */
/* ======================================== */

.projects-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 2rem; }
@media (min-width: 768px) { .projects-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }
.project-card { border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--transition-smooth), transform 0.6s var(--transition-smooth); }
.project-card.active { opacity: 1; transform: translateY(0); }
.project-card:hover { transform: translateY(-6px); }
.project-image-area { position: relative; height: 190px; background: linear-gradient(135deg, rgba(201,169,98,0.15), rgba(201,169,98,0.02)); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.project-number { font-family: var(--font-display); font-size: 3rem; color: rgba(201,169,98,0.3); }
.project-image-overlay {
    position: absolute; inset: 0; background: rgba(10,10,15,0.75);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.project-image-overlay::after { content: '🔍 View Project'; font-family: var(--font-body); font-size: 0.8rem; color: var(--gold-light); text-transform: uppercase; letter-spacing: 0.1em; }
.project-card:hover .project-image-overlay { opacity: 1; }
.project-image-area[data-preview-image], .project-image-area[data-preview-text] { cursor: pointer; }
.project-image-area[data-preview-image]:focus-visible, .project-image-area[data-preview-text]:focus-visible { outline: 2px solid var(--gold-primary); outline-offset: -2px; }
.project-info { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.project-category { font-family: var(--font-body); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-primary); }
.project-year { font-family: var(--font-body); font-size: 0.7rem; color: var(--text-dim); }
.project-title { font-size: 1.25rem; margin: 0.25rem 0; }
.project-desc { font-family: var(--font-body); font-size: 0.85rem; color: var(--text-secondary); flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.project-tag { font-family: var(--font-mono); font-size: 0.65rem; padding: 0.3rem 0.6rem; border-radius: 6px; background: rgba(201,169,98,0.08); color: var(--gold-primary); }
.project-links { display: flex; gap: 0.75rem; margin-top: 0.5rem; }

/* ======================================== */
/* FASE 05: CERTIFICATES GRID + MODAL */
/* ======================================== */

.certificates-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1rem; }
@media (min-width: 640px) { .certificates-grid { grid-template-columns: 1fr 1fr; } }

.cert-card {
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    padding: 1.75rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.6s var(--transition-smooth), border-color 0.3s ease;
}
.cert-card.active { opacity: 1; transform: translateY(0); }
.cert-card:hover { transform: translateY(-6px); }

.cert-header { display: flex; justify-content: flex-start; margin-bottom: 1.1rem; }
.certificate-logo {
    height: 44px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
}
@media (max-width: 767px) {
    .certificate-logo { height: 39px; max-width: 105px; }
}

.cert-info { flex: 1; }
.cert-meta { display: flex; align-items: center; margin-bottom: 0.5rem; }
.cert-issuer { font-family: var(--font-body); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold-primary); }
.cert-year { font-family: var(--font-body); font-size: 0.7rem; color: var(--text-dim); }
.cert-year::before { content: '\00B7'; margin: 0 0.5rem; color: var(--text-dim); }
.cert-title { font-size: 1.15rem; margin: 0 0 0.5rem; }
.cert-desc { font-family: var(--font-body); font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.9rem; line-height: 1.6; }
.cert-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cert-tag { font-family: var(--font-mono); font-size: 0.65rem; padding: 0.3rem 0.6rem; border-radius: 6px; background: rgba(201,169,98,0.08); color: var(--gold-primary); }

.cert-divider { height: 1px; background: rgba(201,169,98,0.15); margin: 1.25rem 0 1rem; border: none; }
.cert-view-btn {
    align-self: flex-start;
    background: transparent;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.25s ease, color 0.25s ease;
}
.cert-view-btn:hover { color: var(--gold-light); gap: 0.65rem; }

.cert-modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(10,10,15,0.92); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1.5rem;
}
.cert-modal-overlay.active { opacity: 1; pointer-events: auto; }
.cert-modal {
    background: var(--bg-secondary);
    border: 1px solid rgba(201,169,98,0.3);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 720px; width: 100%; max-height: 85vh;
    display: flex; flex-direction: column; gap: 1rem;
    position: relative;
}
.cert-modal-close {
    position: absolute; top: 0.75rem; right: 0.75rem;
    background: transparent; border: none; color: var(--text-secondary);
    font-size: 1.75rem; line-height: 1; cursor: pointer;
    z-index: 2;
}
.cert-modal-close:hover { color: var(--gold-primary); }
.cert-modal-viewer {
    flex: 1;
    overflow-y: auto;
    border-radius: 8px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}
.cert-modal-image { border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); display: block; max-width: 100%; height: auto; }
.cert-modal-loading { font-family: var(--font-body); font-size: 0.85rem; color: var(--text-muted); padding: 3rem 0; }

/* ======================================== */
/* FASE 05: CONTACT SECTION */
/* ======================================== */

.contact-header { text-align: center; max-width: 40rem; margin: 0 auto 2.5rem; padding-top: 280px; }
.contact-title { font-size: 2.5rem; margin-bottom: 1rem; }
.contact-description { font-family: var(--font-body); color: var(--text-secondary); font-weight: 300; }

.contact-single { max-width: 42rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.75rem; }
.contact-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-family: var(--font-body); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-input, .form-textarea {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(201,169,98,0.2);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--gold-primary); }
.form-textarea { resize: vertical; min-height: 120px; }
.input-error { border-color: #ef4444 !important; }

/* ======================================== */
/* FASE 07: LANYARD (kartu DOM + tali SVG melengkung, digerakkan via drag JS) */
/* ======================================== */

.lanyard-stage {
    position: absolute; /* overlay penuh di atas .container (bukan kotak kecil terpisah lagi) */
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none; /* biar tombol/form di bawahnya tetap bisa diklik saat kartu tak menutupinya */
}
.lanyard-rope-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* interaksi tetap lewat kartu, bukan canvas */
}
.lanyard-card {
    pointer-events: auto; /* kartu sendiri tetap bisa di-drag walau wrapper pointer-events:none */
    background: rgba(12,12,18,0.94); /* lebih solid dari glass-card biasa -> tak "nembus" teks di belakangnya */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(201,169,98,0.25);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);

    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 90px);
    width: 190px;
    padding: 1.4rem 1.1rem;
    border-radius: 14px;
    text-align: center;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
    z-index: 2;
}
.lanyard-card:active { cursor: grabbing; }
.lanyard-photo { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; margin: 0 auto 0.75rem; border: 2px solid var(--gold-primary); pointer-events: none; }
.lanyard-photo img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.lanyard-name { font-size: 1rem; margin-bottom: 0.25rem; }
.lanyard-title { font-family: var(--font-body); font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.lanyard-badge { font-family: var(--font-body); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; display: inline-block; }
.lanyard-barcode { height: 20px; background: repeating-linear-gradient(90deg, var(--text-dim) 0 2px, transparent 2px 4px); border-radius: 2px; pointer-events: none; }

/* ======================================== */
/* FASE 05: POPUP NOTIFICATION */
/* ======================================== */

.popup-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(10,10,15,0.6);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.popup-overlay.active { opacity: 1; pointer-events: auto; }
.popup {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid rgba(201,169,98,0.3);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    text-align: center;
    max-width: 24rem;
    position: relative;
}
.popup.active { display: block; }
.popup-close-btn { position: absolute; top: 0.5rem; right: 0.75rem; background: none; border: none; color: var(--text-muted); font-size: 1.25rem; cursor: pointer; line-height: 1; }
.popup-close-btn:hover { color: var(--gold-primary); }
.popup-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.5rem; }
.popup-icon.success { background: rgba(34,197,94,0.15); color: #22c55e; }
.popup-icon.error { background: rgba(239,68,68,0.15); color: #ef4444; }
.popup-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.popup-message { font-family: var(--font-body); font-size: 0.85rem; color: var(--text-secondary); }
.popup-progress { height: 2px; background: var(--gold-primary); margin-top: 1.25rem; width: 100%; animation: popupProgress 2.5s linear forwards; }
@keyframes popupProgress { from { width: 100%; } to { width: 0%; } }

/* ======================================== */
/* FASE 05: CONFETTI */
/* ======================================== */

.confetti-piece {
    position: fixed; top: -10px; z-index: 4000;
    pointer-events: none;
    animation-name: confettiFall;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-fill-mode: forwards;
}
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ======================================== */
/* FASE 06: FOOTER */
/* ======================================== */

footer { text-align: center; padding: 3rem 1.5rem; position: relative; z-index: 1; }
.footer-logo { font-size: 1.75rem; margin-bottom: 0.5rem; }
.footer-tagline { font-family: var(--font-body); font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.footer-socials { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.footer-social-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); text-decoration: none; transition: transform 0.3s var(--transition-bounce), background 0.3s ease, border-color 0.3s ease; }
.footer-social-icon img { width: 20px; height: 20px; object-fit: contain; }
.footer-social-icon[aria-label="GitHub"] img { filter: invert(1); } /* logo GitHub aslinya hitam pekat -> tak terlihat di lingkaran gelap, jadi dibalik ke putih */
.footer-social-icon:hover { transform: translateY(-4px); background: rgba(212,175,55,0.12); border-color: var(--gold-primary); }
.footer-copyright { font-family: var(--font-body); font-size: 0.7rem; color: var(--text-dim); }

/* ============ AI CHAT WIDGET ============ */

/* ---- Toggle button ---- */
.chat-toggle-btn {
    position: fixed; bottom: 28px; right: 28px; z-index: 1001;
    width: 54px; height: 54px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary) 55%, var(--gold-dark));
    color: var(--bg-primary); cursor: pointer;
    box-shadow: 0 10px 28px -6px rgba(201, 169, 98, 0.5);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.35s var(--chat-ease-spring), box-shadow 0.3s var(--chat-ease-soft);
}
.chat-toggle-btn:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 14px 32px -6px rgba(201, 169, 98, 0.6); }
.chat-toggle-btn:active { transform: scale(0.94); }

.chat-toggle-icon { position: relative; width: 22px; height: 22px; display: block; }
.chat-toggle-icon svg {
    position: absolute; inset: 0; width: 22px; height: 22px;
    transition: opacity 0.28s var(--chat-ease-soft), transform 0.32s var(--chat-ease-soft);
}
.icon-close { opacity: 0; transform: rotate(-45deg) scale(0.7); }
.icon-chat { opacity: 1; transform: rotate(0deg) scale(1); }
.chat-toggle-btn.active .icon-chat { opacity: 0; transform: rotate(45deg) scale(0.7); }
.chat-toggle-btn.active .icon-close { opacity: 1; transform: rotate(0deg) scale(1); }

.chat-toggle-dot {
    position: absolute; top: 3px; right: 3px; width: 11px; height: 11px;
    background: #4ade80; border-radius: 50%; border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
    animation: chatDotPing 2.6s var(--chat-ease-soft) infinite;
}
.chat-toggle-btn.active .chat-toggle-dot { animation: none; box-shadow: none; }
@keyframes chatDotPing {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); }
    50% { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
}

/* ---- Backdrop (mobile sheet only) ---- */
.chat-backdrop {
    position: fixed; inset: 0; z-index: 998;
    background: rgba(6, 6, 12, 0.5);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s var(--chat-ease-soft);
}
.chat-backdrop.open { opacity: 1; pointer-events: auto; }

/* ---- Panel ---- */
.chat-panel {
    position: fixed; bottom: 96px; right: 28px; z-index: 999;
    width: min(380px, calc(100vw - 40px));
    /* Margin atas/bawah diperbesar (190px, bukan 148px) supaya panel tidak nyaris menempel navbar
       dan tidak menutupi hampir seluruh halaman di layar laptop biasa (~1366x768). */
    height: min(560px, calc(100dvh - 190px));
    min-height: 360px;
    background: var(--chat-bg);
    border: 1px solid var(--chat-border);
    border-radius: var(--chat-radius);
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 24px 60px -12px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.02) inset;
    transform-origin: bottom right;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(14px) scale(0.96);
    transition: opacity 0.3s var(--chat-ease), transform 0.36s var(--chat-ease), visibility 0s linear 0.36s;
}
.chat-panel.open {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: opacity 0.3s var(--chat-ease), transform 0.36s var(--chat-ease), visibility 0s;
}

/* ---- Header ---- */
.chat-header {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; padding: 14px 14px 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: linear-gradient(180deg, rgba(201,169,98,0.09), rgba(201,169,98,0.02));
    flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-avatar {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    color: var(--bg-primary); font-family: var(--font-body); font-weight: 700; font-size: 0.9rem;
}
.chat-header-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-header-name {
    font-family: var(--font-body); font-weight: 600; color: var(--white);
    font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-header-status {
    display: flex; align-items: center; gap: 5px;
    font-family: var(--font-body); font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.02em;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
.chat-header-actions { display: flex; gap: 4px; flex-shrink: 0; }
.chat-icon-btn {
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s var(--chat-ease-soft), color 0.2s var(--chat-ease-soft), transform 0.15s var(--chat-ease-soft);
}
.chat-icon-btn svg { width: 16px; height: 16px; }
.chat-icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.chat-icon-btn:active { transform: scale(0.9); }

/* ---- Messages ---- */
.chat-messages {
    position: relative; flex: 1; min-height: 0; overflow-y: auto;
    padding: 18px 14px; display: flex; flex-direction: column; gap: 10px;
    scroll-behavior: smooth;
}
.chat-scroll-fade {
    position: sticky; top: -18px; left: 0; right: 0; height: 18px;
    margin: -18px -14px 0; z-index: 1;
    background: linear-gradient(180deg, var(--chat-bg), transparent);
    opacity: 0; transition: opacity 0.25s var(--chat-ease-soft); pointer-events: none;
}
.chat-messages.scrolled .chat-scroll-fade { opacity: 1; }

.chat-bubble {
    max-width: 86%; padding: 10px 14px; border-radius: var(--chat-radius-sm);
    font-family: var(--font-body); font-size: 0.85rem; line-height: 1.55;
    white-space: pre-wrap; word-break: break-word;
    opacity: 0; transform: translateY(6px) scale(0.985);
    transition: opacity 0.32s var(--chat-ease), transform 0.32s var(--chat-ease);
}
.chat-bubble.in { opacity: 1; transform: translateY(0) scale(1); }
.chat-bubble-assistant {
    align-self: flex-start; background: var(--chat-surface); color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.05); border-bottom-left-radius: 4px;
}
.chat-bubble-user {
    align-self: flex-end; background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    color: var(--bg-primary); font-weight: 500; border-bottom-right-radius: 4px;
}

.chat-typing { display: flex; gap: 4px; padding: 13px 16px; }
.chat-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted);
    animation: chatTypingBounce 1.1s var(--chat-ease-soft) infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.12s; }
.chat-typing span:nth-child(3) { animation-delay: 0.24s; }
@keyframes chatTypingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* ---- Quick replies ---- */
.chat-quick-replies { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chat-quick-reply {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(201, 169, 98, 0.1); border: 1px solid rgba(201, 169, 98, 0.28);
    color: var(--gold-light); font-family: var(--font-body); font-size: 0.72rem;
    padding: 7px 12px 7px 9px; border-radius: 20px; cursor: pointer;
    transition: background 0.2s var(--chat-ease-soft), border-color 0.2s var(--chat-ease-soft), transform 0.15s var(--chat-ease-soft);
}
.chat-quick-reply svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.9; }
.chat-quick-reply:hover { background: rgba(201, 169, 98, 0.2); border-color: rgba(201, 169, 98, 0.5); }
.chat-quick-reply:active { transform: scale(0.96); }

/* ---- Input ---- */
.chat-input-row {
    display: flex; align-items: flex-end; gap: 8px;
    padding: 10px 12px; border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0;
}
.chat-input-row textarea {
    flex: 1; resize: none; max-height: 92px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px; padding: 9px 14px; color: var(--white);
    font-family: var(--font-body); font-size: 0.83rem; line-height: 1.4;
    transition: border-color 0.2s var(--chat-ease-soft), background 0.2s var(--chat-ease-soft);
}
.chat-input-row textarea:focus { outline: none; border-color: var(--gold-primary); background: rgba(255,255,255,0.07); }
.chat-input-row textarea::placeholder { color: var(--text-dim); }

.chat-send-btn {
    width: 38px; height: 38px; border-radius: 50%; border: none; flex-shrink: 0;
    background: var(--gold-primary); color: var(--bg-primary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.25s var(--chat-ease-spring), background 0.2s var(--chat-ease-soft), opacity 0.2s var(--chat-ease-soft);
}
.chat-send-btn svg { width: 16px; height: 16px; transform: translateX(-1px); }
.chat-send-btn:hover:not(:disabled) { background: var(--gold-light); transform: scale(1.06); }
.chat-send-btn:active:not(:disabled) { transform: scale(0.92); }
.chat-send-btn:disabled { opacity: 0.35; cursor: default; }

.chat-footer-note { text-align: center; font-size: 0.64rem; color: var(--text-dim); padding: 0 0 10px; flex-shrink: 0; }

/* ---- Mobile: bottom sheet ---- */
@media (max-width: 640px) {
    .chat-toggle-btn {
        right: 18px; bottom: 18px;
        transition: transform 0.35s var(--chat-ease-spring), box-shadow 0.3s var(--chat-ease-soft),
                    opacity 0.22s var(--chat-ease-soft), visibility 0s linear 0.22s;
    }
    /* Panel jadi bottom-sheet penuh di mobile (tanpa jarak ke bawah seperti desktop),
       jadi tombol bulat ini akan menimpa tombol kirim di pojok kanan-bawah kalau tetap
       tampil saat panel terbuka. Header sudah punya tombol close sendiri (chatCloseBtn),
       jadi tombol apung ini disembunyikan begitu panel aktif. */
    .chat-toggle-btn.active {
        opacity: 0; visibility: hidden; pointer-events: none;
        transition: opacity 0.18s var(--chat-ease-soft), visibility 0s linear 0.18s;
    }

    .chat-panel {
        left: 0; right: 0; bottom: 0;
        width: 100%; height: min(88dvh, 720px); max-height: 88dvh;
        border-radius: 22px 22px 0 0;
        transform-origin: bottom center;
        transform: translateY(100%) scale(1);
    }
    .chat-panel.open { transform: translateY(0) scale(1); }
    .chat-header { padding-top: 16px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .chat-toggle-btn, .chat-toggle-icon svg, .chat-toggle-dot, .chat-backdrop,
    .chat-panel, .chat-icon-btn, .chat-bubble, .chat-typing span,
    .chat-quick-reply, .chat-input-row textarea, .chat-send-btn {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   HIRE ME — Terminal Typing (#2) + Process Stepper (#6)
   Isolated component: does not alter existing portfolio styles.
   ============================================================ */
.hire-terminal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(5, 5, 9, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.hire-terminal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.hire-terminal-modal {
    width: min(620px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow-y: auto;
    position: relative;
    padding: 22px;
    border: 1px solid rgba(201,169,98,0.34);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(201,169,98,0.08), transparent 34%),
        linear-gradient(145deg, rgba(26,26,46,0.98), rgba(8,8,14,0.98));
    box-shadow: 0 30px 90px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.07);
    transform: translateY(14px) scale(0.97);
    transition: transform 0.38s cubic-bezier(.16,1,.3,1);
}
.hire-terminal-overlay.active .hire-terminal-modal { transform: translateY(0) scale(1); }
.hire-terminal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(201,169,98,0.18);
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.hire-terminal-close:hover { color: var(--gold-light); border-color: var(--gold-primary); background: rgba(201,169,98,0.08); }
.hire-terminal-topbar { display: flex; gap: 7px; margin-bottom: 18px; }
.hire-terminal-topbar span { width: 8px; height: 8px; border-radius: 50%; background: rgba(201,169,98,0.5); }
.hire-terminal-head { padding-right: 42px; margin-bottom: 16px; }
.hire-terminal-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--gold-primary);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.hire-terminal-title { font-size: 1.55rem; font-weight: 500; color: var(--text-primary); }
.hire-terminal-screen {
    min-height: 164px;
    padding: 16px 18px;
    border: 1px solid rgba(201,169,98,0.17);
    border-radius: 12px;
    background: #050507;
    color: #c9e9ca;
    font-family: var(--font-mono);
    font-size: 0.69rem;
    line-height: 1.8;
    box-shadow: inset 0 0 28px rgba(0,0,0,.35);
}
.hire-terminal-line { opacity: 0; white-space: pre-wrap; }
.hire-terminal-line.show { opacity: 1; }
.hire-terminal-line.command { color: #ff79c6; }
.hire-terminal-line.muted { color: #6272a4; }
.hire-terminal-line.success { color: #50fa7b; }
.hire-terminal-cursor { display: inline-block; width: 6px; height: 12px; margin-left: 3px; vertical-align: -1px; background: #50fa7b; animation: hireTerminalBlink 1s step-end infinite; }
.hire-terminal-cursor.is-idle { animation: none; opacity: 0; }
@keyframes hireTerminalBlink { 50% { opacity: 0; } }
/* Dracula-style token colors dipakai di dalam baris terminal (lihat buildRichHTML di script.js) */
.dracula-prompt { color: #ff79c6; }
.dracula-cmd { color: #bd93f9; }
.dracula-flag { color: #8be9fd; }
.dracula-key { color: #8be9fd; }
.dracula-sep { color: #6272a4; }
.dracula-value { color: #50fa7b; }
.dracula-status { color: #f1fa8c; }
.dracula-muted-text { color: #6272a4; }
.hire-channel-area { margin-top: 18px; transition: opacity .28s ease, transform .28s ease, max-height .35s ease; }
.hire-channel-area.is-hidden { opacity: 0; transform: translateY(-5px); pointer-events: none; max-height: 0; overflow: hidden; margin-top: 0; }
.hire-channel-label { margin-bottom: 9px; color: var(--text-secondary); font-family: var(--font-body); font-size: .68rem; letter-spacing: .04em; }
.hire-channel-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hire-channel {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(201,169,98,0.16);
    border-radius: 11px;
    background: rgba(255,255,255,0.025);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
.hire-channel:hover { transform: translateY(-2px); border-color: rgba(201,169,98,.52); background: rgba(201,169,98,.07); box-shadow: 0 10px 25px rgba(0,0,0,.18); }
.hire-channel:active { transform: translateY(0) scale(.98); }
.hire-channel.is-selected { border-color: var(--gold-primary); background: rgba(201,169,98,.10); box-shadow: 0 0 0 1px rgba(201,169,98,.08); }
.hire-channel-icon { flex: 0 0 30px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(201,169,98,.12); color: var(--gold-light); font-family: var(--font-body); font-size: .68rem; }
.hire-channel strong, .hire-channel small { display: block; font-family: var(--font-body); }
.hire-channel strong { font-size: .7rem; font-weight: 500; }
.hire-channel small { margin-top: 2px; color: var(--text-muted); font-size: .55rem; line-height: 1.35; }
.hire-back-btn { display: inline-block; margin-bottom: 12px; padding: 0; border: none; background: none; color: var(--text-muted); font-family: var(--font-body); font-size: .64rem; letter-spacing: .02em; cursor: pointer; transition: color .2s ease; }
.hire-back-btn:hover { color: var(--gold-light); }
.hire-stepper-area { display: none; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(201,169,98,.12); }
.hire-stepper-area.active { display: block; animation: hireStepReveal .35s ease both; }
@keyframes hireStepReveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hire-stepper { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: start; gap: 8px; }
.hire-step { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 62px; color: var(--text-muted); font-family: var(--font-body); }
.hire-step span { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(201,169,98,.25); background: rgba(255,255,255,.035); font-size: .64rem; transition: all .3s ease; }
.hire-step small { font-size: .55rem; white-space: nowrap; }
.hire-step.is-active span { color: var(--gold-light); border-color: var(--gold-primary); background: rgba(201,169,98,.18); box-shadow: 0 0 0 4px rgba(201,169,98,.05); }
.hire-step.is-done span { color: #1a1408; border-color: var(--gold-primary); background: var(--gold-primary); }
.hire-step.is-done span::before { content: '✓'; }
.hire-step.is-done span { font-size: 0; }
.hire-step-line { height: 1px; margin-top: 14px; overflow: hidden; background: rgba(201,169,98,.18); }
.hire-step-line i { display: block; width: 0; height: 100%; background: var(--gold-primary); transition: width .5s cubic-bezier(.16,1,.3,1); }
.hire-step-line.is-filled i { width: 100%; }
.hire-step-label { margin-top: 13px; color: var(--text-secondary); font-family: var(--font-mono); font-size: .64rem; text-align: center; }
.hire-final { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid rgba(201,169,98,.22); border-radius: 11px; background: rgba(201,169,98,.06); animation: hireFinalIn .45s cubic-bezier(.16,1,.3,1) both; }
@keyframes hireFinalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.hire-final-status { color: var(--gold-light); font-family: var(--font-body); font-size: .68rem; }
.hire-final-link { flex-shrink: 0; text-decoration: none; }
.hire-final-link.is-disabled { opacity: .5; pointer-events: none; }
@media (max-width: 640px) {
    .hire-terminal-overlay { padding: 14px; }
    .hire-terminal-modal { padding: 18px; max-height: calc(100vh - 28px); border-radius: 15px; }
    .hire-terminal-screen { min-height: 150px; font-size: .61rem; }
    .hire-channel-list { grid-template-columns: 1fr; }
    .hire-channel { padding: 9px 10px; }
    .hire-final { align-items: stretch; flex-direction: column; }
    .hire-final-link { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .hire-terminal-overlay, .hire-terminal-modal, .hire-terminal-cursor, .hire-stepper-area, .hire-final, .hire-channel { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}