/* ==========================================================================
   Florian METOZ — Portfolio / CV
   Dark theme, gold accent — pure HTML5 + CSS (no dependencies)
   ========================================================================== */

/* ----- Variables ---------------------------------------------------------- */
:root {
  --bg-dark:    #1a1925;   /* main background */
  --bg-section: #2f2d3c;   /* alternate section background */
  --bg-darker:  #13111b;   /* darkest background (header, footer) */
  --gold:       #c5945c;   /* primary gold accent */
  --gold-light: #d8af81;   /* light gold (hover) */
  --text:       #d8d7db;   /* body text */
  --white:      #ffffff;   /* headings */
  --muted:      #9a98a6;   /* secondary text */

  --font-head:  "Poppins", "Segoe UI", sans-serif;
  --font-slab:  "Roboto Slab", Georgia, serif;
  --font-body:  "Roboto", "Segoe UI", sans-serif;

  --container:  1200px;
  --radius:     6px;
  --transition: .3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;          /* offset for sticky header */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-dark);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
ul { list-style: none; }

/* ----- Layout ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }

/* Alternating bands to pace reading */
.section-alt { background: var(--bg-section); }

.section-pad { padding: 110px 0; }

/* ----- Typo ------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--white);
  line-height: 1.25;
  font-weight: 600;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.section-title .accent { color: var(--gold); }

/* small gold divider under titles */
.section-title::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  margin: 18px auto 0;
  background: var(--gold);
}

.section-sub {
  text-align: center;
  max-width: 760px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 1.02rem;
}

/* ----- Header / Nav ----------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: rgba(19, 17, 27, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(197, 148, 92, .18);
  transition: padding var(--transition), background var(--transition);
}

.site-header.shrink { padding: 0; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  transition: height var(--transition);
}
.site-header.shrink .header-inner { height: 64px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--white);
}
.brand .logo-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  font-size: .9rem;
  letter-spacing: 1px;
  color: var(--gold);
}
.brand .brand-name span { color: var(--gold); }

.main-nav ul {
  display: flex;
  gap: 6px;
}
.main-nav a {
  display: block;
  padding: 10px 16px;
  font-family: var(--font-head);
  font-size: .9rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text);
  border-radius: var(--radius);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--gold);
  background: rgba(197, 148, 92, .08);
}

/* burger menu (mobile) */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; gap: 5px;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  width: 26px; height: 2px; background: var(--gold);
  transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Buttons --------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 14px 34px;
  font-family: var(--font-head);
  font-size: .9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  color: var(--white);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}
.btn:hover {
  background: var(--gold);
  color: var(--bg-darker);
  transform: translateY(-2px);
}
.btn-solid { background: var(--gold); color: var(--bg-darker); }
.btn-solid:hover { background: var(--gold-light); border-color: var(--gold-light); }

/* ----- Hero / Home ----------------------------------------------------- */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(26, 25, 37, .55) 0%, rgba(19, 17, 27, .92) 100%),
    linear-gradient(180deg, rgba(19, 17, 27, .6), rgba(19, 17, 27, .85));
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 120px 24px 80px;
}
.hero-photo {
  width: 170px; height: 170px;
  margin: 0 auto 28px;
  border-radius: 50%;
  border: 4px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(197, 148, 92, .15), 0 14px 40px rgba(0, 0, 0, .5);
  object-fit: cover;
  background: var(--bg-section);
}
.hero-content h1 {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 1px;
}
.hero-content h1 span { color: var(--gold); }
.hero-tagline {
  font-family: var(--font-slab);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--gold-light);
  margin-top: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.hero-sub {
  color: var(--text);
  margin-top: 14px;
  font-size: 1.05rem;
}
.hero-actions { margin-top: 34px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.scroll-down {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--gold);
  font-size: 1.6rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 10px); }
}

/* ----- About / Introduce ----------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-top: 50px;
}
.about-text p { margin-bottom: 18px; }
.about-text .lead {
  font-family: var(--font-slab);
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 22px;
}
.about-cta { margin-top: 26px; }

.about-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 60px;
}
.feature {
  background: rgba(197, 148, 92, .04);
  border: 1px solid rgba(197, 148, 92, .15);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  transition: var(--transition);
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  background: rgba(197, 148, 92, .08);
}
.feature img { width: 64px; height: 64px; margin: 0 auto 18px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 10px; }
.feature p { font-size: .95rem; color: var(--muted); }

/* ----- Portfolio ------------------------------------------------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 50px;
}
.portfolio-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-section);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.portfolio-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.portfolio-item:hover img { transform: scale(1.06); }
.portfolio-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
  background: linear-gradient(180deg, rgba(19, 17, 27, 0) 30%, rgba(19, 17, 27, .95) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay h3 { color: var(--white); font-size: 1.3rem; }
.portfolio-overlay span { color: var(--gold); font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; }
.portfolio-item .portfolio-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 22px;
  background: linear-gradient(180deg, transparent, rgba(19, 17, 27, .9));
  z-index: 2;
}
.portfolio-item .portfolio-label h3 { font-size: 1.05rem; color: var(--white); }
.portfolio-item .portfolio-label span { color: var(--gold-light); font-size: .8rem; }

/* ----- Experience / Resume / Timeline ---------------------------------- */
.timeline {
  position: relative;
  margin-top: 50px;
  padding-left: 38px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 4px; bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), transparent);
}
.timeline-item {
  position: relative;
  padding-bottom: 42px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -38px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--bg-dark);
  box-shadow: 0 0 0 3px var(--gold);
}
.timeline-date {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  padding: 4px 12px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  margin-bottom: 8px;
}
.timeline-item h3 { font-size: 1.25rem; margin-bottom: 6px; }
.timeline-item p { color: var(--muted); }

.parcours {
  margin-top: 60px;
  padding: 40px;
  background: rgba(197, 148, 92, .04);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
}
.parcours p { margin-bottom: 16px; }
.parcours p:last-child { margin-bottom: 0; }

/* Formation list */
.formation-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 30px;
}
.formation-list li {
  background: rgba(197, 148, 92, .04);
  border: 1px solid rgba(197, 148, 92, .15);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.formation-list .f-org { color: var(--gold); font-family: var(--font-head); font-weight: 600; }
.formation-list .f-title { color: var(--white); display: block; }
.formation-list .f-year { color: var(--muted); font-size: .85rem; }

/* Language badges */
.lang-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.lang-badges .badge {
  padding: 8px 16px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: .85rem;
}
.lang-badges .badge b { color: var(--gold); }

@media (max-width: 760px) {
  .formation-list { grid-template-columns: 1fr; }
}

/* ----- Skills ---------------------------------------------------------- */
.skills-circles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
  text-align: center;
}
.skill-circle { display: flex; flex-direction: column; align-items: center; }
.skill-circle .circle {
  position: relative;
  width: 120px; height: 120px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--p, 75%), rgba(255, 255, 255, .08) 0);
  margin-bottom: 14px;
}
.skill-circle .circle::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--bg-section);
}
.skill-circle .circle .icon {
  position: relative;
  z-index: 1;
  color: var(--gold);
  font-size: 1.5rem;
  font-family: var(--font-head);
  font-weight: 600;
}
.skill-circle .label { font-family: var(--font-head); color: var(--white); font-size: .95rem; }
.skill-circle .sub { color: var(--muted); font-size: .8rem; margin-top: 2px; }

.skills-bars { margin-top: 60px; }
.skill-bar { margin-bottom: 24px; }
.skill-bar .bar-head {
  display: flex; justify-content: space-between;
  margin-bottom: 8px;
  font-family: var(--font-head);
  color: var(--white);
  font-size: .95rem;
}
.skill-bar .bar-head .pct { color: var(--gold); }
.skill-bar .bar {
  height: 8px;
  background: rgba(255, 255, 255, .08);
  border-radius: 4px;
  overflow: hidden;
}
.skill-bar .bar > span {
  display: block;
  height: 100%;
  width: var(--w, 80%);
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

/* ----- Contact --------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 50px;
}
.contact-info h3 { font-size: 1.4rem; margin-bottom: 18px; }
.contact-info p { margin-bottom: 18px; color: var(--muted); }
.contact-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.contact-list .ic {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-weight: 700;
}
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--gold); }
.contact-list img { height: 1.4em; width: auto; vertical-align: middle; }
.contact-link { cursor: pointer; }
.contact-link:hover img { opacity: .82; }

.contact-form .field { margin-bottom: 18px; }
.contact-form label {
  display: block;
  font-family: var(--font-head);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-light);
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-darker);
  border: 1px solid rgba(197, 148, 92, .2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .form-note { font-size: .8rem; color: var(--muted); margin-top: 8px; }
.form-status { margin-top: 14px; font-size: .9rem; min-height: 1.2em; }
.form-status--success { color: #8fd49c; }
.form-status--error { color: #e88b8b; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ----- Footer ---------------------------------------------------------- */
.site-footer {
  background: var(--bg-darker);
  border-top: 1px solid rgba(197, 148, 92, .18);
  padding: 40px 0;
  text-align: center;
}
.site-footer .sig { margin: 0 auto 16px; width: 195px; opacity: .9; }
.site-footer p { color: var(--muted); font-size: .9rem; }
.site-footer .social { margin-bottom: 16px; }
.site-footer .social a {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px;
  margin: 0 6px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-weight: 700;
  transition: var(--transition);
}
.site-footer .social a:hover { background: var(--gold); color: var(--bg-darker); }

/* ----- Portfolio detail page ------------------------------------------- */
.page-hero {
  padding: 160px 0 70px;
  text-align: center;
  background: var(--bg-darker);
  border-bottom: 1px solid rgba(197, 148, 92, .18);
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page-hero .crumb { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.page-hero .crumb a { color: var(--gold); }
.project {
  max-width: 900px;
  margin: 0 auto;
  padding: 70px 24px;
}
.project-cover {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .5);
  margin-bottom: 40px;
}
.project-cover img { width: 100%; }
.project h2 { font-size: 1.6rem; margin: 30px 0 16px; color: var(--gold); }
.project p { margin-bottom: 18px; }
.project .back {
  display: inline-block;
  margin-top: 20px;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: .85rem;
}

/* ----- Scroll animations --------------------------------------------------
   Without JS: .reveal elements animate on load (content always visible).
   With JS: the .js class is set on <html>, .reveal elements are hidden
   then revealed via .visible on scroll (IntersectionObserver). --------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: fadeUp .7s ease both; }

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: none;
  transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.visible { opacity: 1; transform: none; }

/* ----- Language switcher ---------------------------------------------- */
.header-right { display: flex; align-items: center; gap: 18px; }
.header-right .main-nav { order: 1; }
.header-right .lang-switch { order: 2; }
.header-right .nav-toggle { order: 3; }
.lang-switch { display: inline-flex; gap: 2px; border: 1px solid rgba(197,148,92,.3); border-radius: var(--radius); overflow: hidden; }
.lang-switch button { background: transparent; border: 0; color: var(--text); font-family: var(--font-head); font-size: .75rem; letter-spacing: 1px; padding: 7px 10px; cursor: pointer; text-transform: uppercase; transition: var(--transition); }
.lang-switch button:hover { color: var(--gold); }
.lang-switch button.active { background: var(--gold); color: var(--bg-darker); }

/* ----- Hero location line + formation heading ------------------------ */
.hero-sub-loc { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.formation-h3 { text-align: center; margin-top: 60px; color: var(--white); }

/* ----- Timeline role link --------------------------------------------- */
.timeline-item h3 a { color: var(--white); }
.timeline-item h3 a:hover { color: var(--gold); }

/* ----- Experience detail pages ---------------------------------------- */
.page-hero-role { font-family: var(--font-slab); color: var(--gold); font-size: 1.3rem; margin-top: 6px; letter-spacing: 1px; }
.exp-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; margin-top: 18px; padding: 0; }
.exp-meta li { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.exp-meta b { font-family: var(--font-head); font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.exp-meta span { color: var(--text); font-size: .95rem; }
.exp-tags { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.community-tags { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.exp-tags-label { font-family: var(--font-head); font-size: .75rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.exp-tags em, .community-tags em { font-style: normal; background: rgba(197,148,92,.08); border: 1px solid rgba(197,148,92,.2); color: var(--gold-light); border-radius: 20px; padding: 4px 12px; font-size: .8rem; font-family: var(--font-head); }

/* ----- Responsive ------------------------------------------------------ */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .skills-circles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 80px 0 auto 0;
    background: var(--bg-darker);
    border-bottom: 1px solid rgba(197, 148, 92, .18);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .main-nav.open { max-height: 420px; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
  }
  .main-nav a { padding: 14px 24px; border-radius: 0; }

  .section-pad { padding: 80px 0; }
  .about-features,
  .portfolio-grid { grid-template-columns: 1fr; }
  .skills-circles { grid-template-columns: 1fr 1fr; }
  .hero-photo { width: 130px; height: 130px; }
}

@media (max-width: 480px) {
  .skills-circles { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { display: block; }
}

/* ----- Reduce animations when requested by the user ------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
