/* ============================================================
   illupoo.com — Pooneh Nik

   Palette and surface taken from the work itself: a cool,
   slightly grey paper ground with visible grain, one crimson
   accent, gold as a secondary. The page keeps almost no
   personality of its own, because the paintings are dense and
   ornamental and need air around them.
   ============================================================ */

:root{
  --paper:      #f3f1ec;
  --paper-alt:  #e9e6df;
  --card:       #fbfaf7;
  --ink:        #1c1a19;
  --ink-soft:   #4d4842;
  --muted:      #7c766d;
  --accent:     #b03a32;   /* the crimson that runs through the work */
  --accent-ink: #fdfbf8;
  --gold:       #a98b45;
  --line:       rgba(28,26,25,.14);
  --line-soft:  rgba(28,26,25,.07);
  --shadow:     0 1px 2px rgba(28,26,25,.03), 0 10px 30px rgba(28,26,25,.05);

  --wrap: 1120px;
  --gap: 36px;
  --radius: 2px;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --paper:      #17161a;
    --paper-alt:  #1e1d22;
    --card:       #232228;
    --ink:        #f0eee9;
    --ink-soft:   #c0bbb3;
    --muted:      #8e8880;
    --accent:     #d4574b;
    --accent-ink: #17100f;
    --gold:       #c8a65c;
    --line:       rgba(240,238,233,.17);
    --line-soft:  rgba(240,238,233,.08);
    --shadow:     0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  }
}

:root[data-theme="dark"]{
  --paper:      #17161a;
  --paper-alt:  #1e1d22;
  --card:       #232228;
  --ink:        #f0eee9;
  --ink-soft:   #c0bbb3;
  --muted:      #8e8880;
  --accent:     #d4574b;
  --accent-ink: #17100f;
  --gold:       #c8a65c;
  --line:       rgba(240,238,233,.17);
  --line-soft:  rgba(240,238,233,.08);
  --shadow:     0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
}

*,*::before,*::after{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation:none !important; transition:none !important; }
}

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--body);
  font-size:17px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}

/* Paper grain, echoing the textured ground she paints on.
   Fixed overlay, never intercepts clicks. */
body::after{
  content:"";
  position:fixed; inset:0;
  pointer-events:none;
  z-index:9999;
  opacity:.04;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

img{ max-width:100%; display:block; }
a{ color:inherit; }

.wrap{
  width:100%;
  max-width:var(--wrap);
  margin-inline:auto;
  padding-inline:16px;
}

.sr-only,.skip{
  position:absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.skip:focus{
  position:fixed; top:12px; left:12px; z-index:10000;
  width:auto; height:auto; clip:auto; margin:0;
  padding:10px 16px; background:var(--ink); color:var(--paper);
}

/* ---------------- Header ---------------- */

.site-header{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter:saturate(1.2) blur(10px);
  border-bottom:1px solid var(--line-soft);
}

.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:20px; min-height:76px;
}

.wordmark{ text-decoration:none; }
.wordmark-name{
  display:block;
  font-family:var(--display);
  font-weight:400;
  font-size:clamp(21px, 2.2vw, 25px);
  letter-spacing:.01em;
}

.nav{ display:flex; gap:34px; }
.nav a{
  text-decoration:none; font-size:14px; font-weight:400;
  letter-spacing:.04em; color:var(--ink-soft);
  padding-block:6px; position:relative;
}
.nav a::after{
  content:""; position:absolute; left:0; right:0; bottom:0;
  height:1px; background:var(--accent);
  transform:scaleX(0); transform-origin:left; transition:transform .3s ease;
}
.nav a:hover{ color:var(--ink); }
.nav a:hover::after{ transform:scaleX(1); }

.header-actions{ display:flex; align-items:center; gap:14px; }

.nav-toggle{
  display:none; width:40px; height:40px; padding:10px;
  background:none; border:1px solid var(--line); border-radius:var(--radius);
  cursor:pointer; flex-direction:column; justify-content:space-between;
}
.nav-toggle span{ display:block; height:1px; background:var(--ink); }

.mobile-nav{ display:none; flex-direction:column; border-top:1px solid var(--line-soft); }
.mobile-nav a{
  padding:15px 16px; text-decoration:none; font-size:15px;
  border-bottom:1px solid var(--line-soft); color:var(--ink-soft);
}
.mobile-nav.open{ display:flex; }

/* ---------------- Buttons ---------------- */

.btn{
  display:inline-block; text-decoration:none; cursor:pointer;
  font-family:var(--body); font-size:14px; font-weight:500;
  letter-spacing:.02em;
  padding:13px 26px; border-radius:var(--radius);
  border:1px solid transparent; transition:all .22s ease;
  text-align:center;
}
/* Outlined rather than filled: three solid crimson blocks in a
   product row shout louder than the paintings do. */
.btn-primary{ background:transparent; color:var(--accent); border-color:var(--accent); }
.btn-primary:hover{ background:var(--accent); color:var(--accent-ink); }
.btn-ghost{ background:transparent; color:var(--ink); border-color:var(--line); }
.btn-ghost:hover{ border-color:var(--ink); }
.btn-block{ display:block; width:100%; }

/* ---------------- Hero ---------------- */

.hero{ padding-block:clamp(64px, 11vw, 140px); }
.hero-inner{
  display:grid; grid-template-columns:1fr .85fr;
  gap:clamp(40px, 7vw, 96px); align-items:center;
}

.hero h1{
  font-family:var(--display); font-weight:300;
  font-size:clamp(38px, 5.6vw, 64px);
  line-height:1.14; letter-spacing:-.012em; margin:0 0 26px;
}
.hero h1 em{ font-style:italic; color:var(--accent); }

.lede{
  font-size:clamp(16px, 1.5vw, 18px);
  color:var(--ink-soft); max-width:42ch; margin:0;
}

/* ---------------- Sections ---------------- */

.section{ padding-block:clamp(64px, 10vw, 128px); }
.section-alt{ background:var(--paper-alt); }

.section-head{ max-width:56ch; margin-bottom:clamp(36px, 5vw, 60px); }
.section-head h2{
  font-family:var(--display); font-weight:300;
  font-size:clamp(28px, 3.4vw, 40px); line-height:1.15;
  letter-spacing:-.008em; margin:0 0 14px;
}
.section-head p{ color:var(--ink-soft); margin:0; }

.section-note{
  margin:clamp(28px, 4vw, 44px) 0 0;
  font-size:14px; color:var(--muted);
  padding-top:18px; border-top:1px solid var(--line-soft);
}

/* ---------------- Image placeholders ----------------
   Swap each <figure class="ph"> for a real <img>.
   data-label names the file to drop in.
   ------------------------------------------------- */

.ph{
  margin:0; position:relative; overflow:hidden;
  background:var(--card);
  border:1px solid var(--line-soft);
  display:flex; align-items:center; justify-content:center;
}
.ph::before{
  content:attr(data-label);
  font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted);
}
.ph-portrait{ aspect-ratio:3/4; }
.ph-square{ aspect-ratio:1/1; }
.ph-landscape{ aspect-ratio:4/3; }

/* ---------------- Gallery ---------------- */

/* Masonry via CSS columns, so mixed portrait, square and
   landscape work flows without ragged holes. */
.gallery{
  column-count:2;
  column-gap:var(--gap);
}
.gallery > *{
  break-inside:avoid;
  margin-bottom:var(--gap);
}

/* ---------------- Products ---------------- */

.product-grid{
  display:grid; gap:var(--gap);
  grid-template-columns:repeat(3, 1fr);
}
.product-grid-2{ grid-template-columns:repeat(2, 1fr); }

.product{
  background:transparent;
  display:flex; flex-direction:column;
}
.product .ph{ margin-bottom:18px; }

.product-body{ display:flex; flex-direction:column; gap:6px; flex:1; }
.product-body h3{
  font-family:var(--display); font-weight:400;
  font-size:21px; line-height:1.25; margin:0;
}
.product-meta{ font-size:13px; color:var(--muted); margin:0; letter-spacing:.02em; }
.product-price{ font-size:15px; color:var(--ink-soft); margin:4px 0 18px; }
.product .buy{ margin-top:auto; }

.edition{
  align-self:flex-start;
  font-size:10px; letter-spacing:.17em; text-transform:uppercase;
  color:var(--gold); margin-bottom:4px;
}
.edition.sold{ color:var(--muted); }

/* ---------------- About ---------------- */

.about-grid{
  display:grid; grid-template-columns:.75fr 1.25fr;
  gap:clamp(36px, 6vw, 80px); align-items:center;
}
.about-text h2{
  font-family:var(--display); font-weight:300;
  font-size:clamp(28px, 3.4vw, 40px); margin:0 0 20px;
}
.about-text p{ color:var(--ink-soft); margin:0 0 18px; max-width:52ch; }
.about-note{
  font-size:14px; color:var(--muted); font-style:italic;
  border-left:1px solid var(--accent); padding-left:16px;
}

/* ---------------- Exhibitions & press ---------------- */

.press-grid{
  display:grid; gap:clamp(32px, 5vw, 64px);
  grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));
}
.press-col h3{
  font-family:var(--body); font-size:12px; font-weight:500;
  letter-spacing:.16em; text-transform:uppercase; color:var(--muted);
  margin:0 0 6px; padding-bottom:12px; border-bottom:1px solid var(--line);
}
.press-list{ list-style:none; margin:0; padding:0; }
.press-list li{
  display:grid; grid-template-columns:56px 1fr; gap:14px;
  padding:16px 0; border-bottom:1px solid var(--line-soft);
}
.press-year{ font-size:13px; color:var(--gold); font-variant-numeric:tabular-nums; padding-top:3px; }
.press-title{ display:block; font-family:var(--display); font-size:19px; line-height:1.3; }
.press-title a{ text-decoration:none; }
.press-title a:hover{ color:var(--accent); }
.press-title a::after{ content:" \2197"; font-size:.7em; color:var(--accent); }
.press-meta{ display:block; font-size:13px; color:var(--muted); margin-top:3px; }

.about-solo{ max-width:760px; }
.about-solo .about-text p{ max-width:62ch; }
.about-contact a{ color:var(--accent); text-underline-offset:3px; }

/* ---------------- Mailing list ---------------- */

.list-section{ background:var(--ink); color:var(--paper); }
.list-inner{ max-width:600px; text-align:center; }
.list-section h2{
  font-family:var(--display); font-weight:300;
  font-size:clamp(26px, 3.4vw, 38px); margin:0 0 12px;
}
.list-section p{ color:color-mix(in srgb, var(--paper) 68%, transparent); margin:0 0 30px; }

.list-form{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.list-form input{
  flex:1 1 260px; max-width:340px;
  padding:13px 16px; font-family:var(--body); font-size:15px;
  background:transparent; color:var(--paper);
  border:1px solid color-mix(in srgb, var(--paper) 32%, transparent);
  border-radius:var(--radius);
}
.list-form input::placeholder{ color:color-mix(in srgb, var(--paper) 42%, transparent); }
.list-form input:focus{ outline:1px solid var(--accent); outline-offset:2px; }
/* On the dark band the filled treatment reads correctly. */
.list-form .btn-primary{ background:var(--accent); color:var(--accent-ink); }
.list-form .btn-primary:hover{ filter:brightness(1.1); }
.form-note{ min-height:22px; margin:14px 0 0 !important; font-size:14px; color:var(--accent); }

/* ---------------- Footer ---------------- */

.site-footer{
  border-top:1px solid var(--line-soft);
  padding-block:56px; background:var(--paper);
}
.footer-inner{
  display:grid; grid-template-columns:1.4fr 1fr 1.2fr;
  gap:32px; align-items:start;
}
.footer-brand p{ color:var(--muted); font-size:14px; margin:10px 0 0; max-width:28ch; }
.footer-nav{ display:flex; flex-direction:column; gap:10px; }
.footer-nav a{ text-decoration:none; font-size:14px; color:var(--ink-soft); }
.footer-nav a:hover{ color:var(--accent); }
.footer-meta{ display:flex; flex-direction:column; gap:10px; }
.footer-meta a{ text-decoration:none; font-size:14px; color:var(--ink-soft); }
.footer-meta a:hover{ color:var(--accent); }
.copyright{ font-size:12px; color:var(--muted); margin:12px 0 0; }

/* ---------------- Portfolio grid ----------------
   Justified rows in pure CSS. Each tile's flex-basis and flex-grow
   are proportional to its aspect ratio (--r = width / height, set
   inline by tools/build.py), so every tile in a row ends up the
   same height and nothing is cropped. Reading order stays left to
   right, unlike CSS-column masonry. The ::after spacer soaks up the
   last row so it is not stretched.
   ------------------------------------------------- */

.grid{
  --row:250px;
  --g:16px;
  display:flex; flex-wrap:wrap; gap:var(--g);
}
.grid::after{ content:""; flex:999 1 0; }

.tile{
  flex:calc(var(--r) * 100) 1 calc(var(--r) * var(--row));
  max-width:100%;
  position:relative; display:block; overflow:hidden;
  background:var(--card);
  outline-offset:3px;
}
.tile img{
  width:100%; height:auto;
  aspect-ratio:var(--r);
  object-fit:cover;
  transition:transform .6s cubic-bezier(.2,.7,.2,1), filter .3s ease;
}
.js .tile img{ opacity:0; }
.js .tile img.is-loaded{ opacity:1; transition:opacity .45s ease, transform .6s cubic-bezier(.2,.7,.2,1); }

.tile-cap{
  position:absolute; left:0; right:0; bottom:0;
  padding:22px 12px 10px;
  font-family:var(--display); font-size:15px; line-height:1.3;
  color:var(--ink);
  background:linear-gradient(to top, color-mix(in srgb, var(--paper) 94%, transparent), transparent);
  opacity:0; transform:translateY(6px);
  transition:opacity .25s ease, transform .25s ease;
  pointer-events:none;
}
@media (hover:hover){
  .tile:hover img{ transform:scale(1.025); }
  .tile:hover .tile-cap, .tile:focus-visible .tile-cap{ opacity:1; transform:none; }
}

.more{ margin:clamp(32px, 4vw, 48px) 0 0; text-align:center; }

/* ---------------- Category tiles ---------------- */

.cat-grid{
  display:grid; gap:var(--gap) 24px;
  grid-template-columns:repeat(auto-fill, minmax(210px, 1fr));
}
.cat-tile{ display:flex; flex-direction:column; text-decoration:none; }
.cat-img{
  display:block; aspect-ratio:4/5; overflow:hidden;
  background:var(--card); border:1px solid var(--line-soft);
  margin-bottom:14px;
}
.cat-img img{
  width:100%; height:100%; object-fit:cover;
  transition:transform .6s cubic-bezier(.2,.7,.2,1);
}
.cat-name{
  font-family:var(--display); font-size:21px; line-height:1.25;
}
.cat-count{ font-size:13px; color:var(--muted); letter-spacing:.02em; }
@media (hover:hover){
  .cat-tile:hover .cat-img img{ transform:scale(1.03); }
  .cat-tile:hover .cat-name{ color:var(--accent); }
}

/* ---------------- Inner pages ---------------- */

.section-tight{ padding-block:clamp(28px, 4vw, 48px) clamp(64px, 9vw, 112px); }
.page-home .section-tight{ padding-top:0; }

.section-head-row{
  max-width:none; display:flex; align-items:baseline;
  justify-content:space-between; gap:20px;
}
.section-head-row h2{ margin:0; }
.link-arrow{
  font-size:14px; letter-spacing:.04em; text-decoration:none;
  color:var(--ink-soft); white-space:nowrap;
}
.link-arrow::after{ content:" \2192"; color:var(--accent); }
.link-arrow:hover{ color:var(--accent); }

.page-head{ padding-block:clamp(44px, 7vw, 88px) 0; }
.page-head h1{
  font-family:var(--display); font-weight:300;
  font-size:clamp(36px, 5vw, 56px); line-height:1.1;
  letter-spacing:-.012em; margin:0 0 8px;
}
.crumb{
  display:inline-block; margin-bottom:14px;
  font-size:13px; letter-spacing:.06em; text-decoration:none; color:var(--muted);
}
.crumb::before{ content:"\2190  "; color:var(--accent); }
.crumb:hover{ color:var(--ink); }
.page-count{ margin:0; font-size:14px; color:var(--muted); letter-spacing:.03em; }
.page-blurb{ max-width:60ch; color:var(--ink-soft); margin:18px 0 0; }

.cat-nav{
  display:flex; flex-wrap:wrap; gap:8px;
  margin-top:clamp(24px, 3vw, 34px);
}
.cat-nav a{
  font-size:13px; letter-spacing:.03em; text-decoration:none;
  color:var(--ink-soft);
  padding:7px 13px; border:1px solid var(--line); border-radius:999px;
  transition:border-color .2s ease, color .2s ease;
}
.cat-nav a span{ color:var(--muted); margin-left:2px; }
.cat-nav a:hover{ border-color:var(--ink); color:var(--ink); }
.cat-nav a[aria-current="page"]{ border-color:var(--accent); color:var(--accent); }
.cat-nav a[aria-current="page"] span{ color:inherit; opacity:.7; }

.nav a[aria-current="page"]{ color:var(--ink); }
.nav a[aria-current="page"]::after{ transform:scaleX(1); }

.hero-link{ display:block; }
.hero-link img{ width:100%; height:auto; max-height:78vh; object-fit:contain; object-position:center; }

/* ---------------- Lightbox ---------------- */

.lightbox{
  position:fixed; inset:0;
  width:100%; height:100%; max-width:none; max-height:none;
  margin:0; padding:0; border:0;
  background:var(--paper);
  color:var(--ink);
}
.lightbox:focus{ outline:none; }
.lightbox::backdrop{ background:transparent; }
.lightbox[open]{
  display:grid;
  grid-template-columns:64px 1fr 64px;
  grid-template-rows:56px 1fr auto;
  animation:lb-in .22s ease;
}
@keyframes lb-in{ from{ opacity:0; } to{ opacity:1; } }

.lb-stage{
  grid-column:2; grid-row:2;
  display:flex; align-items:center; justify-content:center;
  min-height:0; min-width:0;
}
.lb-stage img{
  max-width:100%; max-height:100%;
  width:auto; height:auto; object-fit:contain;
  box-shadow:var(--shadow);
  transition:opacity .2s ease;
}
.lb-stage img.loading{ opacity:.25; }

.lb-cap{
  grid-column:1 / -1; grid-row:3;
  display:flex; align-items:baseline; justify-content:space-between; gap:20px;
  padding:16px 24px 22px;
  max-width:1200px; width:100%; margin-inline:auto;
}
.lb-title{ font-family:var(--display); font-size:22px; line-height:1.25; margin:0; }
.lb-meta{ font-size:13px; color:var(--muted); margin:2px 0 0; letter-spacing:.02em; }
.lb-note{ font-size:14px; color:var(--ink-soft); margin:8px 0 0; max-width:60ch; }
.lb-side{ display:flex; align-items:center; gap:18px; flex-shrink:0; }
.lb-count{ font-size:12px; letter-spacing:.12em; color:var(--muted); font-variant-numeric:tabular-nums; }
.lb-enquire{ font-size:13px; color:var(--accent); text-decoration:none; letter-spacing:.03em; }
.lb-enquire:hover{ text-decoration:underline; text-underline-offset:3px; }

.lb-btn{
  background:none; border:0; cursor:pointer; color:var(--ink-soft);
  display:flex; align-items:center; justify-content:center;
  width:48px; height:48px; border-radius:50%;
  transition:color .2s ease, background .2s ease;
}
.lb-btn:hover{ color:var(--accent); background:var(--line-soft); }
.lb-btn svg{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.25; }
.lb-close{ grid-column:3; grid-row:1; justify-self:center; align-self:end; }
.lb-prev{ grid-column:1; grid-row:2; justify-self:center; align-self:center; }
.lb-next{ grid-column:3; grid-row:2; justify-self:center; align-self:center; }
.lb-single .lb-prev, .lb-single .lb-next, .lb-single .lb-count{ display:none; }

body.lb-open{ overflow:hidden; }

/* ---------------- Responsive ---------------- */

@media (max-width: 920px){
  .hero-inner{ grid-template-columns:1fr; }
  .hero-art{ order:-1; max-width:400px; }
  .product-grid{ grid-template-columns:repeat(2, 1fr); }
  .about-grid{ grid-template-columns:1fr; }
  .about-grid .ph{ max-width:340px; }
  .grid{ --row:200px; }
  .footer-inner{ grid-template-columns:1fr 1fr; }
}

@media (max-width: 680px){
  body{ font-size:16px; }
  .nav{ display:none; }
  .nav-toggle{ display:flex; }
  .gallery{ column-count:1; }
  .grid{ --row:140px; --g:8px; }
  .tile-cap{ display:none; }
  .cat-grid{ grid-template-columns:repeat(2, 1fr); gap:28px 14px; }
  .cat-name{ font-size:18px; }
  .lightbox[open]{ grid-template-columns:0 1fr 0; grid-template-rows:52px 1fr auto; }
  .lb-prev, .lb-next{ display:none; }
  .lb-close{ grid-column:2; justify-self:end; margin-right:6px; }
  .lb-cap{ flex-direction:column; gap:10px; padding:14px 16px 20px; }
  .lb-title{ font-size:19px; }
  .product-grid,
  .product-grid-2{ grid-template-columns:1fr; }
  .footer-inner{ grid-template-columns:1fr; }
}

/* Hero photo of the artist, About portrait */
.hero-inner--photo{ grid-template-columns:.9fr 1.1fr; }
.hero-photo{ display:block; width:100%; height:auto; border-radius:2px; box-shadow:0 18px 40px -24px rgba(30,25,20,.45); }
.about-photo{ margin:0; }
.about-photo img{ display:block; width:100%; height:auto; border-radius:2px; }
.about-grid{ align-items:start; }
@media (max-width: 920px){
  .hero-inner--photo{ grid-template-columns:1fr; }
  .hero-inner--photo .hero-art{ max-width:none; }
  .about-photo{ max-width:340px; }
}
