/* ============================================
   Portfolio Antoine Passier — GEII / FPGA
   Design : corporate bleu/blanc, signature "trace de circuit" + Glassmorphism
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --navy: #0A2647;
  --blue: #144272;
  --cyan: #00B4D8;
  --cyan-dim: rgba(0, 180, 216, 0.12);
  --white: #FFFFFF;
  --grey-light: #F7F9FC;
  --grey-line: #E2E8F0;
  --text: #10243E;
  --text-muted: #5A6B85;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-width: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* FOND ANIME */
body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(-45deg, #f0f4f8, #e0e8f5, #d6e4f0, #ffffff);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border-radius: 6px; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 500;
}

.text-muted { color: var(--text-muted); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .dot {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cyan);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--navy);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 100px 0 90px;
  overflow: hidden;
  background: transparent;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.08;
  margin: 18px 0 20px;
}

.hero h1 .highlight {
  color: var(--cyan);
}

.hero p.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue); }

.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

/* Circuit trace SVG signature */
.circuit-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
}

.circuit-svg path.trace {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: draw 2.2s ease forwards;
}
.circuit-svg path.trace.cyan { stroke: var(--cyan); }
.circuit-svg circle.via {
  fill: var(--navy);
  opacity: 0;
  animation: fadein 0.4s ease forwards;
}
.circuit-svg circle.via.cyan { fill: var(--cyan); }

@keyframes draw {
  to { stroke-dashoffset: 0; }
}
@keyframes fadein {
  to { opacity: 1; }
}

.circuit-divider {
  width: 100%;
  height: 40px;
  display: block;
}
.circuit-divider path {
  fill: none;
  stroke: rgba(10, 38, 71, 0.1);
  stroke-width: 1.5;
}
.circuit-divider circle {
  fill: var(--cyan);
}

/* ---------- Sections ---------- */
.section {
  padding: 88px 0;
}
.section-alt {
  background: transparent;
}

.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-top: 10px;
}

/* ---------- Cards / grid (GLASSMORPHISM) ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card, .project-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px rgba(10, 38, 71, 0.05);
  border-radius: 8px;
  padding: 30px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover, .project-card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 180, 216, 0.15);
}

.card .icon-chip {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--cyan-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--cyan);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--blue);
  border: 1px solid rgba(10, 38, 71, 0.1);
}

/* ---------- Timeline (Parcours) ---------- */
.timeline {
  position: relative;
  padding-left: 36px;
  border-left: 2px solid rgba(10, 38, 71, 0.1);
}
.timeline-item {
  position: relative;
  padding-bottom: 44px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -43px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--cyan);
}
.timeline-item.current::before {
  background: var(--cyan);
  box-shadow: 0 0 0 4px var(--cyan-dim);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 6px;
  display: block;
}

.timeline-item h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.timeline-item .place {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

/* ---------- Placeholder note ---------- */
.todo-note {
  border: 1.5px dashed #C7D2E0;
  background: rgba(0, 180, 216, 0.08);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--blue);
  margin-top: 14px;
}
.todo-note strong { color: var(--navy); }

/* ---------- Skills bars ---------- */
.skill-row { margin-bottom: 20px; }
.skill-row .skill-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 7px;
}
.skill-row .skill-label .lvl {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.78rem;
}
.skill-bar {
  height: 6px;
  background: rgba(10, 38, 71, 0.1);
  border-radius: 3px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 3px;
}

/* ---------- Project cards (Projets page) ---------- */
.project-card {
  padding: 0; /* Override the default padding for full image/header style */
  margin-bottom: 28px;
}
.project-card-head {
  padding: 30px 34px 0;
}
.project-card-head .eyebrow { margin-bottom: 8px; display: block; }
.project-card h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}
.project-card-body {
  padding: 18px 34px 30px;
  color: var(--text-muted);
}
.project-award {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ---------- Form (Contact) ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group { margin-bottom: 20px; }
.form-group.full { grid-column: 1 / -1; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

input, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(10, 38, 71, 0.2);
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s ease, background 0.2s ease;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  background: var(--white);
}

textarea { resize: vertical; min-height: 140px; }

.form-msg {
  padding: 14px 18px;
  border-radius: 5px;
  font-size: 0.9rem;
  margin-bottom: 22px;
  display: none;
}
.form-msg.success {
  display: block;
  background: rgba(230, 247, 238, 0.9);
  color: #146C43;
  border: 1px solid #A9E3C4;
}
.form-msg.error {
  display: block;
  background: rgba(253, 236, 236, 0.9);
  color: #B42318;
  border: 1px solid #F5B5AF;
}

.contact-info-card {
  background: rgba(10, 38, 71, 0.85); /* Semi-transparent Navy */
  color: var(--white);
  border-radius: 8px;
  padding: 36px;
}
.contact-info-card h3 {
  color: var(--white);
  margin-bottom: 22px;
}
.contact-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 0.95rem;
}
.contact-line .lbl {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 72px;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(10, 38, 71, 0.1);
  padding: 40px 0;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-inner p {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 22px;
  list-style: none;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--cyan); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero .circuit-wrap { order: -1; max-width: 260px; margin: 0 auto; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 20px 32px;
    border-bottom: 1px solid var(--grey-line);
    display: none;
    gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .circuit-svg path.trace { animation: none; stroke-dashoffset: 0; }
  .circuit-svg circle.via { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
  body { animation: none; }
}