
:root {
   --blue-1: #dbebf8;
   --blue-2: #50a6d9;
   --blue-3: #4a93f1;
   --blue-4: #020f55;
   --blue-5: #01032c;
   --italic-gray: #7a7a7a;
}

body {
   background-color: #000000;
   background-size: cover;
   background-attachment: fixed;
   font-family: 'Roboto', sans-serif;
}

a {
   text-decoration: none;
   color: #000000;
   font-weight: bold;
}

.name {
   font-size: 3.0em;
   font-family: 'Trocchi', serif;
   font-weight: normal;
   height: 70px;
   text-align: center;
   padding-bottom: 30px;
   padding-top: 30px;
   margin: 0;
}

.download {
   font-style: italic;
   font-size: 115%;
}

.download span {
   font-size: 250%;
}

.h {
   font-size: 1.2em;
}

@media (min-width: 500px) {
   .name {
      font-size: 3.75em;
   }
}

.text-box {
   width: 75%;
   padding-top: 25px;
   padding-bottom: 25px;
   margin-left: auto;
   margin-right: auto;
}

@media (max-width: 800px) {
   .text-box {
      width: 87.5%;
   }
}

#main {
   margin: 50px auto;
   border-radius: 25px;
   width: 80%;
}

@media (max-width: 800px) {
   #main {
      margin-top: 0;
      width: 100%;
   }
}

.box {
   min-height: 300px;
   background-color: #fff;
   border-radius: 25px;
   margin-bottom: 25px;
}
.box:nth-child(1) {
   min-height: 150px;
}

.box:nth-child(1) .text-box {
   text-align: center
}

li:not(:last-child) {
   padding-bottom: 10px;
}

b {
   font-size: 120%
}

i {
   font-size: 100%;
   color: var(--italic-gray);
}

h3 i {
   font-size: 80%;
   font-weight: normal;
   color: var(--italic-gray);
}

/*
Styles for Projects section
*/

.projects-container {
   display: flex;
   flex-wrap: wrap;
   gap: 16px;
   padding-bottom: 24px;
}

.project {
   flex: 0 0 calc(33.33% - 43px); /* 33.33% width for three items per row, minus some margin */
   display: flex;
   flex-direction: column;
   gap: 8px;
   max-height: 468px;
   border-radius: 16px;
   background-color: var(--blue-1);
   transition: 0.2s;
   padding: 16px;
}

.project:hover {
   background-color: color-mix(in srgb, var(--blue-1) 85%, var(--blue-3) 15%);
}

/* For smaller window widths, convert to a 2 or 1 item per row format */
@media (max-width: 2000px) {
   .project {
      flex: 0 0 calc(50% - 40px);
   }
}
@media (max-width: 1300px) {
   .project {
      flex: 0 0 calc(100% - 32px);
   }
}

.project h2 {
   text-align: center;
   margin: 0;
}

.project p {
   text-align: justify;
   margin: 0;
}

.project img {
   max-width: 100%; /* Ensure the image doesn't exceed the parent's width */
   max-height: 100%; /* Allow the image to take its natural height within the constraints */
   min-height: 0; /* Critical for it to not overflow the div sometimes */
   margin: auto;
   object-fit: contain;
   width: 100%;
}

/*
Styles for section menu
 */

#menu {
   display: block;
   position: fixed;
   bottom: 25px;
   right: 25px;
   z-index: 98;

   min-width: 55px;
   min-height: 47px;

   background: var(--blue-1);
   border-radius: 15px;

   transition: 0.25s;
}

#menu.opened {
   transition: 0.25s;
   min-width: 190px;
   min-height: 230px;
   padding: 16px;
}

#menu-content {
   display: none;
   opacity: 0;
}

#menu-content.opened {
   animation: menuFade 0.25s;
   display: block;
   opacity: 1;
}

@keyframes menuFade {
   0% {
      display: block;
      opacity: 0;
   }
   100% {
      opacity: 1;
   }
}

#menu-content span {
   font-size: 1.2em;
   font-weight: bold;
   display: block;
   padding-bottom: 10px;
}

#menu-content ul {
   list-style-type: none; /* Remove bullets */
   padding: 0;
   margin: 0;
}

#menu-button {
   cursor: pointer;
   position: fixed;
   bottom: 29px;
   right: 35px;
   z-index: 99;
}

#menu-button-bar-1,
#menu-button-bar-2,
#menu-button-bar-3 {
   width: 35px;
   height: 5px;
   background-color: #333;
   margin: 6px 0;
   transition: 0.4s;
}

.menu-button-transformed #menu-button-bar-1 {
   transform: translate(0, 11px) rotate(-45deg);
}

.menu-button-transformed #menu-button-bar-2 {
   opacity: 0;
}

.menu-button-transformed #menu-button-bar-3 {
   transform: translate(0, -11px) rotate(45deg);
}

/*
Styles for the background
 */

#background {
   z-index: -1;
   position: fixed;
}

#background .grid {
   background: url("hexagon-grid.svg") repeat;
   position: fixed;
   left: 0;
   top: 0;
   min-height: 100%;
   min-width: 100%;
}

#background .effect {
   position: fixed;
   /* Start offscreen in case mouse events never arrive */
   left: -15em;
   top: -15em;
   transform: translate(-50%, -50%);
   width: 15em;
   height: 15em;
   border-radius: 15em;
   filter: blur(15px);
   background: radial-gradient(var(--blue-2), var(--blue-3),
               var(--blue-4), var(--blue-5));
   z-index: -2;
}


