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

/* Custom properties */

:root {
    --ff-primary: 'Source Sans Pro', sans-serif;
    --ff-secondary: 'Source Code Pro', monospace;

    --fw-reg: 300;
    --fw-bold: 900;

    --clr-light: #020d28;
    --clr-dark: #349832;
    --clr-text-light: #C5C6C7;
    --clr--accent: #2448a3;
    --clr-lightmodelink: #7297f4;

    --clr-nav-colour: #021031;

    --fs-h1: 3.5rem;
    --fs-h2: 2.25rem;
    --fs-h3: 1.25rem;
    --fs-body: 1rem;

    --bs: 0.25em 0.25em 0.75em rgba(0, 0, 0, 0.25),
          0.125em, 0.125em, 0.25em, rgba(0, 0, 0, 0.125);
}

@media (min-width: 800px) {
    :root {
        --fs-h1: 4.5rem;
        --fs-h2: 3.75rem;
        --fs-h3: 1.5rem;
        --fs-body: 1.125rem;
    }
}

/* General Styles */
body {
    background-color: var(--clr-light);
    color: var(--clr-text-light);
    margin: 0;
    font-family: var(--ff-primary);
    font-size: var(--fs-body);
    line-height: 1.6;
}

section {
    /* play aroudn with this, too big*/
    padding: 5em 2em;
}

img {
    display: block;
    max-width: 100%;
}

strong { font-weight: var(--fw-bold); }

:focus {
    outline: 3px solid var(--clr--accent);
    outline-offset: 3px;
}

html {
    scroll-behavior: smooth;
}


/* Buttons */
.btn {
    display: inline-block;
    padding: .5em 2.5em;
    background: var(--clr--accent);
    color: var(--clr-text-light);
    text-decoration: none;
    cursor: pointer;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: var(--fw-bold);
    transition: transform 200ms ease-in-out;
    margin-top: 1.5em;
}

.btn:hover {
    transform:scale(1.05);
}

/* Link Styling */
a:visited {
    text-decoration: none;
}

a {
    text-decoration: none;
}

/* all link formatting */
a:hover {
    opacity: .7;
    text-decoration: underline;
}

/* Typography */
h1,
h2,
h3 {
    line-height: 1em;
    margin: 0;
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
}

.section__title {
    margin-bottom: 0.25em;
}

.section__title--intro {
    font-weight: var(--fw-reg);
    font-size: 3em;
    margin-bottom: -1em;
}

.section__title--intro strong {
    display: block;
}

.section__subtitle {
    margin: 0;
    font-size: var(--fs-h3);
}

.section__subtitle--intro,
.section__subtitle--about {
    background: var(--clr--accent);
    font-family: var(--ff-secondary);
    margin-bottom: 1em;
    padding: 0.25em;
}

/* Navigation & header */
header {
    display: flex;
    justify-content: space-between;
    padding: 1em;
}

.nav {
    overflow: hidden;
    background-color: var(--clr-nav-colour);
    position: fixed;
    top: 0; /* Position the navbar at the top of the page */
    width: 100%; /* Full width */
    z-index: 100;
}

/* Links inside the navbar */
.nav a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
  }
  
  /* Change background on mouse-over */
  .nav a:hover {
    background: var(--clr--accent);
  }
  
  /* Main content */
  .main {
    margin-top: 30px; /* Add a top margin to avoid content overlay */
  }

/* Intro section */
.introduction {
    position: relative;
}

.intro__img {
    box-shadow: var(--bs);
}

.intro-links {
    position: absolute;
    text-align: center;
    left: 80px;
    right: 80px;
    font-size: 1.45em;
    font-weight: var(--fw-bold);
}

.projects-btn {
    position: absolute;
    text-align: center;
    left: 80px;
    right: 80px;
    top: 400px;
}

.intro-link-element {
    color: var(--clr--dark);
}

@media (min-width:600px) {
    .introduction {
        display: grid;
        width: min-content;
        margin: 0 auto;
        grid-column-gap: 1em;
        grid-template-areas: "img title" "img subtitle";
        grid-template-columns: min-content max-content;
    }

    .intro__img {
        grid-area: img;
        min-width: 250px;
    }

    .section__subtitle--intro {
        align-self: end;
        grid-column: -1 / 1;
        grid-row: 2;
        text-align: right;
        position: relative;
        left: -1.5em;
        width: calc(100% + 1.5em);
    }
}

/* My interests section */
.my-interests {
    background-color: var(--clr-dark);
    background-image: url(../img/interestsblurred.jpg);
    background-size: cover;
    color: var(--clr-text-light);
}

.section__title--interests {
    color: var(--clr-text-light);
    font-size: 3em;
    position: relative;
    text-align: center;
}

.section__title--interests::after {
    content: '';
    display: block;
    width: 2em;
    height: 1px;
    margin: 0.5em auto 1em;
    background: var(--clr-light);
    opacity: 0.5;
}

.interest {
    background-color: var(--clr-light);
    margin: 1em;
    max-width: 500px;
    opacity: 0.85;
}

@media (min-width: 800px) {
    .interests {
        display: flex;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }

    .interest + .interest {
        margin-left: 1em;
    }
}

/* About Me Section */
.about-me {
    max-width: 1000px;
    margin: 0 auto;
}

.section__title--about {
    font-size: 3em;
}

.about-me-img {
    box-shadow: var(--bs);
}

@media (min-width: 600px) {
    .about-me {
        display: grid;
        grid-template-columns: 1fr 200px;
        grid-template-areas: 
            "title img"
            "subtitle img"
            "text img";
        grid-column-gap: 2em;
    }

    .section__title--about {
        grid-area: title;
    }

    .section__subtitle--about {
        grid-column: 1/ -1;
        grid-row: 2;
        position: relative;
        left: -1em;
        width: calc(100% + 4em);
        padding-left: 1em;
        padding-right: calc(200px + 4em);
    }

    .about-me-img {
        grid-area: img;
        position: relative;
        z-index: 2;
    }
}

/* Resume Button Formatting */
.resume-btn {
    position: relative;
    text-align: center;
}

/* Side Projects */
.side-projects {
    background-color: var(--clr-light);
    color: var(--clr-text-light);
    text-align: center;
}

.section__title--sideprojects {
    font-size: 3em;
    position: relative;
}

.section__title--sideprojects::after {
    content: '';
    display: block;
    width: 2em;
    height: 1px;
    margin: 0.5em auto 1em;
    background: var(--clr-light);
    opacity: 0.5;
}

.section__subtitle--sideproj {
    color: var(--clr-text-light);
    font-size: 1.75em;
    font-weight: var(--fw-bold);
    margin-bottom: 1em;
}

.side-project-link {
    color: var(--clr-lightmodelink);
}

@media (min-width: 800px) {
    .portfolio {
        text-align: left;
        display: grid;
        grid-template-columns: 500px 500px;
        grid-column-gap: 2em;
        grid-row-gap: 2em;
        justify-content: center;
        padding-bottom: 2em;
    }

    .music-portfolio {
        text-align: left;
        display: grid;
        grid-template-columns: 500px 500px;
        grid-column-gap: 2em;
        grid-row-gap: 2em;
        justify-content: center;
        padding-bottom: 2em;
    }

    .music-portfolio-element {
        text-align: center;
    }

    .centered-img {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Footer */
.footer {
    background: #111;
    color: var(--clr-text-light);
    text-align: center;
    padding: 2em 0;
    font-size: var(--fs-h3);
}

.footer a { color: inherit; }

.footer__link {
    font-weight: var(--fw-bold);
}

.social-list {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 2em 0 0;
    padding: 0;
}

.social-list__item {
    margin: 0 .5em;
}

.social-list__link {
    padding: .5em;
}

/* Esport involvement, secondary pages */
.secondary-page-individual {
    padding: 0 2em 2em;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    justify-content: center;
}

.secondary-page-individual p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.img-caption {
    text-align: center;
    justify-content: center;
}

