/* ===== Portfolio Etem — thème "console" sombre, accent cuivre ===== */
:root {
  --bg: #0b0d10;
  --bg-2: #11151a;
  --panel: #141920;
  --line: #222a33;
  --line-2: #2d3742;
  --text: #e6e9ee;
  --muted: #8b96a5;
  --accent: #e0915a;      /* cuivre */
  --accent-2: #f2b48a;
  --ok: #5fd39a;
  --wip: #e8c15c;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* grille de fond + halo cuivre */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(800px 500px at 85% -10%, rgba(224,145,90,.16), transparent 60%),
    radial-gradient(600px 400px at -10% 30%, rgba(95,211,154,.06), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.15) 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.15) 70%, transparent);
}

a { color: inherit; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-2); border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; color: var(--accent-2); }
em { font-style: normal; color: var(--accent); }
.dim { color: var(--muted); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #111; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ===== Barre du haut ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(20px, calc((100vw - var(--maxw)) / 2));
  background: rgba(11,13,16,.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 15px; text-decoration: none; font-weight: 600; }
.brand-mark {
  width: 18px; height: 18px; background: var(--accent);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
nav { display: flex; gap: 6px; align-items: center; }
nav a { text-decoration: none; color: var(--muted); font-size: 15px; padding: 8px 12px; border-radius: 8px; transition: color .2s, background .2s; }
nav a:hover { color: var(--text); background: var(--bg-2); }
nav .nav-cta { color: var(--text); border: 1px solid var(--line-2); }
nav .nav-cta:hover { border-color: var(--accent); }

/* ===== Hero ===== */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
  min-height: calc(100vh - 70px); padding: 60px 0 40px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; color: var(--ok); border: 1px solid rgba(95,211,154,.3); background: rgba(95,211,154,.07); padding: 6px 12px; border-radius: 999px; margin: 0 0 24px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(95,211,154,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(95,211,154,0); } 100% { box-shadow: 0 0 0 0 rgba(95,211,154,0); } }

h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 24px; font-weight: 750; }
h1 em { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 34em; margin: 0 0 32px; }
.lead strong { color: var(--text); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #17100a; box-shadow: 0 8px 30px -10px rgba(224,145,90,.7); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); }

/* Terminal */
.terminal { background: #090b0e; border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(224,145,90,.05); overflow: hidden; transform: perspective(1200px) rotateY(-4deg); transition: transform .5s; }
.terminal:hover { transform: perspective(1200px) rotateY(0); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.term-title { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.term-body { margin: 0; padding: 20px 22px 24px; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: #c9d1d9; white-space: pre-wrap; min-height: 252px; }
.term-body .p { color: var(--accent); }
.term-body .ok { color: var(--ok); }
.cursor { display: inline-block; width: 8px; height: 1.1em; vertical-align: -3px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(20,25,32,.6); margin-bottom: 40px; }
.stat { padding: 26px 24px; display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num { font-family: var(--mono); font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { color: var(--muted); font-size: 14px; line-height: 1.4; }

/* ===== Sections ===== */
.section { padding: 90px 0 30px; }
.section-head { margin-bottom: 40px; max-width: 640px; }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--accent); margin: 0 0 10px; letter-spacing: .05em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 12px; }
.section-sub { color: var(--muted); margin: 0; }

/* Projets */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .25s, transform .25s, background .25s;
}
.project::before { /* lueur qui suit la souris */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(224,145,90,.10), transparent 45%);
}
.project:hover { border-color: var(--line-2); transform: translateY(-3px); }
.project:hover::before { opacity: 1; }
.project-featured { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(224,145,90,.08), var(--panel) 50%); border-color: rgba(224,145,90,.25); }
.project-top { display: flex; justify-content: space-between; align-items: center; }
.project-icon { font-size: 22px; color: var(--accent); opacity: .85; }
.project h3 { margin: 0; font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.3; }
.project-featured h3 { font-size: 1.45rem; }
.project p { margin: 0; color: var(--muted); font-size: 15.5px; }
.points { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.points li { color: var(--text); font-size: 15px; padding-left: 22px; position: relative; }
.points li::before { content: "▸"; position: absolute; left: 2px; color: var(--accent); }
.tags { list-style: none; padding: 0; margin: auto 0 0; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); padding: 3px 9px; border-radius: 6px; }
.badge { font-family: var(--mono); font-size: 11.5px; letter-spacing: .03em; color: var(--muted); border: 1px solid var(--line-2); padding: 3px 10px; border-radius: 999px; }
.badge-live { color: var(--ok); border-color: rgba(95,211,154,.35); background: rgba(95,211,154,.07); }
.badge-wip { color: var(--wip); border-color: rgba(232,193,92,.35); background: rgba(232,193,92,.07); }
.project-link { font-family: var(--mono); font-size: 14px; color: var(--accent); text-decoration: none; align-self: flex-start; }
.project-link:hover { text-decoration: underline; }

/* Compétences */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: rgba(20,25,32,.55); }
.skill h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.05rem; }
.skill p { margin: 0; color: var(--muted); font-size: 15px; }
.status { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px rgba(95,211,154,.6); flex: none; }
.status-learn { background: var(--wip); box-shadow: 0 0 10px rgba(232,193,92,.6); }

/* Parcours */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-2); margin-left: 6px; }
.timeline li { position: relative; display: grid; grid-template-columns: 190px 1fr; gap: 24px; padding: 0 0 36px 30px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 14px rgba(224,145,90,.7); }
.when { font-family: var(--mono); font-size: 13.5px; color: var(--accent); padding-top: 2px; }
.timeline h3 { margin: 0 0 4px; font-size: 1.1rem; }
.timeline .where { color: var(--muted); font-weight: 500; }
.timeline p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Contact */
.contact { padding-bottom: 90px; }
.contact-card { text-align: center; border: 1px solid rgba(224,145,90,.25); border-radius: 20px; padding: 56px 28px; background: radial-gradient(600px 300px at 50% 0%, rgba(224,145,90,.12), transparent 70%), var(--panel); }
.contact-card p { color: var(--muted); margin: 0 0 28px; }
.contact-card .kicker { margin-bottom: 10px; }
.contact-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.footer { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }

/* Apparition au scroll (activée seulement si le JS tourne) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 40px; padding-top: 40px; }
  .terminal { transform: none; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  nav a:not(.nav-cta) { display: none; }
  .projects, .skills { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .term-body { font-size: 12px; padding: 16px; }
  .section { padding-top: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
