/* Reset default margins and paddings */
*, html {
    scroll-behavior: smooth !important; /* This is a CSS way to enable smooth scrolling */
  }

.error { color: red; display: none; }

#headshot {
    width: 90%;
}

#top {
    height:0px;
    color: floralwhite;
    z-index: -1;
    position: absolute;
}

aside{
    width:30%;
    float:left;
}

/* Style for the Back to Top button */
.back-to-top-btn {
    position: fixed;
    bottom: 50px;  /* Distance from the bottom */
    right: 20px;   /* Distance from the right */
    background-color: darksalmon;
    color: darkslategray;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 2em;
    display: none;  /* Initially hidden */
    align-items: center;
    text-align:center;
    justify-content: center;
    cursor: pointer;
    padding:0.4em;
  }
  
  .back-to-top-btn:hover {
    background-color: #0056b3;
  }  

/* Set up the container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Style the header */
header {
    color: white;
    padding: 1rem;
    border-bottom: 0.1em dashed darksalmon;
    background-color: antiquewhite;
}

.list {
    padding-left: 2rem;
    margin-top:0;
}

nav ul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-height:500px;
    opacity:1;
    visibility: visible;
    margin:0;
}

td{
    padding-right:2em;
}
tr{
    border-bottom: 1px solid black;
}

nav ul li {
    margin-right: 20px;
    list-style-type: none;
    font-size:1.4em;
    font-weight:bold;
}

nav ul a {
    color: darkslategray;
    text-decoration: none;
    transition: color 0.3s ease; /* Smooth transition for transform property */
    font-size:1.2em;
}

a{
    color: darkslategray;
    transition: color 0.3s ease;
}

nav ul a:hover,a:hover {
    color:darksalmon;
  }

ul img {
    width: 25%;
}

h4,h3 {
    margin-bottom:0px;
}

h4 {
    text-decoration: underline;
}

/* Style the main content area */
main {
    padding: 2rem 0;
    padding-top:0;
    margin:2.5em;
    margin-top:0;
    font-family: system-ui;
    color: darkslategray;
}

body {
    background-size: auto; /* Adjust image size */
    background-blend-mode: overlay; /* Blend image with a color */
    background-color: floralwhite; /* Add transparency with black background (50% opacity) */
}

#homepage {
    width:30%;
    float:right;
    padding-bottom:2em;
    padding-top:2em;
}

h3{
    font-size: 1.8em;
}

h1{
    font-size: 2em;
}

hr {
    clear:both;
    border: 0.1em dashed darkslategray;
}

#left {
    width:100%;
    float:left;
}

#lefthome {
    width:70%;
    float:left;
}

#left p {
    width:90%;
}

/* Add some basic styling for buttons */
button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

nav {
    font-family: "Handlee", system-ui, serif;
    font-weight: 400;
    font-style: normal;
  }

  nav button {
    font-family: "Handlee", system-ui, serif;
    font-weight: 800;
    font-style: normal;
  }

  html, body {
    height: 100%; /* Ensure full height of the viewport */
    margin: 0; /* Remove default margin */
    display: flex; /* Make the body a flex container */
    flex-direction: column; /* Stack children (content and footer) vertically */
  }

main {
    flex: 1; /* This makes the content section take up all available space */
  }

  footer {
    color: darkslategray; /* Text color */
    width: 100%; /* Ensure it stretches across the width */
    font-family:system-ui;
    text-align: left;
    padding-bottom: 10px;
  }

/* Hamburger button for mobile */
.hamburger {
    display: none; /* Hide by default */
    font-size: 2em;
    background: none;
    border: none;
    color: darkslategray;
    cursor: pointer;
    padding: 0;
    float:left;
}

.mobileLogo {
    display:none;
}

.desktopLogo {

}

  /* Mobile-specific styles */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 10px; /* Adjust padding on smaller screens */
    }

.nav-menu{
    pointer-events:none;
}

form {
    width: 90%
}

#headshot {
    width: 80%;
    margin-left:auto;
    margin-right:auto;
}

aside{
    width:100%;
    float:none;
    text-align: center;
}

.mobileLogo {
    width: 50%;
    float: right;
    display: inline;
    padding-bottom:1.1em;
}

a .footerright{
    font-family: "Handlee", system-ui, serif;
    color: darkslategray;
}

.desktopLogo {
    display:none;
}

    header {
        padding: 1rem 0.5rem; /* Adjust header padding */
        padding-bottom:0;
    }

    nav ul {
        display: flex; /* Hidden by default */
        flex-direction: column;
        max-height: 0; /* No height by default */
        width: 100%;
        padding: 0;
        text-align: center;
        margin-top: 1rem;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease; /* Smooth transition */
    }

   /* nav ul {
        display: flex; /* Always use flexbox layout for navigation */
        /*flex-direction: column; /* Stack nav items vertically */
        /*width: 100%; /* Full width */
        /*padding: 0;
        text-align: center;
        margin-top: 1rem;
        opacity: 0; /* Start hidden */
        /*transform: translateY(-20px); /* Start offscreen */
        /*visibility: hidden; /* Keep it invisible initially */
    /*}*/

    .hamburger {
        display: block; /* Show the hamburger button on small screens */
    }

    nav ul li {
        width: 100%; /* Each list item should take full width */
        text-align: center; /* Center the text in each nav item */
        font-size: 1.2em; /* Reduce font size for mobile */
        margin-right:auto;
        margin-left:auto;
    }

    nav ul a {
        display: block; /* Make the link a block-level element so it takes up full width */
        padding: 1rem; /* Add some padding for easier clickability */
        color: darkslategray;
        text-decoration: none;
        transition: color 0.3s ease;
        border-top: 1px dashed darkslategray;
    }

    nav ul a:hover {
        color: darksalmon; /* Change color on hover */
    }

    ul img {
        width: 50%; /* Make images smaller on mobile */
        margin: 0 auto; /* Center images */
    }

    main {
        margin: 1.5em 0; /* Reduce margin around main content */
        margin-top:0;
        padding: 1rem; /* Adjust padding */
    }

    h1 {
        font-size: 2em; /* Adjust heading size */
    }

    h3 {
        font-size: 1.4em; /* Adjust subheading size */
    }

    #homepage {
        width: 100%; /* Make homepage section take full width */
        float: none; /* Remove float */
        padding-bottom: 1.5em; /* Adjust padding */
    }

    #left, #lefthome {
        width: 100%; /* Make left section take full width */
        float: none; /* Remove float */
        margin-bottom: 1.5em; /* Add some space below */
    }

    #left p {
        width: 100%; /* Make paragraphs full width */
    }

    footer {
        font-size: 0.9em; /* Reduce font size for footer */
    }

    body{
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }
}

/* Extra mobile-specific adjustments (for very small screens) */
@media screen and (max-width: 480px) {
    h1 {
        font-size: 1.8em; /* Further reduce heading size */
    }

    h3 {
        font-size: 1.2em; /* Further reduce subheading size */
    }

    nav ul {
        padding-left: 0; /* Remove any unnecessary padding */
    }

    form {
        width: 90%;
    }

    button {
        padding: 8px 16px; /* Reduce button size */
    }

    #headshot {
        width: 80%;
        margin-left:auto;
        margin-right:auto;
    }
    
    aside{
        width:100%;
        float:none;
        text-align: center;
    }
}

/* Toggle menu visibility */
.nav-menu.active {
    opacity: 1; /* Make the menu fully visible */
    transform: translateY(0); /* Slide into view */
    visibility: visible; /* Make it visible */
    height:auto;
    max-height: 500px; /* Large enough value to accommodate the menu */
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease; /* No delay for visibility */
}