/* =========================================
   LIGHT PROFESSIONAL THEME
   =========================================
   Author: GitHub Copilot for Mohamed Magdy
   Description: Clean, modern light theme for HR-friendly portfolio
   ========================================= */

/* =========================================
   Variables
   ========================================= */
:root {
  /* Core Theme Colors */
  --primary-color: #4a6cf7;
  --primary-hover: #3c58d8;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #212529;

  /* Background Colors */
  --bg-white: #ffffff;
  --bg-light: #f8f9fb;
  --bg-lighter: #f4f6ff;
  --bg-gradient: linear-gradient(120deg, #f6f9ff 0%, #eef3ff 100%);

  /* Text Colors */
  --text-primary: #293452;
  --text-secondary: #6c757d;
  --text-muted: #8e94a3;
  --text-white: #ffffff;

  /* Border Colors */
  --border-color: #e9ecef;
  --border-light: #edf2f7;

  /* Box Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.12);

  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-secondary: 'Poppins', sans-serif;

  /* Transitions */
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
  --transition-slow: all 0.5s ease;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-rounded: 50%;

  /* Spacing */
  --section-spacing: 100px;
}

/* =========================================
   Base Styles
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  line-height: 1.7;
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-normal);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lead {
  font-size: 1.15rem;
  font-weight: 400;
}

img {
  max-width: 100%;
  height: auto;
}

.text-primary {
  color: var(--primary-color) !important;
}

.bg-light {
  background-color: var(--bg-light) !important;
}

.bg-white {
  background-color: var(--bg-white) !important;
}

.container {
  padding: 0 1.5rem;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-block;
  font-weight: 500;
  font-family: var(--font-primary);
  text-align: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
  padding: 1rem 0;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  z-index: 999;
}

.navbar.scrolled {
  padding: 0.75rem 0;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-light .navbar-nav .nav-link {
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  font-weight: 500;
  position: relative;
  transition: var(--transition-fast);
}

.navbar-light .navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition-normal);
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
  width: calc(100% - 2rem);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--primary-color);
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
  padding: 10rem 0 6rem;
  background: var(--bg-gradient);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  display: inline-block;
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-buttons .btn {
  margin-right: 1rem;
  margin-bottom: 1rem;
}

.hero-image {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-icon {
  width: 200px;
  height: 200px;
  background-color: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 3;
}

.blob {
  position: absolute;
  width: 450px;
  height: 450px;
  background: linear-gradient(120deg, rgba(74, 108, 247, 0.2), rgba(74, 108, 247, 0.05));
  border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  transform: rotate(-20deg);
  animation: morph 15s linear infinite;
  z-index: 1;
}

@keyframes morph {
  0% {
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  }
  25% {
    border-radius: 40% 60% 60% 40% / 55% 45% 55% 45%;
  }
  50% {
    border-radius: 60% 40% 50% 50% / 50% 50% 50% 50%;
  }
  75% {
    border-radius: 50% 50% 40% 60% / 45% 55% 45% 55%;
  }
  100% {
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
  }
}

/* =========================================
   Section Styles
   ========================================= */
.section-padding {
  padding: calc(var(--section-spacing) / 1.5) 0;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-subtitle {
  display: inline-block;
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.section-title {
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

.section-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
}

/* =========================================
   About Section
   ========================================= */
.professional-avatar {
  width: 350px;
  height: 350px;
  background: linear-gradient(120deg, var(--primary-color) 0%, #8a94e2 100%);
  border-radius: var(--radius-rounded);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  color: var(--text-white);
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.professional-avatar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
  z-index: 1;
}

.about-content {
  padding: 1rem 0;
}

.about-content h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.about-key-points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.key-point {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.key-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(74, 108, 247, 0.1);
  border-radius: var(--radius-rounded);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.key-text h5 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.key-text p {
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.about-footer {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
  color: var(--text-secondary);
}

.about-location,
.about-education {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-location i,
.about-education i {
  color: var(--primary-color);
}

/* =========================================
   Experience Section
   ========================================= */
.experience-timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline-item {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0;
  margin-bottom: 2.5rem;
  transition: var(--transition-normal);
  border-left: 4px solid var(--primary-color);
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.timeline-content {
  padding: 2rem;
}

.timeline-period {
  display: inline-block;
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.timeline-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-company {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.timeline-details {
  list-style-type: disc;
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.timeline-details li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.timeline-tech span {
  background-color: var(--bg-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* =========================================
   Projects Section
   ========================================= */
.project-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  height: 100%;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-hover);
}

.project-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(120deg, var(--primary-color) 0%, #8a94e2 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.project-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.8rem;
}

.project-card h4 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tech span {
  background-color: var(--bg-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.project-metric {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-metric i {
  color: var(--primary-color);
}

.additional-projects {
  background: linear-gradient(120deg, var(--primary-color) 0%, #8a94e2 100%);
  border-radius: var(--radius-md);
  padding: 2rem;
  color: var(--text-white);
  box-shadow: var(--shadow-lg);
}

.additional-projects h5 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-white);
}

.additional-projects p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

/* =========================================
   Skills Section - Tag Based (New)
   ========================================= */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.skill-category {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  transition: var(--transition-normal);
}

.skill-category:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.category-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.category-title i {
  color: var(--primary-color);
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-tag {
  background-color: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: var(--transition-normal);
  border: 1px solid transparent;
}

.skill-tag:hover {
  transform: translateY(-3px);
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.skill-tag.expert {
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(74, 108, 247, 0.3);
  font-weight: 500;
  position: relative;
}

.skill-tag.expert::after {
  content: '★';
  margin-left: 0.4rem;
}

@media (max-width: 767.98px) {
  .skills-tags {
    gap: 0.6rem;
  }

  .skill-tag {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* =========================================
   Contact Section
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.contact-card {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition-normal);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.contact-icon {
  width: 70px;
  height: 70px;
  background-color: rgba(74, 108, 247, 0.1);
  border-radius: var(--radius-rounded);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1.5rem;
  transition: var(--transition-normal);
}

.contact-card:hover .contact-icon {
  background: var(--primary-color);
  color: var(--text-white);
}

.contact-card h4 {
  margin-bottom: 1rem;
}

.contact-card p {
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-card a {
  color: var(--text-secondary);
}

.contact-card a:hover {
  color: var(--primary-color);
}

.cta-download {
  margin-top: 3rem;
}

/* =========================================
   Footer
   ========================================= */
.footer {
  background-color: var(--bg-light);
  padding: 2rem 0;
  border-top: 1px solid var(--border-light);
}

.footer p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-social {
    justify-content: flex-end;
  }
}

.footer-social a {
  width: 40px;
  height: 40px;
  background-color: var(--bg-white);
  border-radius: var(--radius-rounded);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-normal);
}

.footer-social a:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
  transform: translateY(-3px);
}

/* =========================================
   Back to Top Button
   ========================================= */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--text-white);
  border-radius: var(--radius-rounded);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: var(--shadow-md);
  border: none;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* =========================================
   Responsive Styles
   ========================================= */
@media (max-width: 1199.98px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 991.98px) {
  :root {
    --section-spacing: 80px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1.1rem;
  }

  .hero-section {
    padding: 8rem 0 5rem;
  }

  .about-key-points {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767.98px) {
  :root {
    --section-spacing: 60px;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .hero-section {
    padding: 7rem 0 4rem;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .professional-avatar {
    width: 250px;
    height: 250px;
    font-size: 6rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  :root {
    --section-spacing: 50px;
  }

  h1, .hero-title {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .hero-section {
    padding: 6rem 0 3rem;
  }

  .professional-avatar {
    width: 200px;
    height: 200px;
    font-size: 5rem;
  }

  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-right: 0;
    margin-bottom: 1rem;
  }

  .timeline-content {
    padding: 1.5rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
