/* ==========================================================================
   Hassan Behrouz-Lawassany — Portfolio
   Tokens
   ========================================================================== */
:root {
  --cream:      #F6F1E7;
  --cream-deep: #EEE6D3;
  --ink:        #211D1A;
  --ink-soft:   #55503F;
  --crimson:    #7E1F2E;
  --cobalt:     #1F4E79;
  --gold:       #B8892B;
  --hairline:   #DED0AE;

  --serif:  'Fraunces', serif;
  --sans:   'Work Sans', sans-serif;
  --mono:   'IBM Plex Mono', monospace;

  --nav-h: 72px;
  --edge: clamp(24px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2 { font-family: var(--serif); font-weight: 500; margin: 0; }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}

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

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--edge);
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
  z-index: 100;
}

.nav__mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.nav__divider {
  width: 1px;
  height: 14px;
  background: var(--hairline);
  margin: 0 -0.8rem;
}

.nav__links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav__links a:hover,
.nav__links a.is-active {
  border-color: var(--crimson);
  color: var(--crimson);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}

.nav__toggle span {
  height: 1px;
  background: var(--ink);
  width: 100%;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}

.mobile-menu.is-open { transform: translateY(0); }

.mobile-menu a {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.8rem;
}

@media (max-width: 800px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}

/* ==========================================================================
   Divider (signature glyph)
   ========================================================================== */
.divider {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0;
  color: var(--gold);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: calc(var(--nav-h) + 3rem) var(--edge) 4rem;
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

.hero__name {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero__cta {
  display: inline-block;
  margin-top: 2.2rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero__cta:hover { color: var(--crimson); border-color: var(--crimson); }

.hero__art img {
  width: 100%;
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 60px -30px rgba(33, 29, 26, 0.35);
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero__art { order: -1; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  padding: 2rem var(--edge) 4rem;
  align-items: start;
}

.about__art img { border: 1px solid var(--hairline); }

.about__text h2 {
  font-size: 1.8rem;
  font-style: italic;
  margin-bottom: 1.4rem;
}

.about__text p {
  color: var(--ink-soft);
  max-width: 46ch;
}

.about__text p + p { margin-top: 1rem; }

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

/* ==========================================================================
   Exhibitions
   ========================================================================== */
.exhibitions {
  padding: 2rem var(--edge) 4rem;
  max-width: 780px;
  margin: 0 auto;
}

.exhibitions h2 {
  font-size: 1.8rem;
  font-style: italic;
  margin-bottom: 2rem;
  text-align: center;
}

.exhibitions__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.exhibitions__list li {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
}

.ex__year {
  font-family: var(--mono);
  color: var(--crimson);
  font-size: 0.9rem;
}

.ex__place {
  font-weight: 500;
  text-align: right;
}

@media (max-width: 560px) {
  .exhibitions__list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .ex__place { text-align: left; }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  padding: 2rem var(--edge) 6rem;
  text-align: center;
}

.contact h2 {
  font-size: 1.8rem;
  font-style: italic;
  margin-bottom: 0.8rem;
}

.contact p { color: var(--ink-soft); }

.contact__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}

.contact__email {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  border-bottom: 1px solid var(--ink);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact__email:hover { color: var(--crimson); border-color: var(--crimson); }

.contact__social {
  display: inline-flex;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.contact__social:hover { color: var(--crimson); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: 1.6rem var(--edge);
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-align: center;
}

.footer__disclaimer {
  max-width: 60ch;
  margin: 0 auto 0.6rem;
  line-height: 1.6;
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Gallery page
   ========================================================================== */
.gallery-page {
  padding: calc(var(--nav-h) + 3rem) var(--edge) 5rem;
}

.gallery-page__title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-style: italic;
  margin-bottom: 1.2rem;
}

.gallery-page__notice {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0 0 3rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--hairline);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
}

.gallery-item {
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.gallery-item__frame {
  overflow: hidden;
  border: 1px solid var(--hairline);
}

.gallery-item img {
  width: 100%;
  transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.035); }

.gallery-item__caption {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
}

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

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(33, 29, 26, 0.95);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: min(90vw, 900px);
  max-height: 78vh;
  width: auto;
  border: 1px solid rgba(246, 241, 231, 0.2);
}

.lightbox__caption {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.6rem 1rem;
  transition: color 0.2s ease;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { color: var(--gold); }

.lightbox__close { top: 1.4rem; right: 1.4rem; }
.lightbox__prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 0.6rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .lightbox { padding: 3rem 0.5rem; }
  .lightbox__prev, .lightbox__next { font-size: 1.5rem; padding: 0.4rem 0.6rem; }
}
