/* ===========================================================
   Benjamin Hocq — Portfolio
   =========================================================== */
:root{
  --bg: oklch(0.035 0 0);
  --surface: oklch(0.12 0 0);
  --surface-2: oklch(0.16 0 0);
  --surface-3: oklch(0.20 0 0);
  --border: oklch(0.24 0 0);
  --border-soft: oklch(0.19 0 0);
  --text: oklch(0.97 0 0);
  --muted: oklch(0.68 0 0);
  --faint: oklch(0.50 0 0);
  --col: 680px;
  --nav-w: 64px;
  --ease: cubic-bezier(.22,.61,.36,1);
}
*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html,body{ margin:0; padding:0; }
body{
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  letter-spacing: -0.011em;
  overflow-x: hidden;
}
::selection{ background: oklch(0.97 0 0); color: var(--bg); }
a{ color: inherit; text-decoration: none; }
img{ display:block; max-width:100%; }
button{ font-family: inherit; }

/* ── App scroll container ───────────────── */
.app{ min-height: 100vh; }

/* ── Views (pages) ──────────────────────── */
.view{ display: none; }
.view.is-active{ display: block; animation: viewIn .45s var(--ease); }
@keyframes viewIn{ from{ transform: translateY(10px); } to{ transform:none; } }

.feed{
  max-width: var(--col); margin: 0 auto;
  padding: clamp(64px, 12vh, 130px) 24px 260px;
}

/* ── Section primitives ─────────────────── */
.block{ margin-top: clamp(64px, 11vh, 120px); }
.sec-title{ font-size: 26px; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 8px; }
.sec-lead{ color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 30px; max-width: 56ch; }

/* ── Buttons ────────────────────────────── */
.btn{
  display:inline-flex; align-items:center; gap: 9px;
  padding: 13px 24px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 13px; color: var(--text); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .18s var(--ease), transform .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover{ background: var(--surface-2); border-color: oklch(0.34 0 0); transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn svg{ width:15px; height:15px; }

/* ===========================================================
   HERO
   =========================================================== */
.avatar{
  width: 96px; height: 96px; display:block; margin-bottom: 30px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
}
.hero h1{
  font-size: clamp(32px, 4.6vw, 44px); font-weight: 700; line-height: 1.05;
  letter-spacing: -0.03em; margin: 0;
}
.hero .wave{ display:inline-block; transform-origin: 70% 70%; }
.hero .sub{ color: var(--muted); font-size: 18px; margin: 14px 0 0; }
.hero .body{
  color: var(--muted); font-size: 17px; line-height: 1.62; margin: 24px 0 0; max-width: 60ch;
}
.hero .body b{ color: var(--text); font-weight: 600; }
.hero .btn{ margin-top: 50px; }

/* ===========================================================
   WORK / PARCOURS — carousel
   =========================================================== */
.carousel{ position: relative; }
.slides{ position: relative; }
.slide{ display:none; }
.slide.is-active{ display:block; animation: slideIn .4s var(--ease); }
@keyframes slideIn{ from{ transform: translateX(14px); } to{ transform:none; } }
.slide image-slot{
  width: 100%; height: 320px; display:block; border-radius: 22px;
  border: 1px solid var(--border);
}
.work-meta{
  display:flex; align-items:center; gap: 14px; margin-top: 22px;
}
.work-logo{
  width: 46px; height: 46px; border-radius: 13px; flex:none;
  background: var(--surface-2); border: 1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  font-weight: 700; font-size: 17px; color: var(--text);
}
.work-info{ flex: 1; min-width: 0; }
.work-info .wt{ font-size: 17px; font-weight: 600; }
.work-info .wt span{ color: var(--faint); font-weight: 400; font-size: 14px; margin-left: 6px; }
.work-info .wr{ color: var(--muted); font-size: 14px; margin-top: 1px; }
.car-nav{ display:flex; gap: 8px; }
.car-btn{
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
.car-btn:hover{ background: var(--surface-2); border-color: oklch(0.34 0 0); }
.car-btn svg{ width:18px; height:18px; }
.work-desc{ color: var(--muted); font-size: 15px; line-height: 1.55; margin: 18px 0 0; }

/* ===========================================================
   LIST (projets preview)
   =========================================================== */
.list{ display:flex; flex-direction: column; }
.list-row{
  display:flex; align-items:center; gap: 16px; padding: 17px 6px 17px 6px;
  border-top: 1px solid var(--border-soft); cursor: pointer;
  transition: padding-left .2s var(--ease), background .2s var(--ease);
  border-radius: 10px;
}
.list-row:last-child{ border-bottom: 1px solid var(--border-soft); }
.list-row:hover{ padding-left: 14px; background: oklch(0.10 0 0); }
.list-ic{
  width: 40px; height: 40px; border-radius: 12px; flex:none;
  background: var(--surface-2); border: 1px solid var(--border);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:15px;
}
.list-tx{ flex:1; min-width:0; }
.list-tx .lt{ font-size: 16px; font-weight: 600; }
.list-tx .ld{ color: var(--muted); font-size: 13.5px; margin-top: 1px;
  white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
.list-row .chev{ color: var(--faint); flex:none; transition: transform .2s var(--ease); }
.list-row:hover .chev{ transform: translateX(3px); color: var(--text); }
.more{ margin-top: 22px; }
.more a{ color: var(--muted); font-size: 14.5px; font-weight: 500;
  display:inline-flex; align-items:center; gap:7px; cursor:pointer; }
.more a:hover{ color: var(--text); }

/* ===========================================================
   PROFIL / CV
   =========================================================== */
.profil-head{ display:flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.profil-head .ph-avatar{
  width: 124px; height: 156px; border-radius: 20px; flex:none;
  background: var(--surface); border: 1px solid var(--border);
}
.profil-head .ph-info{ flex:1; min-width: 230px; }
.profil-head h1{ font-size: clamp(30px, 4.5vw, 40px); font-weight:700; letter-spacing:-0.03em; margin:0; line-height:1.04; }
.profil-head .role{ color: var(--muted); font-size: 16px; letter-spacing:0.12em; text-transform:uppercase; margin: 10px 0 0; }
.contact-grid{
  display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px 22px; margin-top: 18px;
}
.contact-grid a, .contact-grid span{
  display:flex; align-items:center; gap: 9px; color: var(--muted); font-size: 14px; padding: 5px 0;
}
.contact-grid a:hover{ color: var(--text); }
.contact-grid svg{ width:15px; height:15px; flex:none; color: var(--faint); }

.cv-label{ font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; }
.about{ color: var(--muted); font-size: 16px; line-height: 1.64; margin:0; }

.entry{
  display:grid; grid-template-columns: 1fr auto; column-gap: 18px; row-gap: 4px;
  padding: 18px 0; border-top: 1px solid var(--border-soft);
}
.entry:last-child{ border-bottom: 1px solid var(--border-soft); }
.entry .e-title{ grid-column:1; grid-row:1; font-size: 16px; font-weight: 600; }
.entry .e-org{ grid-column:1; grid-row:2; color: var(--muted); font-size: 14px; }
.entry .e-date{ grid-column:2; grid-row:1 / span 2; align-self:start; text-align:right;
  color: var(--faint); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.entry .e-desc{ grid-column:1 / -1; grid-row:3; color: var(--muted); font-size: 14.5px; line-height:1.55; margin-top: 8px; max-width: 60ch; }

.chips{ display:flex; flex-wrap:wrap; gap: 9px; }
.chip{ padding: 8px 15px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; font-size: 14px; }
.tools{ display:flex; flex-wrap:wrap; gap: 8px; }
.tool{
  width: 46px; height: 46px; border-radius: 12px; display:flex; align-items:center; justify-content:center;
  background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 13px; color: var(--text);
}
.kv{ display:flex; gap: 10px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.kv b{ color: var(--text); font-weight: 600; }

/* ===========================================================
   PROJETS — cards + detail
   =========================================================== */
.proj-cards{ display:flex; flex-direction: column; gap: 22px; }
.proj-card{
  display:grid; grid-template-columns: 220px 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: 22px; overflow: hidden;
  background: var(--surface); cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.proj-card:hover{ transform: translateY(-3px); border-color: oklch(0.36 0 0); }
.proj-card image-slot{ width: 220px; height: 100%; min-height: 180px; display:block; }
.proj-card .pc-body{ padding: 24px 26px; display:flex; flex-direction: column; justify-content:center; }
.proj-card h3{ font-size: 21px; font-weight: 600; margin:0; letter-spacing:-0.02em; }
.proj-card p{ color: var(--muted); font-size: 15px; line-height:1.55; margin: 10px 0 0; }
.proj-card .pc-meta{ color: var(--faint); font-size: 13.5px; margin-top: 16px; }

/* detail */
.detail-top{ display:flex; align-items:center; gap: 16px; margin-bottom: 34px; }
.back-btn{
  width: 46px; height: 46px; border-radius: 50%; flex:none;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition: background .16s var(--ease), transform .16s var(--ease);
}
.back-btn:hover{ background: var(--surface-2); transform: translateX(-2px); }
.detail-top .dt-label{ font-size: 20px; font-weight: 600; }
.detail-card{
  border: 1px solid var(--border); border-radius: 24px; background: var(--surface);
  padding: 36px clamp(24px, 4vw, 44px);
}
.detail-card .dc-cat{ color: var(--faint); font-size: 14px; display:flex; gap: 18px; margin: 0 0 22px; }
.detail-card h1{ font-size: clamp(26px, 3.6vw, 36px); font-weight: 700; letter-spacing:-0.025em; line-height:1.12; margin:0; }
.detail-card .dc-body{ color: var(--muted); font-size: 16px; line-height: 1.68; margin: 24px 0 0; }
.detail-card image-slot{ width: 100%; height: 360px; display:block; border-radius: 16px; margin-top: 26px; border:1px solid var(--border); }

/* ===========================================================
   CONTACT
   =========================================================== */
.links{ display:flex; flex-direction:column; }
.link-row{
  display:flex; align-items:center; justify-content:space-between;
  padding: 18px 2px; border-top: 1px solid var(--border-soft); font-size: 16px;
  transition: padding-left .2s var(--ease);
}
.link-row:last-child{ border-bottom: 1px solid var(--border-soft); }
.link-row:hover{ padding-left: 8px; }
.link-row .lr-k{ color: var(--muted); }
.link-row .lr-v{ display:flex; align-items:center; gap: 10px; font-weight: 500; }
.link-row .arr{ opacity:.4; transition: transform .2s var(--ease), opacity .2s var(--ease); }
.link-row:hover .arr{ transform: translate(3px,-3px); opacity:.9; }

.form{ display:flex; flex-direction:column; gap: 14px; margin-top: 30px; }
.form .row2{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label{ display:block; font-size: 13px; color: var(--faint); margin: 0 0 7px; letter-spacing:0.02em; }
.field input, .field textarea{
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 15px; color: var(--text); font-size: 15px; font-family: inherit;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.field input:focus, .field textarea:focus{ outline:none; border-color: oklch(0.42 0 0); background: var(--surface-2); }
.field textarea{ resize: vertical; min-height: 120px; }
.form .send{ align-self: flex-start; }
.sent-msg{ color: var(--muted); font-size: 14px; margin-top: 4px; opacity:0; transition: opacity .3s; }
.sent-msg.show{ opacity:1; }

/* ===========================================================
   TÉMOIGNAGES
   =========================================================== */
.testi-scroll{
  display:flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 0 14px; margin: 0 -24px; padding-left: 24px; padding-right: 24px;
  scrollbar-width: none;
}
.testi-scroll::-webkit-scrollbar{ display:none; }
.testi{
  flex: 0 0 300px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 24px 24px 20px; display:flex; flex-direction: column; justify-content: space-between;
  min-height: 220px;
}
.testi .tq{ color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 22px; }
.testi .ta{ display:flex; align-items:center; gap: 12px; }
.testi .ta-av{ width: 40px; height: 40px; border-radius: 50%; flex:none;
  background: var(--surface-2); border: 1px solid var(--border); }
.testi .tn{ font-size: 15px; font-weight: 600; }

/* ===========================================================
   FOOTER
   =========================================================== */
.footer{ margin-top: clamp(80px, 14vh, 140px); text-align:center; }
.footer .socials{
  display:flex; align-items:center; justify-content:center; gap: 12px; position: relative;
}
.footer .socials::before, .footer .socials::after{
  content:""; height:1px; flex:1; max-width: 130px; background: var(--border);
}
.soc-btn{
  width: 64px; height: 56px; border-radius: 16px; border: 1px solid var(--border-soft);
  display:flex; align-items:center; justify-content:center; color: var(--text);
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease);
}
.soc-btn:hover{ background: var(--surface); border-color: var(--border); transform: translateY(-2px); }
.soc-btn svg{ width: 22px; height: 22px; }
.signature{
  font-family: "Sacramento", cursive; font-size: 52px; line-height: 1; color: var(--text);
  margin: 64px 0 14px; opacity: .92;
}
.footer .thanks{ font-size: 19px; font-weight: 600; margin: 0; }
.footer .bye{ color: var(--faint); font-size: 15px; margin: 6px 0 0; }
.footer .copy{ color: oklch(0.36 0 0); font-size: 12px; margin: 36px 0 0; }

/* ===========================================================
   LEFT NAV
   =========================================================== */
.nav{
  position: fixed; left: 22px; top: 50%; transform: translateY(-50%); z-index: 60;
  display:flex; flex-direction: column; gap: 4px; padding: 9px;
  background: oklch(0.12 0 0 / 0.72); border: 1px solid oklch(0.28 0 0 / 0.6);
  border-radius: 24px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.nav a{
  position: relative; width: 44px; height: 44px; border-radius: 15px;
  display:flex; align-items:center; justify-content:center; color: var(--faint);
  transition: color .18s var(--ease), background .18s var(--ease); cursor:pointer;
}
.nav a svg{ width: 21px; height: 21px; }
.nav a:hover{ color: var(--text); background: oklch(0.22 0 0 / 0.7); }
.nav a.active{ color: var(--text); background: oklch(0.24 0 0 / 0.85); }
.nav a .tip{
  position:absolute; left: calc(100% + 14px); top:50%;
  transform: translateY(-50%) translateX(-6px);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 6px 11px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.nav a:hover .tip{ opacity: 1; transform: translateY(-50%) translateX(0); }

/* ── Progressive blur ───────────────────── */
.blur-fade{ position: fixed; left:0; right:0; bottom:0; height: 190px; z-index: 40; pointer-events: none; }
.blur-fade > div{ position:absolute; inset:0; }
.blur-fade .b1{ backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px);
  -webkit-mask: linear-gradient(to top,#000 0%,#000 15%,transparent 30%); mask: linear-gradient(to top,#000 0%,#000 15%,transparent 30%); }
.blur-fade .b2{ backdrop-filter: blur(2.5px); -webkit-backdrop-filter: blur(2.5px);
  -webkit-mask: linear-gradient(to top,transparent 12%,#000 27%,#000 42%,transparent 55%); mask: linear-gradient(to top,transparent 12%,#000 27%,#000 42%,transparent 55%); }
.blur-fade .b3{ backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  -webkit-mask: linear-gradient(to top,transparent 28%,#000 45%,#000 60%,transparent 75%); mask: linear-gradient(to top,transparent 28%,#000 45%,#000 60%,transparent 75%); }
.blur-fade .b4{ backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  -webkit-mask: linear-gradient(to top,transparent 48%,#000 68%,#000 84%,transparent 100%); mask: linear-gradient(to top,transparent 48%,#000 68%,#000 84%,transparent 100%); }
.blur-fade .tint{ background: linear-gradient(to top, var(--bg) 0%, oklch(0.035 0 0 / 0.7) 22%, transparent 60%); }

/* ── Responsive ─────────────────────────── */
@media (max-width: 760px){
  .nav{ left:50%; top:auto; bottom: 16px; transform: translateX(-50%); flex-direction:row; border-radius: 22px; }
  .nav a .tip{ display:none; }
  .blur-fade{ height: 130px; }
  .feed{ padding-bottom: 150px; }
  .proj-card{ grid-template-columns: 1fr; }
  .proj-card image-slot{ width:100%; height: 190px; }
  .contact-grid{ grid-template-columns: 1fr; }
  .form .row2{ grid-template-columns: 1fr; }
  .profil-head .ph-avatar{ width: 96px; height: 120px; }
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .view.is-active, .slide{ animation: none; }
}
