/* =============================================================
   YANN HAUQUIN – CV Personnel
   Style moderne, responsive, accessible
   ============================================================= */

/* ---- Variables & Reset ---- */
:root {
  --clr-bg:          #0d1117;
  --clr-surface:     #161b22;
  --clr-surface-2:   #1e2530;
  --clr-border:      #30363d;
  --clr-accent:      #4f8ef7;
  --clr-accent-dark: #1a56c4;
  --clr-accent-glow: rgba(79, 142, 247, 0.15);
  --clr-text:        #e6edf3;
  --clr-text-muted:  #8b949e;
  --clr-text-faint:  #484f58;
  --clr-success:     #3fb950;
  --clr-warn:        #d29922;
  --clr-tag-bg:      #21262d;
  --clr-tag-text:    #cdd9e5;
  --radius-sm:       6px;
  --radius-md:       10px;
  --radius-lg:       16px;
  --radius-xl:       24px;
  --shadow-sm:       0 1px 3px rgba(0,0,0,.4);
  --shadow-md:       0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:       0 8px 32px rgba(0,0,0,.6);
  --font-sans:       'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:       'JetBrains Mono', 'Fira Code', monospace;
  --transition:      0.2s ease;
  --nav-h:           64px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: #79a8f8; }

ul { list-style: none; }

/* ---- Container ---- */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================================
   NAVBAR
   ============================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border);
}

.nav-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--clr-text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.nav-logo:hover { color: var(--clr-accent); }

.logo-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.logo-name {
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-outline {
  background: transparent;
  border-color: var(--clr-border);
  color: var(--clr-text-muted);
}

.btn-outline:hover {
  background: var(--clr-surface);
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Language switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}

.lang-switch:hover {
  background: var(--clr-surface);
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

/* =============================================================
   HERO
   ============================================================= */
.hero {
  padding: 72px 0 64px;
  background: linear-gradient(160deg, var(--clr-surface) 0%, var(--clr-bg) 100%);
  border-bottom: 1px solid var(--clr-border);
  position: relative;
  overflow: hidden;
}

/* Subtle grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--clr-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--clr-border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.15;
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  position: relative;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.3);
  color: var(--clr-success);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-success);
  animation: pulse 2s infinite;
}

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

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--clr-text);
  margin-bottom: 8px;
}

.accent {
  background: linear-gradient(135deg, var(--clr-accent), #9bb4f8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500;
  color: var(--clr-text-muted);
  margin-bottom: 12px;
}

.hero-company {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  margin-bottom: 20px;
  padding: 6px 12px;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
}

.hero-tagline {
  font-size: 1rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  padding: 6px 12px;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}

.contact-item:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  background: var(--clr-accent-glow);
}

/* Photo */
.hero-photo {
  flex-shrink: 0;
}

.photo-wrapper {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 3px solid var(--clr-border);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--clr-surface);
  transition: border-color var(--transition);
}

.photo-wrapper:hover {
  border-color: var(--clr-accent);
}

.photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* =============================================================
   SECTIONS
   ============================================================= */
.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--clr-border);
}

.section:last-child {
  border-bottom: none;
}

.section-intro {
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--clr-text);
  margin-bottom: 8px;
  position: relative;
  padding-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-accent), transparent);
  border-radius: 2px;
}

.section-sub {
  color: var(--clr-text-muted);
  font-size: 1rem;
  margin-top: 8px;
}

.subsection-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 20px;
  margin-top: 48px;
}

/* =============================================================
   TIMELINE
   ============================================================= */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--clr-accent), var(--clr-border));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: 48px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--clr-surface-2);
  border: 2px solid var(--clr-border);
  transition: border-color var(--transition);
}

.timeline-marker.current {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 4px var(--clr-accent-glow);
}

.timeline-item:hover .timeline-marker {
  border-color: var(--clr-accent);
}

.timeline-content {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-item:hover .timeline-content {
  border-color: rgba(79, 142, 247, 0.4);
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--clr-accent);
  font-weight: 500;
}

.for-account {
  color: var(--clr-text-muted);
  font-weight: 400;
  font-size: 0.85em;
}

.timeline-period {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  padding: 3px 8px;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

.timeline-tasks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-tasks li {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.timeline-tasks li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--clr-accent);
  font-weight: 700;
}

/* =============================================================
   SKILLS GRID
   ============================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
  border-color: rgba(79, 142, 247, 0.5);
  box-shadow: var(--shadow-sm);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.skill-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.skill-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-text);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--clr-tag-bg);
  color: var(--clr-tag-text);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--clr-border);
  transition: all var(--transition);
  font-family: var(--font-mono);
}

.tag:hover {
  background: var(--clr-accent-glow);
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

.tag-highlight {
  background: rgba(79, 142, 247, 0.1);
  border-color: rgba(79, 142, 247, 0.35);
  color: #79a8f8;
}

/* =============================================================
   EDUCATION
   ============================================================= */
.edu-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: border-color var(--transition);
}

.edu-card:hover {
  border-color: rgba(79, 142, 247, 0.4);
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--clr-text-faint);
  white-space: nowrap;
  padding-top: 3px;
  min-width: 70px;
}

.edu-body {
  flex: 1;
}

.edu-degree {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 3px;
}

.edu-school {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  margin-bottom: 6px;
}

.edu-mention {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.mention-bien {
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.3);
  color: var(--clr-success);
}

.mention-ab {
  background: rgba(210, 153, 34, 0.12);
  border: 1px solid rgba(210, 153, 34, 0.3);
  color: var(--clr-warn);
}

/* Languages */
.lang-section {
  margin-top: 40px;
}

.lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  flex: 1;
  min-width: 200px;
  transition: border-color var(--transition);
}

.lang-item:hover { border-color: rgba(79, 142, 247, 0.4); }

.lang-flag {
  font-size: 1.6rem;
}

.lang-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-text);
}

.lang-level {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
}

.level-native { color: var(--clr-success); }
.level-pro { color: var(--clr-accent); }
.level-school { color: var(--clr-text-muted); }

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

.project-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  border-color: rgba(79, 142, 247, 0.5);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.project-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.project-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

/* =============================================================
   MISC
   ============================================================= */
.section-misc {
  border-bottom: none;
}

.misc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.misc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  flex: 1;
  min-width: 220px;
  transition: border-color var(--transition);
}

.misc-card:hover { border-color: rgba(79, 142, 247, 0.4); }

.misc-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.misc-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 3px;
}

.misc-value {
  font-size: 0.825rem;
  color: var(--clr-text-muted);
}

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}

.footer-copy a {
  color: var(--clr-text-muted);
}

.footer-copy a:hover { color: var(--clr-accent); }

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--clr-accent); }

/* =============================================================
   SCROLL REVEAL (animation légère)
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 768px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero-inner {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 32px;
  }

  .hero-photo {
    align-self: center;
  }

  .photo-wrapper {
    width: 140px;
    height: 140px;
  }

  .hero-contact {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .misc-card {
    min-width: 100%;
  }

  .lang-item {
    min-width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .nav-container {
    padding: 0 16px;
  }

  .logo-name {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 56px 0;
  }

  .timeline-content {
    padding: 16px;
  }

  .edu-card {
    flex-direction: column;
    gap: 8px;
  }

  .edu-year {
    min-width: auto;
  }
}

/* =============================================================
   PRINT
   ============================================================= */
@media print {
  .navbar,
  .footer,
  .hero-badge {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
  }

  .hero {
    background: #fff;
    border: none;
    padding: 0;
  }

  .hero::before { display: none; }

  .hero-title { color: #111; font-size: 24pt; }
  .hero-subtitle { color: #444; }
  .accent { -webkit-text-fill-color: #1a56c4; }

  .section { padding: 24px 0; }

  .timeline-content,
  .skill-card,
  .edu-card,
  .project-card,
  .misc-card,
  .lang-item {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: none;
  }

  .tag {
    background: #f0f0f0;
    color: #333;
    border-color: #ccc;
  }

  a { color: #1a56c4; }
  .contact-item { border-color: #ddd; color: #333; background: #f9f9f9; }
}

/* =============================================================
   FOCUS / ACCESSIBILITY
   ============================================================= */
:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

