/* ---------------------------------------------------------
   Amit Raj Dev — portfolio design system
   Custom styles layered on top of the Tailwind Play CDN.
   Kept in one small file so both pages share one source.
--------------------------------------------------------- */

:root {
  color-scheme: light;
}
html.dark {
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background-color: #ffffff;
}
html.dark body {
  background-color: #020617;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Focus visibility (accessibility + keeps outline off for mouse users) */
:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Top scroll-progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #2dd4bf, #0ea5e9);
  z-index: 60;
  transition: width 0.1s linear;
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(90deg, #14b8a6, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Soft grid backdrop used behind the hero */
.grid-backdrop {
  background-image:
    linear-gradient(to right, rgba(148,163,184,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148,163,184,0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 40%, transparent 100%);
}

/* Card lift */
.card-hover {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
}

/* Theme toggle icon crossfade */
#theme-toggle .icon-sun,
#theme-toggle .icon-moon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
html:not(.dark) #theme-toggle .icon-moon,
html.dark #theme-toggle .icon-sun {
  opacity: 0;
  transform: scale(0.5) rotate(45deg);
}
html:not(.dark) #theme-toggle .icon-sun,
html.dark #theme-toggle .icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Timeline connector dot pulse (subtle) */
.timeline-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.25;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.5rem 0;
  background: #14b8a6;
  color: #fff;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}
