/* Chinara Chi — main stylesheet */

:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-height: 4.5rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--stone-900);
  background: var(--stone-50);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

body.lang-en .chinara-lang-az,
body.lang-az .chinara-lang-en {
  display: none !important;
}

.site-main {
  min-height: 60vh;
}

.page-inner {
  padding-top: var(--nav-height);
}

.page-home {
  padding-top: 0;
}

.container {
  width: min(80rem, 100%);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container--narrow {
  width: min(56rem, 100%);
}

.text-center {
  text-align: center;
}

/* Navigation */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(250, 250, 249, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stone-200);
}

body.admin-bar .site-nav {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-nav {
    top: 46px;
  }
}

.site-nav__inner {
  width: min(80rem, 100%);
  margin-inline: auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav__brand {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.site-nav__brand:hover {
  color: var(--stone-600);
}

.site-nav__desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

.site-nav__desktop a {
  color: var(--stone-700);
  transition: color 0.2s;
}

.site-nav__desktop a:hover {
  color: var(--stone-900);
}

.site-nav__toggle {
  font-size: 1.5rem;
  color: var(--stone-900);
}

.site-nav__toggle-close {
  display: none;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-open {
  display: none;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-close {
  display: inline;
}

.site-nav__mobile {
  border-top: 1px solid var(--stone-200);
  background: var(--stone-50);
  padding: 1rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-nav__mobile a {
  color: var(--stone-700);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-toggle__btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  color: var(--stone-500);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.lang-toggle__btn.is-active {
  color: var(--stone-900);
  border-bottom-color: var(--stone-900);
}

.lang-toggle__btn:hover {
  color: var(--stone-900);
}

.lang-toggle__sep {
  color: var(--stone-300);
}

@media (min-width: 768px) {
  .site-nav__desktop {
    display: flex;
  }

  .site-nav__toggle,
  .site-nav__mobile {
    display: none !important;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: rgba(28, 25, 23, 0.9);
  color: var(--stone-50);
}

.btn--primary:hover {
  background: #292524;
}

.btn--outline {
  border: 1px solid var(--stone-900);
  color: var(--stone-900);
}

.btn--outline:hover {
  background: var(--stone-900);
  color: var(--stone-50);
}

.btn--outline-light {
  border: 1px solid var(--stone-50);
  color: var(--stone-50);
  margin-top: 2rem;
}

.btn--outline-light:hover {
  background: var(--stone-50);
  color: var(--stone-900);
}

/* Hero scatter */
.hero-scatter {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(to bottom, var(--amber-50), var(--stone-50), var(--stone-100));
  overflow: hidden;
}

.hero-scatter__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
}

.hero-scatter__content {
  text-align: center;
  padding-inline: 1.5rem;
}

.hero-scatter__title {
  margin: 0 0 2rem;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.03em;
  color: rgba(28, 25, 23, 0.9);
  -webkit-text-stroke: 2px white;
  paint-order: stroke fill;
}

.hero-scatter__content .btn {
  pointer-events: auto;
}

.hero-scatter__desktop {
  display: none;
}

.hero-scatter__item {
  position: absolute;
  transform: rotate(var(--rotation)) scale(var(--scale));
  transition: transform 0.3s ease, z-index 0s;
  cursor: pointer;
}

.hero-scatter__item:hover {
  transform: rotate(0deg) scale(calc(var(--scale) * 1.15));
  z-index: 10 !important;
}

.hero-scatter__frame {
  width: 12rem;
  padding: 0.75rem;
  background: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  aspect-ratio: 3 / 4;
}

.hero-scatter__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scatter__mobile {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 8rem 1.5rem 8rem;
}

.hero-scatter__mobile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 42rem;
  margin-inline: auto;
}

.hero-scatter__mobile-item {
  background: #fff;
  padding: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  aspect-ratio: 3 / 4;
}

.hero-scatter__mobile-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .hero-scatter__desktop {
    display: block;
    position: absolute;
    inset: 0;
  }

  .hero-scatter__mobile {
    display: none;
  }

  .hero-scatter__frame {
    width: 16rem;
  }
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section--muted {
  background: var(--stone-100);
}

.section__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
}

.section__subtitle {
  margin: 0;
  color: var(--stone-600);
}

.section__header {
  margin-bottom: 4rem;
}

.section__quote {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--stone-700);
}

.page-hero {
  padding: 6rem 0;
  background: var(--stone-100);
}

.page-hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  letter-spacing: -0.03em;
}

.page-hero__subtitle {
  margin: 0;
  font-size: 1.25rem;
  color: var(--stone-600);
}

/* About */
.about__name {
  margin: 0 0 2rem;
  font-size: 1.875rem;
}

.about__bio p {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--stone-700);
}

/* Artwork grid */
.artwork-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.artwork-grid--featured {
  grid-template-columns: 1fr;
}

.artwork-card {
  cursor: pointer;
}

.artwork-card__image {
  aspect-ratio: 3 / 4;
  margin-bottom: 1rem;
  overflow: hidden;
  background: var(--stone-200);
}

.artwork-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.artwork-card:hover .artwork-card__image img {
  transform: scale(1.05);
}

.artwork-card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
}

@media (min-width: 640px) {
  .artwork-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .artwork-grid,
  .artwork-grid--featured {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Contact */
.contact__intro {
  margin: 0 0 3rem;
  font-size: 1.125rem;
  color: var(--stone-700);
  line-height: 1.7;
}

.contact__cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 32rem;
  margin-inline: auto;
}

.contact__card {
  padding: 2rem;
  background: var(--stone-100);
  border: 1px solid var(--stone-200);
  text-align: left;
}

.contact__label {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  color: var(--stone-600);
}

.contact__value {
  font-size: 1.25rem;
  transition: color 0.2s;
}

.contact__value:hover {
  color: var(--stone-600);
}

/* Artwork modal */
.artwork-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.artwork-modal[hidden] {
  display: none;
}

.artwork-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.95);
}

.artwork-modal__dialog {
  position: relative;
  width: min(72rem, 100%);
  z-index: 1;
}

.artwork-modal__grid {
  display: grid;
  gap: 1.5rem;
}

.artwork-modal__image {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--stone-200);
}

.artwork-modal__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artwork-modal__content {
  color: var(--stone-50);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.artwork-modal__content h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.artwork-modal__series,
.artwork-modal__medium {
  margin: 0 0 1rem;
  color: #d6d3d1;
}

.artwork-modal__year {
  margin: 0 0 1rem;
  color: #a8a29e;
}

.artwork-modal__description {
  margin: 0;
  line-height: 1.7;
  color: #e7e5e4;
}

@media (min-width: 768px) {
  .artwork-modal {
    padding: 1.5rem;
  }

  .artwork-modal__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Footer */
.site-footer {
  margin-top: 6rem;
  padding: 3rem 0;
  background: var(--stone-100);
  border-top: 1px solid var(--stone-200);
}

.site-footer__inner {
  width: min(80rem, 100%);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.site-footer__top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.site-footer__copyright {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
}

.site-footer__credit {
  margin: 0;
  font-size: 0.875rem;
  color: var(--stone-600);
}

.site-footer__credit a:hover {
  text-decoration: underline;
}

.site-footer__notice {
  margin: 0;
  max-width: 48rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--stone-500);
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 40;
  padding: 0.75rem;
  background: var(--stone-900);
  color: var(--stone-50);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, opacity 0.2s, transform 0.2s;
}

.scroll-top:hover {
  background: #44403c;
}

.scroll-top[hidden] {
  display: none;
}

.entry-content {
  color: var(--stone-700);
  line-height: 1.7;
}

.entry-content > *:first-child {
  margin-top: 0;
}
