/* Core Layout */
body {
    background-color: #141414;
    font-family: 'Helvetica';
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #d9d9f7;
    margin: 0;
    padding: 0;
}

main, footer {
    margin: 0 5%;
}

header {
    background-color: #141414;
    padding: 2% 5%;
}

footer {
    margin-bottom: 2%;
}

/* Typography */

h2 {
    color: #9a9aeb;
    font-size: 3em;
    margin: 0;
    padding: 0;
}

/* Preloader */

/* #preloader {
    background: #141414;
    height: 100vh;
    width: 100%;
    position: fixed;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center; 
    top: 0;
    left: 0;
}

#preloader img {
    text-align: center;
} */

/* Navbar */

#navbar {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

#spacer {
    flex-grow: 1;
}

#navbar img {
    width: 56px;
    height: 56px;
    position: relative;
    top: 4px;
    left: 4px;
}

#navbar li {
    float: right;
    font-size: 1.4em;
}

#navbar li a {
    display: block;
    color: #d9d9f7;
    text-align: center;
    padding: 0 16px;
    text-decoration: none;
}

#navbar li a:hover {
    color: #9CC948;
    cursor: pointer;
}

/* About Section */

#about {
    min-height: 100vh;
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    padding: 0 5%;
    box-sizing: border-box;
}

.about-intro {
    width: 100%;
    max-width: 1000px;
    margin-bottom: 80px;
}

.about-main {
    font-size: 2em;
    font-weight: 400;
    margin-bottom: 70px;
    color: #9a9aeb;
    text-align: left;
}

.about-sub {
    font-size: 1.5em;
    font-weight: 300;
    color: #d9d9f7;
    margin-bottom: 70px;
    text-align: center;
}

.arrow-icon {
    width: 30px;
    height: 30px;
    fill: #d9d9f7;
    margin: 0 auto;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0); 
    }
    50% {
        transform: translateY(10px);
    }
}

/* Skills Section */

#skills {
    scroll-margin-top: 40px;
}

.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 20px;
    padding-bottom: 60px;
}

.skills-item h3 {
    font-size: 1.5em;
    font-weight: 300;
    margin: 0;
    height: 60px;
    color: #9a9aeb
}

.skills-tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
}

.skill-tag {
    background-color: #2c2c2c;
    color: #d9d9f7;
    padding: 5px 10px;
    font-size: 1em;
    font-family: 'Courier New';
    font-weight: 400;
    border-radius: 8px;
    display: inline-block;
    /* cursor: pointer; */
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* .skill-tag:hover {
    background-color: #9a9aeb;
    color: #141414;
} */

/* Work Section */

#work {
    scroll-margin-top: 40px;
}

.work-item {
    display: flex;
    flex-wrap: wrap;
    padding: 40px 0;
    align-items: center;
    gap: 40px;
}

.work-item:nth-child(even) {
    flex-direction: row-reverse;
}

.work-item:nth-child(odd) {
    flex-direction: row;
}

.work-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
}

.work-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #9a9aeb;
    flex: 1;
}

.work-image {
    flex: 1;
    min-width: 300px;
}

.work-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.work-text {
    flex: 1;
    min-width: 300px;
    color: #d9d9f7;
}

.work-text h3 {
    color: #9a9aeb;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0;
}

.work-text h4 {
    font-size: 1em;
    font-weight: 300;
    margin: 5px 0 15px 0;
}

.work-text p {
    font-size: 1.2em;
    font-weight: 300;
    padding: 10px;
    margin: 10px 0 30px 0;
    background-color: #d9d9f7;
    color: #141414;
    box-shadow: 10px 10px #d9d9f7cc;
}

.work-links {
    display: flex;
    gap: 10px;
    flex-shrink: 0; /* prevents icons from wrapping */
}

.work-icon {
    color: #9a9aeb;
    width: 30px;
    height: 30px;
    transition: color 0.2s ease;
    cursor: pointer;
}

.work-icon:hover {
    color: #9CC948;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 30px 0;
}

/* Text Only Work Items */

.work-item.text-only {
    justify-content: flex-start;
}

.work-item.text-only .work-text {
    max-width: 100%;
    text-align: left;
}

/* Footer */

#footer {
    padding: 40px 0;
    text-align: center;
}

#footer h2 {
    color: #9a9aeb;
    font-weight: 500;
    font-size: 1em;
    margin-bottom: 10px;
}

#footer ul {
    padding: 0;
    margin: 10px auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

#footer li {
    display: flex;
    align-items: center;
    font-size: 0.95em;
    color: #d9d9f7;
    margin: 0 10px;
}

#footer li a {
    color: #d9d9f7;
    text-decoration: none;
}

#footer li a:hover {
    color: #9CC948;
    cursor: pointer;
}

/* Responsive Layout */

@media only screen and (max-width: 1200px) {
    .skills-container {
        grid-template-columns: 1fr;
    }
    .work-item {
        flex-direction: column !important;
    }
}

@media screen and (max-height: 760px) {
    .about-main {
        font-size: 1.3em;
        margin-bottom: 45px;
    }

    .about-sub {
        font-size: 1em;
        margin-bottom: 45px;

    }

    .arrow-icon {
        width: 20px;
        height: 20px;
        fill: #d9d9f7;
        margin: 0 auto;
        display: block;
        animation: bounce 2s infinite;
    }
}

@media screen and (max-height: 450px) {
    .arrow-icon {
        display: none;
    }
}