:root {
  --ink: #151515;
  --muted: #68645f;
  --paper: #fffaf0;
  --line: rgba(21, 21, 21, 0.14);
  --blue: #19b6c7;
  --yellow: #f3b51b;
  --red: #f0523d;
  --green: #4aa96c;
  --shadow: 0 24px 60px rgba(21, 21, 21, 0.14);
  --font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  padding: 24px min(7vw, 96px);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(25, 182, 199, 0.2), transparent 24rem),
    radial-gradient(circle at 85% 12%, rgba(240, 82, 61, 0.17), transparent 22rem),
    linear-gradient(135deg, #fffaf0 0%, #f7f0e2 100%);
  color: var(--ink);
  font-family: var(--font-family);
  line-height: 1.65;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: calc(var(--scroll-progress, 0) * 100%);
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--red));
  box-shadow: 0 6px 18px rgba(240, 82, 61, 0.26);
  transform-origin: left;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(21, 21, 21, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 21, 21, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent),
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(21, 21, 21, 0.025) 10px);
  animation: scan 9s linear infinite;
}

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

a {
  color: inherit;
}

main {
  margin-top: clamp(48px, 8vw, 92px);
}

.header {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 12px 32px rgba(21, 21, 21, 0.08);
  backdrop-filter: blur(18px);
  animation: navDrop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.logo p {
  color: var(--red);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 900;
  letter-spacing: 0;
}

.navbar ul,
.social-media ul {
  display: flex;
  align-items: center;
  list-style: none;
}

.navbar ul {
  gap: 8px;
}

.navbar a {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.navbar a:hover,
.navbar a.active {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.marked {
  border-right: 0;
}

.main-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.88fr) minmax(300px, 1fr);
  align-items: center;
  gap: clamp(34px, 7vw, 96px);
  min-height: calc(100vh - 180px);
}

.main-content::before {
  content: "FULL STACK";
  position: absolute;
  top: -32px;
  right: 0;
  z-index: -1;
  color: rgba(21, 21, 21, 0.055);
  font-size: clamp(4.2rem, 13vw, 13rem);
  font-weight: 950;
  line-height: 0.8;
  animation: marqueeGhost 10s ease-in-out infinite alternate;
}

.profile-pic {
  width: min(420px, 82vw);
  aspect-ratio: 1;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: 34% 66% 48% 52% / 46% 36% 64% 54%;
  object-fit: cover;
  box-shadow: 18px 18px 0 var(--yellow), -16px -16px 0 var(--blue), var(--shadow);
  animation: float 5s ease-in-out infinite, morph 9s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, border-radius;
}

.intro-text {
  max-width: 650px;
}

.intro-text h1,
.row-projet h2,
.experience h2,
.education h2,
.skills h2,
.languages h2,
.contact-info h2 {
  font-size: clamp(2.4rem, 7vw, 6.8rem);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: 0;
}

.char {
  display: inline-block;
  animation: letterPop 0.62s cubic-bezier(0.18, 0.9, 0.22, 1.25) both;
  animation-delay: calc(var(--char-index, 0) * 34ms);
  animation-play-state: paused;
  transform-origin: bottom left;
}

.visible .char,
.reveal.visible.char {
  animation-play-state: running;
}

.intro-text h3 {
  margin: 18px 0 14px;
  color: var(--red);
  font-size: clamp(1.25rem, 2.5vw, 2.1rem);
  font-weight: 850;
}

.intro-text p {
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
}

.highlight {
  color: var(--ink);
  font-weight: 850;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn,
.btn-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 6px 6px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  will-change: transform;
}

.btn {
  min-width: 116px;
  min-height: 116px;
  padding: 20px;
  border-radius: 999px;
}

.btn:hover,
.btn-circle:hover {
  transform: translate(-4px, -4px) rotate(-2deg);
  box-shadow: 11px 11px 0 var(--ink);
}

.btn-orange {
  background: var(--yellow);
}

.btn-red {
  background: var(--red);
}

.btn-blue {
  background: var(--blue);
}

.experience,
.education,
.skills,
.languages,
.row-projet,
.container {
  max-width: 1180px;
  margin-inline: auto;
}

.experience h2,
.education h2,
.skills h2,
.languages h2,
.row-projet h2,
.contact-info h2 {
  margin-bottom: 28px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.job,
.edu,
.skills,
.languages,
.project,
.contact-info,
.form-grid {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 16px 44px rgba(21, 21, 21, 0.08);
  backdrop-filter: blur(16px);
}

.job,
.edu {
  position: relative;
  margin-bottom: 22px;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 30px;
  overflow: hidden;
}

.job::before,
.edu::before,
.project::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: linear-gradient(var(--blue), var(--red), var(--yellow));
}

.job h3,
.edu h3,
.row-projet h3 {
  margin-bottom: 8px;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.25;
}

.job ul,
.edu ul,
.skills ul,
.languages ul {
  margin-top: 12px;
  padding-left: 22px;
  color: var(--muted);
}

.skills,
.languages {
  margin-top: 28px;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 30px;
}

.skills ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.skills li {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
}

.row-projet {
  display: grid;
  gap: 20px;
}

.row-projet h3 {
  margin-top: 20px;
  color: var(--red);
}

.project {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(280px, 1fr);
  align-items: center;
  gap: clamp(22px, 4vw, 48px);
  padding: clamp(18px, 3vw, 34px);
  border-radius: 34px;
  overflow: hidden;
  transform:
    perspective(900px)
    rotateX(var(--tilt-y, 0deg))
    rotateY(var(--tilt-x, 0deg))
    translateY(var(--lift, 0));
  transform-style: preserve-3d;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  will-change: transform;
}

.project:hover {
  --lift: -8px;
  border-color: rgba(21, 21, 21, 0.32);
  box-shadow: 0 28px 72px rgba(21, 21, 21, 0.16);
}

.project::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.62), transparent 16rem),
    linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, 0.32) 42%, transparent 58%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.project:hover::after {
  opacity: 1;
}

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

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

.project-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 18px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.project-link:hover {
  background: var(--blue);
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--ink);
}

.zoom {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 2px solid var(--ink);
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 8px 8px 0 var(--ink);
  transition: transform 0.35s ease, filter 0.35s ease;
  transform: translateZ(28px);
}

.project:hover .zoom {
  filter: saturate(1.12) contrast(1.03);
  transform: translateZ(54px) rotate(1.5deg) scale(1.035);
}

.container {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.contact-info,
.form-grid {
  padding: clamp(22px, 4vw, 40px);
  border-radius: 32px;
}

.info-block {
  margin-top: 22px;
}

.info-title,
form label {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
}

.info-value {
  color: var(--muted);
  word-break: break-word;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

input,
textarea {
  width: 100%;
  margin-top: 8px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.9);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

input {
  min-height: 52px;
  padding: 0 16px;
}

textarea {
  min-height: 170px;
  padding: 14px 16px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 6px 6px 0 var(--yellow);
  transform: translate(-2px, -2px);
}

.submit-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
}

.btn-circle {
  width: 136px;
  height: 136px;
  border-radius: 999px;
  background: var(--yellow);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(64px, 12vw, 150px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.social-media ul {
  gap: 10px;
}

.social-media img {
  width: 22px;
  height: 22px;
  opacity: 0.75;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.social-media img:hover {
  opacity: 1;
  transform: translateY(-3px) rotate(-8deg);
}

.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  transition: opacity 0.72s ease, transform 0.72s cubic-bezier(0.2, 0.82, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

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

.magnetic {
  will-change: transform;
}

.cursor-light {
  position: fixed;
  left: var(--x, 50%);
  top: var(--y, 50%);
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25, 182, 199, 0.22), transparent 68%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  mix-blend-mode: multiply;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
}

body.is-hovering .cursor-light {
  width: 520px;
  height: 520px;
  opacity: 0.88;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: clamp(2.8rem, 10vw, 9rem);
  font-weight: 950;
  letter-spacing: 0;
  transform: translateY(0);
  transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-loader::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--red));
  animation: loaderLine 0.9s ease both;
}

body.is-loaded .page-loader {
  transform: translateY(-105%);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-18px) rotate(1deg);
  }
}

@keyframes morph {
  0%,
  100% {
    border-radius: 34% 66% 48% 52% / 46% 36% 64% 54%;
  }
  50% {
    border-radius: 58% 42% 62% 38% / 42% 56% 44% 58%;
  }
}

@keyframes scan {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 240px 0, 0 120px;
  }
}

@keyframes navDrop {
  from {
    opacity: 0;
    transform: translateY(-24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes marqueeGhost {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-2.5vw);
  }
}

@keyframes letterPop {
  from {
    opacity: 0;
    transform: translateY(0.55em) rotate(6deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes loaderLine {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

@media (max-width: 900px) {
  body {
    padding: 18px 5vw;
  }

  .header,
  footer {
    border-radius: 24px;
    flex-direction: column;
    text-align: center;
  }

  .navbar ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-content,
  .project,
  .container {
    grid-template-columns: 1fr;
  }

  .main-content {
    text-align: center;
  }

  .profile-pic {
    margin-inline: auto;
  }

  .actions {
    justify-content: center;
  }

  .project {
    padding-left: 24px;
  }

  .project::before {
    width: 6px;
  }
}

@media (max-width: 560px) {
  .navbar a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .btn {
    min-width: 96px;
    min-height: 96px;
  }

  .row,
  .submit-wrap {
    grid-template-columns: 1fr;
  }

  .btn-circle {
    width: 112px;
    height: 112px;
    justify-self: end;
  }

  footer {
    align-items: center;
  }
}

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