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

/* Variables for Color Scheme */
:root {
  --primary-color: #2C3E50;
  --accent-color: #E67E22;
  --light-gray: #ECF0F1;
  --white: #FFFFFF;
  --text-color: #333333;
  --footer-bg: #34495E;
}

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

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--light-gray);
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Navigation Bar */
.navbar {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.navbar .logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  text-decoration: none;
  color: var(--white);
  transition: color 0.3s ease;
}

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

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

.navbar .nav-links li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.3s ease;
}

.navbar .nav-links li a:hover,
.navbar .nav-links li a.active {
  color: var(--accent-color);
  transform: scale(1.05);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}


/* Home Section */
.home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 2rem 0; /* Top padding accounts for fixed navbar */
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 25%, var(--light-gray) 100%);
}

.home-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.home-photo img {
  width: 600px;
  height: 600px;
  border-radius: 10px; /* Changed from 50% to 10px for slightly rounded corners */
  object-fit: cover;
  border: 3px solid var(--accent-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-photo img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.home-about {
  flex: 1;
  min-width: 300px;
}

.home-about h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.home-about p {
  text-align: justify; /* Align text to both left and right edges */
  word-wrap: break-word; /* Ensure long words break to fit within the width */
  background: linear-gradient(50deg, #ffffff, #68ecec, #33d60a); /* Define the gradient */
  -webkit-background-clip: text; /* Clip the gradient to the text */
  background-size: 150% 150%;
  -webkit-text-fill-color: transparent; /* Make the text transparent to show the gradient */
  animation: gradient-animation 5s ease infinite;

  @keyframes gradient-animation {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }

  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--about-text-color); /* Updated to use a new CSS variable */
}

.highlights {
  margin-top: 2rem;
}

.highlights h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.highlight-items {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.highlight-item {
  position: relative;
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.highlight-item:hover {
  transform: scale(1.05);
}

.highlight-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.highlight-link {
  position: absolute;
  bottom: -40px;
  left: 0;
  width: 100%;
  text-align: center;
  background: rgba(44, 62, 80, 0.9);
  color: var(--white);
  padding: 0.5rem 0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: bottom 0.3s ease;
}

.highlight-item:hover .highlight-link {
  bottom: 0;
}

/* Add this to the :root selector at the top of your CSS file */
:root {
  /* Existing variables */
  --primary-color: #2C3E50;
  --accent-color: #E67E22;
  --light-gray: #ECF0F1;
  --white: #FFFFFF;
  --text-color: #000000;
  --footer-bg: #34495E;

  /* New variable for About Me text color */
  --about-text-color: #faf0d1; /* Default color, you can change this value */
}


/* Academics Section */
.academics {
  padding: 4rem 0;
  background-color: var(--light-gray);
  margin-top: 2rem;
}

.academics h1 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

.academic-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.academic-item {
  text-align: justify; /* Align text to both left and right edges */
  word-wrap: break-word; /* Ensure long words break to fit within the width */
  background: var(--white);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.academic-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.academic-item h2 {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.academic-item p {
  font-size: 1rem;
  color: var(--text-color);
}

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

.about-me h1 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.about-section {
  text-align: justify; /* Align text to both left and right edges */
  word-wrap: break-word; /* Ensure long words break to fit within the width */
  background: var(--white);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.about-section h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.about-section p {
  font-size: 1rem;
  color: var(--text-color);
}

/* My Projects Section */
.my-projects {
  padding: 4rem 0;
  background-color: var(--light-gray);
}

.my-projects h1 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

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

.project-button {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.project-button:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.project-button img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.project-info {
  padding: 1rem;
  text-align: center;
}

.project-info h3 {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.project-info p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.project-info a {
  text-decoration: none;
  color: var(--accent-color);
  font-weight: bold;
  transition: color 0.3s ease;
}

.project-info a:hover {
  color: var(--primary-color);
}

/* Contact Section */
.contact {
  padding: 4rem 0;
}

.contact h1 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-color);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.contact-icon {
  font-size: 1.8rem;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
}

.contact-icon:hover {
  transform: scale(1.2);
  color: var(--accent-color);
}

/* Footer */
.footer {
  background-color: var(--footer-bg);
  color: var(--white);
  padding: 1.5rem 0;
  text-align: center;
  position: relative;
}

.footer p {
  margin-bottom: 1rem;
}

.footer-contact a {
  color: var(--white);
  margin: 0 0.5rem;
  font-size: 1.2rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer-contact a:hover {
  transform: scale(1.2);
  color: var(--accent-color);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .home-container {
    flex-direction: column;
    text-align: center;
  }

  .home-about {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .navbar .nav-links {
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: var(--primary-color);
    width: 200px;
    display: none;
    padding: 1rem;
    border-radius: 0 0 10px 10px;
  }

  .navbar.active .nav-links {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .highlight-items {
    justify-content: center;
  }

  .about-content, .academic-details, .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .home-photo img {
    width: 200px;
    height: 200px;
  }

  .home-about h1 {
    font-size: 2rem;
  }

  .home-about p {
    font-size: 1rem;
  }

  .highlights h2 {
    font-size: 1.5rem;
  }

  .highlight-item {
    width: 120px;
    height: 120px;
  }

  .project-button img {
    height: 120px;
  }
}

@media (min-width: 1200px) {
  .home {
    padding: 100px 0 2rem 0;
  }

  .project-button img {
    height: 200px;
  }
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
