/* ==========================================================================
   DANU FIRDA PERKASA — PORTFOLIO DESIGN SYSTEM
   Modern Dark Tech Bento Grid & GSAP Animation Styles
   ========================================================================== */

:root {
  /* Color Palette Tokens */
  --bg-primary: #07090e;
  --bg-secondary: #0c101a;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.4);
  --accent-violet: #8b5cf6;
  --accent-indigo: #6366f1;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(6, 182, 212, 0.4);
  
  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #07090e;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #06b6d4;
}

/* Ambient Background Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  transition: transform 0.5s ease;
}
.glow-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);
  top: -10%;
  left: -10%;
}
.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  top: 40%;
  right: -15%;
}
.glow-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  bottom: 5%;
  left: 20%;
}

/* Subtle Grid Background Pattern */
.grid-background-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, #000 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, #000 70%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Custom Interactive Cursor Follower */
.cursor-glow {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  border-radius: 50%;
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}

/* Glassmorphism Classes */
.glass-navbar {
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  box-shadow: 0 20px 40px -15px rgba(6, 182, 212, 0.15);
}

/* Profile Photo Frame */
.profile-photo-wrapper {
  position: relative;
  display: inline-block;
}
.profile-photo-ring {
  padding: 4px;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.8), rgba(16, 185, 129, 0.6), rgba(99, 102, 241, 0.8));
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.35);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-photo-ring:hover {
  transform: scale(1.03) rotate(1deg);
  box-shadow: 0 0 35px rgba(6, 182, 212, 0.55);
}
.profile-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 1.25rem;
}

/* Bento Card Hover Tilt Effect */
.bento-card {
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.6), 0 0 20px -5px rgba(6, 182, 212, 0.2);
}

/* Skill Tags & Tech Pills */
.skill-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #cbd5e1;
  transition: all var(--transition-fast);
}
.skill-tag:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: #e2e8f0;
  transition: all var(--transition-fast);
}
.tech-pill:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.03);
}

/* Skill Filter Buttons */
.skill-filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.skill-filter-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}
.skill-filter-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(16, 185, 129, 0.2));
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
}

/* Timeline Components */
.timeline-wrapper {
  position: relative;
}
.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-emerald), transparent);
}
.timeline-dot {
  position: absolute;
  top: 1.75rem;
  left: -1.9rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Project Card & Hover Glow */
.project-card {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 25px -5px rgba(6, 182, 212, 0.25);
}

/* Form Inputs */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(10, 14, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.875rem;
  color: #fff;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
}
.form-input::placeholder {
  color: #64748b;
}

/* Terminal Drawer Modal */
.terminal-modal {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.terminal-modal.active {
  display: flex !important;
  opacity: 1 !important;
}

.terminal-container {
  animation: terminalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes terminalPop {
  0% {
    transform: scale(0.92) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.terminal-body {
  min-height: 280px;
  max-height: 480px;
  font-family: var(--font-mono);
}

.cmd-chip {
  padding: 0.2rem 0.6rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.cmd-chip:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: #fff;
}

/* Toast Notifications */
.toast-msg {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-emerald);
  color: #fff;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.3);
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Tailwind Utilities Fallback / Custom helpers */
.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #34d399 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .hero-title {
    font-size: 2.35rem !important;
  }
  .timeline-dot {
    left: -1.7rem;
    width: 1.2rem;
    height: 1.2rem;
  }
  .timeline-dot div {
    width: 0.5rem !important;
    height: 0.5rem !important;
  }
}
