/* ===============================================
   SHOAIB HAJJ PORTFOLIO -- STYLE.CSS
   Design tokens + animations + special effects
   =============================================== */

:root {
  /* -- Colors -- */
  --color-primary:       #3b82f6;
  --color-primary-dark:  #2563eb;
  --color-primary-light: #60a5fa;
  --color-accent:        #22c55e;
  --color-accent-dark:   #16a34a;

  --color-bg:            #020617;
  --color-bg-alt:        #0f172a;
  --color-surface:       #1e293b;
  --color-border:        rgba(148, 163, 184, 0.1);

  --color-text:          #f9fafb;
  --color-text-muted:    #94a3b8;
  --color-text-subtle:   #475569;

  /* -- Typography -- */
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* -- Layout -- */
  --max-width:    1200px;

  /* ── Standard Tokens (auto-injected) ── */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --radius-default: 4px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

.font-mono,
code,
pre {
  font-family: var(--font-mono);
}

/* --- Scroll Reveal --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero Grid Pattern --- */
.hero-grid-pattern {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* --- Hero Badge --- */
.hero-badge {
  animation: fadeSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-text-col h1 {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-text-col p:nth-of-type(1) {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.hero-text-col p:nth-of-type(2) {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero-text-col .flex.flex-wrap.gap-4 {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.hero-text-col .flex.flex-wrap.gap-6 {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Avatar Float --- */
.avatar-float {
  animation: avatarFloat 6s ease-in-out infinite;
}

@keyframes avatarFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* --- Floating Tech Badges --- */
.float-badge-1 {
  animation: floatBadge1 5s ease-in-out infinite;
}
.float-badge-2 {
  animation: floatBadge2 6s ease-in-out 1s infinite;
}
.float-badge-3 {
  animation: floatBadge3 4.5s ease-in-out 0.5s infinite;
}

@keyframes floatBadge1 {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-8px) rotate(0deg); }
}

@keyframes floatBadge2 {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50%       { transform: translateY(-10px) rotate(0deg); }
}

@keyframes floatBadge3 {
  0%, 100% { transform: translateY(0) rotate(1deg); }
  50%       { transform: translateY(-6px) rotate(-1deg); }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 0.7; transform: translateX(-50%) translateY(4px); }
}

/* --- Availability Pulse --- */
.availability-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* --- Header scroll state --- */
#site-header {
  background-color: transparent;
}

#site-header.is-scrolled {
  background-color: rgba(2, 6, 23, 0.90);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --- Mobile Menu Panel --- */
.mobile-menu-panel {
  max-height: 0;
  overflow: hidden;
  background-color: rgba(2, 6, 23, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-panel.is-open {
  max-height: 400px;
}

/* --- Tech Badges --- */
.tech-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: #93c5fd;
  background-color: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 0.375rem;
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tech-badge:hover {
  background-color: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

/* --- Project Filter Buttons --- */
.filter-btn {
  background-color: transparent;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  font-family: var(--font-body);
}

.filter-btn:hover {
  color: #e2e8f0;
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(148, 163, 184, 0.25) !important;
}

.filter-btn.active {
  color: #93c5fd;
  background-color: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35) !important;
}

/* --- Project Card Filter Transitions --- */
.project-card {
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card.is-hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* --- Projects Grid layout when filtering --- */
#projects-grid {
  position: relative;
}

/* --- Skill Bars --- */
.skill-bar {
  width: 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-bar.is-animated {
  width: var(--skill-width);
}

/* --- Timeline item spacing on mobile --- */
@media (max-width: 767px) {
  .timeline-item .flex-1 {
    flex: 1;
  }
}

/* --- Form Focus --- */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto !important;
  }
}body { margin: 0; }
