/* CSS Reset  (Base Styles)*/

html {
    box-sizing: border-box;
    font-size: var(--space-medium);
    font-family: var(--font-default);
    color: var(--black);
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-feature);
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul {
    margin: 0;
    padding: 0;
}

ol,
ul {
    list-style: none;
    ;
}

img {
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
}

/* ---End CSS Reset --- */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --brand: #0800F0;
    --brand-alt: #464FF4;
    --base-lightest: #D8E8FD;
    --base-lighter: #C9DAFE;
    --base-light: #B9CBFE;
    --base-mid: #99ADFF;
    --base-dark: #8F9CF9;
    --base-darker: #4C599D;
    --base-darkest: #091540;
    /*  inherited colors  */
    --text: var(--base-dark);

    /*  Toggle Button Styles  */
    --toggle-top-offset: 0px;
    --toggle-right-offset: 15px;
    --toggle-icon-size: 30px;
    --toggle-icon-color: var(--brand);

    /*  Dropdown Styles  */
    --dropdown-background-color: var(--base-lighter);
    --dropdown-padding-x: 16px;
    --dropdown-padding-top: 60px;
    --dropdown-padding-bottom: 12px;
    --dropdown-link-color: var(--brand);
    --dropdown-link-size: 20px;
    --dropdown-link-font: var(--font-default);
    --dropdown-link-gap: 16px;
}

/* set default font style here */
html,
body {
    font-family: "Space Mono", sans-serif;
    font-optical-sizing: auto;
    font-weight: weight;
    font-style: normal;
}

/* font space mono css classes from google fonts */
.space-mono-regular {
    font-family: "Space Mono", monospace;
    font-weight: 400;
    font-style: normal;
}

.space-mono-bold {
    font-family: "Space Mono", monospace;
    font-weight: 700;
    font-style: normal;
}

.space-mono-regular-italic {
    font-family: "Space Mono", monospace;
    font-weight: 400;
    font-style: italic;
}

.space-mono-bold-italic {
    font-family: "Space Mono", monospace;
    font-weight: 700;
    font-style: italic;
}

/* Add Heading styles here  */
/* h1 {}
h2 {}

h3 {}

h4 {}

h5 {}

h6 {} */

/* style to make style guide */

body {
    padding: 25px;
}

/* brand colours Start */
.brand {
    background-color: var(--brand);
}

.brand-alt {
    background-color: var(--brand-alt);
}

.base-darkest {
    background-color: var(--base-darkest);
}

.base-darker {
    background-color: var(--base-darker);
}

.base-dark {
    background-color: var(--base-dark);
}

.base-mid {
    background-color: var(--base-mid);
}

.base-light {
    background-color: var(--base-light);
}

.base-lighter {
    background-color: var(--base-lighter);
}

.base-lightest {
    background-color: var(--base-lightest);
}
/* brand colours End */

/* Layout Containers */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}
/* Layout Containers End */

/* Header */
header {
    background-color: var(--base-darker);
    padding: 20px 0;
    color: white;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Header End */

/*Sets logo/profile pic size and shape start */
.logo {
    height: 100px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    /*     object-fit: cover; */
    display: block;
    margin: auto;
}

/*Sets logo/profile pic size and shape end */

/* Menu titles colour, size, hover, hover colour start */
nav a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-weight: bold;
    Display: flex;

}

nav a:hover {
    color: var(--base-mid);
}

/* Menu titles colour, size, hover, hover colour end */

/* Sections start */
section {
    margin: 40px 0;
}

h1,
h2 {
    color: var(--base-darkest);
    margin-bottom: 20px;
}

/* Sections End */

/* Grid Layout - Skills and Projects start */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    justify-content: center;
}

.card {
    background-color: var(--base-lighter);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    /* Ensures equal card height */
    text-align: center;
    transition: 0.3s;
}

.card img {
    width: auto;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 8px;
}

.card:hover {
    background-color: var(--base-mid);
    color: white;
}

.card i {
    font-size: 2em;
    margin-bottom: 10px;
    color: var(--brand);
}

.card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.card a:hover {
    color: inherit;
}

/* Grid Layout - Skills and Projects end */

/* Contact Form start */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--base-lightest);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.contact-form label {
    display: block;
    font-weight: bold;
    color: var(--brand);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    display: block;
    width: 100%;
    /* FULL WIDTH of the form */
    padding: 10px;
    margin-top: 5px;
    /* space between label and input */
    border: 1px solid var(--base-dark);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    /* ensures padding doesn't break width */
}


.contact-form button {
    background-color: var(--brand);
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: var(--brand-alt);
}

.button {
    background-color: var(--brand);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
}

.button:hover {
    background-color: var(--brand-alt);
}

/* Contact form end */

/* Footer start */

footer {
    background-color: var(--base-darker);
    color: white;
    padding: 20px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    font-size: 15px;
}

footer img {
    width: 40px;
    margin-left: 10px;
}

/* Footer end */

/* Hamburger menu start */

.hamburger * {
    transition: all 0.3s ease-out;
}

.hamburger {
    position: fixed;
    right: var(--toggle-right-offset);
    top: var(--toggle-top-offset);
}

.hamburger-toggle,
.hamburger-toggle label {
    color: var(--toggle-icon-color);
    z-index: 100;
    cursor: pointer;
    max-width: var(--toggle-icon-size);
}

.hamburger-toggle>* {
    position: absolute;
    right: var(--toggle-right-offset);
    top: 0;
}

.hamburger-toggle label span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.hamburger input {
    opacity: 0;
    width: var(--toggle-icon-size);
    height: var(--toggle-icon-size);
}

.hamburger input+label i {
    position: absolute;
    background-color: var(--toggle-background-color);
    padding: var(--toggle-padding);
    border-radius: var(--toggle-border-radius);
    font-size: var(--toggle-icon-size);
}

.hamburger input:checked+label i {
    transform: rotate(-180deg);
}

.hamburger input+label .close-icon {
    opacity: 0;
}

.hamburger input:checked+label .menu-icon {
    opacity: 0;
}

.hamburger input:checked+label .close-icon {
    opacity: 100;
}

header nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    white-space: nowrap;
    position: absolute;
    right: -100px;
    top: 0;
    max-width: 100px;
    background-color: var(--dropdown-background-color);
    gap: var(--dropdown-link-gap);
    padding: var(--dropdown-padding-top) var(--dropdown-padding-x) var(--dropdown-padding-bottom);
    height: 100vh;
    opacity: 0;

    /*This is the links in the dropdown*/
    a {
        color: var(--dropdown-link-color);
        text-decoration: none;
        font-family: var(--dropdown-link-font);
    }
}

/* nav sibling of .hamburger toggle where .hamburger toggle contains a checked input */
.hamburger-toggle:has(input:checked)+nav {
    transform: translate(-100px, 0);
    max-width: none;
    min-width: 30vw;
    position: fixed;
    opacity: 100;
}

/* Hamburger menu end */

/* MEDIUM SCREENS: (min 700px) */
@media (min-width: 700px) {

    .grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        /* Always 3 items per row */
        gap: 20px;
        justify-content: center;
        max-width: 1000px;
        margin: 0 auto;
    }

    nav ul {
        display: flex;
        justify-content: center;
        gap: 20px;
        /* adds space between menu items */
        padding: 0;
        margin: 0;
    }

    /*Hamburger media*/

    .hamburger {
        position: relative;
        top: unset;
        right: unset;
    }

    .hamburger-toggle {
        display: none;
    }

    .hamburger .hamburger-toggle+nav.drawer {
        flex-direction: row;
        flex-wrap: nowrap;
        position: relative;
        right: unset;
        top: unset;
        max-width: none;
        min-width: none;
        height: auto;
        padding-top: var(--dropdown-padding-bottom);
        transform: none;
        opacity: 100;
        display: block;
    }
}