@font-face {
    font-family: 'IMFellEnglish';
    src: url('./fonts/IMFellEnglish.ttf') format('truetype');
}

@font-face {
    font-family: 'Dearest';
    src: url('./fonts/Dearest.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
}

@font-face {
    font-family: 'Primitive';
    src: url('./fonts/Primitive.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
}

@font-face {
    font-family: 'Rosecaps';
    src: url('./fonts/RoseCaps.woff2') format('woff2');
    font-style: normal;
    font-weight: 800;    
}

body {
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    min-height: 100vh;
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    background-color: #3b2716;
    background-image: url('parchment-bg.jpg');
    background-repeat: repeat;
    background-size: 256px;
    background-attachment: fixed;
    font-family: 'IMFellEnglish', serif;
    color: #f4e4bc;
    text-shadow: 1px 1px 2px var(--dark-vibrant-color);
    font-size: 16pt;
    cursor: url('https://perilous.dev/cursors/custom_knight_normal.png?r=0&g=255&b=0'), auto;
}


a {
    color: var(--vibrant-color) !important;
    cursor: url('https://perilous.dev/cursors/custom_knight_link.png?r=0&g=255&b=0'), auto;
}

.middle-column {
    display: flex;
    justify-content: center; /* Center horizontally inside the middle column */
    align-items: center; /* Center vertically inside the middle column */
    flex-direction: column; /* Stack children vertically */
    width: 70%; /* Adjust this as necessary for your design */
    min-height: 80vh; /* Adjust or remove depending on your content's needs */
    margin: auto; /* Center the column horizontally on the page */
    padding: 20px;
    background-color: transparent;
    position: relative; /* Positioning context for any absolutely positioned children */
    /* border: burlywood;
    border-style: groove;
    border-width: 7px; */
}

.scroll {
    width: 100%; /* Take full width of the middle column */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    background-color: var(--dark-muted-color);
    color: var(--light-vibrant-color);
    font-family: 'IMFellEnglish', serif;
    box-sizing: border-box; /* Include padding and border in the width */
    border: var(--dark-vibrant-color);
    border-style: groove;
    border-width: 7px;
    contain: layout content;
    position: relative;
    overflow: hidden;
    background-image: url("https://www.transparenttextures.com/patterns/rough-cloth.png");
}

@media only screen and (max-width: 600px) {
    .middle-column {
        width: 100%;
        padding: 10px;
    }

    .scroll {
        padding: 10px;
    }
}

.gallery-item {
    flex: 1 1 calc(25%); /* Adjust the number of items per row */
    box-sizing: border-box;
    padding: 10px;
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    max-height: 100vh;
    border-radius: 10px;
    margin-left: auto;
    margin-right: auto;
    display: inherit;
}

.gallery {
    display: inline;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    width: 95vw;
    mix-blend-mode: none;
    align-items: center;
}

.byline{
    margin-top: 1rem;
    display: block;
}

.nav-button {
    background-color: #645244;
    color: #f4e4bc;
    font-size: 20px;
    padding: 10px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-family: 'Primitive';
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border-radius: 5px;
    cursor: url('https://perilous.dev/cursors/custom_knight_link.png?r=0&g=255&b=0'), auto;
}

.popup{
    overflow: scroll;
}

.dropdown {
    position: relative;
    display: inherit;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--dark-muted-color);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    top: 100%; /* Position the dropdown below the button */
    left: 0;
}
.dropdown-content a {
    color: #f4e4bc;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.dropdown-content a:hover {
    background-color: var(--muted-color);
    text-decoration: underline;
    cursor: url('https://perilous.dev/cursors/custom_knight_link.png?r=0&g=255&b=0'), auto;
}
.dropdown:hover .dropdown-content {
    display: block;
    cursor: url('https://perilous.dev/cursors/custom_knight_link.png?r=0&g=255&b=0'), auto;
}
.dropdown:hover .menu-link {
    background-color: var(--dark-muted-color);
    cursor: url('https://perilous.dev/cursors/custom_knight_link.png?r=0&g=255&b=0'), auto;
}

nav {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-content: flex-start;
}

/* Popup Styling */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background-color: var(--light-muted-color);
    color: #000000;
    border: 2px groove var(--dark-vibrant-color);
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 2;
    max-height: 80%;
    overflow: auto;
  }
  
  /* Display popup when targeted */
  .popup:target {
    display: block;
  }
  
  /* Display popup when active class is added via JavaScript */
  .popup.active {
    display: block;
  }
  
  /* Close button styling */
  .close-popup {
    display: block;
    text-align: right;
    float: right;
  }
  
  /* Corrected CSS syntax error (removed 'groove') */
  .close-popup a {
    color: #000000;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5em;
  }
  
  .close-popup a:hover {
    color: var(--vibrant-color);
  }
  

header{
    display: flex;
}

.titlebar {
    width: 100%; /* Ensure it fills the middle column */
    /* background-color: #645244; */
    /* color: #f4e4bc; */
    /* padding: 10px; */
    /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); Add shadow for depth */
    /* border: 1px solid #decba4; Subtle border */
    margin: 20px;
}

.menu-link {
    color: #f4e4bc;
    text-decoration: none;
    margin: 10px;
    font-size: 18px;
    box-sizing: border-box; /* Include padding and border in the width */
    border: var(--muted-color);
    border-style: groove;
    border-width: 7px;
    cursor: url('https://perilous.dev/cursors/custom_knight_link.png?r=0&g=255&b=0'), auto;
}

.menu-link:hover {
    color: var(--light-vibrant-color);
    text-decoration: underline;
    cursor: url('https://perilous.dev/cursors/custom_knight_link.png?r=0&g=255&b=0'), auto;
}

p:hover, h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover{
    cursor: url('https://perilous.dev/cursors/custom_knight_text.png?r=0&g=255&b=0'), text;
}


h1 {
    font-size: 36pt;
    margin-top: 1rem;
    margin-bottom: .1em;
}

h2, h3, h4 {
    margin-bottom: 0rem;
}
/* should be to the bottom right of it's parent */
.border-art{
    position: absolute;
    right: -5rem;
    bottom: -5rem;
    mix-blend-mode: soft-light;
    display: none;
    pointer-events: none;
}

.scroll p img{
    max-width: 100%;
    height: auto;
    max-height: 100vh;
    border-radius: 10px;
    margin-left: auto;
    margin-right: auto;
    display: inherit;
}

.nav-button, .button, .menu-link {
    /* background-color: var(--muted-color); */
    background-color: rgb(55, 50, 45);
    color: var(--muted-color);
    padding: 10px 20px;
    box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.3), inset -1px -1px 2px rgba(0, 0, 0, 0.4); /* Simulate a beveled look */
    font-family: 'Primitive', serif;
    box-sizing: border-box; /* Include padding and border in the width */
    border: var(--dark-vibrant-color);
    border-style: groove;
    border-width: 7px;
    cursor: pointer;
}



.scroll > p:first-of-type, .scroll > main > section > p:first-of-type{
    display: flow-root;
}

.scroll > p:first-of-type::first-letter, main> section:first-of-type > p:first-of-type::first-letter 
{
    font-family: 'Rosecaps', serif;
    color: var(--dark-vibrant-color);
    border: white;
    border-width: 0.0625rem; /* 1px equivalent */
    float: left;
    font-size: 4.6875rem; /* 75px equivalent */
    line-height: 4rem;
    padding-top: 0.25rem; /* 4px equivalent */
    padding-right: 0.5rem; /* 8px equivalent */
    text-shadow: 1px 1px 1px var(--light-vibrant-color);
    text-size-adjust: none;
    font-style: normal;
}


.comment-section {
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.form-group {
    margin-bottom: 1rem;
    width: 80%;
    color: var(--light-vibrant-color);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background: var(--light-vibrant-color);
    border: 1px solid #3b2716;
    border-radius: 4px;
    color: #3b2716;
}

#comment-form h2 {
    margin-bottom: 1.5rem;
    color: var(--light-vibrant-color);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

#comment-form button {
    background: var(--dark-vibrant-color);
    color: var(--light-vibrant-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}


#comment-form button:hover {
    background: var(--vibrant-color);
}

#comment-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--dark-muted-color);
    border: var(--dark-vibrant-color);
    border-style: groove;
    border-width: 7px;
    padding: 1rem;
    width: 50%;
    background-image: url("https://www.transparenttextures.com/patterns/rough-cloth.png");
}

#comment-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
}

#comment-status.success {
    background: rgba(0, 255, 0, 0.1);
    color: #90EE90;
}

#comment-status.error {
    background: rgba(255, 0, 0, 0.1);
    color: #FFB6C1;
}

#comment-form button {
    font-family: 'Primitive', serif;
    font-size: 1.5rem;
}



/* Titlebar responsive stuff */
@media only screen and (max-width: 600px) {
    .titlebar {
        margin: 10px;
    }

    .menu-link {
        margin: 5px;
        font-size: 16px;
    }

    main {
        padding-right: 0rem;
        padding-bottom: 0rem;
    }

    .border-art {
        display: none;
    }

    #comment-form {
        width: 90%;
    }
} /* Close the small screen media query here */

/* For large screens */
@media (min-width: 1350px) {
    .border-art {
        display: inline-block;
        object-fit: cover;
        height: max-content;
        width: -moz-available;
        width: -webkit-fill-available;

    }

    main {
        padding-right: 12rem;
        padding-bottom: 12rem;
    }
}

