:root { color-scheme:dark; --bg:#060708; --ink:#efefed; --muted:#a4abad; --line:#ffffff26; font-family:Manrope,Arial,sans-serif; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:35px; }
body { margin:0; background:var(--bg); color:var(--ink); font-size:16px; line-height:1.65; -webkit-font-smoothing:antialiased; }
body:has(dialog[open]) { overflow:hidden; }
h1,h2,h3,p,figure { margin:0; }
a { color:inherit; text-decoration:none; }
button,input { font:inherit; }
button { color:inherit; background:none; border:0; cursor:pointer; }
button,a { touch-action:manipulation; }
:focus-visible { outline:2px solid #e9e5da; outline-offset:6px; }
.skip { position:fixed; z-index:50; left:20px; top:-70px; padding:12px 20px; background:var(--ink); color:var(--bg); }
.skip:focus { top:12px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.header { display:flex; align-items:center; gap:28px; padding:30px 6%; }
.wordmark { font-size:23px; letter-spacing:.075em; font-weight:400; }
.header-note { font-size:12px; line-height:1.5; color:var(--muted); }
nav { display:flex; gap:28px; margin-left:auto; }
nav a { font-size:14px; padding:9px 0; }
.header-portfolio { font-size:14px; padding:11px 22px; border:1px solid #ffffff55; border-radius:30px; }
.header-portfolio:hover { background:var(--ink); color:var(--bg); }
.section { padding:85px 8%; }
.eyebrow { font-size:13px; color:var(--muted); letter-spacing:.1em; text-transform:uppercase; }
h1,h2 { font-size:clamp(44px,5.9vw,84px); font-weight:300; line-height:1.04; letter-spacing:-.055em; }
h1 span,h2 span { color:#858d91; }
.work { padding-top:38px; }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:35px; }
.section-heading>p { color:var(--muted); }
.filters { display:flex; gap:28px; margin:28px 0 30px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.filters button { font-size:14px; color:var(--muted); border-bottom:1px solid transparent; padding:12px 0; }
.filters button[aria-pressed=true] { color:var(--ink); border-bottom-color:var(--ink); }
.project-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:58px 30px; }
.project { min-width:0; grid-column:span 3; }
.project:nth-child(n+3) { grid-column:span 2; }
.project:nth-child(n+3) .project-caption { display:block; }
.project:nth-child(n+3) .project-caption p { text-align:left; margin-top:8px; max-width:none; }
.project-grid.filtered { grid-template-columns:repeat(2,minmax(0,1fr)); }
.project-grid.filtered .project { grid-column:auto; }
.project-grid[data-count="1"] { grid-template-columns:minmax(0,760px); }
.project[hidden] { display:none; }
.project-wide { grid-column:1/-1; }
.project-image { display:block; width:100%; aspect-ratio:1.5; padding:18px; overflow:hidden; background:#0e1214; }
.project-wide .project-image { aspect-ratio:2.05; }
.project-image img { display:block; width:100%; height:100%; object-fit:contain; transition:transform .7s; }
.project-image:hover img { transform:scale(1.015); }
.project-showcase .project-image img { object-fit:cover; object-position:50% 58%; }
.project-image>span { display:none; }
.project-caption { display:flex; justify-content:space-between; gap:16px; align-items:baseline; padding-top:19px; }
h3 { font-weight:400; font-size:23px; line-height:1.3; letter-spacing:-.025em; }
.project-caption p { color:var(--muted); font-size:13px; text-align:right; max-width:210px; }
.project-summary { color:var(--muted); margin-top:10px; max-width:600px; }
.intro { display:grid; grid-template-columns:1fr 3fr; gap:50px; border-top:1px solid var(--line); }
.lead { font-size:clamp(20px,2vw,27px); line-height:1.55; letter-spacing:-.025em; max-width:780px; margin-top:35px; }
.intro div>p:not(.lead) { color:var(--muted); margin-top:22px; max-width:680px; }
footer { border-top:1px solid var(--line); padding:75px 8% 30px; background:#090b0c; }
footer h2 { margin-top:28px; }
.portfolio-description { max-width:540px; color:var(--muted); margin-top:28px; font-size:18px; }
.portfolio-button { display:inline-block; margin-top:30px; background:var(--ink); color:var(--bg); padding:19px 34px; border:1px solid var(--ink); border-radius:40px; font-size:18px; transition:background .2s,color .2s; }
.portfolio-button:hover { background:transparent; color:var(--ink); }
.footer-line { display:flex; justify-content:space-between; gap:25px; border-top:1px solid var(--line); padding-top:24px; margin-top:70px; color:var(--muted); font-size:13px; }
dialog { width:min(1180px,94vw); max-width:none; height:92svh; max-height:92svh; margin:auto; border:1px solid var(--line); padding:0; background:#090c0e; color:var(--ink); }
dialog::backdrop { background:#020405eb; backdrop-filter:blur(15px); }
.dialog-bar { position:sticky; top:0; display:flex; justify-content:space-between; align-items:center; padding:15px 5%; background:#090c0ef5; border-bottom:1px solid var(--line); z-index:2; font-size:13px; color:var(--muted); }
.dialog-bar button { padding:8px 14px; font-size:15px; color:var(--ink); }
.detail-head { padding:35px 5% 28px; }
.detail-head h2 { font-size:clamp(36px,5vw,68px); margin:20px 0 28px; }
.detail-head p:not(.eyebrow) { color:var(--muted); max-width:780px; margin-top:16px; }
.contribution { border-top:1px solid var(--line); margin-top:28px; padding-top:24px; }
.contribution strong { display:block; color:var(--ink); font-weight:400; }
.gallery { padding:0 5% 35px; }
.gallery-tabs { display:flex; gap:18px; overflow-x:auto; padding-bottom:18px; }
.gallery-tabs button { white-space:nowrap; color:var(--muted); padding:10px 0; border-bottom:1px solid var(--line); font-size:14px; }
.gallery-tabs button[aria-pressed=true] { color:var(--ink); border-color:var(--ink); }
.gallery-stage { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:12px; align-items:start; padding:14px; background:#0e1214; }
.gallery-stage.single-image { grid-template-columns:minmax(0,1fr); }
.gallery-arrow { position:sticky; top:calc(50svh - 24px); align-self:start; z-index:1; width:44px; height:48px; display:flex; align-items:center; justify-content:center; background:#181e23; border:1px solid #ffffff66; border-radius:24px; }
.gallery-arrow span { font-size:32px; line-height:1; }
.gallery-arrow:hover { background:#303a41; }
.gallery-arrow[hidden] { display:none; }
.image-frame { display:block; width:100%; padding:0; position:relative; margin:auto; height:min(62svh,650px); cursor:zoom-in; }
.image-frame img { display:block; width:100%; height:100%; object-fit:contain; }
.image-frame.cropped { overflow:hidden; height:auto; aspect-ratio:var(--crop-ratio); width:min(100%,calc(62svh * var(--crop-ratio))); }
.image-frame.cropped img { position:absolute; object-fit:fill; max-width:none; }
.gallery figcaption { margin-top:16px; color:var(--muted); font-size:14px; display:flex; justify-content:space-between; gap:20px; }
.gallery figcaption a { white-space:nowrap; border-bottom:1px solid var(--line); }
.text-link { display:inline-block; border-bottom:1px solid #ffffff66; padding:10px 0; font-size:14px; margin-top:24px; }
.detail-links { margin:0 5% 45px; display:flex; gap:26px; flex-wrap:wrap; }
.detail-links .portfolio-button { font-size:17px; margin-top:10px; }
.gallery-controls { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:12px; }
.gallery-controls button,.fullscreen-bottom button { display:flex; align-items:center; gap:12px; font-size:14px; padding:9px 14px; border:1px solid var(--line); border-radius:24px; }
.gallery-controls button:hover,.fullscreen-bottom button:hover { background:#ffffff12; }
.gallery-controls button span,.fullscreen-bottom button span { font-size:26px; line-height:1; }
.gallery-controls p { font-size:13px; color:var(--muted); }
.gallery-controls>span { font-size:13px; color:var(--muted); }
.gallery-controls[hidden],[data-fullscreen-direction][hidden] { display:none; }
.image-dialog { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; border:0; margin:0; padding:0; background:#060708; }
.image-dialog[open] { display:flex; flex-direction:column; }
.fullscreen-toolbar { flex:none; display:flex; align-items:center; gap:24px; padding:14px 4%; border-bottom:1px solid var(--line); font-size:14px; }
#fullscreen-count { color:var(--muted); margin-right:auto; }
.fullscreen-toolbar button,.fullscreen-toolbar a { padding:8px 0; }
.fullscreen-stage { flex:1; min-height:0; overflow:auto; padding:18px; display:flex; align-items:center; justify-content:center; }
.fullscreen-stage img { width:100%; height:100%; object-fit:contain; cursor:zoom-in; }
.fullscreen-stage.zoomed { display:block; }
.fullscreen-stage.zoomed img { width:auto; height:auto; max-width:none; min-width:100%; cursor:zoom-out; }
.fullscreen-bottom { flex:none; display:flex; gap:25px; align-items:center; justify-content:space-between; padding:14px 4%; border-top:1px solid var(--line); }
#fullscreen-caption { font-size:13px; line-height:1.5; color:var(--muted); max-width:760px; text-align:center; }
@media(max-width:950px) {
  .header { gap:20px; } .header-note { display:none; }
  .intro { grid-template-columns:1fr; gap:28px; }
  .project-caption { display:block; }
  .project-caption p { text-align:left; margin-top:8px; max-width:none; }
  .project-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .project,.project:nth-child(n+3) { grid-column:auto; }
}
@media(max-width:600px) {
  .header { padding:24px 7% 16px; flex-wrap:wrap; gap:16px; }
  .wordmark { font-size:20px; }
  .header-portfolio { margin-left:auto; font-size:13px; padding:9px 15px; }
  nav { margin:0; order:3; gap:25px; }
  .header-note { display:block; width:100%; order:4; font-size:13px; }
  .section { padding:60px 7%; } .work { padding-top:25px; }
  h1,h2 { font-size:49px; } .lead { font-size:21px; }
  .section-heading { display:block; } .section-heading>p { margin-top:20px; }
  .filters { gap:4px 22px; margin:22px 0 28px; }
  .project-grid,.project-grid.filtered { grid-template-columns:1fr; gap:38px; }
  .project-wide { grid-column:auto; }
  .project-wide .project-image,.project-image { aspect-ratio:1.35; padding:10px; }
  .project-caption h3 { font-size:23px; }
  footer { padding:60px 7% 30px; }
  .portfolio-button { display:block; text-align:center; padding:18px 20px; }
  .footer-line { flex-wrap:wrap; gap:20px; margin-top:45px; }
  dialog { width:96vw; height:95svh; max-height:95svh; }
  .detail-head h2 { font-size:36px; }
  .gallery-stage { padding:8px; gap:6px; grid-template-columns:34px minmax(0,1fr) 34px; }
  .gallery-arrow { width:34px; height:44px; top:calc(50svh - 22px); }
  .image-frame { height:49svh; }
  .gallery figcaption { display:block; }
  .gallery figcaption a { display:block; width:max-content; margin-top:14px; }
  .gallery-controls { gap:10px; }
  .fullscreen-toolbar { gap:14px; padding:10px 4%; font-size:13px; }
  .fullscreen-bottom { flex-wrap:wrap; gap:10px; padding:12px 4%; }
  #fullscreen-caption { order:3; width:100%; font-size:12px; text-align:left; max-height:70px; overflow:auto; }
  .fullscreen-stage { padding:10px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { transition:none!important; animation:none!important; }
  .project-image:hover img { transform:none; }
}
