:root {
  --bg: #07111f;
  --surface: #0e1728;
  --surface-alt: #111c31;
  --text: #f4f8ff;
  --muted: #a6b5c9;
  --line: #20314a;
  --accent: #7ab0ff;
  --accent-soft: rgba(31, 111, 255, 0.18);
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  --radius-sm: 14px;
  --container-width: min(100% - 2rem, 1180px);
  --category-automatisme-start: #2563eb;
  --category-automatisme-end: #06b6d4;
  --category-mecanique-start: #f97316;
  --category-mecanique-end: #fb7185;
  --category-robotique-start: #7c3aed;
  --category-robotique-end: #3b82f6;
  --category-digital-start: #10b981;
  --category-digital-end: #14b8a6;
  --category-vision-start: #ec4899;
  --category-vision-end: #f97316;
  --category-ia-start: #4f46e5;
  --category-ia-end: #9333ea;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #07111f 0%, #0b1626 100%);
  line-height: 1.6;
}

body.theme-light {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text: #142132;
  --muted: #617086;
  --line: #dfe6ee;
  --accent: #1f6fff;
  --accent-soft: #eef5ff;
  --shadow: 0 18px 45px rgba(20, 33, 50, 0.06);
  background: linear-gradient(180deg, #fcfdff 0%, var(--bg) 100%);
  color-scheme: light;
}

body.theme-dark {
  --bg: #07111f;
  --surface: #0e1728;
  --surface-alt: #111c31;
  --text: #f4f8ff;
  --muted: #a6b5c9;
  --line: #20314a;
  --accent: #7ab0ff;
  --accent-soft: rgba(31, 111, 255, 0.18);
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  background: linear-gradient(180deg, #07111f 0%, #0b1626 100%);
  color: var(--text);
  color-scheme: dark;
}

body.theme-dark .site-header {
  background: rgba(8, 15, 29, 0.9);
  border-bottom-color: rgba(32, 49, 74, 0.9);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.24);
}

body.theme-dark .site-nav a:hover {
  background: rgba(122, 176, 255, 0.12);
}

body.theme-dark .site-nav a.active {
  background: rgba(122, 176, 255, 0.18);
  color: #dfeeff;
}

body.theme-dark .language-switcher {
  border-color: rgba(122, 176, 255, 0.22);
  background: rgba(10, 18, 33, 0.98);
}

body.theme-dark .language-switcher__toggle:hover {
  background: rgba(122, 176, 255, 0.14);
}

body.theme-dark .language-switcher__toggle {
  color: #dfeeff;
}

body.theme-dark .site-nav {
  color: var(--text);
}

body.theme-dark .cv-dropdown-menu,
body.theme-dark .nav-dropdown-menu,
body.theme-dark .contact-form-wrapper,
body.theme-dark .site-footer,
body.theme-dark .carousel,
body.theme-dark .site-nav.is-open {
  background: rgba(10, 18, 33, 0.98);
  border-color: var(--line);
}

body.theme-dark .site-nav.is-open {
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.3);
}

body.theme-dark .carousel,
body.theme-dark .contact-form-wrapper,
body.theme-dark .site-footer,
body.theme-dark .info-card,
body.theme-dark .education-card,
body.theme-dark .category-card,
body.theme-dark .project-card,
body.theme-dark .project-links-card {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

body.theme-dark .form-group input,
body.theme-dark .form-group textarea {
  background: rgba(8, 15, 29, 0.96);
  border-color: var(--line);
  color: var(--text);
}

body.theme-dark .cv-dropdown-menu a:hover {
  background: rgba(122, 176, 255, 0.12);
}

body.theme-dark .nav-dropdown-toggle:hover,
body.theme-dark .nav-dropdown-menu a:hover {
  background: rgba(122, 176, 255, 0.12);
}

body.theme-dark .category-card[data-image]::before,
body.theme-dark .project-card::before {
  background: rgba(5, 11, 20, 0.74);
}

body.is-translating {
  cursor: progress;
}

body.theme-dark .project-card__content {
  background: rgba(9, 16, 30, 0.84);
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .category-card[data-image] h4,
body.theme-dark .category-card[data-image] p,
body.theme-dark .category-card[data-image] .text-link {
  color: #eff5ff;
}

body.theme-dark .category-visual.has-fallback {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

body.theme-dark .category-icon {
  background: rgba(9, 16, 30, 0.94);
  color: var(--text);
}

body.theme-dark .site-footer p,
body.theme-dark .footer-info p,
body.theme-dark .category-content p,
body.theme-dark .project-card__description,
body.theme-dark .contact-form-header p,
body.theme-dark .hero-text,
body.theme-dark .hero h2,
body.theme-dark .quick-contact p,
body.theme-dark .carousel-caption p,
body.theme-dark .site-nav a {
  color: var(--muted);
}

body.theme-dark .social-links a,
body.theme-dark .carousel-button,
body.theme-dark .footer-phone,
body.theme-dark .project-card__link,
body.theme-dark .text-link {
  color: #d9e6ff;
}

body.theme-dark .category-link {
  color: #f4f8ff;
  background: rgba(122, 176, 255, 0.2);
  border-color: rgba(122, 176, 255, 0.35);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

body.theme-dark .category-link:hover {
  background: rgba(122, 176, 255, 0.3);
}

body.theme-dark .carousel-button:hover {
  background: rgba(122, 176, 255, 0.12);
}

body.theme-dark .quick-contact .btn-ghost,
body.theme-dark .btn-secondary {
  background: rgba(255, 255, 255, 0.04);
}

body.theme-dark .section-soft {
  background: linear-gradient(180deg, rgba(9, 16, 30, 0.7) 0%, rgba(11, 22, 38, 0.76) 100%);
  border-top-color: rgba(32, 49, 74, 0.7);
  border-bottom-color: rgba(32, 49, 74, 0.7);
}

body.theme-dark .site-header,
body.theme-dark .site-footer,
body.theme-dark .carousel,
body.theme-dark .contact-form-wrapper,
body.theme-dark .category-card,
body.theme-dark .project-card,
body.theme-dark .info-card,
body.theme-dark .education-card {
  border-color: rgba(32, 49, 74, 0.9);
}

body.theme-dark .brand-text,
body.theme-dark .site-footer h3,
body.theme-dark .info-card h4,
body.theme-dark .education-card h4,
body.theme-dark .section-heading h3,
body.theme-dark .quick-contact h3,
body.theme-dark .carousel-caption h4,
body.theme-dark .project-card__title,
body.theme-dark .contact-form-header h2,
body.theme-dark .project-links-card h3,
body.theme-dark .hero h1,
body.theme-dark .hero-subtitle {
  color: #f6f8ff;
}

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

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

button {
  font: inherit;
}

.container {
  width: var(--container-width);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(223, 230, 238, 0.82);
  box-shadow: 0 10px 35px rgba(20, 33, 50, 0.06);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 78px;
  gap: 1rem;
}

.header-quicklinks {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 0 1rem;
  flex-wrap: wrap;
}

.header-quicklink {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.header-quicklink:hover,
.header-quicklink.active {
  color: var(--text);
  transform: translateY(-1px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 1.15rem;
  order: 1;
}

.brand-mark {
  display: none;
}

.brand-text {
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  order: 2;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(244, 245, 247, 0.9);
}

.site-nav a.active {
  color: var(--accent);
  background: rgba(31, 111, 255, 0.12);
}

.nav-toggle {
  display: none;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 1.45rem;
  cursor: pointer;
  order: 4;
}

.nav-actions {
  order: 3;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--accent-soft);
  border-color: rgba(31, 111, 255, 0.22);
}

.theme-toggle i {
  font-size: 1rem;
  opacity: 0.5;
}

.theme-toggle.is-light .ri-sun-line,
.theme-toggle:not(.is-light) .ri-moon-line {
  opacity: 1;
  color: var(--accent);
}

.nav-bar .theme-toggle {
  margin-left: 0;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 0.16rem;
  gap: 0.12rem;
}

.language-switcher__toggle {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.01em;
  padding: 0.42rem 0.62rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.language-switcher__toggle:hover {
  background: rgba(31, 111, 255, 0.1);
}

.language-switcher__toggle[data-current-lang="en"] {
  background: rgba(31, 111, 255, 0.16);
  color: var(--accent);
}

.hero {
  padding: 5rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-photo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.profile-circle {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent);
  box-shadow: 0 20px 60px rgba(20, 33, 50, 0.15);
  background: linear-gradient(135deg, rgba(31, 111, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.profile-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-social-links a {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(223, 230, 238, 0.9);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero-social-links a:hover {
  transform: translateY(-2px);
  background: var(--accent-soft);
  color: var(--accent);
}

.hero-social-links i {
  font-size: 1.25rem;
}

.hero-social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.hero-social-button {
  min-width: 138px;
  gap: 0.55rem;
}

.hero-social-button i {
  font-size: 1.15rem;
}

.hero-social-button span {
  line-height: 1;
}

.hero-contact-card {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-contact-card .footer-phone {
  font-size: 0.95rem;
}

/* =========================
   Profile showcase - Home
========================= */

.profile-showcase {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-gradient {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.85;
  z-index: 1;
}

.profile-gradient-one {
  width: 280px;
  height: 280px;
  right: 20px;
  top: 40px;
  background: linear-gradient(135deg, #1d3974, #06b6d4);
}

.profile-gradient-two {
  width: 220px;
  height: 220px;
  left: 40px;
  bottom: 40px;
  background: linear-gradient(135deg, #f97316, #fb7185);
  opacity: 0.55;
}

.profile-photo-card {
  position: relative;
  z-index: 2;
  width: min(390px, 90%);
  aspect-ratio: 4 / 5;
  padding: 12px;
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(18px);
}

.profile-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
  display: block;
}

.profile-floating-card {
  position: absolute;
  z-index: 3;
  left: 20px;
  bottom: 70px;
  max-width: 260px;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

.profile-floating-card span {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.profile-floating-card strong {
  display: block;
  color: #0f172a;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.035em;
}

@media (max-width: 900px) {
  .profile-showcase {
    min-height: 460px;
  }

  .profile-floating-card {
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    width: calc(100% - 48px);
  }
}

@media (max-width: 640px) {
  .profile-showcase {
    min-height: 420px;
  }

  .profile-photo-card {
    width: min(330px, 92%);
    border-radius: 30px;
  }

  .profile-photo-card img {
    border-radius: 24px;
  }
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero h1,
.hero h2,
.section-heading h3,
.quick-contact h3,
.category-card h4,
.info-card h4,
.education-card h4,
.carousel-caption h4,
.site-footer h3 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.3vw, 3.7rem);
  line-height: 1.05;
  margin-bottom: 0.2rem;
}

.hero h2 {
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.hero-text {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0 0 1.6rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.cv-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

#cv-btn {
  position: relative;
}

.cv-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: white;
  border: 1px solid rgba(223, 230, 238, 0.9);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(20, 33, 50, 0.12);
  min-width: 220px;
  padding: 0.75rem 0;
  display: none;
  flex-direction: column;
  z-index: 100;
}

.cv-dropdown-menu.open {
  display: flex;
}

.cv-dropdown-menu a {
  padding: 0.9rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.cv-dropdown-menu a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-dropdown-toggle:hover {
  color: var(--text);
  background: rgba(244, 245, 247, 0.9);
}

.nav-dropdown-toggle.active {
  color: var(--accent);
  background: rgba(31, 111, 255, 0.12);
}

.nav-dropdown-toggle i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.nav-dropdown-wrapper.open .nav-dropdown-toggle i {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  min-width: 220px;
  display: none;
  flex-direction: column;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(223, 230, 238, 0.9);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(20, 33, 50, 0.12);
  z-index: 1200;
}

.nav-dropdown-menu.open {
  display: flex;
}

.nav-dropdown-menu a {
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 700;
  padding: 0.62rem 0.85rem;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn i {
  font-size: 1rem;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 25px rgba(31, 111, 255, 0.2);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

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

.hero-card,
.info-card,
.education-card,
.quick-contact,
.carousel,
.site-footer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.site-footer {
  margin: 2rem auto 2.5rem;
  padding: 1.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(223, 230, 238, 0.9);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.site-footer p {
  margin: 0.35rem 0 0;
  color: #4f617d;
  line-height: 1.75;
  font-size: 0.98rem;
}

.social-links {
  display: flex;
  gap: 0.85rem;
}

.social-links a {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(31, 111, 255, 0.08);
  color: var(--accent);
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.social-links a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

.hero-card {
  padding: 1.35rem;
}

.hero-highlights {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.hero-highlights li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

.hero-highlights i {
  color: var(--accent);
  font-size: 1.1rem;
}

.section {
  padding: 2rem 0 3rem;
}

.page-hero {
  padding-bottom: 1.25rem;
}

.page-hero h1 {
  max-width: 860px;
}

.project-case-hero {
  padding: 4rem 0 2rem;
}

.project-case-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: center;
}

.project-case-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-case-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
}

.project-case-copy .hero-text {
  max-width: 62ch;
}

.project-case-media {
  min-height: 360px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(223, 230, 238, 0.9);
  box-shadow: 0 24px 60px rgba(20, 33, 50, 0.12);
  background-size: cover;
  background-position: center;
  position: relative;
}

.project-case-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.28));
}

.project-case-media.media-slideshow {
  background: #0b1220;
}

.project-theme-robotique .project-case-media.media-slideshow {
  background-image: none;
}

.project-case-media.media-slideshow::after {
  z-index: 2;
  background: linear-gradient(130deg, rgba(5, 12, 24, 0.08), rgba(5, 12, 24, 0.34));
}

.hero-media-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  animation: spiderbotHeroFade 35s infinite;
}

.hero-media-slide:nth-child(1) {
  animation-delay: 0s;
}

.hero-media-slide:nth-child(2) {
  animation-delay: 5s;
}

.hero-media-slide:nth-child(3) {
  animation-delay: 10s;
}

.hero-media-slide:nth-child(4) {
  animation-delay: 15s;
}

.hero-media-slide:nth-child(5) {
  animation-delay: 20s;
}

.hero-media-slide:nth-child(6) {
  animation-delay: 25s;
}

.hero-media-slide:nth-child(7) {
  animation-delay: 30s;
}

@keyframes spiderbotHeroFade {
  0% {
    opacity: 0;
  }

  6% {
    opacity: 1;
  }

  24% {
    opacity: 1;
  }

  30% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

.project-case-content {
  display: grid;
  gap: 1rem;
}

.project-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-section-grid .info-card {
  height: 100%;
}

.project-links-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-links-card h3 {
  margin: 0 0 0.35rem;
}

.project-links-card p {
  margin: 0;
  color: var(--muted);
}

.project-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.project-bullet-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
}

.project-bullet-list li {
  line-height: 1.65;
}

.project-inline-image {
  width: 100%;
  margin-top: 0.95rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  display: block;
  box-shadow: 0 14px 30px rgba(20, 33, 50, 0.12);
}

.project-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-insight-card h4 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.project-insight-card p {
  margin: 0.35rem 0 0;
}

.project-phase-strip {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.2rem;
}

.project-phase-strip span {
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
}

.project-phase-strip i {
  color: var(--muted);
}

.project-video {
  max-width: 1100px;
  margin: 64px auto;
  padding: 0 24px;
  text-align: center;
}

.project-video h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 12px;
}

.project-video p {
  max-width: 720px;
  margin: 0 auto 28px;
  line-height: 1.7;
  color: var(--muted);
}

.project-video .video-fallback-note {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  opacity: 0.9;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-video-player {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.project-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.65rem 0.8rem;
  background: linear-gradient(180deg, rgba(4, 8, 16, 0) 0%, rgba(4, 8, 16, 0.82) 44%, rgba(4, 8, 16, 0.92) 100%);
}

.video-control-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-control-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
}

.video-control-btn i {
  font-size: 1.05rem;
}

.video-progress {
  flex: 1 1 auto;
  accent-color: #60a5fa;
  cursor: pointer;
  min-width: 120px;
}

.video-time {
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  min-width: 40px;
  text-align: center;
}

.video-play-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ff0033;
  text-decoration: none;
  z-index: 3;
}

.video-play-icon i {
  width: clamp(70px, 8vw, 98px);
  height: clamp(70px, 8vw, 98px);
  display: grid;
  place-items: center;
  font-size: clamp(2.3rem, 3.2vw, 3rem);
  border-radius: 50%;
  background: rgba(5, 12, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.video-play-icon:hover i {
  transform: scale(1.07);
  background: rgba(5, 12, 24, 0.68);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.section-kicker {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-3d-section {
  background: linear-gradient(135deg, #031126 0%, #05204a 52%, #031126 100%);
}

.project-3d-section .container {
  max-width: 980px;
}

.project-3d-section .section-header h2,
.project-3d-section .section-header p,
.project-3d-section .section-kicker,
.project-3d-section .model-note {
  color: #e8f0ff;
}

.project-3d-section .section-kicker {
  border-color: rgba(232, 240, 255, 0.35);
  background: rgba(232, 240, 255, 0.08);
}

.model-viewer-wrapper {
  margin-top: 1.2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(232, 240, 255, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(160deg, #d8deea 0%, #cdd7ea 100%);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.model-viewer-wrapper model-viewer {
  width: 100%;
  min-height: 420px;
  display: block;
}

.model-fallback {
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.model-note {
  margin-top: 0.8rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.youtube-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 26px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #ff0033;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.youtube-button:hover {
  transform: translateY(-2px);
  background: #cc0029;
  box-shadow: 0 12px 30px rgba(255, 0, 51, 0.28);
}

.project-theme-automatisme .project-case-media {
  background-image: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(6, 182, 212, 0.86));
}

.project-theme-robotique .project-case-media {
  background-image: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(59, 130, 246, 0.86));
}

.project-theme-vision .project-case-media {
  background-image: linear-gradient(135deg, rgba(236, 72, 153, 0.9), rgba(249, 115, 22, 0.86));
}

.project-theme-mecanique .project-case-media {
  background-image: linear-gradient(135deg, rgba(249, 115, 22, 0.9), rgba(251, 113, 133, 0.86));
}

.project-theme-digital .project-case-media {
  background-image: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(20, 184, 166, 0.86));
}

.project-theme-ia .project-case-media {
  background-image: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(147, 51, 234, 0.86));
}

.section-soft {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.8) 0%, rgba(244, 246, 249, 0.7) 100%);
  border-top: 1px solid rgba(223, 230, 238, 0.6);
  border-bottom: 1px solid rgba(223, 230, 238, 0.6);
}

.section-heading {
  margin-bottom: 1.35rem;
}

.section-heading h3,
.quick-contact h3 {
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  line-height: 1.08;
  font-weight: 800;
}

#experiences .section-heading h3,
#realisations .section-heading h3,
#domaines .section-heading h3 {
  font-size: clamp(2.2rem, 4vw, 3.3rem);
}

.experience-grid,
.categories-grid {
  display: grid;
  gap: 1rem;
}

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

.info-card,
.category-card {
  padding: 1.35rem;
}

.info-card p,
.category-card p,
.education-card p,
.carousel-caption p,
.quick-contact p,
.site-footer p {
  color: var(--muted);
  margin-bottom: 0;
}

.education-list {
  display: grid;
  gap: 1rem;
}

.education-card {
  display: flex;
  gap: 1rem;
  padding: 1.2rem 1.35rem;
}

.education-year {
  min-width: 72px;
  color: var(--accent);
  font-weight: 700;
}

.carousel {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid rgba(223, 230, 238, 0.75);
  border-radius: 34px;
  box-shadow: 0 26px 55px rgba(20, 33, 50, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

.carousel-track {
  display: flex;
  transition: transform 0.55s ease;
  gap: 2rem;
}

.carousel-slide {
  min-width: 100%;
  display: grid;
  gap: 1rem;
  align-items: center;
}

.carousel-slide img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 34px;
}

.carousel-caption {
  padding: 0.15rem 0.25rem 0.25rem;
}

.carousel-caption h4 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

.carousel-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(31, 111, 255, 0.18);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 20px 40px rgba(31, 111, 255, 0.1);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.carousel-button:hover {
  transform: translateY(-2px);
  background: var(--accent-soft);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.service-target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.services-hero {
  position: relative;
}

.services-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(31, 111, 255, 0.08));
  pointer-events: none;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.service-card {
  padding: 1.25rem;
  border: 1px solid rgba(223, 230, 238, 0.9);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(20, 33, 50, 0.08);
}

.service-card h4 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.12rem;
}

.service-card p {
  margin: 0;
  color: var(--muted);
}

.service-card ul {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.3rem;
}

.mission-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.mission-list p {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.mission-list i {
  color: var(--accent);
  margin-top: 0.2rem;
}

.service-tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.service-cta-card {
  border: 1px solid rgba(223, 230, 238, 0.9);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(31, 111, 255, 0.1), rgba(122, 176, 255, 0.05));
  box-shadow: 0 18px 45px rgba(20, 33, 50, 0.08);
  padding: 1.5rem;
}

.service-cta-card h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
}

.service-cta-text {
  margin-top: 0.7rem;
}

.formats-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.formats-list span {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.category-card {
  overflow: hidden;
  border: 1px solid rgba(223, 230, 238, 0.9);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(20, 33, 50, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  min-height: 200px;
}

.category-card[data-image] {
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card[data-image]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  z-index: 1;
}

.category-card[data-image] h4,
.category-card[data-image] p,
.category-card[data-image] .text-link {
  position: relative;
  z-index: 2;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(20, 33, 50, 0.12);
}

.category-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.category-card p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.category-visual {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.02));
}

.category-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 34px;
  display: block;
}

.category-visual.has-fallback {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.15));
}

.category-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(10, 18, 33, 0.32) 100%);
  pointer-events: none;
}

.category-icon {
  position: absolute;
  left: 1.25rem;
  bottom: 1.1rem;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 10px 35px rgba(20, 33, 50, 0.12);
  font-size: 1.2rem;
}

.category-content {
  padding: 1.3rem 1.35rem 1.45rem;
}

.category-kicker {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.category-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.27rem;
}

.category-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1rem;
}

.category-tags span {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(20, 33, 50, 0.04);
  color: var(--muted);
  font-size: 0.82rem;
}

.category-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(31, 111, 255, 0.18);
  color: #ffffff;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.category-link i {
  transition: transform 0.2s ease;
}

.category-link:hover {
  transform: translateY(-2px);
  background: #1a63dc;
  box-shadow: 0 14px 28px rgba(31, 111, 255, 0.24);
}

.category-card:hover .category-link i {
  transform: translateX(3px);
}

.category-automatisme .category-visual {
  background: linear-gradient(135deg, var(--category-automatisme-start), var(--category-automatisme-end));
}

.category-mecanique .category-visual {
  background: linear-gradient(135deg, var(--category-mecanique-start), var(--category-mecanique-end));
}

.category-robotique .category-visual {
  background: linear-gradient(135deg, var(--category-robotique-start), var(--category-robotique-end));
}

.category-digital-twin .category-visual {
  background: linear-gradient(135deg, var(--category-digital-start), var(--category-digital-end));
}

.category-vision .category-visual {
  background: linear-gradient(135deg, var(--category-vision-start), var(--category-vision-end));
}

.category-ia .category-visual {
  background: linear-gradient(135deg, var(--category-ia-start), var(--category-ia-end));
}

.project-card {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  border: 1px solid rgba(223, 230, 238, 0.9);
  border-radius: 30px;
  background-color: var(--surface);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 45px rgba(20, 33, 50, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(2px);
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(20, 33, 50, 0.12);
}

.project-card__content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(223, 230, 238, 0.68);
}

.project-card__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-card__title {
  margin: 0;
  font-size: 1.2rem;
}

.project-card__description {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-card__tags span {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(20, 33, 50, 0.05);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 700;
}

.project-card__link i {
  transition: transform 0.2s ease;
}

.project-card:hover .project-card__link i {
  transform: translateX(3px);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1rem 0 0.8rem;
  list-style: none;
}

.tag-list li {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.82rem;
}

.project-tools-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.project-tools-list li i {
  color: var(--accent);
  font-size: 0.96rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 600;
}

.projects-grid .project-automatisme {
  background-image: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(6, 182, 212, 0.82)), var(--project-image, none);
}

.projects-grid .project-robotique {
  background-image: linear-gradient(135deg, rgba(124, 58, 237, 0.85), rgba(59, 130, 246, 0.82)), var(--project-image, none);
}

.projects-grid .project-vision {
  background-image: linear-gradient(135deg, rgba(236, 72, 153, 0.84), rgba(249, 115, 22, 0.82)), var(--project-image, none);
}

.projects-grid .project-mecanique {
  background-image: linear-gradient(135deg, rgba(249, 115, 22, 0.84), rgba(251, 113, 133, 0.82)), var(--project-image, none);
}

.projects-grid .project-digital {
  background-image: linear-gradient(135deg, rgba(16, 185, 129, 0.84), rgba(20, 184, 166, 0.82)), var(--project-image, none);
}

.projects-grid .project-ia {
  background-image: linear-gradient(135deg, rgba(79, 70, 229, 0.84), rgba(147, 51, 234, 0.82)), var(--project-image, none);
}

/* Contact Form */
.contact-form-wrapper {
  background: white;
  border: 1px solid rgba(223, 230, 238, 0.9);
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: 0 18px 45px rgba(20, 33, 50, 0.06);
  max-width: 600px;
  margin: 0 auto;
}

.contact-form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.contact-form-header h2 {
  font-size: 1.8rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.contact-form-header p {
  color: var(--muted);
  margin: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(223, 230, 238, 0.9);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: grey;
  background: rgb(7, 7, 29);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.project-brief-form-wrapper {
  max-width: 900px;
}

.project-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form .btn {
  margin-top: 0.5rem;
}

/* Footer */
.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-info h3 {
  font-size: 1rem;
  margin: 0;
  font-weight: 800;
}

.footer-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-phone:hover {
  color: var(--text);
}

.footer-phone i {
  font-size: 1rem;
}

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

  .hero-photo {
    order: 2;
  }

  .hero-copy {
    order: 1;
  }

  .profile-circle {
    width: 260px;
    height: 260px;
  }

  .hero-photo-stack {
    gap: 0.85rem;
  }

  .hero-social-links {
    flex-direction: row;
  }

  .hero-social-buttons {
    width: 100%;
  }

  .hero-social-button {
    flex: 1 1 160px;
  }

  .hero-contact-card {
    max-width: 100%;
  }

  .experience-grid {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: 1fr 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .service-target-grid,
  .service-grid,
  .service-tech-grid,
  .mission-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .header-quicklinks {
    gap: 0.7rem;
    justify-content: flex-start;
  }

  .header-quicklink {
    font-size: 1rem;
  }

  .theme-toggle {
    padding: 0.72rem 0.7rem;
    margin-left: 0;
  }

  .nav-actions {
    order: 3;
    gap: 0.45rem;
    margin-left: 0;
  }

  .language-switcher {
    order: 0;
    margin-left: 0;
  }

  .language-switcher__toggle {
    font-size: 0.74rem;
    padding: 0.42rem 0.52rem;
  }

  .site-nav {
    position: absolute;
    top: 74px;
    right: 1rem;
    left: 1rem;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    display: none;
  }

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

  .nav-dropdown-wrapper {
    width: 100%;
    display: block;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
    padding: 0.72rem 0.85rem;
  }

  .nav-dropdown-menu {
    position: static;
    margin-top: 0.45rem;
    min-width: 0;
    width: 100%;
    box-shadow: none;
    border-radius: 12px;
    background: var(--surface-alt);
    padding: 0.45rem;
  }

  .nav-dropdown-menu a {
    width: 100%;
  }

  .hero {
    padding-top: 3rem;
  }

  .profile-circle {
    width: 200px;
    height: 200px;
  }

  .hero-social-links {
    gap: 0.6rem;
  }

  .hero-social-links a {
    width: 46px;
    height: 46px;
  }

  .hero-social-buttons {
    gap: 0.7rem;
  }

  .hero-social-button {
    min-width: 100%;
    justify-content: center;
  }

  .hero-contact-card {
    padding: 0.8rem 0.9rem;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .project-brief-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-header h2 {
    font-size: 1.5rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .category-visual {
    min-height: 200px;
  }

  .project-card {
    min-height: 280px;
  }

  .model-viewer-wrapper model-viewer,
  .model-fallback {
    min-height: 300px;
  }

  .project-video {
    margin: 44px auto;
    padding: 0 16px;
  }

  .project-insights-grid {
    grid-template-columns: 1fr;
  }

  .project-phase-strip {
    padding: 0.9rem;
    gap: 0.5rem;
  }

  .video-container {
    border-radius: 16px;
  }

  .project-video-controls {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem;
  }

  .video-progress {
    flex-basis: 100%;
    order: 2;
  }

  .quick-contact,
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}
