/* Portfolio — Mehdi El Oualji. Palette reprise de l'identité LinkedIn
   (navy + teal) pour la cohérence de marque personnelle. */

:root {
  --navy: #0f2138;
  --navy-soft: #16304e;
  --teal: #0f6e64;
  --teal-light: #4fd1c5;
  --ink: #eef1f5;
  --ink-soft: #b7c2d0;
  --muted: #7d8ba0;
  --card: #16283f;
  --card-border: #26405f;
  --bg: #0a1626;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}
a { color: var(--teal-light); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
section { padding: 110px 24px; position: relative; }
.wrap { max-width: 1080px; margin: 0 auto; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: 12px;
  font-weight: 700; color: var(--teal-light); margin-bottom: 10px;
}
.section-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin-bottom: 40px; color: var(--ink); }

/* ---- nav ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; backdrop-filter: blur(10px);
  background: rgba(10, 22, 38, 0.65); border-bottom: 1px solid rgba(255,255,255,0.06);
}
nav .brand { font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 9px; }
nav .brand-mark { height: 22px; width: auto; display: block; }
nav .links { display: flex; gap: 26px; font-size: 14px; }
nav .links a { color: var(--ink-soft); font-weight: 600; }
nav .links a.active, nav .links a:hover { color: var(--teal-light); }
nav .links a { display: none; }
@media (min-width: 720px) { nav .links a { display: inline; } }

/* ---- hero ---- */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: 90px; overflow: hidden;
}
#hero canvas { position: absolute; inset: 0; z-index: 0; opacity: .55; }
#hero .wrap { position: relative; z-index: 1; }
.hero-layout { display: flex; flex-direction: column-reverse; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero-layout { flex-direction: row; align-items: center; justify-content: space-between; gap: 60px; }
  .hero-text { flex: 1.2; }
}
.hero-photo { flex-shrink: 0; }
.hero-photo img {
  width: 240px; height: 320px; object-fit: cover; border-radius: 20px;
  border: 1px solid var(--card-border); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
@media (min-width: 900px) { .hero-photo img { width: 300px; height: 400px; } }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(15, 110, 100, 0.15); border: 1px solid rgba(79, 209, 197, 0.35);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--teal-light); margin-bottom: 22px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-light); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(1.4); } }
#hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -0.01em; }
#hero h1 .accent { color: var(--teal-light); }
#hero .tagline { margin-top: 20px; max-width: 640px; font-size: 18px; color: var(--ink-soft); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.btn {
  padding: 13px 24px; border-radius: 10px; font-weight: 700; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--card-border); color: var(--ink); }
.meta-row { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 46px; font-size: 14px; color: var(--muted); }
.meta-row strong { display: block; color: var(--ink); font-size: 22px; font-weight: 800; }

/* ---- strengths ---- */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 16px;
  padding: 26px; transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--teal); }
.card h3 { font-size: 17px; margin-bottom: 10px; color: var(--ink); }
.card p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ---- skills ---- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.skill-group h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--teal-light); margin-bottom: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: rgba(255,255,255,0.05); border: 1px solid var(--card-border);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-soft);
}
.certs { margin-top: 46px; display: flex; flex-wrap: wrap; gap: 18px; }
.cert-card { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; padding: 14px 18px; }
.cert-card .ico { font-size: 22px; }
.cert-card b { display: block; font-size: 14px; }
.cert-card span { font-size: 12px; color: var(--muted); }

/* ---- sectors ---- */
#sectors { background: var(--navy-soft); }
.sector-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.sector-pill {
  padding: 12px 24px; border-radius: 999px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border); font-weight: 700; color: var(--ink-soft); font-size: 15px;
}

/* ---- case studies ---- */
.disclaimer {
  font-size: 13px; color: var(--muted); margin-bottom: 34px; padding: 12px 16px;
  border-left: 3px solid var(--teal); background: rgba(255,255,255,0.03); border-radius: 0 8px 8px 0;
}
.case-list { display: flex; flex-direction: column; gap: 22px; }
.case-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 18px;
  padding: 30px; display: grid; grid-template-columns: 1fr; gap: 18px;
}
.case-card .tag {
  display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700;
  color: var(--teal-light); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px;
}
.case-card h3 { font-size: 20px; margin-bottom: 4px; }
.case-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 10px; }
.case-body div b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.case-body div p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.demo-link { align-self: flex-start; margin-top: 4px; font-size: 13px; padding: 9px 16px; }

/* ---- contact ---- */
#contact { text-align: center; }
#contact .cta-row { justify-content: center; }
footer { text-align: center; padding: 40px 24px 30px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer-logo { height: 26px; width: auto; opacity: .85; }

/* ---- reveal animation hooks (GSAP toggles .in) ---- */
.reveal { opacity: 0; transform: translateY(24px); }
