/* Main CSS for Khaled Elnezily Portfolio */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Raleway:wght@300;400;500;600&family=Montserrat:wght@300;400;500;600&display=swap');

/* CSS Variables */
:root {
  --primary-color: #1a5f7a;
  --secondary-color: #e6ddc6;
  --accent-color: #d57149;
  --light-gray: #f8f8f8;
  --dark-gray: #333333;
  --text-color: #222222;
  --white: #ffffff;
  --transition-slow: 0.5s ease;
  --transition-medium: 0.3s ease;
  --transition-fast: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Raleway', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-color);
}

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

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.btn:hover {
  background-color: var(--accent-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all var(--transition-medium);
}

.header.scrolled {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

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

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

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  position: relative;
}

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

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

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px;
  transition: all var(--transition-medium);
}

/* Hero Section */
.hero {
  height: 100vh;
  background-color: var(--light-gray);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--dark-gray);
  font-family: 'Montserrat', sans-serif;
}

.hero-text {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 1;
}

.scroll-indicator span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.scroll-indicator .arrow {
  width: 30px;
  height: 30px;
  border-right: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(45deg);
  }
  40% {
    transform: translateY(-10px) rotate(45deg);
  }
  60% {
    transform: translateY(-5px) rotate(45deg);
  }
}

/* About Section */
.about {
  background-color: var(--white);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.about-image {
  flex: 1;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text {
  flex: 1;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.skills {
  margin-top: 2rem;
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
}

.skill-bar {
  height: 8px;
  background-color: var(--light-gray);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 4px;
  width: 0;
  transition: width 1.5s ease;
}

/* Projects Section */
.projects {
  background-color: var(--light-gray);
}

.projects-filter {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  margin: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--dark-gray);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--accent-color);
}

.filter-btn.active::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--accent-color);
  margin: 5px auto 0;
}

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

.project-card {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-medium);
  height: 300px;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-medium);
}

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

.project-title {
  color: var(--white);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.project-location {
  color: var(--secondary-color);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-link {
  align-self: flex-start;
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  position: relative;
  padding-bottom: 5px;
}

.project-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
}

/* Experience Section */
.experience {
  background-color: var(--white);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--light-gray);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  opacity: 0;
  transform: translateY(50px);
  transition: all var(--transition-slow);
}

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

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--white);
  border: 4px solid var(--primary-color);
  border-radius: 50%;
  top: 15px;
  z-index: 1;
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item.left::after {
  right: -10px;
}

.timeline-item.right::after {
  left: -10px;
}

.timeline-content {
  padding: 20px;
  background-color: var(--light-gray);
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-date {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.timeline-title {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.timeline-location {
  font-style: italic;
  color: var(--dark-gray);
  margin-bottom: 1rem;
}

/* Contact Section */
.contact {
  background-color: var(--light-gray);
}

.contact-content {
  display: flex;
  gap: 4rem;
}

.contact-info {
  flex: 1;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.contact-icon {
  margin-right: 1rem;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-text h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--white);
  transition: all var(--transition-medium);
}

.social-link:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

.contact-form {
  flex: 1;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Raleway', sans-serif;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
.footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}

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

.footer-text {
  max-width: 500px;
  margin: 0 auto 2rem;
}

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

.footer-links li {
  margin: 0 1rem;
}

.footer-links a {
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
}

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

.copyright {
  font-size: 0.9rem;
  color: #aaa;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
  z-index: 999;
}

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

.back-to-top:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

/* Project Detail Page Styles */
.project-detail {
  padding-top: 80px;
}

.project-header {
  height: 50vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.7);
}

.project-header-content {
  text-align: center;
  color: var(--white);
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.project-header-title {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.project-header-location {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.project-slider-container {
  margin: 4rem 0;
}

.project-slider {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-slide {
  width: 100%;
  height: 600px;
}

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

.project-info {
  margin: 4rem 0;
}

.project-description {
  max-width: 800px;
  margin: 0 auto;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  background-color: var(--light-gray);
  padding: 2rem;
  border-radius: 5px;
}

.meta-item h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.meta-item p {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0;
}

.project-navigation {
  display: flex;
  justify-content: space-between;
  margin: 4rem 0;
}

.nav-project {
  display: flex;
  align-items: center;
  transition: all var(--transition-medium);
}

.nav-project:hover {
  transform: translateX(-10px);
}

.nav-project.next:hover {
  transform: translateX(10px);
}

.nav-project span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dark-gray);
}

.nav-project h4 {
  margin-bottom: 0;
  margin-top: 0.5rem;
}

.nav-project.next {
  text-align: right;
}

.related-projects {
  margin: 4rem 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Media Queries */
@media screen and (max-width: 1024px) {
  html {
    font-size: 15px;
  }
  
  .about-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  .contact-content {
    flex-direction: column;
    gap: 2rem;
  }
  
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item.right {
    left: 0;
  }
  
  .timeline-item.left::after,
  .timeline-item.right::after {
    left: 21px;
  }
}

@media screen and (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    background-color: var(--white);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform var(--transition-medium);
    z-index: 999;
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-links li {
    margin: 1rem 0;
  }
  
  .hamburger {
    display: block;
  }
  
  .hamburger.active div:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .hamburger.active div:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active div:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .project-slide {
    height: 400px;
    
  }
}

@media screen and (max-width: 480px) {
  html {
    font-size: 13px;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .projects-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .project-slide {
    height: 300px;
  }
  
  .project-navigation {
    flex-direction: column;
    gap: 2rem;
  }
  
  .nav-project.next {
    align-self: flex-end;
  }
}

