@font-face {
  font-display: swap;
  font-family: "Avenir Light";
  font-style: normal;
  font-weight: 400;
  src: url("assets/fonts/avenir-light.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400;
  src: url("assets/fonts/playfair-regular.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  src: url("assets/fonts/playfair-bold.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Taipei Sans TC Beta";
  font-style: normal;
  font-weight: 700;
  src: url("assets/fonts/taipei-sans.woff2") format("woff2");
}

:root {
  --text: #252525;
  --muted: #303030;
  --link: #1d1d1d;
  --page: #ffffff;
  --wix-sans: "Avenir Light", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --wix-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --wix-taipei: "Taipei Sans TC Beta", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  align-items: center;
  display: flex;
  height: 98px;
  justify-content: center;
  padding: 16px 20px 14px;
}

.brand {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 18px;
  text-decoration: none;
}

.brand__logo {
  height: 59px;
  width: 59px;
}

.brand__text {
  display: grid;
  gap: 4px;
  line-height: 1.05;
}

.brand__name {
  font-family: var(--wix-taipei);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 30px;
}

.brand__subname {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 16.8px;
}

.intro {
  height: 151px;
  position: relative;
}

.intro__image {
  background-image: linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)), url("assets/hero.webp");
  background-position: center;
  background-size: cover;
  inset: 0;
  position: absolute;
}

.intro__content {
  align-items: center;
  display: flex;
  height: 100%;
  margin: 0 auto;
  max-width: 980px;
  padding: 0 18px;
  position: relative;
}

.intro p {
  color: #ffffff;
  font-family: var(--wix-taipei);
  font-size: 23px;
  font-weight: 700;
  line-height: 29.9px;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.works {
  margin: 0 auto;
  max-width: 922px;
  padding: 41px 0 54px;
}

.works h1 {
  font-family: var(--wix-taipei);
  font-size: 34px;
  font-weight: 700;
  line-height: normal;
  margin: 0 0 39px;
  text-align: center;
}

.work-grid {
  display: grid;
  grid-template-columns: 270px 72px 232px 89px 259px;
  justify-content: center;
  row-gap: 45px;
}

.work-card {
  text-align: center;
}

.work-card:nth-child(1),
.work-card:nth-child(4) {
  grid-column: 1;
  width: 270px;
}

.work-card:nth-child(2),
.work-card:nth-child(5) {
  grid-column: 3;
  width: 232px;
}

.work-card:nth-child(3) {
  grid-column: 5;
  width: 259px;
}

.work-card img {
  height: 184px;
  margin: 0 auto 15px;
  max-width: none;
  object-fit: cover;
  width: 259px;
}

.work-card:nth-child(1) img {
  height: 181px;
  width: 270px;
}

.work-card:nth-child(2) img {
  height: 184px;
  width: 232px;
}

.work-card:nth-child(5) img {
  height: 164px;
  margin-left: -11px;
  margin-bottom: 16px;
  width: 262px;
}

.work-card:nth-child(4) img {
  height: 165px;
  margin-left: -1px;
  width: 259px;
}

.work-card h2 {
  font-family: var(--wix-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  margin: 0 0 11px;
}

.work-card p {
  color: var(--muted);
  font-family: var(--wix-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 28.8px;
  margin: 0;
  text-align: left;
}

.work-card a {
  display: block;
  font-family: var(--wix-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 28.8px;
  text-align: left;
}

.site-footer {
  margin: 0 auto;
  max-width: 760px;
  padding: 1px 20px 34px;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}

.social-links a {
  border-radius: 50%;
  display: block;
  height: 39px;
  overflow: hidden;
  width: 39px;
}

.social-links img {
  height: 39px;
  width: 39px;
}

.site-footer p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  margin: 0 0 14px;
}

.site-footer a {
  text-decoration: none;
}

@media (max-width: 860px) {
  .site-header {
    height: auto;
    justify-content: flex-start;
  }

  .brand__name {
    font-size: 27px;
  }

  .brand__subname {
    font-size: 16px;
  }

  .intro {
    height: auto;
    min-height: 160px;
  }

  .intro__content {
    padding: 30px 24px;
  }

  .intro p {
    font-size: 22px;
  }

  .work-grid {
    column-gap: 34px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-card:nth-child(n) {
    grid-column: auto;
    width: auto;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 18px 20px;
  }

  .brand {
    gap: 13px;
  }

  .brand__logo {
    height: 50px;
    width: 50px;
  }

  .brand__name {
    font-size: 24px;
  }

  .brand__subname {
    font-size: 14px;
  }

  .intro p {
    font-size: 20px;
  }

  .works {
    padding: 30px 20px 54px;
  }

  .works h1 {
    font-size: 29px;
    margin-bottom: 28px;
  }

  .work-grid {
    grid-template-columns: minmax(0, 270px);
    row-gap: 44px;
  }

  .work-card {
    margin: 0 auto;
    max-width: 290px;
  }
}
