.tag {
    display: inline-block;
    width: 10px;
    height: 15px;
    background-color: gray;
    position: relative;
    border-radius: 5px 5px 0 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transform-origin: bottom center;

    margin-top: 3px;
    transition-property: height, margin-top;
    transition-duration: 0.3s;
}

.tag:hover {
    filter: brightness(150%);
}

/* Identifying letter */
.tag:after {
    content: "A";
    font-family: "Varta-Regular", sans-serif;
    font-size: 10px;
    left: 0;
    top: 2px;
    position: absolute;
    text-align: center;
    width: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.tag.rocks {
    background-color: chocolate;
}
.tag.rocks:after {
    content: "R";
}

.tag.css {
    background-color: indigo;
}
.tag.css:after {
    content: "S";
}

.tag.paper {
    background-color: firebrick;
}
.tag.paper:after {
    content: "P";
}

.tag.talk {
    background-color: midnightblue;
}
.tag.talk:after {
    content: "T";
}

.tag.demo {
    background-color: green;
}
.tag.demo:after {
    content: "D";
}

/* Specular highlight */
.tag:before {
    position: absolute;
    content: "";
    top: 1px;
    right: 1px;
    width: 4px;
    height: 4px;
    border-top-right-radius: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

/* Wiggle animation */
.tag.animate {
    animation: wiggle 0.2s 4 linear;
    height: 18px;
    margin-top: 0px;
}

@keyframes wiggle {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}
