/* 1. Colours and fonts for the whole page */
:root {
  --brand: #4338ca;
  --accent: #db2777;
  --soft: #eef2ff;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  color: #1e1b2e;
  background-color: #f5f5fb;
}

/* 2. The header: a coloured band with the avatar */
header {
  text-align: center;
  padding: 32px 16px 24px;
  color: white;
  background-color: var(--brand);
}

header img {
  background-color: white;
  border-radius: 50%;
  padding: 8px;
}

header h1 {
  margin: 8px 0 0;
  font-size: 2rem;
}

header p {
  margin: 0 0 16px;
  opacity: 0.85;
}

/* 3. The menu: links that look like buttons */
nav a {
  display: inline-block;
  padding: 6px 16px;
  margin: 4px;
  border-radius: 999px;
  color: var(--brand);
  background-color: white;
  text-decoration: none;
  font-weight: 700;
}

/* 4. The content: white cards, centred */
main {
  max-width: 640px;
  margin: 24px auto;
  padding: 0 16px;
}

section {
  background-color: white;
  border-radius: 16px;
  padding: 8px 24px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(30, 27, 46, 0.08);
}

h2 {
  color: var(--brand);
  border-bottom: 3px solid var(--soft);
  padding-bottom: 4px;
}

/* 5. Skills as coloured tags */
ul {
  padding: 0;
}

li {
  display: inline-block;
  list-style: none;
  padding: 4px 14px;
  margin: 4px;
  border-radius: 999px;
  color: white;
  background-color: var(--accent);
}

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

footer {
  text-align: center;
  color: #5b5873;
  font-size: 0.9rem;
  padding-bottom: 24px;
}

/* 6. Chapter 7: layout with Flexbox and Grid */
*,
*::before,
*::after {
  box-sizing: border-box;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 24px;
}

header nav {
  flex-basis: 100%;
}

main {
  max-width: 900px;
  display: grid;
  gap: 16px;
}

section {
  margin-bottom: 0;
}

ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

li {
  margin: 0;
}

/* Wide screens: avatar beside the name, cards in two columns */
@media (min-width: 700px) {
  header {
    justify-content: flex-start;
    text-align: start;
    padding-inline: 48px;
  }

  main {
    grid-template-columns: 1fr 1fr;
  }

  #about {
    grid-column: 1 / -1;
  }
}
