/* Simon Portfolio — Awwwards-inspired visual system / 2026-09-28
   Principles: editorial hierarchy, category-led navigation, restrained motion,
   technical iconography, pixel detail, grain and controlled diffusion.
   No project artwork is recolored or modified. */

:root{
  --aw-white:#f6f7f8;
  --aw-muted:#8f98a3;
  --aw-dim:#505761;
  --aw-line:rgba(255,255,255,.14);
  --aw-line-strong:rgba(255,255,255,.26);
  --aw-panel:#07090c;
  --aw-panel-2:#0b0e12;
  --aw-glow:rgba(255,255,255,.075);
  --aw-gap:clamp(18px,1.7vw,28px);
}

/* --- Global atmosphere -------------------------------------------------- */
html{background:#000}
body{position:relative;isolation:isolate;background:#000}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:9998;
  pointer-events:none;
  opacity:.055;
  mix-blend-mode:screen;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* Diffusion belongs at transitions, not behind every content block. */
.section,
.work-section,
.curated-case-section,
.rbc-section,
.tlp-section,
.oai-section,
.pp-section,
.dp-section{position:relative;isolation:isolate}
.section::before,
.work-section::before,
.curated-case-section::before,
.rbc-section::before{
  content:"";
  position:absolute;
  z-index:-1;
  pointer-events:none;
  left:8%;right:8%;top:-70px;height:150px;
  opacity:0;
  background:radial-gradient(ellipse at 50% 50%,rgba(255,255,255,.085) 0,rgba(255,255,255,.03) 26%,rgba(255,255,255,0) 72%);
  filter:blur(34px);
}
.section:nth-of-type(even)::before,
.work-section:nth-of-type(even)::before,
.curated-case-section:nth-of-type(3n)::before,
.rbc-section:nth-of-type(3n)::before{opacity:.72}

/* --- Typography and information hierarchy ------------------------------ */
.section-head h2,
.work-section-head h2,
.page-title{max-width:820px}
.section-head p,
.work-section-head p{max-width:590px;color:#939ba5}
.kicker,
.home-project-meta,
.work-card-meta{font-variant-numeric:tabular-nums}

.aw-classification{
  grid-column:4/-1;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:18px;
}
.aw-classification span,
.aw-tags span{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 9px;
  border:1px solid var(--aw-line);
  color:#9ba3ad;
  background:rgba(255,255,255,.015);
  font:600 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.aw-tags{display:flex;flex-wrap:wrap;gap:7px;margin-top:22px}
.aw-tags span:first-child{color:#fff;border-color:var(--aw-line-strong)}

/* --- Homepage capability taxonomy -------------------------------------- */
.aw-capability-rail{
  position:relative;
  z-index:2;
  border-top:1px solid var(--aw-line);
  border-bottom:1px solid var(--aw-line);
  margin-top:0;
  margin-bottom:0;
  background:#050505;
}
.aw-capability-rail.shell{padding-block:0;}

.aw-capability-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.aw-capability-item{
  position:relative;
  min-height:132px;
  padding:22px 22px 20px;
  border-right:1px solid var(--aw-line);
  overflow:hidden;
  transition:background .28s ease,color .28s ease;
}
.aw-capability-item:first-child{border-left:1px solid var(--aw-line)}
.aw-capability-item::after{
  content:"";
  position:absolute;
  width:120px;height:120px;
  right:-56px;bottom:-72px;
  background:radial-gradient(circle,rgba(255,255,255,.13),transparent 68%);
  opacity:0;
  transition:opacity .35s ease,transform .45s cubic-bezier(.2,.7,.2,1);
}
.aw-capability-item:hover{background:rgba(255,255,255,.025)}
.aw-capability-item:hover::after{opacity:1;transform:translate(-18px,-14px)}
.aw-capability-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.aw-capability-item b{font-size:14px;font-weight:620;letter-spacing:-.015em}
.aw-capability-item p{margin:24px 0 0;color:#767e88;font:10px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.06em;text-transform:uppercase;max-width:180px}

/* --- Icon system --------------------------------------------------------- */
.aw-icon{
  width:30px;height:30px;flex:0 0 30px;
  color:#d8dde4;
  overflow:visible;
}
.aw-icon *{
  vector-effect:non-scaling-stroke;
  fill:none;
  stroke:currentColor;
  stroke-width:1.25;
  stroke-linecap:square;
  stroke-linejoin:miter;
}
.aw-icon .aw-icon-motion{
  stroke-dasharray:34;
  stroke-dashoffset:0;
  transition:stroke-dashoffset .55s cubic-bezier(.2,.7,.2,1),transform .45s cubic-bezier(.2,.7,.2,1);
  transform-origin:center;
}
.aw-capability-item:hover .aw-icon-motion,
.opportunity-card:hover .aw-icon-motion{stroke-dashoffset:68;transform:rotate(8deg)}

.aw-service-icon{
  width:54px;height:54px;
  display:grid;place-items:center;
  border:1px solid var(--aw-line-strong);
  margin-bottom:34px;
  position:relative;
  background:#050608;
}
.aw-service-icon::after{
  content:"";
  position:absolute;
  width:3px;height:3px;background:#fff;
  right:7px;top:7px;
  box-shadow:0 0 12px rgba(255,255,255,.8);
  transition:transform .35s ease;
}
.opportunity-card:hover .aw-service-icon::after{transform:translate(-9px,9px)}
.aw-service-icon .aw-icon{width:26px;height:26px}

/* --- Pixel motion layer -------------------------------------------------- */
.aw-pixel-field{
  position:absolute;
  inset:0;
  width:100%;height:100%;
  pointer-events:none;
  z-index:0;
  opacity:.62;
}
.pulse-hero>*:not(.aw-pixel-field){position:relative;z-index:1}
.pulse-hero{overflow:hidden}
.pulse-hero::after{
  content:"";
  position:absolute;
  inset:auto 5% -18% 36%;
  height:52%;
  pointer-events:none;
  background:radial-gradient(ellipse at center,rgba(255,255,255,.075),rgba(255,255,255,.018) 34%,transparent 70%);
  filter:blur(58px);
  opacity:.72;
  z-index:0;
}

/* Project media: retain original colour. Add only an interaction layer. */
.home-project-visual,
.work-card-visual{position:relative}
.home-project-visual::after,
.work-card-visual::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0;
  background:
    linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px),
    linear-gradient(0deg,rgba(255,255,255,.055) 1px,transparent 1px);
  background-size:18px 18px;
  mix-blend-mode:screen;
  transition:opacity .32s ease;
}
.home-project-link:hover .home-project-visual::after,
.work-card-link:hover .work-card-visual::after{opacity:.18}

/* Advanced but restrained project classification. */
.home-project-copy p{max-width:470px}
.home-project-open,
.work-card-arrow{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}

/* Services: reduce the visual wall of text by turning lists into a clear spec grid. */
.opportunity-card{position:relative;overflow:hidden;background:linear-gradient(145deg,#090b0e,#060709 58%,#080b0f)}
.opportunity-card::before{
  content:"";
  position:absolute;inset:0;pointer-events:none;opacity:.35;
  background:linear-gradient(115deg,transparent 0 58%,rgba(255,255,255,.025) 58% 59%,transparent 59% 100%);
}
.opportunity-card>*{position:relative;z-index:1}
.opportunity-card>p{max-width:540px}
.opportunity-card ul{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  border-top:1px solid var(--aw-line);
  border-left:1px solid var(--aw-line);
}
.opportunity-card li{
  min-height:64px;
  padding:14px 14px 13px;
  border-right:1px solid var(--aw-line);
  border-bottom:1px solid var(--aw-line);
  display:flex;align-items:center;
}

/* About preview: one strong thought + compact category signal, not a text slab. */
.human-note blockquote{font-size:clamp(34px,4.4vw,64px);line-height:1.03;letter-spacing:-.052em;max-width:880px}
.human-note>div:last-child>p{max-width:570px;color:#929aa4}

/* RebrandCheck: create breathing points in the dense product story. */
.rbc-section-head p,.rbc-demo-head p{max-width:620px}
.rbc-architecture article,
.rbc-system-grid article,
.rbc-reflection-grid article{position:relative;overflow:hidden}
.rbc-architecture article::before,
.rbc-system-grid article::before{
  content:"";position:absolute;width:4px;height:4px;right:18px;top:18px;background:#fff;opacity:.55;box-shadow:0 0 12px rgba(255,255,255,.5)
}
.rbc-architecture article:hover::before,
.rbc-system-grid article:hover::before{animation:aw-pixel-pulse .9s steps(3,end) infinite}

@keyframes aw-pixel-pulse{0%,100%{opacity:.25;transform:scale(1)}50%{opacity:1;transform:scale(1.7)}}

/* Section-head signal: tiny dynamic icon replaces decorative noise. */
.aw-section-signal{
  width:14px;height:14px;
  display:inline-grid;place-items:center;
  margin-right:10px;vertical-align:-2px;
  border:1px solid rgba(255,255,255,.35);
  position:relative;
}
.aw-section-signal::after{content:"";width:3px;height:3px;background:#fff;animation:aw-signal 2.4s steps(4,end) infinite}
@keyframes aw-signal{0%,100%{transform:translate(-3px,-3px);opacity:.45}25%{transform:translate(3px,-3px);opacity:1}50%{transform:translate(3px,3px);opacity:.65}75%{transform:translate(-3px,3px);opacity:.9}}

@media(max-width:900px){
  .aw-classification{grid-column:1;margin-top:8px}
  .aw-capability-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .aw-capability-item:nth-child(2){border-right:0}
  .aw-capability-item:nth-child(n+3){border-top:1px solid var(--aw-line)}
  .opportunity-card ul{grid-template-columns:1fr}
  .section::before,.work-section::before,.curated-case-section::before,.rbc-section::before{left:0;right:0}
}

@media(max-width:640px){
  body::before{opacity:.035}
  .aw-capability-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .aw-capability-item{min-height:108px;padding:18px 16px;border-top:1px solid var(--aw-line)}
  .aw-capability-item:nth-child(-n+2){border-top:0}
  .aw-capability-item:nth-child(2n){border-right:0}
  .aw-capability-item p{margin-top:16px;font-size:8px}
  .aw-capability-item b{font-size:12px}
  .aw-capability-item .aw-icon{width:24px;height:24px}
  .aw-classification{gap:6px}
  .aw-classification span,.aw-tags span{font-size:8px;min-height:24px}
  .aw-service-icon{margin-bottom:24px}
  .pulse-hero::after{inset:auto -20% -8% 10%;height:40%;filter:blur(40px)}
}

@media(pointer:coarse){.aw-pixel-field{display:none}.home-project-visual::after,.work-card-visual::after{display:none}}
@media(prefers-reduced-motion:reduce){
  .aw-section-signal::after,.rbc-architecture article:hover::before,.rbc-system-grid article:hover::before{animation:none!important}
  .aw-icon .aw-icon-motion{transition:none!important}
}

/* ========================================================================
   V14.1 — TITLE / LAYER LAYOUT FIX
   One authoritative final rule set for hero and page titles. Earlier V5/V7/
   V9 title rules remain for compatibility but may no longer alter stacking.
   ======================================================================== */
.hero-positioning{
  position:relative!important;
  z-index:2!important;
  isolation:isolate;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  width:min(100%,1120px);
  max-width:1120px;
  overflow:visible;
}
.hero-positioning h1,
.hero-positioning .hero-role,
.hero-positioning .hero-value,
.hero-positioning .hero-availability,
.hero-positioning .hero-work-link{
  position:relative!important;
  inset:auto!important;
  float:none!important;
  transform:none!important;
  translate:none!important;
  z-index:2!important;
  max-width:100%;
}
.hero-positioning h1{
  display:block;
  width:auto;
  margin:0!important;
  padding:0;
  font-size:clamp(76px,11.35vw,164px);
  font-weight:420;
  line-height:.88;
  letter-spacing:-.067em;
  white-space:normal;
  overflow:visible;
  text-wrap:balance;
}
.hero-positioning .hero-role{
  display:block;
  margin:clamp(30px,3.9vh,46px) 0 0!important;
  font-size:clamp(34px,4.45vw,64px);
  font-weight:500;
  line-height:.98;
  letter-spacing:-.048em;
  white-space:normal;
  overflow:visible;
}
.hero-positioning .hero-value{
  margin:clamp(25px,3.3vh,38px) 0 0!important;
  max-width:min(920px,100%);
}
.hero-positioning .hero-availability{margin:20px 0 0!important}
.hero-positioning .hero-work-link{margin-top:28px!important}
.pulse-hero .aw-pixel-field{z-index:0!important}
.pulse-hero::after{z-index:0!important}
.pulse-hero .pulse-topline,
.pulse-hero .hero-positioning,
.pulse-hero .pulse-bottom,
.aw-capability-rail{z-index:2!important}

/* Other page/case titles: keep each heading in its own paint layer and never
   let decorative pseudo-elements or motion transforms cross the text layer. */
.page-title,
.case-hero h1,
.curated-case-hero h1,
.work-intro .page-title,
.rbc-hero h1{
  position:relative!important;
  z-index:2!important;
  isolation:isolate;
  transform:none!important;
  translate:none!important;
  max-width:100%;
  overflow:visible;
  text-wrap:balance;
}

@media (max-width:900px){
  .hero-positioning{width:100%;max-width:100%}
  .hero-positioning h1{
    font-size:clamp(62px,12.2vw,104px);
    line-height:.9;
    letter-spacing:-.062em;
  }
  .hero-positioning .hero-role{
    margin-top:clamp(26px,4vh,38px)!important;
    font-size:clamp(32px,6.4vw,52px);
    line-height:1;
  }
}
@media (max-width:640px){
  .hero-positioning h1{
    font-size:clamp(50px,14.2vw,64px);
    line-height:.92;
    letter-spacing:-.058em;
    text-wrap:nowrap;
  }
  .hero-positioning .hero-role{
    margin-top:30px!important;
    font-size:clamp(30px,8.2vw,38px);
    line-height:1.02;
    letter-spacing:-.04em;
    text-wrap:nowrap;
  }
  .hero-positioning .hero-value{margin-top:30px!important}
}
@media (max-width:380px){
  .hero-positioning h1{font-size:clamp(47px,13.4vw,54px);letter-spacing:-.05em}
  .hero-positioning .hero-role{font-size:clamp(28px,7.7vw,34px)}
}



/* ========================================================================
   V14.2 — HERO LAYOUT STABILITY
   Capability taxonomy is a sibling section, never a child of the hero.
   This prevents post-load layout shift and keeps the title/pixel/header paint
   layers independent at every breakpoint.
   ======================================================================== */
.pulse-hero{
  min-height:100svh;
  height:auto;
  contain:layout paint;
}
.pulse-hero .hero-positioning{contain:layout style;}
@media(max-width:760px){
  .pulse-hero{min-height:100svh;}
}


/* ========================================================================
   V14.4 — TYPOGRAPHY / SECTION HEAD / PIXEL GLYPH REFINEMENT
   RebrandCheck typography is the reference: one sans family, high contrast,
   restrained italic emphasis, and a stable 12-column editorial composition.
   ======================================================================== */
:root{
  --aw-display-font:var(--font-sans,-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif);
}
.hero-positioning h1,
.hero-positioning .hero-role,
.section-head h2,
.work-section-head h2,
.page-title,
.case-hero h1,
.curated-case-hero h1,
.rbc-hero-copy h1{font-family:var(--aw-display-font);}

/* English-only editorial italic. CJK remains upright. */
html:not(:lang(zh-CN)) .hero-positioning .hero-role{font-style:italic;font-weight:560;}
html:lang(zh-CN) .hero-positioning .hero-role{font-style:normal;font-weight:600;}

/* Stable two-column editorial section head. Dynamic tags live inside the copy
   column, so adding metadata can never collapse the title into one grid cell. */
.section-head{
  grid-template-columns:repeat(12,minmax(0,1fr));
  column-gap:var(--grid-gap,24px);
  align-items:start;
}
.section-head>.kicker{grid-column:1/span 3;}
.section-head>div:not(.kicker){grid-column:4/-1;min-width:0;}
.section-head>div:not(.kicker)>.aw-classification{grid-column:auto;margin-top:30px;}

#selected-work .section-head{margin-bottom:clamp(70px,8vw,120px);}
#selected-work .section-head>div:not(.kicker){max-width:980px;}
#selected-work .aw-editorial-title{
  display:flex;
  flex-direction:column;
  gap:.02em;
  width:100%;
  max-width:none;
  margin:0;
  font-family:var(--aw-display-font);
  font-size:clamp(72px,7.25vw,118px);
  font-weight:650;
  line-height:.88;
  letter-spacing:-.068em;
  text-wrap:normal;
  overflow-wrap:normal;
  word-break:normal;
}
#selected-work .aw-editorial-title span{display:block;white-space:normal;}
#selected-work .aw-editorial-title em{
  font-family:inherit;
  font-weight:520;
  font-style:italic;
  letter-spacing:-.055em;
}
#selected-work .aw-editorial-subtitle{
  max-width:640px;
  margin-top:30px;
  font-size:clamp(18px,1.45vw,23px);
  line-height:1.45;
  letter-spacing:-.018em;
  color:#9aa1aa;
}
html:lang(zh-CN) #selected-work .aw-editorial-title{
  font-size:clamp(64px,6.4vw,98px);
  font-weight:650;
  line-height:1.02;
  letter-spacing:-.045em;
}
html:lang(zh-CN) #selected-work .aw-editorial-title .aw-cn-accent{font-weight:520;color:#dfe3e8;}
html:lang(zh-CN) #selected-work .aw-editorial-subtitle{
  max-width:720px;
  line-height:1.7;
  letter-spacing:0;
}

/* 4 × 3 = 12-cell pixel glyphs. Every capability uses the same grid language;
   only the active-cell pattern changes. The cells breathe in offset phases. */
.aw-pixel-glyph{
  width:34px;
  height:26px;
  flex:0 0 34px;
  display:grid;
  grid-template-columns:repeat(4,5px);
  grid-template-rows:repeat(3,5px);
  gap:4px;
  align-content:start;
  justify-content:start;
  padding-top:1px;
}
.aw-pixel-glyph i{
  display:block;
  width:5px;height:5px;
  background:#69717c;
  opacity:.13;
  transform:scale(.72);
}
.aw-pixel-glyph i.is-on{
  background:#e8ebef;
  opacity:.84;
  transform:scale(1);
  animation:aw-pixel-breathe 3.4s steps(2,end) infinite;
  animation-delay:calc(var(--i) * -110ms);
}
.aw-capability-item:hover .aw-pixel-glyph i.is-on,
.opportunity-card:hover .aw-pixel-glyph i.is-on{
  opacity:1;
  animation-duration:1.45s;
}
.aw-capability-top{justify-content:flex-start;gap:18px;align-items:center;}
.aw-capability-item b{font-family:var(--aw-display-font);font-weight:600;}
.aw-service-icon{width:58px;height:50px;border-radius:0;}
.aw-service-icon .aw-pixel-glyph{transform:scale(1.05);transform-origin:center;}
.aw-icon{display:none!important;}
@keyframes aw-pixel-breathe{
  0%,100%{opacity:.44;transform:scale(.78)}
  38%{opacity:1;transform:scale(1)}
  68%{opacity:.72;transform:scale(.9)}
}

/* Lenis / local weighted fallback must own wheel interpolation; do not stack
   CSS smooth scrolling on top of it. */
html.simon-lenis-active,
html.simon-weighted-scroll{scroll-behavior:auto!important;}

@media(max-width:900px){
  .section-head>.kicker,.section-head>div:not(.kicker){grid-column:1/-1;}
  #selected-work .section-head{row-gap:34px;margin-bottom:72px;}
  #selected-work .aw-editorial-title{font-size:clamp(56px,10.2vw,82px);line-height:.9;}
  html:lang(zh-CN) #selected-work .aw-editorial-title{font-size:clamp(52px,8.8vw,72px);line-height:1.06;}
}
@media(max-width:640px){
  #selected-work .section-head{row-gap:26px;margin-bottom:58px;}
  #selected-work .aw-editorial-title{font-size:clamp(48px,13.2vw,62px);line-height:.92;letter-spacing:-.058em;}
  #selected-work .aw-editorial-subtitle{margin-top:22px;font-size:17px;line-height:1.55;}
  html:lang(zh-CN) #selected-work .aw-editorial-title{font-size:clamp(42px,11.4vw,54px);line-height:1.08;letter-spacing:-.035em;}
  .aw-pixel-glyph{width:30px;height:23px;grid-template-columns:repeat(4,4px);grid-template-rows:repeat(3,4px);gap:4px;}
  .aw-pixel-glyph i{width:4px;height:4px;}
}
@media(prefers-reduced-motion:reduce){
  .aw-pixel-glyph i.is-on{animation:none!important;opacity:.86;transform:scale(1);}
}
