/* ============================================================
   OUSSAMA GOUADER — PORTFOLIO 2026
   Design: Dark tech palette, Syne display + DM Sans body
   Signature: Floating stat cards + animated orb on hero
   ============================================================ */

:root {
  --bg:        #080c14;
  --bg-alt:    #0c1220;
  --surface:   rgba(255,255,255,0.04);
  --border:    rgba(255,255,255,0.08);
  --shadow:    0 8px 40px rgba(0,0,0,0.45);
  --grad-a:    #00d4ff;
  --grad-b:    #7b61ff;
  --grad:      linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%);
  --text:      #f0f4ff;
  --muted:     #8892a4;
  --font-d:    'Syne', sans-serif;
  --font-b:    'DM Sans', sans-serif;
  --font-ar:   'Amiri', serif;
  --radius:    16px;
  --radius-sm: 10px;
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body { font-family: var(--font-ar); }
a { text-decoration: none; color: inherit; }
img { display: block; }

.section-pad { padding: 110px 0; }
.bg-darker { background: var(--bg-alt); }

/* ── GRADIENT UTILS ── */
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── GLASS CARD ── */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,212,255,0.12);
  border-color: rgba(0,212,255,0.2);
}

/* ── EYEBROW + SECTION TITLE ── */
.section-eyebrow {
  font-family: var(--font-d);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--grad-a);
}
.section-title {
  font-family: var(--font-d);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.glass-nav {
  background: rgba(8,12,20,0.75) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  transition: background 0.3s;
}
.glass-nav.scrolled { background: rgba(8,12,20,0.97) !important; }

.brand-og {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-dot { color: var(--grad-a); font-size: 26px; }

.navbar-nav .nav-link {
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted) !important;
  padding: 6px 14px !important;
  transition: color 0.2s;
  position: relative;
}
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 14px;
  width: 0; height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transition: width 0.3s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--text) !important; }
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { width: calc(100% - 28px); }

.lang-btn {
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--border) !important;
  color: var(--muted) !important;
  background: transparent;
  transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--grad-a) !important; color: var(--text) !important; }

.hire-btn {
  font-family: var(--font-d);
  font-size: 13px; font-weight: 700;
  background: var(--grad);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 20px rgba(0,212,255,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hire-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,212,255,0.5); }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.blob {
  position: absolute;
  filter: blur(90px);
  opacity: 0.35;
  border-radius: 50%;
  animation: floatBlob 12s ease-in-out infinite alternate;
}
.blob-1 { width: 500px; height: 500px; background: var(--grad-a); top: 5%; left: -10%; animation-delay: 0s; }
.blob-2 { width: 400px; height: 400px; background: var(--grad-b); bottom: 5%; right: -8%; animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; background: #ff6b9d; top: 50%; left: 40%; animation-delay: -3s; opacity: 0.15; }
@keyframes floatBlob {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(40px,50px) scale(1.15); }
}

.hero-left { padding-top: 20px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--grad-a);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 100px;
  padding: 6px 16px;
  background: rgba(0,212,255,0.07);
}
.status-dot {
  width: 8px; height: 8px;
  background: #00e676;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,230,118,0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 3px rgba(0,230,118,0.2); } 50%{ box-shadow: 0 0 0 6px rgba(0,230,118,0.05); } }

.hero-title {
  font-family: var(--font-d);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -2px;
}
.hero-name { color: var(--text); }

.hero-roles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.role-chip {
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.role-sep { color: var(--grad-a); font-size: 14px; }

.hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 540px;
}

.cta-primary {
  background: var(--grad);
  color: #fff !important;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 15px;
  border: none;
  box-shadow: 0 6px 25px rgba(0,212,255,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,212,255,0.5); }
.cta-ghost {
  background: transparent;
  color: var(--text) !important;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.cta-ghost:hover { border-color: var(--grad-a); background: rgba(0,212,255,0.06); }

/* Floating stat cards */
.hero-card-stack { position: relative; width: 380px; height: 380px; }
.stat-float {
  position: absolute;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  backdrop-filter: blur(12px);
  text-align: center;
  min-width: 120px;
  animation: floatCard 4s ease-in-out infinite alternate;
  z-index: 2;
}
.stat-f1 { top: 0;    left: 0;   animation-delay: 0s; }
.stat-f2 { top: 0;    right: 0;  animation-delay: -1s; }
.stat-f3 { bottom: 0; left: 0;   animation-delay: -2s; }
.stat-f4 { bottom: 0; right: 0;  animation-delay: -3s; }
@keyframes floatCard {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}
.stat-num { font-family: var(--font-d); font-size: 26px; font-weight: 800; }
.stat-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Orb */
.hero-orb {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 160px; height: 160px;
  display: flex; align-items: center; justify-content: center;
}
.orb-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.2);
  animation: spin 12s linear infinite;
}
.r1 { width: 160px; height: 160px; }
.r2 { width: 120px; height: 120px; animation-duration: 8s; animation-direction: reverse; }
.r3 { width: 80px;  height: 80px;  animation-duration: 5s; }
@keyframes spin { 0%{ transform: rotate(0); } 100%{ transform: rotate(360deg); } }
.orb-center {
  width: 56px; height: 56px;
  background: var(--grad);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 30px rgba(0,212,255,0.5);
  position: relative; z-index: 2;
}

.hero-scroll-hint {
  position: absolute; bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted);
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce { 0%,100%{ transform: translateX(-50%) translateY(0); } 50%{ transform: translateX(-50%) translateY(6px); } }

/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
.about-avatar { display: flex; justify-content: center; }
.avatar-ring {
  width: 100px; height: 100px;
  border-radius: 50%;
  padding: 3px;
  background: var(--grad);
}
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; color: var(--grad-a);
}

.about-info-grid { display: flex; flex-direction: column; gap: 12px; }
.info-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.info-row i { width: 18px; }

.stats-row {
  display: flex; gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-item {
  flex: 1; padding: 20px 16px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface);
}
.stat-big { font-family: var(--font-d); font-size: 2rem; font-weight: 800; }
.stat-desc { font-size: 12px; color: var(--muted); }
.stat-divider { width: 1px; background: var(--border); }

/* ══════════════════════════════════════
   TIMELINE
══════════════════════════════════════ */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: '';
  position: absolute; left: 15px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--grad-a), var(--grad-b), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 32px;
  padding-left: 20px;
}
.tl-dot {
  position: absolute; left: -40px; top: 20px;
  width: 34px; height: 34px;
  background: var(--grad);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 20px rgba(0,212,255,0.4);
  z-index: 1;
}
.tl-period { font-size: 12px; font-weight: 700; letter-spacing: 1px; margin-bottom: 6px; }

/* ══════════════════════════════════════
   SKILLS
══════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.skill-domain { transition: transform 0.3s, box-shadow 0.3s; }
.skill-domain:hover { transform: translateY(-4px); }
.sd-icon {
  font-size: 28px;
  margin-bottom: 14px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.stag {
  font-size: 12px; font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.03);
  transition: all 0.2s;
}
.stag:hover { border-color: var(--grad-a); color: var(--grad-a); }

.certs-bar { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.certs-label { font-family: var(--font-d); font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; white-space: nowrap; }
.certs-list { display: flex; flex-wrap: wrap; gap: 10px; }
.cert-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 100px;
  padding: 5px 14px;
  color: var(--muted);
  background: rgba(0,212,255,0.05);
  transition: all 0.2s;
}
.cert-chip i { color: var(--grad-a); }
.cert-chip:hover { border-color: var(--grad-a); color: var(--text); }

/* ══════════════════════════════════════
   PROJECTS
══════════════════════════════════════ */
.filter-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ftab {
  font-family: var(--font-d);
  font-size: 13px; font-weight: 600;
  padding: 8px 22px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.ftab:hover, .ftab.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}

.proj-card { border-radius: var(--radius); overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
.proj-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,212,255,0.15); }
.proj-img-wrap { position: relative; height: 210px; overflow: hidden; }
.proj-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.proj-card:hover .proj-img { transform: scale(1.08); }
.proj-overlay {
  position: absolute; inset: 0;
  background: rgba(8,12,20,0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.proj-card:hover .proj-overlay { opacity: 1; }
.view-btn {
  font-family: var(--font-d);
  font-size: 13px; font-weight: 700;
  padding: 10px 24px;
  background: var(--grad);
  border-radius: 100px;
  color: #fff;
}
.proj-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 11px; font-weight: 700;
  background: rgba(0,212,255,0.15);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--grad-a);
  border-radius: 100px;
  padding: 3px 10px;
  backdrop-filter: blur(8px);
}
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ptag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,0.02);
}

/* Hidden proj items */
.proj-item.hidden { display: none !important; }

/* ══════════════════════════════════════
   EDUCATION
══════════════════════════════════════ */
.edu-card { border-radius: var(--radius); }
.edu-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--grad-a);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 100px;
  padding: 3px 12px;
  background: rgba(0,212,255,0.07);
}

/* ══════════════════════════════════════
   CONTACT
══════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.contact-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 28px 20px;
  border-radius: var(--radius);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  color: var(--text);
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,212,255,0.15);
  border-color: rgba(0,212,255,0.3);
}
.contact-icon { font-size: 2rem; margin-bottom: 10px; }
.contact-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-val { font-size: 13px; font-weight: 500; }

/* ══════════════════════════════════════
   SCROLL TOP
══════════════════════════════════════ */
.scroll-top-btn {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 4px 20px rgba(0,212,255,0.4);
}
.scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-top-btn:hover { transform: translateY(-3px); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 991px) {
  .hero-title { font-size: clamp(2.8rem,10vw,4rem); }
  .hero-card-stack { display: none; }
  .glass-nav { background: rgba(8,12,20,0.97) !important; }
}
@media (max-width: 576px) {
  .section-pad { padding: 70px 0; }
  .stats-row { flex-wrap: wrap; }
  .stat-item { min-width: 45%; }
  .certs-bar { flex-direction: column; align-items: flex-start; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blob, .stat-float, .hero-scroll-hint, .orb-ring, .status-dot { animation: none; }
}
