/* ---------- Léna Nicollet — portfolio design system ---------- */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0c0c0e;
  --bg-panel: #17161a;
  --text: #f3efe7;
  --text-dim: #a8a29a;
  --accent: #cda45e;
  --accent-dim: #8a744c;
  --line: rgba(243, 239, 231, 0.12);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
}

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

img { max-width: 100%; display: block; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
  display: inline-block;
  margin-bottom: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem clamp(1.5rem, 5vw, 4rem);
  transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(12, 12, 14, 0.88);
  backdrop-filter: blur(10px);
  padding: 1rem clamp(1.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.site-nav .brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.site-nav .brand span { color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.5rem);
}

.nav-links a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  transition: color 0.25s ease;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(1.5rem, 5vw, 4rem) clamp(3rem, 8vh, 6rem);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12,12,14,0.35) 0%, rgba(12,12,14,0.55) 55%, rgba(12,12,14,0.96) 100%);
  z-index: -1;
}

.hero-inner { max-width: 900px; }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  margin-bottom: 0.6rem;
}

.hero .role {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.hero p.tagline {
  max-width: 46ch;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 2.2rem;
}

.hero-actions { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--accent);
  color: var(--text);
  transition: all 0.3s ease;
}

.btn:hover { background: var(--accent); color: #14120d; }

.btn.ghost { border-color: var(--line); }
.btn.ghost:hover { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- Sections ---------- */
section { padding: clamp(4rem, 10vh, 7rem) clamp(1.5rem, 5vw, 4rem); }

.section-head {
  max-width: 700px;
  margin-bottom: 3.5rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.section-head p { color: var(--text-dim); margin-top: 1rem; max-width: 60ch; }

.container { max-width: 1240px; margin: 0 auto; }

/* ---------- Project grid ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.4rem;
}

.project-card {
  position: relative;
  display: block;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.project-card:hover { transform: translateY(-6px); border-color: var(--accent-dim); }

.project-card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1c1a1f;
}

.project-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .thumb img { transform: scale(1.06); }

.project-card .info { padding: 1.5rem 1.6rem 1.8rem; }

.project-card .meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.project-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.about-grid .portrait {
  aspect-ratio: 4/5;
  overflow: hidden;
  border: 1px solid var(--line);
}

.about-grid .portrait img { width: 100%; height: 100%; object-fit: cover; }

.about-grid .copy p { color: var(--text-dim); margin-bottom: 1.2rem; }
.about-grid .copy p:first-of-type { color: var(--text); font-size: 1.1rem; font-family: var(--serif); }

.institutions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.institutions span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 0.4rem 0.8rem;
}

/* ---------- Contact ---------- */
.contact-section {
  text-align: center;
}

.contact-section h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1.2rem; }

.contact-section p { color: var(--text-dim); max-width: 50ch; margin: 0 auto 2.2rem; }

.contact-email {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--accent);
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 0.3rem;
  transition: opacity 0.3s ease;
}

.contact-email:hover { opacity: 0.75; }

/* ---------- Footer ---------- */
footer {
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---------- Project detail page ---------- */
.project-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(1.5rem, 5vw, 4rem) 3rem;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.project-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,12,14,0.25) 0%, rgba(12,12,14,0.65) 65%, rgba(12,12,14,1) 100%);
  z-index: -1;
}

.project-hero-inner { max-width: 900px; }

.project-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: 0.8rem; }

.project-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.8rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 1.4rem;
}

.project-meta-row strong { color: var(--text); font-weight: 500; }

.project-body {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 5rem) clamp(1.5rem, 5vw, 4rem);
}

.project-body p { color: var(--text-dim); margin-bottom: 1.4rem; font-size: 1.05rem; }

.project-body h2 {
  font-size: 1.6rem;
  margin: 2.4rem 0 1rem;
}

.credit-list {
  list-style: none;
  border-top: 1px solid var(--line);
  margin-top: 2.4rem;
  padding-top: 1.6rem;
}

.credit-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.credit-list li span:first-child { color: var(--text-dim); }
.credit-list li span:last-child { text-align: right; }
.credit-list .me { color: var(--accent); font-weight: 600; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem) clamp(4rem, 8vh, 6rem);
}

.gallery img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.source-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 1.4rem;
}

.back-link:hover { color: var(--accent); }

/* ---------- Biography mosaic ---------- */
.mosaic {
  columns: 3 240px;
  column-gap: 1rem;
}

.mosaic img {
  width: 100%;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  break-inside: avoid;
}

@media (max-width: 720px) {
  .mosaic { columns: 2 160px; }
}

/* ---------- All-projects index page ---------- */
.filter-note { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 2.5rem; }

.index-group { margin-bottom: 4rem; }

.index-group h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
  margin-bottom: 1.6rem;
}

.index-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 1.4rem;
  align-items: center;
  padding: 1.2rem 0.8rem;
  margin: 0 -0.8rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease;
}

a.index-row:hover {
  background: rgba(243, 239, 231, 0.04);
}

a.index-row:hover .idx-info h4 {
  color: var(--accent);
}

.index-row .idx-thumb {
  width: 110px; height: 78px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--bg-panel), #221f24);
  display: flex; align-items: center; justify-content: center;
}

.index-row .idx-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
a.index-row:hover .idx-thumb img { transform: scale(1.08); }
.index-row .idx-thumb span { color: var(--accent-dim); font-family: var(--serif); font-style: italic; font-size: 0.75rem; text-align: center; padding: 0 0.4rem; }

.index-row .idx-info h4 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.3rem; transition: color 0.25s ease; }
.index-row .idx-info p { color: var(--text-dim); font-size: 0.88rem; }
.index-row .idx-meta { text-align: right; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); white-space: nowrap; }

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
  .index-row { grid-template-columns: 70px 1fr; }
  .index-row .idx-thumb { width: 70px; height: 54px; }
  .index-row .idx-meta { grid-column: 1 / -1; text-align: left; margin-top: 0.4rem; }

  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(12, 12, 14, 0.98);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a::after { display: none; }
}
