* {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    min-width: 350px;
}

/* navbar */

.nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    height: 7.5vh;
    padding: 0 1.5rem;
}

.nav-links {
    display: flex;
    height: 100%;
    list-style: none;
}

.nav-links li {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links a {
    font-size: large;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1rem;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.nav-links a:hover {
    background-color: #555;
    color: white;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background-color: #555;
    color: white;
}

.nav-button:focus {
    outline: none;
}

.nav-links li {
    display: flex;
    align-items: center;
}

/* main content */

main {
    flex: auto;
}

h1 {
    color: #333;
}

p {
    font-size: large;
}

hr {
    width: 50%;
    text-align: left;
    margin-left: 0
}

.headshot {
    width: 30vw;
    height: auto;
    border-radius: 8px;
    box-shadow: 2rem 2rem 1rem lightgray;
}

.about-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.main-text {
    margin: 0.5rem;
    flex: 1;
    min-width: 300px;
}

.blog {
    margin: 0.5rem;
}

.projects {
    margin: 0.5rem;
}

.header-links-big,
.header-links-small {
    display: flex;
    height: 100%;
    width: fit-content;
    text-decoration: none;
    margin: 0;
    font-weight: bold;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.header-links-small {
    padding: 0.25rem;
}

.header-links-big {
    padding: 0.3rem;
}

.header-links-small:hover,
.header-links-big:hover {
    background-color: #555;
}

.header-links-big:hover h1,
.header-links-small:hover h2 {
    color: white;
}

.projects .header-links-small,
.header-links-big {
    margin-left: -0.25em;
}

.about-text,
.projects-text p {
    padding-right: 10%;
    font-size: x-large;
    line-height: 45px;
}

/* technology */

.tech-boxes {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.tech-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 10px;
    background: #f5f5f5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
    font-size: 1.35rem;
}

.tech-image {
    width: 32px;
    height: 32px;
    margin-right: 14px;
}

/* tech -> github */

.github-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: large;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
    border-radius: 5px;
}

.github-button img {
    height: 1.5rem;
    width: auto;
}

.github-button:hover {
    background-color: #333;
    color: white;
}

.github-button:hover img {
    filter: brightness(0) invert(1);
}

/* work experience - credits to Christian4423 from stack overflow for this section */

.list-component {
    border-left: 1px solid gray;
    list-style: none;
    margin-left: 10px;
}

.experience-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* WE left */
.box-in.main-text {
    flex: 1 1 60%;
}

/* WE right */
.cv-panel {
    flex: 1 1 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.cv-button {
    background-color: #333;
    color: white;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-right: 25vw;
    width: 10vw;
    text-align: center;
}

.cv-button:hover {
    background-color: #555;
}

.cv-preview {
    width: 100%;
    height: 70vh;
    margin-right: 25vw;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 7.5rem;
}


/* https://www.computerhope.com/issues/ch001705.htm */
.list-component .__item {
    background: url(https://www.computerhope.com/issues/pictures/bullet.gif) no-repeat top left;
    background-position: top left;
    padding: 0 0 4px 60px;
    margin-left: 1em;
    position: relative;
    right: 67px;
    margin-bottom: 10px;
    top: 10px;
}

.card-component {
    border: 1px solid gray;
    border-radius: 5px;
    padding: 1em;
    max-width: 30vw;
    min-width: 275px;
    font-family: Arial;
    position: relative;
    bottom: 20px;
}

.card-component .__year {
    padding: 0.25rem;
    font-size: 1em;
}

.card-component .__title {
    font-size: 1.5em;
    padding: 0.25rem;
}

.card-component .__text {
    color: rgb(43, 43, 43);
    padding: 0.25rem;
}

/* projects */

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.project-text {
    flex: 1 1 50%;
    min-width: 300px;
}

.project-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.project-image {
    flex: 1 1 42.5%;
    display: flex;
    justify-content: flex-end;
}

/* footer */

footer {
    background-color: lightgray;
    margin-top: 10vh;
    text-align: center;
    padding: 1rem;
    font-weight: bold;
}

/* special */

.hamburger {
    display: none;
    position: absolute;
    top: 0rem;
    right: 1rem;
    font-size: 2rem;
    padding: 1rem;
    background: none;
    border: none;
    z-index: 9999;
    color: black;
}

.box-in-intro {
    padding: 10%;
    padding-top: 5%;
    padding-bottom: 5%;
}

.box-in {
    padding: 2.5%;
    padding-left: 10%;
    padding-right: 10%;
}

.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.5s;
    appearance: none;
}

.dark-mode-toggle:focus,
.dark-mode-toggle:active {
    outline: none;
    box-shadow: none;
    background: none;
}

code {
    background-color: #c0c0c06f;
}

/* special -> dark mode  */

body {
    background-color: #ffffff;
    color: #333;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.dark-mode {
    background-color: #1e1e1e;
    color: #f5f5f5;
}

.nav-menu {
    background-color: #f0f0f0;
}

body.dark-mode .nav-menu {
    background-color: #1e1e1e;
}

body.dark-mode .headshot {
    width: 30vw;
    height: auto;
    border-radius: 8px;
    box-shadow: 2rem 2rem 1rem rgb(38, 38, 38);
}

.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.dark-mode-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.dark-mode-toggle img {
    width: 24px;
    height: 24px;
    transition: opacity 0.3s;
}

body.dark-mode .box-in,
body.dark-mode .box-in-intro {
    background-color: #1e1e1e;
    color: #f5f5f5;
}

body.dark-mode .card-component {
    background-color: #2a2a2a;
    border-color: #555;
    color: #eee;
}

body.dark-mode .card-component .__text {
    color: #ccc;
}

body.dark-mode .tech-item {
    background-color: #2b2b2b;
    color: #f0f0f0;
    box-shadow: none;
}

body.dark-mode .github-button {
    background-color: #2b2b2b;
    border-color: #444;
    color: #f0f0f0;
}

body.dark-mode .github-button:hover {
    background-color: #555;
    color: white;
}

body.dark-mode .cv-button {
    background-color: #2B2B2B;
    color: #fff;
    border: 1px solid;
    border-color: #444;
    border-radius: 6px;
}

body.dark-mode .cv-button:hover {
    background-color: #444;
}

body.dark-mode footer {
    background-color: #1e1e1e;
    color: #eee;
}

body.dark-mode hr {
    border-color: #444;
}

body.dark-mode a,
body.dark-mode h1 {
    color: #ffffff;
}

body.dark-mode a:hover {
    color: #fff;
}

body.dark-mode .list-component {
    border-left: 1px solid #555;
}

body.dark-mode .__item {
    background: none;
}

body.dark-mode .hamburger {
    color: white;
}

/* projects list */

#repos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.repo {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.repo:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.repo h3 {
    margin-top: 0;
    font-size: 1.2em;
}

.repo h3 a {
    text-decoration: none;
    color: #0366d6;
}

.repo p {
    font-size: 0.95em;
    color: #555;
    margin: 8px 0 12px;
}

.repo small {
    display: flex;
    align-items: center;
    font-size: 0.8em;
    color: #666;
}

.lang-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}


/* screen adjustments */
@media (max-width: 950px) {
    .cv-preview {
        display: none;
    }

    .card-component {
        border: 1px solid gray;
        border-radius: 5px;
        padding: 1em;
        max-width: 65vw;
        min-width: 275px;
        font-family: Arial;
        position: relative;
        bottom: 20px;
    }

    .cv-button {
        background-color: #eaeaea;
        color: rgb(0, 0, 0);
        padding: 5%;
        width: 90%;
        margin-left: 25%;
        text-decoration: none;
        border-radius: 6px;
        font-weight: 600;
        transition: background-color 0.3s ease;
        text-align: center;
    }

}

@media (max-width: 800px) {
    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 1rem;
        position: relative;
    }

    .project-image {
        display: none;
    }

    .cv-button:hover {
        background-color: #555;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 1rem;
        gap: 0.75rem;
        justify-content: center;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        flex: 1 1 calc(33.33% - 1rem);
        max-width: calc(33.33% - 1rem);
        box-sizing: border-box;
        text-align: center;
        margin-bottom: 1rem;
    }

    .nav-links a,
    .nav-links button {
        display: block;
        width: 100%;
        height: 100%;
        padding: 1rem;
        font-size: 1rem;
        background-color: black;
        border: none;
        text-decoration: none;
        color: #000000;
        border-radius: 6px;
        transition: background-color 0.2s ease, color 0.2s ease;
        background-color: #000000;
    }

    .nav-links a:hover,
    .nav-links button:hover {
        background-color: #ddd;
        color: black;
    }

    /* dark mode nav on smaller screen */

    body.dark-mode .nav-links a,
    body.dark-mode .nav-links button {
        color: #ffffff;
        background-color: #393939;
    }


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

    .headshot {
        margin: 2rem 0;
        max-width: 80vw;
        display: none;
    }

    .main-text {
        padding: 1rem;
    }

    .projects,
    .blog {
        padding: 1rem;
        margin: 1rem 0;
    }

    .about-text {
        font-size: medium;
        line-height: 2em;
    }

    p {
        font-size: small;
        line-height: 2em;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 1rem;
        position: relative;
    }

    .hamburger {
        display: block;
        font-size: 2rem;
        background: none;
        border: none;
        cursor: pointer;
    }

    .nav-links {
        display: none;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        margin-top: 1rem;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        flex: 1 1 calc(33.33% - 1rem);
        max-width: calc(33.33% - 1rem);
        box-sizing: border-box;
        text-align: center;
    }

    .nav-links a,
    .nav-links button {
        display: block;
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        background-color: #ddd;
        border: none;
        text-decoration: none;
        color: #333;
        border-radius: 6px;
        transition: background-color 0.2s ease;
    }

    .nav-links button {
        padding: 0.5rem;
    }

    .nav-links a:hover,
    .nav-links button:hover {
        background-color: #ddd;
    }

    .dark-mode-toggle img {
        width: 2rem;
        height: 2rem;
    }

    .github-button {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background-color: #f5f5f5;
        border: 1px solid #ccc;
        border-radius: 6px;
        text-decoration: none;
        color: #333;
        margin-left: 2vw;
        font-weight: 500;
        font-size: x-large;
        transition: background-color 0.3s ease, color 0.3s ease;
        width: 95%;
        display: flex;
        justify-content: center;
        /* Horizontal */
        align-items: center;
        /* Vertical */
        height: 7.5vh;
    }

    .github-button img {
        height: 2rem;
        width: auto;
    }

}