@font-face{
  font-family:'Season Mix';
  src:url('../fonts/SeasonMix-Medium.otf') format('opentype');
  font-weight:400 700;
  font-style:normal;
  font-display:swap;
}

:root{
  --bg:#F8F1F1;
  --ink:#5D0000;
  --muted:rgba(93,0,0,0.40);
  --line:rgba(93,0,0,0.12);
  --pad:32px;
  --fs:15px;
  /* motion — critically-damped ease-out (Apple "no overshoot" default) and a
     symmetric ease-in-out for reversible transitions */
  --ease:cubic-bezier(0.33,1,0.68,1);
  --ease-inout:cubic-bezier(0.65,0,0.35,1);
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{min-height:100%}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:'Season Mix',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-size:var(--fs);
  font-weight:400;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  letter-spacing:0.01em;
  overflow-x:hidden;
}
/* page-load fade via a veil — never animate body's own opacity, or it becomes an
   isolated layer and the header name's mix-blend-difference loses its backdrop */
body::before{
  content:"";position:fixed;inset:0;z-index:200;pointer-events:none;
  background:var(--bg);animation:veilOut .5s var(--ease) forwards;
}
@keyframes veilOut{from{opacity:1}to{opacity:0}}
a{color:inherit;text-decoration:none;transition:color .3s var(--ease)}
button{font:inherit;color:inherit;background:none;border:none;cursor:pointer;letter-spacing:inherit;
  transition:color .3s var(--ease),background-color .3s var(--ease),transform .18s var(--ease)}
/* press feedback lives on pointer-down (Apple: respond instantly, not on release) */
button:active{transform:scale(0.96)}

/* Background wordmark behind the scattered works */
.bg-name{                         /* faint wordmark, fixed centred, behind the works */
  position:fixed;left:0;right:0;top:50%;transform:translateY(-50%);
  z-index:1;pointer-events:none;text-align:center;
  font-size:clamp(48px,11vw,200px);line-height:0.9;font-weight:400;
  color:rgba(93,0,0,0.10);letter-spacing:-0.01em;white-space:nowrap;
}

/* Framed chrome around the canvas (fixed to the viewport corners/edges) */
.site-name{                       /* name — top center, blends over images */
  position:fixed;top:var(--pad);left:50%;transform:translateX(-50%);
  z-index:30;font-size:20px;font-weight:400;letter-spacing:-0.01em;
  line-height:1;white-space:nowrap;
  /* #9BF1F1 under mix-blend difference resolves to ink #5D0000 over the
     #F8F1F1 page, and inverts where a scrolling image passes beneath it */
  color:#9BF1F1;mix-blend-mode:difference;
}
nav.main{                         /* navigation — top right */
  position:fixed;top:var(--pad);right:var(--pad);z-index:30;
  display:flex;align-items:baseline;gap:24px;font-size:20px;
}
nav.main a{color:var(--ink)}
nav.main a.active{             /* active page — hand-drawn wavy underline */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M0 4 Q3 1 6 4 T12 4' fill='none' stroke='%235D0000' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat:repeat-x;background-position:left bottom;background-size:12px 6px;
  padding-bottom:4.5px;
}

.filters{                         /* work type — top left */
  position:fixed;top:calc(var(--pad) - 7px);left:calc(var(--pad) - 14px);z-index:30;
  display:flex;align-items:center;gap:4px;
}
.sort{                            /* chronological sort — bottom center */
  position:fixed;bottom:calc(var(--pad) - 7px);left:50%;transform:translateX(-50%);
  z-index:30;display:flex;align-items:center;gap:4px;
}
.filters button,.sort button{
  font-size:20px;color:var(--muted);
  padding:6px 15px;border-radius:999px;line-height:1;
}
.filters button:hover,.sort button:hover{color:var(--ink)}
.filters button.on,.sort button.on{color:var(--ink);background:rgba(93,0,0,0.07)}

.lang{                            /* language — bottom right, as a simple sentence */
  position:fixed;bottom:var(--pad);right:var(--pad);z-index:30;
}
.lang button{font-size:13px;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.lang button:hover{color:var(--ink)}

/* Scattered / distributed works */
.scatter{
  position:relative;z-index:10;
  width:100%;
  margin-top:calc(var(--pad) + 56px);
}
.work{
  position:absolute;cursor:pointer;
  animation:workIn .6s var(--ease) both;
}
@keyframes workIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
.work-img{overflow:hidden}
.work img{width:100%;height:auto;display:block;background:#efefec;
  transition:transform .6s var(--ease),opacity .3s var(--ease)}
.work:hover img{transform:scale(1.03)}
.work .meta{margin-top:8px;display:flex;justify-content:space-between;gap:12px;font-size:13px}
.work .meta .t{color:var(--ink)}
.work .meta .y{color:var(--muted)}

/* Overlay (Instagram-style detail) */
.overlay{
  position:fixed;inset:0;z-index:50;padding:var(--pad);
  display:flex;align-items:center;justify-content:center;
  background:rgba(248,241,241,0.94);
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .4s var(--ease),visibility .4s var(--ease);
}
.overlay.open{opacity:1;visibility:visible;pointer-events:auto}
.overlay-inner{
  display:flex;max-width:1100px;width:100%;max-height:86vh;
  background:var(--bg);border:1px solid var(--line);
  transform:scale(0.97);opacity:0;
  transition:transform .45s var(--ease),opacity .45s var(--ease);
}
.overlay.open .overlay-inner{transform:none;opacity:1}
.overlay-img{flex:1 1 62%;background:#f2f2f0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.overlay-img img{width:100%;height:100%;object-fit:contain;max-height:86vh}
.overlay-desc{flex:1 1 38%;padding:36px;display:flex;flex-direction:column;gap:14px;overflow-y:auto;background:rgba(255,255,255,0.5)}
.overlay-desc .row{display:flex;flex-direction:column;gap:2px}
.overlay-desc .label{color:var(--muted)}
.overlay-desc .val{color:var(--ink)}
.overlay-desc .val.title{font-size:20px}
.overlay-desc .text{color:var(--ink)}
/* Gallery carousel (multi-image artworks) */
.overlay-img{position:relative}
.gal{position:absolute;z-index:5;opacity:0;transition:opacity .3s var(--ease)}
.overlay.open .gal{opacity:1}
.gal-prev,.gal-next{
  top:50%;transform:translateY(-50%);width:42px;height:42px;padding:0;
  border-radius:50%;background:rgba(255,255,255,0.86);
  box-shadow:0 2px 10px rgba(0,0,0,0.14);
  background-repeat:no-repeat;background-position:center;background-size:15px 15px;
}
.gal-prev{left:16px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 4 L7 12 L15 20' fill='none' stroke='%235D0000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.gal-next{right:16px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 4 L17 12 L9 20' fill='none' stroke='%235D0000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.gal-prev:hover,.gal-next:hover{background-color:#fff}
.gal-count{
  top:16px;right:16px;font-size:12px;line-height:1;color:var(--ink);
  padding:5px 9px;border-radius:999px;background:rgba(255,255,255,0.86);
  font-variant-numeric:tabular-nums lining-nums;
}
.gal-dots{bottom:14px;left:50%;transform:translateX(-50%);display:flex;gap:7px}
.gal-dots button{
  width:6px;height:6px;padding:0;border-radius:50%;
  background:rgba(255,255,255,0.55);transition:background-color .3s var(--ease),transform .3s var(--ease);
}
.gal-dots button.on{background:#fff;transform:scale(1.35)}
/* thumbnail hint that an artwork has more images */
.work .meta .multi{
  width:5px;height:5px;border-radius:50%;background:var(--muted);
  align-self:center;margin-left:-4px;flex:0 0 auto;
}

.overlay-close{
  position:fixed;top:var(--pad);right:var(--pad);z-index:60;
  font-size:var(--fs);color:var(--muted);
}
.overlay-close:hover{color:var(--ink)}

/* ---------- About page ---------- */
.about{
  position:relative;z-index:10;box-sizing:border-box;
  min-height:100vh;padding:calc(var(--pad) + 60px) var(--pad) calc(var(--pad) + 40px);
  display:flex;justify-content:space-between;align-items:stretch;gap:5%;
}
.about-left{display:flex;flex-direction:column;width:49.3%;max-width:648px}
.about-text{display:flex;gap:20px;font-size:14px;line-height:1.5}
.about-text .col{flex:1}
.about-text .col p{margin-bottom:1.4em}
.about-text .col p:last-child{margin-bottom:0}
.about-table{margin-top:auto;font-size:14px}
.about-table .row{
  display:grid;grid-template-columns:2.14fr 1fr 1fr;column-gap:20px;
  padding:5px 0;border-bottom:1px solid var(--line);
}
.about-table .row .yr{text-align:right;font-variant-numeric:tabular-nums lining-nums;font-feature-settings:"tnum" 1,"lnum" 1}
.about-table .row.head{color:var(--muted)}
.about-photo{width:33.8%;max-width:444px;align-self:flex-start}
.about-photo img{width:100%;height:auto;max-height:600px;object-fit:cover;border-radius:6px;display:block}

/* ---------- Contact page ---------- */
.contact{
  position:relative;z-index:10;min-height:100vh;
  display:flex;align-items:center;justify-content:center;
  text-align:center;padding:calc(var(--pad) + 60px) var(--pad);
}
.contact .lines{font-size:clamp(30px,5.2vw,72px);line-height:1.14;font-weight:400}
.contact .lines a{text-decoration:underline;text-underline-offset:5px}
.contact .lines a:hover{color:var(--ink)}


/* ---------- Legal / privacy page ---------- */
main.legal{
  position:relative;z-index:10;max-width:660px;
  padding:calc(var(--pad) + 64px) var(--pad) calc(var(--pad) + 48px);
}
.legal h1{font-size:26px;font-weight:400;letter-spacing:-0.01em;margin-bottom:1.4em}
.legal h2{font-size:14px;font-weight:400;color:var(--muted);margin:2.2em 0 .5em}
.legal p{font-size:14px;line-height:1.65;margin-bottom:1em}
.legal a{text-decoration:underline;text-underline-offset:3px}
.legal code{font-family:inherit;font-style:italic}
.legal .updated{color:var(--muted);font-size:13px;margin-top:3em}

/* Mobile chrome (Type pill + Menu overlay) — hidden on desktop */
.type-toggle,.menu-toggle,.menu-overlay,.back-home{display:none}

/* Responsive: collapse scatter into a centered column + Type/Menu chrome */
@media(max-width:760px){
  /* 2-column distributed masonry — keeps the staggered feel of the desktop scatter */
  .scatter.masonry{
    display:flex;flex-direction:row;align-items:flex-start;gap:16px;
    height:auto!important;margin-top:calc(var(--pad) * 4.5);padding:0 24px 18vh;
  }
  .scatter.masonry .mcol{
    flex:1;min-width:0;display:flex;flex-direction:column;gap:30px;
  }
  /* offset the second column downward so the two columns interlock, not align */
  .scatter.masonry .mcol:nth-child(2){margin-top:9vh}
  .work{position:static!important;left:auto!important;top:auto!important;width:auto!important}
  .overlay-inner{flex-direction:column;max-height:86vh;overflow-y:auto}
  .about{flex-direction:column;gap:40px;min-height:0}
  .about-left,.about-photo{width:100%;max-width:none}
  .about-photo{height:70vh}
  .about-photo img{height:100%;max-height:none}
  .about-table{margin-top:40px}

  /* desktop chrome collapses into Type + Menu */
  nav.main,.lang{display:none}
  .site-name{z-index:50;transition:opacity .35s var(--ease),visibility .35s var(--ease)}
  .bg-name{white-space:normal;font-size:15vw;line-height:0.96;padding:0 var(--pad)}

  .type-toggle{
    display:block;position:fixed;top:calc(var(--pad) - 6px);left:24px;z-index:51;
    font-size:20px;color:var(--ink);line-height:1;
    padding:6px 15px;border-radius:999px;background:rgba(93,0,0,0.07);
    transition:opacity .3s var(--ease);
  }
  .menu-toggle{
    display:block;position:fixed;top:var(--pad);right:24px;z-index:50;
    font-size:20px;color:var(--ink);line-height:1;
  }

  /* "Type" rollout: the real filter row, revealed left→right and clipped when closed */
  .filters{
    display:flex;position:fixed;top:calc(var(--pad) - 6px);left:24px;z-index:50;
    gap:14px;align-items:center;white-space:nowrap;
    clip-path:inset(0 100% 0 0);pointer-events:none;
    transition:clip-path .5s var(--ease);
  }
  .filters button{padding:6px 0}            /* only the active item is a pill */
  .filters button.on{padding:6px 14px}
  body.filters-open .filters{clip-path:inset(0 0 0 0);pointer-events:auto}
  body.filters-open .type-toggle{opacity:0;pointer-events:none}
  body.filters-open .site-name{opacity:0;visibility:hidden}

  .menu-overlay{
    display:flex;position:fixed;inset:0;z-index:40;background:var(--bg);
    flex-direction:column;align-items:center;justify-content:center;
    opacity:0;visibility:hidden;pointer-events:none;
    transition:opacity .4s var(--ease),visibility .4s var(--ease);
  }
  .menu-overlay.open{opacity:1;visibility:visible;pointer-events:auto}
  .menu-nav{display:flex;flex-direction:column;align-items:center;gap:4px}
  .menu-nav a{
    font-size:clamp(40px,14vw,60px);line-height:1.2;color:var(--muted);
    opacity:0;transform:translateY(12px);
    transition:opacity .5s var(--ease),transform .5s var(--ease),color .3s var(--ease);
  }
  .menu-nav a.active{color:var(--ink)}
  .menu-overlay.open .menu-nav a{opacity:1;transform:none}
  .menu-overlay.open .menu-nav a:nth-child(1){transition-delay:.06s}
  .menu-overlay.open .menu-nav a:nth-child(2){transition-delay:.12s}
  .menu-overlay.open .menu-nav a:nth-child(3){transition-delay:.18s}
  .menu-lang{opacity:0;transition:opacity .5s var(--ease) .22s,color .3s var(--ease)}
  .menu-overlay.open .menu-lang{opacity:1}
  .menu-lang{
    position:absolute;bottom:calc(var(--pad) + 10px);left:50%;transform:translateX(-50%);
    font-size:13px;color:var(--muted);text-decoration:underline;text-underline-offset:3px;
  }

  .contact .lines{font-size:clamp(20px,6.2vw,28px);line-height:1.25}

  /* back to homepage — contact page, bottom centre pill */
  .back-home{
    display:block;position:fixed;bottom:calc(var(--pad) + 12px);left:50%;transform:translateX(-50%);
    z-index:50;font-size:20px;color:var(--ink);line-height:1;white-space:nowrap;
    padding:7px 15px;border-radius:999px;background:rgba(93,0,0,0.07);
  }

  /* background blur (10) behind the menu and the artwork detail */
  .menu-overlay{background:rgba(248,241,241,0.55);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}

  /* artwork detail: full takeover above the Type/Menu chrome */
  .overlay{padding:24px;z-index:100;background:rgba(248,241,241,0.55);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
  .overlay.open{align-items:stretch;justify-content:stretch}
  .overlay-inner{flex-direction:column;width:100%;height:100%;max-height:none;border:none;background:transparent;gap:0}
  .overlay-img{flex:1 1 50%;min-height:0;background:#000}
  .overlay-img img{width:100%;height:100%;object-fit:contain;max-height:none}
  .overlay-desc{flex:1 1 50%;min-height:0;background:var(--bg);overflow-y:auto;padding:24px}
  /* circular close icon (white disc + ink X) replaces the text button on mobile */
  .overlay-close{
    z-index:110;top:36px;right:36px;width:40px;height:40px;padding:0;
    font-size:0;line-height:0;color:transparent;border-radius:50%;
    background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 6.5 L17.5 17.5 M17.5 6.5 L6.5 17.5' stroke='%235D0000' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E") center/17px 17px no-repeat;
    box-shadow:0 2px 10px rgba(0,0,0,0.15);
  }
}
@media(max-width:560px){
  .work{width:88%!important}
  .about-text{flex-direction:column;gap:1.4em}
}

/* Reduced motion: keep comprehension cues (fades) but drop movement/springs */
@media(prefers-reduced-motion:reduce){
  body::before{display:none}
  .work{animation:none}
  .work img,.work:hover img{transition:none;transform:none}
  .overlay-inner,.menu-nav a,.menu-lang{transform:none!important;transition:opacity .2s ease}
  .overlay,.menu-overlay{transition:opacity .2s ease,visibility .2s ease}
  button:active{transform:none}
  *{scroll-behavior:auto!important}
}
