.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.projects-grid_old img {
  width: auto;        /* make image take full width of its grid cell */
  max-width: 280px;   /* maximum width limit */
  height: 200px;      /* fixed height */
  object-fit: cover;  /* crop edges but keep aspect ratio */
  border-radius: 8px; /* optional: rounded corners */
}

.project-grid img {
  border: 10px solid #ddd;      /* frame */
  border-radius: 4px;
  background: #fff;
  box-shadow: 
    0 4px 6px rgba(0,0,0,0.3),
    inset 0 0 8px rgba(0,0,0,0.2); /* inner shadow */
  transition: transform 0.3s;
}

.project-grid img:hover {
  transform: scale(1.05) rotateX(3deg) rotateY(-3deg);
}

.project-item-1 {
  text-align: center;
  transition: transform 0.2s;
  perspective: 1000px; /* enable 3D effect */
}

.project-item {
  display: inline-block;
  padding: 10px;
  background: #eee;               /* frame background */
  border: 5px solid #ccc;         /* frame border */
  border-radius: 12px;            /* rounded corners */
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.project-item_old img {
  width: auto;   /* fixed width */
  max-width: 280px;   /* maximum width limit */
  height: 200px;
  border-radius: 8px;
}

.project-item_old:hover {
  transform: scale(1.05);
}

.project-item-1 img {
  height: 200px;          /* your fixed height */
  width: auto;            /* keep ratio */
  max-width: 280px;   /* maximum width limit */
  border-radius: 10px;    /* rounded corners */
  box-shadow: 0 8px 16px rgba(0,0,0,0.3); /* shadow for depth */
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project-item img {
  height: 200px;
  width: auto;
  max-width: 250px;
  display: block;
  border-radius: 6px;
}

.project-item img:hover {
  transform: rotateY(15deg) rotateX(5deg) scale(1.05); /* tilt + zoom */
  box-shadow: 0 20px 40px rgba(0,0,0,0.5); /* stronger shadow on hover */
}

.project-item h3 {
  margin-top: 10px;
  font-size: 1.2em;
}
.project-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 40px;
  align-items: flex-start;
}

.project-detail .project-image {
  flex: 1;
  min-width: 300px;
}

.project-detail .project-image img {
  width: 100%;
  border-radius: 10px;
}

.project-detail .project-info {
  flex: 1;
  min-width: 300px;

}

#contact {
  padding: 40px;
  background: #f9f9f9;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.contact-info, .contact-form {
  flex: 1;
  min-width: 300px;
}

.contact-info h3, .contact-form h3 {
  margin-bottom: 15px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  margin-top: 10px;
  margin-bottom: 5px;
  font-weight: bold;
}

.contact-form input, .contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.contact-form button {
  margin-top: 15px;
  padding: 12px;
  background: #0073e6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.contact-form button:hover {
  background: #005bb5;
}

#contributions {
  padding: 40px;
  background: #fff;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
}

#contributions h2 {
  color: #003366;
  margin-bottom: 20px;
}

#contributions h3 {
  margin-top: 20px;
  color: #00509e;
}

#contributions ul {
  padding-left: 20px;
}

#contributions li {
  margin-bottom: 12px;
}

.slideshow-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 20px; /* 图片之间的间隙 */
  padding: 20px;
}

.slide {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.slide img {
  height: 200px;   /* 固定高度 */
  width: auto;     /* 宽度自动，保持比例 */
  border-radius: 8px;
}

/* Outer viewport hides the scrollbar entirely */
.slideshow-viewport {
  overflow: hidden;           /* no horizontal scrollbar */
  padding: 16px 0;            /* optional top/bottom breathing room */
}

/* Horizontal rail of slides */
.slideshow-track {
  display: flex;
  gap: 20px;                  /* fixed spacing between photos */
  align-items: center;
  will-change: transform;     /* smoother animation */
}

/* Each slide (optional if you want hover effects later) */
.slide { flex: 0 0 auto; }

/* Images: fixed height, auto width, keep ratio */
.slideshow-track img {
  height: 200px;              /* <-- your fixed height */
  width: auto;                /* keep aspect ratio */
  max-width: 320px;           /* optional: cap width if you want */
  border-radius: 8px;         /* optional: rounded corners */
  display: block;
}

/* (Optional) If you ever switch back to overflow scrolling & want to hide scrollbars) */
/*
.slideshow-viewport::-webkit-scrollbar { display: none; }
.slideshow-viewport { -ms-overflow-style: none; scrollbar-width: none; }
*/














