@import url("./hero.css");
@import url("./skills.css");
@import url("./projects.css");
@import url("./contact.css");
@import url("./language-selector.css");
@import url("./responsive.css");

:root {
  --color-bg-main: rgb(23, 42, 58);
  --color-bg-secondary: #161b22;
  --color-text-main: #ecedec;
  --color-text-secondary: #508991;

  --color-primary: #247b7b;
  --color-primary-hover: var(--color-accent);
  --color-secondary: #004346;
  --color-tertiary: #508991;
  --color-accent: #44a1a0;

  --color-danger: #f87171;
  --color-success: var(--color-accent);

  /* Altres */
  --color-border: #2a2f36;
  --color-shadow: rgba(0, 0, 0, 0.4);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(
    to bottom,
    var(--color-bg-main) 0%,
    var(--color-bg-main) 10%,
    var(--color-secondary) 50%,
    var(--color-bg-main) 100%
  );
  min-height: 100vh;
}
body {
  width: 100%;
  max-width: 1280px;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-main);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
header {
    position: sticky;
  z-index: 2;
  top: 0;
  width: 100%;
  background-color: rgba(23, 42, 58, 0.9); 
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
  > nav ul {
    display: flex;
    gap: 2rem;
  }
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
h1 {
  font-size: 4rem;
  color: var(--color-text-main);
  line-height: 1;
  margin-bottom: 0.5rem;
  > span {
    color: var(--color-tertiary);
  }
}
h2 {
  width: 100%;
  text-align: center;
  font-size: 3rem;
  color: var(--color-text-main);
  margin: 2rem 0 1rem 0;
}
h3 {
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}
h4 {
  font-size: 1.2rem;
  color: var(--color-text-main);
}
h5 {
  font-size: 1rem;
  color: var(--color-text-primary);
  margin-top: 0.5rem;
  margin-bottom:0.5rem;
}
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1rem 0;
}
a {
  color: var(--color-text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap:0.4rem;
  span {
    font-size: 1rem;
  }
}
a:hover {
  color: var(--color-tertiary);
}

/* Estils icons material */
.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}
/* --- */

main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
}
main > div {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  flex: 1;
  min-width: 0;
  padding: 1rem;
}
section {
  width: 100%;
  padding: 1.8rem;

  /* Estat inicial */
  opacity: 0;
  transform: translateY(120px);

  /* Animació basada en scroll */
  animation: revealOnScroll linear both;
  animation-timeline: view(block);
  animation-range: cover 0% cover 25%;
}
section:last-child {
  margin-bottom: 20vh;
}
@keyframes revealOnScroll {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

footer {
  position: sticky;
  z-index: 2;
  bottom:0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
  background-color: rgba(23, 42, 58, 0.9); 
  color: var(--color-text-secondary);
  ul {
    display: flex;
    gap: 1rem;
  }
  img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 0.5rem;
  }
}