:root {
  --primary-color: #3ddc84; /* Android green */
  --secondary-color: #073042;
  --light-bg: #f8f9fa;
  --dark-text: #333;
  --light-text: #f8f9fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  line-height: 1.6;
  color: var(--dark-text);
  background-color: var(--light-bg);
}

header {
  background: var(--secondary-color);
  color: var(--light-text);
  padding: 2rem 0;
  text-align: center;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  margin-bottom: 1rem;
  object-fit: cover;
  background-color: #e0e0e0;
}

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

h1,
h2,
h3 {
  margin-bottom: 0.5rem;
}

.accent {
  color: var(--primary-color);
}

section {
  margin: 3rem 0;
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: var(--dark-text);
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  margin-top: 1rem;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: #00b446; /* Slightly darker green on hover */
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.skill-tag {
  background: var(--secondary-color);
  color: var(--light-text);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
}

.btn-footer {
  display: inline-block;
  background: var(--primary-color);
  color: black;
  padding: 0.8rem 1.5rem;
  justify-content: flex-start; /* Align button to the left */
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  margin-top: 1rem;
  cursor: pointer;
  border: none;
}


.btn-footer:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background: #00b446; /* Slightly darker green on hover */
}

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

.project-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex; /* Use flexbox to stack content vertically */
  flex-direction: column; /* Stack children vertically */
  height: 100%; /* Ensure the card takes full height */
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-img {
  width: 100%;
  height: 180px;
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}

.project-footer {
  padding: 0 20px 20px; /* Padding to match the content area and add space at the bottom */
  display: flex;
  justify-content: flex-start; /* Align button to the left */
}

.cropped-img {
  width: 100%; /* Ensures the image spans the full width of the container */
  height: 100%; /* Sets a fixed height for the image */
  object-fit: cover; /* Crops the image to fill the container */
  object-position: center; /* Centers the cropped area */
  color: transparent;
}

.project-content {
  padding: 1.5rem;
  flex-grow: 1; /* Allow content to grow and push the footer down */
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.project-tech span {
  background: #f0f0f0;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--secondary-color);
}

footer {
  background: var(--secondary-color);
  color: var(--light-text);
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
}

.contact-info {
  margin: 1.5rem 0;
}

.contact-info p {
  margin: 0.5rem 0;
}

.social-links {
  margin-top: 1.5rem;
}

.social-links a {
  color: var(--light-text);
  font-size: 1.5rem;
  margin: 0 1rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
  }

  .gallery {
    grid-template-columns: 1fr;
  }
}

ul {
  padding-left: 20px;
}

/* Experience Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 2rem auto;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background-color: var(--primary-color);
  top: 0;
  bottom: 0;
  left: 15px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  margin-bottom: 2rem;
}

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

.timeline-content {
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Dark mode toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  background: var(--secondary-color);
  color: var(--light-text);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Dark mode styles */
body.dark-mode {
  background-color: #121212;
  color: #f0f0f0;
}

body.dark-mode .project-card,
body.dark-mode .timeline-content,
body.dark-mode .modal-content {
  background: #1e1e1e;
  color: #f0f0f0;
}

body.dark-mode .project-tech span {
  background: #2d2d2d;
  color: #f0f0f0;
}

body.dark-mode .close {
  color: #f0f0f0;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 800px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-30px);
  transition: transform 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.gallery-img {
  width: 100%;
  height: 100%;
  background-color: #e0e0e0;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

.modal-links {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.modal-section {
  margin: 20px 0;
}

.modal-section h4 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}
