/* =========================
   GLOBAL SETTINGS
========================= */

/* Absans Regular */
@font-face {
  font-family: "Absans";
  src: url("../fonts/Absans-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root{
  --page-max: 1900px;
  --page-gutter: clamp(24px, 5vw, 64px);
  --section-space: clamp(60px, 16vh, 120px);

  --accent: #e0c167;
  --text: #fff;
  --bg: #000;

  /* Pertinaces scale */
  --container-max: 1100px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --title-size: clamp(1.6rem, 2.2vw, 2.2rem);
  --label-size: clamp(1.05rem, 1.4vw, 1.25rem);
  --text-size: clamp(1.15rem, 1.2vw, 1.05rem);
  --fg: hsl(0 0% 98%);
  --fg-dim: hsl(0 0% 82%);
  --fg-strong: hsl(0 0% 100%);
  --panel-bg: hsl(0 0% 100% / 0.06);
  --panel-stroke: hsl(0 0% 100% / 0.15);
  --panel-shadow: 0 8px 30px hsl(0 0% 0% / 0.25);

  
  
}

/* Base */
*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; color:var(--text); background:var(--bg); }
body{ font-family:"Absans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
h1,h2,h3,strong,.strong{ font-weight:700; }
a{ color:var(--accent); text-decoration:none; }

html { scroll-behavior: smooth; }                  /* smooth scroll for in-page anchors */
section[id] { scroll-margin-top: var(--header-h); }/* offset for fixed header */


/* Shared wrappers */
.wrap{ max-width:var(--page-max); margin-inline:auto; padding-inline:var(--page-gutter); }
.section{ padding-block: var(--section-space); }




/* =========================
   BACKGROUND VIDEO
========================= */
#bg-video{
  position:fixed; inset:0; width:100vw; height:100vh; object-fit:cover;
  opacity:.7; z-index:0; pointer-events:none;
}
body > *:not(#bg-video):not(#bg-overlay):not(header){ position:relative; z-index:1;  }




/* =========================
   HEADER
========================= */

:root { --header-h: clamp(58px, 6vw, 84px); }

header{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: rgba(0,0,0,.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}


.header__bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

/* Anton Nikulin */
.logo{ color:#fff; font-weight:700; font-size:25px; }

/* ---- Links (shared) ---- */
.nav__list a{ color:#fff; }
.nav__link{
  position: relative;
  display: inline-block;
  padding: .35rem .2rem;
  text-decoration: none;
  color: var(--fg, #fff);
  transition: color .25s ease;
}
.nav__link::after{
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform .28s ease-in-out;
}
.nav__link:hover,
.nav__link.is-active{ color: var(--accent); }
.nav__link:hover::after,
.nav__link.is-active::after{ transform: scaleX(1); }

@media (prefers-reduced-motion: reduce){
  .nav__link::after, .nav__link{ transition: none; }
}




/* =========================
   MOBILE FIRST (<=1000px)
========================= */
.nav__toggle { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  font-size: 1.6rem; line-height: 1;
  border: 0; border-radius: 10px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 1001; /* above All */
}


.nav__list{
  position: fixed;
  top: 0; right: 0;
  width: min(78vw, 320px);
  height: 100dvh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  transform: translateX(100%);     /* cachée */
  transition: transform .28s ease; /* Glissement fluide ; disponible uniquement sur mobile */
  z-index: 1000;
}
.nav__list.is-open { transform: translateX(0); }
.nav__list .nav__link{ display:block; padding:12px 4px; font-size:1.2rem; }




/* =========================
   DESKTOP (>1000px)
========================= */

/* cache le menu burger */
@media (min-width: 1001px){
  .nav__toggle { display: none; }
  .nav__list{
    position: static;     
    height: auto;
    width: auto;
    padding: 0;
    transform: none;    
    transition: none;      
    display: flex;
    flex-direction: row;
    gap: 30px;
    list-style: none;
    margin: 0;
    font-size: 20px;
    background: transparent;
    backdrop-filter: none;
  }
}




/* =========================
   INTRO
========================= */

/* tags du projet */
.intro__tag{
  margin: 0 0 .35rem;
  font-size: clamp(1.05rem, 1.6vw, 1.6rem);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-dim);     
  line-height: 1;
}
/* année du projet */
.intro__tag .year{ color: var(--accent); }


/* Code pour centrer le titre + année */
.intro{ min-height:100vh; min-height:100dvh; }
.intro__wrap{ min-height:inherit; display:grid; place-items:center; text-align:center; }
.intro__stack{ transform: translateY(-6vh); }
.intro__name{ margin:0; font-weight:800; font-size: clamp(2.8rem, 9vw, 8rem); }
.intro__cues{ display:flex; flex-direction:column; align-items:center; gap:6px; margin-top:8px; pointer-events:none; --cue-size:34px; }

@media (min-width:1200px){ .intro__cues{ --cue-size:40px;} }
.cue{ width:0; height:0; border-left:calc(var(--cue-size)*.5) solid transparent; border-right:calc(var(--cue-size)*.5) solid transparent; border-top:var(--cue-size) solid #e6e6e6; }
.has-js .intro__name{ opacity:0; transform:translateY(12px); }
.has-js .cue{ opacity:0; transform:translateY(-8px); }
@media (prefers-reduced-motion: reduce){ .has-js .intro__name, .has-js .cue{ opacity:1 !important; transform:none !important; } }
@media (max-width:600px){ .intro__stack{ transform: translateY(-3vh); } .intro__cues{ margin-top:6px; gap:4px; } }




/* =========================
   À PROPOS
========================= */
.about .about__grid{
--pad-block: clamp(1rem, 3vh, 2rem); /* was much larger */
  --grid-gap: clamp(2rem, 6vw, 8rem);

  display:grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(280px, .9fr);
  align-items:center; justify-content:start; gap:var(--grid-gap);
  padding-block: var(--pad-block);
  scroll-margin-top:80px;
}
#a-propos h2#about-title{ font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); line-height:1.1; margin:0 0 .75em; color: var(--accent);}
#a-propos p{ font-size: clamp(1.05rem, .9rem + .7vw, 1.35rem); line-height:1.8; margin:0 0 1.1em; }
#a-propos .color{ color:var(--accent); font-weight:700; }
#a-propos .btn-cv{
  display:inline-block;
  padding: clamp(.65rem, .5rem + .4vw, .9rem) clamp(1.1rem, .9rem + .8vw, 1.6rem);
  border-radius:9999px; border:2px solid var(--accent); background:transparent; color:var(--accent); font-weight:700; line-height:1;
transition: background-color .25s ease, color .25s ease, transform .15s ease;}
#a-propos .btn-cv:hover{
  background-color: var(--accent);
  color: var(--bg, #000);
}
#a-propos .photo{
  width:min(520px,90%); aspect-ratio:4/5; border-radius:1.25rem; display:grid; place-items:center;
  font-weight:700; letter-spacing:.08em;
  background: rgba(255,255,255,.08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 48px rgba(0,0,0,.28); justify-self:end;
  
}
@media (max-width: 900px) {
  /* One column layout */
  .about .about__grid {
    grid-template-columns: 1fr;
    justify-items: center;  /* center all grid children horizontally */
    /* align-items: start;   optional, keeps items starting at top of their grid area */
    row-gap: clamp(1rem, 2vw, 1.5rem);
  }

  /* Put the photo first and center it */
  #a-propos .photo {
    order: -1;               /* move before text on mobile */
    justify-self: center;    /* override the desktop justify-self:end */
    margin-inline: auto;     /* safe extra centering */
    margin-bottom: 1.25rem;  /* your existing spacing */
  }

  /* Center the text block too (optional but usually desired) */
  #a-propos .textes {
    justify-self: center;
    text-align: center;
    max-width: 70ch;         /* tidy line length on small screens */
  }
}

/* kill any leftover fades */
#a-propos{ opacity:1 !important; transform:none !important; animation:none !important; transition:none !important; }





/* =========================
   PERTINACES
========================= */
.pertinaces{ color:var(--fg); }
.pertinaces__header{ text-align:center; margin-bottom: calc(var(--section-space) * .4); }
.pertinaces__title{ font-size:var(--title-size); line-height:1.2; letter-spacing:.02em; font-weight:700; color:var(--fg-strong); margin:0 0 .5rem; }
.pertinaces__intro{ font-size:var(--text-size); line-height:1.6; color:var(--fg-dim); margin:0; max-width:60ch; margin-inline:auto; }
.pertinaces__grid{ --cols:3; display:grid; grid-template-columns: repeat(var(--cols), minmax(0,1fr)); gap:var(--gap); list-style:none; margin:0; padding:0; }
@media (max-width:960px){ .pertinaces__grid{ --cols:2; } }
@media (max-width:640px){ .pertinaces__grid{ --cols:1; } }
.pertinaces__item{
  background: transparent;
  border-radius: 16px;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  box-shadow: none;
  transition: transform .25s ease, border-color .25s ease;
}
.pertinaces__item:hover{
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.28);
}

/* icon tile: no blur, no border, just the image */
.pertinaces__icon{
  inline-size: auto;
  block-size: auto;
  display: block;
  margin-bottom: 1.5rem;
  border: 0;
  background: transparent;
}

/* the actual PNG size */
.pertinaces__icon img{
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
}

.pertinaces__label{ font-size:var(--label-size); line-height:1.3; margin:0 0 1rem; color:var(--fg-strong); font-weight:700; letter-spacing:.01em; }
.pertinaces__text{ font-size:var(--text-size); line-height:1.65; color:var(--fg-dim); margin:0; }

.color { color: var(--accent); }





/* =========================
   LOGICIELS (skills)
========================= */

.skills h2{ margin:0 0 .5rem; }
.skills .logo-marquee{ --height:116px; --gap:48px; }
@media (max-width:1400px){ .skills .logo-marquee{ --height:104px; --gap:40px; } }
@media (max-width:1200px){ .skills .logo-marquee{ --height:96px; --gap:36px; } }
@media (max-width:1024px){ .skills .logo-marquee{ --height:84px; --gap:28px; } }
@media (max-width:768px){  .skills .logo-marquee{ --height:68px; --gap:22px; } }
@media (max-width:520px){  .skills .logo-marquee{ --height:56px; --gap:18px; } }

.logo-marquee{
  width:100%; overflow:hidden; cursor:grab;
  -webkit-mask-image: linear-gradient(to right, transparent 0, black var(--page-gutter), black calc(100% - var(--page-gutter)), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, black var(--page-gutter), black calc(100% - var(--page-gutter)), transparent 100%);
}
.logo-marquee.is-dragging{ cursor:grabbing; }
.logo-track{ display:flex; align-items:center; gap:var(--gap); width:max-content; will-change:transform; transform:translate3d(0,0,0); }
.logo-track li{ list-style:none; }
.logo-track img{ height:var(--height); width:auto; display:block; opacity:.85; filter:grayscale(100%) brightness(.85); transition: transform .2s ease, filter .2s ease, opacity .2s ease; user-select:none; -webkit-user-drag:none; }
.logo-track img:hover{ transform:scale(1.06); filter:none; opacity:1; }
.logo-label{ min-height:1.6em; text-align:center; margin-bottom:6px; font-size:clamp(1rem, 2.4vw, 1.25rem); font-weight:700; color:var(--accent); letter-spacing:.02em; opacity:0; transform:translateY(6px); pointer-events:none; }




/* =========================
   PROJECTS
========================= */
.projects__inner h2{ font-size:clamp(2rem, 3.2vw, 2.6rem); margin:0 0 20px; color:#e6e6e6; }
.carousel:focus-visible{ outline:2px solid var(--accent); outline-offset:6px; border-radius:12px; }
.carousel__row{ display:flex; gap:22px; border-radius:16px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.02); padding:18px; backdrop-filter: blur(6px);}
.card{ position:relative; display:block; min-height:clamp(360px, 28vw, 520px); flex:1 1 0; transition:flex-grow .35s ease, filter .35s ease; overflow:hidden; border-radius:14px; }
.card.is-active{ flex-grow:1.4; }
.card__img{ width:100%; height:100%; object-fit:cover; display:block; filter:grayscale(.8) brightness(.85) contrast(1.05); transition:filter .28s ease; }
.card.is-active .card__img{ filter:none; }
.card__caption{ position:absolute; inset-inline:0; bottom:0; padding:14px 16px; font-size:clamp(1rem, 1.1vw, 1.15rem); color:#ddd; background:linear-gradient(to top, rgba(0,0,0,.5), rgba(0,0,0,0)); }
.card__link{ display:block; height:100%; }
.card__link:focus-visible{ outline:2px solid var(--accent); outline-offset:-4px; border-radius:10px; }

@media (max-width:900px){
  .carousel__row{ flex-wrap:wrap; gap:16px; padding:14px; }
  .card{ flex:1 1 calc(50% - 16px); min-height:300px; }
  .card.is-active{ flex-basis: calc(100% - 16px); }
}




/* =============== 
CONTACT / FOOTER SECTION 
=============== */



#contact.contact{
  /* make it taller like the example */
  --section-space: clamp(4rem, 14vh, 18rem);

  text-align: center;
    inset: var(--panel-pad);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.06);
  z-index: -1;
}




#contact .wrap{
  max-width: 900px;
  margin-inline: auto;
}

/* links row */
.contact__links{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 2vw, 20px);
  padding: 0;
  margin: clamp(18px, 3vh, 28px) 0 0;
  list-style: none;
}

/* pill buttons */
.contact__btn{
  display: inline-block;
  font-size: clamp(1rem, 1.2vw, 1.15rem);   /* bigger text */
  line-height: 1;
  padding: .9rem 1.3rem;
  border: 2px solid var(--accent);
  border-radius: 9999px;
  color: var(--fg);
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease, transform .15s ease;
  color:var(--accent);
}

.contact__btn:hover{
  background-color: var(--accent);
  color: var(--bg, #000);
}

.contact__note{
  margin-top: clamp(14px, 2vh, 22px);
  color: var(--fg-dim);
  font-size: clamp(.95rem, 1vw, 1.05rem);
}




/* =========================
   REDUCED MOTION
========================= */
@media (prefers-reduced-motion: reduce){
  .logo-track{ transform:none !important; }
}


/* === Unified section H2 === */

#pertinaces h2,
#logiciels h2,
#projects h2,
#contact h2{
  font-size: 40px;
  color: var(--accent);         
  letter-spacing: .02em;
  margin: 0 0 2rem;
}


/* Center the whole article like sections on the home page */
.project {
  max-width: 1100px;   /* same spirit as your site’s inner widths */
  margin-inline: auto;
}

/* Keep the hero image centered and not too wide */
.project__cover {
  width: 100%;
  max-width: 1200px;   /* prevents 'full-bleed' look */
  height: auto;
  display: block;
  margin-inline: auto; /* centers the img inside the hero */
  border-radius: 14px;
}

/* Optional: give the gallery the same column width */
.project__gallery,
.project__header,
.project__links,
.project__tech,
.project__content .project__rich {
  max-width: 800px;
  margin-inline: auto;
}


/* =========================
   PHOTO
========================= */
/* Le bloc rectangle */
.photo{
  /* occupe toute la largeur du card */
  width: 100%;
  /* donne une hauteur fixe relative (ajuste le ratio si besoin) */
  aspect-ratio: 16 / 9;             /* ex: 3/2, 4/3 selon ta carte */
  border-radius: 16px;
  overflow: hidden;                  /* masque ce qui dépasse (crop) */
  background: #000;                  /* évite flash translucide */
}

/* L’image remplit 100% du rectangle et se centre */
.photo img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;                 /* zoom/crop pour remplir */
  object-position: 50% 50%;          /* centre; ex: 50% 40% si tu veux un peu plus haut */
}

/* Si ta grille “À propos” ne tend pas l’élément à la hauteur de la carte */
.about .photo{ align-self: stretch; }  /* optionnel selon ta grid */
