﻿/* 响应式基础设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica", sans-serif;
  line-height: 1.6;
  background: #f9f7f5;
  color: #333;
}

header {
  text-align: center;
  padding: 2rem 1rem;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

nav {
text-align: center;
  display: flex;
  justify-content: center;
  background: #eee;
  padding: 1rem;
  flex-wrap: wrap;
}

/*nav a {
  color: white;
  margin: 0 1rem;
  text-decoration: none;
  font-weight: 500;
}*/
nav a {
  color: #333;
  margin: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 500;
}
nav a:hover {
  text-decoration: underline;
}

main {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1rem;
}

/* 响应式图片 */
.gallery,
.portfolio .project img {
  max-width: 100%;
}

/* .gallery {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.gallery img {
  width: 300px;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}*/

/* 作品集 */
.portfolio .project {
  margin-bottom: 3rem;
 text-align: left;
}
.portfolio img {
  width: 100%;
  max-width: 500px;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin: 1rem auto;
  display: block;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* 博客文章 */
.blog article {
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 关于我 & 留言 */
.about, .contact {
  max-width: 700px;
  margin: 2rem auto;
  line-height: 1.8;
}

.contact form {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact input, .contact textarea {
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
}

.contact button {
  background: #333;
  color: white;
  padding: 0.8rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 0.5rem;
}

.contact button:hover {
  background: #555;
}

footer {
  text-align: center;
  padding: 1.5rem;
  background: #eee;
  font-size: 0.9rem;
  color: #666;
}

/* &#128241;?响响应式：平° &手手机适&#197; */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 0.5rem;
  }
  nav a {
    margin: 0.5rem 0;
  }
  main {
    padding: 1rem;
  }
  .gallery img,
  .portfolio img {
    width: 100%;
    max-width: 300px;
  }
  header h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  header {
    padding: 1.5rem;
  }
 footer {
  text-align: center;
  padding: 1.5rem;
  background: #eee;
  color: #666;
  margin-top: 2rem;
  clear: both;
  width: 100%;
  box-sizing: border-box;
} 
 
    a,
    a:link,
    a:visited,
    a:hover,
    a:active {
      color: #333;                /* 所有状态下颜色均为 #333 */
      text-decoration: none;      /* 去除下划线 */
    }

    /* 可选：如果希望鼠标悬停时有轻微反馈（如加下划线或变色），可取消注释下面一行 */
    /*
    a:hover {
      text-decoration: underline;
    }
