@import url('https://fonts.cdnfonts.com/css/satoshi');

:root {
    --nav-height: 4.5rem;

    --theme-background: #EEEEEE;
    --theme-primary: #1F6F5F;
    --theme-secondary: #2FA084;
    --theme-highlight: #6FCF97;

    --font-sans: "Satoshi", sans-serif;

    --radius-sm: 0.4rem;
    --radius-badge: 0.25rem;

    --transition-fast: 0.2s ease;

    --pico-typography-spacing-vertical: 1.5rem;
    --pico-form-element-spacing-vertical: 1rem;
    --pico-form-element-spacing-horizontal: 1.25rem;

    --pico-font-family: var(--font-sans);
    --pico-font-family-headings: var(--font-sans);
    --pico-form-element-active-border-color: var(--theme-highlight) !important;
    --pico-form-element-focus-color: var(--theme-highlight) !important;
}


/* =========================================================
   BASE
   ========================================================= */

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

html {
    letter-spacing: 0.10rem;
    scrollbar-color: var(--theme-secondary) var(--theme-background);
    background-color: var(--theme-background);
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100dvh;

    display: flex;
    flex-direction: column;

    font-family: var(--font-sans);
    overflow-x: hidden;
}

body > main {
    flex: 1 0 auto;
    min-height: 100dvh;
}

body > footer {
    flex-shrink: 0;
}

::-webkit-scrollbar {
    width: 16px;
}

::-webkit-scrollbar-track {
    background: var(--theme-background);
}

::-webkit-scrollbar-thumb {
    background: var(--theme-primary);
    border-radius: 7px;
    border: 3px solid var(--theme-background);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--theme-secondary);
}

img, i {
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--theme-primary);
}

a {
    color: var(--theme-primary);
    text-decoration-color: var(--theme-primary);
}

a:hover {
    color: var(--theme-secondary);
    text-decoration-color: var(--theme-secondary);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.page-title,
.empty-text {
    text-align: center;
    padding: clamp(1.25rem, 4vw, 2rem);
}

.page-title h1 {
    margin: 0.25rem 0 0;
    font-size: clamp(1.75rem, 6vw, 2.75rem);
}

/* =========================================================
   SHARED COMPONENTS
   ========================================================= */

.credential-button,
.read-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--theme-secondary);
    color: var(--theme-background);
    border: 1px solid var(--theme-secondary);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    font-size: 0.8rem;
    cursor: pointer;
}

.credential-button:hover,
.read-button:hover {
    background-color: var(--theme-highlight);
    border-color: var(--theme-highlight);
    color: var(--theme-primary);
}

.date,
.category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border: thin solid var(--theme-primary);
    border-radius: var(--radius-badge);
}

.date {
    font-size: 0.75rem;
}

.category {
    color: var(--theme-primary);
    font-size: 0.7rem;
}


/* =========================================================
   SITE HEADER
   ========================================================= */

body > header {
    background-color: var(--theme-primary);
    box-shadow: 0 8px 10px rgba(0, 0, 0, 0.2);
}

body > header nav {
    position: relative;
    color: var(--theme-background);

    display: grid;
    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    min-height: var(--nav-height);
}

body > header nav a {
    color: var(--theme-background);
    text-decoration: none;
    font-size: 0.80rem;
}

body > header nav a:hover {
    color: var(--theme-highlight);
    text-decoration: none;
}

body > header nav a.active {
    color: var(--theme-highlight);
    text-decoration: underline;
    text-underline-offset: 0.5rem;
}


/* Branding */

body > header nav > ul:first-child {
    justify-self: start;
}

.main-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
    font-weight: bolder;
}

.main-logo svg {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
}

.main-logo:hover {
    color: var(--theme-background);
}


/* Desktop navigation */

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;

    margin: 0;
    padding: 0;

    list-style: none;
}

.nav-status {
    justify-self: center;

    margin: 0;
    padding: 0;

    list-style: none;
}

.nav-status li {
    border: thin solid var(--theme-background);
    border-radius: var(--radius-badge);

    color: var(--theme-background);

    font-size: 0.7rem;
    padding: 1vh;
}


/* Burger */

.nav-toggle {
    display: none;

    align-items: center;
    justify-content: center;

    width: 2.75rem;
    height: 2.75rem;

    margin: 0;
    padding: 0.5rem;

    border: 0;
    border-radius: var(--radius-sm);

    background: transparent;
    color: var(--theme-background);

    box-shadow: none;
    cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus {
    background: rgba(255, 255, 255, 0.08);
    color: var(--theme-highlight);
}

.nav-toggle svg {
    display: block;
    width: 1.6rem;
    height: 1.6rem;
    fill: currentColor;
}


/* Collapsible menu */

.nav-menu {
    display: contents;
}


/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

@media (max-width: 768px) {

    body > header nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;

        min-height: var(--nav-height);

        padding-block: 0.5rem;
    }

    /* Logo */

    body > header nav .nav-branding {
        margin: 0 auto 0 0;
        padding: 0;
    }

    body > header nav .main-logo {
        gap: 0.5rem;
    }

    body > header nav .main-logo svg {
        width: 2.25rem;
        height: 2.25rem;
        flex-shrink: 0;
    }

    body > header nav .main-logo span {
        font-size: 0.72rem;
        letter-spacing: 0.05rem;
    }

    /* Burger */

    body > header nav .nav-toggle {
        display: flex;
        flex-shrink: 0;
    }

    /* Menu */

    body > header nav .nav-menu {
        display: block;
        width: 100%;
        padding-top: 0.75rem;
    }

    /* Links */

    body > header nav .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;

        gap: 0;

        width: 100%;

        margin: 0;
        padding: 0.5rem 0 0;

        list-style: none;
    }

    body > header nav .nav-links li {
        width: 100%;
    }

    body > header nav .nav-links a {
        display: block;

        width: 100%;

        padding: 0.7rem 0;

        font-size: 0.75rem;
        text-align: center;
    }

    /* Availability */

    body > header nav .nav-status {
        display: flex;
        justify-content: center;

        width: 100%;

        margin: 0.5rem 0 0;
        padding: 0.75rem 0 0.25rem;

        border-top: 1px solid rgba(238, 238, 238, 0.2);
    }

    body > header nav .nav-status li {
        width: auto;
        text-align: center;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    body > header nav .main-logo span {
        font-size: 0.68rem;
    }

    body > header nav .nav-toggle {
        width: 2.5rem;
        height: 2.5rem;
    }

    body > header nav .nav-toggle svg {
        width: 1.45rem;
        height: 1.45rem;
    }

    body > header nav .nav-links a {
        padding: 0.6rem 0;
        font-size: 0.7rem;
    }
}


/* =========================================================
   TABLET NAVIGATION
   ========================================================= */

@media (min-width: 769px) and (max-width: 1024px) {

    body > header nav {
        column-gap: 0.5rem;
    }

    .main-logo span {
        font-size: 0.85rem;
    }

    .nav-links {
        gap: 0.4rem;
    }

    body > header nav a {
        font-size: 0.68rem;
    }

    .nav-status li {
        font-size: 0.6rem;
        padding: 0.5rem 0.6rem;
    }
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 769px) {

    body > header nav .nav-menu {
        display: contents !important;
    }

    body > header nav .nav-toggle {
        display: none !important;
    }
}


/* =========================================================
   SITE FOOTER
   ========================================================= */

body > footer {
    background-color: var(--pico-color);
    color: var(--theme-background);

    padding: 2rem 0 1rem;

    font-size: 0.8rem;

    --s: 194px;
    --_l: #0000 calc(25% / 3), var(--theme-background) 0 25%, #0000 0;

    --_g: conic-gradient(
        from 120deg at 50% 87.5%,
        var(--theme-background) 120deg,
        #0000 0
    );

    background:
        linear-gradient(
            rgba(55, 60, 68, 0.98),
            rgba(55, 60, 68, 0.98)
        ),
        var(--_g),
        var(--_g) 0 calc(var(--s) / 2),
        conic-gradient(
            from 180deg at 75%,
            var(--theme-secondary) 60deg,
            #0000 0
        ),
        conic-gradient(
            from 60deg at 75% 75%,
            var(--theme-background) 0 60deg,
            #0000 0
        ),
        linear-gradient(150deg, var(--_l)) 0 calc(var(--s) / 2),
        conic-gradient(
            at 25% 25%,
            #0000 50%,
            var(--theme-secondary) 0 240deg,
            var(--theme-background) 0 300deg,
            var(--theme-secondary) 0
        ),
        linear-gradient(-150deg, var(--_l)) var(--theme-primary);

    background-size: calc(0.866 * var(--s)) var(--s);
}

body > footer h2 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--theme-secondary);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-info p {
    max-width: 350px;
    margin: 0;
    font-size: 0.75rem;
    color: var(--theme-background);
}

.footer-info small {
    display: block;
    font-size: 0.7rem;
    line-height: 1.5;
}

.footer-info small:first-of-type {
    margin-top: 0.5rem;
}

.footer-nav,
.footer-social {
    display: grid;
    gap: 0.25rem;
    align-content: start;
}

.footer-nav a,
.footer-social a {
    font-size: 0.75rem;
    text-decoration: underline;
    color: var(--theme-background);
}

.footer-nav a:hover,
.footer-social a:hover {
    color: var(--theme-highlight);
    border-color: var(--theme-highlight);
}

.footer-social ul {
    display: flex;
    gap: 0.5rem;

    padding: 0;
    margin: 0;

    list-style: none;
}

.footer-social li {
    display: block;

    width: 2rem;
    height: 2rem;

    padding: 0;
    margin: 0;
}

.footer-social .contact-button {
    display: grid;

    width: 2rem;
    height: 2rem;

    min-width: 2rem;
    min-height: 2rem;

    padding: 0.4rem;
    margin: 0;

    box-sizing: border-box;

    place-items: center;

    border: 1px solid var(--theme-background);
    border-radius: var(--radius-sm);

    text-decoration: none;
    overflow: visible;
}

.footer-social .contact-icon {
    display: block;

    width: 100%;
    height: 100%;

    max-width: none;
    max-height: none;
}

.footer-bottom {
    margin-top: 1.5rem;
    padding-top: 0.75rem;

    border-top: 1px solid var(--pico-muted-border-color);
}

.footer-bottom small {
    font-size: 0.7rem;
}

.contact-no {
    color: var(--theme-highlight);
    text-decoration-color: var(--theme-highlight);
}

@media (max-width: 768px) {

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .footer-info {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-info,
    .footer-nav,
    .footer-social {
        grid-column: 1 / -1;
        justify-items: center;
    }

    .footer-info p {
        margin: 0 auto;
    }

    .footer-social ul {
        justify-content: center;
    }
}


/* =========================================================
   SEARCH BAR
   ========================================================= */

#projects .container:has(form),
#certifications .container:has(form) {
    margin-bottom: 1.5rem;
}

.search-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.search-filter input[type="search"] {
    flex: 1;
    min-width: 0;
    min-height: 2.75rem;
    margin-bottom: 0;
    font-size: 1rem;
}

.search-filter .category-filter {
    flex: 0 0 auto;
    width: auto;
    min-width: 8rem;
    margin-bottom: 0;
}

/* =========================================================
   ARTICLES
   Shared styles for Education, Publications, Projects,
   and Experience.
   ========================================================= */

article {
    padding: 2rem;
    font-size: 0.8rem;
}

article h2 {
    font-size: clamp(1.15rem, 4vw, 1.5rem);
    margin: 1rem 0;
    text-align: justify;
}

article .description {
    margin: 0;
    padding: 0 1rem;

    text-align: justify;
    letter-spacing: 0.05rem;

    background: none;
    box-shadow: none;
}

/* =========================================================
   EXPERIENCE
   ========================================================= */

article.experience {
    position: relative;

    padding: 4rem;
}

/* Experience header */

article.experience > header {
    display: flex;
    align-items: flex-start;

    gap: 1rem;

    background: none;
    box-shadow: none;
}

/* Company icon */

.experience .organization-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 3.8rem;

    width: 3.8rem;
    height: 3.8rem;

    padding: 0.4rem;

    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--radius-sm);

    background: white;
}

.experience .org-icon {
    display: block;

    width: 100%;
    height: 100%;

    max-width: none;
    margin: 0;

    object-fit: contain;
}

/* Organization information */

.experience .organization {
    flex: 1;
    min-width: 0;
}

/* Date */

.experience .date {
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

/* Position */

.experience .position {
    margin: 0 0 0.35rem;

    color: var(--theme-primary);

    font-size: clamp(1.15rem, 3vw, 1.5rem);
    line-height: 1.2;

    text-align: left;
}

/* Organization metadata */

.experience .org-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 0.35rem;

    margin: 0;

    font-size: 0.8rem;
    line-height: 1.5;
}

.experience .org-name {
    color: var(--theme-secondary);
    font-weight: 600;
}

.experience .org-location,
.experience .org-modality {
    color: var(--pico-color);
}

.experience .org-modality {
    font-size: 0.7rem;
}

/* Hide literal separators when metadata wraps */

.experience .separator {
    color: var(--pico-muted-color);
}

/* Description */

.experience .experience-content {
    margin-top: 1.5rem;
}

/* Markdown list */

.experience .description ul {
    margin: 0;
    padding-left: 1.5rem;
}

.experience .description li {
    margin-bottom: 0.6rem;
}

.experience .description li:last-child {
    margin-bottom: 0;
}

/* Skills */

.experience-skills {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;

    gap: 0.75rem;

    margin-top: 1.5rem;

    background: none;
    color: inherit;
}

.experience .skill-label {
    color: var(--theme-primary);

    font-size: 0.75rem;
    font-weight: 600;
}

.experience .skill-list {
    display: flex;
    flex-wrap: wrap;

    gap: 0.6rem;
}

.experience .skill {
    display: inline-flex;
    align-items: center;

    gap: 0.35rem;

    padding: 0.25rem 0.5rem;

    border: thin solid var(--theme-primary);
    border-radius: var(--radius-badge);

    color: var(--theme-primary);

    font-size: 0.7rem;
    line-height: 1.2;

    transition:
        background-color var(--transition-fast),
        color var(--transition-fast);
}

.experience .skill i {
    font-size: 0.75rem;
}


/* =========================================================
   EXPERIENCE — TABLET / MOBILE
   ========================================================= */

@media (max-width: 768px) {

    article.experience {
        padding: 1.5rem;
    }

    article.experience > header {
        gap: 0.75rem;
    }

    .experience .organization-icon {
        flex-basis: 3rem;

        width: 3rem;
        height: 3rem;

        padding: 0.35rem;
    }

    .experience .date {
        font-size: 0.7rem;
    }

    .experience .position {
        font-size: 1.15rem;
    }

    .experience .org-details {
        font-size: 0.75rem;
    }

    .experience .experience-content {
        margin-top: 1.25rem;
    }

    .experience-skills {
        margin-top: 1.25rem;
    }
}


/* =========================================================
   EXPERIENCE — SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    article.experience {
        padding: 1.25rem;
    }

    article.experience > header {
        gap: 0.65rem;
    }

    .experience .organization-icon {
        flex-basis: 2.5rem;

        width: 2.5rem;
        height: 2.5rem;

        padding: 0.3rem;
    }

    .experience .date {
        margin-bottom: 0.5rem;

        font-size: 0.65rem;
    }

    .experience .position {
        font-size: 1rem;
    }

    .experience .org-details {
        gap: 0.25rem;

        font-size: 0.7rem;
    }

    .experience .org-modality {
        font-size: 0.65rem;
    }

    .experience .description {
        font-size: 0.75rem;
    }

    .experience .skill-label {
        width: 100%;
        padding-top: 0;
    }

    .experience .skill {
        font-size: 0.65rem;
    }
}

.skill {
    padding: 0.25rem 0.5rem;
    border: thin solid var(--theme-primary);
    border-radius: var(--radius-badge);
}


/* =========================================================
   CERTIFICATIONS
   ========================================================= */

article.certification {
    position: relative;

    min-height: 450px;

    display: grid;
    grid-template-columns: 30% minmax(0, 1fr);

    column-gap: 2.5rem;

    align-items: center;
}

article.certification .image {
    grid-column: 1;
    grid-row: 1 / -1;

    display: flex;
    align-items: center;
    justify-content: center;
}

article.certification .image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

article.certification .content {
    grid-column: 2;
    min-width: 0;
    padding-right: 1.5rem;
}

article.certification header {
    background: none;
    box-shadow: none;
    color: inherit;
    padding: 0;
}

article.certification .date {
    margin: 0;
    justify-self: start;
}

article.certification h2 {
    margin: 0.75rem 0 0.25rem;
    text-align: left;
}

article.certification .issuer {
    margin: 0 0 1rem;

    color: var(--theme-secondary);

    font-size: 0.85rem;
    font-weight: 500;
}

article.certification .description {
    margin: 0 0 1rem;
    padding: 0;
}

article.certification .credential-id {
    margin: 0.5rem 0;
    font-size: 0.75rem;
    overflow-wrap: anywhere;
}

article.certification .categories {
    display: flex;
    flex-wrap: wrap;

    gap: 0.5rem;
    margin-top: 1rem;
}

article.certification footer {
    display: flex;
    justify-content: flex-end;

    margin-top: 1.25rem;
    padding: 0;

    background: none;
    color: inherit;
}

@media (max-width: 768px) {

    article.certification {
        grid-template-columns: 30% minmax(0, 1fr);
        column-gap: 1.25rem;
    }

    article.certification .image {
        width: 100%;
        height: 120px;
    }

    article.certification .image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    article.certification .content {
        padding-right: 0;
    }

    article.certification .description {
        text-align: left;
    }

    article.certification footer {
        justify-content: flex-start;
    }
}


/* =========================================================
   EDUCATION
   ========================================================= */

article.education {
    display: grid;

    grid-template-columns: 30% minmax(0, 1fr);
    column-gap: 2.5rem;

    align-items: center;
}

article.education .image {
    grid-column: 1;
    grid-row: 1 / -1;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 360px;

    margin: 0 auto;
    padding: 1rem;
}

article.education .image img {
    width: 100%;
    max-width: 360px;
    height: 100%;

    object-fit: contain;
    margin: 0 auto;
}

article.education .date {
    margin: 0;
    justify-self: start;
}

article.education h2 {
    margin: 0.75rem 0 0.25rem;
    text-align: left;
}

article.education .specialization {
    margin: 0 0 1rem;

    color: var(--pico-color);

    font-size: 0.85rem;
    font-style: italic;
    font-weight: 500;
}

article.education .institution {
    display: flex;
    align-items: center;

    gap: 2rem;
    margin: 0;

    color: var(--theme-text);
}

article.education .institution span:first-child {
    color: var(--theme-secondary);
    font-weight: 500;
}

article.education .institution span:last-child {
    color: var(--theme-text);
}

@media (max-width: 768px) {

    article.education {
        grid-template-columns: 30% minmax(0, 1fr);
        column-gap: 1.25rem;
    }

    article.education .image {
        height: 90px;
        padding: 0.5rem;
    }

    article.education .image img {
        width: 100%;
        max-width: 120px;
        height: 100%;
    }

    article.education .specialization {
        font-size: 0.8rem;
    }

    article.education .institution {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}


/* =========================================================
   ARTICLE DECORATOR
   ========================================================= */

article.certification,
article.education {
    position: relative;
}

article.certification::after,
article.education::after {
    content: "";

    position: absolute;

    top: 0;
    right: 0;

    width: 0.5rem;
    height: 100%;

    background: var(--theme-primary);

    border-radius:
        0
        var(--radius-badge)
        var(--radius-badge)
        0;
}


/* =========================================================
   SMALL MOBILE CARDS (Certification & Education)
   ========================================================= */

@media (max-width: 480px) {

    article.certification,
    article.education {
        grid-template-columns: 1fr;
        row-gap: 1rem;
        min-height: auto;
    }

    article.certification .image,
    article.education .image {
        grid-column: 1;
        grid-row: auto;

        width: 100%;
        max-width: 200px;
        height: auto;
        aspect-ratio: 4 / 3;

        margin: 0 auto;
    }

    article.certification .image img,
    article.education .image img {
        max-width: 100%;
    }

    article.certification .content {
        padding-right: 0;
    }

    article.certification .date,
    article.education .date {
        justify-self: center;
    }

    article.certification h2,
    article.education h2 {
        text-align: center;
    }

    article.education .institution {
        align-items: center;
        text-align: center;
    }

    article.certification footer {
        justify-content: center;
    }

    article.certification::after,
    article.education::after {
        top: 0;
        right: 0;
        left: 0;

        width: 100%;
        height: 0.4rem;

        border-radius: var(--radius-badge) var(--radius-badge) 0 0;
    }
}


/* =========================================================
   PUBLICATION
   ========================================================= */

article.publication > header {
    background: none;
    box-shadow: none;
    color: inherit;
}

article.publication > footer {
    background: none;
    color: inherit;
    font-size: inherit;

    strong {
        color: var(--theme-primary);
    }
}

article.publication p {
    margin: 0.4rem 0;
}

article.publication .authors {
    font-size: 0.8rem;
}

.publication-content {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 2rem;

    align-items: center;

    margin: 1.5rem 0;
}

.publication-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.publication-image .showcase {
    display: block;

    width: 100%;
    max-width: 100%;
    max-height: 400px;

    height: auto;

    object-fit: contain;

    margin: 0;
}

.publication .conference,
.publication .journal {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.publication-meta {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 2rem;

    align-items: center;
}

.publication-meta .publisher,
.publication-meta .doi {
    margin: 0.4rem 0;
}

.publication .doi a {
    overflow-wrap: anywhere;
}

.publication-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {

    .publication-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .publication-meta {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .publication .conference,
    .publication .journal {
        white-space: normal;
    }
}


/* =========================================================
   HOME / HERO
   ========================================================= */

main:has(.hero-section) {
    padding-top: 0;
    padding-bottom: 0;
}

.hero-section {
    position: relative;

    width: 100%;

    min-height: calc(100dvh - var(--nav-height));

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);

    overflow: hidden;
}


/* Bottom gradient */

.hero-section::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 10%;

    background: linear-gradient(
        to top,
        rgba(18, 85, 70, 0.8),
        rgba(0, 0, 0, 0)
    );

    z-index: 3;

    pointer-events: none;
}


/* =========================================================
   HERO BACKGROUND
   ========================================================= */

.hero-section .area {
    position: absolute;

    inset: 0;

    overflow: hidden;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.1)
        ),
        radial-gradient(
            ellipse 60% 60% at 50% 10%,
            var(--theme-highlight) 0%,
            var(--theme-highlight) 5%,
            transparent 100%
        ),
        linear-gradient(
            to top,
            var(--theme-primary),
            var(--theme-primary)
        );

    z-index: 0;
}

.hero-section .circles {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    margin: 0;
    padding: 0;

    z-index: 0;
}

.hero-section .circles li {
    position: absolute;

    display: block;

    list-style: none;

    width: 20px;
    height: 20px;

    background: rgba(255, 255, 255, 0.2);

    animation: animate 25s linear infinite;

    bottom: -150px;
}

.hero-section .circles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.hero-section .circles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.hero-section .circles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.hero-section .circles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.hero-section .circles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.hero-section .circles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.hero-section .circles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.hero-section .circles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.hero-section .circles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.hero-section .circles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}


/* =========================================================
   HERO CONTENT
   ========================================================= */

.hero-content {
    position: relative;

    z-index: 1;

    min-height: calc(100dvh - var(--nav-height));

    display: flex;
    flex-direction: column;

    justify-content: center;

    padding-top: 3rem;
    padding-bottom: 0;
}

.hero-name {
    margin: 0;

    max-width: 750px;

    font-size: clamp(3rem, 7vw, 4.5rem);

    font-weight: bolder;

    line-height: 1;

    text-align: left;

    color: var(--theme-background);
}

.hero-name strong {
    color: var(--theme-background);
}

.hero-desc {
    display: flex;

    flex-direction: column;
    align-items: flex-start;

    margin-top: 2rem;
}

.hero-desc h1 {
    margin: 0;

    font-weight: bolder;

    font-size: clamp(2rem, 5vw, 3rem);

    letter-spacing: 0.20rem;

    color: var(--theme-highlight);
}

.hero-desc p {
    margin: 0.5rem 0 0;

    font-weight: light;

    font-size: 1rem;

    color: var(--theme-background);
}


/* =========================================================
   HERO IMAGE
   ========================================================= */

.hero-visual {
    position: absolute;

    right: 0;
    bottom: 0;

    width: 50%;
    max-width: 800px;

    display: flex;

    justify-content: flex-end;
    align-items: flex-end;
}

.hero-img {
    position: relative;

    z-index: 1;

    width: 100%;

    display: flex;

    justify-content: flex-end;
}

.hero-img img {
    display: block;

    width: 100%;
    max-width: 800px;

    height: auto;

    object-fit: contain;
    object-position: right bottom;

    margin: 0;
}


/* =========================================================
   HERO CONTACTS
   ========================================================= */

.hero-contacts {
    margin-top: 0.5rem;
}

.hero-contacts ul {
    display: flex;

    flex-direction: row;

    justify-content: center;
    align-items: center;

    gap: 1rem;

    margin: 0;
    padding: 0;

    list-style: none;
}

.hero-contacts .contact-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 60px;
    height: 60px;

    min-width: 60px;
    min-height: 60px;

    padding: 0;

    border-radius: 50%;

    background-color: var(--theme-primary);
    color: var(--theme-background);

    text-decoration: none;

    transition:
        color var(--transition-fast),
        transform var(--transition-fast);
}

.hero-contacts .contact-button:hover {
    color: var(--theme-highlight);
    transform: scale(1.05);
}

.hero-contacts .contact-icon {
    width: 24px;
    height: 24px;
}


/* =========================================================
   MOBILE HERO
   ========================================================= */

@media (max-width: 768px) {

    .hero-section {
        min-height: min(calc(100dvh - var(--nav-height)), 900px);
    }

    .hero-content {
        min-height: min(calc(100dvh - var(--nav-height)), 900px);

        height: auto;

        justify-content: center;
        gap: 1.25rem;

        padding-top: 2rem;
        padding-bottom: min(45dvh, 300px);
    }

    .hero-name {
        flex-shrink: 0;

        max-width: 100%;

        font-size: clamp(2.25rem, 10vw, 3.5rem);

        text-align: center;
    }

    .hero-desc {
        flex-shrink: 0;

        align-items: center;

        text-align: center;
    }

    .hero-desc h1 {
        font-size: clamp(1.5rem, 6vw, 2.25rem);
    }

    .hero-desc p {
        font-size: 0.85rem;
    }

    .hero-visual {
        position: absolute;

        left: 50%;
        right: auto;
        top: auto;
        bottom: 0;

        transform: translateX(-50%);

        width: min(50vw, 40dvh, 280px);

        margin: 0;
    }

    .hero-img {
        width: 100%;
        height: auto;
        margin: 0;
    }

    .hero-img img {
        width: 100%;
        height: auto;

        aspect-ratio: auto;

        object-fit: contain;
    }

    .hero-contacts {
        width: 100%;

        flex-shrink: 0;
    }

    .hero-contacts ul {
        width: 100%;

        justify-content: center;

        gap: 0.75rem;
    }

    .hero-contacts .contact-button {
        width: 48px;
        height: 48px;

        min-width: 48px;
        min-height: 48px;
    }

    .hero-contacts .contact-icon {
        width: 20px;
        height: 20px;
    }
}


/* =========================================================
   SMALL MOBILE HERO
   ========================================================= */

@media (max-width: 420px) {

    .hero-content {
        padding-top: 1.5rem;
        padding-bottom: min(38dvh, 260px);
    }

    .hero-visual {
        width: min(42vw, 32dvh, 220px);
    }

    .hero-contacts .contact-button {
        width: 42px;
        height: 42px;

        min-width: 42px;
        min-height: 42px;
    }

    .hero-contacts .contact-icon {
        width: 18px;
        height: 18px;
    }
}


/* =========================================================
   LANDSCAPE / SHORT-HEIGHT HERO
   ========================================================= */

@media (max-height: 500px) and (orientation: landscape) {

    .hero-section,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .hero-visual {
        display: none;
    }
}


/* =========================================================
   HERO ANIMATION
   ========================================================= */

@keyframes animate {

    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-section .circles li {
        display: none;
    }
}

/* =========================================================
   OVERVIEW
   ========================================================= */

.overview-section {
    padding: 2rem 0;
    background: var(--theme-background);
}

/* =========================================================
   OVERVIEW HEADER
   ========================================================= */

.overview-header {
    margin-bottom: 3rem;
    text-align: center;
}

.overview-header .home-label {
    margin: 0 0 1rem;
}

.overview-header > p {
    margin: 0;

    color: #555;
    font-size: 1.05rem;
    line-height: 1.7;
}


/* =========================================================
   OVERVIEW GRID
   ========================================================= */

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}


/* =========================================================
   OVERVIEW CARDS
   ========================================================= */

.overview-sub {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    aspect-ratio: 1 / 1;

    margin: 0;
    padding: 2rem;

    background: #ffffff;

    border: 1px solid rgba(31, 111, 95, 0.12);
    border-radius: var(--radius-sm);

    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}


/* =========================================================
   ICON
   ========================================================= */

.overview-sub svg {
    display: block;

    width: 3rem;
    height: 3rem;

    flex-shrink: 0;

    margin-bottom: 1.5rem;

    fill: var(--theme-secondary);
}


/* =========================================================
   CARD TITLE
   ========================================================= */

.overview-sub h6 {
    margin: 0 0 0.6rem;

    color: var(--theme-primary);

    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}


/* =========================================================
   CARD DESCRIPTION
   ========================================================= */

.overview-sub p {
    margin: 0;

    color: #555;

    font-size: 0.92rem;
    line-height: 1.65;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 768px) {

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

    .overview-sub {
        padding: 1.5rem;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 520px) {

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .overview-sub {
        aspect-ratio: 1 / 1;
        padding: 1.75rem;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .overview-sub {
        padding: 1.5rem;
    }

    .overview-sub svg {
        width: 2.5rem;
        height: 2.5rem;
        margin-bottom: 1.25rem;
    }

    .overview-sub h6 {
        font-size: 1.05rem;
    }

    .overview-sub p {
        font-size: 0.88rem;
    }
}

/* =========================================================
   SITE INFO
   ========================================================= */

.site-section {
    padding: 3rem 0;
}

.site-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.home-label {
    margin: 0;
    text-align: center;
    color: var(--theme-primary);
    letter-spacing: 0.08em;
}

.site-info-techs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    width: 100%;
    max-width: 800px;
    gap: 2rem;
    align-items: start;
    justify-items: center;
}

.site-info-tech {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    text-align: center;
    min-width: 0;
}

.site-info-tech i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    font-size: 2rem;
    font-style: normal;
}

.site-info-tech span {
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
}

/* Tablet */
@media (max-width: 768px) {
    .site-info-techs {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem 1rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .site-section {
        padding: 2.5rem 0;
    }

    .site-info-techs {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem 0.5rem;
    }

    .site-info-tech i {
        font-size: 1.75rem;
    }

    .site-info-tech span {
        font-size: 0.75rem;
    }
}

/* =========================================================
   FEATURED CAROUSEL
   ========================================================= */

.featured-section {
    padding: 2rem 0 0;
}

.featured {
    overflow: hidden;
}


.featured-header h2 {
    margin: 0;
    color: var(--theme-primary);
}

/* =========================================================
   CAROUSEL
   ========================================================= */

.featured-carousel {
    width: 100%;
    padding: 2rem 0 !important;
}

.featured-carousel {
    position: relative;
    width: 100%;
    padding: 2rem;

    overflow: hidden;
}

.featured-carousel::before,
.featured-carousel::after {
    content: "";
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    width: 5rem;

    z-index: 5;
    pointer-events: none;
}

.featured-carousel::before {
    left: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.25),
        transparent
    );
}

.featured-carousel::after {
    right: 0;
    background: linear-gradient(
        to left,
        rgba(0, 0, 0, 0.25),
        transparent
    );
}

.flickity-button {
    z-index: 10;
}


.carousel {
    width: 100%;
}

.carousel-cell {
    width: min(70%, 680px);
    margin-right: 1.5rem;

    display: flex;
    align-items: stretch;
}

/* =========================================================
   FEATURE CARD
   ========================================================= */

.feature-card {
    width: 100%;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: var(--theme-background);

    border: 1px solid color-mix(
        in srgb,
        var(--theme-primary) 15%,
        transparent
    );

    border-radius: var(--radius-sm);
}

.feature-content {
    padding: 1.25rem 1.5rem 1.5rem;
}

/* =========================================================
   FEATURE IMAGE
   ========================================================= */

.feature-image {
    width: 100%;
    aspect-ratio: 16 / 10;

    flex-shrink: 0;
    overflow: hidden;
    background: white;
}

.feature-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    user-select: none;
    -webkit-user-drag: none;
}

/* =========================================================
   FEATURE CONTENT
   ========================================================= */

.feature-content {
    padding: 1.25rem 1.5rem 1.5rem;
}

.feature-tag {
    display: inline-block;

    margin-bottom: 0.5rem;

    color: var(--theme-secondary);

    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.feature-content h3 {
    margin: 0;
    color: var(--theme-primary);
    font-size: 1.25rem;
    line-height: 1.35;

    min-height: calc(1.25rem * 1.35 * 2);
    text-align: left;

    display: -webkit-box;
    display: box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

/* =========================================================
   FLICKITY NAVIGATION
   ========================================================= */

.featured-carousel .carousel-container{
    background-color: var(--pico-color);
}

.featured-carousel .flickity-button {
    width: 2.5rem;
    height: 2.5rem;

    background: var(--theme-primary);
    color: white;

    opacity: 0.9;
}

.featured-carousel .flickity-button:hover {
    opacity: 1;
}

.featured-carousel .flickity-button:disabled {
    opacity: 0.3;
}

.featured-carousel .flickity-button-icon {
    fill: currentColor;
}

.featured-carousel .flickity-prev-next-button.previous {
    left: 1rem;
}

.featured-carousel .flickity-prev-next-button.next {
    right: 1rem;
}

.featured-carousel .flickity-viewport {
    background-color: rgb(230, 230, 230);
    padding: 0.5rem !important;
}

.flickity-page-dots .dot {
    width: 8px;
    height: 8px;

    background: var(--theme-secondary);
    opacity: 0.3;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .featured-section {
        padding: 2rem 0 0;
    }

    .carousel-cell {
        width: 88%;
        margin-right: 1rem;
    }

    .feature-image {
        aspect-ratio: 4 / 3;
    }

    .feature-content {
        padding: 1rem 1.25rem 1.25rem;
    }

    .feature-content h3 {
        font-size: 1.1rem;
    }

    .featured-carousel .flickity-button {
        width: 2.25rem;
        height: 2.25rem;
    }

    .featured-carousel .flickity-prev-next-button.previous {
        left: 0.5rem;
    }

    .featured-carousel .flickity-prev-next-button.next {
        right: 0.5rem;
    }
}

/* =========================================================
   IMAGE PREVIEW
   ========================================================= */

[x-cloak] {
    display: none !important;
}

.preview-image {
    cursor: zoom-in;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 2rem;

    background: rgba(0, 0, 0, 0.85);
}

.image-lightbox-image {
    display: block;

    max-width: 90vw;
    max-height: 90vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 0.25rem;
}

.image-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;

    width: 2.5rem;
    height: 2.5rem;

    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.1);
    color: var(--theme-highlight);

    font-size: 1.75rem;
    line-height: 1;

    cursor: pointer;
}

.image-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}