/* yasy bachurina — portfolio
   ultra-minimal gallery-white. one typeface, one weight family, no decoration. */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
  --ink: #1a1a1a;
  --paper: #ffffff;
  --muted: #7a7a7a;
  --rule: #ececec;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1600px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, opacity 120ms ease;
}

a:hover {
  border-bottom-color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ─────────────────────────────────────────────  nav  ───────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px var(--gutter) 18px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}

.nav__brand {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: none;
}
.nav__brand:hover { border-bottom: none; opacity: 0.55; }

.nav__menu {
  display: flex;
  align-items: baseline;
  gap: 28px;
  font-size: 15px;
}

.nav__menu a { border-bottom: none; }
.nav__menu a:hover { opacity: 0.55; }
.nav__menu a.is-current { font-style: italic; }

.nav__works {
  position: relative;
}
.nav__works-toggle {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
}
.nav__works-toggle::after {
  content: " ↓";
  font-size: 0.85em;
  opacity: 0.55;
}
.nav__works:hover .nav__works-toggle::after,
.nav__works-toggle[aria-expanded="true"]::after {
  content: " ↑";
}

.nav__works-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 14px;
  padding: 18px 22px;
  background: var(--paper);
  display: none;
  flex-direction: column;
  gap: 8px;
  white-space: nowrap;
  min-width: 220px;
}
.nav__works:hover .nav__works-menu,
.nav__works.is-open .nav__works-menu {
  display: flex;
}
.nav__works-menu a {
  font-size: 14px;
  padding: 2px 0;
}
.nav__works-menu a:hover { opacity: 0.55; }

.nav__burger {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 720px) {
  .nav__menu {
    display: none;
    position: fixed;
    inset: 56px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 28px var(--gutter);
    font-size: 22px;
  }
  .nav.is-open .nav__menu { display: flex; }
  .nav__burger { display: block; }
  .nav__works-menu {
    position: static;
    display: flex;
    margin-top: 4px;
    padding: 6px 0 0 14px;
    font-size: 16px;
    gap: 4px;
  }
  .nav__works-toggle::after { content: ""; }
}

/* ─────────────────────────────────────────────  layout shells  ─────────────────── */

.page {
  padding-top: 78px;
  padding-bottom: 120px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.wrap--narrow { max-width: 820px; }
.wrap--reading { max-width: 680px; }

/* ─────────────────────────────────────────────  typography  ────────────────────── */

h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -0.01em; }

.t-display {
  font-size: clamp(36px, 7vw, 92px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
}

.t-title {
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.t-caption {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}

.t-meta {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

.italic { font-style: italic; }

/* ─────────────────────────────────────────────  home  ──────────────────────────── */

.home {
  padding-top: 96px;
}

.home__name {
  padding: 0 var(--gutter);
  margin-bottom: clamp(28px, 4vw, 56px);
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.home__hero {
  width: 100%;
  margin: 0;
}
.home__hero img {
  width: 100%;
  height: auto;
  display: block;
}

.home__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px var(--gutter) 0;
  max-width: var(--max);
  margin: 0 auto;
  font-size: 13.5px;
  color: var(--muted);
}

/* ─────────────────────────────────────────────  project  ───────────────────────── */

.project-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.project-header .t-title { margin-bottom: 6px; }
.project-header .t-meta { max-width: 60ch; }

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(60px, 8vw, 100px);
}

.stack figure {
  margin: 0;
}

.stack figcaption {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.stack img {
  width: 100%;
}

.stack--wide img { width: 100%; }

/* image width modifiers */
.fig-wide  { max-width: 100%; }
.fig-large { max-width: 88%; }
.fig-mid   { max-width: 72%; }
.fig-small { max-width: 54%; }

.fig-right { margin-left: auto; }
.fig-center { margin-left: auto; margin-right: auto; }

/* ─────────────────────────────────────────────  selected works  ────────────────── */

.works {
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 10vw, 140px);
}

.work {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.work img { width: 100%; }

.work__title {
  font-style: italic;
  font-size: 15px;
}

/* asymmetric placement: alternating */
.work:nth-child(2n+1) figure { max-width: 78%; margin-left: 0; }
.work:nth-child(2n)   figure { max-width: 78%; margin-left: auto; }
.work:nth-child(3n)   figure { max-width: 64%; margin-left: 12%; }

/* ─────────────────────────────────────────────  archive grid  ──────────────────── */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px) clamp(24px, 4vw, 48px);
}

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.tile figure { margin: 0; }
.tile img { width: 100%; }
.tile figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.subhead {
  margin: clamp(80px, 10vw, 140px) 0 clamp(28px, 4vw, 48px);
  font-style: italic;
  font-size: 16px;
}

/* ─────────────────────────────────────────────  about  ─────────────────────────── */

.about {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.about__portrait img { width: 100%; }

.about__text p {
  margin: 0 0 1.2em;
  font-size: 16px;
  line-height: 1.65;
  max-width: 56ch;
}

@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .about__portrait img { max-width: 70%; }
}

/* ─────────────────────────────────────────────  cv  ────────────────────────────── */

.cv {
  display: grid;
  gap: clamp(34px, 4vw, 52px);
  max-width: 760px;
}

.cv section h2 {
  font-size: 13.5px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 400;
}

.cv__row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 6px 0;
  font-size: 15px;
  line-height: 1.5;
}

.cv__row + .cv__row { border-top: 1px solid var(--rule); }

.cv__year {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cv__detail { color: var(--ink); }
.cv__detail .meta { color: var(--muted); display: block; margin-top: 2px; font-size: 13.5px; }

/* ─────────────────────────────────────────────  contact  ───────────────────────── */

.contact {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px var(--gutter);
}

.contact__inner {
  display: grid;
  gap: 22px;
}

.contact__label {
  font-style: italic;
  color: var(--muted);
}

.contact a {
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.01em;
}

/* ─────────────────────────────────────────────  fade-in  ───────────────────────── */

.fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.fade.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .fade { opacity: 1; transform: none; transition: none; }
}

/* page-load fade */
body { animation: pagefade 0.45s ease both; }
@keyframes pagefade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
