/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  color: #ffffff;
  scroll-behavior: smooth;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated background (conservé) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 255, 136, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes float {
  0%,100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* ---------------------------
   Dynamic Island - navbar
   --------------------------- */

/* container to center the island and give a top gap so it looks detached */
.dynamic-island-wrapper {
  position: fixed;
  top: 18px; /* distance from top so it looks 'décollée' */
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 200;
  pointer-events: none; /* let inner nav manage events */
}

/* pill shape */
.dynamic-island {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  min-width: 220px;
  max-width: 920px;
  width: fit-content;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 8px 30px rgba(2,6,23,0.6),
    0 2px 8px rgba(0,255,136,0.06);
  transition: transform 240ms cubic-bezier(.2,.9,.2,1), opacity 200ms ease, width 240ms ease;
  align-self: center;
  position: relative;
}

/* subtle lift when page scrolled slightly */
.dynamic-island.shrink {
  transform: translateY(-6px) scale(0.98);
  box-shadow:
    0 14px 46px rgba(2,6,23,0.7),
    0 4px 12px rgba(0,255,136,0.05);
}

/* left area - logo + title */
.island-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.island-logo {
  width: 50px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  border-radius: 200px;
}

.island-title {
  color: #e8fff2;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 0 8px rgba(0,255,136,0.12);
  display: none; /* hidden on very small widths; shown on wide */
}

/* center links */
.island-links {
  list-style: none;
  display: flex;
  gap: 8px;
  margin-left: 6px;

}

.island-links li a{
  text-decoration: none;
  color: rgba(255,255,255,0.95);
  font-size: 1.2rem;
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 180ms ease;
  background: transparent;
  border: 1px solid transparent;
}

.island-links li a:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.04);
  border-color: rgba(0,255,136,0.08);
  color: #b6ffd9;
  box-shadow: 0 8px 22px rgba(0,255,136,0.06);
  border-radius: 200px;
}

/* hamburger (mobile) */
.island-hamburger {
  display: none;
  border: none;
  background: transparent;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  padding: 6px;
  transition: background 160ms ease;
}
.island-hamburger:hover { background: rgba(255,255,255,0.02); }

.island-hamburger span {
  display: block;
  height: 2px;
  width: 18px;
  background: rgba(255,255,255,0.9);
  margin: 4px 0;
  border-radius: 2px;
}

/* small notch effect (visual only) */
.dynamic-island::after {
  content: '';
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%) rotate(12deg);
  width: 52px;
  height: 28px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  filter: blur(6px);
  opacity: 0.18;
  pointer-events: none;
}

/* responsive */
@media (max-width: 900px) {
  .island-title { display:none; }
  .island-links { gap: 6px; }
  .dynamic-island { padding: 8px 14px; min-width: 160px; }
}

@media (max-width: 680px) {
  .island-links { display: none; }
  .island-hamburger { display: flex; }
  .island-title { display: none; }
  .dynamic-island { padding: 8px 12px; }
  .dynamic-island::after { display: none; }
}

/* état fermé */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: none;
  border-radius: 0 0 32px 32px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform-origin: top center;
  transform: scaleY(0.9);
  transition:
    max-height 0.45s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.3s ease,
    transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1),
    border-radius 0.45s ease;
  z-index: 50;
}

/* état ouvert */
.mobile-menu.open {
  max-height: 400px;
  opacity: 1;
  transform: scaleY(1);
  border-radius: 0 0 24px 24px; /* arrondi uniquement en bas */
}
@keyframes expandIsland {
  0% {
    border-radius: 999px; /* pilule fermée */
    transform: scaleY(0.2);
    opacity: 0;
  }
  40% {
    border-radius: 12px; /* rectangle étiré */
    transform: scaleY(1.05);
    opacity: 1;
  }
  100% {
    border-radius: 0 0 24px 24px; /* extension arrondie en bas */
    transform: scaleY(1);
  }
}

.mobile-menu.open {
  animation: expandIsland 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}


.mobile-menu a {
  display: block;
  padding: 10px 16px;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  margin: 6px 0;
}
.mobile-menu a:hover { background: rgba(255,255,255,0.03); }

/* ---------------------------
   Remainder of your CSS (hero, sections, cards...)
   (I kept original styles with a few small responsive tweaks)
   --------------------------- */

/* Hero */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.hero h1 {
  font-size: 4rem;
  background: linear-gradient(45deg, #00ff88, #00cc6a, #ffffff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
  z-index: 1;
  position: relative;
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  from { filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.5)); }
  to { filter: drop-shadow(0 0 40px rgba(0, 255, 136, 0.8)); }
}

.hero p {
  margin: 1rem 0;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  z-index: 1;
  position: relative;
}

.hero  a{
  font-size: 1.3rem;
}

/* button */
.btn {
  background: rgba(0, 255, 136, 0.2);
  backdrop-filter: blur(20px);
  color: #ffffff;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid rgba(0, 255, 136, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before { left: 100%; }

.btn:hover {
  background: rgba(0, 255, 136, 0.3);
  border-color: rgba(0, 255, 136, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 255, 136, 0.3);
}

/* Sections */
section {
  padding: 6rem 10%;
  position: relative;
}

h2 {
  color: #00ff88;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

#about,
#projects {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 2rem 0;
}

#about p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  padding: 2.5rem;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.7s ease;
}

.card:hover::before { opacity: 1; }

.card:hover {
  transform: translateY(-15px) scale(1.02);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: 0 25px 50px rgba(0, 255, 136, 0.2);
    transition: 0.7s ease;
}

.card h3 {
  color: #00ff88;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.card p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  section { padding: 4rem 5%; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); }
::-webkit-scrollbar-thumb { background: rgba(0, 255, 136, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 136, 0.5); }

img { width: 30px; }
