/* ============================================================
   LAURENT PAVESI — PORTFOLIO STYLESHEET
   ------------------------------------------------------------
   All colours, type sizes and spacing live in the :root tokens
   below. Change a token once and it updates everywhere.
   ============================================================ */

:root {
  /* ---- Colour tokens ---- */
  --ink:        #14161a;   /* primary text */
  --ink-soft:   #5c6167;   /* secondary text */
  --paper:      #f7f8f6;   /* page background */
  --panel:      #ffffff;   /* card / panel surface */
  --hairline:   #e2e4e0;   /* borders and rules */
  --accent:     #0031c6;   /* International Klein Blue */
  --accent-ink: #ffffff;   /* text on accent */

  /* ---- Type tokens ---- */
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body:    "Hanken Grotesk", sans-serif;
  --font-mono:    "IBM Plex Mono", monospace;

  --text-xs:  0.75rem;
  --text-sm:  0.875rem;
  --text-md:  1.0625rem;
  --text-lg:  1.375rem;
  --text-xl:  clamp(1.75rem, 3.5vw, 2.5rem);
  --text-2xl: clamp(2.5rem, 6vw, 4.5rem);

  /* ---- Layout tokens ---- */
  --max-width: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-gap: clamp(4rem, 10vw, 8rem);
  --radius: 10px;



}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Typography helpers ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

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

.lede {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--accent); }

.site-nav { display: flex; gap: 1.75rem; }

.site-nav a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   HERO — the "spatial panel" signature
   ============================================================ */
css
.hero {
  padding-top: var(--section-gap);
  padding-bottom: calc(var(--section-gap) * 0.4);
  overflow: hidden;
}
.hero h1 { max-width: 20ch; }

.hero .lede { margin-top: 1.5rem; }

/* The floating panel: a phrase inside the headline rendered as
   a VR-style card that tilts gently towards the cursor. */
.panel-word {
  display: inline-block;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0.05em 0.35em;
  box-shadow:
    0 1px 2px rgba(20, 22, 26, 0.06),
    0 12px 32px rgba(0, 49, 198, 0.10);
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.3s ease;
  color: #e85d04;
}

.hero-meta {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============================================================
   WORK GRID
   ============================================================ */
.section { padding-block: var(--section-gap); }
.section + .section { border-top: 1px solid var(--hairline); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 700px) {
  .work-grid { grid-template-columns: 1fr; }
}

.work-card {
  display: block;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}
.work-card:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--hairline));
  box-shadow:
    0 2px 4px rgba(20, 22, 26, 0.05),
    0 20px 48px rgba(0, 49, 198, 0.12);
}

.work-card .thumb {
  aspect-ratio: 16 / 9;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}

.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.work-card .card-body { padding: 1.5rem; }

.work-card .card-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-card h3 { margin-top: 0.5rem; }

.work-card p {
  margin-top: 0.5rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.card-cta {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.work-card:hover .card-cta { color: var(--accent); }

/* Secondary (brand) card spans full width but stays quiet */
.work-card.secondary { grid-column: 1 / -1; display: flex; }
.work-card.secondary .thumb { width: 34%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--hairline); }
@media (max-width: 700px) {
  .work-card.secondary { flex-direction: column; }
  .work-card.secondary .thumb { width: 100%; aspect-ratio: 16/9; border-right: 0; border-bottom: 1px solid var(--hairline); }
}

/* ============================================================
   PROCESS STRIP — a real sequence, so numbering is earned
   ============================================================ */
.process-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 900px) { .process-strip { grid-template-columns: 1fr; } }

.process-step { background: var(--panel); padding: 1.5rem 1.25rem; }

.process-step .step-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
}

.process-step h3 { font-size: var(--text-md); margin-top: 0.6rem; }

.process-step p { margin-top: 0.5rem; font-size: var(--text-sm); color: var(--ink-soft); }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }

.about-grid .portrait {
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.capabilities {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.capabilities li {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  background: var(--panel);
  color: var(--ink-soft);
}

/* ============================================================
   FOOTER / CONTACT
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--section-gap);
  background: var(--panel);
}

.site-footer h2 { max-width: 18ch; }

.contact-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.site-footer .small {
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

/* ============================================================
   CASE STUDY PAGES
   ============================================================ */
.case-hero { padding-block: calc(var(--section-gap) * 0.7); }

.back-link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-hero h1 { margin-top: 1.5rem; max-width: 22ch; }

.case-meta {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
}
@media (max-width: 700px) { .case-meta { grid-template-columns: repeat(2, 1fr); } }

.case-meta dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.case-meta dd { margin-top: 0.35rem; font-size: var(--text-sm); }

/* TL;DR block — the recruiter-friendly summary */
.tldr {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-block: 3rem;
}

.tldr .eyebrow { margin-bottom: 1.25rem; }

.tldr dl { display: grid; gap: 1rem; }

.tldr dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.tldr dd { margin-top: 0.25rem; }

/* Case body text */
.case-body { max-width: 46rem; }
.case-body h2 { margin-top: var(--section-gap); }
.case-body h2:first-child { margin-top: 0; }
.case-body p { margin-top: 1.25rem; color: var(--ink); }
.case-body ul { margin-top: 1.25rem; padding-left: 1.25rem; }
.case-body li { margin-top: 0.5rem; }

/* Figures — visuals in context, annotated */
figure { margin-block: 2.5rem; }

figure .media,
figure img,
figure video {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

figure.wide { width: min(100%, 62rem); }

figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--ink-soft);
}
figcaption strong { color: var(--accent); font-weight: 500; }

/* Placeholder blocks — replace with your images/video */

.ratio-21-9,
.ratio-16-9 {
  width: 100%;
  object-fit: cover;
}
.ratio-21-9 { aspect-ratio: 21 / 9; }
.ratio-16-9 { aspect-ratio: 16 / 9; }

.placeholder {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 14px,
      rgba(0, 49, 198, 0.05) 14px 15px),
    var(--panel);
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--hairline));
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-soft);
  text-align: center;
  padding: 1rem;
}

/* Outcome callout */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  margin-block: 2.5rem;
}
@media (max-width: 700px) { .outcome-grid { grid-template-columns: 1fr; } }

.outcome-cell { background: var(--panel); padding: 1.5rem; }

.outcome-cell .figure-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--accent);
  line-height: 1;
}

.outcome-cell p { margin-top: 0.6rem; font-size: var(--text-sm); color: var(--ink-soft); }

/* Next case link */
.next-case {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--hairline);
  padding-top: 2.5rem;
}
.next-case a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--ink);
}
.next-case a:hover { color: var(--accent); text-decoration: none; }



/* ============================================================
   SCROLL REVEAL (subtle; disabled if reduced motion)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .panel-word { transform: none !important; }
}

/* ---- Small screens: let the header nav wrap instead of overflowing ---- */
@media (max-width: 600px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 0.5rem; }
  .site-nav { flex-wrap: wrap; gap: 0.5rem 1.1rem; }
}


/* ============================================================
   Step 1 additions
   ============================================================ */

/* Work grid: flagship full width, three deep dives in a row, brand quiet */
.work-grid { grid-template-columns: repeat(3, 1fr); }
.work-card.flagship { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; }
.work-card.flagship .thumb { position: relative; aspect-ratio: auto; min-height: 20rem; border-bottom: 0; border-right: 1px solid var(--hairline); }
.work-card.flagship .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; }
.work-card.flagship .card-body { padding: 2.25rem; align-self: center; }
.work-card.flagship h3 { font-size: var(--text-xl); line-height: 1.15; }
.work-card.flagship p { font-size: var(--text-md); }
.work-lead { margin: -1.5rem 0 2.5rem; max-width: 42rem; color: var(--ink-soft); }
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-card.flagship { display: block; }
  .work-card.flagship .thumb { position: static; aspect-ratio: 16 / 9; min-height: 0; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .work-card.flagship .thumb img { position: static; }
  .work-card.flagship .card-body { padding: 1.5rem; }
}

/* About photo caption */
.portrait-cap { margin-top: 0.75rem; font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.6; color: var(--ink-soft); }

/* Benchmarking entry (replaces a screenshot of a Word page) */
.bench { border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.bench-head { padding: 0.9rem 1.5rem; border-bottom: 1px solid var(--hairline); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.bench-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.75rem; padding: 1.5rem; align-items: start; }
.bench-row + .bench-row { border-top: 1px solid var(--hairline); }
.bench-row h3 { font-size: var(--text-lg); }
.bench-row p { margin-top: 0.6rem; font-size: var(--text-sm); }
.bench-tag { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; margin-right: 0.5rem; font-weight: 500; }
.bench-tag.good { color: #1d6b3a; }
.bench-tag.bad { color: #b3261e; }
.bench-row img { border: 1px solid var(--hairline); border-radius: 6px; width: 100%; }
@media (max-width: 700px) { .bench-row { grid-template-columns: 1fr; } }


/* Interactive prototype feature (Spatial UI page) */
.proto-feature { width: min(100%, 62rem); margin-block: 2.5rem; display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; background: var(--panel); border: 1px solid var(--hairline); border-left: 3px solid var(--accent); border-radius: var(--radius); overflow: hidden; }
.proto-thumb { display: block; background: #111213; }
.proto-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; border: 0; border-radius: 0; transition: transform 0.4s ease; }
.proto-feature:hover .proto-thumb img { transform: scale(1.02); }
.proto-thumb { overflow: hidden; }
.proto-text { padding: 2rem; align-self: center; }
.proto-text h2 { font-size: var(--text-xl); line-height: 1.15; margin-top: 0.6rem; }
.proto-text p { margin-top: 0.75rem; color: var(--ink-soft); font-size: var(--text-md); }
.btn { display: inline-block; margin-top: 1.25rem; padding: 0.85rem 1.4rem; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
.btn:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 85%, #000); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 760px) {
  .proto-feature { grid-template-columns: 1fr; }
  .proto-thumb img { aspect-ratio: 16 / 9; height: auto; }
  .proto-text { padding: 1.5rem; }
}

.proto-text .proto-note { margin-top: 0.6rem; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-soft); }

/* Header: name with role line beneath, left aligned (also on mobile) */
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; line-height: 1.2; }
   .brand-role { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.site-header .wrap { padding-block: 0.75rem; }
/* anchor links (#work, #about…) stop just below the taller sticky header */
[id] { scroll-margin-top: 5.5rem; }
@media (max-width: 600px) {
  .brand { flex: 1 1 100%; }   /* name and role take the first row; the nav wraps beneath */
}
