/* public/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-font: 'Outfit', sans-serif;
  --accent-gold: #D4AF37;
  --bg-dark: #050505;
  --bg-dark-secondary: #111111;
  --text-dark: #ffffff;
  
  --bg-light: #ffffff;
  --bg-light-secondary: #f3f4f6;
  --text-light: #000000;
}

body {
  font-family: var(--primary-font);
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

body.light {
  background-color: var(--bg-light);
  color: var(--text-light);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark-secondary);
}
body.light ::-webkit-scrollbar-track {
  background: var(--bg-light-secondary);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Glassmorphism utilities */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light .glass {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 
  Shining Button - Animated Gradient Border
*/
.btn-shining {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #111;
  border-radius: 50px;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
  text-decoration: none;
  border: none;
}

.btn-shining::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, var(--accent-gold), #FFF8E7, #FFD700, var(--accent-gold));
  z-index: -1;
  background-size: 400%;
  border-radius: 50px;
  animation: glowing 5s linear infinite;
  opacity: 1; /* Always shining */
}

.btn-shining::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: #111;
  border-radius: 50px;
  z-index: -1;
}

body.light .btn-shining {
  color: #000;
  background: #fff;
}
body.light .btn-shining::after {
  background: #fff;
}

@keyframes glowing {
  0% { background-position: 0 0; }
  50% { background-position: 400% 0; }
  100% { background-position: 0 0; }
}

/*
  Uiverse.io Theme Toggle Switch
*/
.theme-switch {
  --toggle-size: 15px;
  --container-width: 3.5em;
  --container-height: 1.7em;
  --container-radius: 3em;
  --container-light-bg: #e4e4e4;
  --container-dark-bg: #222;
  --circle-container-diameter: 2em;
  --sun-moon-diameter: 1.2em;
  --sun-bg: #ECCA2F;
  --moon-bg: #C4C9D1;
  --spot-color: #959DB1;
  --circle-transition: .3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-switch, .theme-switch *, .theme-switch *::before, .theme-switch *::after {
  box-sizing: border-box;
}

.theme-switch {
  cursor: pointer;
  display: inline-block;
}

.theme-switch__checkbox {
  display: none;
}

.theme-switch__container {
  width: var(--container-width);
  height: var(--container-height);
  background-color: var(--container-light-bg);
  border-radius: var(--container-radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  transition: var(--circle-transition);
  position: relative;
}

.theme-switch__checkbox:checked + .theme-switch__container {
  background-color: var(--container-dark-bg);
}

.theme-switch__circle-container {
  width: var(--circle-container-diameter);
  height: var(--circle-container-diameter);
  background-color: rgba(255, 255, 255, 0.1);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  border-radius: var(--container-radius);
  display: flex;
  transition: var(--circle-transition);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
  left: calc(100% - var(--circle-container-diameter));
}

.theme-switch__sun-moon-container {
  margin: auto;
  width: var(--sun-moon-diameter);
  height: var(--sun-moon-diameter);
  background-color: var(--sun-bg);
  border-radius: var(--container-radius);
  position: relative;
  overflow: hidden;
  transition: var(--circle-transition);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__sun-moon-container {
  background-color: var(--moon-bg);
}

/* Custom Cursor */
.custom-cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s;
}

.custom-cursor.active {
  width: 40px;
  height: 40px;
  background: rgba(212, 175, 55, 0.2);
}

/* Dynamic Gradient Background */
.bg-animated {
  background: linear-gradient(-45deg, #050505, #111111, #1a1710, #0a0a0a);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

body.light .bg-animated {
  background: linear-gradient(-45deg, #ffffff, #fcfcfc, #fdf8eb, #f0f0f0);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Project Card Hover */
.project-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(212, 175, 55, 0.15);
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}


/* Futuristic Cyber Grid (Uiverse style) */
.cyber-grid {
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(212, 175, 55, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(212, 175, 55, 0.15) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  animation: gridMove 20s linear infinite;
  transform-origin: center top;
  perspective: 1000px;
}

@keyframes gridMove {
  0% { transform: translateY(0) scale(1.1); }
  100% { transform: translateY(50px) scale(1.1); }
}

/* Glowing text utility */
.glow-text {
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.8), 0 0 30px rgba(212, 175, 55, 0.4);
  animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { text-shadow: 0 0 10px rgba(212, 175, 55, 0.6), 0 0 20px rgba(212, 175, 55, 0.3); }
  100% { text-shadow: 0 0 20px rgba(212, 175, 55, 1), 0 0 40px rgba(212, 175, 55, 0.6); }
}
/* Tron Glowing Border Card */
.card-tron {
  position: relative;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  z-index: 1;
}

.card-tron::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(transparent, rgba(212, 175, 55, 1), transparent 30%);
  animation: rotateTron 4s linear infinite;
  z-index: -2;
}

.card-tron::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: inherit;
  border-radius: 14px;
  z-index: -1;
}

body.light .card-tron {
  background: #ffffff;
}

body.light .card-tron::after {
  background: #ffffff;
}

body.light .card-tron::before {
  background: conic-gradient(transparent, rgba(212, 175, 55, 0.6), transparent 30%);
}

@keyframes rotateTron {
  100% { transform: rotate(1turn); }
}

/* Horizontal Scroll for Projects */
.horizontal-scroll-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2rem;
  gap: 2rem;
}

.horizontal-scroll-container::-webkit-scrollbar {
  display: none;
}

.horizontal-scroll-item {
  scroll-snap-align: center;
  flex: 0 0 85%;
  max-width: 500px;
}

/* 
  Sleek Modern Button
*/
.btn-sleek {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  background: var(--accent-gold);
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  z-index: 1;
  text-transform: none;
}

.btn-sleek::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
  z-index: -1;
}

.btn-sleek:hover::before {
  left: 100%;
}

.btn-sleek:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
  background: #E5C158;
}

.btn-sleek i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.btn-sleek:hover i {
  transform: translateX(3px) scale(1.1);
}

/* 
  Curvy-Earwig Form (Uiverse Style) 
*/
.form-curvy {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

body.light .form-curvy {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.form-curvy .input-group {
  position: relative;
  margin-bottom: 25px;
}

.form-curvy .input-group input,
.form-curvy .input-group textarea,
.form-curvy .input-group select {
  width: 100%;
  padding: 15px 20px;
  font-size: 16px;
  color: inherit;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid transparent;
  border-radius: 20px;
  outline: none;
  transition: all 0.3s ease;
}

body.light .form-curvy .input-group input,
body.light .form-curvy .input-group textarea,
body.light .form-curvy .input-group select {
  background: rgba(0, 0, 0, 0.05);
}

.form-curvy .input-group input:focus,
.form-curvy .input-group textarea:focus,
.form-curvy .input-group select:focus {
  border-color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

body.light .form-curvy .input-group input:focus,
body.light .form-curvy .input-group textarea:focus,
body.light .form-curvy .input-group select:focus {
  background: #fff;
}

.form-curvy .input-group label {
  position: absolute;
  top: -10px;
  left: 15px;
  background: var(--bg-dark);
  padding: 0 8px;
  font-size: 12px;
  font-weight: bold;
  color: var(--accent-gold);
  border-radius: 10px;
  transition: all 0.3s ease;
}

body.light .form-curvy .input-group label {
  background: #fff;
}
