/* ===============================================
   ADVANCED PORTFOLIO STYLES - MOHAMED EMAD
   =============================================== */

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

:root {
  /* Colors - Modern Purple & Teal Palette */
  --primary-color: #7c3aed;
  --primary-dark: #5b21b6;
  --primary-light: #a855f7;
  --secondary-color: #14b8a6;
  --accent-color: #f59e0b;
  --text-dark: #0f172a;
  --text-light: #64748b;
  --text-white: #ffffff;
  --bg-white: #ffffff;
  --bg-light: #f1f5f9;
  --bg-dark: #1e1b4b;
  --border-color: #e2e8f0;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --gradient-secondary: linear-gradient(135deg, #14b8a6 0%, #06d6a0 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-dark: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Typography */
  --font-family: "Inter", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: var(--font-size-5xl);
}
h2 {
  font-size: var(--font-size-4xl);
}
h3 {
  font-size: var(--font-size-3xl);
}
h4 {
  font-size: var(--font-size-2xl);
}
h5 {
  font-size: var(--font-size-xl);
}
h6 {
  font-size: var(--font-size-lg);
}

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

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section-padding {
  padding: var(--spacing-3xl) 0;
}

.text-center {
  text-align: center;
}
.text-primary {
  color: var(--primary-color);
}
.text-secondary {
  color: var(--secondary-color);
}
.text-accent {
  color: var(--accent-color);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.navbar.scrolled .nav-logo {
  color: #333;
}

.navbar.scrolled .nav-logo .accent {
  color: var(--primary-color);
}

.navbar.scrolled .nav-link {
  color: #333;
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--primary-color);
}

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

.nav-logo {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-dark);
}

.nav-logo .accent {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
}

.nav-link {
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
  padding: var(--spacing-xs) 0;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle .bar {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient-dark);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("../images/hero-bg.jpg") center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.9) 0%,
    rgba(168, 85, 247, 0.8) 50%,
    rgba(20, 184, 166, 0.7) 100%
  );
}

.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation-delay: -2s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: -4s;
}

.shape-3 {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 20%;
  animation-delay: -1s;
}

.shape-4 {
  width: 120px;
  height: 120px;
  top: 30%;
  right: 30%;
  animation-delay: -3s;
}

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

.hero-container {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-white);
  max-width: 800px;
  padding: 0 var(--spacing-md);
}

.hero-image {
  position: relative;
  display: inline-block;
  margin-bottom: var(--spacing-lg);
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
  object-position: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.profile-img::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: conic-gradient(
    from 0deg,
    var(--primary-color),
    var(--secondary-color),
    var(--accent-color),
    var(--primary-color)
  );
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.08) translateY(-5px);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.profile-img:hover::before {
  opacity: 1;
  animation: rotate-border 3s linear infinite;
}

@keyframes rotate-border {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  background: var(--accent-color);
  color: white;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-2xl);
  font-size: var(--font-size-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  margin: var(--spacing-md) auto var(--spacing-lg);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.status-indicator:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: var(--gradient-accent);
  border-color: rgba(255, 255, 255, 0.4);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.9);
}

.hero-location {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
}

.hero-location i {
  color: var(--accent-color);
}

.hero-description {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  min-width: 120px;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  display: block;
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-white);
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: var(--spacing-xs);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: var(--font-size-base);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-secondary);
  color: var(--text-white);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: transparent;
  color: var(--text-white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
}

.social-link {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: var(--font-size-lg);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-arrow {
  width: 2px;
  height: 30px;
  background: rgba(255, 255, 255, 0.5);
  position: relative;
  animation: scroll-bounce 2s infinite;
}

.scroll-arrow::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
}

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

/* Section Styles */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.section-tag {
  display: inline-block;
  background: var(--gradient-primary);
  color: var(--text-white);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
}

.section-description {
  font-size: var(--font-size-lg);
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* About Section */
.about-section {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-light);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

.about-card {
  background: var(--bg-white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.about-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.about-card h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.about-card p {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

.language-skills {
  margin-top: var(--spacing-lg);
}

.language-skills h4 {
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-lg);
}

.language-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.language-item:last-child {
  border-bottom: none;
}

.language-level {
  background: var(--gradient-accent);
  color: var(--text-white);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

/* Quick Facts */
.quick-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.fact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: var(--bg-light);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  border-left: 4px solid var(--primary-color);
}

.fact-item:hover {
  background: rgba(124, 58, 237, 0.05);
  transform: translateX(5px);
}

.fact-item i {
  color: var(--primary-color);
  font-size: var(--font-size-lg);
  width: 20px;
  text-align: center;
}

.fact-item span {
  font-weight: 500;
  color: var(--text-dark);
  font-size: var(--font-size-sm);
}

.image-wrapper {
  position: relative;
  /* overflow: hidden; */
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  transition: all 0.3s ease;
  width: 76%;

}

.image-wrapper:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(124, 58, 237, 0.1);
}

.about-img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-2xl);
  transition: all 0.4s ease;
  position: relative;
}

.image-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(124, 58, 237, 0.1) 0%,
    rgba(168, 85, 247, 0.05) 50%,
    rgba(20, 184, 166, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-2xl);
  z-index: 1;
}

.image-wrapper:hover::before {
  opacity: 1;
}

.image-wrapper::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color),
    var(--accent-color),
    var(--primary-color)
  );
  border-radius: var(--radius-2xl);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-wrapper:hover::after {
  opacity: 0.3;
}

.floating-icons {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.icon-item {
  position: absolute;
  width: 70px;
  height: 70px;
  background: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: float 3s ease-in-out infinite;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.icon-item:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.icon-item::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, currentColor, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.icon-item:hover::before {
  opacity: 0.3;
  animation: rotate-border 2s linear infinite;
}
.icon-item .f-icon {
  width: 32px; /* make it “small” */
  height: 32px;
  color: #02569b; /* set the Flutter blue (or any blue you like) */
}

.icon-item.flutter {
  top: 10%;
  right: -10px;
  color: #02569b;
  animation-delay: -1s;
  /* margin-top: 10px; */
}
.icon-item.dart {
  top: 25%;
  right: -10px;
  color: #02569b;
  animation-delay: -1s;
  /* margin-top: 10px; */
}

.icon-item.react {
  top: 55%;
  right: -10px;
  color: #61dafb;
  animation-delay: -2s;
}

.icon-item.firebase {
  top: 40%;
  right: -20px;
  color: #ffca28;
  animation-delay: -4s;
}

/* Skills Section */
.skills-section {
  padding: var(--spacing-3xl) 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-xl);
}

.skill-category {
  background: var(--bg-white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
}

.category-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.category-header i {
  font-size: var(--font-size-2xl);
  color: var(--primary-color);
}

.category-header h3 {
  color: var(--text-dark);
  margin: 0;
}

.skill-item {
  margin-bottom: var(--spacing-lg);
}

.skill-item:last-child {
  margin-bottom: 0;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xs);
}

.skill-name {
  font-weight: 600;
  color: var(--text-dark);
}

.skill-level {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  font-weight: 600;
}

.skill-bar {
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  transition: width 1s ease;
  position: relative;
}

.skill-progress::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5));
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-20px);
  }
  100% {
    transform: translateX(20px);
  }
}

/* Portfolio Section */
.portfolio-section {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-light);
}

.portfolio-filter {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 2px solid var(--border-color);
  background: var(--bg-white);
  color: var(--text-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary-color);
  color: var(--text-white);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-xl);
}

/* Enhanced Portfolio Cards */
.portfolio-item {
  transition: all 0.3s ease;
}

.project-card {
  background: var(--bg-white);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--border-color);
  position: relative;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.project-image-container {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 0.3s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(124, 58, 237, 0.9), rgba(168, 85, 247, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  flex-direction: column;
  gap: var(--spacing-sm);
}

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

.project-year {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-white);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.featured-badge {
  background: var(--gradient-accent);
  color: var(--text-white);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-md);
}

.project-content {
  padding: var(--spacing-lg);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
  gap: var(--spacing-sm);
}

.project-title {
  color: var(--text-dark);
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.status-badge {
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.status-completed {
  background: rgba(34, 197, 94, 0.1);
  color: #059669;
  border: 1px solid #059669;
}

.status-in-development {
  background: rgba(251, 191, 36, 0.1);
  color: #d97706;
  border: 1px solid #d97706;
}

.status-graduation-project {
  background: rgba(139, 69, 19, 0.1);
  color: #8b4513;
  border: 1px solid #8b4513;
}

.status-competition-entry {
  background: rgba(147, 51, 234, 0.1);
  color: #9333ea;
  border: 1px solid #9333ea;
}

.project-description {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-sm);
}

.project-tech {
  display: flex;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.tech-badge {
  background: var(--bg-light);
  color: var(--primary-color);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: 500;
  border: 1px solid var(--primary-color);
  transition: all 0.3s ease;
}

.tech-badge:hover {
  background: var(--primary-color);
  color: var(--text-white);
}

.project-links {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.project-status {
  color: var(--text-light);
  font-style: italic;
  font-size: var(--font-size-sm);
}

/* Experience Section */
.experience-section {
  padding: var(--spacing-3xl) 0;
}

.experience-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-3xl);
}

.timeline {
  position: relative;
  padding-left: var(--spacing-xl);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-xl);
  padding-left: var(--spacing-xl);
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  padding-left: calc(var(--spacing-xl) + var(--spacing-lg));
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border-left: 4px solid var(--primary-color);
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -9px;
  top: calc(var(--spacing-lg) + 10px);
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid var(--bg-white);
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.timeline-icon {
  position: absolute;
  left: var(--spacing-md);
  top: var(--spacing-lg);
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: var(--font-size-lg);
  box-shadow: var(--shadow-md);
}

.timeline-date {
  display: inline-block;
  background: var(--gradient-accent);
  color: var(--text-white);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  position: absolute;
  right: var(--spacing-lg);
  top: var(--spacing-lg);
}

.timeline-content {
  padding-left: 60px;
}

.timeline-content h3 {
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
  font-size: var(--font-size-xl);
  margin-top: var(--spacing-sm);
}

.timeline-content h4 {
  color: var(--primary-color);
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
}

.timeline-content h5 {
  color: var(--text-light);
  font-size: var(--font-size-base);
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  font-style: italic;
}

.timeline-content p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
}

.timeline-achievements {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-top: var(--spacing-md);
}

.achievement {
  background: var(--bg-light);
  color: var(--primary-color);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border: 1px solid var(--primary-color);
}

.certifications h3 {
  color: var(--text-dark);
  margin-bottom: var(--spacing-lg);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.cert-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.cert-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.cert-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: var(--font-size-xl);
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.cert-content {
  flex: 1;
}

.cert-content h4 {
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.cert-content p {
  color: var(--text-light);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-sm);
}

.cert-badge {
  display: inline-block;
  background: var(--gradient-accent);
  color: var(--text-white);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Contact Section */
.contact-section {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-light);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-md);
  transition: transform 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: var(--font-size-xl);
  flex-shrink: 0;
}

.contact-details h4 {
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
  font-size: var(--font-size-lg);
}

.contact-details p {
  color: var(--text-light);
  margin: 0;
  margin-bottom: var(--spacing-xs);
}

.contact-details a {
  color: var(--primary-color);
  margin: 0;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-details a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.availability {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--accent-color);
  font-weight: 500;
  margin-top: var(--spacing-xs);
  font-style: italic;
}

.contact-form {
  background: var(--bg-white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--spacing-md);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(2, 86, 155, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background: var(--gradient-dark);
  color: var(--text-white);
  padding: var(--spacing-xl) 0;
  position: relative;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.footer-text p:first-child {
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: var(--font-size-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2.5rem;
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
    --spacing-3xl: 3rem;
    --spacing-2xl: 2rem;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: var(--spacing-xl);
    transition: left 0.3s ease;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

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

  .experience-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .footer-content {
    text-align: center;
    flex-direction: column;
  }
}
