/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

/* Navigation Bar Styling */
.navbar {
    background-color: gray;
    padding: 1rem;
    text-align: left;
    display: flex;
    justify-content: space-between;

}

.navbar ul {
    display: flex;
    list-style: none;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    margin: 0 10px;
    display: inline-block;
}

.navbar a:hover {
    background-color: #575757;
    border-radius: 5px;
}

/* Responsive Navigation Styling */
@media (max-width: 480px) {
    .navbar {
        text-align: center;
    }
    
    .navbar a {
        display: block;
        margin: 10px 0;
    }
}

.hero {
    display: flex;
    align-items: center; /* Centers the content vertically */
    justify-content: center; /* Centers everything horizontally */
    padding: 4rem 2rem;
    gap: 3rem;
  }
  
  .hero-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
  }
  
  .hero-text {
    max-width: 600px;
  }
  
  .hero h1 {
    font-size: 2rem;
    font-weight: bold;
  }
  
  .hero p {
    font-size: 1.2rem;
    color: #666;
  }
  
  @media (max-width: 600px) {
    .hero {
      flex-direction: column;
      text-align: center;
    }
  
    .hero-image img {
      width: 220px;
      height: 220px;
    }
  }

  .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: auto;
  }

  .timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 20px;
    max-width: 1000px;
    width: 85%;
  }
  
  .timeline-item {
    display: block; 
    margin-bottom: 20px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    align-self: flex-start;
    transform: translateX(-40px);
  }
  
  .timeline-item:nth-child(even) {
    align-self: flex-end;
    transform: translateX(40px);
  }
  
  
  .timeline-content {
    background: #f1f1f1;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .timeline-date {
    position: static;
    display: inline-block;
    margin: 0;
    color: gray;
    width: auto;
    height: auto;
    font-size: 1rem;
    margin-bottom: 10px; 
}
  
  .timeline-message-image {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
  }
  
  .timeline-item:nth-child(even) .timeline-message-image {
    flex-direction: row-reverse;
  }
  
  .timeline-text {
    flex: 1;
  }
  
  .timeline-img img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
  }
  
@media (max-width: 768px) {
  .timeline-item {
      transform: none !important;
      align-self: center;
  }
}

@media (max-width: 600px) {
  .timeline {
    padding: 0;
    margin: 20px;
  }

  .timeline-item {
    display: block; 
    margin-bottom: 20px;
    position: relative;
  }


  .timeline-content {
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .timeline-item h3 {
    font-size: 1.2rem;
    color: #333;
  }

  .timeline-item p {
    color: #666;
    font-size: 0.9rem;
  }

  .timeline-item .timeline-message-image {
    flex-direction: column-reverse !important;
  }
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: auto;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
  margin-bottom: 20px;
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}

.project-card {
  min-width: 30%;
  box-sizing: border-box;
  padding: 10px;
  transition: transform 0.3s ease;
}

.project-image img {
  width: 100%;
  border-radius: 8px;
}

.carousel-btn {
  background-color: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1;
  padding: 10px;
  color: #333;
}


  
.project-card {
  width: 400px;
  height: auto;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 16px;
  margin: 16px;
  background-color: #f9f9f9;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-image {
  display: flex;
  justify-content: center;
  height: 25%;
}

.project-image img {
  height: auto;
  width: auto;
  max-width: 95%;
  border-radius: 8px;
}

.project-title {
  font-size: 1.2em;
  margin: 12px 0 6px;
  text-align: center;
}

.project-description {
  font-size: 0.95em;
  text-align: center;
  color: #333;
}

.project-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}

.project-link {
  margin-top: auto;
  text-decoration: none;
  color: #007BFF;
  font-weight: bold;
  display: flex;
  justify-content: center;
}

.project-link:hover {
  text-decoration: underline;
}

  /* Mobile styles (screens up to 768px wide) */
@media (max-width: 768px) {
  .carousel {
    position: static;
    overflow: visible;
  }

  .carousel-track-container {
    overflow: visible;
    white-space: normal;
    padding: 0;
  }

  .carousel-track {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: none !important;
    transition: none !important;
    margin-top: 20px;
  }

  .project-card {
    width: 80%;
    margin: 0 auto;
  }

  .carousel-btn {
    display: none; /* Hide arrows */
  }
}


#about-me {
  width: 90%;
  max-width: 740px;
}

.hobby-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 15px;
}

.hobby-card {
  position: relative;
  max-width: 800px;
  width: 90%;
  max-height: 460px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
}

.hobby-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s;
  display: block;
}

.hobby-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  pointer-events: none;
}

/* Desktop hover/focus */
@media (hover: hover) and (pointer: fine) {
  .hobby-card:hover img,
  .hobby-card:focus img {
    filter: brightness(60%);
  }
  .hobby-card:hover .hobby-overlay,
  .hobby-card:focus .hobby-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

.hobby-card.active img {
  filter: brightness(60%);
}
.hobby-card.active .hobby-overlay {
  opacity: 1;
  pointer-events: auto;
}


@media (max-width: 780px) {
  .hobby-gallery {
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    align-items: center;
  }

  .hobby-card {
    width: 90%;
    height: auto;
    min-width: 0;
    min-height: 0;
    border-radius: 8px;
  }

  .hobby-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(60%); /* Always dim on mobile for overlay readability */
  }

  .hobby-overlay {
    opacity: 1 !important; /* Always show overlay on mobile */
    pointer-events: auto;
    background: rgba(0,0,0,0.5);
    font-size: 1rem;
    padding: 12px;
  }

  /* Remove hover/focus transitions on mobile */
  @media (hover: none) and (pointer: coarse) {
    .hobby-card:hover img,
    .hobby-card:focus img,
    .hobby-card:hover .hobby-overlay,
    .hobby-card:focus .hobby-overlay {
      filter: none;
      opacity: 1;
    }
  }
}
