:root {
  --ink: #f3f1ec;
  --muted: #a7a9ae;
  --paper: #08090b;
  --card: #111318;
  --accent: #9e4aec;
  --line: #252932;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body:not(.home-page) { display: flex; min-height: 100svh; flex-direction: column; }
body:not(.home-page) .page-content { min-height: 0; flex: 1; }

a { color: inherit; }

.site-header, main, .site-footer {
  width: min(1100px, calc(100% - 3rem));
  margin-inline: auto;
}

.home-page main { width: 100%; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}
.project-page .site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand { font-size: 2rem; font-weight: 800; text-decoration: none; letter-spacing: -0.06em; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 1.5rem; }
nav a { color: var(--ink); opacity: .82; text-decoration: none; font-size: 1.2rem; font-weight: 650; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); opacity: 1; }

.home-page .site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 50%;
  width: 100%;
  padding-inline: max(1.5rem, calc((100vw - 1100px) / 2));
  transform: translate(-50%, -0.75rem);
  border-bottom: 1px solid transparent;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .2s ease, border-color .2s ease;
}

.home-page .site-header.is-visible {
  transform: translate(-50%, 0);
  border-color: var(--line);
  background: var(--paper);
  opacity: 1;
  pointer-events: auto;
}

.hero {
  display: flex;
  position: relative;
  min-height: 100svh;
  width: 100%;
  max-width: none;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 4rem max(1.5rem, calc((100vw - 1100px) / 2));
  color: white;
  text-align: center;
  background-color: #08090b;
  background-image: linear-gradient(90deg, rgb(8 13 20 / .48), rgb(8 13 20 / .12)), url("../assets/landing-image.JPG");
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}
.hero::after {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(8rem, 22vh, 16rem);
  content: "";
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--paper));
}
.hero > * { position: relative; z-index: 1; transform: translateY(190px); }
.hero h1 { margin-bottom: .35rem; }
.hero .intro { margin: 0; color: white; font-size: calc(1.7rem + 8px); font-weight: 400; }
.hero-actions { justify-content: center; }
.hero .button { background: white; color: #08090b; }
.hero .button:hover { background: var(--accent); color: white; }
.button-scroll { display: inline-flex; align-items: center; flex-direction: column; gap: .8rem; margin-top: 3.5rem; padding: 2.25rem 1.5rem; border: 0; background: transparent; color: white; cursor: pointer; font: inherit; font-size: 1.6rem; font-weight: 700; text-decoration: none; }
.button-scroll:hover { color: var(--accent); }
.button-scroll-label { text-shadow: 0 1px 6px rgb(0 0 0 / .5); }
.button-scroll-arrow { width: 48px; height: 48px; flex: 0 0 48px; animation: portfolio-arrow-bob 2.4s ease-in-out infinite; }
@keyframes portfolio-arrow-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}
.eyebrow { margin: 0 0 .8rem; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.055em; line-height: 1.05; }
h1 { font-size: clamp(2.8rem, 8vw, 6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.intro, .project-summary { max-width: 620px; color: var(--muted); font-size: 1.18rem; }
.hero-actions { display: flex; flex-direction: column; align-items: center; margin-top: .65rem; }
.button { display: inline-block; padding: .75rem 1.15rem; border: 0; border-radius: 99px; background: var(--ink); color: var(--paper); cursor: pointer; font: inherit; font-weight: 700; text-decoration: none; }
.button:hover { background: var(--accent); }
.button-secondary { border: 1px solid currentColor; background: transparent; }

.projects-section { width: min(1100px, calc(100% - 3rem)); margin-inline: auto; padding: 5rem 0 8rem; scroll-margin-top: 82px; }
.section-heading { margin-bottom: 2rem; text-align: center; }
.project-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 0 0 2rem; }
.project-filter { padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: .9rem; font-weight: 700; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.project-filter:hover { border-color: var(--accent); color: var(--accent); }
.project-filter[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: white; }
.project-grid { --filter-height-duration: 0ms; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; transition: opacity 200ms ease-in-out, height var(--filter-height-duration) ease-in-out; align-content: start;}
.project-grid.is-filter-transitioning { --filter-height-duration: 200ms; overflow: hidden; }
.project-grid.is-filter-hidden { opacity: 0; }
.project-card { display: flex; position: relative; min-height: 335px; overflow: hidden; flex-direction: column; justify-content: space-between; padding: 1.5rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--card); color: white; text-decoration: none; isolation: isolate; transition: transform .18s ease, box-shadow .18s ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 12px 25px rgb(29 36 51 / .09); }
.project-card::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(to top, rgb(0 0 0 / .78), rgb(0 0 0 / .08)); }
.project-card-media { position: absolute; z-index: -2; inset: 0; background: linear-gradient(135deg, #272c35, #111318); }
.project-card-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.project-card h3 { margin: .45rem 0 0; font-size: 1.9rem; letter-spacing: -.035em; }
.project-card time, .project-card-tag { color: var(--accent); font-size: 1.35rem; font-weight: 700; letter-spacing: -.035em; }
.project-card time::after { margin: 0 .45rem; content: "·"; }
.project-card-open { align-self: flex-end; display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid rgb(255 255 255 / .55); border-radius: 50%; color: white; }
.project-card-open svg { display: block; }

.page-content { min-height: calc(100vh - 164px); max-width: 1100px; padding: 4.5rem 0 7rem; }
.page-content h1 { margin-bottom: 1.25rem; }
.legal-page-content { width: min(860px, calc(100% - 3rem)); margin-inline: auto; }
.legal-sections { display: grid; gap: 2.5rem; margin-top: 3rem; }
.legal-section { padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.legal-section:last-child { padding-bottom: 0; border-bottom: 0; }
.legal-section h2 { margin-bottom: 1rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.legal-section p { max-width: 72ch; margin: .8rem 0 0; color: var(--muted); }
.legal-fields { display: grid; gap: 1rem; margin: 0; }
.legal-fields div { display: grid; grid-template-columns: minmax(9rem, .35fr) 1fr; gap: 1rem; }
.legal-fields dt { color: var(--accent); font-weight: 700; }
.legal-fields dd { margin: 0; color: var(--muted); }
.back-link, .text-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.back-link { display: inline-block; margin-bottom: 1.5rem; }
[data-project-page] { padding-top: 2.5rem; }
[data-project="titre"] { font-size: clamp(2.25rem, 4vw, 3.5rem); }
.project-body { max-width: 650px; margin: 2.25rem 0; font-size: 1.05rem; }
.project-meta { display: flex; gap: .65rem; font-size: 1.3rem; letter-spacing: -.035em; }
.project-meta span + span::before { margin-right: .65rem; content: "•"; }
.project-role { margin: .75rem 0 0; color: var(--muted); }
.project-video { display: grid; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; place-items: center; margin: 1.25rem 0 2.25rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--card); color: var(--muted); }
.project-video iframe { width: 100%; height: 100%; border: 0; border-radius: inherit; }
.project-video-placeholder { position: relative; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: white; isolation: isolate; }
.project-video-placeholder::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(to bottom, rgb(0 0 0 / .22), rgb(0 0 0 / .78)); }
.project-video-thumbnail { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-video-play { width: clamp(3rem, 7vw, 4.5rem); height: clamp(3rem, 7vw, 4.5rem); }
.project-video-consent { position: absolute; right: 1rem; bottom: 1rem; left: 1rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.project-video-consent p { max-width: 48rem; margin: 0; font-size: clamp(.65rem, 1.25vw, .8rem); line-height: 1.4; text-shadow: 0 1px 3px rgb(0 0 0 / .8); }
.project-video-consent a { color: white; font-weight: 700; }
.project-video-consent-button { flex: 0 0 auto; padding: .65rem .8rem; border: 1px solid white; border-radius: 99px; background: var(--accent); color: white; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 700; }
.project-video-consent-button:hover { background: #7f32c6; }
.project-video-consent-button:focus-visible, .project-video-consent a:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.project-gallery-section { margin-top: 4rem; }
.project-gallery-section h2 { margin-bottom: 1.5rem; }
#gallery-title { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.project-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.project-gallery figure { margin: 0; }
.project-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: .5rem; object-fit: cover; }
.contact { display: flex; align-items: center; padding-top: 5rem; }
.contact-profile { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 7vw, 7rem); align-items: center; transform: translateY(calc(16.4px - 10svh)); }
.contact-portrait { margin: 0; }
.contact-portrait img { display: block; width: 100%; aspect-ratio: 1; border-radius: .7rem; object-fit: cover; }
.contact-details { align-self: center; }
.contact-details h1 { margin-bottom: .5rem; font-size: clamp(2.5rem, 4vw, 3.75rem); }
.contact-role { margin: 0; color: var(--accent); font-size: clamp(1.3rem, 2vw, 1.75rem); }
.contact-links { display: grid; gap: .7rem; margin-top: 2.5rem; }
.contact-links a { display: inline-flex; width: fit-content; align-items: center; gap: .65rem; color: white; font-size: 1.15rem; font-weight: 700; text-decoration: none; transition: opacity .18s ease; }
.contact-links svg { flex: 0 0 24px; }
.contact-links a:hover { opacity: .7; }
.contact-links a[aria-disabled="true"] { color: var(--muted); cursor: not-allowed; }
.contact-presentation { max-width: 34rem; margin: 2rem 0 0; color: var(--muted); white-space: pre-line; }
.message { color: var(--muted); }
.site-footer { display: grid; min-height: 72px; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-legal { color: var(--muted); text-decoration: none; transition: color .18s ease; }
.footer-legal:hover, .footer-legal[aria-current="page"] { color: var(--accent); }
.footer-social { display: flex; gap: .65rem; }
.site-footer .footer-social { justify-self: end; }
.footer-social a { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: white; transition: opacity .18s ease; }
.footer-social a:hover { opacity: .7; }
.footer-social svg { display: block; }

@media (max-width: 700px) {
  .site-header, main, .site-footer { width: min(100% - 2rem, 1100px); }
  .hero { padding: 3rem 1rem; }
  .hero > * { transform: translateY(140px); }
  .hero { background-position: 56% center; }
  .home-page .site-header { padding-inline: 1rem; }
  .projects-section { width: min(100% - 2rem, 1100px); }
  .project-grid { grid-template-columns: 1fr; }
  .project-gallery { grid-template-columns: 1fr; }
  .project-video-consent { align-items: start; flex-direction: column; gap: .5rem; }
  .legal-page-content { width: min(100% - 2rem, 860px); }
  .legal-fields div { grid-template-columns: 1fr; gap: .2rem; }
  .page-content { padding-top: 3rem; }
  .contact { padding-top: 3rem; }
  .contact-profile { grid-template-columns: 1fr; gap: 2rem; transform: none; }
  .contact-portrait { max-width: 520px; }
}

@media (max-width: 450px) {
  .site-footer { grid-template-columns: 1fr auto; }
  .footer-legal { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .project-grid, .project-grid.is-filter-transitioning { transition: none; }
}
