@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --bg:#1c1410;
  --bg-alt:#241a14;
  --bg-raised:#2c2019;
  --text:#f2e9dc;
  --text-muted:#b8a894;
  --accent:#c9a04c;
  --accent-2:#a15c32;
  --border:rgba(242,233,220,0.14);
  --shadow: 0 20px 60px rgba(0,0,0,0.35);
  --radius: 2px;
}

[data-theme="nuit"]{
  --bg:#0d1321;
  --bg-alt:#141b2e;
  --bg-raised:#182238;
  --text:#eef1f7;
  --text-muted:#98a3bd;
  --accent:#d4af37;
  --accent-2:#3a5a8c;
  --border:rgba(238,241,247,0.14);
}

[data-theme="foret"]{
  --bg:#101812;
  --bg-alt:#16201a;
  --bg-raised:#1b271f;
  --text:#eef2ea;
  --text-muted:#9db19f;
  --accent:#c2874f;
  --accent-2:#4c7a58;
  --border:rgba(238,242,234,0.14);
}

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

html{scroll-behavior:smooth;}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{animation-duration:0.01ms !important; transition-duration:0.01ms !important;}
}

body{
  background:var(--bg);
  color:var(--text);
  font-family:'Manrope', sans-serif;
  line-height:1.6;
  transition:background 0.4s ease, color 0.4s ease;
  overflow-x:hidden;
}

a{color:inherit; text-decoration:none;}
ul{list-style:none;}
img{max-width:100%; display:block;}

.eyebrow{
  font-family:'IBM Plex Mono', monospace;
  font-size:0.72rem;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--accent);
  display:block;
  margin-bottom:0.9rem;
}

h1,h2,h3{
  font-family:'Fraunces', serif;
  font-weight:600;
  letter-spacing:-0.01em;
}

.container{
  max-width:1120px;
  margin:0 auto;
  padding:0 32px;
}

/* NAV */
header{
  position:fixed;
  top:0; left:0; right:0;
  z-index:100;
  background:rgba(28,20,16,0.82);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
  transition:background 0.4s ease, border-color 0.4s ease;
}
[data-theme="nuit"] header{background:rgba(13,19,33,0.82);}
[data-theme="foret"] header{background:rgba(16,24,18,0.82);}

nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 32px;
  max-width:1120px;
  margin:0 auto;
}

.logo{
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size:1.15rem;
  letter-spacing:0.01em;
}
.logo span{color:var(--accent);}

.nav-links{
  display:flex;
  gap:2.2rem;
  font-size:0.92rem;
}
.nav-links a{
  position:relative;
  padding-bottom:4px;
  color:var(--text-muted);
  transition:color 0.25s ease;
}
.nav-links a:hover, .nav-links a:focus-visible{color:var(--text);}
.nav-links a::after{
  content:'';
  position:absolute;
  left:0; bottom:0;
  width:0; height:1px;
  background:var(--accent);
  transition:width 0.25s ease;
}
.nav-links a:hover::after{width:100%;}

.nav-controls{
  display:flex;
  align-items:center;
  gap:0.6rem;
}

.pill-btn{
  font-family:'IBM Plex Mono', monospace;
  font-size:0.72rem;
  letter-spacing:0.06em;
  background:transparent;
  border:1px solid var(--border);
  color:var(--text-muted);
  padding:7px 12px;
  border-radius:20px;
  cursor:pointer;
  transition:all 0.25s ease;
}
.pill-btn:hover, .pill-btn:focus-visible{border-color:var(--accent); color:var(--accent);}
.pill-btn.active{border-color:var(--accent); color:var(--accent); background:rgba(201,160,76,0.08);}

.theme-dots{display:flex; gap:6px; margin-left:6px;}
.theme-dot{
  width:18px; height:18px;
  border-radius:50%;
  cursor:pointer;
  border:2px solid transparent;
  transition:border-color 0.2s ease, transform 0.2s ease;
}
.theme-dot:hover{transform:scale(1.12);}
.theme-dot.active{border-color:var(--text);}
.theme-dot[data-theme-btn="marron"]{background:linear-gradient(135deg,#c9a04c,#a15c32);}
.theme-dot[data-theme-btn="nuit"]{background:linear-gradient(135deg,#d4af37,#3a5a8c);}
.theme-dot[data-theme-btn="foret"]{background:linear-gradient(135deg,#c2874f,#4c7a58);}

.burger{display:none; background:none; border:none; color:var(--text); font-size:1.4rem; cursor:pointer;}

/* HERO */
.hero{
  min-height:100vh;
  display:flex;
  align-items:center;
  padding-top:80px;
  position:relative;
}

.hero-grid{
  display:grid;
  grid-template-columns:1.3fr 0.9fr;
  gap:60px;
  align-items:center;
  width:100%;
}

.hero-name{
  font-size:clamp(2.6rem, 6vw, 4.6rem);
  line-height:1.02;
  margin-bottom:1.1rem;
}
.hero-name em{
  font-style:italic;
  color:var(--accent);
}

.hero-role{
  font-size:1.15rem;
  color:var(--text-muted);
  max-width:44ch;
  margin-bottom:2.1rem;
}

.hero-cta{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.btn{
  font-family:'IBM Plex Mono', monospace;
  font-size:0.8rem;
  letter-spacing:0.05em;
  padding:14px 26px;
  border-radius:2px;
  cursor:pointer;
  border:1px solid transparent;
  transition:transform 0.2s ease, background 0.25s ease, border-color 0.25s ease;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn-primary{
  background:var(--accent);
  color:#1c1410;
}
.btn-primary:hover{transform:translateY(-2px);}
.btn-outline{
  border-color:var(--border);
  color:var(--text);
}
.btn-outline:hover{border-color:var(--accent); color:var(--accent);}

.hero-visual{
  aspect-ratio:1;
  border:1px solid var(--border);
  border-radius:2px;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 30% 20%, rgba(201,160,76,0.18), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(161,92,50,0.22), transparent 55%),
    var(--bg-alt);
  overflow:hidden;
}
[data-theme="nuit"] .hero-visual{
  background:
    radial-gradient(circle at 30% 20%, rgba(212,175,55,0.16), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(58,90,140,0.28), transparent 55%),
    var(--bg-alt);
}
[data-theme="foret"] .hero-visual{
  background:
    radial-gradient(circle at 30% 20%, rgba(194,135,79,0.18), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(76,122,88,0.26), transparent 55%),
    var(--bg-alt);
}

.hero-visual .initials{
  font-family:'Fraunces', serif;
  font-size:7.5rem;
  font-weight:500;
  color:var(--text);
  opacity:0.9;
}

.hero-visual .ring{
  position:absolute;
  inset:14%;
  border:1px solid var(--accent);
  border-radius:50%;
  opacity:0.35;
  animation:spin 40s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg);}}

.hero-stats{
  position:absolute;
  bottom:-1px;
  left:0; right:0;
  display:flex;
  border-top:1px solid var(--border);
  background:var(--bg-alt);
}
.hero-stats div{
  flex:1;
  text-align:center;
  padding:18px 8px;
  border-right:1px solid var(--border);
}
.hero-stats div:last-child{border-right:none;}
.hero-stats strong{
  display:block;
  font-family:'Fraunces', serif;
  font-size:1.5rem;
  color:var(--accent);
}
.hero-stats span{
  font-size:0.72rem;
  color:var(--text-muted);
  letter-spacing:0.03em;
}

/* SECTIONS */
section{padding:120px 0;}
.section-alt{background:var(--bg-alt);}

.section-head{
  max-width:640px;
  margin-bottom:56px;
}
.section-head h2{font-size:clamp(1.9rem, 3.4vw, 2.6rem);}

.lede{
  font-size:1.05rem;
  color:var(--text-muted);
  max-width:60ch;
}

/* ABOUT */
.about-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
}
.about-grid p{margin-bottom:1.1rem; color:var(--text-muted);}
.about-grid p strong{color:var(--text); font-weight:600;}

.edu-list{border-top:1px solid var(--border);}
.edu-item{
  padding:20px 0;
  border-bottom:1px solid var(--border);
}
.edu-item .school{font-family:'Fraunces', serif; font-size:1.05rem;}
.edu-item .deg{color:var(--text-muted); font-size:0.9rem; margin-top:2px;}
.edu-item .yr{
  font-family:'IBM Plex Mono', monospace;
  font-size:0.75rem;
  color:var(--accent);
}

/* EXPERTISE */
.expertise-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
  gap:1px;
  background:var(--border);
  border:1px solid var(--border);
}
.expertise-card{
  background:var(--bg);
  padding:36px 30px;
  transition:background 0.3s ease;
}
[data-theme="nuit"] .expertise-card,[data-theme="foret"] .expertise-card{background:var(--bg);}
.expertise-card:hover{background:var(--bg-raised);}
.expertise-card .num{
  font-family:'IBM Plex Mono', monospace;
  color:var(--accent);
  font-size:0.78rem;
  margin-bottom:1.2rem;
  display:block;
}
.expertise-card h3{font-size:1.15rem; margin-bottom:0.8rem;}
.expertise-card p{color:var(--text-muted); font-size:0.92rem;}

/* TIMELINE - signature element */
.timeline{
  position:relative;
  padding-left:32px;
  border-left:1px solid var(--border);
}
.tl-item{
  position:relative;
  padding-bottom:52px;
}
.tl-item:last-child{padding-bottom:0;}
.tl-item::before{
  content:'';
  position:absolute;
  left:-37px;
  top:6px;
  width:10px; height:10px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 4px var(--bg-alt);
}
body:has(#experience:not(.section-alt)) .tl-item::before{box-shadow:0 0 0 4px var(--bg);}

.tl-date{
  font-family:'IBM Plex Mono', monospace;
  font-size:0.78rem;
  color:var(--accent);
  display:block;
  margin-bottom:6px;
}
.tl-item h3{font-size:1.25rem; margin-bottom:2px;}
.tl-item .tl-sub{
  color:var(--text-muted);
  font-size:0.9rem;
  font-style:italic;
  margin-bottom:12px;
}
.tl-item ul{margin-top:8px;}
.tl-item li{
  color:var(--text-muted);
  font-size:0.92rem;
  padding-left:18px;
  position:relative;
  margin-bottom:6px;
}
.tl-item li::before{
  content:'—';
  position:absolute;
  left:0;
  color:var(--accent-2);
}

/* SKILLS */
.skills-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(200px,1fr));
  gap:28px;
}
.skill-block .eyebrow{margin-bottom:0.5rem;}
.skill-block h3{font-size:1.05rem; margin-bottom:10px;}
.skill-block p{color:var(--text-muted); font-size:0.92rem;}

/* CONTACT */
.contact-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:60px;
}

.contact-links{display:flex; flex-direction:column; gap:18px; margin-top:28px;}
.contact-links a{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 18px;
  border:1px solid var(--border);
  transition:border-color 0.25s ease, background 0.25s ease;
}
.contact-links a:hover{border-color:var(--accent); background:var(--bg-raised);}
.contact-links .ico{
  width:20px; height:20px;
  flex-shrink:0;
  color:var(--accent);
}

form{display:flex; flex-direction:column; gap:16px;}
.field{display:flex; flex-direction:column; gap:6px;}
label{
  font-family:'IBM Plex Mono', monospace;
  font-size:0.72rem;
  letter-spacing:0.05em;
  text-transform:uppercase;
  color:var(--text-muted);
}
input, textarea{
  background:var(--bg-alt);
  border:1px solid var(--border);
  color:var(--text);
  padding:13px 14px;
  font-family:'Manrope', sans-serif;
  font-size:0.95rem;
  border-radius:2px;
  transition:border-color 0.2s ease;
}
input:focus, textarea:focus{
  outline:none;
  border-color:var(--accent);
}
textarea{resize:vertical; min-height:110px;}

.form-note{
  font-size:0.8rem;
  color:var(--text-muted);
  margin-top:4px;
}
.form-status{
  font-size:0.85rem;
  min-height:1.2em;
  color:var(--accent);
}

/* FOOTER */
footer{
  border-top:1px solid var(--border);
  padding:36px 0;
}
.footer-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  font-size:0.82rem;
  color:var(--text-muted);
}

/* reveal on scroll */
.reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in{opacity:1; transform:none;}

/* language toggle text */
[data-lang-fr]{display:none;}
[data-lang-en]{display:none;}
html[lang="fr"] [data-lang-fr]{display:inherit;}
html[lang="en"] [data-lang-en]{display:inherit;}
html[lang="fr"] span[data-lang-fr], html[lang="fr"] div[data-lang-fr]{display:block;}
html[lang="en"] span[data-lang-en], html[lang="en"] div[data-lang-en]{display:block;}
html[lang="fr"] li[data-lang-fr]{display:list-item;}
html[lang="en"] li[data-lang-en]{display:list-item;}

/* RESPONSIVE */
@media (max-width:860px){
  .hero-grid{grid-template-columns:1fr;}
  .hero-visual{max-width:340px; margin:0 auto;}
  .about-grid, .contact-grid{grid-template-columns:1fr;}
  .nav-links{
    position:fixed;
    top:64px; left:0; right:0;
    flex-direction:column;
    background:var(--bg);
    border-bottom:1px solid var(--border);
    padding:20px 32px;
    gap:1rem;
    transform:translateY(-140%);
    transition:transform 0.3s ease;
  }
  .nav-links.open{transform:translateY(0);}
  .burger{display:block;}
  section{padding:80px 0;}
}

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
