/* Sahrul Efendi Portfolio - Modern Premium Design System */

:root {
  --color-primary: #2563eb;
  --color-secondary: #60a5fa;
  --color-accent: #38bdf8;
  --color-bg: #030712;
  --color-surface: #111827;
  --color-card: rgba(255, 255, 255, 0.03);
  --color-card-hover: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.16);
}

/* Base resets & scroll behavior */
html {
  scroll-behavior: smooth;
  background-color: var(--color-bg);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  overflow-x: hidden;
}

body {
  background-color: var(--color-bg);
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.12) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Grid & dot pattern overlay */
.grid-overlay {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at 50% 50%, black 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 60%, transparent 100%);
  pointer-events: none;
}

/* Premium Glassmorphism */
.glass-panel {
  background: var(--color-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  background: var(--color-card-hover);
  border-color: var(--border-glass-hover);
  box-shadow: 0 12px 40px 0 rgba(37, 99, 235, 0.15);
}

/* Interactive Card Mouse Glow effect */
.glow-card {
  position: relative;
  overflow: hidden;
}

.glow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: radial-gradient(
    350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(56, 189, 248, 0.1),
    transparent 80%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.glow-card:hover::before {
  opacity: 1;
}

/* Interactive Buttons */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e40af 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4), 0 0 15px rgba(56, 189, 248, 0.2);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #030712;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  border: 2px solid #030712;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Animations and Transitions */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(5px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Specific delay classes */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Custom keyframes for custom decorations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(2deg);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 8s ease-in-out infinite;
}

/* Typewriter blink cursor */
.typewriter-cursor::after {
  content: '|';
  animation: blink 0.75s step-end infinite;
  color: var(--color-accent);
  margin-left: 2px;
}

@keyframes blink {
  from, to { color: transparent }
  50% { color: var(--color-accent); }
}

/* Modal styling */
.glass-modal {
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Form floating label focus styles */
.form-input {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--color-accent);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
  outline: none;
}

.floating-label {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-input:focus ~ .floating-label,
.form-input:not(:placeholder-shown) ~ .floating-label {
  transform: translateY(-26px) scale(0.85);
  color: var(--color-accent);
}

/* Toast styling */
.toast {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(100px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Particle / Radial glow background markers */
.glow-spot {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}

.glow-spot-cyan {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: -1;
}
