@font-face {
  font-family: "RobertBold";
  src: url("../font/roobert-font-family-1739094187-0/RoobertTRIAL-SemiBold-BF67243fd54213d.otf")
    format("opentype");
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "RobertRegular";
  src: url("../font/roobert-font-family-1739094187-0/RoobertMonoTRIAL-Regular-BF67243fd29a433.otf")
    format("opentype");
  font-weight: 200;
  font-style: normal;
}
@font-face {
  font-family: "RobertLight";
  src: url("../font/roobert-font-family-1739094187-0/RoobertMonoTRIAL-Light-BF67243fd27eae5.otf")
    format("opentype");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: "RoxboroughCF";
  src: url("../font/Rox/Roxborough\ CF.ttf") format("truetype");
  font-weight: lighter;
  font-style: normal;
}
@font-face {
  font-family: "Review";
  src: url("../font/review-font-family-1762405635-0/Review-Bold-Trial-BF63f6d0f63e8c8.otf")
    format("opentype");
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "ReviewMedium";
  src: url(../font/review-font-family-1762405635-0/Review-Medium-Trial-BF63f6d1052cbb4.otf)
    format("opentype");
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "ReviewLight";
  src: url(../font/review-font-family-1762405635-0/Review-Light-Trial-BF63f6d1043a304.otf)
    format("opentype");
  font-weight: 200;
  font-style: normal;
}

:root {
  --color-light: #f6f5ee;
  --color-grey-light: #cecece;
  --color-grey-dark: #8e8e8e;
  --color-dark: #141414;
  --color-primary: #383838;
  --color-background: var(--color-light);
  --color-text: var(--color-dark);
  --color-text-link: var(--color-dark);
  --color-text-link-hover: var(--color-dark);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--color-background);
  color: #383838;
  overflow-y: hidden; /* hide vertical scroll */
  overflow-x: auto; /* horizontal scroll only */
  scroll-behavior: smooth;
}

/* Navigation Menu */
/* MENU */
#nav-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  z-index: 1000;
  padding: 20px;
  margin: 0;
  border-bottom: dotted 1px var(--color-grey-dark);
}
.menu {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease-in-out, background 0.3s ease-in-out;
  background: transparent;
}

.menu__wrap {
  position: relative;
  overflow: hidden;
}

.menu__inner {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem; /* spacing between items */
  list-style: none;
  padding: 10px;
  margin: 0;
}

/* MENU LINKS */
.menu__link {
  position: relative;
  display: inline-block;
  color: var(--color-dark);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  font-family: "ReviewLight", serif;
  transition: color 0.3s ease;
  letter-spacing: -0.01em;
}

.menu__link:hover {
  color: #666;
  transition: color 0.3s ease;
}
.menu__link.active {
  font-weight: 700; /* ou bold */
  position: relative;
  font-family: "ReviewMedium", serif;
}
/* === HAMBURGER ICON === */
.menu-toggle {
  display: none; /* caché sur desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1101;
  position: absolute;
  right: 30px;
}

.menu-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: var(--color-dark);
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* animation burger -> croix */
.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* === MOBILE MENU === */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-background);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  visibility: visible;
  justify-content: center;
  align-items: center;
}

.mobile-menu__list {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 0;
}

.mobile-menu__list a {
  text-decoration: none;
  font-family: "ReviewMedium", serif;
  color: var(--color-dark);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.mobile-menu__list a:hover {
  color: var(--color-grey-dark);
}

/* TITLE */
.custom-title {
  font-weight: 200;
  font-size: 4rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text);
}
.custom-title a {
  text-decoration: none;
  color: inherit;
}
.custom-font {
  font-family: "Review", sans-serif;
  font-size: 1em;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: #383838;
  margin-right: 5px;
}
/* Le conteneur principal */
.container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* centre le titre */
  justify-content: space-around;
  margin: 20px 0;
  padding: 0 40px;
}
.scrolling-text {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-family: "RoxboroughCF", serif;
  font-size: 14px;
  font-weight: 300;
  color: #281212;
  text-align: right;
  padding-top: 30px;
  padding-right: 10px;
  font-style: italic;
}

/* Horizontal scrolling wrapper */
.projects-vertical {
  display: flex;
  flex-direction: column;
  width: 100%;
  justify-content: space-between;
}

/* Each project takes full viewport width */
.project {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  border-bottom: 1px dotted var(--color-grey-dark);
  padding: 20px 0;
}
.scrolling-text-vertical {
  font-family: "ReviewMedium", serif;
  font-size: 16px;
  font-weight: 300;
  color: #281212;
  text-decoration: underline;
}
.project-separator {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.project-title {
  width: 100%;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "ReviewMedium", serif;
  font-size: 15px;
  margin: 0;
}

.subtitle {
  font-size: 15px;
  color: #777;
  font-style: italic;
  font-family: "RobertLight", sans-serif;
}

.description {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  font-family: "RobertLight", sans-serif;
  max-width: 600px;
  letter-spacing: -0.02em;
}

.project-image {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  cursor: pointer;
}

.project-image img {
  width: 250px;
  height: 250px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.project-preview {
  display: none;
}

.bottom-preview {
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  transition: 0.3s ease;
  pointer-events: none;
  z-index: 999;
}

.bottom-preview.active {
  bottom: 100px;
}

.bottom-preview img {
  width: 100%;
  height: 230px;
  display: flex;
  object-fit: cover;
  border-radius: 2px;
}

@media screen and (max-width: 768px) {
  body {
    overflow-y: auto; /* allow vertical scroll on mobile */
    overflow-x: hidden; /* hide horizontal scroll on mobile */
  }
  /* Adjust layout for mobile */
  .hide-on-mobile {
    display: none !important;
  }

  .menu-toggle {
    display: flex; /* visible sur mobile */
  }
  .menu__inner {
    display: none;
  }
  .container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 0;
    padding: 20px;
  }
  .bottom-preview.active {
    bottom: 20px;
    display: flex;
    justify-content: center;
  }
  .bottom-preview img {
    width: 100%;
    max-width: 150px;
    height: 150px;
  }
  .project-title {
    max-width: 200px;
    gap: 8px;
  }
  .project-title h3 {
    max-width: 150px;
    font-size: 16px;
  }
  .description {
    display: none;
  }
  .mobile-menu__list ul li {
    font-family: "ReviewMedium", serif;
  }
}
/* Dark theme override */
html[data-theme="dark"] {
  --color-background: #141414; /* your --color-dark */
  --color-text: #f6f5ee; /* your --color-light */
  --color-text-link: #f6f5ee;
  --color-text-link-hover: #cecece;

  /* optional helpers for UI */
  --toggle-border: rgba(246, 245, 238, 0.25);
  --toggle-thumb: #f6f5ee;
}
.theme-toggle {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 9999;

  width: 62px;
  height: 32px;
  padding: 3px;

  border-radius: 999px;
  background: transparent;
  border: 2px solid var(--toggle-border);
  cursor: pointer;

  display: inline-flex;
  align-items: center;
}

.theme-toggle__thumb {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--toggle-thumb);
  transform: translateX(0);
  transition: transform 0.25s ease;
}

html[data-theme="dark"] .theme-toggle__thumb {
  transform: translateX(30px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

/* optional helpers for light mode UI */
:root {
  --toggle-border: rgba(20, 20, 20, 0.25);
  --toggle-thumb: #141414;
}
.menu__link {
  color: var(--color-text);
}
.divider h1 {
  color: var(--color-text) !important;
}
.menu-toggle .bar {
  background-color: var(--color-text);
}
.bloquereloj {
  color: var(--color-text);
}
.resume-text a {
  color: var(--color-text);
}
.custom-font {
  color: var(--color-text);
}
.project-title h3 {
  color: var(--color-text);
}
.description {
  color: var(--color-text);
}
.subtitle {
  color: var(--color-grey-dark);
}
.project-image p {
  color: var(--color-text);
}
.menu-toggle,
.bloquereloj h4,
.bloquereloj .clock {
  color: var(--color-text);
}
.menu-toggle .bar {
  background-color: var(--color-text) !important;
}
.mobile-menu__list a,
.menu__link-span {
  color: var(--color-text) !important;
}
.bottom-preview.active {
  bottom: 80px;
}

.bottom-preview img {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: flex;
  object-fit: cover;
  border-radius: 2px;
}
