@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;1,9..40,300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Honk:MORF,SHLN@19,26.4&display=swap');
/* ──────────────────────────────
   Base
────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'DM Sans', Arial, sans-serif;
  background: #0f0f0f;
  color: #eaeaea;
}

/* ──────────────────────────────
   Hero
────────────────────────────── */
.hero {
  padding: 60px 20px;
  text-align: center;
  background: linear-gradient(120deg, #1f1f1f, #2d2d2d);
  margin-bottom: 10px;
  position: relative;
}

.hero h1 {
  font-family: 'Honk', system-ui;
  font-optical-sizing: auto;
  font-weight: 800;
  font-style: normal;
   font-size: 4em;
  font-variation-settings:
    "MORF" 19,
    "SHLN" 26.4,
}

.hero p {
  color: #aaa;
  font-weight: 300;
}

/* ──────────────────────────────
   Navegació
────────────────────────────── */
.nav {
  position: absolute;
  top: 20px;
  right: 30px;
  display: flex;
  gap: 20px;
}

.nav a {
  color: #aaa;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover {
  color: #eaeaea;
}

.nav a.active {
  color: #ffcd61;
  border-bottom-color: #ffcd61;
}

/* ──────────────────────────────
   Seccions generals
────────────────────────────── */
section {
  max-width: 900px;
  margin: auto;
  padding: 0 20px;
}

h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3, h4, h5 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

/* ──────────────────────────────
   About
────────────────────────────── */
.about img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 20px auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ──────────────────────────────
   Targetes de projecte
────────────────────────────── */
.project-card {
  background: #1c1c1c;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 40px;
  border: 0.5px solid #2a2a2a;
  transition: border-color 0.25s;
}

.project-card:hover {
  border-color: #ffcd61;
}

.project-card a {
  color: #ffcd61;
  text-decoration: none;
}

.project-card a:hover {
  text-decoration: underline;
}

.project-card img,
.project-card video {
  width: 50%;
  border-radius: 8px;
  margin-bottom: 15px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.project-card iframe {
  display: block;
  margin: 0 auto 15px;
  border-radius: 8px;
  max-width: 100%;
}

audio {
  width: 100%;
  margin-bottom: 15px;
}

.project-card ul {
  list-style: none;
  padding: 0;
}

.project-card li {
  background: #2a2a2a;
  display: inline-block;
  padding: 6px 10px;
  margin: 4px;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* ──────────────────────────────
   Carrusel  (fix: track ocupa 100%)
────────────────────────────── */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 15px;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  /* FIX: cada imatge ocupa exactament l'amplada visible */
}

.carousel-track img {
  width: 100%;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 10px;
}

/* Botons del carrusel */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 1.5rem;
  padding: 3px 8px;
  cursor: pointer;
  border-radius: 6px;
  z-index: 10;
  transition: background 0.2s;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-btn:hover {
  background: rgba(184, 255, 87, 0.2);
  color: #ffcd61;
}

/* ──────────────────────────────
   Environment Artist
────────────────────────────── */
.environment {
  background: #121212;
  padding: 20px 0 40px;
}

.env-intro {
  max-width: 700px;
  margin-bottom: 30px;
  color: #ccc;
  font-weight: 300;
}

.env-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.env-card {
  background: #1b1b1b;
  padding: 20px;
  border-radius: 12px;
  border: 0.5px solid #2a2a2a;
}

.env-card h3 {
  margin-top: 0;
  color: #ffcd61;
}

.env-card ul {
  list-style: none;
  padding: 0;
}

.env-card li {
  background: #2a2a2a;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/* ──────────────────────────────
   2D Pixel Artist
────────────────────────────── */
body.pixelart-body {
  background: url('assets/images/beach_background.PNG') no-repeat center top;
  background-size: cover;
  background-attachment: fixed;
  color: #eaeaea;
  image-rendering: pixelated;
}

.pixel-art {
  background: #121212;
  padding: 40px 20px;
  text-align: center;
}

.pixel-art h2 { margin-bottom: 10px; }
.pixel-art p { color: #ccc; margin-bottom: 30px; }

.pixel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  justify-items: center;
}

.pixel-card {
  background: #1b1b1b;
  padding: 15px;
  border-radius: 12px;
  width: 100%;
  max-width: 250px;
  border: 0.5px solid #2a2a2a;
}

.pixel-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin-bottom: 10px;
}

.pixel-card p {
  font-size: 0.9rem;
  color: #aaa;
  margin: 0;
}

.pixel-card img.large {
  width: 100%;
  max-width: 500px;
  height: auto;
  image-rendering: pixelated;
  border: 2px solid #555;
  margin-bottom: 10px;
}

/* ──────────────────────────────
   Footer
────────────────────────────── */
footer {
  text-align: center;
  padding: 24px 20px;
  background: #141414;
  color: #555;
  font-size: 0.9rem;
  border-top: 0.5px solid #222;
  margin-top: 40px;
}

footer a {
  color: #ffcd61;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
