<section id="projects" class="py-16 bg-gray-50">
  <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
    <div class="text-center mb-12" data-aos="fade-up">
      <h2 class="text-3xl font-bold text-gray-900 mb-4">
        {{ sections.projects.title }}
      </h2>
      {% if sections.projects.subtitle %}
      <p class="text-lg text-gray-600">{{ sections.projects.subtitle }}</p>
      {% endif %}
      <div class="w-16 h-1 bg-primary rounded-full mx-auto mt-4"></div>
    </div>

    <div class="grid md:grid-cols-2 gap-8">
      {% for project in sections.projects.items %}
      <div
        class="bg-white rounded-xl overflow-hidden shadow-sm hover:shadow-lg transition-shadow"
        data-aos="fade-up"
        data-aos-delay="{{ loop.index0 * 100 }}"
      >
        {% if project.image %}
        <img
          src="{{ project.image.src }}"
          alt="{{ project.image.alt }}"
          class="w-full h-48 object-cover"
        />
        {% endif %}

        <div class="p-6">
          <div class="flex items-center justify-between mb-3">
            <h3 class="text-xl font-semibold text-gray-900">
              {{ project.title }}
            </h3>
            {% if project.status %}
            <span
              class="px-2 py-1 bg-green-100 text-green-800 text-xs font-medium rounded"
            >
              {{ project.status }}
            </span>
            {% endif %}
          </div>

          {% if project.description %}
          <p class="text-gray-600 mb-4">{{ project.description }}</p>
          {% endif %} {% if project.technologies %}
          <div class="flex flex-wrap gap-2 mb-4">
            {% for tech in project.technologies %}
            <span class="px-2 py-1 bg-gray-100 text-gray-700 text-xs rounded"
              >{{ tech }}</span
            >
            {% endfor %}
          </div>
          {% endif %} {% if project.links %}
          <div class="flex gap-4">
            {% for link in project.links %}
            <a
              href="{{ link.url }}"
              class="text-primary font-medium hover:text-primary/80 transition-colors text-sm"
            >
              {{ link.label }} →
            </a>
            {% endfor %}
          </div>
          {% endif %}
        </div>
      </div>
      {% endfor %}
    </div>
  </div>
</section>
