:root {
    --primary-color: #4361ee;
    --secondary-color: #4cc9f0;
    --text-color: #333;
    --bg-color: #fff;
    --card-bg: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --tag-bg: rgba(67, 97, 238, 0.1);
    --tag-color: var(--primary-color);
    --primary-dark: #3046c0;
    --heading-color: var(--text-color);
    --section-bg: #f8f9fa;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Project filters - vertical layout */
.project-filters {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 30px;
  max-width: 200px;
}

.filter-btn {
  padding: 8px 15px;
  background-color: var(--card-bg);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  width: 100%;
  text-align: left;
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Project grid layout adjustment */
.projects .container {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .projects .container {
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
  }
  
  .project-grid {
    flex: 1;
  }
}

/* Project grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

/* Project card styles */
.project-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.project-card h3, .project-card p {
  padding: 0 25px;
}

.project-card h3 {
  margin-top: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 25px 15px;
}

.project-tags span {
  background-color: rgba(67, 97, 238, 0.1);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.project-card a {
  margin: 0 25px 25px;
  align-self: flex-start;
}

/* Timeline styles */
.timeline {
  position: relative;
  padding: 80px 0;
}

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

.timeline-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  width: 100%;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-content {
  position: relative;
  width: calc(50% - 40px);
  padding: 25px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: auto;
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 10px;
  width: 20px;
  height: 20px;
  background-color: var(--card-bg);
  transform: rotate(45deg);
}

.timeline-item:nth-child(odd) .timeline-content::before {
  left: -10px;
}

.timeline-item:nth-child(even) .timeline-content::before {
  right: -10px;
}

.date {
  display: inline-block;
  padding: 5px 10px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

/* Contact form styles */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

.contact-form {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

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

/* Scroll indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  z-index: 1001;
}

.scroll-indicator-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  width: 0%;
}

/* Responsive styles for new elements */
@media screen and (max-width: 768px) {
  .timeline-wrapper::before {
    left: 30px;
  }
  
  .timeline-dot {
    left: 30px;
  }
  
  .timeline-content {
    width: calc(100% - 80px);
    margin-left: 80px !important;
  }
  
  .timeline-item:nth-child(odd) .timeline-content::before,
  .timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
    right: auto;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
}

/* Project section styles */
.projects .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects h2 {
  margin-bottom: 30px;
  text-align: center;
}

.project-filters {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  width: 100%;
}

.filter-btn {
  padding: 8px 15px;
  background-color: var(--card-bg);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
  margin-top: 20px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
  margin-top: 20px;
}

.filter-btn {
  padding: 8px 15px;
  background-color: var(--card-bg);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

/* Project section styles - consolidated */
.projects .container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .projects h2 {
    margin-bottom: 30px;
    text-align: center;
  }
  
  .project-filters {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 100%;
  }
  
  .filter-btn {
    padding: 8px 15px;
    background-color: var(--card-bg);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    width: auto;
    text-align: center;
  }
  
  .filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
  }
  
  .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    margin-top: 20px;
  }
  
  .project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
  }
  
  .project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  }
  
  .project-image {
    height: 200px;
    overflow: hidden;
  }
  
  .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }
  
  .project-card:hover .project-image img {
    transform: scale(1.1);
  }
  
  .project-card h3 {
    padding: 20px 20px 10px;
    margin: 0;
    font-size: 1.2rem;
    color: var(--heading-color);
  }
  
  .project-card p {
    padding: 0 20px;
    margin: 0 0 15px;
    color: var(--text-color);
    font-size: 0.9rem;
    flex-grow: 1;
  }
  
  .project-tags {
    padding: 0 20px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .project-tags span {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
  }
  
  .project-card a {
    display: block;
    text-align: center;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin: 0;
  }
  
  .project-card a:hover {
    background-color: var(--primary-dark);
  }

.filter-btn {
  padding: 8px 15px;
  background-color: var(--card-bg);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
  margin-top: 20px;
}

/* Chat widget styles */
.chat-toggle-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: var(--transition);
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
}

.chat-widget {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 350px;
  height: 450px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
}

.chat-header {
  background-color: var(--primary-color);
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-title {
  font-weight: 500;
}

.close-btn {
  cursor: pointer;
  font-size: 18px;
}

.chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: #f8f9fa;
}

.message {
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: 18px;
  max-width: 80%;
  word-wrap: break-word;
}

.user-message {
  background-color: var(--primary-color);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 5px;
}

.bot-message {
  background-color: #e9ecef;
  color: #333;
  margin-right: auto;
  border-bottom-left-radius: 5px;
}

.typing-indicator {
  display: none;
  background-color: #e9ecef;
  padding: 10px 15px;
  border-radius: 18px;
  margin-bottom: 15px;
  width: fit-content;
  border-bottom-left-radius: 5px;
}

.typing-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #777;
  border-radius: 50%;
  margin-right: 3px;
  animation: typing 1.5s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
  margin-right: 0;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-5px);
  }
}

.chat-input-container {
  display: flex;
  padding: 10px;
  background-color: white;
  border-top: 1px solid #e9ecef;
}

.chat-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ced4da;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
}

.chat-send-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-left: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.chat-send-btn:hover {
  background-color: var(--primary-dark);
}

/* Dark mode adjustments for chat */
[data-theme="dark"] .chat-widget {
  background-color: var(--card-bg);
}

[data-theme="dark"] .chat-body {
  background-color: var(--bg-color);
}

[data-theme="dark"] .bot-message {
  background-color: #2a2a2a;
  color: var(--text-color);
}

[data-theme="dark"] .chat-input-container {
  background-color: var(--card-bg);
  border-top: 1px solid #2a2a2a;
}

[data-theme="dark"] .chat-input {
  background-color: var(--bg-color);
  border: 1px solid #2a2a2a;
  color: var(--text-color);
}