body {
  margin: 0;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--navbar-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: bold;
  font-size: 1.3rem;
}

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  transition: color 0.3s;
}

main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

section {
  margin-bottom: 2.5rem;
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero h2 {
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.about, .skills, .projects, .contact {
  background: var(--section-bg);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.hero-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto 1.2rem auto;
  display: block;
  border: 4px solid var(--accent);
  background: #eaeaea;
}

.download-cv{
  padding: 0.5rem;
  background: var(--background);
  color: rgb(162, 0, 0);
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  border: 1px rgb(95, 5, 5) dashed;
  border-radius: 3px;
}

.download-cv:hover{
  color: #eaeaea;
  background: rgb(95, 5, 5) !important;
}
/* Technology Cards */
.tech-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 90px));
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.tech-card {
  width: 90px;
  height: 90px;
  background: var(--section-bg);
  border: 2px solid var(--accent);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.tech-card:hover {
  box-shadow: 0 0 25px var(--card-shadow);
  transform: translateY(-2px);
}

.tech-card:hover .tech-icon {
  transform: scale(1.2) rotate(5deg);
}

.tech-icon {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
  margin-bottom: 0.5rem;
}

.tech-name {
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
  color: var(--text);
  line-height: 1.2;
  max-width: 80px;
  word-wrap: break-word;
}


.projects .project-cards {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-bottom: 1rem;
}

.project-card {
  min-width: 280px;
  max-width: 320px;
  scroll-snap-align: start;
  background: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--accent);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.03);
}

.project-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.project-info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-stack {
  display: flex;
  gap: 0.7rem;
  margin: 0.7rem 0;
  font-size: 1.2rem;
  align-items: center;
}

.project-stack-item {
  display: inline-flex;
  align-items: center;
}

.project-stack .project-tech-icon {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
  display: block;
}

.project-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-top: auto;
  transition: color 0.2s;
}

.project-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 1.5rem;
  margin-inline: 0.4rem;
}

.contact-info a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.contact-info a:hover {
  color: var(--accent);
}

/* Project Detail Page */
.project-detail {
  background: var(--section-bg);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  max-width: 900px;
  margin: 2rem auto;
  border: 1px solid var(--accent);
}

.project-content {
  margin-top: 2rem;
}

/* Desktop Slider */
.project-slider-desktop {
  position: relative;
  width: 600px;
  max-width: 100%;
  margin: 0 auto;
  display: block;
  overflow: hidden;
}

.slider-container {
  display: flex;
  border-radius: 12px;
  position: relative;
  transition: transform 0.3s ease;
  width: 100%;
  height: 400px;
}

.slider-container img {
  width: 600px;
  min-width: 600px;
  height: 400px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.slider-container img:hover {
  transform: scale(1.02);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease;
  font-size: 16px;
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.prev-btn {
  left: 15px;
}

.next-btn {
  right: 15px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.dot.active {
  opacity: 1;
}

/* Mobile Stack */
.project-stack-mobile {
  display: none;
  position: relative;
  height: 400px;
  max-width: 300px;
  margin: 0 auto;
}

.stack-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.stack-item {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: grab;
  transition: transform 0.3s ease, z-index 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stack-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack-item.dragging {
  cursor: grabbing;
  transform: scale(1.05);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.modal-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.close-modal:hover {
  color: var(--accent);
}

.modal-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.3s ease;
}

.prev-modal {
  left: 20px;
}

.next-modal {
  right: 20px;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-top: 1.2rem;
  font-size: 1.1rem;
}

.github-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
  margin-right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* Hide desktop slider on mobile */
@media (max-width: 768px) {
  .project-slider-desktop {
    display: none;
  }
  
  .project-stack-mobile {
    display: block;
  }
  
  .project-content {
    margin-top: 1rem;
  }
  
  .project-detail {
    padding: 1rem;
  }
}

@media (max-width: 650px) {
  .project-slider-desktop {
    width: 100%;
  }
  
  .slider-container img {
    width: 100vw;
    min-width: 100vw;
  }
}

@media (max-width: 600px) {
  main {
    padding: 0 0.3rem;
  }
  .about, .skills, .projects, .contact, .project-detail {
    padding: 1.2rem 0.5rem;
  }
  .hero-img {
    width: 120px;
    height: 120px;
  }
  .project-gallery img {
    width: 140px;
    height: 90px;
  }
  .tech-cards {
    grid-template-columns: repeat(auto-fit, minmax(80px, 80px));
    gap: 1rem;
  }
  .tech-card {
    width: 80px;
    height: 80px;
  }
  .tech-icon {
    width: 35px;
    height: 35px;
  }
  .tech-name {
    font-size: 0.65rem;
  }
} 