/* --- MASABFAROOQUE THEME DESIGN --- */
:root {
  /* Colors */
  --bg-dark: #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  
  --accent-cyan: #22d3ee;
  --accent-purple: #818cf8;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-body: 'Inter', sans-serif;
  
  --transition: all 0.3s ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* Background Grid Pattern */
.bg-grid {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100vh;
  z-index: -1;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 60%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 60%);
}

/* Base Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  width: 90%;
  max-width: 1000px;
  padding: 1rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  /* Disconnected Pill Shape & Bluish Glass Outline */
  border-radius: 50px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(34, 211, 238, 0.1);
  
  transform: translate(-50%, -150%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.navbar.visible {
  transform: translate(-50%, 0);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

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

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.2);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; /* Centered */
  text-align: center; /* Centered */
  padding-top: 8rem;
  padding-bottom: 4rem;
}

/* Hero Typography */
.hero-title {
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

/* Animated Text */
.animated-text-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  min-height: 2.5rem;
}

.dynamic-text {
  color: var(--accent-cyan);
  display: inline-block;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.dynamic-text.fade-out {
  opacity: 0;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
  margin-left: auto;
  margin-right: auto;
}

/* Tech Stack Array */
.tech-stack {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}

.tech-icon {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: .9rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  width: 80px;
  height: 80px;
}

.tech-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(244, 245, 246, 0.4));
}

.tech-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

/* Buttons */
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  border: none;
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(34, 211, 238, 0.3);
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Glass Card Global Spec (Shared for About + Projects) */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
}

/* About Section */
.about-section {
  padding: 4rem 0;
}

.gradient-underline {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 4px;
  margin-top: 0.5rem;
}

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-card {
  padding: 2.5rem;
  transition: var(--transition);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.card-text {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

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

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.5rem;
}

.icon-cyan {
  color: var(--accent-cyan);
  box-shadow: inset 0 0 20px rgba(34, 211, 238, 0.05);
}

.icon-purple {
  color: var(--accent-purple);
  box-shadow: inset 0 0 20px rgba(129, 140, 248, 0.05);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.cyan-text { color: var(--accent-cyan); text-shadow: 0 0 20px rgba(34, 211, 238, 0.3); }
.purple-text { color: var(--accent-purple); text-shadow: 0 0 20px rgba(129, 140, 248, 0.3); }

.stat-label {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

/* Services Section */
.services-section {
  padding: 4rem 0;
}

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

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.5rem;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.service-card p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Portfolio Section */
.portfolio-section {
  padding: 4rem 0 8rem;
}

.section-header {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* 2-Column Bento Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* Mobile responsive */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
  display: flex;
  flex-direction: column;
}

.hover-scale:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 211, 238, 0.05);
}

/* Image Header */
.project-img {
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.img-placeholder {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}

/* Placeholder gradient variants */
.bg-cyber { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%); }
.bg-stellar { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
.bg-void { background: linear-gradient(135deg, #020617 0%, #0f172a 100%); border-bottom: 1px solid var(--glass-border); }
.bg-neon { background: linear-gradient(135deg, #172554 0%, #1e1b4b 100%); }

.project-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tag {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-cyan);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.view-project-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.view-project-link:hover {
  color: var(--accent-cyan);
  gap: 0.8rem;
}

.clickable-card {
  cursor: pointer;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 2rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-dark);
  border: 1px solid var(--glass-border);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 2rem;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.close-btn:hover {
  background: var(--accent-cyan);
  color: #000;
}

.modal-media {
  width: 100%;
  height: 300px;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 2rem;
  position: relative;
}

.video-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-settings-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.modal-body h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.modal-body p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.modal-footer {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.store-btn svg {
  width: 20px;
  height: 20px;
}

/* Footer Section */
.footer {
  border-top: 1px solid var(--glass-border);
  background: rgba(10, 10, 10, 0.95);
  padding: 5rem 5% 2rem;
  text-align: center;
}

.footer-container {
  max-width: 600px;
  margin: 0 auto 4rem auto;
}

.footer-container h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-container p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .hero { padding-top: 6rem; }
}
