:root {
    --backg: #510D77;
    --lightbackg: #921abd;
    --bodyfont: 'Poppins', Tahoma, sans-serif;
    --headtxtcolor: white;
}
@font-face {
    font-family: StThomas;
    src: url(../images/akzidenz-grotesk-bold.ttf);
}
.StThomas {
    font-family: StThomas;
}
body {
    font-family: var(--bodyfont);
    margin: 0;
    padding: 0;
    background: linear-gradient(120deg, #f4f4f4, #e6eaf1);
    color: #333;
}
h1 {
    margin: 0;
}
.center {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0;
}
#header2{
    padding-bottom: 10px;
    background: var(--backg);
    color: var(--headtxtcolor);
    font-size: 1.7vw;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    margin-bottom: 0;
    margin-top: 0;
    text-align: center;
    font-family:"StThomas", Arial, Helvetica, sans-serif;
}
#header{
    padding: 8px;
    padding-bottom: 0;
    background: var(--backg);
    color: var(--headtxtcolor);
    font-size: 1.5vw;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    margin-bottom: 0;
    margin-top: 0;
    text-align: right;
    display: flex;
    font-family:"StThomas", Arial, Helvetica, sans-serif;
}
.hcol1 {
    order:1;
    width: 20%;
    text-align: left;
}
.img {
    width: 100%;
}
.hcol2 {
    order: 2;
    width: 80%;
    margin-bottom: 0;
    margin-top: 0;
}
a.link-button {
    background: var(--lightbackg);
    color: white;
    text-decoration: none;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.25);
    padding: 8px;
    border-radius: 5px;
    display: inline-block;
}
a.link-button:hover {
    background: #34084d;
    color: white;
}
a.link-button2 {
    background: var(--backg);
    color: white;
    text-decoration: none;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.25);
    padding: 8px;
    border-radius: 5px;
    display: inline-block;
}
a.link-button2:hover {
    background: #34084d;
    color: white;
}
ul li{
    list-style: none;
    text-align: center;
}
ul {
    padding: 0;
}
nav {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}
nav ul #main-nav {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
    margin-bottom: 0;
    margin-top: 4px;
}
nav ul li{
    display: inline;
    margin-bottom: 0;
}
nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s ease;
    margin-bottom: 0;
    margin-top: 0;
}
nav ul li a:hover, #nav li a.current {
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 0;
    margin-top: 0;
}
nav li {
    position: relative;
}
nav li ul {
    display: none;
    position: absolute;
    left: 0;
    top: 25px;
    padding: 0;
    text-align: left;
    z-index: 1000;
}
nav li:hover > ul{
    display: block;
}
nav li ul li {
    display: block;
}
nav li ul li a {
    width: 100%;
    display: inline-block;
    padding: 8px 12px;
    background-color: #671297;
    color: white;
    text-align: left;
    border-radius: 0;
}
nav li ul li a:hover {
    background-color: #34084d;
}
.description {
    text-align: center;
    margin: 20px;
    font-size: 18px;
    color: #444;
    margin-top: 10px;
}
.timeline-container {
    display: flex;
    justify-content:left;
    margin-left: 5%;
    align-items: flex-start;
    height: 80vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    scroll-behavior: smooth;
}
.paper-container, .resource-container, .link-container, .home-container, .concept-container{
    width: 90%;
    margin-left: 5%;
    margin-top: 1em;
}
.resource, .person, .link, .concept, .paper {
    border: 2px solid #111;
    border-radius: 10px;
    padding: 5px;
    background-color: #ffffff;
    margin-bottom: 2em;
}
.people-container {
    width: 90%;
    margin-left: 5%;
    margin-top: 1em;
    z-index: 10000;
}
.person:hover, .concept:hover{
    border: 2px solid var(--lightbackg);
}

.main-content {
    display: flex;
    flex-direction: row;
    width: 90%;
    margin: 2em auto;
    gap: 2em;
    align-items: flex-start;
}
.people-list, .concepts-list {
    width: 40%;
    overflow-y: auto;
    max-height: 80vh;
}
.person-details, .concept-details {
    width: 60%;
    position: sticky;
    top: 100px; /* adjust depending on your header height */
    align-self: flex-start;
    background-color: #fff;
    padding: 1em;
    border: 2px solid #111;
    border-radius: 10px;
    max-height: 80vh;
    overflow-y: auto;
}
.grid {
    display: flex;
}
.image {
    width: 100%;
    border-radius: 10px;
    border: 2px solid #111;
}
.p1 {
    width: 20%;
    margin: 10px;
    margin-right: 20px;
}
.p2 {
    width: 80%;
}
.eras {
    width: 100px;
    padding-right: 30px;
    position: relative;
}
.era {
    padding: 10px;
    border-left: 5px solid black;
    font-weight: bold;
    position: absolute;
    color: white;
    border-radius: 6px;
    background: rgba(50, 115, 220, 0.8);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}
.timeline {
    position: relative;
    width: 6px;
    background: linear-gradient(to bottom, #333, #888);
    min-height:500px;
    border-radius: 3px;
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.4);
}
.event {
    position: absolute;
    left: 30px;
    width: 270px;
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s ease-in-out, background 0.3s ease-in-out;
    border-left: 5px solid #4b6cb7;
}
.event:hover {
    background: #f8f9fc;
    transform: scale(1.05);
    z-index: 10;
    border-left: 5px solid #ff7f50;
}
.zoom-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
}
.year-label {
    position: absolute;
    left: -60px;
    font-size: 14px;
    font-weight: bold;
    color: #444;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.2);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px auto;
    flex-wrap: wrap; /* Allows wrapping on small screens */
}

#categoryFilter,
#searchInput {
    padding: 10px;
    font-size: 16px;
    border: 2px solid #4b6cb7;
    border-radius: 8px;
    background: white;
    color: #333;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#categoryFilter:hover {
    border-color: #ff7f50;
    box-shadow: 2px 2px 10px rgba(255, 127, 80, 0.5);
}
#categoryFilter:focus {
    outline: none;
    border-color: #182848;
    box-shadow: 2px 2px 10px rgba(24, 40, 72, 0.5);
}
iframe {
    width: 80%;
    margin-left: 10%;
    height: 48vw;
}
#mobile-menu-toggle {
    display: none;
}
@media screen and (max-width: 810px) {
    #main-nav {
        display: none;
    }
    #mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: none;
        border: none;
        cursor: pointer;
    }
    #mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #757373;
        margin: 5px 0;
    }
    #main-nav.show-mobile {
        display: block;
        position: fixed;
        top: 0; /* Adjust as needed */
        left: 0;
        width: 40%;
        height: 100%;
        background-color: var(--backg);
        padding-top: 50px; /* Adjust as needed */
        z-index: 1000;
    }
    #main-nav.show-mobile a {
        display: block;
        padding: 20px;
        text-align: left;
        text-decoration: none;
        color: #f8f3f3;
        border-bottom: 1px solid #605e5e;
    }
    .grid {
        display: block;
    }
    .p1 {
        width: 80%;
        margin: 10px;
    }
    .p2 {
        width: 100%;
    }
    .p2 p {
        font-size:smaller;
    }
    .p2 h2 {
        font-size: large;
    }
}
.person a{
    text-decoration: none;
    color: #333;
}
#center{
    text-align: center;
}
.container {
    position: relative;
    width: 100%;
}
.hover_text {
    display: block;
    width: 100%;
} 
.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: 0.5s ease;
    background-color: var(--lightbackg);
}
.container:hover .overlay {
    opacity: 0.85;
    border-radius: 10px;
}
.overlay p {
    color: white;
    font-size: 1;
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.person ul li a {
    color: white;
  }
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #333;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
    margin-bottom: 400px;
}
.img_fl {
    width: 33.33%;
    float: left;
    max-width: 250px; 
    height: auto; 
    margin: 1em;
    width: 100%;
    margin-top: 0;
    margin-left: 0;
    border-radius: 10px;
    box-shadow: '2px 2px 10px rgba(0, 0, 0, 0.2)';
    border: 2px solid #111;
}
#footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 1rem;
    background: none;
    font-size: 0.75rem;
    color: #999;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    opacity: 0.6;
    transition: opacity 0.3s;
}
#footer:hover {
    opacity: 1;
}
#references {
    list-style: none;
    padding-left: 0;
    margin: 0;
    text-align: left;
    padding: 0;
}
#references li {
    text-align: left;
    margin-left: 0; 
    padding: 0;
    padding-left: 0.5rem;
}
#footer a {
    color: inherit;
    text-decoration: none;
}
#footer p {
    margin: 0;
    margin-bottom: 3px;
}
#footer a:hover {
    text-decoration: underline;
}
.fcol1, .fcol2 {
    flex: 1 1 250px;
    margin: 0.25rem 0;
}
.fcol2 {
    text-align: right;
}
#references li::before {
    content: "• ";
    color: #ccc;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}