:root {
  --bg: #05070a;
  --card-bg: #0a0d12;
  --border: #1b2129;
  --accent: #38bdf8;
  --accent-light: #7dd3fc;
  --text-primary: #e6e9ef;
  --text-secondary: #b7bec9;
  --text-tertiary: #8b93a1;
  --text-label: #6f7885;

  --font-display: 'Sora', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(900px 500px at 15% -5%, rgba(56, 189, 248, .09), transparent 60%), var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

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

.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Availability badge */

.availability {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--text-tertiary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* Bento grid */

.bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
}

.card--span2 {
  grid-column: span 2;
}

@media (max-width: 620px) {
  .card--span2 {
    grid-column: span 1;
  }
}

/* Card base + hover micro-interaction */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card:hover {
  border-color: rgba(56, 189, 248, .55);
  box-shadow: 0 0 48px rgba(56, 189, 248, .10), 0 0 0 1px rgba(56, 189, 248, .25);
  transform: translateY(-2px);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 16px;
  color: var(--text-primary);
}

.card-title--lg {
  font-weight: 800;
  font-size: clamp(24px, 2.4vw, 26px);
  letter-spacing: -.02em;
  margin: 0;
}

/* Hero */

.card--hero {
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 360px;
  gap: 18px;
  padding: 40px;
  background: radial-gradient(600px 300px at 50% 110%, rgba(56, 189, 248, .14), transparent 70%), var(--card-bg);
}

.card--hero:hover {
  transform: none;
  box-shadow: 0 0 64px rgba(56, 189, 248, .14), 0 0 0 1px rgba(56, 189, 248, .25);
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--accent);
  margin: 0;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 6.5vw, 92px);
  line-height: .95;
  letter-spacing: -.04em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .18em;
  flex-wrap: wrap;
  justify-content: center;
}

/* About */

.about-text {
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 16px 0 0;
  font-size: 15.5px;
}

/* Profil */

.card--profil {
  align-items: center;
  text-align: center;
  gap: 14px;
}

.avatar-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 4px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 28px rgba(56, 189, 248, .35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.profil-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #05070a;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(56, 189, 248, .25);
  transition: all 0.2s;
}

.download-btn:hover {
  background: var(--accent-light);
  color: #05070a;
  box-shadow: 0 0 32px rgba(56, 189, 248, .5);
  transform: translateY(-1px);
}

.linkedin-link {
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.linkedin-link:hover {
  color: var(--accent);
}

/* Journey / Timeline */

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.card-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-label);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 16px;
}

.timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
  background: var(--card-bg);
  border: 2px solid var(--accent);
}

.timeline-line {
  flex: 1;
  width: 2px;
  background: linear-gradient(var(--accent), rgba(56, 189, 248, .15));
}

.timeline-item:last-child .timeline-line {
  background: transparent;
}

.timeline-btn {
  all: unset;
  display: block;
  cursor: pointer;
  border-radius: 12px;
  padding: 6px 10px 18px;
  margin: 0 -10px;
  transition: background .2s;
  width: calc(100% + 20px);
}

.timeline-btn:hover,
.timeline-btn:focus-visible {
  background: rgba(56, 189, 248, .06);
}

.timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.timeline-text {
  min-width: 0;
}

.timeline-role {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: #fff;
}

.timeline-company {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.timeline-dates {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-top: 3px;
}

.timeline-chevron {
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
  flex-shrink: 0;
}

/* Stack */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
  align-content: space-evenly;
}

.stack-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: all .25s;
}

.stack-item:hover {
  border-color: rgba(56, 189, 248, .4);
  background: rgba(56, 189, 248, .07);
  transform: translateY(-2px);
}

.stack-item img {
  display: block;
  width: 34px;
  height: 34px;
}

.stack-label {
  font-size: 12.5px;
  color: #d4dae3;
  text-align: center;
  line-height: 1.2;
}

/* Mantra + Langues */

.card--stacked-col {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card--stacked-col .card {
  flex: 1;
}

.mantra-quote {
  font-style: italic;
  color: #d4dae3;
  margin: 0 0 12px;
  line-height: 1.55;
  font-size: 16px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-light);
  border: 1px solid rgba(56, 189, 248, .3);
  border-radius: 999px;
  padding: 4px 10px;
}

.lang-row {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lang-row:last-child {
  margin-bottom: 0;
}

.lang-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

.lang-name {
  font-weight: 600;
  color: #fff;
}

.lang-level {
  color: var(--text-tertiary);
  font-size: 12.5px;
  text-align: right;
}

.lang-bar {
  height: 6px;
  border-radius: 999px;
  background: #151a22;
  overflow: hidden;
}

.lang-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, var(--accent));
  box-shadow: 0 0 10px rgba(56, 189, 248, .5);
  transition: width .6s ease;
}

/* Formation */

.formation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.formation-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.formation-year {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  padding-top: 2px;
}

.formation-title {
  font-weight: 600;
  font-size: 14.5px;
  color: #fff;
}

.formation-place {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Certifications */

.cert-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #1f2733;
  background: #0e1219;
  transition: border-color .2s;
  margin-bottom: 12px;
}

.cert-card:last-child {
  margin-bottom: 0;
}

.cert-card:hover {
  border-color: rgba(56, 189, 248, .5);
}

.cert-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(56, 189, 248, .12);
  border: 1px solid rgba(56, 189, 248, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
}

.cert-title {
  font-weight: 600;
  font-size: 14.5px;
  color: #fff;
}

.cert-place {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* En cours */

.en-cours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.en-cours-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.diamond {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, .6);
  transform: rotate(45deg);
}

.en-cours-title {
  font-weight: 600;
  font-size: 14.5px;
  color: #fff;
}

.en-cours-sub {
  font-size: 13px;
  color: var(--text-tertiary);
}

.en-cours-note {
  margin: 0;
  font-size: 13px;
  font-style: italic;
  line-height: 1.45;
  color: #bfe9fb;
  background: rgba(56, 189, 248, .10);
  border: 1px solid rgba(56, 189, 248, .25);
  border-radius: 12px;
  padding: 12px 14px;
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 4px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-label);
}

/* Modal */

.modal {
  border: 1px solid rgba(56, 189, 248, .4);
  border-radius: 24px;
  background: var(--card-bg);
  color: var(--text-primary);
  padding: 36px 38px;
  width: min(720px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, .15), 0 30px 90px rgba(0, 0, 0, .6), 0 0 80px rgba(56, 189, 248, .12);
  flex-direction: column;
  gap: 18px;
}

.modal[open] {
  display: flex;
  animation: modalIn .25s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal::backdrop {
  background: rgba(3, 5, 8, .72);
  backdrop-filter: blur(8px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.modal-header-text {
  min-width: 0;
}

.modal-dates {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: .08em;
  margin: 0;
}

.modal-role {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
  margin: 6px 0 2px;
}

.modal-company {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

.modal-close-form {
  flex-shrink: 0;
}

.modal-close {
  all: unset;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #1f2733;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 20px;
  line-height: 1;
  transition: all .2s;
}

.modal-close:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(56, 189, 248, .1);
}

.modal-summary {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: #d4dae3;
}

.modal-bullets {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.modal-bullets li.modal-bullet-heading {
  list-style: none;
  margin-left: -18px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--accent-light);
  text-transform: uppercase;
}

.modal-bullets li.modal-bullet-heading:first-child {
  margin-top: 0;
}

.modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.modal-chips .chip {
  border-radius: 6px;
  background: #0e1219;
  border: 1px solid #1f2733;
  color: var(--text-tertiary);
}
