/* Vahram Galstyan — site styles. White paper, black ink; colour comes only from the work. */
:root {
  --paper: #ffffff;
  --ink: #000000;
  --grey: #686868;     /* secondary text, 5.6:1 on white */
  --rule: #e2e2e2;
  --gutter: clamp(16px, 2.6vw, 40px);
  --col-gap: clamp(16px, 2vw, 32px);
  --step--1: 14px;
  --step-0: clamp(17px, 1.25vw, 20px);
  --step-1: clamp(21px, 1.8vw, 28px);
  --step-2: clamp(30px, 3.4vw, 52px);
  --step-3: clamp(44px, 8vw, 132px);
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --hy: "Noto Sans Armenian", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.42;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.muted { color: var(--grey); }
.wrap { padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: var(--gutter); }

/* Header */
/* The header stays on screen while scrolling */
.site-head {
  display: flex; justify-content: space-between; align-items: center; gap: var(--col-gap);
  padding: 12px var(--gutter);
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: background-color .2s, border-color .2s, color .2s;
}
.site-head.scrolled { border-bottom-color: var(--rule); }
.site-head .logo { display: flex; align-items: center; gap: 12px; flex: none; white-space: nowrap; }
.site-head .logo img { height: 40px; width: auto; max-width: none; transition: filter .2s; }
.site-head .logo:hover { text-decoration: none; }
.site-nav ul { list-style: none; display: flex; gap: clamp(14px, 2vw, 32px); flex-wrap: wrap; justify-content: flex-end; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
[id] { scroll-margin-top: 120px; }
/* Home: the header floats over the photo, then turns white once the photo is scrolled past */
.over-image .site-head { position: fixed; left: 0; right: 0; background: transparent; color: var(--paper); }
.over-image .site-head .logo img { filter: invert(1); }
.over-image .site-head.solid { background: var(--paper); color: var(--ink); border-bottom-color: var(--rule); }
.over-image .site-head.solid .logo img { filter: none; }
@media (max-width: 560px) {
  .site-head { padding-block: 8px; gap: 12px; }
  .site-head { flex-wrap: wrap; }
  .site-head .logo { gap: 8px; font-size: 16px; }
  .site-head .logo img { height: 30px; }
  .site-nav { font-size: 15px; }
  .site-nav ul { gap: 4px 14px; }
}

/* Home hero: one work, edge cut at an angle like the clay column */
.hero { position: relative; height: 100svh; min-height: 520px; background: #000; color: var(--paper); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,0) 22%, rgba(0,0,0,0) 70%, rgba(0,0,0,.45)); pointer-events: none; }
.hero .cut { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(40px, 9vw, 140px); background: var(--paper); clip-path: polygon(0 100%, 100% 0, 100% 100%); z-index: 1; }
.hero figcaption { position: absolute; left: var(--gutter); bottom: calc(var(--gutter) + clamp(20px, 3vw, 48px)); z-index: 2; font-size: var(--step--1); }
.hero figcaption a { color: var(--paper); }

/* Intro line under hero */
.intro { padding: clamp(48px, 8vw, 120px) var(--gutter) clamp(40px, 6vw, 96px); max-width: 44ch; font-size: var(--step-1); line-height: 1.25; }

/* Index of works: a typographic list */
.index { border-top: 1px solid var(--ink); margin-inline: var(--gutter); }
.index li { list-style: none; border-bottom: 1px solid var(--rule); }
.index a {
  display: grid; grid-template-columns: 5.5em 1fr minmax(0, 0.9fr); gap: var(--col-gap);
  align-items: baseline; padding-block: clamp(12px, 1.4vw, 20px);
}
.index a:hover { text-decoration: none; }
.index a:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
.index .t { font-size: var(--step-2); line-height: 1.02; letter-spacing: -0.03em; }
.index .y, .index .m { font-size: var(--step--1); color: var(--grey); }
.peek { position: fixed; width: min(28vw, 420px); pointer-events: none; z-index: 5; opacity: 0; transition: opacity .15s; }
.peek.on { opacity: 1; }
@media (max-width: 720px) {
  .index a { grid-template-columns: 1fr; gap: 2px; }
  .index .y { order: -1; }
}

/* Section heads */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--col-gap); padding: clamp(56px, 8vw, 128px) var(--gutter) 16px; }
.section-head h2 { font-weight: 400; font-size: var(--step-0); }

/* Works grid */
.page-title { padding: clamp(40px, 7vw, 112px) var(--gutter) clamp(24px, 3vw, 48px); font-weight: 400; font-size: var(--step-3); line-height: .92; letter-spacing: -0.045em; }
.filters { display: flex; gap: 8px 20px; flex-wrap: wrap; padding: 0 var(--gutter) clamp(24px, 3vw, 40px); }
.filters button { font: inherit; background: none; border: 0; color: var(--grey); cursor: pointer; padding: 4px 0; }
.filters button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(40px, 5vw, 80px) var(--col-gap); padding: 0 var(--gutter); }
.grid .card { grid-column: span 6; }
.grid .card:nth-child(4n+1) { grid-column: 1 / span 7; }
.grid .card:nth-child(4n+2) { grid-column: 9 / span 4; align-self: end; }
.grid .card:nth-child(4n+3) { grid-column: 2 / span 5; }
.grid .card:nth-child(4n+4) { grid-column: 8 / span 5; margin-top: clamp(40px, 10vw, 160px); }
.card[hidden] { display: none; }
.card .ph { overflow: hidden; background: #f2f2f2; }
/* Cards share one frame, but the photo is fitted inside it whole, never cropped */
.card .ph { background: #f3f3f3; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.card:nth-child(4n+2) img { aspect-ratio: 4 / 5; }
.card p { margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; font-size: var(--step--1); }
.card p b { font-weight: 400; color: var(--ink); font-size: var(--step-0); }
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .grid .card, .grid .card:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .card:nth-child(4n+2) img { aspect-ratio: 4 / 3; }
}

/* Sculpture */
.banner { padding: 0 var(--gutter); }
.banner img { width: 100%; height: auto; }
.beasts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 64px) var(--col-gap); padding: 0 var(--gutter); }
.beasts .beast:first-child { grid-column: span 2; grid-row: span 2; }
.beast img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.beast figcaption { margin-top: 6px; font-size: var(--step-0); }
@media (max-width: 720px) { .beasts { grid-template-columns: 1fr 1fr; } .beasts .beast:first-child { grid-column: 1 / -1; grid-row: auto; } }
.grid.three .card, .grid.three .card:nth-child(n) { grid-column: span 4; margin-top: 0; align-self: start; }
.grid.three .card img, .grid.three .card:nth-child(n) img { aspect-ratio: 4 / 3; }
@media (max-width: 720px) { .grid.three .card:nth-child(n) { grid-column: 1 / -1; } }

/* Project page */
.p-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); padding: clamp(32px, 6vw, 96px) var(--gutter) clamp(32px, 4vw, 64px); }
.p-head h1 { grid-column: 1 / -1; font-weight: 400; font-size: var(--step-3); line-height: .92; letter-spacing: -0.045em; }
.p-head .hy-title { grid-column: 1 / -1; font-size: var(--step-1); margin-top: -0.2em; }
.p-lead { grid-column: 1 / -1; }
/* Never crop the work: the whole photograph is shown, scaled to fit the screen */
.p-lead { display: flex; justify-content: center; padding: 0 var(--gutter); }
.p-lead img { width: auto; max-width: 100%; height: auto; max-height: 86svh; object-fit: contain; }
.p-body { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); padding: clamp(40px, 6vw, 96px) var(--gutter); }
.facts { grid-column: 1 / span 4; font-size: var(--step--1); }
.facts dl { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px 12px; border-top: 1px solid var(--ink); padding-top: 12px; }
.facts dt { color: var(--grey); }
.text { grid-column: 6 / span 6; max-width: 62ch; }
.text p + p { margin-top: 1em; }
.text blockquote { margin-top: 2em; font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.02em; }
.text blockquote footer { margin-top: 10px; font-size: var(--step--1); color: var(--grey); letter-spacing: 0; }
.text .links { margin-top: 1.6em; font-size: var(--step--1); }
.text .links li { list-style: none; margin-top: 4px; }
.text .links a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
@media (max-width: 860px) {
  .facts, .text { grid-column: 1 / -1; }
  .facts { order: 2; }
}
.plates { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); padding: 0 var(--gutter); row-gap: clamp(24px, 4vw, 64px); }
.plates figure { grid-column: 1 / -1; }
.plates figure.half-l { grid-column: 1 / span 6; }
.plates figure.half-r { grid-column: 7 / span 6; }
.plates figure.narrow { grid-column: 4 / span 6; }
.plates figure.right { grid-column: 6 / span 7; }
.plates figure.left { grid-column: 1 / span 7; }
@media (max-width: 720px) { .plates figure[class] { grid-column: 1 / -1; } }
.plates img { width: 100%; }
.credit { padding: 16px var(--gutter) 0; font-size: var(--step--1); color: var(--grey); }

.next { display: flex; justify-content: space-between; gap: var(--col-gap); padding: clamp(64px, 10vw, 160px) var(--gutter) 0; }
.next a { font-size: var(--step-2); letter-spacing: -0.03em; line-height: 1; }
.next small { display: block; font-size: var(--step--1); color: var(--grey); margin-bottom: 8px; letter-spacing: 0; }

/* Video: thumbnail first, the YouTube player loads only on click */
.video { position: relative; background: #000; aspect-ratio: 4 / 3; }
.video.wide { aspect-ratio: 16 / 9; }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; }
.video button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.video .play { position: absolute; left: 16px; bottom: 14px; color: #fff; font-size: var(--step--1); display: flex; align-items: center; gap: 10px; }
.video .play::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Films page */
.films { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(32px, 4vw, 64px) var(--col-gap); padding: 0 var(--gutter); }
.films figure { grid-column: span 6; }
.films figcaption { margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; font-size: var(--step--1); color: var(--grey); }
.films figcaption b { font-weight: 400; color: var(--ink); font-size: var(--step-0); }
@media (max-width: 720px) { .films figure { grid-column: 1 / -1; } }

/* Lists: CV, documentaries, archive */
.list { margin-inline: var(--gutter); border-top: 1px solid var(--ink); }
.list li { list-style: none; display: grid; grid-template-columns: 5.5em 1fr; gap: var(--col-gap); padding-block: 10px; border-bottom: 1px solid var(--rule); }
.list .y { color: var(--grey); font-size: var(--step--1); padding-top: .25em; }
.list .muted { font-size: var(--step--1); }

/* About */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); padding: 0 var(--gutter); }
.about .portrait { grid-column: 1 / span 4; }
.about .portrait figcaption { margin-top: 8px; font-size: var(--step--1); color: var(--grey); }
.about .bio { grid-column: 6 / span 6; max-width: 62ch; }
.about .bio p + p { margin-top: 1em; }
.about .bio .lead { font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.02em; }
@media (max-width: 860px) { .about .portrait, .about .bio { grid-column: 1 / -1; } .about .portrait { max-width: 420px; } }
.cv { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); padding: 0 var(--gutter); }
.cv section { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; padding-top: clamp(40px, 5vw, 72px); }
.cv h3 { grid-column: 1 / span 3; font-weight: 400; font-size: var(--step-0); }
.cv ul { grid-column: 4 / -1; border-top: 1px solid var(--ink); }
.cv li { list-style: none; display: grid; grid-template-columns: 5.5em 1fr; gap: var(--col-gap); padding-block: 9px; border-bottom: 1px solid var(--rule); font-size: 16px; }
.cv li .y { color: var(--grey); }
.cv li.plain { grid-template-columns: 1fr; }
@media (max-width: 860px) { .cv h3, .cv ul { grid-column: 1 / -1; } }

/* Archive */
.archive { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); padding: 0 var(--gutter); }
.archive article { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; padding-block: clamp(28px, 4vw, 56px); border-top: 1px solid var(--rule); }
.archive article:first-child { border-top-color: var(--ink); }
.archive .y { grid-column: 1 / span 2; color: var(--grey); font-size: var(--step--1); padding-top: .4em; }
.archive .txt { grid-column: 3 / span 5; max-width: 52ch; }
.archive h2 { font-weight: 400; font-size: var(--step-1); line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 8px; }
.archive .txt p { font-size: 16px; }
.archive .txt p.muted { margin-bottom: 10px; }
.archive .imgs { grid-column: 8 / -1; display: grid; gap: 12px; }
@media (max-width: 860px) { .archive .y, .archive .txt, .archive .imgs { grid-column: 1 / -1; } }

/* Contact + footer */
.contact { padding: clamp(64px, 10vw, 160px) var(--gutter) 0; }
.contact .big { font-size: var(--step-2); letter-spacing: -0.03em; line-height: 1.05; overflow-wrap: anywhere; }
.contact .big a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
.site-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px var(--col-gap); padding: clamp(80px, 12vw, 200px) var(--gutter) var(--gutter); font-size: var(--step--1); color: var(--grey); }
.site-foot a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
