/**
* Portfolio Visual Overhaul - "Devin.ai" Inspired Theme
* Author: Muhammad Nadeem (via AI Assistant)
*/

/*--------------------------------------------------------------
# Font Imports
--------------------------------------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Outfit:wght@500;700&family=JetBrains+Mono:wght@400&display=swap');

/*--------------------------------------------------------------
# Variables & Theme Setup
--------------------------------------------------------------*/
:root {
  /* Colors */
  --bg-color: #050505;
  --bg-secondary: #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --accent-cyan: #00f2ff;
  --accent-purple: #bd00ff;
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --section-padding: 100px 0;
}

/*--------------------------------------------------------------
# Global Reset & Base Styles
--------------------------------------------------------------*/
body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-purple);
  text-shadow: 0 0 10px rgba(189, 0, 255, 0.5);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}


/*--------------------------------------------------------------
# Header / Navbar
--------------------------------------------------------------*/
.header {
  padding: 20px 0;
  background: rgba(10, 10, 10, 0.6);
  /* Translucent start */
  backdrop-filter: blur(20px);
  /* Deeper blur */
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: fixed;
  width: 100%;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Match JS which adds .scrolled to body */
body.scrolled .header {
  padding: 12px 0;
  background: rgba(5, 5, 5, 0.95);
  /* darker on scroll */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo h1 {
  font-size: 24px;
  background: linear-gradient(90deg, #fff, var(--text-secondary), #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: -0.5px;
  animation: shine 5s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.navmenu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 1200px) {
  .navmenu ul {
    display: flex;
    align-items: center;
    gap: 30px;
  }
}

.navmenu li {
  white-space: nowrap;
}

.navmenu a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  /* Restore padding for click area */
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.navmenu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 4px;
  left: 50%;
  background-color: var(--accent-cyan);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navmenu a:hover,
.navmenu a.active {
  color: #fff;
  background: transparent;
  /* Remove blocky background */
  text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
  /* Glowing text */
}

.navmenu a:hover::after,
.navmenu a.active::after {
  width: 70%;
}

/* Mobile Nav */
.mobile-nav-toggle {
  color: white;
  font-size: 24px;
  transition: transform 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.mobile-nav-toggle:hover {
  color: var(--accent-cyan);
  transform: scale(1.1) rotate(5deg);
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-top: 80px;
  /* Offset fixed header */
  overflow: hidden;
  /* Prevent overflow from canvas */
}

#vanta-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  /* Background layer */
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  /* Content layer */
}


.hero h2 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, #fff 100%);
  /* Force white for visibility first */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff;
  /* Fallback */
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero .btn-get-started {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.hero .btn-get-started:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(189, 0, 255, 0.5);
}

@media (max-width: 768px) {
  .hero h2 {
    font-size: 2.5rem;
  }
}

/*--------------------------------------------------------------
# Technology Carousel
--------------------------------------------------------------*/
.tech-carousel-section {
  padding: 50px 0;
  background: linear-gradient(180deg, rgba(10, 10, 30, 0.4) 0%, rgba(5, 5, 20, 0.6) 100%);
  border-top: 1px solid rgba(0, 242, 255, 0.05);
  border-bottom: 1px solid rgba(0, 242, 255, 0.05);
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.tech-carousel-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.tech-carousel-track {
  display: flex;
  width: fit-content;
  gap: 40px;
  animation: scroll-left-to-right 40s linear infinite;
  padding: 10px 0;
}

.tech-carousel-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  background: rgba(255, 255, 255, 0.7);
  /* Frosted Glass look with more opacity */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  transition: all 0.4s ease;
  min-width: 160px;
  height: 80px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tech-carousel-item img {
  height: 38px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  transition: all 0.4s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tech-carousel-section:hover .tech-carousel-track {
  animation-play-state: paused;
}

.tech-carousel-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(0, 242, 255, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 242, 255, 0.2);
}

@keyframes scroll-left-to-right {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .tech-carousel-section {
    padding: 40px 0;
  }

  .tech-carousel-track {
    gap: 20px;
    animation-duration: 30s;
  }

  .tech-carousel-item {
    min-width: 130px;
    padding: 10px 20px;
    height: 70px;
  }

  .tech-carousel-item img {
    height: 30px;
  }
}

/*--------------------------------------------------------------
# Section Titles
--------------------------------------------------------------*/
.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 16px;
}

/*--------------------------------------------------------------
# Bento Grid (Featured Work)
--------------------------------------------------------------*/
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, minmax(250px, auto));
  gap: 20px;
}

.bento-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  transform: translateY(-5px) scale(1.02);
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Card Sizes */
/* Card Sizes */
.bento-col-2 {
  grid-column: span 2;
}

.bento-row-2 {
  grid-row: span 2;
}

@media (max-width: 991px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    /* Allow auto height */
  }

  .bento-col-2 {
    grid-column: span 2;
  }

  .bento-row-2 {
    grid-row: span 1;
    /* Reset row span on tablet to avoid gaps */
  }
}

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

  .bento-col-2 {
    grid-column: span 1;
  }

  .bento-row-2 {
    grid-row: span 1;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .section {
    padding: 60px 0;
  }
}

.bento-card .icon {
  font-size: 40px;
  color: var(--accent-cyan);
  margin-bottom: 20px;
}

.bento-card h4 {
  font-size: 1.5rem;
  font-weight: 600;
}

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

/* Glowing Border Gradient Animation on hover (optional advanced effect) */
.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
}

/*--------------------------------------------------------------
# Action Buttons (Repo / Demo)
--------------------------------------------------------------*/
.project-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  position: relative;
  z-index: 10;
}

.btn-sm-glass {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

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

/*--------------------------------------------------------------
# Legacy Projects (Grid)
--------------------------------------------------------------*/
.legacy-grid .service-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 25px;
  transition: 0.3s;
}

.legacy-grid .service-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/*--------------------------------------------------------------
# Resume Section
--------------------------------------------------------------*/
.resume .resume-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 20px;
  color: var(--accent-cyan);
}

.resume-item {
  padding: 0 0 20px 20px;
  margin-top: -2px;
  border-left: 2px solid var(--glass-border);
  position: relative;
}

.resume-item h4 {
  line-height: 18px;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 10px;
}

.resume-item h5 {
  font-size: 14px;
  background: var(--glass-bg);
  padding: 5px 15px;
  display: inline-block;
  font-weight: 600;
  margin-bottom: 10px;
  border-radius: 5px;
  color: var(--accent-cyan);
}

.resume-item::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50px;
  left: -9px;
  top: 0;
  background: var(--bg-color);
  border: 2px solid var(--accent-cyan);
}

/* Tech Chips */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.tech-stack li {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: 0.3s;
}

.tech-stack li:hover {
  border-color: var(--accent-purple);
  color: #fff;
  transform: translateY(-2px);
}

.tech-category {
  color: var(--accent-cyan);
  font-weight: bold;
  margin-right: 5px;
}

/*--------------------------------------------------------------
# About Section (Glass Card)
--------------------------------------------------------------*/
.about-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
}

/*--------------------------------------------------------------
# Contact / Calendar
--------------------------------------------------------------*/
.calendar-container {
  background: var(--glass-bg);
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  margin-top: 30px;
  text-align: center;
}

iframe {
  max-width: 100%;
  border-radius: 10px;
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.footer {
  background: #000;
  padding: 30px 0;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-secondary);
}