#theme-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    cursor: pointer;
    
    width: 45px;
    height: 45px;
    border-radius: 10px;
    opacity: 0.77;
    font-size: 17px;
 
    color: var(--nav-textcolor);
    background-color: var(--nav-backcolor);
}

body {
    /*contents fonts*/
    font-family: 'Noto Serif', serif;
    font-weight: 400;

    margin: 0px;
    padding-top: 60px;

    display: flex;
    flex-direction: column;
    min-height: 100vh;

    color: var(--text-color);
    background-color: var(--back-color);
}

/*Add color variables for mode*/
:root { /* Default: light */
    --back-color: white;
    --text-color: black;
    --nav-backcolor: black;
    --nav-textcolor: white;
}

body.dark { /* dark */
    --text-color: #c9d1d9;
    --back-color: #0d1117;
    --nav-backcolor: #2C3035;
    --nav-textcolor: #e8edf2;
}


/*title fonts*/
h1, h2, h3, h4, .logo, nav a {
    font-family: 'Playfair Display', Georgia, serif;
}

/*navigation bar*/

* {
    box-sizing: border-box;
}   

nav {
    background-color: var(--nav-backcolor);
    color: var(--nav-textcolor);

    font-family: 'Playfair Display', serif;
    font-size: 20px;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 9999;

    /*flexbox*/
    display: flex;
    justify-content:space-between;
    align-items: center;
    padding: 0 20px;
}

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

nav a:hover {
  text-decoration: underline;
}

nav div {
    display: flex;
    gap: 18px;
}

.logo {
    font-size: 30px;
    font-weight: bold;
}

/*In common*/

main {
    margin: 40px;

    display: flex;
    gap: 50px;
    padding-left: 30px;
    padding-right: 30px;

    flex: 1;
}

.left {  

    flex-direction: column;
    display: flex;
    padding: 10px;
    width: 40%;
    height: fit-content;

   /*fix left*/
    position: sticky;
    top: 100px;
    height: calc(100vh - 235px);
}

.right {
    display: flex;

    flex-direction: column;
    width: 60%;

    padding-top: 50px;
    padding-left: 60px;
    padding-bottom: 150px;

}

/* add divider line */
.left::after {
  content: "";
  position: absolute;
  top: 80px; 
  bottom: 10px;
  right: -25px; 
  width: 1px;
  background-color: var(--text-color);
}

.Edu, .Org, .project, .skillblock {
    border-top: 1px solid var(--text-color);
    padding: 20px;

    padding-top: 30px;
    margin-bottom: 10px;
}

footer {
    background-color: var(--nav-backcolor);
    color: var(--nav-textcolor);
    text-align: center;
    padding: 10px;
    margin-top: 30px;
}

footer p {
    color: var(--nav-textcolor);
    text-decoration: none;
    font-weight: 100;
    font-size: 12px;
}

/*home*/

.left img {
    width: 150px;
    height: 200px;
    object-fit: cover; 
    border-radius: 8px;
    margin-right: 10px;
    margin-bottom: 20px;
}

.top {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 20px;

    margin-top: 18px;
}

.top p {
    line-height: 1.0;
    margin: 4px 0;
}

/*projects*/

.project {
    margin-bottom: 10px;
}

.project a { /*used for github*/
    color: var(--text-color);
    text-decoration: none;
}

.project a:hover {
    text-decoration: underline;
}

.filter-btn:hover {
  text-decoration: underline;
}

.filter-btn {
  background: none;
  border: none;
  cursor: pointer;

  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: bold;

  color: var(--text-color);
}


.filter-container {
  text-align: center;
  display: flex;
  justify-content: space-between;

  position: sticky;
  top: 70px;
  background-color: var(--back-color);
  z-index: 100;
  padding: 20px 20px 20px 20px;

  border-bottom: 1.5px solid var(--text-color);
}


/*skills*/

.skill-align {
    display: flex;
    gap: 10px;
}

.skillblock {
    width: 50%;
    padding-left: 20px;
    padding-bottom: 10px;
}

h4 {
    margin: 0 0 10px 0; 
}

/*contact*/

form {
    padding-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

input {
    font-family: 'Noto Serif', serif;
    color: var(--text-color);
}

textarea {
    font-family: 'Noto Serif', serif;
    height: 150px;
    resize: vertical;
    border: 1px solid var(--text-color);
}

body.dark input, 
body.dark textarea {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid var(--text-color);
}

body.dark button[type="submit"] {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

/*github*/
.left .github-profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 10px;
}

.github-profile-top {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.github-profile-top div {
    display: flex;
    flex-direction: column;
}

.github-profile-top p {
    margin: 2px 0;
}


/*reactive*/

@media ((min-width: 481px) and (max-width: 768px)) {
    main {
        flex-direction: column;
        margin: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }
    .left {
        width: 100%;
        position: static; 
        margin-top: 70px;
        height: auto;
    }
    .top{
        margin-top: 20px;
    } /*right panel goes under the left panel*/
    .right {
        position: static; 
        width: 100%;
        padding-left: 10px;
        background-color: var(--back-color);
    }
    .skill-align {
        flex-direction: column;
    }
    .skillblock {
        width: 100%;
    }

    .left::after{
        display: none; /*hide divider*/
    }
}

@media (max-width: 480px) {
    main {
        flex-direction: column;
        margin: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 10px 20px;
    }

    .left {
        width: 100%;
        position: static; 
        margin-top: 70px;
        height: auto;
    }
    .top{
        margin-top: 20px;
    }
    .right { /*right panel goes under the left panel*/
        position: static; 
        width: 100%;
        padding-left: 10px;
        background-color: var(--back-color);
    }
    .skill-align {
        flex-direction: column;
    }
    .skillblock {
        width: 100%;
    }

    .filter-container {
        justify-content: center;
        top: 80px;
        padding: 10px 0;
        gap: 20px;
    }


    .left::after {
        display: none; /*hide divider*/
    }
}