
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: sans-serif;
  background: #dde7f0; 
  background-attachment: fixed;
  background-size: cover;
  scroll-behavior: smooth;
}

/* header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 1000;
}

.logo {
  font-weight: bold;
  font-size: 1.2em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

nav a:hover {
  color: #8db4de;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

@media (max-width: 700px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px 0;
    z-index: 2000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  nav ul.open {
    display: flex;
  }

  nav ul li {
    width: 100%;
    text-align: center;
    padding: 15px 0;
  }

  nav ul li a {
    font-size: 1.2rem;
    color: #333;
    text-decoration: none;
  }

  nav ul li a:hover {
    color: #8db4de;
  }
}


/* All sections */
.section {
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* section-white */
.section-white {
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* section-transparent */
.section-transparent {
  background: transparent;
}

/* section hero */
.hero-content {
  text-align: center;
}

.hero-content h1 {
  font-size: 6em;
  margin-bottom: 20px;
}

.hero-content h2 {
  font-size: 2.6em;
  font-weight: 400;
  color: #555;
}

.typed-text {
  color: #8db4de;
  font-weight: bold;
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  font-weight: bold;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* section about */
.about-container {
  display: flex;
  gap: 80px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.about-left {
  text-align: center;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.about-name {
  margin-top: 16px;
  font-size: 1.8em;
  font-weight: bold;
}

.about-role {
  font-size: 1em;
  color: #888;
  margin-top: 4px;
}

.about-right {
  flex: 1;
  min-width: 300px;
}

.tag-list {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px;
}

.tag {
  padding: 10px 20px;
  border-radius: 50px;
  border: none;
  background: #8db4de;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 1em;
  flex-shrink: 0;  
  box-sizing: border-box;
}

.tag:hover {
  background: #6098d3;
}

.tag.active {
  background: white;
  border: 2px solid #8db4de;
  color: #8db4de;
  font-weight: bold;
  box-sizing: border-box;
}

.tag-description {
  margin-top: 24px;
  font-size: 1.5em;
  line-height: 1.3;
}

@media (max-width: 750px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px;
  }

  .profile-photo {
    width: 200px;
    height: 200px;
  }

  .about-name {
    font-size: 1.4em;
  }

  .tag-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .tag-description {
    text-align: center;
    padding: 0 10px;
    font-size: 1.2em;
  }
}

/* section projects */

#projects.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px;
  text-align: center;
  position: relative;
}

.section-title {
  font-size: 2.7em;
  margin-bottom: 48px;
  position: absolute;
  top: 22%;
  transform: translateY(-50%);
}

.scroll-btn {
  position: absolute;
  top: 60%;
  transform: translateY(-50%);
  font-size: 3.5em;     
  width: 60px;       
  height: 60px;
  background: transparent;
  border: none;
  color: #333;          
  cursor: pointer;
  z-index: 2;
}

.scroll-btn.left {
  left: 20px;  /* 离屏幕左边 20px */
}

.scroll-btn.right {
  right: 20px; /* 离屏幕右边 20px */
}

.project-card {
  width: 300px;
  height: 420px;
  background: #dde7f0;
  border-radius: 50px;
  box-shadow: 0 0 13px rgba(0, 0, 0, 0.1);
  padding: 24px;
  box-sizing: border-box;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s;
  text-decoration: none;
}

.project-card img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 40px;
  margin-top: 22px ;
  margin-bottom: 15px;
  box-shadow: 0 0 13px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
  font-size: 1.7em;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-bottom: 15px;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding-left: 15px;
  padding-right: 15px;
  padding-bottom: 22px;
}

.project-tag {
  padding: 6px 12px;
  border-radius: 50px;
  border: none;
  background: #8db4de;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 1em;
  font-weight: 500;
  flex-shrink: 0;  
}

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

.carousel-viewport {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(300px * 3 + 40px * 2 + 20px * 2);
  height: calc(420px + 35px * 2);
  align-items: center;
  overflow: hidden;
  display: flex;
}

.project-carousel {
  display: flex;
  gap: 40px;
  padding-left: 20px;
  transition: transform 0.5s ease;
  will-change: transform;

}

@media (max-width: calc(300px * 3 + 40px * 2 + 20px * 2 + 20px * 2 + 60px * 2)) {
  .carousel-viewport {
    width:calc(300px * 2 + 40px * 1 + 20px * 2);
  }
}

@media (max-width: calc(300px * 2 + 40px * 1 + 20px * 2 + 20px * 2 + 60px * 2)) {
  .carousel-viewport {
    width:calc(300px * 1 + 20px * 2);
  }
}

/* section contact */
#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-title {
  padding: 45px;
  font-size: 1.9em;
  text-align: center;
}

.contact-button {
  position: relative;
  display: inline-flex;
  align-items: center; 
  gap: 10px;
  padding: 15px 30px;
  border-radius: 50px;
  border: none;
  background: #8db4de;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 1.5em;
  font-weight: 600;
  flex-shrink: 0;  
  text-decoration: none;
}

.contact-button .icon {
  width: 50px;
  height: 50px;
  filter: brightness(0) invert(1);
}

.copy-message {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  color: #8db4de;
  font-size: 0.7em;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}


.copy-message.show {
  opacity: 1;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* site footer */
.site-footer {
  height: 50svh;
  text-align: center;
  color: #555;
  font-size: 0.9em;
  background: white;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

