@import url('https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');
*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  width: 100%;
  height: auto;
  font-family: sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background: url('bg-image.jpg') no-repeat center center fixed;
  background-size: cover;
  position: relative;
}
/* 半透明のオーバーレイ */
body::before{
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.2); 
  z-index: 0;
}
/* コンテンツを前面に出す */
main,
header,
footer, 
.top, 
.about, 
.version, 
.mypage-section, 
.past-project, 
.detail, 
.contact-me{
  position: relative;
  z-index: 1;
}

h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 2rem;
  color: #333;
}
h1 img{
  width: 50px;
  height: auto;
  border-radius: 50%;
}
.top{
  margin-top: 3em;
  font-size: 60px;
}
.about{
  /* font-family: "PT Serif", serif; */
  font-family: "roboto";
  background-color: rgb(235, 253, 250);
  margin: 3em auto;
  padding: 5em;
  text-align: center;
  line-height: 2em;
}

.version{
  width: 220px;
  height: 50px;
  font-size: 15px;
  font-weight: 600;
  background-color: rgb(196, 255, 232);
  color: rgb(205, 50, 102);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4em auto;
  border: #d3d3d3 solid 1px;
  border-radius: 30px;
}
.mypage-section {
  margin: 6em auto;
  padding: 3em 2em;
  /* background-color: #f9f9f9; */
  background-color: #a1ffe7;
  border-top: 2px dashed #ccc;
  border-bottom: 2px dashed #ccc;
  border-left: 5px solid #444;
  border-radius: 8px;
  max-width: 800px;
  
}

.mypage-intro {
  font-family: "PT Serif", serif;
  text-align: center;
  line-height: 2;
  color: #444;
}

.mypage-button {
  display: inline-block;
  margin-top: 2em;
  padding: 0.6em 1.2em;
  font-size: 16px;
  /* font-family: "PT Serif", serif; */
  font-family: "roboto";
  font-weight: 600;
  background-color: #e6e6f2;
  color: #5a5a7a;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.mypage-button:hover {
  background-color: #faffcd;
  color: #3f3f5f;
}

 .past-project {
  width: 100%;
  max-width: 90%0px;     
  margin: 0 auto;        
  background-color: #52a39f;
  padding: 2em 1em;
  box-sizing: border-box; 
}

.click{
    text-align: center;
  /* color: rgba(213, 254, 255, 0.973); */
  color: #292929;
  font-weight: 600;
  font-family: "roboto";
  font-size: 30px;
  margin: 3em auto;
  padding: 2em;
}

ul{
  max-width: 900px;
  margin-top: 3em;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
}
li{
  width: 100%;
  margin: 2em auto;
  padding: 0;
  list-style: none;
}
a {
  color: #d9534f;
  text-decoration: none;
  font-size: 20px;
  cursor: pointer;
  text-decoration: underline;
}
a:hover {
    text-decoration: underline;
  word-wrap: break-word;
  color: rgb(2, 154, 255);
}
p{
  margin-left: 5em;
  font-family: "PT Serif", serif;
}
li .note-card{
  width: 100%;
  max-width: 90%;
  padding: 1.5em;
  font-family: "PT Serif", serif;
  background-color: rgb(240, 247, 255);
  margin: 3em auto;
  margin: 2em;
  text-align: left !important;
}
.note-card h2{
  margin-top: 0;
}
.note-card .article,
.note-card .skill,
.note-card .note,
.note-card .site{
  margin-top: 1rem;
  text-align: left !important;
  display: block;
}


/* SKILLS/TOOLS/SNS */
.detail{    
  width: 100%;
  height: auto;
  margin-top: 6em;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 5em;
  line-height: 1em;
}
.detail h2{
  margin-top: 0;
  margin-bottom: 1em;
}
.detail ul{
  width: 100%;
  height: 250px;
  background-color: rgb(242, 255, 244);
  margin: 0;
  list-style-position: inside;
  border: #d3d3d3 solid 2px;
}

.detail ul li {
  margin-left: 1em;
}

h2{
  text-align: left;
  margin-top: 5em;
  color: #333;
}
/* CONTACT */
.contact-me{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2em;
  padding-top: 2em;
  padding-bottom: 5em;
}
.contact-me h3{
  margin-bottom: -1em;
  font-size: 30px;
}
.contact{
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2em 1em auto 2em;
  padding-top: 1em;
  padding-bottom: 1em;
  line-height: 1em;
  font-size: 18px;
  background-color: rgb(252, 252, 238);
  border: #d3d3d3 solid 2px;  
}
.contact p {
  width: fit-content;
  margin: .5em auto;
}
footer {
    background-color: #b0d8d5;
    text-align: center;
    padding: 2em;
    font-size: 0.9em;
    color: #2E2E2E;
    position: relative;
    z-index: 1;
}

body {
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  0% {
      opacity: 0;
  }
  100% {
      opacity: 1;
  }
}

@media (max-width: 768px) {
  body{
    background-position: center top;
    background-size: contain;
  }
    h1 {
    font-size: 1.8rem;
    flex-direction: column;   /* タイトル画像と文字を縦並びに */
    gap: 0.5rem;
  }

  .about {
    padding: 3em 1.5em;       /* 横幅が狭いので余白を縮小 */
    font-size: 0.95rem;
  }
  .top{
    font-size: 40px;
  }
  .version {
    width: 180px;
    height: 45px;
    font-size: 12px;
    margin: 1em auto;
  }
  .click{
    width: 100%;
    font-size: 20px;
    margin: 2em auto;
  }
  .no
  .detail {
    grid-template-columns: repeat(2, 1fr); /* 3列→2列 */
    gap: 1.5em;
  }
  .detail li,
  .detail li a{
    font-size: 15px;
  }
    .past-project {
    padding: 1.5em auto;
    max-width: 100%;
  }
  


}

@media (max-width: 480px) {
  body{
    background-position: center top;
  }
  h1 {
    font-size: 1.4rem;
    text-align: center;
  }

  h1 img {
    width: 40px;              
  }

  .about {
    padding: 2em 1em;
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .version {
    width: 160px;
    height: 40px;
    font-size: 11px;
  }

  .detail {
    grid-template-columns: 1fr; /* 完全に1列表示 */
    gap: 1.5em;
  }

  .click {
    font-size: 22px;
    padding: 1.5em;
  }

  p {
    margin-left: 0;           /* 左余白をなくす */
    font-size: 0.9rem;
  }
    .past-project {
    padding: 1em 0.5em;
  }

}
