/* DESIGN: GitHub Profile Style */
:root {
  --primary: #58a6ff;
  --primary-hover: #79b8ff;
  --bg: #0d1117;
  --bg-alt: #161b22;
  --card: #0d1117;
  --text: #c9d1d9;
  --text-bright: #f0f6fc;
  --text-light: #8b949e;
  --text-lighter: #6e7681;
  --border: #30363d;
  --border-muted: #21262d;
  --tag-bg: #1f6feb26;
  --tag-text: #79c0ff;
  --success: #3fb950;
  --purple: #a371f7;
  --orange: #d29922;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

.container { max-width: 1280px; margin: 0 auto; padding: 1.5rem 2rem; }

.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.profile-photo {
  width: 110px;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--border);
}

.header-left h1 {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.25;
}

.header-left .title {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-light);
  margin-top: 0.2rem;
}

.years-exp {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}
.years-exp .stat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-light);
  transition: all 0.15s;
}
.years-exp .stat:hover { border-color: var(--primary); background: rgba(88, 166, 255, 0.05); }
.years-exp .stat strong {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.header-right {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-light);
}

.header-right .contact-item { display: flex; align-items: center; gap: 0.6rem; }
.header-right .icon { width: 18px; color: var(--text-lighter); text-align: center; }

.clients-container { padding-top: 0.8rem; padding-bottom: 0; }
.clients-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.clients-label { font-size: 0.8rem; color: var(--text-light); font-weight: 600; margin-right: 0.3rem; }
.clients-list { gap: 0.35rem !important; }
.client-badge {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.client-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 2px;
  background: white;
  padding: 1px;
  transition: transform 0.2s ease-out;
  transform-origin: center center;
  position: relative;
  z-index: 1;
}
@media (hover: hover) {
  .client-badge:hover {
    opacity: 0.8;
  }
}
.client-badge { position: relative; overflow: visible; }
.client-more { color: var(--text-lighter); font-size: 0.85rem; padding: 0 0.3rem; }
.client-badge:hover { border-color: var(--primary); color: var(--primary); }

.summary-container { padding-top: 1.5rem; padding-bottom: 0; }
.summary-text {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}

.main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.sidebar section {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--primary);
  letter-spacing: 0.3px;
}

.main-section-title {
  font-size: 1.05rem;
  color: var(--text-bright);
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.skill-category { margin-bottom: 1.1rem; }
.skill-category:last-child { margin-bottom: 0; }
.skill-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-bright);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0.35rem;
}

/* Tags as text only */
.skill-tags .tag {
  background: transparent;
  color: var(--text-light);
  border: none;
  padding: 0 0.3rem 0 0;
  line-height: 1.5;
  font-size: 0.8rem;
}
.skill-tags .tag::after { content: ' · '; color: var(--text-lighter); }
.skill-tags .tag:last-child::after { content: ''; }



.skill-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0 0.55rem;
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.6rem;
}
.tag:hover { border-color: var(--primary); cursor: default; }


.edu-item { margin-bottom: 0.7rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--border-muted); }
.edu-item:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.edu-degree { font-weight: 600; font-size: 0.85rem; color: var(--text-bright); }
.edu-school { font-size: 0.78rem; color: var(--text-light); margin-top: 0.1rem; }
.edu-period { font-size: 0.72rem; color: var(--text-lighter); }

.lang-item { font-size: 0.82rem; margin-bottom: 0.4rem; color: var(--text); display: flex; justify-content: space-between; }
.lang-level { color: var(--text-light); font-size: 0.76rem; }

.hobby-item {
  padding-left: 1rem;
  position: relative;
  color: var(--text-light);
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}
.hobby-item::before { content: '•'; position: absolute; left: 0.2rem; color: var(--primary); }

.exp-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.2rem;
  margin-bottom: 0.8rem;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}

.exp-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform 0.2s;
}

.exp-card:hover {
  border-color: var(--primary);
  background: rgba(88, 166, 255, 0.04);
  transform: translateX(2px);
}
.exp-card:hover::before { transform: scaleY(1); }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exp-card {
  display: flex;
  gap: 1rem;
}
.exp-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.2rem;
  background: white;
  border-radius: 6px;
  padding: 4px;
}
.exp-logo img {
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}
.exp-logo-empty {
  width: 48px;
  background: none;
}
.exp-card-content {
  flex: 1;
  min-width: 0;
}
.exp-company {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
}

.exp-badge {
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0 0.6rem;
  border: 1px solid transparent;
  border-radius: 20px;
  text-transform: capitalize;
  line-height: 1.6rem;
}
.badge-freelance { background: rgba(63, 185, 80, 0.15); color: var(--success); border-color: rgba(63, 185, 80, 0.4); }
.badge-current {
  background: var(--success);
  color: #0d1117;
  border: 1px solid var(--success);
  font-weight: 700;
  position: relative;
  padding-left: 1.2rem !important;
}
.badge-current::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #0d1117;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.badge-cdi { background: var(--tag-bg); color: var(--tag-text); border-color: rgba(121, 192, 255, 0.4); }
.badge-stage, .badge-militaire { background: rgba(210, 153, 34, 0.15); color: var(--orange); border-color: rgba(210, 153, 34, 0.4); }

.exp-role { font-size: 0.85rem; font-weight: 400; color: var(--text); }
.exp-role-inline { font-size: 0.9rem; font-weight: 400; color: var(--text-light); }
.exp-meta { display: none; }
.exp-meta-inline { font-size: 0.75rem; color: var(--text-lighter); font-style: italic; font-weight: 400; }
.exp-period { color: var(--text); font-weight: 600; font-style: normal; }
.exp-description { font-size: 0.82rem; color: var(--text-light); line-height: 1.55; margin-bottom: 0.7rem; }

.exp-highlights { list-style: none; margin: 0.5rem 0 0.7rem; padding: 0; }
.exp-highlights li {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.3rem;
}
.exp-highlights li::before {
  content: '▸';
  position: absolute;
  left: 0.2rem;
  color: var(--primary);
  font-weight: 700;
}

.exp-stack { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.stack-tag {
  background: transparent;
  color: var(--text-light);
  padding: 0 0.45rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.67rem;
  font-weight: 500;
  line-height: 1.4rem;
}
.stack-tag-important { background: rgba(163, 113, 247, 0.15); color: var(--purple); border-color: rgba(163, 113, 247, 0.4); }

@media (max-width: 768px) {
  .container { padding: 1rem; }

  /* Header mobile - keep desktop layout, contacts wrap below */
  .header .container { flex-wrap: wrap; gap: 0.8rem; }
  .header-left h1 { font-size: 1.4rem; }
  .header-left .title { font-size: 0.9rem; }
  .header-right { width: 100%; flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.78rem; }
  .profile-photo { width: 80px; height: 110px; }

  /* Stats mobile */
  .years-exp { flex-wrap: wrap; justify-content: center; gap: 0.4rem; }
  .years-exp .stat { font-size: 0.68rem; padding: 0.2rem 0.5rem; }

  /* Clients mobile */
  .clients-list {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem !important;
  }
  .client-badge { font-size: 0.72rem; padding: 0.35rem 0.5rem; justify-content: center; }
  .client-more { grid-column: 1 / -1; text-align: center; }

  /* Summary mobile */
  .summary-text { font-size: 0.8rem; }

  /* Main layout single column */
  .main { grid-template-columns: 1fr; gap: 1rem; display: flex; flex-direction: column; }
  .content { order: -1; }

  /* Experience cards mobile */
  .exp-logo { width: 36px; height: 36px; }
  .exp-logo img { max-width: 36px; max-height: 36px; }
  .exp-logo-empty { width: 36px; }
  .exp-card { gap: 0.6rem; }
  .exp-header { flex-direction: column; gap: 0.3rem; }
  .exp-company { font-size: 0.95rem; }
  .exp-role-inline { display: inline; font-size: 0.82rem; }
  .exp-meta-inline { display: block; margin-top: 0.15rem; font-size: 0.7rem; }
  .exp-header > div:last-child { display: flex; gap: 0.3rem; }
  .exp-description { font-size: 0.78rem; }
  .exp-highlights li { font-size: 0.78rem; }
  .stack-tag { font-size: 0.62rem; }

  /* Badges */
  .exp-badge { font-size: 0.6rem; }
  .badge-current { padding-left: 1rem !important; }

  /* Hide print button on mobile */
  .print-btn { display: none !important; }

  /* Client logos mobile */
  .client-logo { width: 16px !important; height: 16px !important; }

  /* Toggle button */
  .main-section-header { flex-wrap: wrap; }
  .toggle-details-btn { font-size: 0.65rem; padding: 0.25rem 0.5rem; }
}

@media print {
  body { background: white; color: #000; }
  .header, .sidebar section, .exp-card { background: white; border-color: #ddd; }
  .header-left h1, .edu-degree, .exp-company { color: #000; }
  .exp-header { flex-wrap: nowrap !important; }
  .exp-header > div:first-child { flex: 1; }
  .exp-badge { white-space: nowrap; font-size: 0.6rem; }
  @page { margin: 1cm; }
}
