:root {
  --bg: #2c2c2c;
  --ink: #f3f3f3;
  --silver: #c8c8c8;
  --muted: rgba(200, 200, 200, 0.62);
  --line: rgba(200, 200, 200, 0.18);
  --glass: rgba(255, 255, 255, 0.06);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Outfit", "Helvetica Neue", sans-serif;
  --display: "Syne", "Outfit", sans-serif;
  --fa: "Vazirmatn", "Outfit", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #2c2c2c;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.02em;
  overflow: hidden;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body.ready {
  overflow: hidden;
}

body[data-view="home"],
body:not([data-view="home"]) {
  --ink: #f3f3f3;
  --silver: #c8c8c8;
  --muted: rgba(200, 200, 200, 0.62);
  --line: rgba(200, 200, 200, 0.18);
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
a {
  color: inherit;
  font: inherit;
  background: none;
  border: 0;
  cursor: none;
  text-decoration: none;
}

.cursor {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  mix-blend-mode: difference;
}

.cursor__ring,
.cursor__dot {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  translate: -50% -50%;
}

.cursor__ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(199, 204, 211, 0.9);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), opacity 0.35s;
}

.cursor__dot {
  width: 4px;
  height: 4px;
  background: var(--ink);
}

body.is-hovering .cursor__ring {
  width: 64px;
  height: 64px;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 28px;
  background: #030303;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
}

.loader__mark {
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 88px);
  letter-spacing: 0.18em;
  animation: pulse 1.6s ease-in-out infinite;
}

.loader__bar {
  width: min(220px, 40vw);
  height: 1px;
  background: var(--line);
  overflow: hidden;
}

.loader__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  animation: load 1.8s var(--ease) forwards;
}

.loader__hint {
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #2c2c2c;
}

.atmosphere__stage,
.atmosphere__image {
  position: absolute;
  inset: 0;
}

.atmosphere__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  filter: grayscale(1) contrast(1.03) brightness(0.92);
}

.atmosphere__shadow,
.atmosphere__light {
  display: none;
}

.atmosphere__veil {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  transition: opacity 0.6s var(--ease);
  background: linear-gradient(90deg, rgba(20, 20, 20, 0.18), transparent 20%, transparent 80%, rgba(20, 20, 20, 0.14));
}

body:not([data-view="home"]) .atmosphere__veil {
  opacity: 0.78;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(5, 5, 5, 0.28), rgba(5, 5, 5, 0.72) 58%, rgba(5, 5, 5, 0.9)),
    linear-gradient(180deg, rgba(5, 5, 5, 0.4), transparent 28%, transparent 72%, rgba(5, 5, 5, 0.58));
}

.atmosphere__vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 90px 10px rgba(44, 44, 44, 0.35);
}

body:not([data-view="home"]) .atmosphere__vignette {
  box-shadow: inset 0 0 180px 40px rgba(0, 0, 0, 0.72);
}

.atmosphere__grain {
  position: absolute;
  inset: -8%;
  opacity: 0.1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.chrome {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 148px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.logo {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  transition: color 0.35s var(--ease);
}

.nav__item:hover,
.nav__item.is-active {
  color: var(--ink);
}

.nav__index {
  font-size: 9px;
  letter-spacing: 0.16em;
  opacity: 0.5;
}

.chrome__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

main {
  position: relative;
  z-index: 5;
  height: 100vh;
}

.view {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8vh 10vw 12vh 180px;
  overflow: hidden;
  scrollbar-width: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), visibility 0.7s;
}

.view::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.view.is-active#about,
.view.is-active#works,
.view.is-active#contact {
  overflow-y: auto;
}

.view.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.hero {
  text-align: center;
  max-width: 1100px;
}

.hero__eyebrow {
  margin-bottom: 28px;
  font-size: 11px;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title[hidden],
.hero__eyebrow[hidden],
.hero__name[hidden],
.hero__fa[hidden] {
  display: none !important;
}

.hero__title {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.18em;
  font-family: var(--display);
  font-size: clamp(34px, 7.4vw, 104px);
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
}

.hero__title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
}

.hero__title i {
  width: 0.42em;
}

body.ready .hero__title span {
  animation: rise 1s var(--ease) forwards;
}

body.ready .hero__title span:nth-child(1) { animation-delay: 0.08s; }
body.ready .hero__title span:nth-child(2) { animation-delay: 0.14s; }
body.ready .hero__title span:nth-child(3) { animation-delay: 0.2s; }
body.ready .hero__title span:nth-child(4) { animation-delay: 0.26s; }
body.ready .hero__title span:nth-child(5) { animation-delay: 0.32s; }
body.ready .hero__title span:nth-child(7) { animation-delay: 0.44s; }
body.ready .hero__title span:nth-child(8) { animation-delay: 0.5s; }
body.ready .hero__title span:nth-child(9) { animation-delay: 0.56s; }
body.ready .hero__title span:nth-child(10) { animation-delay: 0.62s; }
body.ready .hero__title span:nth-child(11) { animation-delay: 0.68s; }

.hero__identity {
  margin-top: 34px;
}

.hero__name {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 36px);
  font-style: italic;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  opacity: 0;
}

.hero__fa {
  margin-top: 12px;
  font-family: var(--fa);
  font-size: 14px;
  color: var(--muted);
  opacity: 0;
}

body.ready .hero__name,
body.ready .hero__fa {
  animation: rise 1s var(--ease) forwards;
}

body.ready .hero__name { animation-delay: 0.9s; }
body.ready .hero__fa { animation-delay: 1.05s; }

.panel {
  width: min(880px, 100%);
}

.panel--works,
.panel--about {
  width: min(1120px, 100%);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
  margin-top: 8px;
}

.about-card {
  position: sticky;
  top: 10vh;
}

.about-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  border: 1px solid rgba(210, 215, 222, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px);
}

.about-photo img {
  opacity: 0;
}

.about-photo.has-photo img {
  opacity: 1;
}

.about-photo span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 11px;
}

.about-photo.has-photo span {
  display: none;
}

.about-social {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  list-style: none;
}

.about-social li {
  display: grid;
  gap: 3px;
}

.about-social span {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-social a {
  color: var(--silver);
  border-bottom: 1px solid transparent;
  width: fit-content;
  padding-bottom: 2px;
}

.about-social a:hover {
  border-color: var(--silver);
}

.view--works {
  place-items: start center;
}

.panel__index {
  margin-bottom: 18px;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel__title {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 78px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.panel__title em {
  font-style: italic;
  color: var(--silver);
}

.about-grid {
  display: grid;
  gap: 28px;
  margin-top: 36px;
}

.about-lead {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  max-width: 28ch;
}

.about-copy {
  display: grid;
  gap: 16px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.about-copy [lang="fa"] {
  font-family: var(--fa);
  font-size: 15px;
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
  padding-top: 8px;
  list-style: none;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.about-facts span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.glass-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(210, 215, 222, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  cursor: none;
  text-align: left;
  color: inherit;
}

.glass-card__media,
.glass-card__placeholder {
  position: absolute;
  inset: 0;
}

.glass-card__media img {
  transition: transform 0.7s var(--ease), opacity 0.5s;
  opacity: 0.88;
}

.glass-card__placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
  background:
    linear-gradient(135deg, rgba(199, 204, 211, 0.08), transparent 50%),
    repeating-linear-gradient(135deg, transparent, transparent 10px, rgba(255, 255, 255, 0.02) 10px, rgba(255, 255, 255, 0.02) 11px);
}

.glass-card__meta {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: auto;
  width: min(68%, 210px);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(10, 10, 12, 0.46);
  border: 1px solid rgba(210, 215, 222, 0.16);
  backdrop-filter: blur(16px);
}

.glass-card h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.glass-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(230, 234, 238, 0.5);
}

.glass-card:hover .glass-card__media img {
  transform: scale(1.06);
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 40px;
  background: rgba(5, 5, 7, 0.78);
  backdrop-filter: blur(18px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  width: min(820px, 90vw);
  height: min(58vh, 520px);
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.lightbox h3 {
  font-family: var(--serif);
  font-size: 32px;
  text-align: center;
}

.lightbox p {
  color: var(--muted);
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 28px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--silver);
}

.panel--contact {
  text-align: left;
}

.contact-lead {
  margin: 28px 0 36px;
  max-width: 34ch;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.35;
  color: var(--silver);
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.contact-links a {
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: border-color 0.3s, color 0.3s;
}

.contact-links a:hover {
  border-color: var(--ink);
}

.floor {
  position: fixed;
  right: 36px;
  bottom: 28px;
  left: 180px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.floor__enter {
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
}

@keyframes load {
  to { width: 100%; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}


@media (max-width: 1100px) {
  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body,
  button,
  a {
    cursor: auto;
  }

  .cursor {
    display: none;
  }

  .chrome {
    width: 100%;
    height: auto;
    inset: 0 0 auto;
    flex-direction: row;
    align-items: center;
    padding: 20px 20px 0;
  }

  .nav {
    flex-direction: row;
    gap: 14px;
  }

  .nav__index,
  .chrome__meta {
    display: none;
  }

  .view {
    padding: 110px 22px 96px;
    align-items: start;
  }

  .hero__title {
    flex-wrap: wrap;
    letter-spacing: 0.12em;
    row-gap: 10px;
  }

  .about-layout,
  .about-facts,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    position: static;
    max-width: 320px;
  }

  .glass-card {
    cursor: pointer;
  }

  .floor {
    left: 20px;
    right: 20px;
  }

  .floor__center {
    display: none;
  }
}
