/* Reset Styles */

* {
    padding: 0;
    margin: 0;
    border: 0;
}
*,
*:before,
*:after {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
:focus,
:active {
    outline: none;
}
a:focus,
a:active {
    outline: none;
}
nav,
footer,
header,
aside {
    display: block;
}
html,
body {
    height: 100%;
    width: 100%;
    font-size: 100%;
    line-height: 1;
    font-size: 10px;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}
input,
button,
textarea {
    font-family: inherit;
}
input::-ms-clear {
    display: none;
}
button {
    cursor: pointer;
}
button::-moz-focus-inner {
    padding: 0;
    border: 0;
}
a,
a:visited {
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}
ul li {
    list-style: none;
}
img {
    vertical-align: top;
    width: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
}


/* General Styling */

:root {
    --color-red: #be3144;
    --color-gray: #303841;
    --color-blue: #45567d;
    --color-text:  #f0f0f0;
    --shadow-color: 0deg 0% 0%;
  --shadow-elevation-low:
    0px 0.8px 0.9px hsl(var(--shadow-color) / 0.1),
    0px 1.4px 1.6px -1.2px hsl(var(--shadow-color) / 0.1),
    0px 3.3px 3.7px -2.5px hsl(var(--shadow-color) / 0.1);
  --shadow-elevation-medium:
    0px 0.8px 0.9px hsl(var(--shadow-color) / 0.11),
    0px 2.7px 3px -0.8px hsl(var(--shadow-color) / 0.11),
    0px 6.8px 7.7px -1.7px hsl(var(--shadow-color) / 0.11),
    -0.1px 16.6px 18.7px -2.5px hsl(var(--shadow-color) / 0.11);
  --shadow-elevation-high:
    0px 0.8px 0.9px hsl(var(--shadow-color) / 0.1),
    0px 4.9px 5.5px -0.4px hsl(var(--shadow-color) / 0.1),
    0px 9.1px 10.2px -0.7px hsl(var(--shadow-color) / 0.1),
    -0.1px 14.9px 16.8px -1.1px hsl(var(--shadow-color) / 0.1),
    -0.1px 23.7px 26.7px -1.4px hsl(var(--shadow-color) / 0.1),
    -0.1px 37.1px 41.7px -1.8px hsl(var(--shadow-color) / 0.1),
    -0.2px 56.4px 63.5px -2.1px hsl(var(--shadow-color) / 0.1),
    -0.3px 83.1px 93.5px -2.5px hsl(var(--shadow-color) / 0.1);
    scroll-behavior: smooth;
}

body {
    color: var(--color-text);
    font-family: 'Poppins', sans-serif;
    line-height: 1.4;
}

a {
    color: var(--color-text);
    text-decoration: none;
}

.flex {
    display: flex;
}

.center {
    justify-content: center;
    align-items: center;
}

/* Header Styling */

header {
    background-color: var(--color-red);
    font-size: 2.2rem;
    justify-content: flex-end;
    padding-right: 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    box-shadow: var(--shadow-elevation-medium)
}

.nav {
    ;
}

.nav__item a {
    display: block;
    padding: 2rem;
    font-weight: 400;
    line-height: 1.4;
    transition: background-color 200ms ease;
}

.nav__item a:hover {
    background-color: var(--color-blue);
}

/* Welcome Section */

.welcome {
    height: 100vh;
    background: linear-gradient(
        62deg,
        var(--color-gray),
        #181719
    );
    width: 100%;
}

.welcome__text {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

h2 {
    font-size: 6rem;
    font-weight: 700;
}

.welcome p {
    color: var(--color-red);
    font-size: 3rem;
    font-weight: 300;
}

/* Projects Section */

.projects {
    background-color: var(--color-blue);
    padding: 5rem 2rem;
    text-align: center;
}

.projects__title {
    margin: 0 auto 6rem auto;
    max-width: 740px;
    border-bottom: 2px solid var(--color-text);
    font-size: 4.2rem;
    line-height: 1.8;
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 4rem;
    max-width: 1280px;
    justify-content: center;
    margin: 0 auto;
    margin-bottom: 6rem;
}

.projects__grid  img {
    height: calc(100% - 6.8rem);
    object-fit: cover;
}

.project__link {
    height: 300px;
    background-color: #303841;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-elevation-high);
}

.project__link h3 {
    padding: 2rem 0.5rem;
    font-size: 2rem;
    color: var(--color-text);
}

.btn {
    background-color: var(--color-gray);
    font-size: 2rem;
    transition: background 0.3s ease-out;
    color: var(--color-text);
    padding: 1rem 2rem;
    border-radius: 5px;
}

.btn i {
    margin-left: 1rem;
    line-height: 1;
    transition: 0.3s ease-in;
}

.btn:hover i {
    transform: translateX(5px);
}

.btn:hover {
    background-color: var(--color-red);
}

.code {
    color: var(--color-gray);
    transition: 0.3s ease-in;
}

.project__link:hover .code {
    color: orange;
}



@media (min-width: 1038px) {
    .projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
}

#contact {
    background-color: var(--color-gray);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#contact i {
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.4;
}

.contact__title {
    padding: 2re;
}

.contact__links {
    justify-content: center;
    display: flex;
    column-gap: 4rem;
    row-gap: 2rem;
    margin-top: 4rem;
    font-size: 2.4rem;
    max-width: 980px;
    width: 100%;
    flex-wrap: wrap;
    padding: 0 4rem;
}

.contact__link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-shadow: 2px 2px 1px #1f1f1f;
    transition: 0.2s ease-in;
}

.contact__link:hover {
    transform: translateX(-5px) translateY(-5px);
}

/* Footer */

footer {
    width: 100%;
    background-color: var(--color-gray);
    display: flex;
    padding: 4rem 3rem;
    justify-content: space-around;
    border-top: 0.5rem solid var(--color-red);
    gap: 2rem;
}

footer p {
    font-weight: 300;
    font-size: 1.8rem;
}

/* Responsive Design */

@media only screen and (max-width: 460px) {
    h2 {
        font-size: 5rem;
    }

    .contact h2 {
        font-size: 3.5rem;
        font-weight: bolder;
    }

    .welcome p, .contact p, .projects__title {
        font-size: 2.5rem;
        font-weight: 900;
    }

    header {
        justify-content: center;
        padding: 0;
        font-size: 1.8rem;
    }

    footer {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}