/* ==========================================================================
   Jaimin Thaker — Full-Stack WordPress Developer & Digital Solutions
   Core Stylesheet & Design System
   ========================================================================== */

/* Base font & box sizing reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: 'DM Sans', sans-serif;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'PT Sans', sans-serif;
  letter-spacing: -0.015em;
}

body {
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Subtle background noise texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #FF6B2B;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #FF8F5C;
}

/* Scroll reveal transitions */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }

/* Navigation links */
.nl {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nl::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #FF6B2B;
  transition: width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}
.nl:hover::after,
.nl.on::after {
  width: 100%;
}
.nl.on {
  color: #FF6B2B !important;
  font-weight: 600;
}

/* Shimmer button animation */
.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: rgba(255, 255, 255, 0.22);
  transform: skewX(-20deg);
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.shimmer:hover::after {
  left: 170%;
}

/* Card hover animation */
.card-h {
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease, box-shadow 0.26s ease;
}
.card-h:hover {
  transform: translateY(-4px);
}

/* Photo frames & Project card image containers */
.photo-frame,
.pf {
  overflow: hidden !important;
  position: relative;
  background: #e4e4e7;
  display: block;
}
.dark .photo-frame,
.dark .pf {
  background: #27272a;
}
.photo-frame img,
.pf img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.photo-frame:hover img,
.pf:hover img,
.card-h:hover .photo-frame img,
.card-h:hover .pf img {
  transform: scale(1.04);
}

/* Badges */
.badge-demo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: rgba(255, 107, 43, 0.12);
  color: #FF6B2B;
  border: 1px solid rgba(255, 107, 43, 0.28);
}

/* Code block highlight box */
.code-preview {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 1rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #e4e4e7;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #FF6B2B;
  outline-offset: 2px;
}

/* Cloak for Alpine.js elements before hydration */
[x-cloak] {
  display: none !important;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
