
/*********************************** General **********************************/

:root {
    --text-dark: #2f2f2f;
    --text-muted: #586169;
    --grey-light: #f0f0f0;
    --grey-lighter: #f9f9f9;
    --white: #ffffff;

    --pastel-peach: #ffd596;
    --pastel-blue: #b8c0ff;

    --brown: #780116;
    --yellow: #F7B538;
    --orange: #DB7C26;
    --orange-red: #D8572A;
    --red: #C32F27;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--grey-lighter);
    color: var(--text-dark);
    line-height: 1.5;
    text-align: justify;
}

main:not(#home) {
    margin-top: 100px;
}

.grid {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(300px, 0.35fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    position: relative;
    gap: 1rem;
}

.card:hover {
    transform: translateY(-5px);
}

.full-image-card {
    padding: 0;
}

.full-image-card img {
    border-radius: 10px 10px 0 0;
    width: 100%;
    aspect-ratio: 10 / 7;
    object-fit: cover;
}

.full-image-card h3, .full-image-card > p {
    padding: 0rem 1.5rem;
}

.full-image-card h3 {
    margin-top: 1.5rem;
}

.full-image-card > p {
    margin-bottom: 1.5rem;
}

.learn-more {
    color: var(--dark-teal);
    margin-top: auto;
    align-self: flex-end;
    position: relative;
}

/****************************** Texts and Buttons *****************************/

h1 {
    text-align: center;
}

p.center {
    text-align: center;
}

a {
    text-decoration: none;
    color: var(--orange);
}

a:hover {
    text-decoration: underline;
}

.multi-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.smooth {
    display: inline-block;
    text-decoration: none;
    background-color: var(--brown);
    color: var(--grey-lighter);
    padding: 0.7rem;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-text .smooth {
    padding: 1rem;
    font-weight: bold;
}

.smooth:hover {
    text-decoration: none;
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

ul {
    list-style-position: inside;
    margin: 10px 0;
}

.underline {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.underline:hover {
    color: var(--red);
    text-decoration: none;
}

.underline::after {
    content: "";
    display: block;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: width 0.2s ease;
}

.underline:hover::after {
    width: 100%;
}

.warning {
    text-align: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

form .warning {
    text-align: left;
}

.alert {
    width: 100vw;
    text-align: center;
    padding: 1rem 0rem;
    position: fixed;
    top: 0;
    transition: top 0.5s ease-in-out;
    z-index: 20;
}

.alert.hidden {
    top: -100px;
    transition: top 0.5s ease-in-out;
}

.success-message {
    color: #005c00;
    background-color: #b2e4b2;
}

.error-message {
    color: #b20000;
    background-color: #ffb3b3;
}

.modify {
    font-size: inherit;
    width: 100%;
}

button i {
    display: inline-block;
    height: fit-content;
}

/************************************ Menu ************************************/

header {
    height: 80px;
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--white);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: fixed;
    top: 0;
    z-index: 3;
}

nav {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

nav.small-screen {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 100%;
    padding: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
    padding-top: 0;
    padding-bottom: 0;
}

nav.small-screen.active {
    max-height: 500px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
}

nav.small-screen:not(.active) {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

nav a {
    width: fit-content;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.hamberger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamberger span {
    display: block;
    height: 3px;
    width: 25px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.hamberger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamberger.active span:nth-child(2) {
    opacity: 0;
}

.hamberger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/************************************Popup ************************************/

.popup-background {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10;
}

.note-modal-backdrop {
    z-index: 9;
}

.popup-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup {
    min-width: 300px;
    max-width: 900px;
    max-height: 90%;
    background: var(--grey-lighter);
    padding: 2em;
    margin: 0 5%;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: auto;
}

.popup-div {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.popup img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 50%;
}

.bigger-image img {
    height: 150px;
    width: fit-content;
    object-fit: contain;
    border-radius: 0;
}

.popup h3 {
    color: var(--orange-red);
    margin-bottom: 15px;
}

.two-button-choice {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 15px;
}

.two-button-choice button[type="button"],
.two-button-choice .button-red {
    background: #b20000;
    color: var(--grey-lighter);
}

.two-button-choice button[type="submit"]:not(.button-red) {
    background: #005c00;
    color: var(--grey-lighter);
}

.two-button-choice button[type="button"],
.two-button-choice button[type="submit"],
.two-button-choice .button-red {
    border: none;
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
}

.two-button-choice button[type="button"]:hover,
.two-button-choice .button-red:hover {
    background: #ffb3b3;
    color: #b20000;
}

.two-button-choice button[type="submit"]:not(.button-red):hover {
    background: #b2e4b2;
    color: #005c00;
}

.note-editable {
    text-align: left;
}

/********************************** Sections **********************************/

section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: auto;
    scroll-margin-top: 80px;
}

section.publi-section {
    padding: 1rem 2rem;
}

.section-title {
    border-left: 6px solid var(--red);
    padding-left: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 10px 0 0 10px;
}

.section-title button, h1 button {
    background-color: inherit;
    border: none;
}

.section-title button i {
    font-size: 1.2rem;
}

h1 button i {
    font-size: 1.5rem;
}

.hero-section {
    background: linear-gradient(135deg, var(--pastel-peach), var(--pastel-blue));
    height: 100vh;
    padding: 4rem 2rem;
    position: relative;
    top: 0;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../images/banner_1920_600.png') center/cover no-repeat;
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

.hero-text {
    text-align: left;
    max-width: 600px;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    padding: 4rem 2rem;
}

.hero-text h1 {
    font-size: 2.5rem;
    text-align: left;
}

.hero-text h2 {
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.about {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

.about img {
    flex: 1 1 40%;
    max-width: 350px;
    min-width: 210px;
    border-radius: 60% 20% 60% 20%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

@media (max-width: 650px) {
    .about {
        flex-direction: column;
        align-items: center;
    }

    .about img {
        width: 280px;
        max-width: 100%;
    }
}

#publications .card {
    text-align: left;
}

#contact {
    line-height: 1.8;
}

/*********************************** Footer ***********************************/

footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer > div {
    display: flex;
    flex-direction: column;
}

footer > div > img {
    height: 70px;
    margin-top: 10px;
    object-fit: scale-down;
}

footer a {
    display: inline-block;
    width: fit-content;
    color: inherit;
}

/************************************* CV *************************************/

.cv {
    border-left: 4px double var(--yellow);
    margin-left: 1rem;
    padding-left: 1rem;
}

.cv-block {
    margin-bottom: 1.5rem;
}

.block-head {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
}

.block-head h3 {
    margin-bottom: 0.2rem;
}

/********************************** Research **********************************/

#all-research-projects {
    margin-top: 2rem;
}

.project {
    padding: 2rem;
}

.project h2 {
    margin-bottom: 0.5rem;
}

.research {
    display: flex;
    gap: 1rem;
}

#all-research-projects .project:nth-child(even) .research {
    flex-direction: row-reverse;
}

#all-research-projects .project:nth-child(odd) .research {
    flex-direction: row;
}

#all-research-projects .project:nth-child(even) h2 {
    text-align: right;
}

#all-research-projects .project:nth-child(odd) h2 {
    text-align: left;
}

.research img {
    max-width: 400px;
    width: 400px;
    min-width: 210px;
    height: fit-content;
}

@media (max-width: 768px) {
    .research {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #all-research-projects .project:nth-child(odd) .research,
    #all-research-projects .project:nth-child(even) .research {
    flex-direction: column;
    }

    #all-research-projects .project:nth-child(odd) h2,
    #all-research-projects .project:nth-child(even) h2 {
    text-align: center;
}
}

#items {
    cursor: pointer;
    list-style: url("../images/move.svg");
    text-align: left;
    user-select: none;
}

#items li::marker {
    font-size: 2rem;
}

/******************************** Publications ********************************/

.publi .dropdown {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
    padding-top: 0;
    padding-bottom: 0;
}

.dropdown.active {
    max-height: 500px;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
    margin-top: 20px;
    overflow: auto;
}

.dropdown-text {
    flex: 1 1 70%;
}

.dropdown-image {
    flex: 1 1 10%;
    max-width: 330px;
    min-width: 230px;
    border-radius: 10px;
}

.publi, .publi-visible {
    display: flex;
    flex-direction: column;
}

.arrow {
    width: fit-content;
    height: fit-content;
    align-self: flex-end;
    position: relative;
    margin: 5px;
    padding-left: 10px;
    padding-top: 10px;
}

.arrow:hover {
    cursor: pointer;
}

.arrow span {
    display: block;
    height: 5px;
    width: 25px;
    background-color: var(--orange-red);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
}

.arrow span:nth-child(1) {
    transform: translateY(-2px) translateX(-12px) rotate(45deg);
}

.arrow span:nth-child(2) {
    transform: translateY(-7px) translateX(3px) rotate(-45deg);
}

.arrow.active span:nth-child(1) {
    transform: translateY(-2px) translateX(-12px) rotate(-45deg);
}

.arrow.active span:nth-child(2) {
    transform: translateY(-7px) translateX(3px) rotate(45deg);
}

/************************************ Login ***********************************/

.form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.form .field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.form label {
    font-weight: 500;
    color: var(--brown);
}

.form .field input {
    border: 1px solid var(--text-muted);
    border-radius: 10px;
    padding: 0.7em 1em;
    font-size: 1rem;
    background: var(--grey-lighter);
    color: var(--text-dark);
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.form .field input:focus {
    border-color: var(--text-dark);
    outline: none;
}

form button[type="submit"],
.two-button-choice button[type="button"] {
    border-radius: 10px;
    padding: 0.7em 1.2em;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5em;
}

input {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 0.2rem;
}
