* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  line-height: 1.6;
  color: #333;
}

header {
  background-color: #f8f9fa;
  padding: 2rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.profile-photo {
  flex-shrink: 0;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

.profile-info {
  flex-grow: 1;
}

nav {
  background: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #2c3e50;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
}

.nav-links a:hover {
  color: #4a90e2;
}

.contact-nav-item {
  margin-left: auto;
}

.contact-link {
  background-color: #2c3e50;
  color: white !important;
  padding: 0.5rem 1.5rem !important;
  border-radius: 25px;
  transition: all 0.3s ease !important;
}

.contact-link:hover {
  background-color: #4a90e2;
  color: white !important;
  transform: translateY(-2px);
}

section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--bg-tertiary);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.project-tools {
  display: flex;
  gap: 8px;
  padding: 8px 15px;
  flex-wrap: wrap;
}

.tool-tag {
  background: #e9ecef;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #495057;
}

.project-link {
  margin: auto 20px 20px;
  padding: 8px 15px;
  background-color: #4a90e2;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  text-align: center;
  transition: all 0.3s ease;
}

.project-link:hover {
  background-color: #4a90e2;
  transform: translateY(-2px);
}

.project-card p {
  padding: 0 20px;
  color: #6c757d;
  margin-bottom: 20px;
}

/* Footer Styles */
footer {
  background-color: #2c3e50;
  padding: 40px 20px;
  margin-top: 60px;
  color: #ffffff;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px auto;
  max-width: 400px;
}

.contact-item {
  flex: 1;
  max-width: 180px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: #2c3e50;
  padding: 12px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 16px;
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  width: 100%;
  min-width: 160px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 15% auto;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease-out;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .profile-img {
    width: 150px;
    height: 150px;
    margin-bottom: 1rem;
  }

  nav {
    padding: 1rem;
  }

  .burger-menu {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    gap: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px auto;
  }

  .modal-content {
    margin: 30% auto;
    padding: 25px;
  }
}

/* Animations */
@keyframes modalSlideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Utility Classes */
.body.modal-open {
  overflow: hidden;
}

/* Specific styling for BI projects without images */
.bi-project {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef);
  border-left: 4px solid #3498db;
}

/* Category headers */
.category-title {
  color: var(--text-primary);
  margin: var(--spacing-xl) 0 var(--spacing-lg);
  font-size: 1.8rem;
  border-bottom: 2px solid var(--bg-tertiary);
  padding-bottom: var(--spacing-sm);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.skill-tag {
  background: #e0e0e0;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

.about-section {
  padding: 4rem 0;
  background-color: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.about-content {
  margin-top: 2rem;
  line-height: 1.6;
}

.about-content p {
  margin-bottom: 1.5rem;
  color: #2c3e50;
  font-size: 1.1rem;
}

.education {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.education h3 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.education-item {
  margin-bottom: 1.5rem;
}

.education-item h4 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.education-item p {
  margin: 0.25rem 0;
  color: #6c757d;
}

.education-item .date {
  font-size: 0.9rem;
  color: #6c757d;
}

.project-tools {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tool-tag {
  background-color: #e9ecef;
  color: #495057;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  margin-bottom: 15px;
}

.project-card h3,
.project-card p,
.project-card .project-tools {
  padding: 0 20px;
}

.project-card .project-tools {
  padding-bottom: 20px;
}

.category-title {
  color: #2c3e50;
  margin: 30px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .project-image {
    height: 180px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  /* Header adjustments */
  header {
    padding: 15px;
    text-align: center;
  }

  .header-content {
    flex-direction: column;
    gap: 15px;
  }

  .profile-info {
    text-align: center;
  }

  /* Navigation adjustments */
  nav {
    padding: 10px;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  nav ul li {
    width: 100%;
    text-align: center;
  }

  /* Project grid adjustments */
  .project-grid {
    grid-template-columns: 1fr;
    padding: 15px;
    gap: 20px;
  }

  .project-card {
    margin-bottom: 15px;
  }

  .project-image {
    height: 180px;
  }

  /* Skills section adjustments */
  .skills-list {
    justify-content: center;
    gap: 8px;
  }

  .skill-tag {
    font-size: 0.9em;
    padding: 6px 12px;
  }

  /* Section adjustments */
  section {
    padding: 20px 15px;
  }

  h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
  }

  h3 {
    font-size: 1.4em;
  }

  /* Contact section adjustments */
  .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .contact-item {
    width: 100%;
    text-align: center;
  }
}

/* Additional mobile optimizations */
@media screen and (max-width: 480px) {
  .project-card {
    padding-bottom: 15px;
  }

  .project-tools {
    flex-wrap: wrap;
    justify-content: center;
  }

  .tool-tag {
    font-size: 0.8em;
    padding: 4px 8px;
  }

  .project-image {
    height: 160px;
  }

  body {
    font-size: 14px;
  }
}

/* Ensure smooth scrolling on all devices */
html {
  scroll-behavior: smooth;
}

/* Improve touch targets for mobile */
button,
a {
  min-height: 44px;
  min-width: 44px;
  padding: 8px;
}

/* Prevent horizontal scrolling */
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Improve image loading */
.project-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Add loading state for images */
.project-image.loading {
  background: #f0f0f0;
  animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.6;
  }
}

/* Improve tap targets spacing */
.project-tools {
  padding: 10px 15px;
  gap: 8px;
}

/* Add meta viewport tag if not already present */

/* Burger Menu Styles */
.burger-menu {
  display: none;
  cursor: pointer;
  padding: 10px;
}

.burger-icon {
  width: 30px;
  height: 20px;
  position: relative;
}

.burger-icon span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.burger-icon span:nth-child(1) {
  top: 0;
}

.burger-icon span:nth-child(2) {
  top: 8px;
}

.burger-icon span:nth-child(3) {
  top: 16px;
}

/* Active state for burger menu */
.burger-menu.active .burger-icon span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}

.burger-menu.active .burger-icon span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active .burger-icon span:nth-child(3) {
  transform: rotate(-45deg);
  top: 8px;
}

@media screen and (max-width: 768px) {
  .burger-menu {
    display: block;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 1000;
  }

  .nav-links {
    display: none;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav-links li {
    margin: 10px 0;
  }
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #333;
  padding: 12px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 16px;
}

.social-link:hover {
  background-color: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.social-link i {
  font-size: 24px;
}

.fa-linkedin {
  color: #0077b5;
}

.fa-github {
  color: #333;
}

@media screen and (max-width: 768px) {
  .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .social-link {
    width: 200px;
    justify-content: center;
  }
}

footer {
  background-color: #2c3e50;
  padding: 40px 20px;
  margin-top: 60px;
  color: #ffffff;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px auto;
  max-width: 400px;
}

.contact-item {
  flex: 1;
  max-width: 180px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: #2c3e50;
  padding: 12px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 16px;
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  width: 100%;
  min-width: 160px;
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  background-color: #f8f9fa;
}

.social-link i {
  font-size: 20px;
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media screen and (max-width: 768px) {
  footer {
    padding: 30px 15px;
  }

  .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px auto;
  }

  .contact-item {
    width: 100%;
    max-width: 220px;
  }

  .social-link {
    width: 100%;
    padding: 14px 20px;
    justify-content: center;
    font-size: 15px;
  }

  .social-link i {
    font-size: 18px;
  }

  .footer-bottom {
    margin-top: 25px;
    font-size: 0.9em;
  }
}

/* Additional mobile optimization */
@media screen and (max-width: 480px) {
  .contact-item {
    max-width: 200px;
  }

  .social-link {
    min-width: unset;
    padding: 12px 16px;
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
.burger-menu:focus {
  outline: 3px solid #4a90e2;
  outline-offset: 2px;
}

/* Skip to main content link - hidden by default, visible on focus */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #2c3e50;
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Ensure sufficient color contrast */
.tool-tag,
.skill-tag {
  color: #2c3e50;
  background-color: #ffffff;
  border: 1px solid #2c3e50;
}

/* Ensure interactive elements have sufficient touch targets */
.social-link,
.nav-links a {
  min-height: 44px;
  min-width: 44px;
  padding: 12px 25px;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.profile-photo {
  flex-shrink: 0;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

.profile-info {
  flex-grow: 1;
}

/* Responsive design for mobile */
@media screen and (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .profile-img {
    width: 150px;
    height: 150px;
    margin-bottom: 1rem;
  }
}

nav {
  background: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #2c3e50;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
}

.nav-links a:hover {
  color: #4a90e2;
}

.contact-nav-item {
  margin-left: auto;
}

.contact-link {
  background-color: #2c3e50;
  color: white !important;
  padding: 0.5rem 1.5rem !important;
  border-radius: 25px;
  transition: all 0.3s ease !important;
}

.contact-link:hover {
  background-color: #4a90e2;
  color: white !important;
  transform: translateY(-2px);
}

@media screen and (max-width: 768px) {
  nav {
    padding: 1rem;
  }

  .burger-menu {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    gap: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .contact-nav-item {
    margin: 0;
    width: 100%;
  }

  .contact-link {
    display: block;
    text-align: center;
    margin: 0.5rem 0;
  }

  /* Animated burger menu */
  .burger-icon span {
    transition: all 0.3s ease;
  }

  .burger-menu.active .burger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .burger-menu.active .burger-icon span:nth-child(2) {
    opacity: 0;
  }

  .burger-menu.active .burger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

/* Smooth transition for menu items */
.nav-links li {
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-links.active li {
  opacity: 1;
  transform: translateX(0);
}

/* Enhanced touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
  .nav-links a,
  .contact-link {
    padding: 0.75rem 1.5rem !important;
  }
}

/* Add these new styles for the buttons */
.project-buttons {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  margin-top: auto;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn i {
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--bg-tertiary);
}

.btn-secondary:hover {
  background-color: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Update project card styles */
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--bg-tertiary);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
  .project-buttons {
    flex-direction: column;
    padding: var(--spacing-sm);
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Add hover effect for buttons */
.btn:active {
  transform: translateY(1px);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
  }

  .btn-secondary {
    border-width: 2px;
  }
}

/* Credits Section Styles */
.credits-section {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.credits-section p {
  margin-bottom: var(--spacing-sm);
}

.credits-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.credits-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.credits-link i {
  font-size: 1rem;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .credits-section {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    font-size: 0.85rem;
  }
}

/* Enhanced Dropdown Styles */
.dropdown-submenu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--bg-primary);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid var(--bg-tertiary);
}

.dropdown-submenu:hover > .submenu {
    display: block;
    animation: fadeIn 0.3s ease;
}

.submenu-toggle {
    position: relative;
    padding-right: 2em !important;
}

.submenu-toggle::after {
    content: '▶';
    font-size: 0.7em;
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
}

/* Mobile Responsive Adjustments */
@media screen and (max-width: 768px) {
    .submenu {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--bg-secondary);
        padding-left: 1.5rem;
    }

    .submenu-toggle::after {
        content: '▼';
    }

    .dropdown-submenu.active > .submenu {
        display: block;
    }
}

/* Add to your existing script.js */
document.addEventListener('DOMContentLoaded', function() {
    const submenus = document.querySelectorAll('.submenu-toggle');
    
    submenus.forEach((submenu) => {
        submenu.addEventListener('click', function(e) {
            e.preventDefault();
            if (window.innerWidth <= 768) {
                submenu.parentElement.classList.toggle('active');
            }
        });
    });
});
