:root {
  --bg-color: #ffffff;
  --text-color: #222222;
  --sidebar-bg: #f0f0f0;
  --header-footer-bg: #2d3e50;
  --link-color: #1e61c5;
  --catbox-bg: #ffffff;
  --catbox-border: #a3a3a3;
  --databox-header: #00c2e4;
  --target-link: #e4a5ba;
  --clock-light: white;
}   

[data-theme="dark"] {
    --bg-color: #1e1e1e;
    --text-color: #f0f0f0;
    --sidebar-bg: #2b2b2b;
    --header-footer-bg: #121212;
    --link-color: #aaccff;
    --catbox-bg: #4b4b4b;
    --catbox-border: #686868;
    --databox-header: #00828b;
    --target-link: #b8607d;
    --clock-light: orange;
}


@font-face {
    font-family: IBMPlexSansRegular;
    src: url(../fonts/IBMPlexSans-Regular.ttf);
    font-style: normal;
}

@font-face {
    font-family: IBMPlexSansBold;
    src: url(../fonts/IBMPlexSans-Bold.ttf);
    font-weight: bold;
}

@font-face {
    font-family: IBMPlexSansItalic;
    src: url(../fonts/IBMPlexSans-Italic.ttf);
    font-style: italic;
}

@font-face {
    font-family: Seven Segment;
    src: url(../fonts/Seven_Segment.ttf);
}

/* Add these near the top */

* {
    margin: 0;
    image-rendering: pixelated;
}

html {
  transition: background-color 0.4s ease, color 0.4s ease;
}

body, header, footer, aside, main, .catbox, .toc {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}


a:link {
    color: var(--link-color);
    text-decoration: none;
}

a:target {
    background-color: var(--target-link);
}

figure:target{
    background-color: var(--target-link);
}

a:visited {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: IBMPlexSansRegular;
  line-height: 1.6;
}


 /* Style the Image Used to Trigger the Modal */
#myImg {
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

#myImg:hover {opacity: 0.7;}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Modal Content (Image) */
.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

/* Caption of Modal Image (Image Text) - Same Width as the Image */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Add Animation - Zoom in the Modal */
.modal-content, #caption {
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {transform:scale(0)}
  to {transform:scale(1)}
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px){
  .modal-content {
    width: 100%;
  }
} 


/* Header */


.clock {
    color: var(--clock-light);
    font-family: Seven Segment;
    font-size: larger;
    filter: drop-shadow(0px 0px 3px var(--clock-light));
}

header {
  background-color: var(--header-footer-bg);
  color: white;
  padding: 1rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.clock-container {
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.clock-container span {
    font-size: smaller;
}

/* Container */
.container {
  display: flex;
  min-height: 90vh;
}

/* Sidebar */
aside {
  width: 150px;
  background-color: var(--sidebar-bg);
  padding: 1rem 1rem 1rem 0;
  /* border-right: 1px solid #ccc; */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

aside .logo {
    width: 105%;
    height: auto;
    display: flex;
    justify-content: center;
}

aside .logo img {
    filter: drop-shadow(2px 2px 2px black);
}

aside nav span {
    margin-left: 0.5rem;
    font-size: 12pt;
}

aside nav .catbox {
    display: flex;
    background-color: var(--catbox-bg);
    padding: 0.5rem;
    border-top: 1px solid var(--catbox-border);
    border-right: 1px solid var(--catbox-border);
    border-bottom: 1px solid var(--catbox-border);
    text-indent: 5px;
}

aside nav ul {
  list-style: square inside;
  margin: 0;
  padding: 0;
}

aside nav ul li {
  margin-bottom: 0.25rem;
  font-size: 9pt;
}

aside nav ul li a {
  text-decoration: none;
  color: var(--link-color);
}

aside nav ul li a:hover {
  text-decoration: underline;
}

/* Theme toggle */
.theme-toggle {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--text-color);
}

/* Main content */
main {
  flex: 1;
  padding: 2rem;
  background-color: var(--bg-color);
  border-left: 1px solid var(--catbox-border);
  display: flex;
}

/* Footer */
footer {
  background-color: var(--header-footer-bg);
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: auto;
}

.theme-toggle {
  margin-top: 2rem;
  text-align: center;
}

#theme-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 5px;
}

#theme-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

#theme-icon {
  width: 24px;
  height: 24px;
  filter: invert(0%);
  transition: filter 0.3s ease;
  
}

[data-theme="dark"] #theme-icon {
  filter: invert(100%);
}


#theme-icon.animate {
  transform: rotate(180deg);
  opacity: 0.6;
}

.content {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    margin-right: 10px;
    position: relative;
}

.content hr {
    border: 1px solid var(--catbox-border);
    margin-bottom: 5px;
}

h2 {
    margin-top: 5px;
}

.toc {
    width: fit-content;
    background-color: var(--catbox-bg);
    padding: 0.5rem;
    border: 1px solid var(--catbox-border);
    text-indent: 5px;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
}

.tocHeader {
    display: flex;
    align-items: center;
    gap: 8px;
}

#toggleButton {
    border: none;
    background: none;
    float: right;
    color: var(--text-color);
}

#textlist {
    margin-top: 10px;
    display:block;
}

#textList ol {
    list-style-type: lower-roman;
    padding-left: 20px;
}

.article-gallery {
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
}

.article-gallery img {
    filter: drop-shadow(2px 2px 2px black);
    height: 150px;
}

figure {
    text-align: center;
}

.databox {
    float: right;
    width: 300px;
    height:auto;
    display: flex;
    flex-direction: column;
    font-size: 10pt;
    
}

br {
    margin: 5px;
}

.data-image {
    width: 100%;
    display: flex;
    justify-content: center;
}

.databox .data-image img {
    object-fit: contain;
    width: 100%;
    margin: auto;
}


.databox table {
    border: 1px solid var(--catbox-border);
    border-collapse: collapse;
    border-spacing: 5px;
    filter: drop-shadow(2px 2px 2px black);
    background-color: var(--bg-color);
}


.databox th {
    background-color: var(--databox-header);
}

.databox td {
    text-align: left;
    width: 50%;
}

.databox th, td {
    padding: 5px;
}

.databox #subhead {
    text-align: center;
    width: 100%;
}

.databox th, #subhead {
    font-weight: bold;
    border-top: 1px solid var(--catbox-border);
}

.databox tr:hover {
    background-color: var(--catbox-bg);
}

.tagbox {
    width: 99.5%;
    height: auto;
    background-color: var(--catbox-bg);
    padding: 5px;
    display: inline-flex;
    border: 1px solid var(--catbox-border);
    text-align: left;
    bottom: 0;
    position: absolute;
}

.tagbox span {
    margin-right: 0.5rem;
}

.tagbox ul {
    list-style-type:"| ";
    list-style-position: inside;
    display: inline;
    margin: 0;
    padding: 0;
}

.tagbox li {
    float: left;
    margin-right: 0.25rem;
}

.tagbox li:first-child {
    list-style: none;
}
