*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.7;
  
}

header {
  background-color: #343a40;
  padding: 0.5rem 5%;
  
}



section {
  padding: 4rem 5%;
  max-width: 1100px;
  margin: 0 auto;
  border-bottom: 1px solid #eee;

  text-align: center;
}

section:nth-of-type(odd) {
  background-color: #ffffff;
}

section>p,
section>ul,
section>.project-gallery,
section>about-container {
  text-align: left;
}

h2 {
  font-size: 2.2rem;
  color: #333;
  margin-bottom: 2.5rem;
  border-bottom: 3px solid #343a40;
  padding-bottom: 0.5rem;
  display: inline-block;
}

h3 {
  font-size: 1.5rem;
  color: #444;
}

#hero {
  background-color: #495057;
  color: #ffffff;
  text-align: center;
  padding: 5rem 5%;
  max-width: none;
  margin: 0;
  border-bottom: none;
}

#hero h1 {
  font-size: 3rem;
  margin: 0;
}

#hero p {
  font-size: 1.25rem;
  color: #f0f0f0;
  text-align: center;
}


#main-nav {
  background-color: #ADD8E6;
  padding: 1.5rem 5%;

  display: flex;
  justify-content: center;
  align-items: center;

  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #9acbe0;
}

#main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

#main-nav li {
  margin: 0 2.5rem;
}

#main-nav a {
  text-decoration: none;
  color: #1a5276;
  font-weight: 600;
  font-size: 1rem;
  padding: 1.5rem 0;
  transition: color 0.3s ease;
}

#main-nav a:hover {
  color: #000;
  font-weight: 1000;
}

#about>p {
  text-align: left;
  margin-bottom: 3rem;
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  text-align: left;
}

.about-box h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #b0ebf2;
  font-size: 1.5rem;
  color: #444;
}

.skills-list {
  list-style: disc;
  padding-left: 2rem;
}

.skills-list li {
  margin-bottom: 0.5rem;
}

.history-list {
  list-style: none;
  padding-left: 0;
}


#about li {
  margin-bottom: 0.5rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
  gap: 2rem;
}

.project-item {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.project-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #eee;
}

.project-item h3 {
  font-size: 1.3rem;
  color: #495057;
  padding: 1rem 1.5rem 0.5rem 1.5rem;
  margin: 0;
}

.project-item p {
  font-size: 0.95rem;
  padding: 0 1.5rem 1rem 1.5rem;
  margin: 0;
  min-height: 4em;
}

.project-item a {
  display: inline-block;
  margin: 0 1.5rem 1.5rem 1.5rem;
  padding: 0.6rem 1.2rem;
  background-color: #7da8d4;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.project-item a:hover {
  background-color: #25476a;
}

#contact p {
  text-align: center;
}
#contact a {
  font-size: 1.2rem;
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
  word-break: break-all;
}
#contact a:hover {
  text-decoration: underline;
}

footer {
  text-align: center;
  padding: 2rem 5%;
  background-color: #343a40;
  color: #aaa;
  margin-top: 2rem;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

#about h3 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.history-list {
  list-style: none;
  padding-left: 0;
  text-align: left;
}

.history-list li {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.history-list .history-date {
  min-width: 110px;
  font-weight: 600;
  color: #555;
  padding-right: 1.5rem;
}


.history-list .history-event {
  font-weight: 500;
  color: #333;
}


@media (max-width: 768px) {
  .about-container {
    grid-template-columns: 1fr;
  }
}





  @media (max-width: 600px) {
    .history-list .history-date {
      min-width: auto;
      padding-right: 1rem;
    }
    
  }


#main-nav a.active {
  color: #000; 
  font-weight: 1000;
}



#main-nav a:hover::after {
    content: none;
}


.hero-links {
  margin-top: 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #f8f9fa;
}


.github-label {
  margin-right: 0.5rem;
}

.github-url {
  color: #ADD8E6;
  text-decoration: underline;
  font-weight: 500;
  word-break: break-all;
  transition: color 0.3s ease;
}

.github-url:hover {
  color: #ffffff;
  text-decoration: none;
}

.responsive-video {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}