/*────────────────────────────────────────────────────────
  1. Fonts, variables i reset
────────────────────────────────────────────────────────*/
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('fonts/pp-neue-montreal.woff2') format('woff2'),
       url('fonts/pp-neue-montreal.woff')  format('woff');
  font-weight: normal;
  font-style: normal;
}

:root {
  --font-base: 'PP Neue Montreal', sans-serif;
  --color-bg: #ffffff;
  --color-text: rgba(28, 28, 28, 1);
  --color-text-muted: rgba(100, 100, 100, 1);
  --color-border: rgba(200, 200, 200, 0.4);
  
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --radius: 8px;
}

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

html {
  font-size: 16px;
}

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

/*────────────────────────────────────────────────────────
  2. Container i punts de tall
────────────────────────────────────────────────────────*/
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
  .container {
    max-width: 600px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 750px;
  }
}

/*────────────────────────────────────────────────────────
  3. HEADER
────────────────────────────────────────────────────────*/
.cv-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) 0;
  text-align: center;
}

.cv-avatar img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
}

.cv-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.cv-subtitle {
  font-size: 1rem;
  margin-bottom: var(--space-xxs);
  color: var(--color-text-muted);
}

.cv-link {
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
  background-color: #f6f6f6;
  padding: 0.2rem 0.75rem;
  border-radius: 1rem;
}

.cv-link:hover {
  text-decoration: none;
}

@media (min-width: 768px) {
  .cv-header {
    flex-direction: row;
    text-align: left;
  }
  .cv-avatar {
    margin-right: var(--space-md);
  }
  .cv-hero {
    flex: 1;
  }
}

/*────────────────────────────────────────────────────────
  4. SECCIONS
────────────────────────────────────────────────────────*/
.cv-section {
  margin-bottom: var(--space-lg);
}

.cv-section__title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.cv-about > p {
 color: var(--color-text-muted);
}

/* Paràgraf corrent AHORA amb white-space normal */
.cv-text {
  font-size: 1rem;
  color: var(--color-text);
  white-space: normal;
  margin-bottom: var(--space-sm);
}

/*────────────────────────────────────────────────────────
  5. TIMELINE (Work / Acadèmics / Cursos)
────────────────────────────────────────────────────────*/


.timeline {
  display: grid;
  row-gap: var(--space-sm);
}


.timeline__item {
  display: grid;
   /* Primer column de data fixa (o bé max-content si ho prefereixes),
     segon column de contingut sempre comença al mateix punt */
  grid-template-columns: 120px 1fr;
  column-gap: var(--space-md);
}

@media (max-width: 767px) {
  .timeline__item {
    grid-template-columns: 1fr;
  }
}

.timeline__date {
  font-size: 1rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.timeline__role {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--space-xxs);
}

.timeline__location {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

/*────────────────────────────────────────────────────────
  6. LANGUAGES (UNA SOLA COLUMNA)
────────────────────────────────────────────────────────*/
.languages-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.languages-list__item {
  /* grid intern per terme + definició */
  display: grid;
  grid-template-columns: 120px 1fr;
  font-weight: 500;
  column-gap: var(--space-md);
  align-items: baseline;
}

.languages-list dt {
  font-weight: 400;
  color: var(--color-text-muted);
}

.languages-list dd {
  margin: 0;
  color: var(--color-text-muted);
}

/* ...i la definició (dd) en negre, alineada a l’esquerra */
.languages-list__item dd {
  color: var(--color-text);
  margin: 0;
  text-align: left;
}

/*────────────────────────────────────────────────────────
  7. Ajustaments finals
────────────────────────────────────────────────────────*/
h1, h2, h3, h4, h5, h6, a, p {
  font-family: var(--font-base);
}
