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

:root {
  --bg: #06070d;
  --bg-elevated: #0e1120;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef1f8;
  --text-dim: #9aa3ba;
  --text-faint: #5c6480;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --amber: #f5a524;
  --gradient: linear-gradient(120deg, var(--cyan), var(--violet));
  --radius: 16px;
  --maxw: 1080px;
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
}

html {
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

::selection {
  background: var(--violet);
  color: #0a0a12;
}

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

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* thin accent scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--cyan), var(--violet));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

/* ---------- Language toggle ---------- */
html[data-lang="fr"] .lang-en { display: none; }
html[data-lang="en"] .lang-fr { display: none; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--cyan);
  color: #06070d;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Ambient background ---------- */
.spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    600px circle at var(--x, 50%) var(--y, 30%),
    rgba(167, 139, 250, 0.08),
    transparent 60%
  );
}

.blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  will-change: transform;
}

.blob--cyan {
  width: 32vw;
  height: 32vw;
  top: -8vw;
  left: -6vw;
  background: var(--cyan);
  animation: drift1 26s ease-in-out infinite;
}

.blob--violet {
  width: 38vw;
  height: 38vw;
  top: 20vh;
  right: -12vw;
  background: var(--violet);
  animation: drift2 32s ease-in-out infinite;
}

.blob--amber {
  width: 22vw;
  height: 22vw;
  bottom: -6vw;
  left: 20vw;
  background: var(--amber);
  opacity: 0.18;
  animation: drift3 22s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6vw, 8vh); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-7vw, 6vh); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, -5vh) scale(1.15); }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 7, 13, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.nav__links a {
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.25s ease;
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--text);
}

.nav__links a:hover::after,
.nav__links a.is-active::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* language pill switch */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 64px;
  height: 30px;
  padding: 0 8px;
  justify-content: space-between;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-faint);
}

.lang-switch__label {
  z-index: 1;
  transition: color 0.25s ease;
}

.lang-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 22px;
  border-radius: 999px;
  background: var(--gradient);
  transition: transform 0.28s cubic-bezier(0.65, 0, 0.35, 1);
}

html[data-lang="en"] .lang-switch__thumb {
  transform: translateX(30px);
}

html[data-lang="fr"] .lang-switch__label:first-of-type,
html[data-lang="en"] .lang-switch__label:last-of-type {
  color: var(--bg);
  mix-blend-mode: difference;
}

/* burger (mobile) */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn--primary {
  background: var(--gradient);
  color: #06070d;
  box-shadow: 0 8px 28px -8px rgba(167, 139, 250, 0.55);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -6px rgba(167, 139, 250, 0.7);
}

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

.btn--ghost:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  background: rgba(34, 211, 238, 0.06);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}

.hero__inner {
  max-width: 760px;
  text-align: center;
}

.hero__eyebrow {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}

.hero__role {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  margin-top: 0.75rem;
  color: var(--text);
}

.hero__tagline {
  margin-top: 1.1rem;
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  margin-top: 2.25rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 14px;
}

.scroll-cue span {
  display: block;
  width: 4px;
  height: 8px;
  margin: 6px auto 0;
  border-radius: 3px;
  background: var(--gradient);
  animation: scrollcue 1.8s ease infinite;
}

@keyframes scrollcue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 2;
  padding: 7rem 1.5rem;
  scroll-margin-top: 66px;
}

.section__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.section__kicker {
  font-family: var(--font-display);
  color: var(--text-faint);
  font-weight: 600;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 2.75rem;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- About ---------- */
.about__text {
  max-width: 68ch;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.text-link {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.35);
  text-underline-offset: 2px;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

.entity {
  position: relative;
  display: inline-block;
}

.entity__tip {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 5;
}

.entity:hover .entity__tip,
.entity:focus-within .entity__tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.entity__tip-label {
  color: var(--text-faint);
  font-weight: 500;
}

.entity__tip a {
  color: var(--cyan);
}

.entity__tip a:hover {
  text-decoration: underline;
}

.areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.area-chip {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
  background: var(--bg-elevated);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.area-chip:hover {
  border-color: var(--cyan);
  color: var(--text);
  transform: translateY(-2px);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--cyan), var(--violet));
  opacity: 0.35;
}

.timeline__item {
  position: relative;
  margin-bottom: 2.25rem;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -2rem;
  top: 1.6rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.tcard {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
}

.tcard:hover {
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 16px 40px -20px rgba(34, 211, 238, 0.35);
}

.tcard__period {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.tcard__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.tcard__company {
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.tcard__company a:hover {
  text-decoration: underline;
}

.tcard p:not(.tcard__period):not(.tcard__company) {
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 62ch;
}

.tcard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tcard__tags span {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.1);
  color: var(--violet);
  font-weight: 600;
}

.tcard__example {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tcard__example summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cyan);
}

.tcard__example summary::-webkit-details-marker {
  display: none;
}

.tcard__example summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.tcard__example[open] summary::after {
  transform: rotate(45deg);
}

.tcard__example summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 4px;
}

.tcard__example-body {
  margin-top: 0.9rem;
}

.tcard__example-body p + p {
  margin-top: 0.5rem;
}

.tcard__example-link a {
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.9rem;
}

.tcard__example-link a:hover {
  text-decoration: underline;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.skills-col h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  font-weight: 600;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag-cloud > span {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tag-cloud > span:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
}

.edu-col h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.edu-list li {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.edu-list li:last-child {
  padding-bottom: 0;
}

.edu-list__period {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.edu-list__title {
  font-weight: 600;
}

.edu-list__school {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ---------- Contact ---------- */
.section--contact {
  padding-bottom: 5rem;
}

.contact__text {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.contact__card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.contact__card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
}

.contact__label {
  font-size: 0.75rem;
  color: var(--text-faint);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact__value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  word-break: break-word;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .edu-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(6, 7, 13, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav__links.is-open {
    max-height: 340px;
  }

  .nav__links a {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
  }

  .nav__burger {
    display: flex;
  }

  .nav__burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav__burger.is-open span:nth-child(2) {
    opacity: 0;
  }
  .nav__burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .section {
    padding: 5rem 1.25rem;
  }
}
