* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body {
    font-family: 'Onest', 'Lucida Sans Unicode', sans-serif;
    background-color: #8aadac;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

#theme-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

#theme-toggle img {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  border: none;
}

#theme-toggle img:hover {
  transform: scale(1.1);
}

main {
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 10%;
    margin-right: 10%;
}

header {
    text-align: center;
    background-color: #c5e2df;
    margin-bottom: 1.5em;
}

h1 {
  color: #3d716c;
  padding-top: 1em;
  padding-bottom: 1em;
  font-size: 45px;
}

h2 {
    color: #3d716c;
    margin-top: 1em;
    margin-bottom: 1em;
    font-size: 35px;
}

h3 {
    color: white;
    margin-top: 1em;
    margin-bottom: 1em;
    font-size: 25px;
}

p {
    color: white;
    margin-top: 2em;
    margin-bottom: 2em;
    font-size: 20px;
}

li {
    display: inline;
}

li a {
    text-decoration: none;
    color: white;
    font-size: 1.2em;
    padding: 1em;
}

li a:hover {
    background-color: #c5e2df;
}

ul {
    list-style-type: none;
    background-color: #3d716c;
    overflow: hidden;
    padding: 0.5em;
}

nav {
  position: sticky;
  top: 0;
}

img {
    max-height: 250px;
    max-width: 400px;
    border-radius: 15%;
    border: 3px solid white;
    margin-top: 0em;
    margin-bottom: 1em;
    margin-left: 2em;
    margin-right: 2em;
}

.portfolio-img {
    border-radius: 5%;
    max-height: 300px; 
    margin-top: 0em;
    margin-bottom: 1em;
}

.portfolio-text {
    margin-left: 25%;
    margin-right: 25%;
}

.home-text {
    color: #3d716c;
}

.portfolio-description {
    margin-top: 0em;
    margin-bottom: 2em;
    margin-left: 25%;
    margin-right: 25%;
}

.navbar-github {
    float:right;
    width: 30px;
    margin: 0;
    margin-right: 2%;
    border: 0px;
    padding: none;
}

.footer {
    background-color: #c5e2df;
    padding: 10px; 
    margin: 0;
    border: 0;
    height: auto; 
}

.footer-text {
    color: #3d716c;
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: 20px;
}

::selection {
    background: #c5e2df;
    color: #3d716c;
}

.flex-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;     
    justify-content: center;
    gap: 1.5em;  
    padding: 1em;   
}

.flex-item {
    flex-basis: 100%;
    margin: 0.75em;
    flex: 1 1 250px;
    max-width: 300px;
    height: auto;
    text-align: center;
}

.flex-item img {
    width: 100%;     
    height: 200px;
    border-radius: 5%;
    object-fit: cover;
    transition: transform 0.3s ease; 
}

.flex-item img:hover {
    transform: scale(1.05);
    cursor: pointer;
}

@media screen and (max-width: 850px) {
  .flex-container {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
  }
}

.portfolio-img {
  border-radius: 5%;
  border: 3px solid white;
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-img:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.grid-title {
  color: #3d716c;
  margin-top: 2em;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1em;
  margin: 2em 10%;
  background-color: #3d716c;
  padding: 1em;
  border-radius: 10px;
}

.grid-item {
  background-color: #c5e2df;
  color: #3d716c;
  padding: 1em;
  border-radius: 10px;
  font-weight: bold;
}

#coding-time {
    color: #3d716c;
    font-size: 20px;
    margin-top: 2em;
}