/* ============================================================
   style.css  –  Gaspard Moulin Portfolio
   ============================================================ */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: "Inter", sans-serif; }

/* ---------- gradient text ---------- */
.gradient-text-hero {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- hero background ---------- */
.hero-bg {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

/* ---------- animated orbs ---------- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: orbFloat 8s ease-in-out infinite;
  pointer-events: none;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #3b82f6, transparent);
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #7c3aed, transparent);
  bottom: -80px; right: -80px;
  animation-delay: -3s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #ec4899, transparent);
  top: 40%; left: 50%;
  animation-delay: -6s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 15px) scale(0.95); }
}

/* ---------- dot grid ---------- */
.dot-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ---------- scroll arrow bounce ---------- */
.scroll-arrow { animation: bounce 2s infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ---------- pulse dot ---------- */
.pulse-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: #22c55e;
  position: relative;
}
.pulse-dot::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: 50%; border: 2px solid #22c55e;
  animation: ping 1.5s ease-out infinite;
}
@keyframes ping {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(2); }
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- navbar ---------- */
#navbar {
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
#navbar.scrolled {
  background: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}
.dark #navbar.scrolled {
  background: rgba(15,23,42,0.9) !important;
}

.nav-link {
  position: relative; font-size: 0.875rem; font-weight: 500;
  color: #6b7280; transition: color 0.2s;
  text-decoration: none;
}
.nav-link::after {
  content: ""; position: absolute; bottom: -2px; left: 0; right: 100%;
  height: 2px; background: linear-gradient(90deg, #2563eb, #7c3aed);
  transition: right 0.25s ease;
}
.nav-link:hover { color: #2563eb; }
.nav-link:hover::after { right: 0; }

.mobile-nav-link {
  display: block; padding: 0.75rem 1.5rem;
  font-size: 0.9rem; font-weight: 500; color: #374151;
  text-decoration: none; transition: color 0.2s, background 0.2s;
  border-radius: 0.5rem;
}
.mobile-nav-link:hover { color: #2563eb; background: #eff6ff; }
.dark .mobile-nav-link { color: #d1d5db; }
.dark .mobile-nav-link:hover { color: #93c5fd; background: rgba(37,99,235,0.1); }

/* ---------- section title ---------- */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800; line-height: 1.2;
}

/* ---------- service cards ---------- */
.service-card {
  background: white; border-radius: 1rem; padding: 1.75rem;
  border: 1px solid #f3f4f6;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: default;
}
.dark .service-card {
  background: #1e293b; border-color: #334155;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: #bfdbfe;
}
.dark .service-card:hover { border-color: #1d4ed8; }

.service-icon-wrap {
  width: 48px; height: 48px; border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.s-blue   { background: #dbeafe; color: #2563eb; }
.s-violet { background: #ede9fe; color: #7c3aed; }
.s-green  { background: #dcfce7; color: #16a34a; }
.s-orange { background: #ffedd5; color: #ea580c; }
.s-cyan   { background: #cffafe; color: #0891b2; }
.s-rose   { background: #ffe4e6; color: #e11d48; }
.dark .s-blue   { background: rgba(37,99,235,0.15); }
.dark .s-violet { background: rgba(124,58,237,0.15); }
.dark .s-green  { background: rgba(22,163,74,0.15); }
.dark .s-orange { background: rgba(234,88,12,0.15); }
.dark .s-cyan   { background: rgba(8,145,178,0.15); }
.dark .s-rose   { background: rgba(225,29,72,0.15); }

/* ---------- project cards ---------- */
.project-card {
  background: white; border-radius: 1.25rem;
  border: 1px solid #e5e7eb; overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.dark .project-card { background: #1e293b; border-color: #334155; }
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.12);
}

.tech-tag {
  display: inline-flex; align-items: center;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem; border-radius: 9999px;
  background: #eff6ff; color: #2563eb;
  border: 1px solid #bfdbfe;
}
.dark .tech-tag { background: rgba(37,99,235,0.1); border-color: rgba(37,99,235,0.3); color: #93c5fd; }

.label-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.25rem 0.75rem; border-radius: 9999px;
}

/* ---------- buttons ---------- */
.btn-see-more {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 600; color: #2563eb;
  background: none; border: none; cursor: pointer;
  padding: 0; transition: gap 0.2s, color 0.2s;
}
.btn-see-more:hover { color: #1d4ed8; gap: 0.65rem; }

.btn-pdf {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600; color: #7c3aed;
  padding: 0.4rem 0.9rem; border-radius: 0.5rem;
  border: 1.5px solid #c4b5fd;
  background: #f5f3ff; text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-pdf:hover { background: #ede9fe; border-color: #7c3aed; transform: translateY(-1px); }
.dark .btn-pdf { background: rgba(124,58,237,0.1); border-color: rgba(124,58,237,0.4); color: #c4b5fd; }
.dark .btn-pdf:hover { background: rgba(124,58,237,0.2); }

/* ---------- skill bars ---------- */
.skill-item { margin-bottom: 1.1rem; }
.skill-track {
  height: 8px; background: #e5e7eb; border-radius: 9999px; overflow: hidden;
}
.dark .skill-track { background: #334155; }
.skill-fill {
  height: 100%; border-radius: 9999px; width: 0%;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-expert { background: #dcfce7; color: #16a34a; }
.badge-adv    { background: #dbeafe; color: #2563eb; }
.badge-inter  { background: #f3f4f6; color: #6b7280; }
.dark .badge-expert { background: rgba(22,163,74,0.15); color: #4ade80; }
.dark .badge-adv    { background: rgba(37,99,235,0.15); color: #93c5fd; }
.dark .badge-inter  { background: #1e293b; color: #9ca3af; }

.tool-pill {
  display: inline-block; font-size: 0.75rem; font-weight: 500;
  padding: 0.3rem 0.75rem; border-radius: 9999px;
  background: #f9fafb; color: #374151; border: 1px solid #e5e7eb;
  transition: background 0.2s, transform 0.2s;
}
.tool-pill:hover { background: #eff6ff; transform: translateY(-1px); }
.dark .tool-pill { background: #1e293b; color: #d1d5db; border-color: #334155; }
.dark .tool-pill:hover { background: rgba(37,99,235,0.1); }

/* ---------- contact ---------- */
.contact-link {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; border-radius: 1rem;
  background: white; border: 1px solid #f3f4f6;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.dark .contact-link { background: #1e293b; border-color: #334155; }
.contact-link:hover {
  transform: translateX(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: #bfdbfe;
}

.contact-icon-box {
  width: 44px; height: 44px; border-radius: 0.75rem;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- form ---------- */
.form-label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: #374151; margin-bottom: 0.35rem;
}
.dark .form-label { color: #d1d5db; }

.form-input {
  width: 100%; padding: 0.65rem 0.9rem;
  border: 1.5px solid #e5e7eb; border-radius: 0.6rem;
  font-size: 0.875rem; color: #111827;
  background: white; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.form-input.error { border-color: #ef4444; }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.dark .form-input {
  background: #0f172a; border-color: #334155; color: #f1f5f9;
}
.dark .form-input:focus { border-color: #3b82f6; }

.form-error {
  font-size: 0.75rem; color: #ef4444; margin-top: 0.3rem;
}

/* ---------- modal ---------- */
#modalOverlay {
  transition: opacity 0.25s ease;
}
#modalOverlay.flex { display: flex !important; }
#modalBox {
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- modal content styles ---------- */
.modal-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.8rem; border-radius: 9999px;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: #4338ca; margin-bottom: 1rem;
}
.dark .modal-badge { background: rgba(67,56,202,0.2); color: #a5b4fc; }

.modal-result-item {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.875rem; color: #374151; padding: 0.4rem 0;
}
.dark .modal-result-item { color: #d1d5db; }
.modal-result-item::before {
  content: "¹4"; color: #16a34a; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}

.modal-tech-pill {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 0.3rem 0.7rem; border-radius: 9999px;
  background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb;
}
.dark .modal-tech-pill { background: #334155; color: #d1d5db; border-color: #475569; }
