* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: var(--body-padding);
  background: #f7f8fa;
  color: #222;
  font-family: Arial, Helvetica, sans-serif;
}

.main-links {
  display: grid;
  grid-template-columns: var(--main-columns);
  gap: 8px;
}

.tile {
  display: flex;
  height: 94px;
  align-items: center;
  justify-content: center;
  padding: var(--tile-padding);
  border: 1px solid #e2e5e9;
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--tile-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-page .tile {
  min-width: 0;
}

.work-page .tile {
  overflow: hidden;
}

.home-page a.tile:hover,
.home-page a.tile:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  outline: none;
}

.work-page .tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.14);
}

.work-page .tile a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.tile img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--tile-image-height);
  object-fit: contain;
}

.home-page .capturing-life-tile {
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

.home-page a.tile.capturing-life-tile img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  border-radius: inherit;
}

.work-page .tile.full-image-tile {
  padding: 0;
  overflow: hidden;
  border-radius: 9px;
}

.work-page .tile.full-image-tile img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  border-radius: inherit;
}

.home-page .page-layout {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 1250px;
  margin: 0 auto;
  align-items: start;
}

.home-page .social-links,
.home-page .main-links {
  display: grid;
  gap: 8px;
}

.home-page .social-links {
  grid-template-columns: 1fr;
}

.home-page #slider {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 5 / 2;
  margin: 16px auto 4px;
  overflow: hidden;
  border-radius: 9px;
}

.home-page #slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-page .page {
  max-width: 1250px;
  margin: 0 auto;
}

.home-page {
  --body-padding: 12px;
  --main-columns: repeat(6, minmax(0, 1fr));
  --tile-padding: 6px;
  --tile-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --tile-image-height: 70px;
}

.work-page {
  --body-padding: 20px;
  --main-columns: repeat(6, 1fr);
  --tile-padding: 8px;
  --tile-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  --tile-image-height: 76px;
}

@media (max-width: 850px) {
  .home-page {
    --body-padding: 10px;
    --main-columns: repeat(4, minmax(0, 1fr));
  }

  .home-page .page-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-page .social-links {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .work-page {
    --main-columns: repeat(4, 1fr);
  }
}

@media (max-width: 420px) {
  .home-page .social-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-page {
    --main-columns: repeat(4, minmax(0, 1fr));
    --tile-padding: 4px;
    --tile-image-height: 58px;
  }

  .home-page .main-links {
    gap: 6px;
  }

  .home-page #slider {
    max-width: 100%;
  }

  .work-page {
    --body-padding: 10px;
    --main-columns: repeat(3, 1fr);
    --tile-padding: 6px;
    --tile-image-height: 64px;
  }

  .work-page .main-links {
    gap: 6px;
  }

  .work-page .tile {
    height: 78px;
  }
}