
/* General */
html, body {
    height: auto;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* global offset for browsers that support it */
    scroll-padding-top: var(--header-h);
}

main {
    flex: 1;
}

body {
    display: flex;
    background-color: white;
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    flex-direction: column;
    min-height: 100vh;
}

p {
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Lato', sans-serif;
}

h2 {
    font-size: 30px;
}

.indented {
    padding-left: 40px;
    text-align: justify;
}

.indented2 {
    padding-left: 80px;
    text-align: justify;
}

.two-col-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.column {
    flex: 1; /* Makes each column take up equal space */
    padding: 20px;
    display: flex;
    flex-direction: column; /* Stacks content vertically */
    justify-content: center; /* Centers vertically */
    align-items: center;     /* Centers horizontally */
}

.column.content-left {
    align-items: flex-start;
    text-align: left;
}

/* Avatar — make it a square and clip the image */
.avatar {
    width: 350px;              /* pick your size (desktop) */
    aspect-ratio: 1 / 1;       /* keeps it perfectly square */
    /* If you prefer without aspect-ratio, use: height: 220px; */
    overflow: hidden;
    border-radius: 50%;
    margin-top: 50px;
    border: 3px solid rgba(255,255,255,.85);
    box-shadow: 0 6px 24px rgba(0,0,0,.15);
}

.avatar img {
    width: 100%;
    height: 100%;
    display: block;            /* removes inline-gap */
    object-fit: cover;         /* crops nicely into the circle */
    object-position: center;   /* keep face centered if off-axis */
}
.column p {
    justify-content: left;
}

.container {
    width: 87.5%;
    margin: 0 auto;
    overflow: hidden;
    text-align: justify;
}

.container h2 {
    text-align: left;
    margin-bottom: 20px;
    font-size: 28px;
}

.content {
    display: flex;
}

.title-container {
    width: 100%;
    background-color: #eeeeee;
    color: black;
    padding: 20px 0;
}

.title-text {
    width: 87.5%;
    text-align: center;
    margin: 0 auto;
    font-weight: bold;
}

.wrapper {
    padding: 20px 0;
    min-height: 100%;
}

.footer {
    background: #201e43;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 16px;
    margin-top: auto;
}

.footer p {
    margin-top: 5px;
    margin-bottom: 2px;
}

.pdf {
    width: 100%;
    height: 100vh;
    border: none;
}

/**********************************************************************************************************/

/* Header */
/** Info **/
header {
    width: 100%;
    background-color: #201e43;
    padding: 25px 0;
    z-index: 1000;
}

.header-container {
    width: 87.5%;
    display: flex;
    margin: 0 auto;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    color: white; /* Text color */
    flex: 1;
}

.header-info h1 {
    margin: 0;
    font-size: 40px;
}

.header-info p {
    margin: 0;
    font-size: 19px;
}

/** Navigation Bar **/
.header-nav {
    align-items: right;
}

.nav-menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
    display: flex;
}

.nav-menu li {
    margin-left: 20px; /* Space between nav items */
}

.nav-menu li a {
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 115px; /* Equal width for each nav item */
    height: 50px; /* Height of the nav item boxes */
    background-color: white; /* Background color of the boxes */
    color: black; /* Nav link color */
    text-decoration: none; /* Remove underline */
    border-radius: 10px; /* Rounded corners */
    transition: background-color 0.3s, border-radius 0.3s; /* Smooth transition */
}

.nav-menu li a:hover {
    color: white !important;
    background-color: #508c9b;
    transform: translateY(3px);
    border-radius: 15px;
}

.nav-menu li a:visited {
    color: inherit;
}

.nav-menu li a.active {
    background-color: #508c9b;
    color: white;
    font-weight: bold;
}

/** Search Bar **/
.header-search {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.header-search form {
    display: flex;
}

.header-search input[type="text"] {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 20px 0 0 20px;
    outline: none;
}

.header-search button {
    background-color: white;
    color: black;
    border: none;
    padding: 6px 10px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
}

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

/**********************************************************************************************************/

/* Links */
a {
    color: black;
    display: inline;
}

a:visited {
    color: black; /* Ensures visited links remain black */
}

a:hover {
    color: white;
    background-color: #508c9b;
}

a:active {
    color: black; /* Ensures links remain black when clicked */
}

/**********************************************************************************************************/

/* Clickable icons */
/** In the header **/
.icon-link-header {
    text-decoration: none; /* Remove underline */
    display: inline-flex; /* Use inline-flex for better control */
    align-items: center; /* Center the icon vertically */
    justify-content: center; /* Center the icon horizontally */
}

.icon-link-header:hover {
    outline: none; /* Remove any outline or border on the link itself */
    background-color: transparent; /* Ensure no background color appears on hover */
}

.icon-link-header i {
    color: white; /* Initial color of the icon */
    transition: color 0.3s ease; /* Smooth transition for the color change */
}

.icon-link-header i:hover {
    color: #508c9b; /* Color of the icon on hover */
}

/** In the text **/
.icon-link {
    text-decoration: none; /* Remove underline */
    display: inline-flex; /* Use inline-flex for better control */
    align-items: center; /* Center the icon vertically */
    justify-content: center; /* Center the icon horizontally */
}

.icon-link:hover {
    outline: none; /* Remove any outline or border on the link itself */
    background-color: transparent; /* Ensure no background color appears on hover */
}

.icon-link i {
    color: black; /* Initial color of the icon */
    transition: color 0.3s ease; /* Smooth transition for the color change */
}

.icon-link i:hover {
    color: #508c9b; /* Color of the icon on hover */
}

/**********************************************************************************************************/

/* Buttons */
.button {
    border: none;
    color: white;
    padding: 16px 40px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 16px;
    margin: auto;
    margin-bottom: 15px;
    transition-duration: 0.4s;
    cursor: pointer;
    border-radius: 10px;
}

.button1 {
    background-color: white; 
    color: black; 
    border: 2px solid #201e43;
}

.button1:hover {
    background-color: #508c9b;
    color: white;
    font-weight: bold;
    transform: translateY(1px);
}

.button2 {
    background-color: white;
    color: black; 
    border: 2px solid #201e43;
}

.button2:hover {
    background-color: #508c9b;
    color: white;
    font-weight: bold;
    transform: translateY(1px);
}

/**********************************************************************************************************/

/* Blog posts */
.blog-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

/** Styling for each blog post box **/
.blog-post {
    background-color: white;
    border: 2px solid #b9b9b9;
    border-radius: 10px;
    width: 49%;
    text-align: center;
    transition-duration: 0.3s;
    box-sizing: border-box;
    padding: 20px;
    color: black;
    margin-bottom: 20px;
}

.blog-post a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Styling for titles */
.blog-post h3 {
    margin: 0 auto;
    font-size: 20px;
    font-weight: bold;
}

/* Styling for descriptions */
.blog-post p {
    text-align: justify;
}

/* Hover effect for blog post boxes */
.blog-post a:hover {
    transform: translateY(1px);
    color: white;
    background-color: #508c9b;
    border-radius: 10px;
    padding: 10px;
}

/**********************************************************************************************************/

/* Algorithms */
/** Box for algorithms **/
.pseudocode-box {
    border: 2px solid #000; /* Add a black border */
    background-color: #f4f4f4; /* Light gray background */
    padding: 15px 50px;
    border-radius: 10px;
    width: 50%;
    margin: auto;
}

.pseudocode-box ul {
    padding-left: 80px;
}

/* Algorithm titles */
.algorithm-title {
    font-size: 16px;
    font-weight: bold;
}

/**********************************************************************************************************/

/* Hamburger button styling */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: center;
    margin-top: 10px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: white;
}

/**********************************************************************************************************/

.math-container {
    overflow-x: auto;
    white-space: nowrap;
    max-width: 100%;
}

/**********************************************************************************************************/

.name a {
    text-decoration: none;
    color: white;
    background: transparent;
}

/* Change the color of the h3 on hover */
.name a:hover {
    color: #508c9b; /* Change this color to whatever you want */
}

/**********************************************************************************************************/

/* Styles for screens smaller than 950px */
@media only screen and (max-width: 950px){
    .images {
        max-width: 100%;
        height: auto;
    }

    .header-container {
        text-align: center;
    }

    .header-info h1 {
        font-size: 28px;
    }

    .header-info p {
        font-size: 15px;
    }

    .header-info .icons {
        font-size: 20px;
    }

    .title-text {
        font-size: 20px;
    }

    .footer {
        font-size: 15px;
    }

    .nav-toggle {
        margin: auto;
    }

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

    .two-col-container {
        flex-direction: column;
    }

    .avatar {
        width: 300px;
        aspect-ratio: 1 / 1;
    }

    .avatar img { 
        width: 100% !important; 
        height: 100% !important; 
    }

    /* Stack the text and the nav vertically */
    .header-container {
        flex-direction: column;
        align-items: center;
    }

    .nav-menu {
        display: none; /* Initially hide the menu on small screens */
        flex-direction: column; /* Ensure the nav items stack vertically */
        width: 100%;
        text-align: center;
    }

    .nav-menu.show {
        display: flex; /* Show menu when toggled */
    }

    .nav-menu li {
        margin: 0; /* Center navbar items */
        padding-top: 10px;
    }

    /* Blog posts */
    .blog-content {
        flex-direction: column;
        align-items: center;
    }

    .blog-post {
        width: 100%;
    }

    .hamburger {
        display: inline-block;
    }

    .bar {
        display: block;
    }

    /* Hamburger bar transition to "X" */
    .hamburger.change .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.change .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.change .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .pseudocode-box {
        width: 100%;
        box-sizing: border-box;
    }
    
    .pseudocode-box ul {
        padding-left: 10px;
    }

    .indented {
        padding-left: 20px;
    }
    
    .indented2 {
        padding-left: 40px;
    }
}

@media only screen and (max-width: 540px) {
    .footer p {
        font-size: 13px;
    }
}
