/* ============================================
   SAJJAD HAQ — PORTFOLIO STYLES
   Premium dark-mode design with glassmorphism,
   gradient accents, and scroll-reveal animations.
   ============================================ */

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.06);
  --border-card-hover: rgba(255, 255, 255, 0.12);

  --text-primary: #f0f0f5;
  --text-secondary: #9a9ab0;
  --text-muted: #5a5a70;

  --accent-cyan: #00d4ff;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-blue: #3b82f6;

  --gradient-primary: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  --gradient-hero: linear-gradient(135deg, #00d4ff 0%, #a855f7 50%, #ec4899 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(168, 85, 247, 0.2));

  --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.08);
  --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-height: 72px;
  --container-max: 1100px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- CANVAS BACKGROUND ---------- */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- CONTAINER ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ---------- SECTION TITLES ---------- */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition-fast);
}

#navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.logo-dot {
  color: var(--accent-cyan);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: width var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--gradient-primary);
  color: var(--bg-primary) !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  -webkit-text-fill-color: var(--bg-primary);
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO
   ============================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 2rem) 24px 2rem;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: var(--container-max);
  text-align: center;
}

/* Profile image */
.hero-image-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}

.hero-image-glow {
  position: absolute;
  inset: -8px;
  border-radius: var(--radius-full);
  background: var(--gradient-hero);
  opacity: 0.5;
  filter: blur(20px);
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.65; transform: scale(1.05); }
}

.hero-image {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

/* Hero text */
.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent-cyan);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.25rem 0;
}

.hero-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 1.25rem;
  line-height: 1.6;
}

/* Badges */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.badge-ai {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(168, 85, 247, 0.1));
  border-color: rgba(0, 212, 255, 0.2);
  color: var(--accent-cyan);
}

/* Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-primary);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--bg-primary);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
  margin-top: auto;
  padding-bottom: 2rem;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.3; }
  50%      { transform: rotate(45deg) translateY(8px); opacity: 0.7; }
}

/* ============================================
   ABOUT
   ============================================ */
#about {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2.5rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.8;
}

.about-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition-smooth);
}

.highlight-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.highlight-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.highlight-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* ============================================
   PROJECTS
   ============================================ */
#projects {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.project-card:hover::before {
  opacity: 1;
}

.project-header {
  margin-bottom: 1rem;
}

.project-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.project-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.project-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* Project highlight pills */
.project-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.ph-item {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.12);
  color: var(--accent-cyan);
  font-weight: 500;
  white-space: nowrap;
}

/* Tech tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 500;
}

/* Project links */
.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.project-link:hover {
  color: var(--accent-cyan);
}

.project-link svg {
  flex-shrink: 0;
}

/* ============================================
   SKILLS
   ============================================ */
#skills {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-smooth);
}

.skill-category:hover {
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-glow);
}

.skill-category-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.skill-category-title svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: default;
}

.skill-tag:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.skill-tag.highlight {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(168, 85, 247, 0.1));
  border-color: rgba(0, 212, 255, 0.25);
  color: var(--accent-cyan);
}

.skill-tag.highlight:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(168, 85, 247, 0.18));
  border-color: rgba(0, 212, 255, 0.40);
}

/* ============================================
   EXPERIENCE
   ============================================ */
#experience {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.experience-timeline {
  max-width: 700px;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.exp-card {
  display: flex;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-smooth);
}

.exp-card:hover {
  border-color: var(--border-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.exp-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  white-space: nowrap;
  min-width: 100px;
  padding-top: 2px;
}

.exp-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.exp-company {
  font-size: 0.9rem;
  color: var(--accent-purple);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.exp-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   CONTACT
   ============================================ */
#contact {
  padding: 6rem 0 4rem;
  position: relative;
  z-index: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 650px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  transition: all var(--transition-smooth);
  text-align: center;
}

.contact-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.contact-card svg {
  color: var(--accent-cyan);
  transition: transform var(--transition-spring);
}

.contact-card:hover svg {
  transform: scale(1.15);
}

.contact-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-handle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-highlights {
    grid-template-columns: repeat(4, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .exp-card {
    flex-direction: column;
    gap: 0.5rem;
  }

  .exp-date {
    min-width: auto;
  }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 640px) {
  :root {
    --nav-height: 60px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
    gap: 1.5rem;
    transition: right var(--transition-smooth);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .nav-cta {
    text-align: center;
    padding: 12px 24px;
  }

  .hero-image-wrapper {
    width: 140px;
    height: 140px;
  }

  .hero-image {
    width: 140px;
    height: 140px;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }

  .about-highlights {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }

  .project-card {
    padding: 1.5rem;
  }
}
