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

:root {
    --background-color: hsl(0, 0%, 15%);
    --primary-color: #E15151;
    --secondary-color: #400707;
    --accent-color: #d62424;
    --font-color: #ffcccc;
}

/* Reset some default styles */
body, h1, h2, h3, p, ul, li {
    margin: 0;
    padding: 0;
}

/* Set background color and font */
body {
    font-family: system-ui, Arial, sans-serif;
    font-size: 1.25rem;
    line-height: 1.5;
    background-color: var(--background-color)
}

/* Header */
header {
    background-color: var(--background-color);
    color: var(--primary-color);
    text-align: center;
    align-items: center;
    padding: 20px;
}

/* Navigation */
nav {
    padding: 10px 0;
}

nav ul {
    --_gap: 2rem;
    display: flex;
    list-style: none;
    justify-content: center;
}

nav li {
    overflow: hidden;
    position: relative;
    padding-inline: calc(var(--_gap) / 2);
}

nav li::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--primary-color);
    translate: var(--_translate, 0);
    scale: var(--_width, 0) 1;
    transition: scale 300ms var(--_scale-delay, 0ms), translate 500ms var(--_translate-delay, 0ms);
}

nav li:hover,
nav li:focus-within {
    --_width: 1;
}

@supports selector(:has(h1)) {
    nav li:hover + li {
        --_translate: -100%;
        --_scale-delay: 300ms;
        --_translate-delay: 200ms;
    }

    nav li:has(+ :hover) {
        --_translate: 100%;
        --_scale-delay: 300ms;
        --_translate-delay: 200ms;
    }
}

nav a {
    opacity: 0.7;
    text-decoration: none;    
    color: var(--font-color);
    font-weight: 500;
    position: relative;
}

nav a:hover,
nav a:focus-visible {
    opacity: 1;
}

/* Sections */
section {
    padding-block: 5rem;
}

.section-wrapper {
    max-width: 50rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

.diagonal {
    --skew-angle: -5deg;
    --background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    color: var(--secondary-color);
    isolation: isolate;
}

.diagonal::after {
    content: '';
    background-image: var(--background);
    position: absolute;
    z-index: -1;
    inset: 0;
    transform: skewY(var(--skew-angle));
}

.filler {
    color: var(--font-color);
}

.spikes {
    --spikes-background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --spike-color: var(--background-color);
    position: relative;
    color: var(--secondary-color);
    background-image: var(--spikes-background);
}

.spikes::before,
.spikes::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 50px;
    background: var(--spike-color);
    -webkit-mask-image: url('images/triangle.svg');
    mask-image: url('images/triangle.svg');
}

.spikes::before {
    top: 0;
}

.spikes::after {
    bottom: 0;
    transform: rotate(.5turn);
}

/* Project boxes */
.portfolio h2 {
    color: var(--primary-color);
    margin-bottom: 24px;
}

.project {
    border: 3px solid var(--accent-color);
    padding: 20px;
    margin-bottom: 20px;
}

.project h3 {
    color: var(--primary-color);
}

.project p {
    color: var(--font-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 10px;
    color: var(--font-color);
}

/* Title */
.pagetitle{
    font-family: "Press Start 2P", system-ui, Arial, sans-serif;
}

/* Subtitle */
.subtitle{
    font-size: 30px;
    color: var(--font-color);
}
/* Defines the "Press Start 2P" Custom Font */
@font-face {
    font-family: "Press Start 2P";
    src: url(fonts/PressStart2P-Regular.ttf);
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.footer-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.footer-icons a {
    margin: 0 10px;
}

.footer-icons svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
}

.footer-icons svg:hover {
    transform: scale(1.2);
}

.project-pic, .resume-pic, .contact-pic, .profile-pic {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.project-pic img, .resume-pic img, .contact-pic img {
    width: 640px;
    height: 427px;
    border-radius: 50%;
}

.profile-pic img{
    width: 180px;
    height: 240px;
    border-radius: 50%;
}

.resume {
    padding: 40px;
}

.resume h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.info {
    margin-bottom: 30px;
}

.resume h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.resume p {
    font-size: 16px;
    color: var(--font-color);
    margin-bottom: 5px;
}

.resume ul {
    margin-top: 5px;
    color: var(--font-color);
    margin-left: 20px;
}

.resume ul li {
    list-style-type: disc;
    margin-bottom: 5px;
}
/* Additional styling can be added to customize the look of the page */

.social-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.social-icons a {
    margin: 0 10px;
}

.social-icons svg {
    width: 48px;
    height: 48px;
    transition: transform 0.3s;
}

.social-icons svg:hover {
    transform: scale(1.2);
}

.social-icons {
    margin-top: 10px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-info h2 {
    color: var(--primary-color);
}

.contact-info p {
    color: var(--font-color);
}

.links a {
    color: var(--primary-color);
}

.links a:visited {
    color: var(--accent-color);
}