/* GENERAL PAGE RULES */

body {
    display: flex;
    justify-content: center;
    font-family: "Calibri", CenturyGothic, Geneva, AppleGothic, sans-serif;
    font-size: 1em;
    color: #111;    
}

h1 {
    font-size: 2em;
}

#holder {
    margin-top: 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

#left {
    flex-grow: 100;
    min-width: 1em;
    max-width: 4em;
}

#middle {
    max-width: 36em;
    width: 100%;
    min-width: 36em;
}

#right {
    min-width: 1em;
    flex-grow: 100;
}

a {
	color:#660000;
}

a:hover {
	color:#400000;
}


/* NAV */
#nav {
    margin-bottom: 1.25em;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1em;
}

#brand {
    font-size: 1.5em;
    font-weight: 1000;
    color: inherit;
    text-decoration: none;
}

#brand:hover {
    text-decoration: underline;
}

.nav-links {
    display: flex;
    gap: 1em;
    justify-content: flex-end;
}

.nav-links a {
    color: inherit;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    font-size: 0.9em;
}

.nav-links a:hover {
    border-bottom-color: #aaa;
}

.nav-links a.active {
    border-bottom-color: #000;
}

/* ESSAYS: shorts styling */
#markdown {
    /* Help prevent long tokens from overflowing narrow columns */
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Essay page styling */
.essay-header {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 1px solid #eee;
}

.essay-header h1 {
    margin-bottom: 0.5em;
}

.back-link {
    display: inline-block;
    margin-bottom: 1em;
    color: #660000;
    text-decoration: none;
    font-size: 0.9em;
}

.back-link:hover {
    text-decoration: underline;
}

.back-link::before {
    content: "← ";
}

/* Style for <details> elements inside #markdown (used for "Shorts" in essays) */
#markdown details {
    margin: 0.5em 0 0.9em; /* space above and below each details block */
    padding: 0; /* remove default box styling */
}

/* Style for the <summary> (the clickable part) inside details */
#markdown details summary {
    cursor: pointer;      /* show pointer cursor on hover */
    list-style: none;     /* remove default list marker */
}

/* Hide the default disclosure triangle in WebKit browsers */
#markdown details summary::-webkit-details-marker {
    display: none;
}

/* Add a custom right-pointing caret before closed summary */
#markdown details summary::before {
    content: '▸';             /* right-pointing triangle */
    display: inline-block;
    margin-right: 0.35em;     /* space between caret and text */
}

/* Change caret to down-pointing when details is open */
#markdown details[open] summary::before {
    content: '▾';             /* down-pointing triangle */
}

/* Style the content inside details (paragraphs and lists) */
#markdown details > p,
#markdown details > ul,
#markdown details > ol {
    margin-top: 0.5em;        /* space above content */
    color: #666;              /* lighter body text */
    font-size: 0.9em;         /* slightly smaller font */
    line-height: 1.5;         /* comfortable line spacing */
    padding-left: 1em;        /* indent content */
    border-left: 3px solid #ddd; /* subtle left bar */
}
