/* Ruxi Li portfolio */
@font-face { font-family: "Work Sans"; font-weight: 300; font-style: normal; font-display: swap; src: url("fonts/work-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/work-sans-latin-500-normal.woff2") format("woff2"); }

:root {
  --page-bg: #ffffff;
  --heading: #000000;
  --text: #000000;
  --navy: #253551;
  --gutter: 3.2vw;
  --body-font: "halyard-text", "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --head-font: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--body-font);
  font-weight: 300;
  font-size: clamp(15px, 1.24vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 36px var(--gutter);
  background: var(--page-bg);
}
.logo img { height: 80px; width: auto; }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.site-header nav a { text-decoration: none; font-size: clamp(15px, 1.24vw, 18px); }
.site-header nav a.active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.icon { display: inline-flex; color: inherit; }
.icon svg { width: 16px; height: 16px; }

/* Home grid */
.grid {
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: 27px; row-gap: 10px;
  padding: 0 var(--gutter) 40px;
}
.tile { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #eee; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.4); opacity: 0; transition: opacity .25s ease; }
.tile-title {
  position: absolute; top: 6.5%; left: 7%; z-index: 1;
  font-family: var(--head-font); font-weight: 700; font-size: clamp(16px, 1.75vw, 25px); letter-spacing: .06em; color: #000;
  opacity: 0; transition: opacity .25s ease;
}
.tile:hover::after, .tile:focus-visible::after, .tile:hover .tile-title, .tile:focus-visible .tile-title { opacity: 1; }

/* Project pages */
.project .video-wrap { width: 100%; background: #000; }
.project .video-wrap video { width: 100%; height: auto; }
.text-block { max-width: 1000px; margin: 0 auto; padding: 56px var(--gutter) 64px; box-sizing: content-box; }
.text-block h2 {
  font-family: var(--head-font); font-weight: 700; color: var(--heading);
  font-size: clamp(28px, 3.16vw, 46px); line-height: 1.12; margin: 0 0 32px;
}
.text-block p { margin: 0 0 16px; }
.text-block a { text-underline-offset: 3px; }

.gallery { display: grid; gap: 38px; padding: 0 var(--gutter) 38px; }
.gallery.cols-2 { grid-template-columns: 1fr 1fr; }
.gallery img { width: 100%; height: auto; }

.loops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; padding: 0 var(--gutter); }
.loops video { width: 100%; height: auto; }

.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 0 var(--gutter) 38px; }
.split .text-block { padding: 0 0 0 8%; max-width: none; }
.split-media { display: grid; grid-template-columns: 363fr 305fr; gap: 14px; align-items: center; }
.split-media > * { width: 100%; height: auto; }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 48px var(--gutter); }
.pager a { display: flex; align-items: center; gap: 18px; text-decoration: none; }
.pager .next { text-align: right; }
.pager small { display: block; font-size: 0.85em; opacity: .8; }
.pager b { display: block; font-weight: 300; font-size: clamp(18px, 1.75vw, 25px); }
.pager .arrow { font-size: 26px; }
.pager a:hover b { text-decoration: underline; text-underline-offset: 4px; }

/* Contact */
.contact { padding: 28px var(--gutter) 0; }
.contact-hero { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.contact-cols { display: grid; grid-template-columns: 664fr 608fr; column-gap: 4.7%; padding: 90px 0 60px; }
.contact-cols h3 { font-family: var(--head-font); font-weight: 700; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.17; margin: 28px 0 0; }
.contact-cols p { margin: 0 0 16px; }
.contact .email { margin-top: 56px; }
.contact .email strong { font-weight: 500; }
.contact .email a { text-decoration: none; }
.button {
  display: inline-block; margin-top: 16px; background: var(--navy); color: #fff; text-decoration: none;
  font-weight: 500; font-size: 16px; padding: 24px 40px;
}
.button:hover { opacity: .85; }

.site-footer { display: flex; justify-content: center; gap: 14px; padding: 80px 0 64px; }

.notfound { text-align: center; padding: 120px var(--gutter); }

/* Mobile */
@media (max-width: 767px) {
  :root { --gutter: 6vw; }
  .site-header { padding: 22px var(--gutter); }
  .logo img { height: 52px; }
  .site-header nav { gap: 14px; }
  .grid { grid-template-columns: 1fr; row-gap: 10px; }
  .tile-title { opacity: 1; }
  .tile::after { display: none; }
  .tile-title { display: none; }
  .text-block { padding: 36px var(--gutter) 40px; }
  .text-block h2 { margin-bottom: 20px; }
  .gallery { gap: 14px; }
  .gallery.cols-2 { grid-template-columns: 1fr; }
  .loops { grid-template-columns: 1fr; gap: 14px; }
  .split { grid-template-columns: 1fr; padding-top: 10px; }
  .split .text-block { padding: 0; }
  .contact-cols { grid-template-columns: 1fr; padding-top: 40px; row-gap: 40px; }
  .pager { gap: 20px; }
  .pager .arrow { display: none; }
}
