/* Imports the Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap');

/* @import url('https://fonts.cdnfonts.com/css/rockwell-nova'); */

/*Imports the Comic Sans font so all devices can use it*/
@font-face {
    font-family: 'Comic Sans';
    src: url("../Fonts/ComicSansMS3.ttf");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rockwell Nova', sans-serif;
    font-family: 'Rockwell Nova Cond', sans-serif;
    font-family: 'Rockwell Nova Light', sans-serif;
    font-family: 'Rockwell Nova Cond Light', sans-serif;
    font-family: 'Rockwell Nova Extra Bold', sans-serif;
    src: url(https://fonts.cdnfonts.com/css/rockwell-nova);
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


/* 
Sets the default values for all the variables on the page
- All variables by default are set to the mobile values as well as dark mode
*/
:root {
    /* Spacing */
    --small: 10px;
    --medium: 20px;
    --large: 40px;
    line-height: 1.4;

    /* General Colours */
    --primary: #a39be3;
    --secondary: #7a2268;
    --background: rgba(6, 5, 20, 0.8);
    --background-image: url("../Backgrounds/island-dark.webp");
    --overlay: rgba(6, 5, 20, 0.4);

    /* Text */
    --primary-text: #e7e6f7;
    --secondary-text: #131B23;

    /* Navigation */
    --nav-background: rgb(6, 5, 20, 0.8);
    --nav-text: #e7e6f7;
    --exit-filter: invert(100%) sepia(0%) saturate(1513%) hue-rotate(233deg) brightness(107%) contrast(101%);
}

/* Removing default spacing */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    /* smoothly scrolls if a link is clicked */
    scroll-behavior: smooth;
}


/* CSS for the Scrollbar */

/* width */
::-webkit-scrollbar {
    width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
    background-color: rgba(9, 18, 31, 1);
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #8d8d8d;
    border-radius: 25px;
    border: none;
}

/* .............................................. */


/* Styling for the body */
body {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    color: var(--primary-text);
    background-color: var(--background);
}

/* Sets the image in the background with a blur effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--background-image);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: blur(4px);
    -webkit-filter: blur(4px);
}

/* Styling for the overlay (makes the image in the background darker */
#overlay {
    background-color: var(--overlay);
}

/* ................................................. */

/* Heading should all use the rockwell font */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Rockwell Nova', sans-serif, Arial;
}

/* Applies a margin to the list symbol (as the default was removed) */
li {
   margin-left: var(--medium);
}

/* Prevents the images from being dragged */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
  }

/* Sets the default styling for a button */
button {
    all: unset; 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sets the default styling for a link to have no decoration and be the primary-text colour */
a {
    text-decoration: none;
    color: var(--primary-text);
}

/* Sets the effect for when a link is hovered over or focused */
a:is(:hover, :focus) {
    text-decoration: underline var(--primary);
    transform: scale(1.1);
}

/* Sets the styling for items that in html aren't buttons, but should be treated as one */
.button {
    padding: var(--small);
    border-radius: var(--small);
    background-color: var(--primary);
    color: var(--secondary-text);
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

/* Hover and Focus effects for the button elements*/
.button:is(:hover, :focus) {
    background-color: var(--secondary);
    color: var(--primary-text);
    transform: scale(1.1);
}


/* Styles the buttons to increase in size when focused/hovered */
button:is(:hover, :focus) {
    transform: scale(1.3);
    transition: all 0.2s ease-in-out;
}

html {
    scroll-behavior: smooth;
    /* smooth scrolling */
    scroll-padding-top: 100px;
}

/* Styling for the header to stick at the top centre of the page */
header {
    height: 80px;
    padding: 0 16px;
    background-color: var(--primary);
    color: var(--secondary-text);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

/* Styling for the title/navigation bar at the top of the page */
.navigation-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
}

/* Styling for the icons in the navigation menus */
.icon {
    width: 48px;
    height: 48px;
    padding: 6px;
    transition: all 0.2s ease-in-out;
    border-radius: 50%;
}

/* Sets the colour for the exit icons in the menus */
.exit {
    filter: var(--exit-filter);
}

/* Sets the colour for the exit icons in the menus if they are focused or hovered */
.exit:is(:hover, :focus) {
    filter: invert(19%) sepia(81%) saturate(6752%) hue-rotate(357deg) brightness(106%) contrast(123%);
}

/* Styling for the containers of the menus */
.quick-nav,
.quick-settings {
    top: 0;
    background-color: var(--nav-background);
    height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 320px;
    width: 100%;
    position: fixed;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    animation: fadeInAnimation ease-in-out 0.5s forwards;
    z-index: 10;
    gap: var(--small);
    color: var(--nav-text);
    backdrop-filter: blur(10px);
}

/*  */
.nav-link {
    color: var(--nav-text);
}

/* Ensures the page navigation menu starts at the left side of the screen */
.quick-nav {
    left: 0;
}

/* Ensures the settings menu starts at the right side of the screen */
.quick-settings {
    right: 0;
}

/* Styles the content of the menus */
.quick-nav-content,
.quick-settings-content {
    display: flex;
    flex-direction: column;
    gap: var(--large);
    padding: var(--small);
}

/* Styles the navigation menu to be easier to read */
.quick-nav-content {
    font-size: 1.6em;
    padding-left: var(--large);
}

/* Styles the headings for the menus */
.quick-nav-headline,
.quick-settings-headline {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    padding: var(--small);
    background-color: var(--nav-background);
}

/* ----------------------------------------------------------- */

/* Classes to dictate the state of the menus */

.none {
    display: none;
}

.hide {
    opacity: 0;
    visibility: hidden;
    animation: fadeOutAnimation ease-in-out 0.5s forwards;
}

/* ------------------------------------------------------------ */

/* The animation for the menus opening and closing */

@keyframes fadeInAnimation {
    0% {
        opacity: 0;
        visibility: hidden;
        width: 0px;
    }

    100% {
        opacity: 1;
        visibility: visible;
        width: 350px;
    }
}


@keyframes fadeOutAnimation {
    0% {
        opacity: 1;
        width: 350px;
        visibility: visible;
    }

    100% {
        opacity: 0;
        width: 0px;
        visibility: hidden;
    }
}

/* ------------------------------------------------------------ */

.menu-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.menu-content {
    display: flex;
    flex-direction: column;
    gap: var(--small);
}


.menu-label {
    white-space: nowrap;
    font-size: 1.3em;
    font-weight: bold;
}

/* ------------------------------------------------------------ */

/* Styling to control all of the toggles */

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--secondary-text);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

.switch input:checked + .slider {
    background-color: var(--secondary);
}

.switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* -------------------------------------------------- */


/* Styling for the main content - aimed for small mobile devices */
main {
    margin: 0 auto;
    /* Centers the content */
    padding: var(--small);
    display: grid;
    grid-template-areas:
        "intro"
        "about"
        "experience"
        "projects"
        "contact";
    gap: var(--large);
    box-sizing: content-box;
    /* Prevents the content from overflowing */
    max-width: 900px;
}

/* Styles the containers that contain all of the information on the page */
.content-box {
    background-color: var(--background);
    border: none;
    border-radius: var(--small);
    padding: var(--small);
}

/* Removes the background colour from the container and adds a gap between objects*/
#intro {
    justify-items: center;
    gap: var(--small);
    background: none;
}

/* Adjusts the size of the main page title */
.title {
    font-size: 2.3em;
    text-align: center;
    font-weight: bold;
}

/* Sets the home section to the intro area and makes it take up the entire screen */
#home {
    text-align: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-area: intro;
}

/* Sets the about section to the about area while giving it a border */
#about {
    grid-area: about;
    border: 4px solid var(--primary);
}

/* Sets the experience section to the experience area */
#experience {
    grid-area: experience;
}

/* Sets the projects section to the projects area */
#projects {
    grid-area: projects;
}

/* Sets the contact section to the contact area */
#contact {
    grid-area: contact;
    height: min-content;
}



/* --------------------------------------------- */

/* Styling for the typing animation */

#typed {
    height: 3em;
}

#typing-text {
    display: inline-block;
    font-size: 1em;
}

/* .............................................. */


/* Sets the spacing for the about section */
.about-section {
    gap: var(--small);
    padding: var(--small) 0;
}


/* Sets the size of the profile picture image */
#pfp {
    width: 50%;
    object-fit: contain;
    border-radius: 20%;
    margin: 0 auto;
    transition: all 0.2s ease-in-out;
}

/* Increases the size of profile picture if the user hovers or  */
#pfp:is(:hover, :focus) {
    border: var(--secondary) 2px solid;
    transform: scale(1.1);
    
}

/* Centres the description to be in the centre of the container */
.description {
    gap: var(--small);
    align-items: center;
    text-align: center;
}


/* Applies a flex column to all of the following ID's and Classes */
.description,
.work-info,
.education-info,
.project-section,
.project,
.project-list,
#experience,
.about-section,
#about,
#intro {
    display: flex;
    flex-direction: column;
}

/* .............................................. */


/* CSS for the Social Media logo-icons */

/* 
    Styles the container of the social media icons
    to display them in a row and to have a gap between them
*/
.logo-icons {
    display: flex;
    flex-direction: row;
    gap: var(--small);
    padding: var(--small);
    justify-content: center;
}

/* 
    Sets the size of the social media icons
*/
.logo-icon {
    display: flex;
    width: 60px;
    height: 60px;
    border-radius: 20%;
    border: solid var(--primary-text) 3px;
    background-color: rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease-in-out;

}

/* Makes the icons appear large and as circles if they are focused or hovered */
.logo-icon:is(:hover, :focus) {
    border-radius: 50%;
    transform: scale(1.25);
}

/* --------------------------------------------------------- */


/* Individual background colours for each social media icon */
.linkedin:is(:hover, :focus) {
    background-color: #007ab9;
}

.email:is(:hover, :focus) {
    background-color: #324974;
}

.github:is(:hover, :focus) {
    background-color: #985ef0;
}

/* ----------------------------------------------------------- */

/* Sets the social media icons to white and to fit in the container */
.iconImg {
    width: 75%;
    height: 75%;
    margin: auto;
    filter: invert(100%) sepia(0%) saturate(1513%) hue-rotate(233deg) brightness(107%) contrast(101%);
}

.info-box {
    padding: var(--small);
    border-radius: var(--small);
    background-color: var(--background);
}

.work-info, .education-info {
    gap: var(--small);
    padding: var(--small) 0;
    flex-grow: 1;
}

.project-section {
    gap: var(--small);
    padding: var(--small) 0;
}

.project {
    padding: var(--small);
    justify-content: space-between;
    border-radius: var(--small);
    background-color: var(--background);

}

/* Styling to handle the lists for experience and projects */
.experience-list, .project-list {
    padding: var(--small) 0 var(--small) 0;
    gap: var(--small);
    flex: 1;
}

/* Styling for the 'view on github' buttons */
.git-link {
    width: fit-content;
    align-self: center;
}

/* Styling for the statistics for github */
.github-stats {
    align-items: center;
    width: 100%;
    height: auto;
}

/*  */
footer {
    background-color: var(--primary);
    color: var(--secondary-text);
    width: 100%;
    text-align: center;
    padding: var(--small);
}


/* Media Queries for device responsiveness */

/*  Larger Mobile Devices   */
@media screen and (min-width: 425px) {
    body {
        font-size: 1.1em;
    }

    .logo-icons {
        grid-template-columns: repeat(4, 1fr);
        justify-items: center;
    }

    .github-stats {
        max-width: 80%;
    }
}

/*  Tablets   */
@media screen and (min-width: 720px) {
    :root {
        --small: 18px;
        --large: 50px;
    }

    header {
        display: flex;
    }

    .info-box {
        border: white 2px solid;

    }

    .project {
        border: solid 2px white;
    }


}

/*  Small laptops   */
@media screen and (min-width: 900px) {

    body {
        font-size: 1.2em;
    }

    .github-stats {
        max-width: 60%;
    }


}

/*  Desktops and laptops   */
@media screen and (min-width: 1024px) {

    .quick-nav,
    .quick-settings {
        max-width: 500px;
    }

    main {
        grid-template-areas:
            "intro intro intro"
            "about about contact"
            "about about experience"
            "projects projects projects";
        gap: var(--large);
    }

    .project-section {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .github-stats {
        max-width: 100%;
    }

}

/*  Large Desktops and laptops   */

@media screen and (min-width: 1280px) {
    :root {
        --small: 20px;
        --large: 60px;
    }

    body {
        font-size: 1.4em;
    }

    main {
        max-width: 1200px;
    }

    .quick-nav,
    .quick-settings {
        max-width: 600px;
    }
}