/* ==========================================================================
   Louise Cotte — portfolio site
   Shared stylesheet for all pages (work / commissions / researchs / about / archives)
   ========================================================================== */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');

:root {
  --color-bg: #ffffff;
  --color-text: #292929;
  --color-text-soft: #202020;
  --color-muted: #bcbcbc;
  --font-main: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  --gap-page: 30px;
  --gap-page-mobile: 24px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: var(--gap-page);
}

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

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

/* ---- top navigation ---- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-bg);
  padding: var(--gap-page) var(--gap-page) 24px var(--gap-page);
}

.nav-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-link {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link.is-active {
  color: var(--color-text);
  font-weight: 900;
}

/* ---- footer ---- */

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-bg);
  padding: 16px var(--gap-page) var(--gap-page) var(--gap-page);
}

.footer-link {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
}

.footer-link:hover {
  color: var(--color-text);
}

.footer-link.is-active {
  color: var(--color-text);
  font-weight: 900;
}

/* ---- main / WORK page layout ---- */

main {
  flex: 1;
  display: flex;
  align-items: center;
}

.work-page {
  display: grid;
  grid-template-columns: minmax(240px, 30%) 1fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.work-category h2 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0 0 14px 0;
  color: var(--color-text);
}

.work-category ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work-category li {
  line-height: 1.65;
}

.work-title {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-soft);
  cursor: pointer;
  transition: color 0.15s ease;
}

.work-title:hover {
  color: var(--color-text);
}

.work-title.is-active {
  color: var(--color-text);
  font-weight: 700;
}

/* ---- image slider ---- */
 
.work-slider {
  position: relative;
  width: 100%;
  height: min(74vh, 760px);
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.slider-frame {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #eee;
  transition: width 0.45s ease, height 0.45s ease;
}
 
.slider-images {
  position: absolute;
  inset: 0;
}
 
.work-slider .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
 
.work-slider .slide.is-active {
  opacity: 1;
}
 
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 20px;
  cursor: pointer;
  color: var(--color-text);
  line-height: 1;
  z-index: 2;
  transition: color 0.15s ease;
}
 
.slider-arrow:hover {
  color: var(--color-muted);
}
 
.slider-arrow[data-direction="prev"] {
  left: 0;
}
 
.slider-arrow[data-direction="next"] {
  right: 0;
}
 
.slider-arrow svg {
  display: block;
  width: 28px;
  height: 28px;
}
 
.slider-caption {
  position: absolute;
  left: 20px;
  bottom: 16px;
  color: var(--color-text);
  mix-blend-mode: hard-light;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  z-index: 2;
}
 
/* ---- simple placeholder page (commissions / researchs / about / archives) ---- */
.placeholder-page {
  width: 100%;
  max-width: 640px;
}

.placeholder-page h1 {
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0 0 16px 0;
}

.placeholder-page p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-soft);
  margin: 0 0 12px 0;
}



/* ---- ABOUT page ---- */

.about-page {
  display: grid;
  grid-template-columns: minmax(240px, 30%) 1fr;
  gap: 56px;
  align-items: stretch;
  width: 100%;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}

.about-bio p {
  font-size: 1rem;
  line-height: 1.5;
  text-indent: 2em;
  color: var(--color-text-soft);
  margin: 0 0 28px 0;
}

.about-bio p:last-child {
  margin-bottom: 0;
}

.about-bio em {
  font-style: italic;
}

.about-contact p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--color-text-soft);
  margin: 0 0 12px 0;
}

.about-contact p:last-child {
  margin-bottom: 0;
}

.about-contact a {
  transition: color 0.15s ease;
}

.about-contact a:hover {
  text-decoration: underline;
}

/* ---- COMMISSIONS page ---- */
 
main.commissions-main {
  display: block;
}
 
.commissions-grid {
  columns: 2;
  column-gap: 40px;
  width: 100%;
}
 
.commission-item {
  break-inside: avoid;
  margin: 0 0 40px 0;
}
 
.commission-item img {
  display: block;
  width: 100%;
  height: auto;
}
 
.commission-item figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-muted);
  letter-spacing: 0.01em;
}
 
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 100;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--color-muted);
  transition: color 0.15s ease;
}
 
.back-to-top:hover {
  color: var(--color-text);
}
 
.back-to-top svg {
  display: block;
  width: 22px;
  height: 22px;
}

/* ---- ARCHIVES page ---- */
 
main.archive-main {
  display: block;
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
 
.archive-row {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
 
.archive-image {
  display: block;
  width: auto;
  height: auto;
  max-height: 50vh;
}
 
.archive-row[data-count="3"] .archive-image {
  max-width: 30vw;
}
 
.archive-row[data-count="2"] .archive-image {
  max-width: 42vw;
}
 

@media (prefers-reduced-motion: reduce) {
  .work-slider .slide,
  .nav-link,
  .footer-link,
  .archive-arrow {
    transition: none;
  }
 
  main.archive-main {
    scroll-behavior: auto;
  }
}

/* ---- mobile ---- */
 
@media (max-width: 760px) {
  .site-header {
    padding: var(--gap-page-mobile) var(--gap-page-mobile) 20px var(--gap-page-mobile);
  }
 
  .site-footer {
    padding: 14px var(--gap-page-mobile) var(--gap-page-mobile) var(--gap-page-mobile);
  }
 
  main {
    padding-left: var(--gap-page-mobile);
    padding-right: var(--gap-page-mobile);
  }
 
  .nav-top {
    gap: 8px 20px;
  }
 
  .work-page {
    grid-template-columns: 1fr;
    gap: 32px;
  }
 
  .work-list {
    order: 2;
    gap: 26px;
  }
 
  .work-slider {
    order: 1;
    height: min(55vh, 480px);
  }
 
  .about-page {
    grid-template-columns: 1fr;
    gap: 32px;
  }
 
  .about-text {
    gap: 32px;
  }
 
  .archive-row {
    flex-wrap: wrap;
    gap: 14px;
  }
 
  .archive-image {
    height: min(30vh, 260px);
  }
 
  .archive-arrow {
    right: 14px;
  }
 
  .commissions-grid {
    columns: 1;
  }
 
  .commission-item {
    margin-bottom: 28px;
  }
 
  .back-to-top {
    bottom: 18px;
    right: 18px;
  }
}
 