/*
    filename: desktop.css
    author: Anh-Quan Nguyen
    created: 17/02/2024
    last modified: 29/02/2024
    description: CSS styles for desktop rendering
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ========== CSS STYLES FOR ALL WEBPAGES ========== */
/* All website will use sans-serif font, primary font Segoe UI */
* {
    font-family: "Inter", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box;
    margin: 0;
    line-height: 2rem;
}

/* Skip link styles */
.skip-link {
    /* Automatically hidden when infocus */
    position: absolute;
    top: 0;
    left: -100000px;
    width: 1px;
    height: 1px;
    /* Skip link styles */
    background: #6791EF;
    color: white;
    text-decoration: none;
    height: fit-content;
    overflow: hidden;
}

/* When user use a keyboard to focus on skip-link, this button should be appeared */
.skip-link:focus {
    position: absolute;
    left: 0;
    width: auto;
    height: auto;
}

/* Header styles */
header {
    background: linear-gradient(90deg, #4867a8, #6791EF);
    color: white;
    /* Aligning the website name and navigation bars in the same line */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

/* Letter spacing for h1 */
h1 {
    letter-spacing: 2px;
}

/* Website name width area */
.website-name {
    width: 30%;
}

/* Navigation bar area */
.navigation-bar {
    width: 50%;
}

/* Navigation links style */
nav ul {
    /* Aligning navigation links in a same line, horizontally and vertically centered of the header area */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

    /* Distance between navigation links */
    justify-content: space-around;

    /* Clear the bullets before the navigation links */
    list-style-type: none;
}

/* Remove the default underline of the anchor, change text colour to white */
.navigation-links {
    color: #FFF;
    text-decoration: none;
    transition: 0.2s all ease-in-out;
}

/* Change the font weight and colour of a navigation link when user hovers their mouse */
.navigation-links:hover {
    color: yellow;
    font-weight: bold;
    font-size: 1.25rem;
}

/* Active pages will have different colour */
.navigation-active {
    color: yellow;
    font-weight: bold;
    font-size: 1.25rem;
}

/* Footer styles */
footer {
    background-color: #6791EF;
    color: white;
    text-align: center;
    padding: 1rem 0.625rem;
}

/* ========== CSS STYLES FOR "HOMEPAGE" WEBPAGE ========== */

/* Align all contents: vertically centered */
.about-main-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 5vw;

}

/* Introduction texts floats left, accounts for 60% of the area */
.introduction {
    float: left;
    width: 60%;
    animation: slide 1.5s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Introduction text style */
.introduction h2 {
    letter-spacing: 2px;
    font-size: 2.5em;
    color: #6791EF;
}

/* Introduction text font style */
.introduction p {
    font-size: 1.15em;
    color: #6791EF;
}

/* Image accounts for 40% of the area */
.image-introduction {
    float: left;
    width: 40%;
    /* Horizontally centered the image */
    display: flex;
    justify-content: center;
}

/* Clear floats of main content */
.about-main-content::after {
    content: "";
    clear: both;
    display: block;
}

/* Set the width of a profile picture, and made the picture become circular */
#profile-picture {
    width: 80%;
    border-radius: 100%;
    /* Animation for the image: Slide-in for 1.5s, then 1.5 seconds later, starting 3D rotation for each 3 second */
    animation: 1.5s image-slide ease-in-out, 3s ease 1.5s infinite image-border-loop;
}

/* Name highlight styles */
#name-highlight {
    display: inline-block;
    /* Make sure that the highlight doesn't break the text to new line */
    padding: 0.625rem;
    background: #6791EF;
    color: white;
    border-radius: 10px;
}

/* Clear the bullets and reset the padding before the introduction list */
.introduction-list {
    list-style-type: none;
    padding-inline-start: 0;
}

/* Introduction list style */
ul.introduction-list li {
    display: inline-block;
    /* Display each item on the list at the same line */
    padding: 1rem;
    background-color: #6791EF;
    color: white;
    border-radius: 10px;
    width: fit-content;
    /* Fit with text inside */
    margin-bottom: 1rem;
    /* Gap between lines, when user's screen is small, some items will be thrown to a new line */
    font-size: 1.15em;
}

/* ========== CSS STYLES FOR "PROJECTS" WEBPAGE ========== */

/* Main hometown content style */
.main-hometown-content {
    padding: 2rem;
}

/* Heading 1 of hometown content style */
.main-hometown-content h1 {
    text-align: center;
    letter-spacing: 0;
    font-size: 2.5rem;
    color: #6791EF;
}

/* Article (hometown page) style */
.main-hometown-content article {
    margin-top: 3vh;
    margin-bottom: 3vh;
}

/* Section (hometown page) style */
.main-hometown-content section {
    width: 70vw;
    background: linear-gradient(90deg, #7F1A73, #6791EF);
    border-radius: 10px;
    color: white;
    padding: 1rem;
}

/* Aside (hometown page) style */
.main-hometown-content aside {
    width: 25vw;
    float: right;
    background-color: #6791EF;
    border: 4px solid #364e83;
    border-radius: 10px;
    box-shadow: 0px 0px 20px 3px black;
    padding: 1rem;
    color: white;
}

/* Heading 2 of article (hometown page) style */
.main-hometown-content article h2 {
    font-size: 2rem;
    margin-bottom: 0.5em;
    color: #6791EF;
}

/* Heading 3 of article (hometown page) style */
.main-hometown-content article h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5em;
}

/* Heading 3 of aside (hometown page) style */
.main-hometown-content aside h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5em;
}

/* Paragraphs in hometown page style */
.main-hometown-content article p,
.main-hometown-content article ul,
.main-hometown-content aside p {
    font-size: 1.15rem;
    margin-bottom: 0.5em;
}

/* Clear floats after an article (hometown page) */
.main-hometown-content article::after {
    content: "";
    clear: both;
    display: block;
}

/* Article image style */
.image-article img {
    border-radius: 10px;
    height: 350px;
    margin: 1rem 0 1rem 0;
    transition: 0.2s all ease-in-out;
}

/* Article image: Show the shadow when user hovers */
.image-article img:hover {
    box-shadow: 0px 0px 20px 1px black;
    transform: scale(1.02);
}

/* Centered the image by centering div contains them */
.image-article {
    text-align: center;
}

.project-time {
    font-size: 1.3rem;
    font-weight: normal;
}

.image-row {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: wrap;
}

.project-link {
    color: white;
}

/* ========== CSS STYLES FOR "ABOUT ME" WEBPAGE ========== */

/* Padding for main content main content of about me page */
.about-me-main-content {
    padding: 2rem;
}

/* Section style for main content of about me page */
.about-me-main-content section {
    margin-bottom: 5vh;
}

/* Heading 3, heading 4 for about me page - main content style */
.about-me-main-content h3,
h4 {
    letter-spacing: 1px;
}

/* Heading 2 section styles (about me page) */
.about-me-main-content section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #6791EF;
}

/* Heading 3 section styles (about me page) */
.about-me-main-content section h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Paragraph section styles (about me page) */
.about-me-main-content section p {
    font-size: 1.3rem;
}

/* Achievement box styles */
.achievement-box {
    background-color: #6791EF;
    border: 4px solid #364e83;
    border-radius: 10px;
    box-shadow: 0px 0px 20px 3px black;
    padding: 2rem;
    color: white;
}

/* Left content size of achievement box */
.left-content {
    flex: 0.7;
}

/* Right content size of achievement box */
.right-content {
    flex: 0.3;
}

/* Left content size of achievement box */
.about-me-main-content aside img {
    width: 50%;
    height: auto;
}

/* Align items in achievement box into centered vertically */
.content-container {
    display: flex;
    align-items: center;
}

/* Align content cards with equal gaps */
.content-cards-container {
    display: flex;
    gap: 1vh;
    justify-content: space-around;
    height: auto;
    /* Same height between cards */
}

/* Content card style */
.content-card {
    width: 100%;
    background-color: #6791EF;
    border-radius: 10px;
    padding: 1.5rem;
    color: white;
    text-align: center;
}

/* Image in content card style */
.content-card img {
    width: 100%;
    object-fit: cover;
    height: 30vh;
    border-radius: 10px;
    margin-top: 20px;
    transition: 0.2s all ease-in-out;
}

/* Change the border radius of a picture */
.content-card img:hover {
    border-radius: 20px;
}

/* Made tables inside this div class responsive */
.responsive-table {
    overflow-x: auto;
    max-width: 100%;
}

/* Set the table full width of the main element */
section table {
    width: 100%;
}

/* Table heading styles */
section table th {
    background-color: #6791EF;
    color: white;
}

/* Table heading and table cells styles */
section table td,
th {
    border: 1px solid #6791EF;
    color: #6791EF;
    font-size: 1.15rem;
    padding: 1rem;
}

/* Confession text style */
.confession-text {
    text-align: center;
    font-style: italic;
    color: #6791EF;
}

/* Form container styles */
.form-container {
    /* Centered the form to the central of the screen */
    display: flex;
    justify-content: center;
    text-align: left;
    margin-top: 2rem;
}

/* Form width */
form {
    width: 70%;
}

/* Form inputs gap */
form p {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Label input effect */
label {
    color: #6791EF;
    font-style: italic;
}

/* Input and textarea styles */
input,
textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #6791EF;
    padding: 1rem;
    font-size: 0.75em;
    margin-top: 10px;
}

/* Input (text) style */
input[type="text"] {
    height: 50px;
}

/* Submit button style */
input[type="submit"] {
    height: auto;
    font-size: 1em;
    background: white;
    color: #6791EF;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Submit button hover effect */
input[type="submit"]:hover {
    background: #6791EF;
    color: white;
}

/* ========== CSS STYLES FOR "ANIMATION" WEBPAGE ========== */

/* Main content padding */
.animation-main-content {
    padding: 2rem;
}

/* Heading 2 styles - animation page */
.animation-main-content h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #6791EF;
}

/* Heading 2 ordered list styles - animation page */
.animation-main-content ol {
    font-size: 1.3rem;
    color: #6791EF;
}

/* Animation sample styles */
.animation-sample {
    padding: 1rem;
    background: #6791EF;
    color: white;
    width: fit-content;
    margin-top: 1rem;
    margin-bottom: 1rem;
    animation: ease 3s infinite image-border-loop;
}


/* CSS animation */
/* Animation references: https://www.w3schools.com/css/css3_animations.asp */

/* Slide-in animation */
@keyframes slide {
    0% {
        font-size: 0;
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Image appearing animation */
@keyframes image-slide {
    0% {
        opacity: 0;
        border-radius: 0;
    }

    100% {
        opacity: 1;
        border-radius: 100%;
    }
}

/* Image 3D transformation loop */
@keyframes image-border-loop {
    0% {
        transform: rotate3d(0, 0, 0, 0deg);
        object-fit: cover;
    }

    100% {
        transform: rotate3d(1, 1, 1, -360deg);
        object-fit: cover;
    }
}