* {
  box-sizing: border-box;
}

html {
  background: #fff;
  color: #111;
  font-family: "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 32px 24px;
}

main {
  width: min(100%, 750px);
  text-align: center;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 16px;
  border: 1px solid #111;
  border-radius: 18px;
  color: #111;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform 200ms ease, box-shadow 200ms ease;
  animation: arrive 600ms ease both;
}

.project:nth-child(1) { background: linear-gradient(145deg, #d8f7e9, #a9e6e8); }
.project:nth-child(2) { background: linear-gradient(145deg, #f2e7fa, #d7f4e7); animation-delay: 80ms; }
.project:nth-child(3) { background: linear-gradient(145deg, #fffaf2, #dce8f2); animation-delay: 160ms; }
.project:hover { transform: translateY(-4px); box-shadow: 0 10px 0 #111; }
.project:focus-visible, .contact:focus-visible { outline: 3px solid #111; outline-offset: 5px; }

.project img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 18px;
}

.contact {
  display: inline-block;
  margin-top: 36px;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 5px;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  main { width: min(100%, 360px); }
  .projects { grid-template-columns: 1fr; gap: 12px; }
  .project { min-height: 100px; flex-direction: row; justify-content: flex-start; gap: 20px; padding: 16px 20px; text-align: left; }
  .project img { width: 64px; height: 64px; border-radius: 15px; }
  .contact { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .project { animation: none; transition: none; }
}
