/* Reading system. Four-pixel rhythm; interface text stays sans-serif. */
@font-face{font-family:'Parclo Serif';src:url('assets/fonts/parclo/ParcloSerifStudent-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'Parclo Serif';src:url('assets/fonts/parclo/ParcloSerifStudent-Medium.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:'Parclo Serif';src:url('assets/fonts/parclo/ParcloSerifStudent-SemiBold.woff2') format('woff2');font-weight:600;font-display:swap}
:root{
  --reading-font:'Parclo Serif','PingFang SC','Microsoft YaHei',Georgia,serif;
  --ui-font:Inter,'PingFang SC','Microsoft YaHei',sans-serif;
  --ink:#252629;--muted:#676b73;--accent:#686294;--line:#e5e5e9;
  --space-group:32px;
  --space-section:96px;--heading-size:32px;
}
html{scroll-padding-top:32px;scrollbar-color:#c8c6d0 #fff}
body{caret-color:var(--accent)}
::selection{background:#e7e2f2;color:#252629}
h1,h2,h3{text-wrap:balance;overflow-wrap:break-word}
p{text-wrap:pretty}
a{text-underline-offset:.24em}
a:focus-visible,button:focus-visible{outline:2px solid var(--accent);outline-offset:5px}
.language{min-width:48px;min-height:44px;padding:10px 14px;font-size:14px;border-radius:8px}
.language:hover{background:#f7f6fa}
.project-summary,.experience-body,.detail-head h1,
.detail-head>p,.artwork-slot h3,
.portfolio-layout .section-title h2,.portfolio-layout .resume-section h2{
  font-family:var(--reading-font);font-optical-sizing:auto;
}

/* The single-column page has one shared left edge from name to footer. */
.portfolio-wrap{max-width:960px;padding:0 64px;position:relative}
.portfolio-layout{display:block;padding-top:104px}

.nav-line{display:none;width:24px;height:1px;background:#c6c2d1;transition:width .25s cubic-bezier(.16,1,.3,1),background .25s}

.reading-column{min-width:0}
.portfolio-layout .section{padding:0 0 var(--space-section);border:0;scroll-margin-top:32px}
.portfolio-layout .section-title{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap;margin-bottom:var(--space-group)}
.portfolio-layout .section-title h2{font-size:var(--heading-size);font-weight:500;line-height:1.25;letter-spacing:-.02em;margin:0}
.portfolio-layout .section-title .link{font-size:14px;line-height:1.5;min-height:32px;display:inline-flex;align-items:center;color:var(--muted)}

/* Project previews lead each row; text is grouped tightly beside them. */
.project-list{display:flex;flex-direction:column;gap:0}
.project-row{display:grid;grid-template-columns:232px minmax(0,1fr);gap:32px;align-items:center;padding:28px 0;border-bottom:1px solid var(--line);position:relative;isolation:isolate}
.project-row:first-child{padding-top:0}
.project-row:last-child{padding-bottom:0;border-bottom:0}
.project-row::before{content:'';position:absolute;inset:12px -16px;background:#f7f7fa;border-radius:12px;z-index:-1;opacity:0;transition:opacity .2s}
.project-row:first-child::before{top:-16px}
.project-row:last-child::before{bottom:-16px}
.project-row:hover::before,.project-row:focus-visible::before{opacity:1}
.project-row .art{height:174px;border-radius:12px;border:0;margin:0;align-self:center}

.project-summary{min-width:0}
.project-summary h3{font-size:25px;font-weight:500;line-height:1.35;letter-spacing:-.015em;margin:0 0 12px}
.project-summary p{font-size:18px;line-height:1.7;color:var(--muted);margin:0;max-width:32em}
.project-summary .arrow{font-size:18px;vertical-align:middle;color:var(--muted)}
.project-row:hover .arrow{transform:translate(3px,-3px);color:var(--accent)}
.skill-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px;font-family:var(--ui-font)}
:root{--signature-pink:#c02a71}
.skill-tags span{font-size:12px;line-height:1.5;padding:5px 10px;border-radius:6px;background:var(--signature-pink);color:white}

/* Empty artwork spaces remain honest placeholders, without heavy containers. */
.portfolio-layout .artwork-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.portfolio-layout .artwork-slot{min-width:0;min-height:160px;padding:20px 0 0;background:none;border:0;border-top:1px solid #cecad9;border-radius:0}
.portfolio-layout .artwork-number{font-family:var(--ui-font);font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums;letter-spacing:0}
.portfolio-layout .artwork-slot h3{font-size:26px;font-weight:500;line-height:1.3;margin:28px 0 12px}
.portfolio-layout .artwork-slot p{font-size:14px;line-height:1.6;color:var(--muted);margin:0}
.experience-row{grid-template-columns:176px minmax(0,1fr);gap:32px;align-items:start}
.experience-date{font-family:var(--ui-font);font-size:14px;line-height:1.7;color:var(--muted);padding-top:5px;font-variant-numeric:tabular-nums}
.experience-body{border-left:1px solid #d9d4e2;padding-left:28px;position:relative;min-width:0}
.experience-body:before{content:'';position:absolute;left:-4px;top:12px;width:7px;height:7px;background:#8b7ea7;border-radius:50%;outline:4px solid white}
.experience-row h3{font-size:26px;font-weight:500;line-height:1.35;margin:0 0 8px}
.experience-row p{font-size:18px;line-height:1.8;color:#585c65;margin:0}
.experience-row .experience-role{font-family:var(--ui-font);font-size:16px;line-height:1.7;color:#444852;margin-bottom:20px}
.portfolio-layout .experience-row{padding:0}
.portfolio-layout .interaction-section{padding:4px 0 64px}
.portfolio-layout .lens{gap:28px;flex-wrap:wrap;min-height:72px;padding:12px 0 24px;color:var(--muted)}
.portfolio-layout .lens button{font-size:16px;min-height:44px;padding:10px 4px}
.portfolio-layout .lens-caption{font-size:14px;line-height:1.8;max-width:36em;margin:0 auto;min-height:50px}
.portfolio-layout .resume-section{padding:32px 0 40px;gap:24px;align-items:center}
.portfolio-layout .resume-section h2{font-size:32px;font-weight:500;line-height:1.25;margin-bottom:12px}
.portfolio-layout .resume-section p{font-size:14px;line-height:1.7;max-width:30em}
.portfolio-layout .download{padding:12px 16px;min-height:48px;font-size:14px;border-radius:8px}
.portfolio-layout footer{padding:24px 0 104px;font-size:12px;color:var(--muted)}

/* Keep project routes on the same type scale and spacing rhythm. */

.detail-head h1{font-size:48px;font-weight:500;letter-spacing:-.025em;line-height:1.2}
.detail-head p{font-size:20px;line-height:1.8;max-width:34em}
.detail-head{padding:64px 0 40px}
.detail-head h1{margin:32px 0 20px}
.detail-head p{margin-bottom:0}
.back,.detail-next{font-size:15px}

.detail-next{gap:24px;padding:32px 0 64px}
header nav{flex-wrap:wrap}

/* A second column appears only on genuinely wide landscape windows. */
@media(min-width:1440px) and (min-aspect-ratio:3/2){
  .portfolio-wrap{max-width:1480px;padding:0 64px}
  .portfolio-layout{display:grid;grid-template-columns:304px minmax(0,1fr);gap:96px;align-items:start;padding-top:96px}

  .nav-line{display:block}

  .reading-column{max-width:880px}
  .portfolio-layout .section{scroll-margin-top:64px}

  .project-row{grid-template-columns:224px minmax(0,1fr)}
  .project-row .art{height:168px}
  .experience-row{grid-template-columns:176px minmax(0,1fr)}
}
@media(min-width:1840px) and (min-aspect-ratio:3/2){
  .portfolio-wrap{max-width:1600px;padding:0 80px}
  .portfolio-layout{grid-template-columns:352px minmax(0,1fr);gap:128px;padding-top:112px}

  .project-row{grid-template-columns:248px minmax(0,1fr)}
  .project-row .art{height:186px}

}
@media(min-width:1440px) and (min-aspect-ratio:3/2) and (max-height:750px){
  .portfolio-layout{padding-top:48px}

}
@media(max-width:760px){
  :root{--space-section:72px;--space-group:28px;--heading-size:28px}
  .portfolio-wrap{padding:0 32px}
  .portfolio-layout{padding-top:96px}

  .project-row{grid-template-columns:168px minmax(0,1fr);gap:24px;padding:24px 0}
  .project-row .art{height:140px}

  .project-summary h3{font-size:23px}
  .project-summary p{font-size:17px}
  .skill-tags{margin-top:16px}
  .portfolio-layout .artwork-grid{gap:20px}
  .portfolio-layout .artwork-slot h3{font-size:23px}
  .experience-row{grid-template-columns:1fr;gap:20px}
  .experience-body{padding-left:24px}
  .experience-date{padding-top:0}
  .experience-row h3{font-size:24px}
  .portfolio-layout .resume-section{align-items:flex-start;gap:24px}
  .portfolio-layout .resume-section h2{font-size:28px}
  .portfolio-layout .lens{gap:12px 20px}
  .portfolio-layout .lens button{font-size:15px}
  .detail-head h1{font-size:36px}
  .detail-head p{font-size:18px}

  .detail-head{padding-top:40px}
  header{height:auto;min-height:80px;padding:16px 0}
  header nav{gap:8px 16px;justify-content:flex-end}
}
@media(max-width:540px){
  .portfolio-wrap{padding:0 24px}

  .project-row{grid-template-columns:minmax(88px,34%) minmax(0,1fr);gap:20px;padding:28px 0;align-items:start}
  .project-row .art{height:auto;aspect-ratio:4/3;width:100%;min-height:0;align-self:start;margin-top:4px;border-radius:8px}

  .project-summary h3{font-size:21px;line-height:1.4}
  .project-summary p{font-size:16px}
  .portfolio-layout .artwork-grid{grid-template-columns:1fr;gap:0}
  .portfolio-layout .artwork-slot{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:16px;min-height:96px;padding:24px 0}
  .portfolio-layout .artwork-slot:last-child{padding-bottom:0}
  .portfolio-layout .artwork-slot h3{font-size:24px;margin:0}
  .portfolio-layout .artwork-slot p{font-size:13px}
  .portfolio-layout .lens{gap:8px 16px}
  .portfolio-layout .lens button{font-size:14px}
  .detail-next{flex-wrap:wrap}
}
@media(max-width:360px){

  .portfolio-layout .artwork-slot{gap:12px;grid-template-columns:20px minmax(0,1fr)}
  .portfolio-layout .artwork-slot p{grid-column:2}
}
@media(prefers-reduced-motion:reduce){
  .project-row::before,.nav-line{transition:none}
}

.companion-art{background:transparent;border:0}
.companion-art{container-type:size;overflow:visible}
.project-row:has(> .companion-art)::before{content:none}
.portfolio-layout .project-row:has(> .companion-art){border:0}
.companion-device{
  --screen-scale:.92;
  position:absolute;
  inset:0;
  margin:auto;
  width:calc(min(100cqw,100cqh * 4 / 3) * .9);
  height:calc(min(100cqh,100cqw * 3 / 4) * .9);
}
.companion-device::before{
  content:'';
  position:absolute;
  inset:auto 2% calc(-3% + 52% * (1 - var(--screen-scale))) 2%;
  height:10%;
  background:
    radial-gradient(ellipse,rgb(20 25 32 / .36),transparent 70%) center top / 76% 50% no-repeat,
    radial-gradient(ellipse,rgb(20 25 32 / .24),transparent 72%);
  filter:blur(1.5px);
  transform:scaleX(var(--screen-scale));
  pointer-events:none;
}
.companion-screen{
  display:block;
  position:relative;
  width:100%;
  height:100%;
  transform:scale(var(--screen-scale));
  transform-origin:49% 45%;
}
.companion-gaze{
  /* Center of the glass in the screen image. */
  position:absolute;
  top:45%;
  left:49%;
  width:49%;
  aspect-ratio:1;
  transform:translate(-50%,-50%);
  pointer-events:none;
}
.companion-eye{
  position:absolute;
  left:var(--eye-x);
  top:var(--eye-y,50%);
  width:calc(var(--eye-width,8.8%) * 1.12);
  height:calc(var(--eye-height,14.9%) * 1.12);
  border-radius:999px;
  transform:translate(-50%,-50%) rotate(var(--eye-tilt,0deg));
  background:#fff;
  box-shadow:0 0 3px rgb(255 255 255 / .3);
}
.companion-eye:first-child{--eye-x:39.55%}
.companion-eye:last-child{--eye-x:60.45%}

/* Companion case study */

.case-body{max-width:800px;margin:auto}
.case-chapter{margin-bottom:64px}
.case-chapter h2{font-family:var(--reading-font);font-size:30px;line-height:1.3;font-weight:500;letter-spacing:-.015em;margin:0 0 24px}
.case-chapter>p{font-family:var(--reading-font);font-size:20px;line-height:1.85;color:#585c65;margin:0;max-width:36em}

.case-chapter>.case-note{font-family:var(--ui-font);font-size:14px;line-height:1.8;color:var(--muted);margin-top:20px;max-width:none}
@media(max-width:760px){

  .case-chapter{margin-bottom:48px}
  .case-chapter h2{font-size:26px;margin-bottom:20px}
  .case-chapter>p{font-size:18px}

}
