/* Asal Raximova — portfolio */

:root {
  --paper: #f2f1ec;
  --stone: #e5e3dc;
  --ink: #17201c;
  --ink-2: #4a524e;
  --accent: #b8232f;
  --accent-press: #9c1b26;
  --green: #1f3a2e;
  --green-2: #284a3b;
  --tile: #0f5e66;
  --tile-2: #13707a;
  --on-dark: #f2f1ec;
  --on-dark-2: #cfd6d2;

  --display: "Fraunces", Georgia, serif;
  --text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --s-hero: clamp(60px, 15vw, 236px);
  --s-h2: clamp(38px, 5.4vw, 84px);
  --s-statement: clamp(22px, 2.15vw, 32px);
  --s-body: clamp(16px, 1.25vw, 18px);
  --s-small: 15px;

  --m: clamp(16px, 2.3vw, 32px);
  --gap: clamp(16px, 1.8vw, 28px);
  --section: clamp(96px, 12vw, 192px);
  --bar-h: 64px;

  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--bar-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--s-body)/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -0.03em; line-height: .95; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.field-green :focus-visible, .field-tile :focus-visible { outline-color: var(--on-dark); }

.skip { position: absolute; left: var(--m); top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 50; }
.skip:focus { top: 8px; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--accent); color: #fff;
  font-weight: 600; text-decoration: none; border: 0; border-radius: 0;
  transition: background-color .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--accent-press); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-small { min-height: 42px; padding: 0 18px; }
.link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; transition: text-underline-offset .2s; }
.link:hover { text-underline-offset: 8px; }

/* Bar */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  height: var(--bar-h); padding: 0 var(--m);
  background: var(--paper);
}
.wordmark { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; }
.bar nav ul { display: flex; gap: 28px; }
.bar nav a { text-decoration: none; font-weight: 500; position: relative; }
.bar nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.bar nav a:hover::after, .bar nav a:focus-visible::after { transform: scaleX(1); }

/* Shared grid */
.hero, .about, .work-head, .pears-head, .school, .music, .community, .honours, .contact {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  padding-inline: var(--m);
}
section { padding-block: var(--section) 0; }
figcaption { margin-top: 12px; font-size: var(--s-small); color: var(--ink-2); line-height: 1.45; }
figcaption .t { color: var(--ink); font-weight: 600; margin-right: 6px; }
.art-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }
.art-open img { width: 100%; transition: transform .7s var(--ease); }
.art-open:hover img { transform: scale(1.035); }

/* Hero */
.hero { padding-top: 24px; min-height: calc(100svh - var(--bar-h)); align-items: end; }
.hero-text { grid-column: 1 / 8; padding-bottom: clamp(24px, 4vw, 64px); }
.hero h1 { font-size: var(--s-hero); font-weight: 500; letter-spacing: -0.045em; line-height: .86; margin-left: -0.04em; }
.hero h1 span { display: block; }
.hero-lede { margin-top: 44px; font-size: clamp(18px, 1.55vw, 23px); line-height: 1.45; max-width: 34em; }
.hero-words { margin-top: 28px; font-family: var(--display); font-size: var(--s-statement); line-height: 1.15; letter-spacing: -0.015em; color: var(--accent); }
.hero-actions { margin-top: 36px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero-art { grid-column: 8 / 13; align-self: stretch; display: flex; flex-direction: column; }
.hero-art .art-open { flex: 1; min-height: 0; }
.hero-art img { height: 100%; object-fit: cover; animation: settle 1.8s var(--ease) both; }
@keyframes settle { from { transform: scale(1.08); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.hero-art .art-open:hover img { transform: scale(1.02); }

/* About */
.about { align-items: start; }
.about-text { grid-column: 1 / 7; }
.about h2 { font-size: var(--s-h2); }
.statement { margin-top: 40px; font-family: var(--display); font-size: var(--s-statement); line-height: 1.28; letter-spacing: -0.012em; max-width: 24em; }
.about-body { margin-top: 28px; max-width: 34em; }
.facts { margin: 56px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px var(--gap); }
.facts dt { font-size: var(--s-small); color: var(--ink-2); }
.facts dd { margin: 4px 0 0; }
.about-photo { grid-column: 8 / 13; margin-top: 8px; }
.about-photo img { width: 100%; aspect-ratio: 1024 / 915; object-fit: cover; }

/* Work */
.work-head { align-items: end; }
.work-head h2 { grid-column: 1 / 8; font-size: var(--s-h2); }
.work-head p { grid-column: 8 / 13; max-width: 30em; }
.finder { margin: 48px var(--m) 0; display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap; }
.finder[hidden] { display: none; }
.finder-label { font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px 0 8px;
  background: var(--stone); border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 500;
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.sw:hover { background: #d9d6cd; }
.sw:active { transform: scale(.96); }
.sw[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.dot { width: 28px; height: 28px; border-radius: 50%; background: var(--c); flex: none; transition: transform .3s var(--ease); }
.sw[aria-pressed="true"] .dot { transform: scale(.82); }
.dot-all { background: var(--ink); }
.sw[aria-pressed="true"] .dot-all { background: var(--paper); }
.finder-count { color: var(--ink-2); margin-left: auto; font-variant-numeric: tabular-nums; }

.hang { margin-top: 40px; padding-inline: var(--m); columns: 3; column-gap: var(--gap); }
.piece { break-inside: avoid; margin-bottom: clamp(28px, 3vw, 48px); }
.piece[hidden] { display: none; }
.piece.enter { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.finder-empty { padding-inline: var(--m); }

/* Pears */
.pears-head { align-items: end; }
.pears-head h2 { grid-column: 1 / 7; font-size: var(--s-h2); }
.pears-head p { grid-column: 7 / 13; max-width: 32em; }
.pear-row { margin-top: 48px; padding-inline: var(--m); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); align-items: end; }
.pear-row li:nth-child(odd) .pear { aspect-ratio: 4 / 5; }
.pear { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: var(--stone); overflow: hidden; cursor: zoom-in; }
.pear img { width: 100%; height: 100%; object-fit: cover; object-position: var(--x) var(--y); transform: scale(var(--z)); transform-origin: var(--x) var(--y); transition: transform .8s var(--ease); }
.pear:hover img { transform: scale(calc(var(--z) * 1.08)); }
.pear-row span { display: block; margin-top: 12px; font-size: var(--s-small); color: var(--ink-2); }

/* Coloured fields */
.field-green, .field-tile { color: var(--on-dark); padding-block: clamp(80px, 9vw, 136px); margin-top: var(--section); }
.field-green { background: var(--green); }
.field-tile { background: var(--tile); margin-top: 0; }
.field-green figcaption, .field-tile figcaption { color: var(--on-dark-2); }

.grades { margin-top: 36px; display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.grades li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 16px; background: var(--green-2); }
.field-tile .grades li { background: var(--tile-2); }
.grades b { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1; }

/* Art school */
.school { align-items: center; }
.school-doc { grid-column: 1 / 8; }
.school-text { grid-column: 9 / 13; }
.school h2 { font-size: var(--s-h2); }
.school-text > p { margin-top: 28px; }

/* Music */
.music { align-items: start; }
.music-text { grid-column: 1 / 8; }
.music h2 { font-size: var(--s-h2); }
.music-text > p { margin-top: 28px; max-width: 36em; }
.music-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
.results { margin-top: 36px; display: grid; gap: 24px; }
.results b { display: block; font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 4px; }
.music-dutar { grid-column: 9 / 13; }
.music-dutar img { width: 100%; aspect-ratio: 3 / 4.6; object-fit: cover; object-position: 50% 40%; }

/* Community */
.community { align-items: start; }
.community-text { grid-column: 1 / 6; }
.community h2 { font-size: var(--s-h2); }
.recognitions { margin-top: 44px; display: grid; gap: 20px; }
.recognitions b { display: block; font-weight: 600; }
.recognitions li { color: var(--ink-2); }
.recognitions li b { color: var(--ink); }
.community-docs { grid-column: 7 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: 32px var(--gap); }
.cd-side img { aspect-ratio: 3 / 4; object-fit: cover; }

/* Honours */
.honours { align-items: start; }
.honours-list { grid-column: 1 / 8; }
.honours h2 { font-size: var(--s-h2); }
.honours-list > p { margin-top: 24px; max-width: 32em; }
.docs { margin-top: 40px; display: grid; gap: 4px; }
.doc {
  display: grid; grid-template-columns: 96px 1fr; column-gap: 20px; width: 100%;
  padding: 16px 16px; text-align: left; border: 0; background: var(--stone); cursor: zoom-in;
  transition: background-color .2s, transform .2s var(--ease);
}
.doc:hover, .doc.is-on { background: #d9d6cd; }
.doc:active { transform: scale(.99); }
.doc .d { grid-row: span 2; font-weight: 600; font-variant-numeric: tabular-nums; }
.doc .n { font-weight: 600; }
.doc .i { color: var(--ink-2); font-size: var(--s-small); margin-top: 2px; }
.honours-preview { grid-column: 9 / 13; position: sticky; top: calc(var(--bar-h) + 24px); margin-top: 8px; }
.honours-preview img { width: 100%; max-height: calc(100svh - var(--bar-h) - 64px); object-fit: contain; object-position: top; transition: opacity .25s; }
.honours-preview img.swap { opacity: 0; }

/* Contact */
.contact { align-items: end; }
.contact-text { grid-column: 1 / 7; }
.contact h2 { font-size: var(--s-h2); }
.contact-text > p { margin-top: 28px; max-width: 30em; }
.contact-mail { display: inline-block; margin-top: 40px; font-family: var(--display); font-size: clamp(24px, 3.1vw, 46px); letter-spacing: -0.02em; line-height: 1.1; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; overflow-wrap: anywhere; transition: color .2s; }
.contact-mail:hover { color: var(--accent); }
.contact-list { margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 20px 48px; }
.contact-list dt { font-size: var(--s-small); color: var(--ink-2); }
.contact-list dd { margin: 4px 0 0; font-weight: 500; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-text .btn { margin-top: 40px; }
.contact-art { grid-column: 7 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
.contact-art figure:last-child { margin-top: 64px; }
.contact-art img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 70%; }

/* Footer */
.foot { margin-top: var(--section); padding: 0 var(--m) 32px; background: var(--ink); color: var(--paper); overflow: hidden; }
.foot-name { font-family: var(--display); font-weight: 500; font-size: 18.2vw; letter-spacing: -0.05em; line-height: .8; white-space: nowrap; padding-top: .18em; margin-left: -0.04em; }
.foot-row { margin-top: 48px; display: grid; grid-template-columns: 1fr 2fr auto; gap: 24px var(--gap); font-size: var(--s-small); color: var(--on-dark-2); align-items: end; }
.foot-row .link { color: var(--paper); }
.foot :focus-visible { outline-color: var(--paper); }

/* Viewer */
.viewer { width: min(1200px, 100vw - 2 * var(--m)); max-width: none; max-height: calc(100svh - 32px); padding: 0; border: 0; background: var(--ink); color: var(--paper); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
html:has(.viewer[open]) { overflow: hidden; }
.viewer::backdrop { background: rgba(12, 16, 14, .9); }
.viewer[open] { animation: open .35s var(--ease); }
@keyframes open { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.viewer-inner { display: flex; flex-direction: column; }
.viewer img { width: 100%; height: calc(100svh - 140px); object-fit: contain; background: #0f1412; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; flex-wrap: wrap; }
.viewer-bar p { font-weight: 600; }
.viewer-bar p span { font-weight: 400; color: var(--on-dark-2); margin-left: 8px; }
.viewer-nav { display: flex; gap: 8px; }
.viewer-nav button { min-height: 44px; padding: 0 16px; background: #2a332f; border: 0; cursor: pointer; transition: background-color .2s, transform .2s; }
.viewer-nav button:hover { background: #3a4540; }
.viewer-nav button:active { transform: scale(.96); }
.viewer :focus-visible { outline-color: var(--paper); }

/* Reveal: content stays visible without script */
html.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
html.js [data-reveal].in { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 1080px) {
  .bar nav ul { gap: 20px; }
  .hero { min-height: 0; }
  .hero-text { grid-column: 1 / 13; }
  .hero-art { grid-column: 1 / 13; margin-top: 40px; }
  .hero-art img { height: auto; aspect-ratio: 4 / 5; max-height: 80svh; }
  .about-text, .about-photo { grid-column: 1 / 13; }
  .about-photo { margin-top: 56px; }
  .work-head h2, .work-head p, .pears-head h2, .pears-head p { grid-column: 1 / 13; }
  .work-head p, .pears-head p { margin-top: 24px; }
  .hang { columns: 2; }
  .pear-row { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 32px; }
  .pear-row li { grid-column: span 2; }
  .pear-row li:nth-child(n+4) { grid-column: span 3; }
  .pear-row li:nth-child(n+4) .pear { aspect-ratio: 3 / 2; }
  .school-doc, .school-text { grid-column: 1 / 13; }
  .school-text { margin-top: 48px; }
  .music-text { grid-column: 1 / 13; }
  .music-dutar { grid-column: 3 / 11; margin-top: 56px; }
  .community-text, .community-docs { grid-column: 1 / 13; }
  .community-docs { margin-top: 48px; }
  .honours-list { grid-column: 1 / 13; }
  .honours-preview { display: none; }
  .contact-text, .contact-art { grid-column: 1 / 13; }
  .contact-art { margin-top: 56px; }
}

/* Phone */
@media (max-width: 640px) {
  :root { --bar-h: 56px; }
  .bar { gap: 16px; }
  .bar nav { display: none; }
  .wordmark { font-size: 20px; }
  .hero h1 { font-size: clamp(56px, 17.5vw, 96px); }
  .hero-lede { margin-top: 32px; }
  .hero-words { font-size: 22px; }
  .facts { grid-template-columns: 1fr; gap: 20px; }
  .finder { gap: 16px; }
  .finder-count { margin-left: 0; }
  .sw { padding-right: 14px; }
  .hang { columns: 2; column-gap: 12px; }
  .piece { margin-bottom: 24px; }
  .piece figcaption { font-size: 14px; }
  .piece figcaption .t { display: block; margin: 0 0 2px; }
  .pear-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; row-gap: 20px; }
  .pear-row li, .pear-row li:nth-child(n+4) { grid-column: span 1; }
  .pear-row li .pear, .pear-row li:nth-child(n+4) .pear { aspect-ratio: 1; }
  .pear-row li:last-child { grid-column: 1 / 3; }
  .pear-row li:last-child .pear { aspect-ratio: 2 / 1; }
  .music-cols { grid-template-columns: 1fr; }
  .results { margin-top: 40px; }
  .music-dutar { grid-column: 1 / 13; }
  .music-dutar img { aspect-ratio: 4 / 5; }
  .community-docs { grid-template-columns: 1fr 1fr; gap: 12px; }
  .doc { grid-template-columns: 1fr; padding: 14px; }
  .doc .d { grid-row: auto; color: var(--accent); font-size: var(--s-small); }
  .contact-list { grid-template-columns: 1fr; gap: 16px; }
  .contact-text .btn { width: 100%; }
  .contact-art { gap: 12px; }
  .contact-art figure:last-child { margin-top: 32px; }
  .foot-name { font-size: 15vw; }
  .foot-row { grid-template-columns: 1fr; }
  .viewer img { height: calc(100svh - 190px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html.js [data-reveal] { transform: none; }
}
