/* Design tokens — Editorial Darkroom */
:root {
  --color-bg: #0a0a0a;
  --color-fg: #f2ebdd;
  --color-fg-dim: rgba(242, 235, 221, 0.55);
  --color-rule: rgba(242, 235, 221, 0.18);
  --font-display: "Newsreader", "DM Sans", serif;
  --font-sans: "Hanken Grotesk", "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* Global reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.005em;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-fg);
  text-decoration: none;
  transition: opacity .25s ease;
}
a:hover { opacity: .55; }
img { max-width: 100%; height: auto; display: block; }

/* Hide opt-in chrome that was used in the index demo */
.project__index { display: none; }
.project__meta { display: none; }

/* Nav — mono small-caps, restrained */
.nav {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.nav li {
  display: inline-block;
  margin-right: 4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-fg);
}
.nav li:last-child { margin-right: 0; }
.nav li a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-fg);
}

/* Utility */
.italic { font-style: italic; }

/* Footer shared — quiet typographic stack */
.footer-block {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
}
.footer-block .italic {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-fg-dim);
}
.footer-block > div { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-block > div:first-child { display: block; }
.footer-block > div:last-child {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-fg-dim);
}
.footer-block .footer-email { letter-spacing: -0.005em; }

.site-footer { padding: 3rem 1rem 2rem; }

/* =================== HOME =================== */
.page--home {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  padding: 2rem 1rem;
}
.home-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.home-bg__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 3s ease;
}
.home-bg__slide.is-active { opacity: 1; }
.home-top, .home-center, .home-bottom {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.home-center { flex: 1; }
.home-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--color-fg);
  margin: 0;
  text-align: center;
  max-width: 28ch;
  font-variation-settings: "opsz" 30;
}
.home-bottom { padding-bottom: 0; }

/* =================== ABOUT =================== */
.page--about {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  gap: 3rem;
}
.about-body {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(auto, 620px);
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
  width: 100%;
  justify-content: center;
}
.about-side { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.about-portrait {
  width: 100%;
  max-width: 454px;
  height: auto;
}
.about-contact a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.about-main { padding-top: 0; }
.about-heading {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 1.5rem 0;
  font-variation-settings: "opsz" 30;
}
.about-main p {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -0.005em;
  margin: 0 0 1.2rem 0;
  max-width: 62ch;
}
.t-about a { text-decoration: underline !important; text-underline-offset: 3px; }

/* =================== PROJECTS =================== */
.page--projects {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 0 0;
  gap: 3rem;
}
.projects-top { max-width: 1366px; margin: 0 auto; width: 100%; padding: 0 1rem; }
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 6rem;
  max-width: 1366px;
  margin: 0 auto;
  width: 100%;
  padding: 1rem 0 4rem;
}
.project { width: 100%; }
.project__stage { position: relative; width: 100%; margin: 0 auto; }
.project__img { display: block; height: auto; }

/* Universal editorial typography (applies to all project blocks) */
.project__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--color-fg);
  margin: 0;
  font-variation-settings: "opsz" 36;
}
.project__meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-fg-dim);
}
.project__desc {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--color-fg);
  margin: 0;
}
.project__desc::before {
  content: "About —";
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-fg-dim);
  margin-bottom: 0.9rem;
}
.project__link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-fg);
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: opacity .25s ease;
}
.project__link:hover { opacity: .55; }

.project__video { aspect-ratio: 16 / 9; background: #000; }
.project__video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* When .project__meta is present, opt back in */
.project__stage > .project__meta { display: block; }

/* --- Per-project chaotic desktop layouts --- */
/* p1 — B#ffffff */
.project--p1 .project__stage { min-height: 920px; }
.project--p1 .project__img--1 { position: absolute; top: 0; left: 7rem; width: 54%; z-index: 2; }
.project--p1 .project__img--2 { position: absolute; top: 110px; right: 7rem; width: 50%; z-index: 1; }
.project--p1 .project__video { position: absolute; top: 270px; left: 27%; width: 43%; z-index: 3; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6); }
.project--p1 .project__title { position: absolute; top: 470px; left: 7rem; z-index: 4; }
.project--p1 .project__meta { position: absolute; top: 600px; left: 7rem; z-index: 4; max-width: 22rem; }
.project--p1 .project__link { position: absolute; top: 645px; left: 7rem; z-index: 4; }
.project--p1 .project__desc { position: absolute; top: 690px; right: 7rem; width: 30%; z-index: 4; }

/* p2 — LINE */
.project--p2 .project__stage { min-height: 1080px; }
.project--p2 .project__img--1 { position: absolute; top: 0; left: 7rem; width: 67%; z-index: 1; }
.project--p2 .project__video { position: absolute; top: 220px; right: 7rem; width: 46%; z-index: 3; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6); }
.project--p2 .project__img--2 { position: absolute; top: 380px; left: 28%; width: 23%; z-index: 2; }
.project--p2 .project__title { position: absolute; top: 24px; right: 7rem; z-index: 4; text-align: right; }
.project--p2 .project__meta { position: absolute; top: 90px; right: 7rem; z-index: 4; text-align: right; max-width: 14rem; }
.project--p2 .project__link { position: absolute; top: 130px; right: 7rem; z-index: 4; }
.project--p2 .project__desc { position: absolute; top: 760px; left: 7rem; width: 36%; z-index: 4; }

/* p3 — SPHERE³ */
.project--p3 .project__stage { min-height: 1280px; }
.project--p3 .project__img--1 { position: absolute; top: 180px; left: 7rem; width: 24%; z-index: 2; }
.project--p3 .project__img--2 { position: absolute; top: 220px; right: 7rem; width: 48%; z-index: 2; }
.project--p3 .project__video { position: absolute; top: 760px; left: 22%; width: 56%; z-index: 3; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6); }
.project--p3 .project__title { position: absolute; top: 24px; left: 7rem; z-index: 4; }
.project--p3 .project__meta { position: absolute; top: 90px; left: 7rem; z-index: 4; max-width: 22rem; }
.project--p3 .project__link { position: absolute; top: 130px; left: 7rem; z-index: 4; }
.project--p3 .project__desc { position: absolute; top: 24px; right: 7rem; width: 38%; z-index: 4; }

/* p4 — GROHOT EPOKH */
.project--p4 .project__stage { min-height: 1180px; }
.project--p4 .project__title { position: absolute; top: 24px; right: 7rem; z-index: 5; text-align: right; }
.project--p4 .project__meta { position: absolute; top: 90px; right: 7rem; z-index: 5; text-align: right; max-width: 22rem; }
.project--p4 .project__link { position: absolute; top: 145px; right: 7rem; z-index: 5; }
.project--p4 .project__img--1 { position: absolute; top: 220px; left: 7rem; width: 58%; z-index: 1; filter: contrast(1.04) brightness(0.96); }
.project--p4 .project__img--2 { position: absolute; top: 540px; right: 7rem; width: 40%; z-index: 2; filter: contrast(1.1) brightness(0.92); }
.project--p4 .project__video { position: absolute; top: 660px; left: 22%; width: 48%; z-index: 3; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6); }
.project--p4 .project__desc { position: absolute; top: 1020px; right: 7rem; width: 34%; z-index: 5; }

/* =================== RESPONSIVE =================== */
@media (max-width: 1366px) {
  .project--p1 .project__img--1,
  .project--p1 .project__title,
  .project--p1 .project__meta,
  .project--p1 .project__link,
  .project--p2 .project__img--1,
  .project--p2 .project__desc,
  .project--p3 .project__img--1,
  .project--p3 .project__title,
  .project--p3 .project__meta,
  .project--p3 .project__link,
  .project--p4 .project__img--1,
  .project--p4 .project__link { left: 3rem; }

  .project--p1 .project__img--2,
  .project--p1 .project__desc,
  .project--p2 .project__video,
  .project--p2 .project__title,
  .project--p2 .project__meta,
  .project--p2 .project__link,
  .project--p3 .project__img--2,
  .project--p3 .project__desc,
  .project--p4 .project__img--2,
  .project--p4 .project__title,
  .project--p4 .project__meta,
  .project--p4 .project__desc { right: 3rem; }
}

@media (max-width: 1024px) {
  .about-body { grid-template-columns: 1fr; gap: 2rem; justify-content: stretch; }
  .about-side { align-items: center; }
  .about-portrait { max-width: 320px; }
  .about-main p { max-width: 100%; }
  .nav li { margin-right: 2rem; }

  .project--p1 .project__stage,
  .project--p2 .project__stage,
  .project--p3 .project__stage,
  .project--p4 .project__stage {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0 2rem;
  }
  .project__stage > * {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important; right: auto !important; top: auto !important;
    text-align: left !important;
    filter: none !important;
  }
  .project__img { width: 100% !important; }
  .project__title { order: -2; font-size: 1.5rem; }
  .project__meta { order: -1; }
  .project__desc { order: 0; }
  .project__link { order: 99; }
}

@media (max-width: 767px) {
  .nav { padding: 0 !important; }
  .nav li { margin-right: 1.25rem; font-size: 0.62rem; letter-spacing: 0.15em; }
  .nav li a { font-size: 0.62rem; letter-spacing: 0.15em; }
  .home-title { font-size: 1.4rem; }
  .about-heading { font-size: 1.4rem; }
  .project__title { font-size: 1.3rem; }
  .footer-block { font-size: 0.9rem; }
  .footer-block > div { gap: 1rem; }
  .about-portrait { max-width: 240px; }
  .page--about { padding: 1.5rem 1rem; gap: 2rem; }
  .projects-list { gap: 4rem; padding: 0.5rem 0 3rem; }
  .project--p1 .project__stage,
  .project--p2 .project__stage,
  .project--p3 .project__stage,
  .project--p4 .project__stage { padding: 0 1rem; }
}

@media (max-width: 478px) {
  .nav li { margin-right: 0.9rem; font-size: 0.58rem; letter-spacing: 0.12em; }
  .nav li a { font-size: 0.58rem; letter-spacing: 0.12em; }
  .home-title { font-size: 1.25rem; }
  .about-heading { font-size: 1.25rem; }
  .project__title { font-size: 1.2rem; }
}
