* {
  margin: 0;
  padding: 0;
  /* This makes width/height include padding + border */
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  background: #f5f5f7;
  color: #222;
  /* This controls spacing between lines of text */
  line-height: 1.5;
}
a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.container {
  max-width: 900px;
  margin: auto;
  padding: 16px;
}
header {
  background: #111827;
  color: white;
  padding: 16px 0;
}

nav {
  /* Flex puts list items in a row */
  display: flex;
  /* This puts first item left, last item right, and everything else in between */
  justify-content: space-between;
  align-items: center;
}

nav ul {
  display: flex;
  gap: 16px;
  list-style: none;
}
main {
  padding: 32px 0;
}

h2 {
  margin-bottom: 16px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 4.8px;
}
.intro {
  display: grid;
  /* This splits the layout into two columns */
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: center;
}

.intro-photo img {
  width: 100%;
  /* Makes the image perfectly round */
  border-radius: 50%;
  border: 3px solid #ddd;
}
.projects-list {
  display: grid;
  /* Creates flexible columns that shrink nicely */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.project-card {
  background: white;
  padding: 16px;
  /* Rounds the corners of the card */
  border-radius: 8px;
  border: 1px solid #ddd;
}

.project-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 8px;
}
footer {
  text-align: center;
  padding: 16px;
  color: #555;
  border-top: 1px solid #ddd;
}
/* This applies styles only when the screen is small */
@media (max-width: 700px) {
  .intro {
    grid-template-columns: 1fr;
  }

  nav {
    /* Flex-direction changes row → column */
    flex-direction: column;
    gap: 8px;
  }
}
