
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #222;
  background: #fff;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* ============================================
   Top section
   ============================================ */

#top {
  max-width: 600px;
  margin-bottom: 2.5em;
}

h1 {
  font-size: 3em;
  font-weight: bold;
  margin-bottom: 0em;
}

#top p {
  margin-bottom: 0.75em;
  font-size: 1em;
  color: #222;
}


/* ============================================
   Links
   ============================================ */

a {
  color: #222;
  text-decoration: underline;
}

a:hover {
  color: #000;
}

/* ============================================
   Work section
   ============================================ */

#work {
  margin-top: 1.5em;
}

h2 {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 1em;
  margin-top: 1.5em;
}

/* ============================================
   Work grid
   ============================================ */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2em 1.5em;
}

.work-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.work-card a:hover .work-title {
  text-decoration: underline;
}

/* Image container — fixed aspect ratio, grey fallback */
.work-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  background-color: #e8e8e8;
  overflow: hidden;
  margin-bottom: 0.5em;
}

.work-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.work-card a:hover .work-img img {
  opacity: 0.55;
}

/* Text below image */
.work-text {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.work-title {
  font-size: 1.1em;
  line-height: 1.4;
  color: #222;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 700px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5em 1em;
  }
}

@media (max-width: 440px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}
