/* joycezchen.com — faithful port of the Adobe Portfolio site */

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

html {
  background-color: #F7F7F7;
}

body {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #222;
  font-size: 18px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; height: auto; }

.site {
  padding: 50px 4% 120px;
}
.site::after { content: ""; display: table; clear: both; }

/* ---------- sidebar ---------- */

.sidebar {
  float: left;
  width: 20%;
  margin-right: 5%;
}

.logo {
  display: block;
  font-size: 36px;
  line-height: 30px;
  font-weight: 400;
  color: #222;
  padding-bottom: 25px;
}

.sidebar nav {
  margin-top: 45px;
}
.sidebar nav a {
  display: block;
  font-size: 17px;
  line-height: 20px;
  font-weight: 600;
  color: #999;
  margin-bottom: 30px;
}
.sidebar nav a:hover,
.sidebar nav a.active { color: #222; }

.social {
  list-style: none;
  margin-top: 45px;
}
.social li { display: inline-block; padding-right: 12px; }
.social a { display: block; }
.social svg { width: 17px; height: 17px; fill: #999; display: block; }
.social a:hover svg { fill: #222; }

/* ---------- main column ---------- */

main {
  float: left;
  width: 75%;
}

.masthead {
  height: 20vh;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.masthead p {
  font-size: 18px;
  line-height: 28px;
  font-weight: 500;
  color: #000;
  width: 100%;
}

/* ---------- work grid (project covers) ---------- */

.project-covers {
  display: flex;
  flex-wrap: wrap;
}

.project-cover {
  position: relative;
  display: block;
  width: 49.75%;
  margin-right: 0.5%;
  margin-bottom: 0.5%;
}
.project-cover:nth-child(2n) { margin-right: 0; }

.cover-image {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.03);
}
.cover-image::before {
  content: "";
  display: block;
  padding-bottom: 56.25%;
}
.cover-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  transform: translate(-50%, -50%);
  object-fit: cover;
}
.cover-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #fff;
  opacity: 0;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.project-cover:hover .cover-image::after { opacity: 0.85; }

.project-cover .details {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 8%;
  opacity: 0;
  transition: opacity 0.15s ease;
  text-align: center;
}
.project-cover:hover .details { opacity: 1; }

.project-cover .date {
  display: block;
  font-size: 16px;
  line-height: 18px;
  font-style: italic;
  font-weight: 500;
  color: #999;
  padding-bottom: 5px;
}
.project-cover .details .title {
  display: block;
  font-size: 26px;
  line-height: 33px;
  font-weight: 600;
  color: #222;
}

/* ---------- gallery image grids (design / art) ---------- */

.image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.image-grid figure {
  width: calc(50% - 4px);
}
.image-grid.cols-3 figure { width: calc(33.333% - 5.34px); }
.image-grid img { width: 100%; }
.image-grid.square img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ---------- project pages ---------- */

.page-header {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 70px;
  padding-bottom: 40px;
  text-align: center;
}
.page-header .title {
  font-size: 30px;
  line-height: 34px;
  font-weight: 600;
  color: #222;
  padding-top: 8px;
  padding-bottom: 20px;
}
.page-header .description {
  font-size: 18px;
  line-height: 26px;
  font-weight: 400;
  color: #222;
  padding-bottom: 20px;
}
.page-header .description:last-child { padding-bottom: 0; }

.modules > * { margin-bottom: 40px; }
.modules > *:last-child { margin-bottom: 0; }

.module-image img { margin: 0 auto; }
.module-image.natural img { width: auto; max-width: 100%; }

.module-video video {
  width: 100%;
  background: #000;
}

.module-embed {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
}
.module-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

.module-text {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.module-text p { margin-bottom: 26px; }
.module-text p:last-child { margin-bottom: 0; }
.module-text a {
  color: #999;
  text-decoration: underline;
}
.module-text a:hover { color: #222; }

.module-button {
  text-align: center;
}
.module-button a {
  display: inline-block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: #222;
  padding: 13px 26px;
  border-radius: 2px;
}
.module-button a:hover { background: #000; }

/* ---------- responsive ---------- */

@media (max-width: 768px) {
  .site { padding: 30px 5% 80px; }
  .sidebar {
    float: none;
    width: 100%;
    margin: 0 0 10px;
  }
  .logo { padding-bottom: 10px; }
  .sidebar nav { margin-top: 15px; }
  .sidebar nav a {
    display: inline-block;
    margin: 0 22px 12px 0;
  }
  .social { margin-top: 5px; margin-bottom: 25px; }
  main { float: none; width: 100%; }
  .masthead { height: auto; min-height: 0; padding: 20px 0 35px; }
  .page-header { padding-top: 20px; }
  .page-header .title { font-size: 22px; line-height: 25px; padding-bottom: 14px; }
  .page-header .description { font-size: 14px; line-height: 20px; padding-bottom: 14px; }
  .project-cover { width: 100%; margin-right: 0; margin-bottom: 8px; }
  .image-grid figure, .image-grid.cols-3 figure { width: 100%; }
  .modules > * { margin-bottom: 25px; }
  body { font-size: 14px; line-height: 20px; }
  .module-text p { margin-bottom: 20px; }
}
