<div class="content has-text-left">

    {% assign resume = site.data.resume.resume_versions | find: "active", true | first %}
    <h2>{{ resume.name }}</h2>

    {% for section in resume.sections %}
    <section id="{{ section.section_name | replace: ' ', '_' }}">
        <h3>{{ section.section_name }}</h3>

        {% case section.section_name %}
            {% when "Contact details" %}
            <address>
                <a href="tel:{{ section.phone | replace: ' ', '' }}">{{ section.phone }}</a> |
                <a href="mailto:{{ section.email }}">{{ section.email }}</a> |
                <a href="{{ section.linkedin }}">{{ section.linkedin }}</a>
            </address>


            {% when "Skills" %}

                {% unless section.hard == null %}            
                <ul data-type="skills-hard" class="skills" style="display: flex; flex-wrap:wrap">
                    {% for skill in section.hard %}
                    <li style="width: calc(100% / 3);">{{ skill }}</li>
                    {% endfor %}
                </ul>
                {% endunless %}
                    
                {% unless section.soft == null %}
                <ul data-type="skills-soft" class="skills">
                    {% for skill in section.soft %}
                    <li>{{ skill }}</li>
                    {% endfor %}
                </ul>
                {% endunless %}

            {% when "Experience" %}
                {% for experience in section.experiences | where: 'relevant', true %}
                <div id="{{ experience.company | replace: ' ', '_' }}">
                    <h4>{{ experience.company }}</h4>
                    {% for position in experience.positions | where: 'relevant', true %}
                    <div id="{{ postion.title | replace: ' ', '_' }}">
                        <h5>{{ position.title }}</h5>
                        {% unless position.summary == null %}
                        <p>{{ position.summary | newline_to_br }}</p>
                        {% endunless %}

                        <!-- Achievements -->
                        {% unless position.achievements == null %}
                        <ul class="postion_achievements">
                            {% for achievement in position.achievements %}
                            <li>{{ achievement }}</li>
                            {% endfor %}
                        </ul>
                        {% endunless %}


                    </div>
                    {% endfor %}
                </div>
                {% endfor %}
 
            {% when "Education" %}
                <ul class="education pb-3">
                {% for qualification in section.qualifications %}
                    <li>
                        {{ qualification.level }} in {{ qualification.name }} - 
                        {{ qualification.institution }} 
                        ({{ qualification.date_start }}-{{ qualification.date_end }})

                    </li>

                {% endfor %}
                </ul>

            {% when "Awards" %}
                <ul class="awards pb-3">
                    {% for award in section.awards %}
                    <li>
                        {{ award.name }} from {{ award.award_body }} - 
                        {{ award.website }} ({{ award.date }})
                
                    </li>
                
                    {% endfor %}
                </ul>
        {% endcase %}

        
        <hr>
    </section>    
    {% endfor %}







{% comment %}
<address>
    {{ site.data.resume.contact.name }} | 
    
</address>
{% endcomment %}
<hr>







{% comment %}
<!-- Experience section -->
<h2>Experience</h2>
{% for experience in site.data.resume.experiences %}
    <div data-type="company">
        <h3>{{ experience.company }} | {{ experience.company }}</h3>
        {% for position in experience.positions %}
        <div data-type="position">
            <h4 data>{{ postion.title }} | {{ postion.date_start | date: "%b %Y" }} - 
                {{ postion.date_end | default: "Current role" | date: "%b %Y" }}</h4>
            <p data-type="">{{ position.summary }}</p>
            <ul>
                {% for achievement in position.achievements %}
                <li>{{ achievement }}</li>
                {% endfor %}
            </ul>

        </div>
        {% endfor %}
    </div>
{% endfor %}
<hr>

{% endcomment %}

</div>