:root{
  --bg:#f8fafc;
  --panel:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --accent:#2563eb;
  --accent2:#06b6d4;
  --border:rgba(15,23,42,0.12);
  --shadow: 0 18px 45px rgba(15,23,42,0.10);
}

*{ box-sizing:border-box; }
img{max-width:100%;height:auto;display:block;}


html{
  background: var(--bg);
}

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color:var(--text);
  min-height: 100vh;
  padding-bottom: 56px;
}

/* Light theme polish */
body::before{
  content:"";
  position:fixed;
  inset:0;
  background:
    radial-gradient(900px 500px at 12% 8%, rgba(37,99,235,0.12), transparent 55%),
    radial-gradient(900px 500px at 88% 12%, rgba(6,182,212,0.10), transparent 55%),
    radial-gradient(900px 500px at 50% 92%, rgba(37,99,235,0.08), transparent 60%);
  pointer-events:none;
  z-index:-1;
}

.card{
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(37,99,235,0.22);
  box-shadow: 0 22px 60px rgba(15,23,42,0.14);
}

.btn{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 14px 38px rgba(37,99,235,0.18);
}
.btn:hover{ filter: brightness(1.02); }

.btn-ghost{
  background: rgba(255,255,255,0.55);
}

.nav a{
  transition: background .12s ease, color .12s ease;
}

a:hover{
  color: var(--accent);
}


a{ color:inherit; text-decoration:none; }

.container{
  width:min(1100px, 92%);
  margin:0 auto;
}

.muted{ color: var(--muted); }
.is-hidden{ display: none; }

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(12px);
  background: rgba(248,250,252,0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}

.brand{
  font-weight:700;
  letter-spacing:0.3px;
}

.nav a{
  margin-left:14px;
  padding:8px 10px;
  border-radius:10px;
  color:var(--muted);
}

.nav a:hover{
  background: rgba(15,23,42,0.04);
  color:var(--text);
}

.nav a.active{
  color: var(--text);
  background: rgba(15,23,42,0.04);
}

.hero{ padding:48px 0 28px; }
.hero h1{ font-size:44px; margin:0 0 8px; }
.subtitle{ margin:0 0 18px; color:var(--muted); }

.lead{
  max-width:720px;
  line-height:1.6;
  color:var(--text);
}

.cta{
  margin:22px 0 10px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.btn{
  display:inline-block;
  padding:12px 16px;
  border-radius:14px;
  background: var(--accent);
  color:#ffffff;
  font-weight:650;
}

.btn:hover{ filter: brightness(1.05); }

.btn-ghost{
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover{ background: rgba(15,23,42,0.04); }

.quick-cards{
  margin-top:22px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}

.card{
  background: var(--panel);
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow: var(--shadow);
}

.card h3{ margin:0 0 6px; font-size:16px; }
.card p{ margin:0; color:var(--muted); line-height:1.5; }

.site-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding: 0;
  color: var(--muted);
}

@media (max-width: 900px){
  .quick-cards{ grid-template-columns: 1fr; }
  .hero h1{ font-size:34px; }
}

.page-head{ padding:26px 0 10px; }
.page-head h1{ margin:0 0 6px; font-size:30px; }

.timeline-wrap{
  margin-top:14px;
  border:1px solid var(--border);
  border-radius:18px;
  background: var(--panel);
  overflow:auto;
  cursor: grab;
  user-select:none;
  box-shadow: var(--shadow);
}

.timeline-wrap.dragging{ cursor: grabbing; }

.timeline{
  position:relative;
  height: 320px;
  padding: 52px 36px 34px;
  min-width: 900px;
}

.tl-axis{
  position:absolute;
  left: 36px;
  right: 36px;
  top: 50%;
  height: 2px;
  background: rgba(15,23,42,0.12);
  border-radius: 999px;
  z-index: 1;
}

.tl-year-line{
  position:absolute;
  top: 52px;
  bottom: 34px;
  width: 1px;
  background: rgba(15,23,42,0.10);
  z-index: 2;
}

.tl-year{
  position:absolute;
  top: -4px;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--muted);
  z-index: 50;
  pointer-events: none;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(248,250,252,0.86);
  backdrop-filter: blur(6px);
}

.tl-item{
  position:absolute !important;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align:left;
  z-index: 5;
}

.tl-dot{
  position:absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(37,99,235,0.95);
  box-shadow: 0 0 0 6px rgba(37,99,235,0.16);
  transform: translate(-50%, -50%);
  z-index: 20;
}

.tl-stem{
  position:absolute;
  left: 0;
  width: 2px;
  background: rgba(15,23,42,0.14);
  transform: translateX(-50%);
  z-index: 10;
}

.tl-card{
  position:absolute;
  left: 0;
  transform: translateX(-18px);
  width: var(--w, 320px);
  max-width: 760px;
  min-width: 240px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 10px 12px;
  box-shadow: var(--shadow);
  z-index: 12;
}

.tl-item[data-side="up"] .tl-stem{ bottom: 50%; height: 56px; }
.tl-item[data-side="up"] .tl-card{ bottom: calc(50% + 56px); }

.tl-item[data-side="down"] .tl-stem{ top: 50%; height: 56px; }
.tl-item[data-side="down"] .tl-card{ top: calc(50% + 56px); }

.tl-title{ display:block; font-weight:700; font-size:13px; line-height:1.2; }
.tl-sub{ display:block; color: var(--muted); font-size:12px; margin-top:2px; }
.tl-date{ display:block; color: var(--muted); font-size:11px; margin-top:6px; }

.tl-item.selected .tl-card{
  border-color: rgba(37,99,235,0.45);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}

.details{ margin-top: 18px; }

#detailsExtra.is-hidden{ display:none; }

.tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.04);
  color: var(--text);
  font-size: 13px;
}

.edu-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 900px){
  .edu-grid{ grid-template-columns: 1fr; }
}

.edu-title{ margin: 0 0 10px; }

.edu-items{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edu-item{
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.04);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  color: var(--text);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  text-align: left;
}

.edu-item:hover{ background: rgba(15,23,42,0.04); }

.edu-item.selected{
  border-color: rgba(37,99,235,0.45);
  box-shadow: var(--shadow);
}

.edu-years{ font-weight: 700; }

.edu-status{
  margin-top: 6px;
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.04);
  padding: 4px 8px;
  border-radius: 999px;
}

.edu-name{ font-weight: 700; }
.edu-school{ margin-top: 4px; }

.filter-row{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.input{
  flex: 1;
  min-width: 240px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.04);
  color: var(--text);
  outline: none;
}

.input::placeholder{ color: rgba(71,85,105,0.55); }

.input:focus{
  border-color: rgba(37,99,235,0.45);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
}

.skills-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 900px){
  .skills-grid{ grid-template-columns: 1fr; }
}

.skill-card{ height: 100%; }

.skill-title{
  margin: 0 0 6px;
  font-size: 18px;
}

.skill-tags{
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  grid-auto-rows: 44px;
  min-height: 160px;
}

@media (max-width: 900px){
  .skill-tags{ grid-template-columns: 1fr; }
}

.skill-tags .tag{
  width: 100%;
  height: 44px;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 14px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.skill-tags .tag:hover{
  transform: translateY(-1px);
  background: rgba(15,23,42,0.04);
  border-color: rgba(37,99,235,0.22);
}

.skill-tags .tag-text{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-badge{
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.04);
  color: var(--text);
}

.level-bases .tag-badge{
  background: rgba(15,23,42,0.04);
}

.level-moyen .tag-badge{
  border-color: rgba(37,99,235,0.35);
  background: rgba(37,99,235,0.10);
}

.level-operationnel .tag-badge{
  border-color: rgba(37,99,235,0.55);
  background: rgba(37,99,235,0.14);
}

.skill-tooltip{
  position: fixed;
  z-index: 99999;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid rgba(15,23,42,0.12);
  box-shadow: 0 12px 35px rgba(0,0,0,0.65);
  pointer-events: none;
  display: none;
  white-space: normal;
}

.skill-tooltip::before{
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-left: 1px solid rgba(15,23,42,0.12);
  border-top: none;
  transform: rotate(45deg);
  top: -6px;
  left: 16px;
}

.tl-card,
.tl-card * {
  color: var(--text);
}

.tl-sub,
.tl-date {
  color: var(--muted);
}

.level-avance .tag-badge{
  border-color: rgba(37,99,235,0.55);
  background: rgba(37,99,235,0.14);
}

.project-card{
  display:flex;
  flex-direction:column;
}
.project-card .cta{
  margin-top:auto;
}

.media-img{
  width: 100%;
  height: auto;
  display: block;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.03);
}

.media-img.tech-screenshot{
  max-width: 380px;
  width: 100%;
  height: auto;
  margin: 15px auto;
  display: block;
}

.media-img.tech-wide{
  max-width: 480px;
}

.codeblock{
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.03);
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.codeblock code{ white-space: pre; }

.card-full{
  grid-column: 1 / -1;
}

.nav{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
}

@media (max-width: 760px){
  .header-inner{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
  }
  .nav{
    width:100%;
    justify-content:flex-start;
  }
  .nav a{
    margin-left:0;
    padding:8px 10px;
    font-size:14px;
  }
}

@media (max-width: 520px){
  .container{ width:min(1100px, 92%); }
  .hero{ padding: 34px 0 18px; }
  .hero h1{ font-size: 28px; }
  .page-head h1{ font-size: 24px; }
  .btn{ width:100%; text-align:center; }
}

@media (max-width: 760px){
  .timeline{ min-width: 760px; height: 290px; padding: 48px 26px 26px; }
  .tl-card{ width: var(--w, 280px); min-width: 220px; }
}

@media (max-width: 520px){
  .timeline{ min-width: 640px; height: 270px; padding: 44px 22px 22px; }
  .tl-dot{ width: 10px; height: 10px; box-shadow: 0 0 0 5px rgba(37,99,235,0.16); }
  .tl-card{ width: var(--w, 260px); min-width: 210px; }
  .tl-title{ font-size: 13px; }
  .tl-sub{ font-size: 12px; }
}

@media (max-width: 520px){
  .edu-item{ grid-template-columns: 1fr; }
  .edu-years{ font-size: 13px; }
  .edu-status{ margin-top: 4px; }
}

@media (max-width: 520px){
  .skill-tags{ grid-auto-rows: auto; min-height: 0; }
  .tag{ white-space: normal; }
}

/* Profile photo reduced */
.profile-photo.small {
  max-width: 120px;
  margin: 20px auto 10px auto;
}
.profile-photo.small img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(15,23,42,0.20);
}

/* Photo next to name */
.name-photo {
  display: inline-block;
  vertical-align: middle;
  margin-left: 20px;
}
.name-photo img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(15,23,42,0.20);
}

@media (max-width: 768px) {
  .name-photo {
    display: block;
    margin: 15px 0 0 0;
  }
}

/* Hero name + photo aligned left */
.hero-title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(15,23,42,0.20);
}

@media (max-width: 768px) {
  .hero-title {
    flex-direction: row;
  }
}

/* FINAL strong reduction for technical screenshots */
.tech-screenshot,
.section img,
.project img {
  max-width: 280px;
  width: 100%;
  height: auto;
  display: block;
  margin: 15px auto;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .tech-screenshot,
  .section img,
  .project img {
    max-width: 90%;
    max-height: none;
  }
}

/* Fix hover for primary button (avoid full blue block) */
.btn-primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #ffffff;
}

.btn-primary:hover{
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  color: #ffffff;
}


/* Clean hover for "Voir mon parcours" */
.btn,
.btn-primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#ffffff;
  transition: background .15s ease, box-shadow .15s ease, transform .12s ease;
}

.btn:hover,
.btn-primary:hover{
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
  box-shadow: 0 12px 32px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}
