/* =========================================================
   PORTFOLIO — MARLEY DUPUIS
   style.css
   ========================================================= */

/* ── VARIABLES ── */
:root {
  --bg:        #0a0c10;
  --bg2:       #0f1117;
  --bg3:       #141720;
  --border:    #1e2333;
  --accent:    #00e5a0;
  --accent2:   #0ff;
  --accent3:   #7c6fff;
  --text:      #c8cfe0;
  --text-dim:  #5a6480;
  --text-head: #edf0f8;
  --red:       #ff4d6d;
  --yellow:    #ffd166;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Syne', sans-serif;
  --radius:    6px;
}

/* ── 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(--mono);
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: .5;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* =========================================================
   NAVIGATION
   ========================================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 12, 16, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 56px;
}

.nav-logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 16px;
  color: var(--text-head);
  letter-spacing: -.02em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.4s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* =========================================================
   HERO
   ========================================================= */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 80px 60px;
  position: relative;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 160, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 160, .04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 50%, black 20%, transparent 100%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 160, .07) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.hero-tag {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-tag::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

h1 {
  font-family: var(--sans);
  font-size: clamp(48px, 7vw, 90px);
  font-weight: 800;
  line-height: 1.0;
  color: var(--text-head);
  letter-spacing: -.03em;
  margin-bottom: 24px;
}
h1 .name-accent { color: var(--accent); }

.hero-subtitle {
  font-size: 15px;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.8;
  border-left: 2px solid var(--border);
  padding-left: 16px;
  margin-bottom: 40px;
}

/* ── CTA BUTTONS ── */
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── BOUTONS TÉLÉCHARGEMENT ── */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
  border: none;
}

.btn-download.cv {
  background: rgba(124, 111, 255, .12);
  color: var(--accent3);
  border: 1px solid rgba(124, 111, 255, .35);
}
.btn-download.cv:hover {
  background: var(--accent3);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 111, 255, .3);
}

.btn-download.synthese {
  background: rgba(0, 255, 255, .08);
  color: var(--accent2);
  border: 1px solid rgba(0, 255, 255, .25);
}
.btn-download.synthese:hover {
  background: var(--accent2);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 255, .25);
}

/* ── STATS ── */
.hero-stats {
  position: absolute;
  bottom: 60px;
  right: 80px;
  display: flex;
  gap: 40px;
}

.stat { text-align: right; }
.stat-n {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 800;
  color: var(--text-head);
  line-height: 1;
}
.stat-l {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* =========================================================
   SECTIONS — COMMUNES
   ========================================================= */
section {
  padding: 100px 80px;
  border-top: 1px solid var(--border);
  position: relative;
}

.section-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: '//';
  color: var(--text-dim);
}

h2 {
  font-family: var(--sans);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--text-head);
  letter-spacing: -.02em;
  margin-bottom: 48px;
  line-height: 1.1;
}

/* =========================================================
   À PROPOS
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text);
  line-height: 1.9;
  margin-bottom: 16px;
}
.about-text p strong {
  color: var(--accent);
  font-weight: 600;
}

.about-terminal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.terminal-bar {
  background: var(--bg3);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: var(--red); }
.dot.y { background: var(--yellow); }
.dot.g { background: var(--accent); }

.terminal-title {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 8px;
}

.terminal-body { padding: 20px; font-size: 13px; }
.t-line        { margin-bottom: 6px; }
.t-prompt      { color: var(--accent); }
.t-cmd         { color: var(--text-head); }
.t-out         { color: var(--text-dim); padding-left: 16px; }
.t-key         { color: var(--accent2); }
.t-val         { color: var(--yellow); }

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  animation: blink 1s infinite;
  vertical-align: middle;
  margin-left: 2px;
}

/* =========================================================
   FORMATION — TIMELINE
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -38px; top: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline-date {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.timeline-title {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-head);
  margin-bottom: 4px;
}
.timeline-school {
  font-size: 13px;
  color: var(--accent2);
  margin-bottom: 10px;
}
.timeline-desc {
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
}

/* =========================================================
   EXPÉRIENCES
   ========================================================= */
.xp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.xp-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  transition: border-color .25s, transform .25s;
  position: relative;
  overflow: hidden;
}
.xp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s;
}
.xp-card:hover::before  { transform: scaleY(1); }
.xp-card:hover {
  border-color: rgba(0, 229, 160, .3);
  transform: translateY(-3px);
}

.xp-period {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.xp-role {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-head);
  margin-bottom: 4px;
}
.xp-company {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
}
.xp-desc {
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
}

.xp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.tag {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  background: rgba(0, 229, 160, .08);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 160, .2);
}

/* =========================================================
   COMPÉTENCES
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.skill-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.skill-group-title {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.skill-item { margin-bottom: 14px; }
.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.skill-name  { font-size: 13px; color: var(--text); }
.skill-pct   { font-size: 11px; color: var(--text-dim); }

.skill-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  animation: fillBar 1.2s ease-out both;
  animation-play-state: paused;
}
.skill-fill.animate { animation-play-state: running; }

@keyframes fillBar { from { width: 0 !important; } }

/* =========================================================
   PROJETS
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  transition: all .25s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: rgba(124, 111, 255, .5);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
}

.project-num {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.project-title {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-head);
  margin-bottom: 12px;
}
.project-desc {
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
  flex: 1;
  margin-bottom: 20px;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.s-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(124, 111, 255, .1);
  color: var(--accent3);
  border: 1px solid rgba(124, 111, 255, .2);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.project-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-project {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 600;
  transition: all .2s;
  cursor: pointer;
  border: none;
}
.btn-project.code {
  background: rgba(124, 111, 255, .12);
  color: var(--accent3);
  border: 1px solid rgba(124, 111, 255, .25);
}
.btn-project.code:hover  { background: var(--accent3); color: #fff; }
.btn-project.demo {
  background: rgba(0, 229, 160, .1);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 160, .25);
}
.btn-project.demo:hover  { background: var(--accent); color: #000; }
.btn-project.doc {
  background: rgba(0, 255, 255, .08);
  color: var(--accent2);
  border: 1px solid rgba(0, 255, 255, .2);
}
.btn-project.doc:hover   { background: var(--accent2); color: #000; }

/* =========================================================
   VEILLE TECHNOLOGIQUE
   ========================================================= */
.veille-intro {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 640px;
  line-height: 1.9;
  margin-bottom: 40px;
  border-left: 2px solid var(--accent);
  padding-left: 16px;
}

.veille-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.veille-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: all .25s;
}
.veille-card:hover {
  border-color: rgba(255, 209, 102, .3);
  transform: translateY(-3px);
}

.veille-cat {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.veille-cat::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--yellow);
}

.veille-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-head);
  margin-bottom: 10px;
}
.veille-desc {
  font-size: 12px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 16px;
}
.veille-source { font-size: 11px; color: var(--text-dim); }
.veille-source a { color: var(--accent2); text-decoration: none; }
.veille-source a:hover { text-decoration: underline; }
.veille-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
}

.veille-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 40px 0;
  animation: blink 1.4s infinite;
}

.veille-error {
  grid-column: 1 / -1;
  color: var(--red);
  font-size: 12px;
  padding: 20px 0;
  border-left: 2px solid var(--red);
  padding-left: 16px;
}

.veille-card .veille-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  margin-top: 16px;
  transition: color .2s;
}
.veille-card .veille-link:hover { color: var(--accent2); }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left { font-size: 12px; color: var(--text-dim); }
.footer-left span { color: var(--accent); }
.footer-right {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* =========================================================
   UTILITAIRES
   ========================================================= */
.hl  { color: var(--accent); }
.hl2 { color: var(--accent2); }
.hl3 { color: var(--accent3); }
.hl-y { color: var(--yellow); }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }

  #hero { padding: 100px 24px 60px; }
  section { padding: 80px 24px; }

  .about-grid { grid-template-columns: 1fr; }

  .hero-stats {
    position: static;
    margin-top: 40px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
  }
  .stat { text-align: left; }

  footer {
    flex-direction: column;
    gap: 12px;
    padding: 32px 24px;
    text-align: center;
  }
}
