/* =========================================================
   GLOBAL VARIABLES
   ========================================================= */

:root {
  --bg: #07111f;
  --surface: #0d1b2d;
  --surface-2: #13243a;
  --text: #edf4ff;
  --muted: #aab9cc;
  --accent: #5fd4c7;
  --accent-2: #8eb8ff;
  --line: rgba(255, 255, 255, 0.12);
  --max: 1180px;
}


/* =========================================================
   GLOBAL RESET
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;

  color: var(--text);
  background: var(--bg);

  line-height: 1.65;
}

a {
  color: inherit;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;

  display: flex;
  align-items: center;

  width: 100%;

  padding:
    1rem
    max(1.25rem, calc((100vw - var(--max)) / 2));

  background: rgba(7, 17, 31, 0.94);

  border-bottom: 1px solid var(--line);

  backdrop-filter: blur(12px);
}


/* Brand */

.brand {
  flex-shrink: 0;

  font-weight: 800;
  letter-spacing: 0.04em;

  text-decoration: none;
}


/* =========================================================
   DESKTOP NAVIGATION
   ========================================================= */

.site-nav {
  display: flex;
  align-items: center;

  gap: 1rem;

  margin-left: auto;
}

.site-nav a {
  white-space: nowrap;

  color: var(--muted);

  font-size: 0.9rem;

  text-decoration: none;

  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
}


/* =========================================================
   EN / FR LANGUAGE SWITCHER
   ========================================================= */

.language-switcher {
  display: flex;
  align-items: center;

  gap: 3px;

  margin-left: 1rem;

  flex-shrink: 0;

  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lang-btn {
  appearance: none;

  padding: 5px 6px;

  background: transparent;

  border: 0;

  color: #aab9cc;

  font: inherit;

  cursor: pointer;

  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.lang-btn:hover {
  color: #ffffff;
}

.lang-btn.active {
  color: var(--accent);
}

.language-switcher span {
  color: #64748b;

  user-select: none;
}


/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.menu-button {
  display: none;

  background: transparent;

  color: var(--text);

  border: 1px solid var(--line);

  border-radius: 999px;

  padding: 0.45rem 0.8rem;

  cursor: pointer;
}


/* =========================================================
   GENERAL SECTIONS
   ========================================================= */

.hero,
.section {
  width: 100%;

  max-width: var(--max);

  margin: auto;

  padding: 6rem 1.25rem;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  min-height: 88vh;

  display: grid;

  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(300px, 0.75fr);

  gap: 4rem;

  align-items: center;
}

.hero-copy {
  min-width: 0;
}


/* Labels */

.eyebrow,
.section-label {
  color: var(--accent);

  text-transform: uppercase;

  letter-spacing: 0.16em;

  font-weight: 800;

  font-size: 0.78rem;
}


/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1 {
  margin: 0.8rem 0 1rem;

  font-size: clamp(3rem, 7vw, 6.3rem);

  line-height: 0.98;

  letter-spacing: -0.055em;
}

h2 {
  margin: 0.6rem 0 2rem;

  font-size: clamp(2.2rem, 4.4vw, 4rem);

  line-height: 1.05;

  letter-spacing: -0.035em;
}

h3 {
  line-height: 1.2;
}

.hero-title {
  font-size: 1.4rem;

  color: var(--accent-2);
}

.hero-text,
.lead {
  max-width: 760px;

  color: var(--muted);

  font-size: 1.15rem;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.actions {
  display: flex;

  flex-wrap: wrap;

  gap: 0.8rem;

  margin: 2rem 0;
}

.button {
  display: inline-block;

  padding: 0.8rem 1.05rem;

  border: 1px solid var(--line);

  border-radius: 999px;

  font-weight: 750;

  text-decoration: none;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);

  border-color: rgba(255, 255, 255, 0.25);
}

.button.primary {
  background: var(--accent);

  color: #04201d;

  border-color: var(--accent);
}


/* =========================================================
   QUICK LINKS
   ========================================================= */

.quick-links {
  display: flex;

  flex-wrap: wrap;

  gap: 1.2rem;

  color: var(--muted);
}


/* =========================================================
   PROFILE CARD
   ========================================================= */

.portrait-card {
  min-width: 0;

  padding: 1rem;

  background:
    linear-gradient(
      145deg,
      var(--surface-2),
      var(--surface)
    );

  border: 1px solid var(--line);

  border-radius: 24px;
}

.profile-frame {
  aspect-ratio: 1 / 1;

  overflow: hidden;

  background: #0b1727;

  border-radius: 18px;
}

.profile-frame img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.photo-placeholder {
  display: none;

  width: 100%;
  height: 100%;

  place-content: center;

  color: var(--muted);

  text-align: center;
}

.photo-placeholder small,
.video-placeholder small,
.figure-placeholder small {
  display: block;

  margin-top: 0.35rem;
}

.status-card {
  display: grid;

  gap: 0.3rem;

  padding: 1.2rem 0.4rem 0.3rem;
}

.status-card span {
  color: var(--muted);
}


/* =========================================================
   RESEARCH INTRODUCTION
   ========================================================= */

.video-introduction {
  border-top: 1px solid var(--line);
}

.video-intro-heading {
  width: 100%;

  max-width: 1050px;

  margin-bottom: 3.5rem;
}

.video-intro-heading h2 {
  max-width: 900px;
}

.video-intro-heading .lead {
  max-width: 1000px;
}


/* =========================================================
   RESEARCH INTRODUCTION VIDEO LIST
   ========================================================= */

.intro-video-list {
  display: flex;

  flex-direction: column;

  gap: 6rem;

  width: 100%;

  margin-top: 3rem;
}

.intro-video-row {
  display: grid;

  grid-template-columns:
    minmax(480px, 1.2fr)
    minmax(320px, 0.8fr);

  gap: 4rem;

  align-items: center;

  width: 100%;
}


/* Large portrait video */

.intro-video-media {
  width: 100%;

  overflow: hidden;

  background: #000;

  border: 1px solid var(--line);

  border-radius: 20px;
}

.intro-video-media video {
  display: block;

  width: 100%;
  height: 520px;

  background: #000;

  object-fit: contain;
}


/* Video description */

.intro-video-content {
  min-width: 0;

  width: 100%;
}

.intro-video-content .tag {
  display: inline-block;

  margin-bottom: 1rem;
}

.intro-video-content h3 {
  margin: 0 0 1.4rem;

  font-size: clamp(1.8rem, 3vw, 2.8rem);

  line-height: 1.15;
}

.intro-video-content p {
  margin: 0;

  color: var(--muted);

  font-size: 1.08rem;

  line-height: 1.8;
}


/* =========================================================
   ABOUT / SPLIT SECTIONS
   ========================================================= */

.split {
  display: grid;

  grid-template-columns: 0.8fr 1.2fr;

  gap: 4rem;

  border-top: 1px solid var(--line);
}

.prose {
  color: var(--muted);

  font-size: 1.08rem;
}


/* =========================================================
   CARDS
   ========================================================= */

.cards {
  display: grid;

  gap: 1rem;
}

.cards.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.publication-list article,
.wide-project,
.video-card {
  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 20px;

  padding: 1.4rem;
}

.featured-card {
  background:
    linear-gradient(
      145deg,
      rgba(95, 212, 199, 0.14),
      var(--surface)
    );
}

.tag {
  color: var(--accent);

  font-size: 0.78rem;

  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: 0.1em;
}

.card p,
.muted,
.publication-list p,
.video-card p {
  color: var(--muted);
}


/* =========================================================
   RGMP PROJECT
   ========================================================= */

.project-section {
  border-top: 1px solid var(--line);

  border-bottom: 1px solid var(--line);
}

.project-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.3fr)
    minmax(300px, 0.7fr);

  gap: 2rem;

  align-items: start;
}

.compact-list {
  padding-left: 1.2rem;

  color: var(--muted);
}


/* =========================================================
   METRIC PANEL
   ========================================================= */

.metric-panel {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 1px;

  overflow: hidden;

  background: var(--line);

  border: 1px solid var(--line);

  border-radius: 20px;
}

.metric-panel div {
  display: grid;

  padding: 1.5rem;

  background: var(--surface);
}

.metric-panel strong {
  color: var(--accent);

  font-size: 2rem;
}

.metric-panel span {
  color: var(--muted);
}


/* =========================================================
   RGMP VIDEO GRID
   ========================================================= */

.video-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 1rem;

  margin-top: 2.5rem;
}

.video-card {
  min-width: 0;
}

.video-shell {
  position: relative;

  width: 100%;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  margin-bottom: 1.15rem;

  background: #000;

  border-radius: 14px;
}

.video-shell video {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

.video-placeholder {
  position: absolute;

  inset: 0;

  display: grid;

  place-content: center;

  background:
    linear-gradient(
      135deg,
      #183354,
      #102239
    );

  color: var(--muted);

  text-align: center;

  pointer-events: none;
}

.video-shell:has(video source[src]) .video-placeholder {
  display: none;
}

.video-card h3 {
  margin: 0.65rem 0;
}


/* =========================================================
   WIDE PROJECTS
   ========================================================= */

.wide-project {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 2rem;

  align-items: center;
}

.figure-placeholder {
  display: grid;

  min-height: 260px;

  place-content: center;

  background:
    linear-gradient(
      135deg,
      #183354,
      #102239
    );

  color: var(--muted);

  border-radius: 14px;

  text-align: center;
}


/* =========================================================
   ELECTRIC-DRIVE RESEARCH SECTION
   ========================================================= */

#electric-drives {
  overflow: hidden;
}


/* =========================================================
   FEATURED Ph.D. RESEARCH IMAGE
   ========================================================= */

.featured-research-image {
  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  min-width: 0;

  padding: 1.2rem;

  background: var(--surface-2);

  border-radius: 16px;
}

.featured-research-image .research-image-frame {
  display: flex;

  align-items: center;

  justify-content: center;

  width: 100%;

  max-width: 650px;

  height: 350px;

  overflow: hidden;

  background: #ffffff;

  border-radius: 10px;
}

.featured-research-image .research-image-frame img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

.figure-caption {
  max-width: 650px;

  margin: 0.8rem auto 0;

  color: var(--muted);

  font-size: 0.88rem;

  line-height: 1.5;

  text-align: center;
}


/* =========================================================
   ELECTRIC-DRIVE FIGURE GALLERY
   ========================================================= */

.electric-figures-section {
  margin-top: 3rem;
}

.research-subheading {
  margin-top: 0;

  margin-bottom: 1rem;
}

.electric-figure-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 1.5rem;

  align-items: stretch;
}

.electric-figure-card {
  min-width: 0;

  overflow: hidden;

  padding: 1rem;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 18px;
}

.research-image-frame {
  display: flex;

  align-items: center;

  justify-content: center;

  width: 100%;

  height: 300px;

  overflow: hidden;

  background: #ffffff;

  border-radius: 12px;
}

.research-image-frame img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  object-position: center;
}

.electric-figure-card h3 {
  margin: 1rem 0 0.4rem;

  font-size: 1.08rem;

  line-height: 1.3;
}

.electric-figure-card p {
  margin: 0;

  color: var(--muted);

  font-size: 0.92rem;

  line-height: 1.55;
}


/* =========================================================
   ELECTRIC-DRIVE PDF RESULTS
   ========================================================= */

.electric-results-section {
  margin-top: 3rem;
}

.electric-results-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 1rem;
}

.result-card {
  min-width: 0;

  padding: 1rem;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 14px;
}

.result-card h3 {
  margin: 0.7rem 0 0.45rem;

  font-size: 1rem;

  line-height: 1.3;
}

.result-card p {
  margin: 0 0 0.8rem;

  color: var(--muted);

  font-size: 0.88rem;

  line-height: 1.5;
}

.result-card a {
  color: var(--accent);

  font-size: 0.9rem;

  font-weight: 750;

  text-decoration: none;
}

.result-card a:hover {
  text-decoration: underline;
}


/* =========================================================
   PUBLICATIONS
   ========================================================= */

.publication-list {
  display: grid;

  gap: 1rem;
}

.publication-list article span {
  color: var(--accent);

  font-size: 0.85rem;

  font-weight: 700;
}


/* =========================================================
   ACADEMIC TIMELINE
   ========================================================= */

.timeline {
  margin-left: 5rem;

  border-left: 1px solid var(--line);
}

.timeline article {
  display: grid;

  grid-template-columns: 12rem minmax(0, 1fr);

  gap: 2rem;

  margin-left: -5rem;

  padding: 0 0 2.5rem;
}

.timeline article > span {
  color: var(--accent);

  font-weight: 800;
}

.timeline h3,
.timeline p {
  margin-top: 0;
}

.timeline p {
  color: var(--muted);
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact-section {
  display: grid;

  grid-template-columns: 1.2fr 0.8fr;

  gap: 3rem;
}

.contact-card {
  display: grid;

  padding: 1rem;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 20px;
}

.contact-card a {
  padding: 1rem;

  border-bottom: 1px solid var(--line);

  text-decoration: none;
}

.contact-card a:last-child {
  border-bottom: 0;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
  padding: 2rem 1rem;

  color: var(--muted);

  border-top: 1px solid var(--line);

  text-align: center;
}


/* =========================================================
   SMALLER DESKTOP / LAPTOP HEADER
   ========================================================= */

@media (max-width: 1100px) {

  .site-nav {
    gap: 0.7rem;
  }

  .site-nav a {
    font-size: 0.82rem;
  }

  .language-switcher {
    margin-left: 0.6rem;
  }
}


/* =========================================================
   TABLET / MOBILE NAVIGATION
   ========================================================= */

@media (max-width: 950px) {

  .site-header {
    gap: 0.6rem;
  }

  .brand {
    order: 1;
  }

  .language-switcher {
    order: 2;

    margin-left: auto;
  }

  .menu-button {
    order: 3;

    display: block;
  }

  .site-nav {
    position: absolute;

    top: 100%;
    left: 0;
    right: 0;

    order: 4;

    display: none;

    flex-direction: column;

    align-items: flex-start;

    gap: 0;

    margin-left: 0;

    padding: 0.8rem 1.25rem;

    background: var(--bg);

    border-bottom: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;

    padding: 0.65rem 0;

    font-size: 0.95rem;
  }
}


/* =========================================================
   TABLET LAYOUT
   ========================================================= */

@media (max-width: 850px) {

  .hero,
  .split,
  .project-grid,
  .wide-project,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;

    padding-top: 3rem;
  }

  .cards.three,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .portrait-card {
    max-width: 430px;
  }


  /* Research introduction */

  .intro-video-row {
    grid-template-columns: 1fr;

    gap: 2rem;
  }

  .intro-video-media video {
    height: 500px;
  }

  .intro-video-content {
    max-width: none;
  }


  /* Timeline */

  .timeline {
    margin-left: 0;

    padding-left: 1rem;
  }

  .timeline article {
    grid-template-columns: 1fr;

    gap: 0.5rem;

    margin-left: 0;
  }

  .timeline article > span {
    margin-bottom: 0.2rem;
  }


  /* Electric-drive section */

  .featured-research-image .research-image-frame {
    max-width: 600px;

    height: 320px;
  }

  .electric-figure-grid {
    grid-template-columns: 1fr;
  }

  .research-image-frame {
    height: 320px;
  }

  .electric-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =========================================================
   PHONE
   ========================================================= */

@media (max-width: 600px) {

  .hero,
  .section {
    padding-left: 1rem;

    padding-right: 1rem;
  }

  .site-header {
    padding-left: 1rem;

    padding-right: 1rem;
  }

  .brand {
    font-size: 0.9rem;
  }

  .language-switcher {
    gap: 1px;

    margin-left: auto;

    font-size: 0.75rem;
  }

  .lang-btn {
    padding: 4px;
  }


  /* Hero */

  h1 {
    font-size: clamp(2.7rem, 13vw, 4.3rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .hero-title {
    font-size: 1.15rem;
  }

  .hero-text,
  .lead {
    font-size: 1rem;
  }


  /* Intro videos */

  .intro-video-list {
    gap: 4rem;
  }

  .intro-video-media video {
    height: 430px;
  }

  .intro-video-content h3 {
    font-size: 1.8rem;
  }

  .intro-video-content p {
    font-size: 1rem;
  }


  /* Electric drive */

  .electric-results-grid {
    grid-template-columns: 1fr;
  }

  .research-image-frame,
  .featured-research-image .research-image-frame {
    height: 260px;
  }
}