﻿/* So Far Lab — minimal mobile-first portfolio */

:root {
  --paper: #e9e1d4;
  --paper-soft: #efe8dd;
  --ink: #121212;
  --muted: #777064;
  --black: #050505;
  --font: 'SoFar Serif SC', 'Source Han Serif SC', 'Noto Serif CJK SC', 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
}

@font-face {
  font-family: 'SoFar Serif SC';
  src: url('assets/fonts/SoFarSerifSC-subset.ttf?v=20260629-videoopt2') format('truetype');
  font-weight: 200 900;
  font-style: normal;
  font-display: block;
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.38;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

ul {
  list-style: none;
}

/* Landing */

.page-landing {
  overflow: hidden;
  background: var(--paper);
}

.page-landing::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.45s ease;
}

.landing-cover {
  position: relative;
  height: 100svh;
  min-height: 620px;
  background: var(--black);
  opacity: 1;
  transform: scale(1);
  transition: opacity 1.45s ease, transform 1.45s ease;
}

.landing-media,
.landing-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) brightness(0.74);
  object-position: center center;
}

.landing-media {
  display: block;
}


.landing-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.landing-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 24px;
  color: #f5f1ea;
  text-align: center;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: landingFadeIn 2.8s ease 0.45s forwards;
  transition: opacity 0.95s ease;
}

.page-landing.is-leaving::after {
  opacity: 1;
}

.page-landing.is-leaving .landing-cover {
  opacity: 0;
  transform: scale(1.012);
}

.page-landing.is-leaving .landing-mark {
  opacity: 0;
}

.landing-mark:hover {
  text-decoration: none;
}

.landing-mark,
.landing-action {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.landing-action:focus,
.landing-action:hover,
.landing-action:active {
  outline: none;
  background: transparent;
  text-decoration: none;
}

.landing-title {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.landing-action {
  display: inline-block;
  width: fit-content;
  border-bottom: 1px solid currentColor;
  font-family: var(--font);
  font-size: 15px;
  font-style: italic;
  line-height: 1.05;
  text-decoration: none;
}

@keyframes landingFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -47%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}


.landing-cover::before {
  content: '↓';
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 2;
  color: #080808;
  font-family: var(--font);
  font-size: 15px;
  transform: translateX(-50%);
}

@media (prefers-reduced-motion: reduce) {
  .page-landing::after,
  .landing-cover,
  .landing-mark {
    transition-duration: 0.01ms;
  }
}

/* Shared */

.folio-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 20px 24px 0;
}

.home-header {
  position: relative;
  z-index: 2;
}

.about-header {
  position: relative;
  z-index: 2;
}

.project-header {
  position: relative;
  z-index: 2;
}

.brand,
.header-action a,
.link-column a,
.end-links a,
.folio-footer a {
  text-decoration: none;
}

.header-action {
  display: grid;
  justify-items: end;
  text-align: right;
}

.link-column a {
  width: fit-content;
  border-bottom: 1px solid currentColor;
  line-height: 1.05;
}

.home-header .brand,
.home-header .header-action a {
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.home-header .header-action a {
  font-style: italic;
}

.back-link {
  width: fit-content;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1;
}

.back-link:hover {
  text-decoration: none;
}

.contact-menu {
  position: relative;
  font-family: var(--font);
  font-size: 13px;
  font-style: italic;
  line-height: 1.05;
}

.contact-menu summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.contact-menu summary::-webkit-details-marker {
  display: none;
}

.contact-panel {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  z-index: 10;
  display: grid;
  width: min(220px, calc(100vw - 48px));
  gap: 24px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid rgba(18, 18, 18, 0.18);
  box-shadow: 0 18px 40px rgba(18, 18, 18, 0.08);
  text-align: left;
}

.contact-panel a {
  font-style: normal;
  line-height: 1.35;
  word-break: break-all;
}

.contact-qr {
  display: grid;
  gap: 10px;
  font-style: normal;
  line-height: 1.35;
}

.contact-copy {
  width: fit-content;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: var(--font);
  font-size: inherit;
  line-height: 1.2;
}

.contact-copy.is-copied::after {
  content: ' copied';
  color: var(--muted);
}

.contact-qr img {
  width: 116px;
  height: 116px;
  object-fit: contain;
  background: #fff;
}

.intro-section,
.project-intro {
  min-height: 78svh;
  display: grid;
  align-content: end;
  gap: 76px;
  padding: 0 24px 70px;
}

.intro-copy {
  display: grid;
  gap: 26px;
  max-width: 780px;
}

.intro-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.intro-links p {
  margin-bottom: 24px;
}

.intro-links li {
  margin-top: 4px;
}

.link-column {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.home-hero {
  position: relative;
  min-height: calc(100svh - 52px);
  align-content: center;
  padding: 0 24px 92px;
}

.intro-manifest {
  display: grid;
  gap: 26px;
  max-width: 320px;
  margin-top: 8svh;
  font-size: 14px;
  line-height: 1.64;
}

.intro-manifest p:first-child {
  margin-bottom: 0;
}


.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1;
  opacity: 1;
  transition: opacity 0.24s ease;
}

.scroll-cue.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Home work */

.work-index {
  padding: 56px 24px 0;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 112px;
}

.work-category {
  display: grid;
  gap: 34px;
}

.work-category-title {
  display: flex;
  gap: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.64;
}

.work-category-list {
  display: grid;
  gap: 62px;
}

.work-card {
  --work-brightness: 0.86;
  --work-contrast: 0.94;
  --work-gray: 1;
  --work-scale: 1;
  display: block;
}

.work-card:hover {
  text-decoration: none;
}

.work-label {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.64;
}

.work-thumb {
  display: flex;
  width: 100%;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--black);
  padding: 18px;
}

.work-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(var(--work-gray)) contrast(var(--work-contrast)) brightness(var(--work-brightness));
  transform: scale(var(--work-scale));
  transition: filter 0.18s linear, transform 0.18s linear;
}

.work-thumb.is-placeholder {
  min-height: 0;
}

.work-card:active .work-thumb img,
.work-card.is-centered .work-thumb img,
.work-card:focus-visible .work-thumb img {
  filter: grayscale(0) contrast(1) brightness(1);
  transform: scale(1.015);
}

@media (hover: hover) and (pointer: fine) {
  .work-card:hover .work-thumb img {
    filter: grayscale(0) contrast(1) brightness(1);
    transform: scale(1.015);
  }
}

/* Project */

.project-intro {
  position: relative;
  min-height: 100svh;
  align-content: start;
  gap: 16px;
  padding-top: 13svh;
  padding-bottom: 92px;
  font-size: 14px;
  line-height: 1.64;
}

.project-intro h1 {
  font-size: inherit;
  font-weight: 400;
}

.project-intro [data-project-desc] {
  max-width: 760px;
  white-space: pre-line;
}

.project-kicker {
  color: var(--muted);
  margin-bottom: 1.64em;
}

.project-info,
.project-status {
  color: var(--ink);
}

.project-media {
  display: grid;
  gap: 48px;
  padding: 48px 24px 0;
}

.project-scroll-cue {
  bottom: 52px;
}

.project-frame-wrap {
  display: grid;
  gap: 10px;
}

.project-frame {
  --frame-pad: 18px;
  position: relative;
  display: grid;
  align-self: start;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  background: var(--black);
  padding: 0;
  cursor: zoom-in;
}

.project-frame.is-placeholder {
  cursor: default;
}

.project-frame img {
  position: absolute;
  inset: var(--frame-pad);
  display: block;
  width: calc(100% - var(--frame-pad) * 2);
  height: calc(100% - var(--frame-pad) * 2);
  max-height: 100%;
  object-fit: contain;
  margin: 0 auto;
  filter: grayscale(0.25);
}

.project-state-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.project-frame > .project-state-label {
  display: none;
}

.project-frame:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 6px;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 5, 5, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-hint {
  position: fixed;
  left: 50%;
  bottom: 18px;
  color: rgba(244, 240, 232, 0.46);
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  border: 0;
  background: transparent;
  color: #f4f0e8;
  cursor: pointer;
  font-family: var(--font);
  font-size: 20px;
  line-height: 1;
}

.other-projects {
  padding: 92px 0 20svh;
}

.project-strip {
  --strip-size: calc((100vw - 48px - 56px) / 3);
  --strip-side-space: max(24px, calc(50vw - var(--strip-size) / 2));
  display: flex;
  align-items: flex-start;
  gap: 28px;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
  padding: 0 var(--strip-side-space) 12px;
  scroll-padding-inline: var(--strip-side-space);
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  cursor: grab;
  user-select: none;
}

.project-strip.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.project-strip::-webkit-scrollbar {
  display: none;
}

.strip-item {
  flex: 0 0 clamp(86px, var(--strip-size), 132px);
  scroll-snap-align: center;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.strip-item:hover {
  text-decoration: none;
}

.strip-item:active {
  transform: scale(0.97);
}

.strip-thumb {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  overflow: hidden;
  background: #d8d1c6;
}

.strip-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(1) contrast(0.94) brightness(0.86);
}

.strip-current .strip-thumb img,
.strip-item.is-current-project .strip-thumb img {
  filter: grayscale(0) contrast(1) brightness(1);
}

.strip-thumb.is-placeholder {
  background: var(--black);
}

.strip-current {
  flex: 0 0 clamp(86px, var(--strip-size), 132px);
  pointer-events: none;
  scroll-snap-align: center;
}

.strip-empty {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.strip-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 18px 24px 0;
}

.strip-dot {
  width: 4px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(27, 24, 21, 0.26);
  cursor: pointer;
  transition: background 0.22s ease, opacity 0.22s ease;
}

.strip-dot.is-active {
  background: rgba(27, 24, 21, 0.86);
}

/* Bottom links */

.end-links {
  min-height: 64svh;
  display: grid;
  place-items: center;
  padding: 80px 24px;
}

.end-links nav {
  display: grid;
  gap: 28px;
}

.project-end {
  min-height: 34svh;
}

.folio-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  margin-top: 42svh;
  padding: 0 24px 26px;
  font-size: 14px;
  line-height: 1.64;
}

.footer-note {
  display: grid;
  gap: 2px;
}

.footer-note p:nth-child(2) {
  margin-bottom: 1.64em;
}

.footer-about {
  justify-self: end;
}

/* About compatibility */

.page-about {
  background: var(--paper);
}

.site-header,
.site-footer,
.bottom-bar {
  display: none;
}

.about-main {
  padding: 18svh 24px 96px;
}

.about-grid {
  display: grid;
  gap: 86px;
  max-width: 520px;
}

.about-col {
  font-size: 14px;
  line-height: 1.64;
}

.about-col h1,
.about-col h2 {
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  margin-bottom: 26px;
}

.about-studio p {
  max-width: 420px;
}

.about-col p {
  max-width: 720px;
}

.about-col p + p {
  margin-top: 18px;
}

.profile-photo {
  width: min(100%, 520px);
  aspect-ratio: 16 / 9;
  margin-bottom: 28px;
  background: transparent;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left top;
  filter: grayscale(1) contrast(0.96) brightness(0.9);
}

.profile-table {
  display: grid;
  gap: 22px;
}

.profile-bio {
  margin-top: 46px;
  max-width: 420px;
}

.profile-key {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

@media (min-width: 760px) {
  body {
    font-size: 17px;
  }

  .landing-cover {
    min-height: 720px;
  }

  .folio-header {
    padding: 30px 48px 0;
  }

  .home-header .brand,
  .home-header .header-action a {
    font-size: 14px;
  }

  .contact-menu {
    font-size: 14px;
  }

  .intro-section,
  .project-intro {
    padding: 0 48px 88px;
  }

  .home-hero {
    min-height: calc(100svh - 64px);
    padding-bottom: 104px;
  }

  .intro-manifest {
    max-width: 420px;
    font-size: 15px;
    margin-top: 6svh;
  }

  .project-intro {
    min-height: 100svh;
    padding-top: 12svh;
    padding-bottom: 104px;
    font-size: 15px;
  }

  .about-main {
    padding: 18svh 48px 120px;
  }

  .about-grid {
    max-width: 640px;
    gap: 104px;
  }

  .about-col {
    font-size: 15px;
  }

  .about-studio p {
    max-width: 560px;
  }

  .profile-photo {
    width: 560px;
    max-width: 100%;
  }

  .intro-links {
    max-width: 760px;
  }

  .work-index,
  .project-media {
    padding-left: 48px;
    padding-right: 48px;
  }

  .work-grid {
    row-gap: 128px;
  }

  .work-category {
    gap: 42px;
  }

  .work-category-title {
    font-size: 15px;
  }

  .work-category-list {
    gap: 84px;
  }

  .work-label {
    font-size: 15px;
  }

  .work-thumb {
    padding: 28px;
  }

  .project-frame {
    --frame-pad: 48px;
  }

  .project-strip {
    gap: 64px;
    padding-left: 48px;
    padding-right: 48px;
    scroll-padding-inline: 48px;
  }

  .strip-item,
  .strip-current {
    flex-basis: 180px;
  }

  .folio-footer {
    grid-template-columns: 1.2fr 1fr auto;
    align-items: end;
    margin-top: 48svh;
    padding: 0 48px 34px;
    font-size: 15px;
  }

  .footer-note {
    grid-column: 1 / 2;
  }

  .footer-about {
    grid-column: 3 / 4;
  }
}

.intro-manifest p:first-child {
  margin-bottom: 0;
}


@media (min-width: 1100px) {
  body {
    font-size: 18px;
  }

  .folio-header {
    padding-left: 64px;
    padding-right: 64px;
  }

  .intro-section,
  .project-intro {
    padding-left: 64px;
    padding-right: 64px;
  }

  .project-intro {
    padding-top: 12svh;
    padding-bottom: 112px;
  }

  .work-index,
  .project-media {
    padding-left: 64px;
    padding-right: 64px;
  }

  .work-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 920px;
    margin: 0 auto;
  }

  .project-media {
    gap: 64px;
  }

  .project-frame {
    --frame-pad: 72px;
  }
}











