body {
  font-family: "Helvetica Neue", "YakuHanJP", "Noto Sans JP", sans-serif;
  font-weight: 300;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


::-webkit-scrollbar {
  background: transparent;
  width: 0;
}

html {
  overflow: scroll;
  overflow-x: hidden;
  scrollbar-width: none;
}



.container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

header {
  background-color: #f4f4f4;
  padding: 10px; /* Reduced from 20px to bring header closer to top */
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header h1 {
  margin: 0;
  margin-left: 50px;
  position: relative;
  top: 20px; /* Reduced from 40px to tighten spacing */
  font-family: "Helvetica neue", sans-serif;
  letter-spacing: 4px;
  line-height: 105px;
  font-weight: bold;
  font-size: 48px;
}

nav {
  margin-right: 50px;
  position: relative;
  top: 25px; /* Reduced from 50px to tighten spacing */
  font-family: "Helvetica neue", sans-serif;
  font-weight: 300;
  letter-spacing: 4px;
  line-height: 105px;
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: #333;
}
main {
  display: flex;
  justify-content: center;
  gap: 40px; /* Space between columns */
  position: relative;
  min-height: 500px;
  max-width: 900px;
  margin: 0 auto; 
}

.about {
  margin-top: 40px; /* Reduced from 80px */
  height: auto; /* Remove fixed height */
  max-height: calc(100vh - 300px); /* Adjust to prevent overflow */
  overflow-y: auto;
}
.about p {
  line-height: 1.8; /* Increase line spacing */
  font-weight: 400; /* Make text slightly thicker */
  letter-spacing: 0.5px; /* Add slight letter spacing */
  font-size: 16px; /* Ensure readable font size */
  margin-bottom: 1.5em; /* Add space after paragraph */
  color: #333; /* Ensure good contrast */
}

.images {
  flex: 0 0 400px;
  display: flex;
  justify-content: center;
  position: sticky;
  align-items: center;
  top: 20px;
  height: 550px;
}

.image-stack img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2px;
}


.projects {
  margin-top: 40px;
  padding: 20px;
  width: 100%;
}

.project-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-content {
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.project-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.project-content h3 {
  margin: 0 0 15px 0;
  font-family: "Helvetica neue", sans-serif;
  font-weight: 300;
  letter-spacing: 2px;
}

.tech-stack {
  margin: 15px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tech-tag {
  padding: 5px 10px;
  background-color: #f4f4f4;
  border-radius: 4px;
  font-family: "Helvetica neue", sans-serif;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 1px;
}

.project-description {
  margin: 15px 0 0 0;
  font-family: "Helvetica neue", sans-serif;
  font-weight: 300;
  letter-spacing: 0.5px;
  line-height: 1.6;
  color: #333;
}


/* Updated footer styles */
footer {
  background-color: #f4f4f4;
  padding: 10px; /* Reduced from 20px to bring footer closer to bottom */
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Helvetica neue", sans-serif;
  font-weight: 300;
  letter-spacing: 4px;
  line-height: 90px;
}

footer p {
  margin: 0;
  margin-left: 50px;
  position: relative;
  top: -15px; /* Adjusted from -25px for balance */
}

.social {
  display: flex;
  gap: 15px;
  margin-right: 50px;
  position: relative;
  top: -15px; /* Adjusted from -25px for balance */
}

.social a {
  text-decoration: none;
  color: #333;
}

.social a:hover {
  color: #666;
}


@media screen and (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 5px; /* Reduced from 10px for mobile */
    text-align: center;
  }
  
  .about{
    order: 1;
  }


  .image-stack{
    max-width: 100%;
  }

  header h1 {
    margin: 0;
    position: static;
    line-height: normal;
    font-size: 36px;
    letter-spacing: 2px;
  }
  
  nav {
    margin: 15px 0;
    position: static;
    line-height: normal;
  }
  
  nav a {
    margin: 0 10px;
    display: inline-block;
    padding: 8px 0;
  }
  
  main {
    flex-direction: column-reverse;
    gap: 20px;
  }
  
  .about {
    order: 1;
    margin-top: 20px;
  }
  
  .images {
    order: 2;
    height: auto;
    position: static;
    flex: 0 0 auto;
    margin-bottom: 20px;
  }
  
  .image-stack img {
    max-width: 100%;
    height: auto;
  }
  
  footer {
    flex-direction: column;
    text-align: center;
    line-height: normal;
    padding: 5px; /* Reduced from 10px for mobile */
  }
  
  footer p {
    margin: 0 0 15px 0;
    position: static;
  }
  
  .social {
    margin: 0;
    position: static;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* For very small screens */
@media screen and (max-width: 480px) {

  header h1 {
    font-size: 28px;
  }
  .about p{
    font-size: 14px;
  }

  nav a {
    font-size: 14px;
    margin: 0 5px;
  }
}
