/* Oscar Marie Le Merle — site styles
   Matches the live Framer site: light grey background, Inter
   type, dark grey text, no decoration. */

:root {
  --ink: #333333;
  --grey: #6f6f6f;
  --grey-light: #7a7a7a;
  --bg: #b8b8b8;
  --hairline: #a5a5a5;
  --max-w: 1200px;
  --gutter: 40px;
  --fs: 15px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--fs);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a:hover,
a:focus-visible {
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Layout shell ---------- */

.shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  column-gap: 80px;
  min-height: 100vh;
}

@media (max-width: 780px) {
  .shell {
    grid-template-columns: 1fr;
    column-gap: 0;
    min-height: auto;
  }
}

/* ---------- Sidebar nav ---------- */

.sidebar {
  padding: 48px 40px;
  border-right: none;
}

@media (max-width: 780px) {
  .sidebar {
    padding: 24px 20px 16px;
  }
}

.name {
  font-size: var(--fs);
  margin: 0 0 32px;
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 780px) {
  .name {
    margin: 0 0 16px;
  }
}

.name a {
  text-decoration: none;
}

nav.primary {
  display: flex;
  flex-direction: column;
  gap: 0;
}

nav.primary .group {
  margin-bottom: 24px;
}

nav.primary .group:last-child {
  margin-bottom: 0;
}

nav.primary .label {
  font-size: var(--fs);
  color: var(--grey-light);
  margin-bottom: 8px;
}

nav.primary a {
  display: block;
  font-size: var(--fs);
  color: var(--grey);
  padding: 1px 0;
}

nav.primary a:hover,
nav.primary a:focus-visible {
  color: var(--grey);
  text-decoration: none;
}

nav.primary a.current {
  color: var(--ink);
}

/* Phone nav: compact horizontal, wrapping chip-like row instead of
   a tall stacked list, so page content isn't pushed far down. */
@media (max-width: 780px) {
  nav.primary {
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 14px;
    row-gap: 6px;
  }

  nav.primary .group {
    display: contents;
  }

  nav.primary a {
    padding: 2px 0;
  }
}

/* ---------- Main content ---------- */

main {
  padding: 48px var(--gutter) 100px;
  max-width: var(--max-w);
}

@media (max-width: 780px) {
  main {
    padding: 20px 20px 60px;
  }

  /* On sub-pages, collapse the full nav list — only the name/logo
     stays, acting as a "back to home" link. Homepage keeps the
     full list so it works as the site's menu. */
  .sidebar nav.primary {
    display: none;
  }

  body.page-home .sidebar nav.primary {
    display: flex;
  }

  body.page-home .name {
    margin-bottom: 16px;
  }
}

/* ---------- Works index (homepage) ---------- */

.works-index {
  font-size: var(--fs);
}

.works-index a {
  display: block;
  padding: 3px 0;
}

/* ---------- Project header ---------- */

.project-header {
  margin-bottom: 32px;
  max-width: 760px;
}

.project-header h1 {
  font-size: var(--fs);
  font-weight: 500;
  margin: 0 0 24px;
  color: var(--ink);
}

.project-header .meta {
  font-size: var(--fs);
  color: var(--ink);
  margin: 0 0 24px;
}

.project-header p {
  font-size: var(--fs);
  line-height: 1.5;
  margin: 0 0 24px;
  color: var(--ink);
}

@media (max-width: 780px) {
  .project-header {
    margin-bottom: 24px;
  }

  .project-header h1,
  .project-header .meta,
  .project-header p {
    margin-bottom: 18px;
  }
}

/* ---------- Image stack ---------- */
/* Default: uniform landscape crop so photos of different original
   sizes/orientations line up consistently, matching the reference
   site's grid look. */

.image-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 40px 0;
  max-width: 780px;
}

.image-stack figure {
  margin: 0;
}

.image-stack img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: top;
}

.image-stack figcaption {
  font-size: var(--fs);
  color: var(--grey-light);
  margin-top: 6px;
}

@media (max-width: 780px) {
  .image-stack {
    gap: 16px;
    margin: 24px 0;
  }
}

/* Narrow variant (single artwork, e.g. a painting): show the full
   image at its own natural proportions, never cropped. */
.image-stack.narrow {
  max-width: 520px;
}

.image-stack.narrow img {
  aspect-ratio: auto;
  object-fit: contain;
}

/* ---------- Image grid (2-column, e.g. Jessica Payne, Drawings) ---------- */

.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 40px 0;
  max-width: 780px;
}

.image-grid figure {
  margin: 0;
}

.image-grid img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 780px) {
  .image-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
  }
}

/* Artwork variant, e.g. Drawings scans — no extra white border, the
   scan's own white paper background is enough. */
.image-grid.artwork figure {
  margin: 0;
}

/* Single full-width artwork block below a grid, e.g. Drawings'
   featured scan — natural proportions, on white, uncropped, and
   capped smaller than the full column so it doesn't dominate. */
.artwork-full {
  margin: 40px 0;
  max-width: 780px;
}

.artwork-full img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 780px) {
  .artwork-full {
    margin: 24px 0;
  }
}

/* ---------- Credits block ---------- */

.credits {
  margin-top: 48px;
  font-size: var(--fs);
  color: var(--grey);
  max-width: 640px;
}

.credits p {
  margin: 0 0 6px;
}

/* ---------- Placeholder page ---------- */

.placeholder {
  font-size: var(--fs);
  color: var(--grey-light);
  font-style: italic;
}

/* ---------- CV / Infos page ---------- */

.infos-intro {
  max-width: 480px;
  margin-bottom: 48px;
  font-size: var(--fs);
}

@media (max-width: 780px) {
  .infos-intro {
    margin-bottom: 24px;
  }
}

.infos-intro p {
  margin: 0 0 6px;
}

.cv-section {
  max-width: 640px;
  margin-bottom: 32px;
}

.cv-section h2 {
  font-size: var(--fs);
  font-weight: 500;
  color: var(--grey);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cv-entry {
  display: flex;
  gap: 16px;
  font-size: var(--fs);
  padding: 3px 0;
}

.cv-entry .year {
  flex: 0 0 44px;
  color: var(--grey);
}

.cv-entry .detail {
  flex: 1;
}

/* ---------- Sound works ---------- */

.sound-intro {
  font-size: var(--fs);
  color: var(--grey);
  margin-bottom: 24px;
  max-width: 480px;
}

.embed-wrap {
  max-width: 780px;
  margin: 24px 0;
}

.embed-wrap iframe {
  width: 100%;
  height: 450px;
  border: none;
  display: block;
}

/* ---------- Video embed (Vimeo/YouTube, 16:9) ---------- */

.video-embed {
  position: relative;
  width: 100%;
  max-width: 780px;
  aspect-ratio: 16 / 9;
  margin: 40px 0;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 780px) {
  .video-embed {
    margin: 24px 0;
  }
}
