:root {
    font-size: 62.5%; /* 1rem = 10px */
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    font-size: 1.6rem;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(0,0,65,1) 0%, rgba(91,195,154,1) 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

/* Main content */
main {
    min-height: calc(100vh - 10rem); /* footer height */
    padding-top: 10rem; /* nav height */
    padding-bottom: 2rem;
}

/* Headings */
h1 {
    font-size: 3rem;
    font-family: monospace;
}
h1 .small {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 1rem;
}

/* Cursor animation */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1em;
    background-color: #fff;
    margin-left: 5px;
    animation: blink 1s step-end infinite;
    vertical-align: bottom;
}
@keyframes blink { 50% { opacity: 0; } }

/* Links */
a { text-decoration: none; color: #000; }

/* Lists */
li { list-style: none; }

/* Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.container_style {
    background-color: #272727cc;
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 8px;
    color: #fff;
}

/* NAV */
nav {
    z-index: 300;
    position: fixed;
    top: 0;
    width: 100%;
    height: 7rem;
    background-color: #272727cc;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center; /* vertical centering */
    font-weight: 600;
}
nav .container {
    display: flex;
    justify-content: space-between; /* name left, links right */
    align-items: center; /* vertical center */
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
}
#name {
    font-size: 3rem;
    margin-right: 2rem;
}
#nav_list {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav_item > a { color: var(--secondary-font-color); }
.nav_item > a:hover { color: #fff; text-decoration: underline; }

/* INDEX CONTAINER */
.index_container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem;
}
.index_container h1 { font-size: 4rem; line-height: 1.2; }
.index_container h1 .small { font-size: 2.8rem; }
.index_container .intro { font-size: 1.8rem; line-height: 1.6; margin-top: 1rem; }

/* SKILLS */
.skills_list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2.5rem;
}
.skills_item {
    flex: 1 1 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    font-size: 1.6rem;
}

/* POSTS */
.posts {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.post_container { width: 100%; padding: 2rem; }
.post_img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 0.5rem; }

/* BUTTONS */
.btn {
    display: inline-block;
    margin-top: 1rem;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 1.6rem;
    background-color: #00d4ff;
    color: #000;
    border: none;
    cursor: pointer;
    transition: 0.5s;
}
.btn:hover { background: #47e9ff; }
.btn > i { padding-right: 0.5rem; }
.btn_secondary {
    color: #fff;
    background-color: #222;
    border: 2px solid #444;
}
.btn_secondary:hover { color: #000; background-color: #fff; }
.btn_main_container { display: flex; justify-content: flex-end; margin-top: 1rem; }
.btn_main { font-size: 1.8rem; }

/* CONTACT */
.contact_container { display: flex; flex-direction: column; gap: 2rem; }
.contact_container h1 { text-align: center; }
.contact_list { display: flex; flex-wrap: wrap; justify-content: space-evenly; gap: 2rem; }
.contact_list_item { display: flex; flex-direction: column; align-items: center; gap: 1rem; }

/* FOOTER */
footer {
    height: 10rem;
    background-color: #232B33;
    display: flex;
    align-items: center;
    justify-content: center;
}
footer .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}
/* RESPONSIVE */
@media (max-width: 1024px) {
    .index_container h1 { font-size: 3.5rem; }
    .index_container h1 .small { font-size: 2.4rem; }
    .index_container .intro { font-size: 1.7rem; }
    .posts { grid-template-columns: repeat(2, 1fr); }
    .skills_list { justify-content: space-around; }
}

@media (max-width: 768px) {
    .index_container h1 { font-size: 3rem; }
    .index_container h1 .small { font-size: 2rem; }
    .index_container .intro { font-size: 1.6rem; }
    .posts { grid-template-columns: 1fr; }
    .skills_list { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
    nav .container { flex-direction: column; gap: 1rem; }
}

@media (max-width: 480px) {
    body { font-size: 1.5rem; }
    .index_container h1 { font-size: 2.4rem; }
    .index_container h1 .small { font-size: 1.8rem; }
    .index_container .intro { font-size: 1.4rem; }
    .btn { font-size: 1.4rem; padding: 8px 16px; }
    .container { padding: 0 1rem; }
}
