/* ---------------------------------------------
   Faiz Darvesh - Personal Portfolio
   Custom styles layered on top of Tailwind CDN,
   mirroring the DevFolio (cruip) design system:
   neutral grays, rounded-xl cards, shimmer CTAs,
   alternating experience rows, spring-eased hovers.
--------------------------------------------- */

.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }

html {
  scroll-behavior: smooth;
}

body {
  font-feature-settings: "cv11", "ss01";
}

/* ---------------------------------------------
   Status badge pill (hero)
--------------------------------------------- */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: #4b5563;
  background: #fff;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.badge-pill:hover {
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.dark .badge-pill {
  border-color: rgba(75, 85, 99, 0.5);
  color: #9ca3af;
  background: transparent;
}

.dark .badge-pill:hover {
  border-color: rgba(107, 114, 128, 0.7);
}

/* ---------------------------------------------
   Primary CTA button with diagonal shine sweep
   (mirrors the reference site's hover animation)
--------------------------------------------- */
.btn-shine {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.625rem 1.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #e5e7eb;
  background-image: linear-gradient(to right, #1f2937, #374151);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  transition: transform 0.25s cubic-bezier(0.5, 0.85, 0.25, 1.8), box-shadow 0.25s ease;
}

.btn-shine::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: linear-gradient(45deg, transparent 25%, rgb(255 255 255 / 0.25) 50%, transparent 75%, transparent 100%);
  background-size: 250% 250%;
  background-position: 200% 0;
  background-repeat: no-repeat;
  transition: background-position 0s ease;
  pointer-events: none;
}

.btn-shine:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px 0 rgb(0 0 0 / 0.12);
}

.btn-shine:hover::before {
  background-position: -100% 0;
  transition-duration: 1500ms;
}

.btn-shine:active {
  transform: translateY(0) scale(0.98);
}

.dark .btn-shine {
  color: #1f2937;
  background-image: linear-gradient(to top right, #d1d5db, #f3f4f6);
}

.dark .btn-shine::before {
  background-image: linear-gradient(45deg, transparent 25%, rgb(0 0 0 / 0.12) 50%, transparent 75%, transparent 100%);
}

/* ---------------------------------------------
   Experience rows: alternating gradient highlight
   + icon badge + link underline behaviour
--------------------------------------------- */
.exp-item {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.exp-item:nth-child(odd) {
  background-image: linear-gradient(to top right, #f3f4f6, #f9fafb);
}

.dark .exp-item:nth-child(odd) {
  background-image: linear-gradient(to top right, rgba(31, 41, 55, 0.7), rgba(31, 41, 55, 0.25));
}

/* .exp-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px 0 rgb(0 0 0 / 0.06);
} */

.icon-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: transform 0.3s cubic-bezier(0.5, 0.85, 0.25, 1.8);
}

.exp-item:hover .icon-badge {
  transform: scale(1.08) rotate(-4deg);
}

.dark .icon-badge {
  border-color: rgba(75, 85, 99, 0.5);
  background: #1f2937;
}

.logo-badge {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.375rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: transform 0.3s cubic-bezier(0.5, 0.85, 0.25, 1.8);
}

.logo-badge-wide {
  width: auto;
  min-width: 6.5rem;
  height: 2rem;
  padding: 0.375rem 0.625rem;
}

.logo-badge img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.exp-item:hover .logo-badge {
  transform: scale(1.06) rotate(-3deg);
}

.dark .logo-badge {
  border-color: rgba(75, 85, 99, 0.5);
}

.exp-link {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: #d1d5db;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.exp-link:hover {
  text-decoration-color: #1f2937;
}

.dark .exp-link {
  text-decoration-color: #4b5563;
}

.dark .exp-link:hover {
  text-decoration-color: #e5e7eb;
}

/* ---------------------------------------------
   Achievement stat cards
--------------------------------------------- */
.stat-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
  background: #fff;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px 0 rgb(0 0 0 / 0.06);
  border-color: #d1d5db;
}

.dark .stat-card {
  border-color: rgba(75, 85, 99, 0.5);
  background: rgba(31, 41, 55, 0.4);
}

.dark .stat-card:hover {
  border-color: rgba(107, 114, 128, 0.7);
}

/* ---------------------------------------------
   Side Projects list
--------------------------------------------- */
.side-project {
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.side-project:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.side-project:first-child {
  padding-top: 0;
}

.dark .side-project {
  border-color: rgba(75, 85, 99, 0.5);
}

/* ---------------------------------------------
   Article cards
--------------------------------------------- */
.article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px 0 rgb(0 0 0 / 0.06);
  border-color: #d1d5db;
}

.dark .article-card {
  border-color: rgba(75, 85, 99, 0.5);
  background: rgba(31, 41, 55, 0.4);
}

.dark .article-card:hover {
  border-color: rgba(107, 114, 128, 0.7);
}

/* Gradient thumbnails: pure CSS, topic-tinted */
.gradient-thumb {
  width: 100%;
  height: 8rem;
  border-radius: inherit;
}

.gradient-thumb--product {
  background-image: linear-gradient(135deg, #f59e0b, #f97316);
}

.gradient-thumb--digital {
  background-image: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.gradient-thumb--ai {
  background-image: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

/* ---------------------------------------------
   Testimonial cards
--------------------------------------------- */
.testimonial-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  margin: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.testimonial-mark {
  display: block;
  height: 1.75rem;
  margin-bottom: 0.25rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(14, 165, 233, 0.35);
  user-select: none;
}

.dark .testimonial-mark {
  color: rgba(56, 189, 248, 0.5);
}

.testimonial-attrib {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-card blockquote {
  margin: 0 0 1.25rem;
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px 0 rgb(0 0 0 / 0.06);
  border-color: #d1d5db;
}

.dark .testimonial-card {
  border-color: rgba(75, 85, 99, 0.5);
  background: rgba(31, 41, 55, 0.4);
}

.dark .testimonial-card:hover {
  border-color: rgba(107, 114, 128, 0.7);
}

.avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.dark .avatar {
  border-color: rgba(75, 85, 99, 0.5);
}

/* ---------------------------------------------
   Let's Connect card
--------------------------------------------- */
.connect-card {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 2.5rem 1.5rem;
  background-image: linear-gradient(to top right, #f9fafb, #fff);
}

.dark .connect-card {
  border-color: rgba(75, 85, 99, 0.4);
  background-image: linear-gradient(to top right, rgba(31, 41, 55, 0.5), rgba(17, 24, 39, 0));
}

/* ---------------------------------------------
   Footer social icons
--------------------------------------------- */
.social-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.25s cubic-bezier(0.5, 0.85, 0.25, 1.8);
}

.social-icon:hover {
  color: #1f2937;
  background-color: #f3f4f6;
  transform: translateY(-2px);
}

.dark .social-icon {
  border-color: rgba(75, 85, 99, 0.5);
  color: #9ca3af;
}

.dark .social-icon:hover {
  color: #f3f4f6;
  background-color: rgba(255, 255, 255, 0.06);
}

/* ---------------------------------------------
   Hero photos: alternating tilt, spring un-rotate
   and lift on hover
--------------------------------------------- */
.img-tilt {
  transition: transform 0.4s cubic-bezier(0.5, 0.85, 0.25, 1.8), box-shadow 0.4s ease;
}

.tilt-odd {
  transform: rotate(-3deg);
}

.tilt-even {
  transform: rotate(3deg);
}

.img-tilt:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.03);
  box-shadow: 0 16px 30px 0 rgb(0 0 0 / 0.16);
}

/* ---------------------------------------------
   Theme toggle switch
--------------------------------------------- */
.theme-toggle {
  cursor: pointer;
  display: inline-flex;
}

.theme-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 3.25rem;
  height: 1.75rem;
  padding: 0 0.4rem;
  border-radius: 9999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle-track i {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: #9ca3af;
  transition: color 0.3s ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.2);
  transition: transform 0.4s cubic-bezier(0.5, 0.85, 0.25, 1.8), background-color 0.3s ease;
}

.dark .theme-toggle-track {
  background: #1f2937;
  border-color: rgba(75, 85, 99, 0.6);
}

.dark .theme-toggle-thumb {
  transform: translateX(1.5rem);
  background: #0b0f19;
}

.dark .theme-toggle-track .ph-moon {
  color: #e5e7eb;
}

html:not(.dark) .theme-toggle-track .ph-sun {
  color: #f59e0b;
}

/* ---------------------------------------------
   Scroll reveal (IntersectionObserver driven,
   see js/main.js, no scroll-event listeners)
--------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------
   Reduced motion: collapse all animation/transition
   to instant state changes
--------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .exp-item,
  .icon-badge,
  .stat-card,
  .img-tilt,
  .theme-toggle-thumb,
  .btn-shine,
  .social-icon,
  .side-project,
  .article-card,
  .testimonial-card,
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
