/* General Styles */
body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Header Styles */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #2c3e50;
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

header h1 {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    font-size: 2.5rem;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

nav ul li {
    margin: 0 1.5rem;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #3498db;
}

/* Main Content */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h2 {
    font-family: 'Montserrat', sans-serif;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
}

.about-content img {
    max-width: 200px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Skills Section */
#mindmap {
    width: 100%;
    height: 80vh; /* Adjusts height based on viewport */
    border: 1px solid #f9f9f9;
}

/* Interests Section */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.card {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.card h3 {
    color: #3498db;
}

/* Work Experience Section - Timeline Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  html {
    font-family: "Montserrat";
  }
  .container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
  }
 /* Work Experience Logo*/ 
.heading-with-logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .company-logo-right {
    height: 30px;
    width: auto;
  }
  
  /* Adjust layout for mobile screens */
  @media (max-width: 600px) {
    .heading-with-logo {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .company-logo-right {
      margin-top: 10px;
    }
  }

.company-logo {
    height: 30px;
    width: auto;
}
  .timeline {
    height: auto;
    position: relative;
    width: 868px;
    padding: 2rem;
  }
  .timeline ul {
    list-style: none;
  }
  .timeline ul li {
    padding: 20px;
    background-color:white;
    color: #333;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  .timeline ul li:last-child {
    margin-bottom: 0;
  }
  .timeline-content h3 {
    color: #3498db;
  }
  .timeline-content .date {
    color: #7f8c8d; /* A subtle gray for distinction, consistent with theme */
  }
  @media only screen and (min-width: 900px) {
    .timeline:before {
      content: "";
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 2px;
      height: 100%;
      background-color: #3498db;
    }
    .timeline ul li {
      width: 50%;
      position: relative;
      margin-bottom: 50px;
    }
    .timeline ul li:nth-child(odd) {
      float: left;
      clear: right;
      transform: translateX(-30px);
      border-radius: 20px 0px 20px 20px;
    }
    .timeline ul li:nth-child(even) {
      float: right;
      clear: left;
      transform: translateX(30px);
      border-radius: 0px 20px 20px 20px;
    }
    .timeline ul li::before {
      content: "";
      position: absolute;
      height: 20px;
      width: 20px;
      border-radius: 50%;
      background-color: #3498db;
      top: 0px;
    }
    .timeline ul li:nth-child(odd)::before {
      transform: translate(50%, -50%);
      right: -30px;
    }
    .timeline ul li:nth-child(even)::before {
      transform: translate(-50%, -50%);
      left: -30px;
    }
    .timeline-content .date {
      position: absolute;
      top: -30px;
    }
    .timeline ul li:hover::before {
      background-color: aqua;
    }
  }

/* Goals Section */
.goals-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
}

.goal-category {
    flex: 1 1 300px;
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.goal-category h3 {
    color: #3498db;
    margin-bottom: 0.5rem;
}

.goal-category ul {
    padding-left: 1rem;
}

.goal-category ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
}

/* Contact Section */
#contact a {
    color: #3498db;
    text-decoration: none;
}

#contact a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 600px) {
    nav ul {
        flex-direction: column;
    }
    nav ul li {
        margin: 0.5rem 0;
    }
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-content img {
        margin-bottom: 1rem;
    }
}

/* Books Section */
#books {
    margin-top: 2rem;
}

.book-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, 200px);
    gap: 30px;
    justify-content: center;
}

.book-item {
    position: relative;
    width: 100%;
    padding-bottom: 133.33%;
    overflow: hidden;
}

.book-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.book-details {
    display: flex;
    gap: 20px;
}

.book-details img {
    max-width: 150px;
    height: auto;
}

.book-info {
    flex: 1;
}