/* === Wow Effect Variables & Resets === */
:root {
  --bg-dark: #050505;        /* Ultra deep black */
  --bg-surface: rgba(20, 20, 20, 0.4);
  
  --aurora-1: #00ff87;       /* Cyber Green */
  --aurora-2: #60efff;       /* Tron Cyan */
  --aurora-3: #a855f7;       /* Royal Purple */

  --text-main: #ffffff;
  --text-muted: #a1a1aa;
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-dark);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* === Magic Background Cursor (Blob) === */
#blob {
  background-color: white;
  height: 400px;
  width: 400px;
  position: fixed;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  background: linear-gradient(to right, var(--aurora-1), var(--aurora-2), var(--aurora-3));
  animation: rotateBlob 10s infinite linear;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.6;
}

@keyframes rotateBlob {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2) stretch(1.5, 0.5); }
  to { transform: rotate(360deg) scale(1); }
}

#blob-blur {
  height: 100vh;
  width: 100vw;
  position: fixed;
  z-index: 1;
  backdrop-filter: blur(80px); /* Lisse encore plus le blob */
  pointer-events: none;
}

#main-content {
  position: relative;
  z-index: 10;
}

/* === Scroll Reveal Animations (JS triggers .show) === */
.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.show {
  opacity: 1;
  transform: translateY(0);
}

/* === Typography === */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
}

.text-gradient {
  background: linear-gradient(135deg, var(--aurora-2), var(--aurora-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

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

.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 3.5rem;
  letter-spacing: -1px;
}

/* === Navigation === */
.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-main);
  text-decoration: none;
}
.nav-logo span { color: var(--aurora-2); }

.glass-nav ul {
  display: flex;
  list-style: none;
  gap: 3rem;
}

.glass-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.glass-nav ul a:hover {
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  border-radius: 30px; /* Modern pill shape */
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-dark);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--text-main);
}

.w-100 { width: 100%; }

/* === Hero Section === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
}

.profile-wrapper {
  position: relative;
  margin-bottom: 2.5rem;
}

.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  filter: grayscale(20%) contrast(1.1);
}

.profile-ring {
  position: absolute;
  top: -8px; left: -8px; right: -8px; bottom: -8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
  z-index: 1;
  animation: rotateRing 6s linear infinite;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 3px;
}

@keyframes rotateRing { 100% { transform: rotate(360deg); } }

.hero-title {
  font-size: 5rem;
  letter-spacing: -3px;
  margin-bottom: 1.5rem;
}

.subtitle {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--aurora-2);
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
}

/* === Layout Sections === */
section { padding: 8rem 0; }

/* === Bento Box Setup (About & Skills) === */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.bento-item {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 2.5rem;
  transition: var(--transition);
}

.bento-item:hover {
  border-color: var(--border-hover);
  background: rgba(30, 30, 30, 0.6);
  transform: translateY(-4px);
}

.bento-about {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento-hardskills { grid-column: span 1; grid-row: span 1; }
.bento-softskills { grid-column: span 1; grid-row: span 1; }

.bento-title {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.bento-title i { color: var(--aurora-2); }

.about-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-pill {
  background: rgba(255,255,255,0.1);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.skill-pill.outline {
  background: transparent;
  border: 1px solid var(--border-glass);
}

/* === Projects === */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  backdrop-filter: blur(12px);
}

.project-glass-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--aurora-3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.project-img-wrapper {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.project-img-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 50%;
  background: linear-gradient(to top, var(--bg-dark), transparent);
}

.project-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-preview-img.contain-img {
  object-fit: contain;
  transform: scale(0.6);
}

.project-glass-card:hover .project-preview-img {
  transform: scale(1.1);
}
.project-glass-card:hover .contain-img {
  transform: scale(0.65);
}

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-content h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.project-badge {
  color: var(--aurora-1);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.project-tags .tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--aurora-2);
}

.project-actions {
  display: flex;
  gap: 1rem;
}
.multi-action .btn { flex: 1; }

/* === Contact === */
.contact-bento {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 32px;
  padding: 5rem 2rem;
  backdrop-filter: blur(12px);
}

.contact-text {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 3rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

.contact-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.contact-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-10px);
  border-color: var(--aurora-2);
}
.contact-card:hover .contact-icon {
  color: var(--aurora-2);
  transform: scale(1.1);
}

/* === Footer === */
footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-glass);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}
.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
}

/* === Responsive === */
@media (max-width: 992px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-about, .bento-hardskills, .bento-softskills {
    grid-column: span 1;
    grid-row: auto;
  }
}

@media (max-width: 768px) {
  .hero-title { font-size: 3.5rem; }
  .subtitle { flex-direction: column; gap: 0.5rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  
  .glass-nav ul { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 1rem; 
    margin-top: 0.5rem;
  }
  .glass-nav a { font-size: 0.85rem; }
  .nav-container { justify-content: center; flex-direction: column; padding: 1rem; }
  
  .section-title { font-size: 2.2rem; }
  .contact-card { width: 100%; padding: 1.5rem; }
  .footer-content { flex-direction: column; gap: 1rem; text-align: center;}
}
