:root { --bg-color: #ffffff; --surface-color: #f9f9f9; --text-primary: #111111; --text-secondary: #666666; --border-color: #e5e5e5; --nav-glass: rgba(255, 255, 255, 0.85); --nav-fallback: rgba(255, 255, 255, 0.98); --container-width: 1400px; --smooth-ease: cubic-bezier(0.25, 1, 0.5, 1); --float-ease: var(--smooth-ease); --text-color: var(--text-primary); --anim-duration: 0.3s; --theme-transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, fill 0.3s ease, stroke 0.3s ease; }
[data-theme="dark"] { --bg-color: #0a0a0a; --surface-color: #121212; --text-primary: #ffffff; --text-secondary: #a0a0a0; --border-color: #262626; --nav-glass: rgba(10, 10, 10, 0.85); --nav-fallback: rgba(10, 10, 10, 0.98); }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; height: -webkit-fill-available; overscroll-behavior-y: none; touch-action: pan-x pan-y; background-color: var(--bg-color); transition: var(--theme-transition); -webkit-overflow-scrolling: touch; overflow-y: scroll; }
html.no-scroll { overflow: hidden !important; height: 100vh !important; }
body { background-color: var(--bg-color); color: var(--text-primary); font-family: 'Inter', sans-serif; transition: var(--theme-transition); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; width: 100%; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background-color: var(--border-color); border: 3px solid var(--bg-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--text-secondary); }

img { -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; -webkit-touch-callout: none; pointer-events: auto; }
a { text-decoration: none; color: inherit; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
nav { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; contain: paint; isolation: isolate; backface-visibility: hidden; -webkit-backface-visibility: hidden; background-color: var(--nav-fallback); border-bottom: 1px solid var(--border-color); transition: var(--theme-transition); transform: translateZ(0); -webkit-transform: translateZ(0); will-change: transform; padding-right: var(--scrollbar-width, 0px); }
@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) { nav { background-color: var(--nav-glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); } }
.nav-container { max-width: var(--container-width); margin: 0 auto; padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; height: 70px; }
.nav-logo-text { display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.35rem; line-height: 1; letter-spacing: -0.04em; text-transform: uppercase; white-space: nowrap; background-color: var(--text-primary); color: var(--bg-color); padding: 8px 14px; border-radius: 2px; transition: opacity 0.25s ease, background-color 0.25s ease, color 0.25s ease; cursor: pointer; }
.nav-logo-inner { display: inline-block; line-height: 1; transform: translateY(0.5px); }
.nav-right { display: flex; align-items: center; gap: 2.5rem; }
.nav-links { display: flex; gap: 2rem; }
.nav-btn { color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; position: relative; padding: 5px 0; transition: color 0.3s ease; }
.nav-btn:hover, .nav-btn.active { color: var(--text-primary); }
.nav-btn.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background: var(--text-primary); transition: background-color 0.3s ease; }
.nav-actions { padding-left: 25px; position: relative; display: flex; gap: 15px; }
.nav-actions::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 1px; background-color: var(--text-primary); opacity: 0.2; transition: background-color 0.3s ease; }
.icon-btn { color: var(--text-secondary); display: flex; align-items: center; justify-content: center; transition: opacity 0.2s, transform 0.2s, background-color 0.3s ease, color 0.3s ease; height: 40px; width: 40px; border-radius: 50%; }
.icon-btn:hover { color: var(--text-primary); background: rgba(125,125,125, 0.1); }
.icon-btn svg { width: 20px; height: 20px; stroke-width: 2; transition: stroke 0.3s ease, fill 0.3s ease; }
main { max-width: var(--container-width); margin: 0 auto; padding: 100px 5% 0; flex: 1; width: 100%; }
.section { display: none; opacity: 0; transition: opacity var(--anim-duration) var(--smooth-ease); }
.section.show { display: block; }
.section.active { opacity: 1; }
.hero-header { margin-bottom: 20px; width: 100%; }
.hero-header h1 { font-size: clamp(3rem, 6vw, 5rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; margin-bottom: 5px; color: var(--text-primary); transition: color 0.3s ease; }
.std-divider { width: 100%; height: 1px; background-color: var(--border-color); margin-top: 10px; margin-bottom: 30px; transition: var(--theme-transition); }
.filter-container { margin-bottom: 30px; display: flex; gap: 10px; flex-wrap: wrap; }

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  padding: 9px 22px;
  border-radius: 100px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  line-height: 1;
  transform: none;
  box-shadow: none;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.filter-btn:hover {
  background-color: var(--text-primary);
  color: var(--bg-color);
  border-color: var(--text-primary);
  transform: none;
  box-shadow: none;
}

.filter-btn.active {
  background-color: var(--text-primary);
  color: var(--bg-color);
  border-color: var(--text-primary);
}

html.js .masonry-grid { column-count: 3; column-gap: 30px; width: 100%; margin: 0; padding: 0; opacity: 1; transition: opacity 0.3s var(--smooth-ease); }
#gallery-grid{opacity:0;}
@keyframes simpleFade { from { opacity: 0; } to { opacity: 1; } }
.grid-item { break-inside: avoid; margin-bottom: 30px; margin-top: 0 !important; border-radius: 2px; overflow: hidden; background-color: var(--surface-color); position: relative; cursor: pointer; opacity: 0; animation: simpleFade 0.3s var(--smooth-ease) forwards; will-change: opacity; contain: content; display: inline-block; width: 100%; transition: background-color 0.3s ease; transform: translateZ(0); }
.grid-item.hidden { display: none; }
.grid-item img { display: block; width: 100%; height: auto; object-fit: cover; transition: transform 0.42s cubic-bezier(.25,1,.35,1); transform: scale(1) translateZ(0); backface-visibility: hidden; }
@media (hover: hover) { .grid-item:hover img { transform: scale(1.02) translateZ(0); } }
.gear-wrapper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; width: 100%; margin: 30px 0 30px 0; padding: 0; }
.gear-card { padding: 28px 30px 32px 30px; border-radius: 8px; background-color: var(--surface-color); border: 1px solid transparent; transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; }
.gear-card:hover {
  border-color: var(--border-color);
  transform: none;
  box-shadow: none;
}
.gear-card h3 { display: flex; align-items: center; font-size: 1.2rem; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid color-mix(in srgb, var(--border-color) 75%, transparent); font-weight: 600; letter-spacing: -0.02em; transition: border-color 0.3s ease; }
.gear-list li { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 0.95rem; color: var(--text-secondary); transition: color 0.3s ease; }
.gear-list span:first-child { color: var(--text-primary); font-weight: 500; transition: color 0.3s ease; }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.about-text { font-size: 1.1rem; color: var(--text-secondary); max-width: 500px; transition: color 0.3s ease; }
.about-text p { margin-bottom: 20px; transition: var(--theme-transition); }
.about-text strong { color: var(--text-primary); font-weight: 600; transition: color 0.3s ease; }
.expertise-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 40px; transition: color 0.3s ease; }
.expertise-list li { display: flex; align-items: center; gap: 8px; }
.expertise-list li svg { width: 14px; height: 14px; color: var(--text-primary); transition: color 0.3s ease; }


.about-photo {
  border-radius: 4px;
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.about-photo picture {
  display: block;
  width: min(100%, 420px);
  margin-left: auto;
}

.about-photo img {
  width: 100%;
  margin: 0;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  height: auto;
  display: block;
  opacity: 1;
  border-radius: 6px;
  transition: opacity 0.25s ease;
}

@media (hover: hover) {
  .about-photo img:hover {
    opacity: 0.9;
  }
}

@media (hover: none) {
  .about-photo img:hover {
    opacity: 1;
  }
}



.contact-form { margin-top: 30px; display: grid; gap: 15px; }
.form-input, .form-textarea { width: 100%; padding: 14px 18px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-primary); font-family: 'Inter', sans-serif; font-size: 0.95rem; border-radius: 4px; transition: border-color 0.3s ease, box-shadow 0.2s ease, background-color 0.3s ease, color 0.3s ease; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--text-primary); box-shadow: 0 0 0 2px rgba(125,125,125,0.1); }
.form-textarea { resize: vertical; min-height: 120px; }

.submit-btn {
  background: var(--text-primary);
  color: var(--bg-color);
  padding: 14px 30px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  justify-self: start;
  transition: opacity 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.submit-btn:hover { opacity: 0.8; transform: none; }

.site-footer { text-align: center; padding: 80px 0 60px; color: var(--text-secondary); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 24px; margin-top: auto; transition: color 0.3s ease; }
.footer-logo-wrapper { display: flex; flex-direction: column; align-items: center; width: fit-content; margin: 0 auto; }
.footer-logo-img { height: 32px; width: auto; opacity: 0.9; transition: filter 0.3s ease; display: block; }
[data-theme="dark"] .footer-logo-img { filter: invert(1); }
.footer-divider { width: 100%; height: 1px; background-color: var(--border-color); margin-top: 24px; transition: var(--theme-transition); }
.footer-socials { display: flex; gap: 24px; align-items: center; justify-content: center; margin-top: 5px; }
.footer-socials .icon-btn { height: auto; width: auto; border-radius: 0; background: none !important; opacity: 0.6; transition: opacity 0.3s ease, color 0.3s ease; }
.footer-socials .icon-btn:hover { opacity: 1; }
.footer-socials svg { height: 28px !important; width: auto !important; display: block; fill: none; stroke: currentColor; stroke-width: 2; transition: stroke 0.3s ease, fill 0.3s ease; }
.footer-socials svg path { transition: fill 0.3s ease, stroke 0.3s ease; } 
.footer-socials .filled-icon { fill: currentColor !important; stroke: none !important; }
.astrobin-icon .cls-1 { fill: currentColor !important; opacity: 0.4; transition: fill 0.3s ease; } 
.astrobin-icon .cls-2 { fill: currentColor !important; opacity: 1.0; transition: fill 0.3s ease; }
.astrobin-icon .cls-3 { fill: currentColor !important; opacity: 0.3; transition: fill 0.3s ease; }
.astrobin-icon .cls-4 { fill: currentColor !important; opacity: 0.9; transition: fill 0.3s ease; }
.astrobin-icon .cls-5 { fill: currentColor !important; opacity: 0.7; transition: fill 0.3s ease; }
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; background: rgba(0, 0, 0, 0.97); backdrop-filter: blur(8px); z-index: 10000; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity 0.3s var(--smooth-ease), visibility 0.3s step-end; display: flex; justify-content: center; align-items: center; padding: 30px; overscroll-behavior: contain; touch-action: none; }
.lightbox.open { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity 0.3s var(--smooth-ease), visibility 0.3s step-start; }
.lightbox-content { width: 100%; max-width: 1400px; max-height: 90vh; display: flex; gap: 50px; align-items: center; justify-content: center; position: relative; }
.lightbox-img-wrapper { flex: 2; display: flex; justify-content: center; align-items: center; height: 100%; position: relative; }
.lightbox-img { width: auto; height: auto; max-width: 100%; max-height: 80vh; object-fit: contain; box-shadow: 0 30px 60px rgba(0,0,0,0.5); transition: opacity 0.3s ease; will-change: opacity; }
.lightbox-close { position: absolute; top: 30px; right: 40px; color: white; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.6; transition: all 0.2s ease; z-index: 10001; }
.lightbox-close svg { width: 40px; height: 40px; stroke-width: 2; }
.lightbox-close:hover { opacity: 1; transform: scale(1.1); }
.lb-arrow { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.4); color: white; border: 1px solid rgba(255,255,255,0.2); width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; z-index: 10001; backdrop-filter: blur(4px); }
.lb-arrow:hover { background: rgba(255, 255, 255, 0.95); color: black; border-color: white; transform: translateY(-50%) scale(1.1); }
.lb-prev { left: 40px; } .lb-next { right: 40px; }
.swipe-hint { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.6); color: white; padding: 8px 16px; border-radius: 20px; font-size: 0.85rem; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; display: flex; align-items: center; gap: 8px; z-index: 10002; }
.swipe-hint.show { opacity: 1; }
@media (min-width: 1025px) and (max-width: 1600px) { :root { --container-width: 1200px; } .hero-header h1 { font-size: clamp(2.5rem, 5vw, 4rem); } .nav-logo-text { font-size: 1.25rem; } .about-text { font-size: 1rem; } .masonry-grid { column-gap: 25px; } .site-footer { padding: 60px 0 40px; } }
@media (max-width: 900px) { .about-photo { justify-content: center; } .about-photo picture { width: 100%; margin: 0 auto; } .about-photo img { width: 96%; margin: 0 auto; }  .lightbox-content { flex-direction: column; gap: 0; justify-content: center; padding: 0; margin: 0; } .lightbox-img-wrapper { width: 100%; height: 100%; } .lightbox-img { max-height: 80dvh; max-width: 95vw; } .lb-prev, .lb-next { display: none; } .lightbox-close { top: 15px; right: 15px; width: 40px; height: 40px; background: rgba(0,0,0,0.5); border-radius: 50%; opacity: 1; } .lightbox-close svg { width: 20px; height: 20px; } .nav-actions { padding-left: 15px; margin-left: 15px; gap: 12px; } .nav-links { gap: 1.5rem; } html.js .masonry-grid { column-count: 2; column-gap: 20px; } .hero-header h1 { font-size: 3.5rem; } .about-layout { grid-template-columns: 1fr; gap: 30px; } .gear-wrapper { grid-template-columns: 1fr; gap: 20px; } .gear-card:hover { transform: none !important; box-shadow: none !important; border-color: transparent !important; } .about-photo img { filter: grayscale(0%) !important; transform: none !important; } .site-footer { padding: 40px 0 30px; } .footer-logo-img { height: 28px; } .footer-socials { gap: 20px; } }
@media (max-width: 600px) { main { padding-top: 130px; } .nav-container { flex-direction: column; gap: 12px; align-items: center; position: relative; padding-top: 12px; padding-bottom: 12px; height: auto; } .nav-logo-text { font-size: 1.25rem; margin-bottom: 5px; } .nav-actions { position: absolute; top: 12px; right: 5%; margin: 0; border-left: none; padding-left: 0; height: 35px; } .nav-actions::before { display: none; } .nav-right { width: 100%; justify-content: center; position: static; } .nav-links { position: static; width: auto; gap: 1.5rem; justify-content: center; } html.js .masonry-grid { column-count: 2; column-gap: 12px; } .grid-item { margin-bottom: 12px; } .gear-wrapper { gap: 40px; margin-bottom: 40px; } .filter-container { justify-content: flex-start; } .about-text { font-size: 1rem; letter-spacing: 0.01em; } .expertise-list { grid-template-columns: 1fr; gap: 12px; } .expertise-list li { align-items: flex-start; } .expertise-list li svg { margin-top: 4px; } .hero-header h1 { font-size: 2.75rem; } .site-footer { padding: 40px 0 25px; gap: 16px; } .footer-divider { margin-top: 16px; } .footer-socials { margin-top: 0; gap: 24px; } .footer-logo-img { height: 28px; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } .grid-item { opacity: 1 !important; animation: none !important; } .masonry-grid { opacity: 1 !important; transition: none !important; } }

body{opacity:1; visibility:visible;}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}



/* iOS safe-area: keep fixed nav clear of notch / Dynamic Island */
nav {
  padding-top: env(safe-area-inset-top);
}

/* If nav gains safe-area height, offset main on small screens to prevent overlap */
@media (max-width: 600px) {
  main {
    padding-top: calc(130px + env(safe-area-inset-top));
  }
}


/* Grid fail-safe: ensure grid is visible if JS does not run */
html:not(.js) .masonry-grid {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}



/* ===== Projects tab (v6) ===== */
.projects-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  width: 100%;
  margin-bottom: 60px;
}
@media (max-width: 820px){
  .projects-grid{ grid-template-columns: 1fr; gap: 28px; }
}

.project-card{
  display:flex;
  flex-direction:column;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
  user-select:none;
  text-decoration:none;
}

.project-img-wrapper{
  width:100%;
  aspect-ratio: 3 / 2;
  background-color: var(--surface-color);
  border-radius: 4px;
  overflow:hidden;
  position:relative;
  margin-bottom: 18px;
  transform: translateZ(0);
}

.project-img-wrapper img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  transform: scale(1);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}

.project-overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.28);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:2;
  opacity:0;
  transition: opacity 420ms var(--smooth-ease);
}


@media (hover: hover){
  .project-card:hover .project-img-wrapper img{ transform: scale(1.02); }
  .project-card:hover .project-overlay{ opacity:1; }
}

/* Back button in project detail */
/* ===== end Projects tab ===== */

/* ===== Projects card meta refinement ===== */
#projects .project-subtitle{ margin: 0; opacity: 0.88; }
#projects .project-meta-line{
  font-size: 0.92rem;
  opacity: 1;
  margin-top: 10px;
}
/* ===== end refinement ===== */

@media (max-width: 700px){
  .project-description{ margin-bottom: 32px; }
}

/* ===== Next-tier project upgrades ===== */

.project-hero-image{
  width:100%;
  margin: 26px 0 18px 0;
  border-radius: 4px;
  overflow:hidden;
}

.project-hero-image img{
  width:100%;
  height:auto;
  display:block;
}

/* Controlled whitespace for projects */
#china .hero-header{
  margin-bottom: 18px;
}

.project-description{
  margin-top: 0;
  margin-bottom: 34px;
}

/* Upgrade 5: refined statement */
.project-statement{
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 12px 0;
  color: #fff;
  max-width: 680px;
}

/* Slightly quieter meta line */
.project-meta-line{
  opacity: 1;
}

/* Mobile tuning */
@media (max-width: 700px){
  .project-hero-image{
    margin:22px 0 34px 0;
  }
  .project-description{
    margin-bottom:40px;
  }
}

/* ===== End next-tier upgrades ===== */


/* ===== Hero ratio + advanced spacing ===== */

.project-hero-image{
    width:100%;
    aspect-ratio: 3 / 2;
    overflow:hidden;
    border-radius:4px;
    margin-top: 28px;
    margin-bottom: 64px; /* slightly larger than top for museum-style pacing */
}

.project-hero-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    display:block;
}

/* Prevent hero from ever dominating viewport */
@media (min-height: 900px){
    .project-hero-image{
max-height: 70vh;
    }
}

/* Mobile tuning */
@media (max-width: 700px){
    .project-hero-image{
margin-top:20px;
margin-bottom:44px;
    }
}

/* ===== End hero upgrades ===== */


/* ===== Typography hierarchy refinement ===== */

.project-statement{
    font-size: 1.125rem; /* slightly elevated */
    line-height: 1.65;
    max-width: 620px;
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.project-lede{
    font-size: 1rem;
    opacity: 1; /* softer than statement */
    margin: 0 0 14px 0;
    max-width: 640px;
}

.project-meta-line{
    opacity: 1; /* quiet metadata */
    margin-bottom: 56px;
}

/* Museum-style spacing rhythm */
#china .hero-header{
    margin-bottom: 26px;
}

/* Mobile tuning */
@media (max-width:700px){
    .project-statement{
font-size: 1.05rem;
    }
}

/* ===== End typography refinement ===== */

/* --- end fix --- */

/* ===== Project caption polish ===== */

/* Tight, editorial hierarchy without relying on opacity (keeps selection crisp) */
.project-description{
    max-width: 720px;
}

/* Study sentence — lead line (regular) */
.project-statement{
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.65;
    color: var(--text-primary);
    max-width: 640px;
    margin: 0;
}

/* Location line — supporting (italic + slightly smaller) */
.project-lede{
    font-weight: 400;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.98rem;
    margin: 12px 0 0 0;
}

/* Date/meta — quiet (smaller caps) */
.project-meta-line{
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.74rem;
    line-height: 1.2;
    margin: 14px 0 0 0;
}@media (max-width:700px){
    .project-description{ max-width: 100%; }
    .project-statement{
font-size: 1.05rem;
line-height: 1.6;
    }
    .project-lede{
font-size: 0.98rem;
margin-top: 10px;
    }
    .project-meta-line{
margin-top: 12px;
    }
}

/* ===== End project caption polish ===== */







/* ===== GLOBAL TEXT SELECTION (bulletproof) ===== */

::selection{
    background: var(--text-primary);
    color: var(--bg-color);
}

::-moz-selection{
    background: var(--text-primary);
    color: var(--bg-color);
}

/* ===== END GLOBAL SELECTION ===== */







/* ===== Project page copy rhythm (no statement) ===== */
.project-title + .project-description .project-lede{
  margin-top: 10px;
}
/* ===== End rhythm ===== */


/* ===== Project lede + spacing refinement (v34) ===== */

/* Bring caption closer to hero and keep grid rhythm */
.project-hero-image{ margin: 26px 0 18px 0; }
@media (max-width:700px){ .project-hero-image{ margin: 20px 0 16px 0; } }

.project-description{ margin-top: 0; margin-bottom: 34px; }
@media (max-width:700px){ .project-description{ margin-bottom: 28px; } }

/* Make 'Scenes from…' feel like a true subhead (not body copy) */
.project-description .project-lede{
  font-style: normal;
  font-weight: 500;
  font-size: 1.06rem;
  line-height: 1.45;
  margin: 0;
  color: var(--text-primary);
}

/* Date stays meta */
.project-description .project-meta-line{
  margin-top: 10px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Keep selection crisp */
.project-description .project-lede,
.project-description .project-meta-line{ opacity: 1; }

/* ===== End v34 ===== */



/* ===== Projects Tab Typography Match (v35) ===== */

/* Title — strong but not oversized */
.project-info h2{
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 6px;
}

/* "Scenes from…" — now behaves like the project subhead */
.project-info p{
  font-style: normal;
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--text-primary);
  margin: 0;
}

/* Date — true meta styling */
.project-info .project-meta-line{
  display: block;
  margin-top: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Improve vertical rhythm inside cards */
.project-info{
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
}

/* Mobile refinement */
@media (max-width:700px){

  .project-info h2{
    font-size: 1.28rem;
  }

  .project-info p{
    font-size: 0.98rem;
  }

}

/* ===== End v35 ===== */



/* ===== Theme sync: back to projects button (v38) ===== */
.back-to-projects, .back-to-projects-btn, .project-back, .projects-back{
  color: var(--text-primary);
  transition: color .12s ease, background-color .12s ease, border-color .12s ease;
}
/* If it uses an icon */
.back-to-projects svg, .back-to-projects-btn svg, .project-back svg, .projects-back svg{
  stroke: currentColor;
}
/* ===== End v38 ===== */



/* ===== Project image hover stability (v38) ===== */
/* Prevent end-of-hover 'bounce' on some browsers by stabilizing transform rendering */
.project-card img,
.project-preview img,
.project-thumb img,
.project-image img{
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Ensure the same timing function both directions */
.project-card img{
  transition-timing-function: cubic-bezier(.2,.8,.2,1);
}
/* ===== End v38 ===== */



/* ===== Projects tab text theme sync (v39) ===== */
.project-info h2,
.project-info p,
.project-info .project-meta-line{
  transition: color .12s ease;
}

.project-info h2{ color: var(--text-primary); }
.project-info p{ color: var(--text-primary); }
.project-info .project-meta-line{ color: var(--text-secondary); }/* ===== End v40 ===== */







/* ===== Back to Projects editorial refine (v42) ===== */
.back-nav{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin: 0 0 20px 0;
  /* Breadcrumb-style link: calm by default, strong on hover */
  color: var(--text-secondary);
  font-weight:500;
  font-size:0.98rem;
  cursor:pointer;
  border:none;
  background:none;
  padding:0;
  text-decoration:none;
  transition: color .30s ease, transform .30s ease;
}

/* subtle motion like Enter → */
.back-nav .back-arrow{
  display:inline-block;
  transform:translateX(0);
  transition: transform .30s ease;
}

.back-nav:hover .back-arrow{
  transform:translateX(-3px);
}

/* optional ultra subtle hover */
.back-nav:hover{
  color: var(--text-primary);
}
/* ===== End v42 ===== */


/* ===== Share button (projects)
   Uses .icon-btn styling so it matches the theme toggle exactly.
   Keep this block intentionally minimal to avoid overrides. ===== */
.share-btn{ }









/* ===== Enter editorial link (v48) ===== */
.view-project-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0;
  border:none;
  background:none;
  font-weight:500;
  letter-spacing:0.02em;
  color: inherit;
  transition: color .30s ease, transform .30s ease;
}

/* Arrow motion matches Back link */
.view-project-btn .enter-arrow{
  display:inline-block;
  transform:translateX(0);
  transition: transform .30s ease;
}

.project-card:hover .view-project-btn .enter-arrow{
  transform:translateX(3px);
}
/* ===== End v48 ===== */



/* ===== Projects overlay readability (v49) ===== */
/* Keeps Projects card text readable regardless of theme + photo brightness */
.project-overlay{
  color: #fff;
  text-shadow: 0 1px 10px rgba(0,0,0,0.35);
}

/* Local scrim behind the text area (not a bubble, not a border) */
.project-overlay::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0.0) 60%);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

/* Ensure overlay content stays above scrim */
.project-overlay > *{
  position: relative;
  z-index: 1;
}


/* If you ever want a slightly lighter scrim on very dark photos, lower opacity here */
@media (hover: none){
  .project-overlay::after{ opacity: 0.80; }
}
/* ===== End v49 ===== */



/* ===== Enter mobile refinement (v9) ===== */
@media (hover: none){

  .project-overlay{
    opacity: 1 !important;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 16px;
  }

  .view-project-btn .enter-arrow{
    transition: none !important;
    transform: none !important;
  }

  .project-card:hover .view-project-btn .enter-arrow{
    transform: none !important;
  }

}
/* ===== End v9 ===== */



/* ===== Masonry responsive (v52) ===== */
/* ===== End v52 ===== */

/* Futureproof: all project grids share .masonry-grid so layouts stay consistent */


/* ===== Back nav mobile breathing room (v9.4) ===== */
@media (max-width: 700px){
  .back-nav{ margin-top: 10px; }
}
/* ===== End v9.4 ===== */

/* ===== Project topbar + meta row ===== */
.project-topbar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:0;
  margin-bottom: 10px;
}

.project-topbar .back-nav{
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  padding: 0;
}

.project-topbar .back-nav svg{
  width: 16px;
  height: 16px;
  transform: translateY(1px); /* optical baseline correction */
}

.project-meta-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.project-meta-row h1{
  margin-right: auto;
}

.project-meta-row .project-date{
  margin: 0;
}

@media (max-width: 600px){
  .project-meta-row{
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
}




/* ===== Copy Toast ===== */
.copy-toast{
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  padding: 10px 16px;
  border-radius: 999px;

  background: color-mix(in srgb, var(--bg-color) 82%, transparent);
  color: var(--text-color);
  border: 1px solid color-mix(in srgb, var(--text-color) 14%, transparent);

  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;

  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 999999;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.copy-toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@supports not (background: color-mix(in srgb, black 50%, white)){
  .copy-toast{
    background: var(--bg-color);
    border-color: rgba(255,255,255,0.12);
  }
  [data-theme="light"] .copy-toast{
    border-color: rgba(0,0,0,0.12);
  }
}


/* ===== Mobile Projects Cards: gradient-only (no full dim) ===== */
@media (hover: none){

  /* Make sure the card provides a positioning context */
  .project-card{ position: relative; overflow: hidden; }

  /* Ensure images are not permanently dimmed on touch devices */
  .project-card img{ filter: none !important; }

  /* Keep overlay container visible, but remove any heavy background */
  .project-overlay{
    opacity: 1 !important;
    background: none !important;
  }

  /* Replace heavy scrim with a bottom-only gradient */
  .project-overlay::after{
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    opacity: 1 !important;
    background: linear-gradient(
      to top,
      rgba(0,0,0,0.55) 0%,
      rgba(0,0,0,0.25) 35%,
      rgba(0,0,0,0.05) 60%,
      transparent 80%
    ) !important;
  }

  /* Keep "Enter" readable without forcing the whole photo darker */
  .view-project-btn{
    color: #fff !important;
    background: none !important;
    text-shadow: 0 1px 10px rgba(0,0,0,0.45);
  }
}

.nav-logo-text:hover { opacity: 0.8; }
