/* Rebuild of iamryanchen.com (originally Squarespace).
   Original fonts came from Adobe Fonts: aktiv-grotesk (nav), new-spirit-condensed (About headline),
   Graphik Medium (small caps labels). Google Fonts stand-ins are used here; to restore the originals,
   add your Adobe Fonts kit <link> to each page and swap the three --font-* values below. */
:root {
  --ink: #212121;
  --bg: #ffffff;
  --link: #f21c1c;
  --rule: #212121;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-nav: "Inter", "Helvetica Neue", Arial, sans-serif;           /* was aktiv-grotesk */
  --font-display: "Roboto Serif", Georgia, serif;                       /* was new-spirit-condensed */
  --font-label: "Inter", "Helvetica Neue", Arial, sans-serif;          /* was Graphik Medium */
  --gutter: max(10vw, 20px);
  --max: 1100px;
  --gap: 40px;
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 20px/1.9 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: var(--link); text-decoration: none; }
a:hover { opacity: .75; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Header */
.site-header { padding-top: 30px; padding-bottom: 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo img { width: 70px; height: 70px; }
.nav { display: flex; gap: 40px; font: 400 24px/1.3 var(--font-nav); }
.nav a { color: var(--ink); }

hr.rule { border: 0; border-top: 2px solid var(--rule); margin: 0; }

/* Gallery: two auto-balanced columns, like Squarespace "autocolumns" */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; padding-bottom: 60px; }
.gallery .col { display: flex; flex-direction: column; gap: var(--gap); }
.tile { position: relative; display: block; padding: 0; border: 0; background: #f2f2f2; cursor: zoom-in; width: 100%; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.tile .cap {
  position: absolute; inset: auto 0 0 0; padding: 14px 16px;
  background: rgba(0,0,0,.55); color: #fff; font: 500 15px/1.4 var(--font-nav); text-align: left;
  opacity: 0; transition: opacity .25s;
}
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; }
.tile:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }

/* Lightbox (dark, like the original) */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 56px 72px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; position: relative; max-width: 100%; max-height: 100%; display: grid; place-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 112px); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { position: absolute; inset: auto 0 0 0; padding: 16px 20px; background: rgba(0,0,0,.5); color: #fff; font: 500 16px/1.4 var(--font-nav); }
.lightbox figcaption:empty { display: none; }
.lb-btn { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; padding: 12px; line-height: 0; opacity: .8; }
.lb-btn:hover { opacity: 1; }
.lb-close { top: 10px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 41fr) minmax(0, 59fr); gap: 34px; padding-top: 28px; padding-bottom: 60px; align-items: start; }
.about-photo img { width: 100%; border-radius: 999px 999px 0 0; }
.about-text { padding-top: 85px; }
.about-text h1 { font: 400 44px/1.3 var(--font-display); font-variation-settings: "wdth" 78; letter-spacing: -.01em; margin: 0 0 30px; }
.about-text p { margin: 25px 0 32px; }
.about-lists { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 34px; margin-top: 40px; }
.about-lists p { margin: 0; }
.icons { display: flex; gap: 8px; margin-top: 40px; }
.icons a { width: 28px; height: 28px; display: grid; place-items: center; }
.icons svg { width: 24px; height: 24px; fill: currentColor; }

/* Small-caps labels and footer */
h3.label { font: 700 13px/1.8 var(--font-label); letter-spacing: 1.69px; text-transform: uppercase; margin: 0 0 13px; }
.site-footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 250px); gap: 40px; padding-top: 40px; padding-bottom: 60px; }
.site-footer p { margin: 0; }
.site-footer .mail::before { content: "✉️ "; }

@media (max-width: 767px) {
  body { font-size: 17px; line-height: 1.75; }
  :root { --gutter: 20px; --gap: 20px; }
  .site-header { padding-top: 20px; padding-bottom: 20px; }
  .logo img { width: 54px; height: 54px; }
  .nav { gap: 24px; font-size: 20px; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .about { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .about-photo { max-width: 340px; }
  .about-text { padding-top: 0; }
  .about-text h1 { font-size: 34px; }
  .about-lists { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .site-footer { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .lightbox { padding: 48px 8px; }
}
