/* ===================================================
   PORTFOLIO ELIOT MAMAN — Style "Élégance Autonome"
   Palette : Obsidian · Carbon · Cyan · Amber
   =================================================== */

/* ── TOKENS ── */
:root {
  --bg:        #090A0F;
  --surface:   #12141D;
  --border:    #222634;
  --cyan:      #00F0FF;
  --amber:     #FFB000;
  --text:      #F3F4F6;
  --muted:     #9CA3AF;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  --radius:    12px;
  --glow-cyan: 0 0 20px rgba(0,240,255,0.15);
  --glow-amber:0 0 20px rgba(255,176,0,0.15);
}

/* ── SCROLL ANIMATIONS ── */
.anim-ready {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.anim-ready.anim-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESET ── */
*, *::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-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; }

/* ── UTILITIES ── */
.accent-cyan  { color: var(--cyan); }
.accent-amber { color: var(--amber); }

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(9,10,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.logo-tag {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--cyan);
  opacity: 0.7;
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}
.nav-links a:hover { color: var(--cyan); transition: color 0.2s; }
.nav-cta {
  background: var(--cyan);
  color: var(--bg) !important;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }
.nav-mobile a { color: var(--muted); font-size: 0.95rem; }
.nav-mobile a:hover { color: var(--cyan); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
  position: relative;
}
#swarm-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}
.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 580px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,240,255,0.08);
  border: 1px solid rgba(0,240,255,0.2);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 1.5rem;
  font-family: var(--font-code);
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.hero-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.btn-primary {
  background: var(--cyan);
  color: var(--bg);
  font-weight: 700;
  font-family: var(--font-head);
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.2s;
  display: inline-block;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-2px); }
.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  transition: border-color 0.2s, transform 0.2s;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--cyan); transform: translateY(-2px); }
.hero-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.meta-item {
  font-family: var(--font-code);
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Hero profile */
.hero-profile {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.profile-glow {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,240,255,0.15) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.profile-img {
  width: 240px; height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: var(--glow-cyan);
}
.profile-stats {
  display: flex;
  gap: 1rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  text-align: center;
  min-width: 70px;
}
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-family: var(--font-code);
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
  }
  .hero-content { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-meta { justify-content: center; }
  .profile-img { width: 180px; height: 180px; }
}

/* ── SECTIONS ── */
.section { padding: 6rem 2rem; }
.section-alt { background: rgba(18,20,29,0.5); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { margin-bottom: 3rem; }
.section-tag {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--cyan);
  display: block;
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── GLOW CARDS ── */
.glow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}
.glow-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(0,240,255,0.06) 0%, transparent 60%);
}
.glow-card:hover::before { opacity: 1; }
.glow-card:hover {
  border-color: rgba(0,240,255,0.35);
  box-shadow: var(--glow-cyan);
  transform: translateY(-3px);
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p { color: var(--muted); margin-bottom: 1.2rem; }
.about-text strong { font-weight: 600; }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
}
.info-icon { font-size: 1.2rem; flex-shrink: 0; }
.info-card strong { display: block; font-family: var(--font-head); font-size: 0.9rem; margin-bottom: 0.2rem; }
.info-card p { font-size: 0.82rem; color: var(--muted); }

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-cards { grid-template-columns: 1fr; }
}

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.skills-group { padding: 1.5rem 1.8rem; }
.skills-group-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skill-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  font-family: var(--font-code);
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.2s;
}
.pill:hover { border-color: var(--cyan); color: var(--text); }
.pill-cyan { border-color: rgba(0,240,255,0.3); color: var(--cyan); }
.pill-amber { border-color: rgba(255,176,0,0.3); color: var(--amber); }

/* ── BENTO GRID ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 1.5rem;
}
.bento-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.bento-featured {
  grid-column: span 2;
}
.bento-wide {
  grid-column: span 2;
  flex-direction: row;
  gap: 1.5rem;
  padding: 0;
}
.bento-wide .card-body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.card-img-wrap {
  overflow: hidden;
  border-radius: var(--radius) 0 0 var(--radius);
  flex-shrink: 0;
  width: 260px;
}
.card-img-small {
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  height: 180px;
}
.card-img { width: 100%; height: 100%; object-fit: cover; }

.card-tag-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.card-tag {
  font-family: var(--font-code);
  font-size: 0.68rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.tag-go     { border-color: rgba(0,240,255,0.3); color: var(--cyan); }
.tag-rust   { border-color: rgba(255,100,50,0.3); color: #FF6432; }
.tag-js     { border-color: rgba(255,220,0,0.3); color: #FFDC00; }
.tag-ia     { border-color: rgba(180,100,255,0.3); color: #B464FF; }
.tag-software { border-color: rgba(100,180,255,0.3); color: #64B4FF; }
.tag-hardware { border-color: rgba(255,176,0,0.3); color: var(--amber); }
.tag-cad    { border-color: rgba(100,255,180,0.3); color: #64FFB4; }

.card-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.card-subtitle {
  font-size: 0.85rem;
  color: var(--cyan);
  font-family: var(--font-code);
}
.card-desc { font-size: 0.88rem; color: var(--muted); flex: 1; }
.card-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}
.card-stack code {
  font-family: var(--font-code);
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  background: rgba(0,240,255,0.06);
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: 4px;
  color: var(--cyan);
}
.card-link {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--cyan);
  margin-top: 0.5rem;
  display: inline-block;
  transition: gap 0.2s;
}
.card-link:hover { opacity: 0.8; }

@media (max-width: 900px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-featured, .bento-wide { grid-column: span 1; }
  .bento-wide { flex-direction: column; }
  .card-img-wrap { width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
  .bento-wide .card-body { padding: 1.5rem; }
}

/* ── CONTACT ── */
.contact-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}
.contact-intro {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-icon {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cyan);
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
}
.contact-item strong { display: block; font-size: 0.9rem; margin-bottom: 0.15rem; }
.contact-item span { font-size: 0.82rem; color: var(--muted); font-family: var(--font-code); }

.contact-form { padding: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.form-hint { font-size: 0.78rem; color: var(--muted); font-style: italic; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  color: var(--text);
  font-family: var(--font-body);
  transition: border-color 0.2s;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0,240,255,0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-left { display: flex; flex-direction: column; gap: 0.2rem; }
.footer-name { font-family: var(--font-head); font-weight: 700; }
.footer-sub { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.85rem; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--cyan); }
.footer-credit { font-family: var(--font-code); font-size: 0.72rem; color: var(--muted); }
