@import url("https://fonts.googleapis.com/css2?family=Spline+Sans+Mono:ital,wght@0,300..700;1,300..700&display=swap");

body {
  background-color: #283538;
  font-family: "Spline Sans Mono", monospace;
}

nav {
  width: 80%;
  display: flex;
  top: 20px;
  left: 10%;
  margin-left: 0;
  background-color: #2d5f5f;
  height: 50px;
  align-items: center;
  justify-content: center;
  border: solid 2px #e3e9ea;
  border-radius: 12px;
  position: fixed;
  z-index: 10;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

nav ul {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
  gap: 20px;
  list-style: none;
}

nav ul li a {
  color: #f0f8ff;
  text-decoration: none;
}
nav ul li a:hover {
  color: #9aa4ab;
  transition: color 0.2s ease;
}

header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  width: 80%;
  margin-left: 10%;
  flex-direction: column;
}
.top {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.desc {
  color: #9aa4ab;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}
.pic img {
  width: 500px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.info {
  color: #f0f8ff;
}
h2 {
  margin-left: 45%;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #f0f8ff;
}
.projects {
  width: 80%;
  margin-left: 10%;
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.project {
  overflow: hidden;
  color: #f0f8ff;
  background-color: #2d5f5f;
  border: 2px solid #e3e9ea;
  border-radius: 12px;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
  text-decoration: none;
  margin-bottom: 20px;
}

.project img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  margin-bottom: 18px;
}

.project h3,
.project p {
  margin-left: 6px;
  margin-right: 6px;
}

.project:hover {
  background-color: #367070;
  transform: translateY(-4px);
}

.project h3 {
  margin: 0 10px 10px;
  color: #ffffff;
}

.project p {
  margin: 5px 10px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  nav {
    width: 95%;
    left: 2.5%;
    height: auto;
    padding: 8px 0;
  }

  nav ul {
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav ul li a {
    font-size: 0.85rem;
  }

  header {
    width: 95%;
    margin-left: 2.5%;
    min-height: auto;
    padding: 100px 0 50px 0;
  }

  .top {
    flex-direction: column;
    text-align: center;
  }

  .pic img {
    width: 200px;
  }

  h2 {
    margin-left: 0;
    text-align: center;
  }

  .projects {
    width: 95%;
    margin-left: 2.5%;
  }
}

@media (max-width: 480px) {
  nav ul {
    gap: 6px;
  }

  nav ul li a {
    font-size: 0.75rem;
  }

  .pic img {
    width: 150px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}
