@font-face {
    font-family: 'JetBrainsMono';
    src: url("/font/JetBrainsMono/JetBrainsMonoNerdFont-Medium.ttf");
    font-weight: normal;
}

@font-face {
    font-family: 'JetBrainsMono';
    src: url("/font/JetBrainsMono/JetBrainsMonoNerdFont-Bold.ttf");
    font-weight: bold;
}

@font-face {
    font-family: 'JetBrainsMono';
    src: url("/font/JetBrainsMono/JetBrainsMonoNerdFont-Italic.ttf");
    font-style: italic;
}

:root {
    --surface-darkest:  #1d1d24;
    --surface-dark:     #292933;
    --surface-light:    #535357;
    --text-lightest:    white;
    --text-light:       whitesmoke;

    font-family: 'JetBrainsMono', 'monospace';
    background-color: #151519;

    color: whitesmoke;
}

body, html {
    margin: 0;
    height: 100%;
}

#backdrop {
    background-image: url("/images/background.jpg");
    height: 100%;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#blur {
    height: 100%;
    background-color: rgba(21, 21, 25, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#page-surface {
    margin: auto;
    width: 60%;
    background-color: var(--surface-darkest);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    padding: 1.5em;
}

#main-content {
    margin: 0 5%;
}

h1 {
    text-align: center;
}

h2 {
    color: lightgray;
}

h3 {
    color: seagreen;
}

a {
    color: #6582d8;
}

a:active {
    color: #ea4344;
}

a:visited {
    color: #9583dd;
}

.subtext {
    margin: 1rem 0;
    font-style: italic;
    font-size: small;
    color: gray;
}

hr {
    border-color: var(--surface-light);
}

figcaption {
    font-style: italic;
    font-size: small;
    color: gray;
}

.navbar {
    list-style: none;
    column-gap: 1rem;
    display: flex;
}

.navlink, .navlink:active, .navlink:visited {
    text-decoration: none;
    color: var(--text-light);
    padding: 0.1rem;
}

.navlink.active, .navlink.active:active, .navlink.active:visited {
    color: var(--surface-darkest);
    background-color: var(--text-light);
}

.navlink.active.hidden, .navlink.active.hidden:active, .navlink.active.hidden:visited {
    background-color: #bfade7;
}

button {
    background-color: var(--text-light);
    font-family: inherit;
    color: var(--surface-darkest);
    border: none;
    padding: 0.5rem 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: white;
}

button:active {
    background-color: lightgray;
}

button.danger {
    background-color: #eb2626;
    color: var(--text-light)
}

button.danger:hover {
    background-color: red;
}

button.danger:active {
    background-color: #ae1b1b;
}

button.edit {
    background-color: #364be2;
    color: var(--text-light)
}

button.edit:hover {
    background-color: #1e37ee;
    color: var(--text-light)
}

button.edit:active {
    background-color: #2536b6;
}

.container {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.center-vertical {
    align-items: center;
}

.justify-left {
    justify-content: left;
}

.justify-center {
    justify-content: center;
}

.justify-right {
    justify-content: right;
}

.align-center {
    align-items: center;
}

.align-right {
    align-items: end;
}

.full-width {
    width: 100%;
}

.nerd-font-icon {
    padding: 0.5rem 0.75rem 0.5rem 0.5rem;
}

.edit-post-form {
    background-color: var(--surface-dark);
    padding: 1rem;
}

#new-blog-post-form {
    display: flex; 
    flex-direction: column
}

.error {
    color: red;
    font-size: smaller;
}

.attachment-row {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.attachment-row > button {
    display: block;
    margin-left: auto;
}

.attachment-buttons {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
}

.vertical-form {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#blog-attachments {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}


/***** MODAL DIALOG ****/
#modal {
	/* Underlay covers entire screen. */
	position: fixed;
	top:0px;
	bottom: 0px;
	left:0px;
	right:0px;
	background-color:rgba(0,0,0,0.5);
	z-index:1000;

	/* Flexbox centers the .modal-content vertically and horizontally */
	display:flex;
	flex-direction:column;
	align-items:center;

	/* Animate when opening */
	animation-name: fadeIn;
	animation-duration:150ms;
	animation-timing-function: ease;
}

#modal > .modal-underlay {
	/* underlay takes up the entire viewport. This is only
	required if you want to click to dismiss the popup */
	position: absolute;
	z-index: -1;
	top:0px;
	bottom:0px;
	left: 0px;
	right: 0px;
}

#modal > .modal-container {
	/* Position visible dialog near the top of the window */
	margin-top:10vh;

	/* Sizing for visible dialog */
	width:80%;
	max-width:600px;

	/* Display properties for visible dialog*/
	border:solid 2px var(--surface-dark);
	box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.3);
	background-color: var(--surface-darkest);
	padding:20px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#modal .close-button {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#modal hr {
    width: 100%;
}
