:root {
  --bg: #0b0d12;
  --bg-soft: #121720;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-strong: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: #b9c2d0;
  --muted-soft: #8f99a9;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #e63946;
  --accent-2: #ff7d73;
  --accent-3: #59d4b2;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --radius: 24px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(230, 57, 70, 0.16), transparent 0 23%),
    radial-gradient(circle at 90% 9%, rgba(89, 212, 178, 0.1), transparent 0 18%),
    linear-gradient(180deg, #0b0d12 0%, #10151d 42%, #0b0d12 100%);
  background-size: 100% 100%, 100% 100%, 180% 180%;
  animation: bgShift 18s ease infinite;
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

@keyframes bgShift {
  0% { background-position: 0% 0%, 100% 0%, 0% 50%; }
  50% { background-position: 8% 4%, 92% 12%, 100% 50%; }
  100% { background-position: 0% 0%, 100% 0%, 0% 50%; }
}

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

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

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 18, 0.68);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  min-height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  min-width: 0;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
  transition: transform 0.25s ease;
}

.brand:hover .brand-logo {
  transform: rotate(-4deg) scale(1.03);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 1.2rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 36px rgba(230, 57, 70, 0.34);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

main section {
  padding: 2.5rem 0;
}

.hero {
  position: relative;
  padding: 4.8rem 0 2rem;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 13, 18, 0.78), rgba(11, 13, 18, 0.88)),
    url("./img/chrismesa.webp") center/cover no-repeat;
  opacity: 0.28;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(20px);
  pointer-events: none;
  opacity: 0.18;
}

.hero-orb-1 {
  width: 280px;
  height: 280px;
  background: #ff5c69;
  top: 80px;
  right: 8%;
  animation: floatY 7s ease-in-out infinite;
}

.hero-orb-2 {
  width: 180px;
  height: 180px;
  background: #59d4b2;
  bottom: 10px;
  left: 8%;
  animation: floatY 9s ease-in-out infinite reverse;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #ffd7da;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
  margin-bottom: 1rem;
  max-width: 10ch;
}

h1 span {
  display: block;
  background: linear-gradient(135deg, #ffffff 0%, #ffd6da 40%, #9ce8d5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy,
.hero-visual,
.card,
.panel {
  min-width: 0;
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 60ch;
  margin-bottom: 1.4rem;
}

.hero-actions,
.hero-meta,
.tag-row,
.pill-row,
.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-actions {
  margin-bottom: 1.4rem;
}

.hero-meta {
  color: var(--muted);
  font-size: 0.95rem;
  gap: 0.7rem;
}

.hero-photo-card {
  position: relative;
  min-height: 620px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
}

.float-card {
  animation: floatYSoft 8s ease-in-out infinite;
}

@keyframes floatYSoft {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.02);
}

.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 13, 18, 0.06) 0%, rgba(11, 13, 18, 0.18) 42%, rgba(11, 13, 18, 0.72) 100%),
    linear-gradient(135deg, rgba(230, 57, 70, 0.14), rgba(89, 212, 178, 0.08));
}

.hero-photo-badge {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 2;
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  background: rgba(11, 13, 18, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: #f7fbff;
  font-weight: 600;
}

.glass-card {
  background: rgba(11, 13, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

.hero-floating-card {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  width: min(280px, calc(100% - 2rem));
  border-radius: 22px;
  overflow: hidden;
}

.hero-floating-image {
  width: 100%;
  height: 145px;
  object-fit: cover;
  object-position: top center;
}

.hero-floating-copy {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem 1rem;
}

.hero-floating-copy strong {
  font-size: 0.98rem;
}

.hero-floating-copy span {
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-panel-section {
  padding-top: 0.6rem;
}

.panel {
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -50px;
  bottom: -60px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.3), transparent 65%);
  pointer-events: none;
  filter: blur(4px);
}

.profile-shell {
  position: relative;
  z-index: 1;
  border-radius: 24px;
  background: rgba(10, 12, 17, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.profile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.profile-badge,
.tag,
.pill,
.stack-item {
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 0.42rem 0.72rem;
  max-width: 100%;
}

.profile-badge {
  color: #d9fff5;
  background: rgba(89, 212, 178, 0.14);
  border: 1px solid rgba(89, 212, 178, 0.25);
}

.avatar {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.3), rgba(89, 212, 178, 0.14));
  flex: 0 0 auto;
}

.profile-copy h3 {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  margin-bottom: 0.35rem;
}

.profile-copy p,
.card p,
.section-head p,
.lead {
  color: var(--muted);
}

.stat-grid,
.data-grid,
.contact-grid,
.about-grid,
.focus-grid,
.formation-grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.about-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease,
    box-shadow 0.28s ease;
  overflow-wrap: break-word;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--bg-card-strong);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.stat strong {
  display: block;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.section-head {
  margin-bottom: 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  letter-spacing: -0.05em;
  margin-bottom: 0.35rem;
}

.kicker {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #a5ffd4;
  margin-bottom: 0.8rem;
}

.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.list-clean li {
  display: flex;
  gap: 0.85rem;
  align-items: start;
  color: var(--muted);
  min-width: 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 0 0 6px rgba(89, 212, 178, 0.12);
  margin-top: 0.55rem;
  flex: none;
}

.tag {
  color: #ffe2e4;
  border: 1px solid rgba(230, 57, 70, 0.16);
  background: rgba(230, 57, 70, 0.1);
}

.pill {
  color: #dbfff5;
  border: 1px solid rgba(89, 212, 178, 0.16);
  background: rgba(89, 212, 178, 0.1);
}

.stack-item {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-card h3,
.contact-card h3,
.data-card h3,
.focus-card h3,
.formation-card h3 {
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  margin-bottom: 0.45rem;
}

.project-media {
  position: relative;
  margin: 0 0 1rem 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #10151d;
  aspect-ratio: 16 / 9;
}

.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.12) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.project-card:hover .project-media::after {
  transform: translateX(120%);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.project-card:hover .project-image {
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.02);
}

.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}

.data-card {
  position: relative;
  overflow: hidden;
}

.metric {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.metric-row {
  display: grid;
  gap: 0.35rem;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.formation-card p {
  font-size: 0.96rem;
  margin-bottom: 0;
}

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 2rem;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(230, 57, 70, 0.12), rgba(89, 212, 178, 0.08)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.contact-card a {
  color: white;
  font-weight: 600;
}

.site-footer {
  padding: 2.8rem 0 4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease,
    filter 0.75s ease;
}

html.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (max-width: 1100px) {
  .stat-grid,
  .focus-grid,
  .data-grid,
  .formation-grid,
  .contact-grid,
  .contact-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .cta {
    grid-template-columns: 1fr;
  }

  .hero-photo-card {
    min-height: 500px;
  }

  .hero-floating-card {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
  }

  .stat-grid,
  .focus-grid,
  .data-grid,
  .formation-grid,
  .contact-grid,
  .contact-grid-3,
  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    min-height: auto;
    padding: 0.95rem 0;
    flex-direction: column;
    align-items: start;
  }

  .hero {
    padding-top: 2.8rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .hero-photo-card {
    min-height: 390px;
  }

  .hero-floating-card {
    width: calc(100% - 1.5rem);
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .hero-floating-image {
    height: 110px;
  }

  .section-head {
    align-items: start;
  }

  h1 {
    max-width: 12ch;
  }
}