/* variables */
:root {
  --bg:           #0c0c0c;
  --bg2:          #111111;
  --border:       #1a1a1a;
  --border2:      #252525;
  --text:         #f0f0f0;
  --text2:        #909090;
  --text3:        #5a5a5a;
  --text4:        #484848;
  --input-bg:     #141414;
  --input-border: #252525;
  --input-text:   #cccccc;
  --pill-border:  #252525;
  --pill-text:    #555555;
  --back-col:     #4e4e4e;
  --strip-idle:   #2a2a2a;
}

body.light {
  --bg:           #f0ede6;
  --bg2:          #e8e4db;
  --border:       #dedad2;
  --border2:      #c8c4bc;
  --text:         #1a1a1a;
  --text2:        #606060;
  --text3:        #999999;
  --text4:        #bbbbbb;
  --input-bg:     #e8e4db;
  --input-border: #c8c4bc;
  --input-text:   #333333;
  --pill-border:  #c8c4bc;
  --pill-text:    #777777;
  --back-col:     #aaaaaa;
  --strip-idle:   #dedad2;
}


/* reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

a, button, .nav-item {
  touch-action: manipulation;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.4s;
}


/* layout */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

#left-strip {
  width: 3px;
  background: var(--strip-idle);
  flex-shrink: 0;
  position: relative;
  transition: background 0.5s;
}

#left-accent {
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 0;
  transition: height 0.75s cubic-bezier(.4, 0, .2, 1), background 0.4s;
}

#main {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

#content-wrap {
  position: relative;
  width: 100%;
  max-width: 1280px;
  height: 100%;
  overflow: hidden;
  margin: 0 auto;
}


/* boutons */
#toggle-btn {
  position: absolute;
  top: 22px;
  right: max(24px, calc((100% - 1280px) / 2 + 24px));
  z-index: 200;
  background: transparent;
  border: 0.5px solid var(--border2);
  border-radius: 20px;
  padding: 7px 18px;
  color: var(--text3);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: border-color 0.2s, color 0.2s;
}
#toggle-btn:hover { border-color: var(--text2); color: var(--text2); }

.back-btn {
  position: absolute;
  top: 22px; left: 20px;
  z-index: 100;
  background: transparent;
  border: none;
  color: var(--back-col);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.back-btn:hover { color: var(--text); }


/* accueil */
#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 60px;
  width: 100%;
  position: absolute;
  inset: 0;
  transition: opacity 0.4s, transform 0.4s;
}
#home.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-24px);
}

.home-name {
  font-size: 62px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
  white-space: nowrap;
  transition: color 0.4s;
}
.home-cta {
  font-size: 15px;
  color: var(--text3);
  letter-spacing: 0.12em;
  margin-bottom: 48px;
  transition: color 0.4s;
}

.nav-list { list-style: none; max-width: 420px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.4s;
}
.nav-item:last-child { border-bottom: none; }

.nav-arrow {
  font-size: 12px;
  color: var(--text4);
  width: 16px;
  flex-shrink: 0;
  display: inline-block;
  transition: color 0.2s, transform 0.2s;
}
.nav-item:hover .nav-arrow { color: var(--text); transform: translateX(5px); }

.nav-label {
  font-size: 20px;
  font-weight: 300;
  color: var(--text2);
  flex: 1;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.nav-item:hover .nav-label { color: var(--text); }

.nav-num {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.08em;
}


/* mini-nav sections */
.sec-nav {
  display: flex;
  gap: 14px;
  margin-top: 36px;
}
.sec-nav-item {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text4);
  cursor: pointer;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  touch-action: manipulation;
  user-select: none;
}
.sec-nav-item:hover { color: var(--text2); }
.sec-nav-item.current { border-bottom-color: currentColor; }


/* sections */
.section-panel {
  display: flex;
  width: 100%; height: 100%;
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s;
  transform: translateX(24px);
}
.section-panel.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.sec-left {
  width: 420px;
  flex-shrink: 0;
  padding: 32px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 0.5px solid var(--border);
  transition: border-color 0.4s;
}
.sec-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.sec-num {
  font-size: 80px;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 20px;
  opacity: 0.14;
  letter-spacing: -0.03em;
}
.sec-title {
  font-size: 40px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  transition: color 0.4s;
}
.sec-desc {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.8;
  max-width: 300px;
  transition: color 0.4s;
}

.sec-right {
  flex: 1;
  padding: 48px 64px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sec-right::-webkit-scrollbar { width: 3px; }
.sec-right::-webkit-scrollbar-track { background: transparent; }
.sec-right::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }


/* composants */
.content-block { margin-bottom: 26px; }

.block-title {
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 10px;
  transition: color 0.4s;
}
.block-body {
  font-size: 17px;
  color: var(--text2);
  line-height: 1.85;
  transition: color 0.4s;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pill {
  font-size: 10px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 0.5px solid var(--pill-border);
  color: var(--pill-text);
  letter-spacing: 0.05em;
  transition: border-color 0.4s, color 0.4s;
}

.sub-label {
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.exp-item {
  padding: 22px 0;
  border-bottom: 0.5px solid var(--border);
  transition: border-color 0.4s;
}
.exp-item:last-child { border-bottom: none; }

.exp-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.exp-role {
  font-size: 19px;
  color: var(--text);
  font-weight: 400;
  transition: color 0.4s;
}
.exp-date {
  font-size: 13px;
  color: var(--text4);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.4s;
}
.exp-co {
  font-size: 14px;
  margin-bottom: 7px;
}
.exp-desc {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.7;
  transition: color 0.4s;
}


/* projets */
.proj-card {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 0.5px solid var(--border);
  transition: border-color 0.4s;
}
.proj-card:last-child { border-bottom: none; }

.proj-thumb {
  width: 110px; height: 70px;
  border-radius: 6px;
  background: var(--bg2);
  flex-shrink: 0;
  overflow: hidden;
  border: 0.5px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s, border-color 0.4s;
}
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-placeholder {
  font-size: 9px;
  color: var(--text4);
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.4;
  padding: 4px;
}

.proj-info { flex: 1; min-width: 0; }
.proj-title {
  font-size: 19px;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 4px;
  transition: color 0.4s;
}
.proj-stack { font-size: 12px; margin-bottom: 6px; }
.proj-desc {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.7;
  transition: color 0.4s;
}

a.proj-card--link {
  text-decoration: none;
  color: inherit;
  display: flex;
}
.proj-card--link:hover { border-color: var(--border2); }
.proj-card--link:hover .proj-title { color: var(--text); }
.proj-card--link:hover .proj-thumb { border-color: var(--text4); }

.proj-cta {
  font-size: 11px;
  color: var(--text4);
  margin-top: 8px;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.proj-card--link:hover .proj-cta { color: var(--text2); }


/* contact */
.contact-line {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 0.5px solid var(--border);
  transition: border-color 0.4s;
}
.contact-line:last-child { border-bottom: none; }

.contact-key {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text4);
  width: 76px;
  flex-shrink: 0;
  transition: color 0.4s;
}
.contact-val {
  font-size: 17px;
  color: var(--text2);
  transition: color 0.4s;
}
.contact-val a { color: inherit; text-decoration: none; }
.contact-val a:hover { color: var(--text); }

.cf { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }

.cf-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 6px;
  transition: color 0.4s;
}
.cf-input {
  width: 100%;
  background: var(--input-bg);
  border: 0.5px solid var(--input-border);
  border-radius: 20px;
  padding: 12px 18px;
  color: var(--input-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.4s, color 0.4s;
}
.cf-input:focus { border-color: var(--text2); }

.cf-textarea {
  width: 100%;
  background: var(--input-bg);
  border: 0.5px solid var(--input-border);
  border-radius: 12px;
  padding: 12px 18px;
  color: var(--input-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: none;
  height: 90px;
  transition: border-color 0.2s, background 0.4s, color 0.4s;
}
.cf-textarea:focus { border-color: var(--text2); }

.cf-btn {
  align-self: flex-start;
  background: transparent;
  border: 0.5px solid var(--border2);
  border-radius: 20px;
  padding: 10px 26px;
  color: var(--text2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: border-color 0.2s, color 0.2s;
}
.cf-btn:hover { border-color: var(--text2); color: var(--text); }

#cf-success {
  font-size: 12px;
  color: #1a6b4a;
  margin-top: 6px;
  display: none;
}


/* tablette */
@media (min-width: 641px) and (max-width: 900px) {
  .home-name { font-size: 44px !important; }
  .home-cta  { font-size: 13px !important; }
  .nav-label { font-size: 16px !important; }
  .sec-title { font-size: 28px !important; }
  .sec-num   { font-size: 56px !important; }
}


/* mobile */
@media (max-width: 640px) {
  html, body { overflow: hidden; height: 100%; }

  #app {
    flex-direction: column;
    height: 100%;
    height: 100svh;
    overflow: hidden;
  }

  #left-strip { width: 100%; height: 3px; flex-shrink: 0; }
  #left-accent {
    width: 0; height: 3px;
    transition: width 0.75s cubic-bezier(.4, 0, .2, 1), background 0.4s;
  }

  #main { flex: 1; position: relative; overflow: hidden; height: auto; }

  #content-wrap {
    position: absolute;
    inset: 0;
    height: auto;
    overflow: hidden;
    max-width: 100%;
    margin: 0;
  }

  #toggle-btn { right: 16px !important; top: 18px; }

  #home {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 56px 28px 48px !important;
    justify-content: center;
  }
  #home.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-16px);
  }

  .home-name { font-size: 30px !important; white-space: normal; }
  .nav-list { max-width: 100%; }

  .section-panel {
    position: absolute;
    inset: 0;
    flex-direction: column;
    height: 100%;
    min-height: unset;
    transform: translateX(16px);
    opacity: 0;
    pointer-events: none;
    display: flex;
  }
  .section-panel.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
  }

  .sec-left {
    width: 100% !important;
    flex-shrink: 0;
    padding: 52px 28px 14px !important;
    border-right: none;
    border-bottom: 0.5px solid var(--border);
    justify-content: flex-start;
  }
  .sec-num   { display: none; }
  .sec-title { font-size: 22px !important; margin-bottom: 0; }
  .sec-desc  { display: none; }
  .sec-nav   { margin-top: 10px; }

  .sec-right {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 20px 24px 64px !important;
  }

  .back-btn { top: 18px; left: 16px; }

  .exp-top { flex-direction: column; gap: 1px; }
  .proj-thumb { width: 72px; height: 46px; }

  .cf-input, .cf-textarea { font-size: 16px !important; }
}
