:root {
  --bg: #b7dbff;
  --surface: rgba(252, 254, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #1b1b18;
  --muted: #5b564f;
  --accent: #cf5c36;
  --accent-deep: #9f3e22;
  --line: rgba(27, 27, 24, 0.08);
  --shadow: 0 20px 60px rgba(52, 34, 17, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(145deg, #79b8ff 0%, #b5d8ff 34%, #dbe9ff 68%, #92c0ff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 24%, rgba(252, 164, 242, 0.58), transparent 18%),
    radial-gradient(circle at 31% 26%, rgba(145, 185, 255, 0.9), transparent 22%),
    radial-gradient(circle at 63% 16%, rgba(245, 230, 255, 0.62), transparent 20%),
    radial-gradient(circle at 84% 34%, rgba(244, 156, 241, 0.52), transparent 16%),
    radial-gradient(circle at 72% 79%, rgba(131, 128, 255, 0.38), transparent 22%),
    radial-gradient(circle at 42% 70%, rgba(212, 237, 255, 0.5), transparent 24%);
  filter: blur(36px) saturate(120%);
  opacity: 0.95;
}

body::after {
  content: "";
  position: fixed;
  inset: -8%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.5), transparent 12%),
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.3), transparent 7%),
    radial-gradient(circle at 79% 33%, rgba(255, 255, 255, 0.46), transparent 11%),
    radial-gradient(circle at 56% 52%, rgba(255, 255, 255, 0.18), transparent 18%),
    conic-gradient(from 200deg at 20% 32%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.3)),
    conic-gradient(from 25deg at 82% 36%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.34));
  mix-blend-mode: screen;
  filter: blur(18px);
  opacity: 0.7;
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 2rem;
  flex-wrap: wrap;
}

.brand,
.site-nav a {
  color: var(--text);
  text-decoration: none;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.lang-button {
  min-width: 48px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lang-button.is-active {
  color: #fff7f0;
  background: var(--accent);
}

.site-nav a {
  position: relative;
  padding-bottom: 0.2rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.hero,
.about-section,
.contact-card,
.project-card {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.6fr);
  gap: 2rem;
  padding: 2.5rem;
  border-radius: 28px;
  overflow: hidden;
  align-items: center;
}

.hero-copy h1,
.section-heading h2,
.contact-card h2 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  line-height: 0.96;
}

.hero-copy h1 {
  max-width: 16ch;
  font-size: clamp(2.35rem, 3.8vw, 4.2rem);
  line-height: 1.02;
  text-wrap: balance;
}

html[lang="fr"] .hero {
  grid-template-columns: minmax(0, 1.75fr) minmax(240px, 0.5fr);
  align-items: start;
}

html[lang="fr"] .hero-copy h1 {
  max-width: 18ch;
  font-size: clamp(2.1rem, 3.35vw, 3.7rem);
  line-height: 1.06;
}

html[lang="fr"] .hero-panel {
  align-self: center;
}

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

.hero-text {
  max-width: 58ch;
}

.eyebrow,
.panel-label,
.project-meta,
.tag {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

.eyebrow,
.panel-label,
.project-meta {
  color: var(--muted);
}

.hero-text,
.section-heading p,
.about-layout p,
.contact-card p,
.project-card p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff7f0;
  background: var(--accent);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-deep);
}

.button-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.hero-panel {
  align-self: center;
  max-width: 320px;
  padding: 1.5rem;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(232, 243, 255, 0.7));
  border: 1px solid rgba(27, 27, 24, 0.08);
}

.stat-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.stat-list li {
  display: grid;
  gap: 0.25rem;
}

.stat-list strong {
  font-size: 1.7rem;
  font-family: "DM Serif Display", serif;
  font-weight: 400;
}

.projects-section,
.journey-section,
.tech-section,
.about-section,
.contact-section {
  margin-top: 2rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 1.4rem;
}

.section-heading h2,
.contact-card h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.narrow {
  max-width: 640px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 24px;
  transform: translateY(20px);
  opacity: 0;
  animation: rise-in 700ms ease forwards;
}

.project-card:nth-child(2) {
  animation-delay: 120ms;
}

.project-card:nth-child(3) {
  animation-delay: 240ms;
}

.project-visual {
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(207, 92, 54, 0.94), rgba(76, 114, 170, 0.86)),
    #d8d1c8;
  position: relative;
  overflow: hidden;
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-visual-contain {
  background: #050505;
}

.project-visual-contain img {
  object-fit: contain;
  background: #050505;
}

.project-visual::after {
  content: "";
  position: absolute;
  inset: 12% 10%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
}

.project-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: auto;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.project-link-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  border: 1px dashed rgba(27, 27, 24, 0.18);
  background: rgba(255, 255, 255, 0.52);
}

.project-links a:hover,
.project-links a:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(27, 27, 24, 0.16);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(207, 92, 54, 0.1);
}

.about-section {
  padding: 2rem;
  border-radius: 28px;
}

.journey-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1rem;
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.journey-card {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 1.4rem;
}

.journey-card h3 {
  margin: 0 0 0.8rem;
  font-size: 1.15rem;
}

.journey-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.journey-card-story {
  display: grid;
  gap: 1rem;
  align-content: start;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(230, 242, 255, 0.72));
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.tech-card {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 1.4rem;
}

.tech-card h3 {
  margin: 0 0 0.8rem;
  font-size: 1.15rem;
}

.tech-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 500;
}

.about-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.contact-card {
  padding: 2rem;
  border-radius: 28px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form-grid-bottom {
  align-items: end;
}

.captcha-wrap,
.contact-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  padding: 0.9rem 1rem;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid rgba(207, 92, 54, 0.25);
  border-color: rgba(207, 92, 54, 0.5);
}

.bot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note,
.contact-note,
.form-status {
  color: var(--muted);
  line-height: 1.65;
}

.form-status {
  min-height: 1.5rem;
  font-weight: 700;
}

.form-status.is-error {
  color: #8f2c1f;
}

.form-status.is-success {
  color: #285c2d;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero,
  .journey-layout,
  .journey-grid,
  .tech-grid,
  .contact-form-grid,
  .about-layout,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 100%;
  }

  .hero-panel {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 1120px);
  }

  .site-header,
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .about-section,
  .contact-card {
    padding: 1.3rem;
    border-radius: 22px;
  }
}
