/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* Custom styles */

@font-face {
    font-family: 'Adwaita Sans';
    src: url('/assets/fonts/AdwaitaSansItalic.woff2') format('woff2'),
        url('/assets/fontsAdwaitaSansItalic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Adwaita Sans';
    src: url('/assets/fonts/AdwaitaSans.woff2') format('woff2'),
        url('/assets/fonts/AdwaitaSans.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --accent: #ffad7a;
    --light-accent: rgba(255, 173, 122, 0.4);
    --border: rgba(0, 0, 0, 0.08);
    --secondary: #91918c;
    --success: #0fb97a;
    --danger: #ff4151;
}

html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: 'Adwaita Sans', sans-serif;
    background-color: #faf9f5;
    color: #333;
    line-height: 1.2em;
}

#header {
    margin-bottom: 30px;

    #nav {
        margin-bottom: 30px;

        #title {
            font-weight: bold;
            font-size: 1.5rem;
        }

        nav {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;

            a {
                text-transform: uppercase;
                text-decoration: none;
            }
        }
    }
}

#footer {
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

h1 {
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

h2 {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

h3 {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

h4 {
    font-weight: bold;
    margin-bottom: 10px;
}

p {
    margin-bottom: 20px;
    color: var(--secondary);
    line-height: 1.4em;
}

a {
    color: #333;
    text-decoration-thickness: .14em;
    text-underline-offset: .28em;
    text-decoration-color: var(--light-accent);
    transition: all 0.3s ease-in-out;

    &:hover {
        color: var(--accent);
        text-decoration-color: var(--accent);
    }
}

b {
    font-weight: bold;
}

ul {
    margin-bottom: 20px;

    li:not(:last-child) {
        margin-bottom: 10px;
    }
}

a.button {
    display: inline-flex;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    text-decoration: none;

    &.button-full-width {
        width: 100%;
    }

    &:hover {
        background-color: var(--accent);
        color: #333;
    }
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-10 {
    margin-top: 10px;
}

.d-flex {
    display: flex;
    align-items: center;

    &.d-flex-justify-between {
        justify-content: space-between;
    }
}

.grid {
    display: grid;
    align-items: center;
    align-items: stretch;

    &.grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    &.grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    &.grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;

    .card-header {
        padding: 20px;
        border-bottom: 1px solid var(--border);

        .card-icon {
            display: inline-flex;
            margin-bottom: 20px;
            padding: 10px;
            border-radius: 10px;
            background-color: #f5f5f5;
        }

        h2, p {
            margin-bottom: 0;
        }
    }

    .card-body {
        padding: 20px;
        flex: 1;
    }

    .card-footer {
        padding: 0 20px 20px 20px;
    }
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    background-color: #f5f5f5;
    color: #333;
    text-transform: uppercase;
    font-weight: bold;
    white-space: nowrap;

    &.badge-success {
        background-color: #E1F5EE;
        color: #085041;
    }

    &.badge-info {
        background-color: #E6F1FB;
        color: #0C447C;
    }

    &.badge-warning {
        background-color: #FAEEDA;
        color: #633806;
    }

    &.badge-danger {
        background-color: #FCEBEB;
        color: #791F1F;
    }
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.tooltip {
    anchor-scope: --tooltip-anchor;
}

.tooltip-trigger {
    anchor-name: --tooltip-anchor;
    cursor: pointer;
    text-decoration-line: underline;
    text-decoration-style: dashed;
    text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
    text-underline-offset: 4px;
}

.tooltip-content {
    position-anchor: --tooltip-anchor;
    position-area: bottom center;
    padding: 10px;
    margin: 10px 0;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    max-width: 600px;
    width: max-content;
    word-break: break-all;
    white-space: normal;
    overflow: hidden;
    font-weight: normal;
    text-transform: initial;
    font-size: 0.9rem;
}

.project {
    background-color: #fff;
    transition: background 0.12s;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    margin-top: -1px;
    margin-left: -1px;
    padding: 10px 20px !important;

    &:hover {
        background-color: #fafafa;
    }

    a {
        display: flex;
        text-decoration: none;
        color: #333;
        width: 100%;
        height: 100%;

        & > div {
            width: 100%;
            height: 100%;
        }
    }

    h4 {
        .external-icon {
            font-size: 0.6em;
            margin-left: 6px;
            opacity: 0.6;
            vertical-align: text-top;
        }
    }

    .project-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 85px;
        height: 85px;
        flex-shrink: 0;

        img {
            max-width: 85px;
            max-height: 60px;
            object-fit: contain;
        }
    }

    p {
        margin-bottom: 0;
        font-size: 0.9rem;
    }
}

.device {
    transition: border 0.3s ease-in-out;

    &:hover {
        border: 1px solid var(--accent);
    }

    img {
        display: block;
        margin: 0 auto 20px auto;
        max-height: 200px;
        object-fit: contain;
    }

    h4 {
        font-weight: normal;
        text-transform: uppercase;
        font-size: 0.8rem;
        color: var(--secondary);
    }

    ul {
        li {
            display: flex;
            justify-content: space-between;
            gap: 20px;
            font-size: 0.9rem;

            span:nth-child(2) {
                text-align: right;
            }

            &:not(:last-child) {
                padding-bottom: 10px;
                border-bottom: 1px dashed var(--border);
            }
        }
    }
}

@media (max-width: 900px) {
    .grid.grid-3, .grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #header {
        #nav {
            flex-direction: column;
            gap: 40px;
        }
    }

    .grid.grid-2, .grid.grid-3, .grid.grid-4 {
        grid-template-columns: 1fr;
    }
}
