:root {
  color-scheme: light;
  font-family: Inter, Arial, sans-serif;
  color: #171717;
  background: #f4f5f2;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f4f5f2;
}

a {
  color: inherit;
}

.site-header,
main,
footer {
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #cfd2cb;
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.identity__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #20211f;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
}

.identity strong,
.identity small {
  display: block;
  letter-spacing: 0;
}

.identity strong {
  font-size: 15px;
}

.identity small {
  margin-top: 3px;
  color: #686b65;
  font-size: 13px;
}

.github-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid #aeb2aa;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.github-link:hover,
.github-link:focus-visible {
  color: #ffffff;
  background: #20211f;
  border-color: #20211f;
}

main {
  padding-block: 58px 72px;
}

.heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 460px);
  gap: 48px;
  align-items: end;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #d34b36;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1;
  letter-spacing: 0;
}

.summary {
  margin: 0;
  color: #5d605b;
  font-size: 16px;
  line-height: 1.55;
}

.project-section + .project-section {
  margin-top: 72px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 460px);
  gap: 48px;
  align-items: end;
  margin-bottom: 24px;
  padding-top: 22px;
  border-top: 1px solid #cfd2cb;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.section-heading p {
  margin: 0;
  color: #5d605b;
  font-size: 14px;
  line-height: 1.55;
}

.section-heading .section-kicker {
  margin-bottom: 8px;
  color: #73766f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.project {
  min-width: 0;
  overflow: hidden;
  display: block;
  border: 1px solid #d1d4ce;
  border-top: 4px solid var(--accent);
  border-radius: 6px;
  background: #ffffff;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.project:hover,
.project:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgb(23 23 23 / 12%);
  outline: none;
}

.project img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid #e2e4df;
}

.project__preview {
  display: block;
}

.project__meta {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.project__meta strong,
.project__meta small,
.project__meta > span:first-child {
  letter-spacing: 0;
}

.project__meta > span:first-child {
  min-width: 0;
}

.project__meta strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
}

.project__meta small {
  display: block;
  margin-top: 5px;
  color: #70736d;
  font-size: 12px;
}

.project__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project__actions a,
.case-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 13px;
  border: 1px solid #aeb2aa;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.project__actions a:last-child,
.case-actions a:first-child {
  color: #ffffff;
  background: #20211f;
  border-color: #20211f;
}

.project__actions a:hover,
.project__actions a:focus-visible,
.case-actions a:hover,
.case-actions a:focus-visible {
  color: #ffffff;
  background: #d34b36;
  border-color: #d34b36;
  outline: none;
}

.case-main {
  padding-top: 36px;
}

.case-back {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-bottom: 34px;
  color: #5d605b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.case-back:hover,
.case-back:focus-visible {
  color: #d34b36;
}

.case-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 30px;
}

.case-heading h1 {
  max-width: 920px;
}

.case-actions {
  display: flex;
  gap: 10px;
}

.case-actions a {
  min-height: 44px;
  padding-inline: 18px;
  font-size: 13px;
}

.case-cover {
  width: 100%;
  max-height: 760px;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: top center;
  border: 1px solid #d1d4ce;
  border-radius: 6px;
  background: #ffffff;
}

.case-cover--ui {
  aspect-ratio: 16 / 10;
}

.case-content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 72px;
  padding-top: 46px;
}

.case-copy {
  max-width: 760px;
}

.case-copy h2,
.case-facts h2 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.case-copy p {
  margin: 0 0 18px;
  color: #4f524d;
  font-size: 16px;
  line-height: 1.7;
}

.case-facts {
  border-top: 1px solid #cfd2cb;
}

.case-facts h2 {
  margin-top: 20px;
}

.case-facts dl {
  margin: 0;
}

.case-facts div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 16px;
  padding-block: 13px;
  border-top: 1px solid #dedfdb;
}

.case-facts dt,
.case-facts dd {
  margin: 0;
  letter-spacing: 0;
}

.case-facts dt {
  color: #73766f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-facts dd {
  font-size: 14px;
  line-height: 1.45;
}

.project--green { --accent: #1f8b5f; }
.project--blue { --accent: #3179bf; }
.project--teal { --accent: #159b91; }
.project--cyan { --accent: #2c829f; }
.project--ink { --accent: #333333; }
.project--rose { --accent: #c95b77; }
.project--gold { --accent: #ad7c18; }
.project--violet { --accent: #7655a8; }
.project--cornflower { --accent: #5d83d6; }
.project--red { --accent: #c74f43; }
.project--orange { --accent: #d27632; }

footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #cfd2cb;
  color: #686b65;
  font-size: 13px;
}

@media (max-width: 980px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: 44px;
  }

  .case-content {
    gap: 38px;
  }
}

@media (max-width: 700px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1440px);
  }

  .site-header {
    min-height: 78px;
  }

  main {
    padding-block: 38px 48px;
  }

  .heading-row {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 26px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-section + .project-section {
    margin-top: 54px;
  }

  h1 {
    font-size: 38px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project__meta {
    min-height: 86px;
  }

  .case-main {
    padding-top: 26px;
  }

  .case-back {
    margin-bottom: 24px;
  }

  .case-heading,
  .case-content {
    grid-template-columns: 1fr;
  }

  .case-heading {
    gap: 22px;
  }

  .case-actions {
    flex-wrap: wrap;
  }

  .case-content {
    gap: 38px;
    padding-top: 34px;
  }
}

@media (max-width: 430px) {
  .identity small,
  footer span:last-child {
    display: none;
  }

  .github-link {
    padding-inline: 12px;
  }

  h1 {
    font-size: 34px;
  }

  .project__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .project__actions,
  .project__actions a,
  .case-actions,
  .case-actions a {
    width: 100%;
  }

  .case-facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

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