:root {
  color-scheme: dark light;
  --bg: #050505;
  --bg-alt: #101010;
  --surface: #181818;
  --surface-light: #202020;
  --text: #f5f5f5;
  --muted: #bababa;
  --primary: #fbb03b;
  --primary-dark: #c47e00;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 20px;
}

@font-face {
  font-family: "JG Garamond";
  src: url("Polices d'écritures/eb-garamond/EBGaramond12-Italic.ttf")
      format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Gears of Peace";
  src: url("Polices d'écritures/gears_of_peace/GearsOfPeace.ttf")
      format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  border-radius: calc(var(--radius) - 8px);
  display: block;
}

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

.hero {
  min-height: 100vh;
  padding: 32px clamp(16px, 6vw, 96px) 64px;
  background: url("back/cascadehorizontal.webp") center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at top left,
      rgba(5, 5, 5, 0.9),
      rgba(5, 5, 5, 0.3) 55%,
      transparent 80%
    ),
    linear-gradient(120deg, rgba(5, 5, 5, 0.85) 0%, rgba(5, 5, 5, 0.2) 60%, transparent 100%);
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(5, 5, 5, 1) 0%, rgba(5, 5, 5, 0.7) 40%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.75) 0%, rgba(5, 5, 5, 0) 55%);
  z-index: 1;
  pointer-events: none;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  position: relative;
  z-index: 2;
}

.logo {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
}

.nav-links a {
  padding: 6px 10px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, text-shadow 0.2s ease;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3),
    0 0 16px rgba(255, 255, 255, 0.2);
}

.nav-links a:hover {
  color: #8a46ff;
  text-shadow: 0 0 10px rgba(138, 70, 255, 0.6),
    0 0 20px rgba(138, 70, 255, 0.4),
    0 0 30px rgba(138, 70, 255, 0.2);
}

.hero-body {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  flex: 1 1 320px;
  max-width: 640px;
}

.hero-video {
  flex: 0 1 360px;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.hero-video:hover {
  transform: scale(1.05);
}

.hero-video::before,
.hero-video::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}

.hero-video:hover::before {
  animation: ripple 0.8s ease-out;
  opacity: 1;
}

.hero-video:hover::after {
  animation: ripple 0.8s ease-out 0.2s;
  opacity: 1;
}

@keyframes ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 0.8;
  }
  100% {
    width: 400px;
    height: 400px;
    opacity: 0;
  }
}

.hero-video-link {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-video video,
.hero-video img {
  width: 100%;
  border-radius: calc(var(--radius) - 6px);
  display: block;
  border: none;
  outline: none;
  background: #000;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--muted);
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  margin-top: 0.4em;
  margin-bottom: 0.4em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(138, 70, 255, 0.4),
    0 0 30px rgba(138, 70, 255, 0.2);
}

.hero-title {
  font-family: "JG Garamond", "EB Garamond", "Garamond", "Times New Roman",
    serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-style: italic;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(255, 255, 255, 0.3),
    0 0 45px rgba(138, 70, 255, 0.3),
    0 0 60px rgba(138, 70, 255, 0.2);
}

.hero-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.hero-author {
  font-family: "JG Garamond", "EB Garamond", "Garamond", "Times New Roman",
    serif;
  font-style: italic;
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: #ffffff;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4),
    0 0 16px rgba(255, 255, 255, 0.3),
    0 0 24px rgba(255, 255, 255, 0.2);
  margin-bottom: 70px;
  display: block;
}

.lead {
  font-size: 1.15rem;
  color: #ffffff;
  max-width: none;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 30px rgba(255, 255, 255, 0.2);
}

.hero .lead {
  max-width: 100%;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

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

.btn-primary {
  background: linear-gradient(135deg, #8a46ff, #d96bff);
  color: #fff;
  box-shadow: 0 10px 25px rgba(138, 70, 255, 0.3);
  z-index: 0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 30px rgba(138, 70, 255, 0.4);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  z-index: -1;
}

.btn-primary:hover::before {
  transform: translateX(0);
}

.btn-primary:hover {
  color: #111;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.25);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 255, 255, 0.2);
}

.btn-outline {
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4),
    0 0 16px rgba(255, 255, 255, 0.3),
    0 0 24px rgba(255, 255, 255, 0.2);
}

.btn-contact {
  background: linear-gradient(135deg, #8a46ff, #d96bff);
  color: #fff;
  box-shadow: 0 10px 25px rgba(138, 70, 255, 0.3);
  z-index: 0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 30px rgba(138, 70, 255, 0.4);
}

.btn-contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  z-index: -1;
}

.btn-contact:hover::before {
  transform: translateX(0);
}

.btn-contact:hover {
  color: #111;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.25);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 255, 255, 0.2);
}

.section {
  padding: 96px clamp(16px, 6vw, 96px);
  background: var(--bg);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(6, minmax(100px, auto));
  gap: 8px;
  max-width: 1100px;
  margin: 0 auto;
}

.photo-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  width: 100%;
}

.photo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(138, 70, 255, 0.3);
}

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

/* Colonne gauche - 4 rectangles + 1 */
.photo-item:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
  aspect-ratio: 1;
}

.photo-item:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
  aspect-ratio: 1;
}

.photo-item:nth-child(3) {
  grid-column: 1;
  grid-row: 3;
  aspect-ratio: 1;
}

.photo-item:nth-child(4) {
  grid-column: 1;
  grid-row: 4;
  aspect-ratio: 1;
}

/* Colonne du milieu - 5 rectangles variés */
.photo-item:nth-child(5) {
  grid-column: 2;
  grid-row: 1;
  aspect-ratio: 1;
}

.photo-item:nth-child(6) {
  grid-column: 2;
  grid-row: 2;
  aspect-ratio: 1;
}

.photo-item:nth-child(7) {
  grid-column: 2;
  grid-row: 3 / 5;
  aspect-ratio: 2 / 2.2;
  height: 100%;
}

.photo-item:nth-child(9) {
  grid-column: 1;
  grid-row: 5;
  aspect-ratio: 1;
}

.photo-item:nth-child(8) {
  grid-column: 2;
  grid-row: 5;
  aspect-ratio: 1;
}

/* Colonne droite - 4 rectangles variés */
.photo-item:nth-child(10) {
  grid-column: 3;
  grid-row: 1;
  aspect-ratio: 1;
}

.photo-item:nth-child(11) {
  grid-column: 3;
  grid-row: 2;
  aspect-ratio: 1;
}

.photo-item:nth-child(12) {
  grid-column: 3;
  grid-row: 3;
  aspect-ratio: 1;
}

.photo-item:nth-child(13) {
  grid-column: 3;
  grid-row: 4;
  aspect-ratio: 1;
}

.photo-item:nth-child(14) {
  grid-column: 3;
  grid-row: 5;
  aspect-ratio: 1;
}

/* Animation de fondu depuis le bas au scroll */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-dark {
  background: var(--bg-alt);
}

#about {
  background-image: url("Logos/nuages.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
}

#about::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to right, rgba(5, 5, 5, 1) 0%, rgba(5, 5, 5, 0.8) 15%, transparent 35%),
    linear-gradient(to top, rgba(5, 5, 5, 1) 0%, rgba(5, 5, 5, 0.9) 20%, rgba(5, 5, 5, 0.7) 40%, transparent 70%),
    linear-gradient(to bottom, rgba(5, 5, 5, 1) 0%, rgba(5, 5, 5, 0.7) 30%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

#about > * {
  position: relative;
  z-index: 1;
}

.section-header {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-header p {
  max-width: none;
  font-size: 1.1rem;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 30px rgba(255, 255, 255, 0.2);
}

.video-categories {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.category-block {
  background: var(--bg-alt);
  border-radius: calc(var(--radius) + 10px);
  padding: 32px;
  border: 1px solid var(--border);
}

.category-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.category-header h3 {
  margin-bottom: 0;
}

.category-note {
  align-self: flex-end;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.service-card,
.about-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.about-card {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2),
    0 0 40px rgba(255, 255, 255, 0.1),
    0 10px 30px rgba(0, 0, 0, 0.3);
}

.service-card:hover {
  transform: scale(1.05);
  z-index: 1;
}

.service-card:nth-child(1):hover {
  box-shadow: 0 0 30px rgba(74, 20, 140, 0.8),
    0 0 60px rgba(74, 20, 140, 0.4),
    0 15px 40px rgba(0, 0, 0, 0.6);
}

.service-card:nth-child(2):hover {
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.8),
    0 0 60px rgba(138, 43, 226, 0.4),
    0 15px 40px rgba(0, 0, 0, 0.6);
}

.service-card:nth-child(3):hover {
  box-shadow: 0 0 30px rgba(186, 104, 200, 0.8),
    0 0 60px rgba(186, 104, 200, 0.4),
    0 15px 40px rgba(0, 0, 0, 0.6);
}

.service-card:nth-child(1) {
  background: linear-gradient(135deg, #1a0033, #3d0066);
  border-color: rgba(138, 70, 255, 0.4);
  box-shadow: 0 0 20px rgba(74, 20, 140, 0.6),
    0 0 40px rgba(74, 20, 140, 0.3),
    0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-card:nth-child(2) {
  background: linear-gradient(135deg, #4a148c, #6a1b9a);
  border-color: rgba(156, 39, 176, 0.4);
  box-shadow: 0 0 20px rgba(138, 43, 226, 0.6),
    0 0 40px rgba(138, 43, 226, 0.3),
    0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-card:nth-child(3) {
  background: linear-gradient(135deg, #8e24aa, #ab47bc);
  border-color: rgba(186, 104, 200, 0.5);
  box-shadow: 0 0 20px rgba(186, 104, 200, 0.6),
    0 0 40px rgba(186, 104, 200, 0.3),
    0 10px 30px rgba(0, 0, 0, 0.5);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.project-media {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
}

.project-media-visual {
  flex: 2 1 360px;
  min-width: 280px;
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  position: relative;
}

.project-media-visual--compact {
  flex: 0.6 1 180px;
  min-width: 150px;
}

.project-media--mosaic {
  align-items: flex-start;
}

.project-visual-mosaic {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 2 1 420px;
  min-width: 320px;
}

.mosaic-row {
  display: flex;
  gap: 16px;
}

.mosaic-row-full .mosaic-item {
  flex: 1 1 100%;
}

.mosaic-item {
  flex: 1 1 0;
}

.mosaic-item .project-media-visual {
  flex: 1 1 auto;
  min-width: auto;
}

.project-media-visual video,
.project-media-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-visual-link {
  display: block;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.project-visual-link img,
.project-visual-link video {
  transition: transform 0.4s ease, filter 0.3s ease;
}

.project-visual-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
    0 0 25px rgba(138, 70, 255, 0.6),
    0 0 45px rgba(217, 107, 255, 0.4);
  background: rgba(5, 5, 5, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-visual-link:hover img,
.project-visual-link:hover video {
  filter: brightness(0.5);
  transform: scale(1.03);
}

.project-visual-link:hover .project-visual-overlay {
  opacity: 1;
}

.project-media-copy {
  flex: 1 1 240px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.badge {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-highlights li {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 6px 14px;
  border: 1px solid var(--border);
}

.service-card h3 {
  margin-top: 0;
}

.about {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
}

.about-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  color: var(--muted);
}

.about-card ul li {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.4),
    0 0 16px rgba(255, 255, 255, 0.2),
    0 0 24px rgba(255, 255, 255, 0.1);
}

.portfolio-credits {
  padding: 32px clamp(16px, 6vw, 96px);
  text-align: center;
  background: var(--bg);
}

.portfolio-credits p {
  color: #ffffff;
  font-size: 1.2rem;
  margin: 0;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6),
    0 0 20px rgba(255, 255, 255, 0.4),
    0 0 30px rgba(255, 255, 255, 0.3),
    0 0 40px rgba(255, 255, 255, 0.2);
}

.contact {
  border-top: 1px solid var(--border);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input,
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

.contact-form .btn {
  transform: scale(0.375);
  font-size: clamp(2rem, 4vw, 2.67rem);
  text-shadow: none;
}

.contact-form .btn:hover {
  transform: scale(0.375) translateY(-2px);
  text-shadow: none;
}

.form-error,
.form-success {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  grid-column: 1 / -1;
}

.form-error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #dc3545;
}

.form-success {
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: #28a745;
}

.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
  margin-top: 32px;
}

.contact-info {
  flex: 1 1 300px;
  color: #ffffff;
}

.contact-info p {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(138, 70, 255, 0.8),
    0 0 20px rgba(138, 70, 255, 0.6),
    0 0 30px rgba(138, 70, 255, 0.4),
    0 0 40px rgba(138, 70, 255, 0.3);
  margin: 8px 0;
}

.envelope-container {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 200px;
  margin: -20px auto 0 -40px;
  gap: 20px;
}

.envelope {
  position: relative;
  width: 120px;
  height: 80px;
  cursor: pointer;
}

.envelope-body {
  position: absolute;
  width: 100%;
  height: 70px;
  background: linear-gradient(135deg, #8a46ff, #6a1b9a);
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(138, 70, 255, 0.4),
    0 0 40px rgba(138, 70, 255, 0.2);
  transition: all 0.4s ease;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(135deg, #9c4dff, #7a2baa);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transform: rotateX(0deg) translateZ(0);
  transition: transform 0.5s ease;
  z-index: 2;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  transform-style: preserve-3d;
}

.envelope {
  position: relative;
  width: 120px;
  height: 80px;
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.envelope-letter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(0) translateZ(0);
  width: 80px;
  height: 60px;
  background: #ffffff;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 1;
  transition: all 0.5s ease 0.2s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.envelope-letter span {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: #8a46ff;
  text-shadow: 0 0 10px rgba(138, 70, 255, 0.3);
}

.envelope-link {
  text-decoration: none;
  display: block;
}

.envelope:hover .envelope-flap,
.envelope-container:hover .envelope .envelope-flap {
  transform: rotateX(-120deg) translateY(-10px);
}

.envelope:hover .envelope-letter,
.envelope-container:hover .envelope .envelope-letter {
  opacity: 1;
  transform: translateX(-50%) translateY(-80px) translateZ(10px);
}

.btn-cv {
  background: linear-gradient(135deg, #8a46ff, #6a1b9a);
  color: #fff;
  box-shadow: 0 0 20px rgba(138, 70, 255, 0.4),
    0 0 40px rgba(138, 70, 255, 0.2);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
    0 0 20px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(138, 70, 255, 0.5);
  font-size: 0.95rem;
  padding: 10px 20px;
}

.btn-cv:hover {
  background: linear-gradient(135deg, #9c4dff, #7a2baa);
  box-shadow: 0 0 30px rgba(138, 70, 255, 0.6),
    0 0 60px rgba(138, 70, 255, 0.4);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.7),
    0 0 30px rgba(255, 255, 255, 0.5);
}

.footer {
  padding: 40px clamp(16px, 6vw, 96px);
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    gap: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .project-media {
    padding: 18px;
  }

  .project-media-visual,
  .project-media-copy {
    flex: 1 1 100%;
  }

  .project-visual-mosaic {
    min-width: 100%;
  }

  .mosaic-row {
    flex-direction: column;
  }

  .project-media-visual--compact {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .photo-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .photo-item {
    grid-column: 1 !important;
    grid-row: auto !important;
    aspect-ratio: 16 / 9;
  }

  .photo-item:nth-child(7) {
    min-height: 200px;
  }

}

