/* ==========================================================================
   AI Engineer Portfolio - Base Theme Custom Styles
   ========================================================================== */

/* Cinematic Noise Overlay */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

code, pre, kbd, samp, .font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Hide Scrollbar but keep functionality */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* Custom Selection */
::selection {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}

/* Glass & Border Utilities */
.glass-panel {
  background: rgba(15, 17, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-2px);
}

/* Glow Effects */
.glow-text {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Nav Link Active State */
.nav-link {
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #6366f1;
  border-radius: 50%;
  box-shadow: 0 0 10px #6366f1;
}

/* Animations */
@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

.delay-500 {
  animation-delay: 500ms;
}

/* ==========================================================================
   Fallback styles to prevent FOUC & Jitter (Layout Shift) on dynamic load
   ========================================================================== */

/* Pre-reserve space and layout for Iconify custom element icons */
iconify-icon {
  display: inline-block;
  vertical-align: middle;
}

/* Glass panel layout fallback */
.glass-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 9999px;
  padding: 8px 24px;
}

/* Nav Link fallback */
.nav-link {
  display: inline-block;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 9999px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.dark .nav-link {
  color: #a3a3a3; /* text-neutral-400 */
}
.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
.dark .nav-link.active {
  color: #ffffff;
}

/* CV Button fallback */
#btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  background-color: #6366f1; /* bg-indigo-500 */
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.2);
  transition: all 0.15s;
}
#btn-cv:hover {
  background-color: #818cf8; /* bg-indigo-400 */
}
#btn-cv iconify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
}

/* Home CTA & Social buttons fallback */
#btn-case-studies, #btn-get-in-touch {
  display: inline-block;
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  box-sizing: border-box;
}

#btn-case-studies {
  border: none;
}
.dark #btn-case-studies {
  background-color: #EDEDED;
  color: #000000;
}
#btn-case-studies:hover {
  transform: translateY(-4px);
}

#btn-get-in-touch {
  background: transparent;
}
.dark #btn-get-in-touch {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #EAEAEA;
}
#btn-get-in-touch:hover {
  transform: translateY(-4px);
}

.home-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.15s;
}
.home-social-link.icon-only {
  width: 32px; /* w-8 */
  height: 32px; /* h-8 */
}
.home-social-link.text-badge {
  padding: 6px 12px; /* px-3 py-1.5 */
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.dark .home-social-link {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a3a3a3; /* text-neutral-400 */
}
