/* ============================================
   Zeeshan Yousuf - Portfolio
   Dark modern theme with gradient accents
   ============================================ */

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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #1f1f35;
  --text-primary: #e8e8f0;
  --text-secondary: #9999b3;
  --text-muted: #666680;
  --accent-1: #6c63ff;
  --accent-2: #00d4aa;
  --accent-gradient: linear-gradient(135deg, #6c63ff 0%, #00d4aa 100%);
  --accent-gradient-text: linear-gradient(135deg, #6c63ff 0%, #00d4aa 50%, #6c63ff 100%);
  --border-subtle: rgba(108, 99, 255, 0.15);
  --shadow-glow: 0 0 30px rgba(108, 99, 255, 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent-2); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-1); }

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

/* --- Background Effects --- */
.bg-grid {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(108, 99, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 99, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}

.bg-glow-1 { top: -200px; right: -200px; background: var(--accent-1); }
.bg-glow-2 { bottom: -200px; left: -200px; background: var(--accent-2); }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition);
}

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

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text-primary);
  margin: 6px 0;
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 2rem;
}

.hero-content {
  max-width: var(--max-width);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text { animation: fadeInUp 0.8s ease-out; }

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent-2);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.hero-name .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.hero-summary {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.4);
  color: #fff;
}

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

.btn-outline:hover {
  border-color: var(--accent-1);
  background: rgba(108, 99, 255, 0.05);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Hero photo */
.hero-photo {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.photo-frame {
  position: relative;
  width: 340px;
  height: 340px;
}

.photo-frame::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--accent-gradient);
  opacity: 0.6;
  animation: rotate 8s linear infinite;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  border: 4px solid var(--bg-primary);
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  border: 4px solid var(--bg-primary);
  font-size: 5rem;
  color: var(--text-muted);
}

/* Floating tech badges around photo */
.tech-float {
  position: absolute;
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  z-index: 2;
  animation: float 3s ease-in-out infinite;
  white-space: nowrap;
}

.tech-float:nth-child(2) { top: -5%; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.tech-float:nth-child(3) { top: 10%; right: -18%; animation-delay: 0.5s; }
.tech-float:nth-child(4) { top: 40%; right: -22%; animation-delay: 1s; }
.tech-float:nth-child(5) { bottom: 10%; right: -15%; animation-delay: 1.5s; }
.tech-float:nth-child(6) { bottom: -5%; left: 50%; transform: translateX(-50%); animation-delay: 2s; }
.tech-float:nth-child(7) { bottom: 15%; left: -15%; animation-delay: 2.5s; }
.tech-float:nth-child(8) { top: 15%; left: -15%; animation-delay: 3s; }

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

/* --- Section Shared --- */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 3rem;
}

/* --- Stats Bar (landing) --- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

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

.stat:hover {
  border-color: var(--accent-1);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- Skills Marquee (landing) --- */
.skills-marquee {
  overflow: hidden;
  padding: 2rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin: 3rem 0;
}

.marquee-track {
  display: flex;
  gap: 2rem;
  animation: scroll 30s linear infinite;
  width: max-content;
}

.marquee-track:hover { animation-play-state: paused; }

.skill-tag {
  padding: 0.5rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  white-space: nowrap;
}

@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* --- Timeline (about page) --- */
.timeline { position: relative; padding-left: 3rem; }

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-1), var(--accent-2), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -3rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-gradient);
  transform: translateX(-5px);
  box-shadow: 0 0 10px rgba(108, 99, 255, 0.4);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  margin-bottom: 0.3rem;
}

.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.timeline-project {
  font-weight: 600;
  color: var(--accent-2);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  margin-top: 1rem;
}

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

.timeline-desc li {
  margin-bottom: 0.4rem;
  list-style: none;
  position: relative;
  padding-left: 1.2rem;
}

.timeline-desc li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent-1);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* --- Skills Grid (about page) --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

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

.skill-category-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

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

.skill-tag-sm {
  padding: 0.3rem 0.7rem;
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.15);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* --- Project Cards --- */
.project-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 3rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.project-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.project-hero:hover {
  border-color: var(--accent-1);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.project-hero-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(108, 99, 255, 0.15);
  color: var(--accent-1);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.project-hero-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-hero-subtitle {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.project-hero-details {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.project-hero-details li {
  list-style: none;
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.project-hero-details li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-weight: 700;
}

.project-hero-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.project-hero-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

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

.project-card-preview {
  height: 180px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-icon {
  font-size: 3rem;
  opacity: 0.5;
}

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

.project-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-card-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-badge {
  padding: 0.25rem 0.6rem;
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-2);
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--accent-2); }

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

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-photo { order: -1; }
  .photo-frame { width: 240px; height: 240px; }
  .hero-summary { margin: 0 auto 2rem; }
  .hero-cta { justify-content: center; }
  .tech-float { display: none; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(10, 10, 15, 0.95);
    padding: 1rem 2rem;
    gap: 1rem;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-toggle { display: block; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

  .timeline { padding-left: 2rem; }

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

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}

/* --- Page header (non-home) --- */
.page-header {
  padding: 8rem 2rem 3rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-header-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.page-header-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* --- Contact Section --- */
.contact-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.contact-link:hover {
  border-color: var(--accent-1);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* --- Professional Experience Cards (about page alt) --- */
.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.exp-card:hover {
  border-color: var(--accent-1);
  box-shadow: var(--shadow-glow);
}
