/* =========================================================
   PORTFOLIO — ROBIN MARTIN
   Direction artistique : Phantom Protocol (inspirée Persona 5 Royal)
   Rouge sang / noir / blanc cassé — diagonales, tampons, glitch
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Barlow+Condensed:ital,wght@0,400;0,500;0,600;0,700;1,700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --ink:        #0c0c0e;
  --ink-2:      #17171a;
  --paper:      #efece4;
  --paper-dim:  #d9d5c9;
  --red:        #e0122a;
  --red-2:      #ff2c44;
  --yellow:     #ffd400;
  --line:       rgba(12,12,14,0.14);
  --shadow-hard: 8px 8px 0 var(--ink);

  --f-display: 'Anton', 'Barlow Condensed', sans-serif;
  --f-heading: 'Barlow Condensed', sans-serif;
  --f-body:    'Barlow Condensed', sans-serif;
  --f-mono:    'Space Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.55;
  overflow-x: hidden;
  background-image:
    radial-gradient(rgba(12,12,14,0.07) 1px, transparent 1px);
  background-size: 14px 14px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink);
  margin: 0;
}

a { color: var(--red); }

/* ---------------------------------------------
   LOAD TRANSITION — diagonal wipe, phantom style
--------------------------------------------- */
#intro-wipe {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  display: flex;
}
#intro-wipe .panel {
  flex: 1; background: var(--ink);
  transform: translateY(0);
}
#intro-wipe .panel:nth-child(2) { background: var(--red); }
#intro-wipe .panel:nth-child(3) { background: var(--ink); }
#intro-wipe.play .panel {
  animation: wipe-up 0.7s cubic-bezier(.77,0,.18,1) forwards;
}
#intro-wipe.play .panel:nth-child(1) { animation-delay: 0s; }
#intro-wipe.play .panel:nth-child(2) { animation-delay: 0.08s; }
#intro-wipe.play .panel:nth-child(3) { animation-delay: 0.16s; }
@keyframes wipe-up {
  to { transform: translateY(-110%) skewY(-4deg); }
}

/* ---------------------------------------------
   TEXTURE / NOISE STRIPE — signature diagonal band
--------------------------------------------- */
.slash-band {
  position: relative;
  overflow: hidden;
}
.slash-band::before {
  content: '';
  position: absolute; left: -10%; right: -10%; height: 140%; top: -20%;
  background: repeating-linear-gradient(
    115deg, var(--red) 0 46px, var(--red-2) 46px 50px, transparent 50px 96px
  );
  opacity: 0.09;
  pointer-events: none;
}

/* ---------------------------------------------
   HEADER / NAV — phantom menu
--------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: var(--ink);
  border-bottom: 4px solid var(--red);
}
.site-header .wrap {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.5rem;
}
.brand {
  font-family: var(--f-display);
  color: var(--paper);
  font-size: 1.5rem;
  letter-spacing: 1px;
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
.brand .dot { color: var(--red); }

nav.phantom-nav ul {
  list-style: none; display: flex; gap: 0.35rem; margin: 0; padding: 0;
  flex-wrap: wrap;
}
nav.phantom-nav a {
  position: relative;
  display: inline-block;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--f-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
  padding: 0.55rem 1rem;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
  transition: color 0.15s ease;
}
nav.phantom-nav a::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s cubic-bezier(.7,0,.3,1);
  z-index: -1;
}
nav.phantom-nav a:hover::before,
nav.phantom-nav a.active::before { transform: scaleX(1); }
nav.phantom-nav a:hover,
nav.phantom-nav a.active { color: var(--ink); }

/* ---------------------------------------------
   HERO
--------------------------------------------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: 5rem 1.5rem 6rem;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}
.hero::after {
  content: '';
  position: absolute; right: -8%; top: -20%; width: 60%; height: 140%;
  background: var(--red);
  clip-path: polygon(38% 0, 100% 0, 62% 100%, 0% 100%);
  opacity: 0.95;
  z-index: 0;
}
.hero .wrap {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem;
  align-items: center;
}
.hero .eyebrow {
  font-family: var(--f-mono);
  color: var(--yellow);
  letter-spacing: 3px;
  font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1rem;
}
.hero .eyebrow::before {
  content: ''; width: 26px; height: 2px; background: var(--yellow);
}
.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.92;
  color: var(--paper);
  -webkit-text-stroke: 1px var(--red-2);
}
.hero h2 {
  font-family: var(--f-heading);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--yellow);
  margin-top: 0.6rem;
  text-transform: none;
}
.hero p.lead {
  margin-top: 1.3rem;
  max-width: 46ch;
  color: var(--paper-dim);
  font-size: 1.15rem;
}
.hero .cta-row { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.profile-frame {
  position: relative;
  justify-self: center;
  width: min(280px, 80vw);
}
.profile-frame .ring {
  position: absolute; inset: -14px;
  border: 3px solid var(--yellow);
  clip-path: polygon(12% 0, 100% 0, 100% 88%, 88% 100%, 0 100%, 0 12%);
  animation: spin-slow 14s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.profile-frame img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  clip-path: polygon(12% 0, 100% 0, 100% 88%, 88% 100%, 0 100%, 0 12%);
  filter: grayscale(0.15) contrast(1.08);
  border: 3px solid var(--ink);
  background: var(--paper);
  position: relative; z-index: 1;
}
.profile-frame .tag {
  position: absolute; bottom: -14px; left: -14px;
  background: var(--red);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  transform: rotate(-4deg);
  box-shadow: var(--shadow-hard);
  z-index: 2;
}

/* ---------------------------------------------
   BUTTONS
--------------------------------------------- */
.btn {
  font-family: var(--f-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
  clip-path: polygon(6% 0, 100% 0, 94% 100%, 0% 100%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color .18s ease;
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
}
.btn:hover { transform: translate(-3px,-3px); box-shadow: 8px 8px 0 var(--ink); }
.btn.primary { background: var(--red); border-color: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--red-2); }
.btn.ghost { background: transparent; color: var(--paper); border-color: var(--paper); box-shadow: 5px 5px 0 var(--red); }
.btn.ghost:hover { box-shadow: 8px 8px 0 var(--red); }

/* ---------------------------------------------
   SECTION SCAFFOLDING
--------------------------------------------- */
.section { padding: 5.5rem 1.5rem; position: relative; }
.section .wrap { max-width: 1200px; margin: 0 auto; }
.section.dark { background: var(--ink); color: var(--paper); }
.section.dark h2, .section.dark h3 { color: var(--paper); }

.section-head { margin-bottom: 3rem; text-align: center; }
.section-head .kicker {
  font-family: var(--f-mono);
  color: var(--red);
  letter-spacing: 3px;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.6rem;
}
.section.dark .section-head .kicker { color: var(--yellow); }
.section-head h2 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  display: inline-block;
  position: relative;
}
.section-head h2::after {
  content: '';
  display: block;
  height: 8px; width: 70%; margin: 0.5rem auto 0;
  background: var(--red);
  clip-path: polygon(4% 0,100% 0,96% 100%,0% 100%);
}

/* Reveal on scroll */
.reveal {
  opacity: 0; transform: translateY(28px) rotate(-0.4deg);
  transition: opacity 0.6s cubic-bezier(.2,.8,.2,1), transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0) rotate(0); }
.reveal-stagger.in > * { transition-delay: calc(var(--i,0) * 70ms); }

/* ---------------------------------------------
   SKILL GRID
--------------------------------------------- */
.skill-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.skill-cols h4 {
  font-family: var(--f-heading); font-weight: 700; font-size: 1.3rem;
  margin-bottom: 1.2rem; text-align: center;
  color: var(--red);
}
.skill-grid { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.skill-chip {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 0.55rem;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  border: 1px solid var(--ink);
  transition: transform 0.18s ease, background 0.18s ease;
}
.skill-chip i { color: var(--red-2); font-size: 1rem; }
.skill-chip:hover { transform: translateY(-4px) rotate(-1deg); background: var(--red); }
.skill-chip:hover i { color: var(--paper); }

/* ---------------------------------------------
   PROJECT / LINK CARDS
--------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 2rem; }
.tilt-card {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 1.8rem;
  position: relative;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tilt-card:hover { transform: translate(-5px,-5px); box-shadow: 11px 11px 0 var(--red); }
.tilt-card .stamp {
  position: absolute; top: -12px; right: -10px;
  background: var(--red); color: var(--paper);
  font-family: var(--f-mono); font-size: 0.7rem;
  padding: 0.3rem 0.6rem; transform: rotate(6deg);
  box-shadow: 3px 3px 0 var(--ink);
}
.tilt-card h3 {
  font-family: var(--f-heading); font-weight: 700; font-size: 1.6rem;
  margin-bottom: 0.6rem;
}
.tilt-card p { color: var(--ink-2); margin: 0 0 1rem; }
.tilt-card .go { font-family: var(--f-mono); font-size: 0.85rem; color: var(--red); }

/* ---------------------------------------------
   CERTIFICATIONS
--------------------------------------------- */
.cert-grid { display: flex; flex-wrap: wrap; gap: 1.8rem; justify-content: center; }
.cert-stamp {
  width: 150px; text-align: center;
  text-decoration: none; color: var(--paper);
  display: block;
}
.cert-stamp .ring {
  width: 100px; height: 100px; margin: 0 auto 0.8rem;
  border: 3px solid var(--red-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; color: var(--red-2);
  position: relative;
  transition: transform .25s ease, border-color .25s ease;
}
.cert-stamp .ring::before {
  content: ''; position: absolute; inset: -8px;
  border: 1px dashed var(--yellow); border-radius: 50%;
  animation: spin-slow 18s linear infinite;
}
.cert-stamp:hover .ring { transform: scale(1.08) rotate(-4deg); border-color: var(--yellow); }
.cert-stamp h5 {
  font-family: var(--f-heading); font-weight: 700; font-size: 1.05rem;
  color: var(--paper); letter-spacing: 0.5px;
}

/* ---------------------------------------------
   MISSION ACCORDIONS (projet.html)
--------------------------------------------- */
.mission {
  border: 3px solid var(--ink);
  margin-bottom: 1.8rem;
  background: var(--paper);
  box-shadow: var(--shadow-hard);
}
.mission-head {
  background: var(--ink); color: var(--paper);
  padding: 1.1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
  font-family: var(--f-heading); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.mission-head .num { color: var(--red-2); font-family: var(--f-mono); margin-right: 0.7rem; }
.mission-head .chev { transition: transform 0.25s ease; }
.mission.open .mission-head .chev { transform: rotate(180deg); }
.mission-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease;
  border-left: 6px solid var(--red);
}
.mission.open .mission-body { max-height: 900px; }
.mission-body-in { padding: 1.5rem; color: var(--ink-2); }
.mission-body-in p { color: var(--ink-2); margin: 0 0 1rem; }
.tech-badge {
  display: inline-block; background: var(--ink); color: var(--paper);
  font-family: var(--f-mono); font-size: 0.78rem;
  padding: 0.35rem 0.8rem; margin: 0 0.4rem 0.4rem 0;
  clip-path: polygon(8% 0,100% 0,92% 100%,0 100%);
}

.schema-frame { text-align: center; margin: 2.5rem 0; }
.schema-frame img {
  max-width: 100%; border: 3px solid var(--ink); box-shadow: var(--shadow-hard);
}
.schema-frame .cap { font-family: var(--f-mono); font-size: 0.85rem; color: var(--ink-2); margin-top: 0.8rem; }

/* ---------------------------------------------
   FOOTER
--------------------------------------------- */
.site-footer { background: var(--ink); color: var(--paper); padding: 3rem 1.5rem 1.5rem; }
.site-footer .wrap { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.site-footer h5 { color: var(--paper); font-family: var(--f-heading); font-size: 1.4rem; }
.site-footer p { color: var(--paper-dim); margin: 0.2rem 0 0; }
.site-footer .socials a { color: var(--paper); font-size: 1.4rem; margin-left: 0.9rem; transition: color .2s ease; }
.site-footer .socials a:hover { color: var(--red-2); }
.site-footer hr { border-color: rgba(239,236,228,0.15); margin: 2rem 0 1rem; }
.site-footer .bottom { text-align: center; font-family: var(--f-mono); font-size: 0.8rem; color: var(--paper-dim); }
.site-footer .bottom a { color: var(--red-2); }

/* ---------------------------------------------
   GENERIC PAGE HERO (secondary pages)
--------------------------------------------- */
.page-hero {
  background: var(--ink); color: var(--paper);
  padding: 4.5rem 1.5rem 5rem;
  position: relative; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}
.page-hero::after {
  content: ''; position: absolute; left: -10%; top: -30%; width: 55%; height: 160%;
  background: var(--red); opacity: 0.9;
  clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%);
}
.page-hero .wrap { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; text-align: center; }
.page-hero .eyebrow { font-family: var(--f-mono); color: var(--yellow); letter-spacing: 3px; font-size: 0.85rem; }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); color: var(--paper); margin-top: 0.6rem; }
.page-hero p { color: var(--paper-dim); max-width: 60ch; margin: 1rem auto 0; font-size: 1.1rem; }

/* ---------------------------------------------
   MISC UTILS
--------------------------------------------- */
.text-red { color: var(--red); }
.mono { font-family: var(--f-mono); }
.center { text-align: center; }
.mt-lg { margin-top: 3rem; }

/* stack panel used on homelab tech list, veille cards */
.panel {
  background: #fff; border: 2px solid var(--ink);
  padding: 1.5rem; box-shadow: 5px 5px 0 var(--line);
}

/* ---------------------------------------------
   CV FRAME — same phantom framing language as the profile photo
--------------------------------------------- */
.cv-frame {
  position: relative;
  width: min(480px, 92vw);
  margin: 0 auto;
}
.cv-frame .ring {
  position: absolute; inset: -16px;
  border: 3px solid var(--red-2);
  clip-path: polygon(6% 0, 100% 0, 100% 94%, 94% 100%, 0 100%, 0 6%);
  z-index: 0;
}
.cv-frame .ring::before {
  content: '';
  position: absolute; inset: -10px;
  border: 1px dashed var(--yellow);
  clip-path: polygon(6% 0, 100% 0, 100% 94%, 94% 100%, 0 100%, 0 6%);
}
.cv-frame img {
  position: relative; z-index: 1;
  width: 100%; display: block;
  clip-path: polygon(6% 0, 100% 0, 100% 94%, 94% 100%, 0 100%, 0 6%);
  border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  background: #fff;
}
.cv-frame .tag {
  position: absolute; bottom: -16px; left: -16px; z-index: 2;
  background: var(--red);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  padding: 0.4rem 0.8rem;
  transform: rotate(-4deg);
  box-shadow: var(--shadow-hard);
}
.cv-frame .corner {
  position: absolute; top: -16px; right: -16px; z-index: 2;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  padding: 0.35rem 0.7rem;
  transform: rotate(4deg);
  box-shadow: 3px 3px 0 var(--red);
}

/* ---------------------------------------------
   CONTACT FORM
--------------------------------------------- */
.contact-form { display: grid; gap: 1.3rem; }
.contact-form label {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--f-body);
  font-size: 1.05rem;
  padding: 0.85rem 1rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--line);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 4px 4px 0 var(--red);
  transform: translate(-2px,-2px);
}
.contact-form textarea { resize: vertical; min-height: 160px; font-family: var(--f-body); }
.contact-form .btn { border: none; }
.contact-info-row { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; margin-top: 2.5rem; }
.contact-info-item {
  font-family: var(--f-mono);
  font-size: 0.95rem;
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--ink);
}
.contact-info-item i { color: var(--red); }
.form-note { font-family: var(--f-mono); font-size: 0.8rem; color: var(--ink-2); margin-top: 0.6rem; }

::selection { background: var(--red); color: var(--paper); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .skill-cols { grid-template-columns: 1fr; }
  .site-header .wrap { flex-direction: column; gap: 0.8rem; }
  nav.phantom-nav ul { justify-content: center; }
}
