:root {
    /* if you want to keep it super simple, you can edit these top variables (variables = the things that start with --) to add some style and leave the rest of the code alone! */

    /* colors */
    --text: #000;
    --background: #fff;
    --accent-dark: #000000;
    --accent: #cc9900;
    --accent-light: #cc9900;

    /* fonts */
    --basefont: consolas, sans-serif;
    --titlefont: consolas, monospace;
    --fancyfont: "Germania One", serif;
    --text-size: 16px;

    /* gallery styling */
    --minimum-img-width: 200px;
    --maximum-img-width: 750px;
    --maximum-columns: 2;
    --image-background: #fff;
    --column-gap: var(--spacing);

    /* misc styling */
    --max-width: 1440px;
    --spacing: 15px;
    --border-radius: 15px;
    --underline: var(--accent-light);
    --border: solid var(--accent) 5px;

    /* calculations - don't worry about this */
    --halfspacing: calc(var(--spacing) / 2);
    --doublespacing: calc(var(--spacing) * 2)
}


.germania-one-regular {
  font-family: "Germania One", system-ui;
  font-weight: 400;
  font-style: normal;
}



* {
    box-sizing: border-box;
    max-width: 100%;
    scrollbar-color: var(--accent);
    -ms-overflow-style: none;
    box-decoration-break:clone
}

body {
    overflow-x: hidden;
    overflow-y: scroll;
    padding: var(--spacing) 5%;
    background-color: var(--background);
    color: var(--text);
    text-indent: 50px;
    font-family: var(--basefont);
    font-size: var(--text-size);
    text-align: justify;
    text-justify: auto;
    line-height: 1.5em;
}

h1:has(+ nav) {
    margin-bottom: var(--halfspacing)
}

header {
    text-align: center;
    padding-bottom: var(--spacing);
}

nav {
    padding-top: var(--spacing);
}

main, header, footer {
    max-width: var(--max-width);
    margin: 0 auto;
}

footer {
    display: block;
    text-align: center;
    font-size: .9em;
    margin: var(--spacing) auto;
}

/* element styling */
a {
    color: var(--accent);
    text-decoration: underline var(--underline);
    text-underline-offset:.15em
}

a:hover {
    color: var(--accent-dark);
}

#to-top a {
    position: fixed;
    right: var(--spacing);
    bottom: var(--spacing);
    font-size: 50px;
    text-decoration: none;
    color: var(--accent-light);
}

b {
    color: var(--accent-dark)
}

i {
    color: var(--accent)
}

nav a, nav b {
    padding: 5px;
    margin: 5px;
}

mark {
    background-color: var(--accent-light);
    padding: 1px 2px;
    border-radius:var(--border-radius)
}

code {
    font-size:.9em;
    padding:1px 3px;
    font-family:monospace;
    color:var(--accent-dark)
}

u {
    text-decoration-color: var(--accent-dark)
}
ol, ul {
    margin:var(--spacing);
}
li {
    padding-left:var(--halfspacing);
    margin:var(--halfspacing) auto;
}
li > ul {
    padding-left: var(--spacing);
    margin:auto;
    font-size:.9em;
}
li::marker {
    color: var(--accent);
}
blockquote {
    padding-left:var(--doublespacing);
    margin:var(--doublespacing);
    border-left: var(--border);
    color:var(--accent-dark)
}

hr {
    width: 100%;
    border: none;
}

img {
   vertical-align: middle;
   max-width:100%;
}

/* boxes & flex */
.box {
    padding: var(--spacing);
    border: var(--border);
    margin: var(--spacing) auto;
    border-radius: var(--border-radius);
    break-inside:avoid;
}

.flex {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: var(--halfspacing) var(--spacing)
}

.flex > * {
    flex: 1 2 200px;
    margin:0 auto;
}

.center {
    text-align:center;
    margin-left: auto;
    margin-right: auto;
}

#cv {
    font-style:normal;
    max-width:75%;
    display:box;
}

td:nth-child(odd), th:nth-child(odd) {
  text-align:right;
}

td:nth-child(even), th:nth-child(even) {
  text-align:left;
}

th, td {
  padding-top: 5px;
  padding-bottom: 5px;
  padding-left: 10px;
  padding-right: 10px;
}

/* dividing lines between areas */
hr::after,
footer::before {
    content: "\a0 \a0";
    text-align-last: justify;
    width: 50%;
    margin: var(--spacing) auto;
    display: table;
    text-decoration: underline var(--underline);
    text-decoration-thickness: .1em
}

/* headers */
h1,
h2,
h3,
h4 {
    font-family: var(--fancyfont);
    margin: 1.5em auto;
    text-align: center;
    line-height: 1.3em;
}

h1 {
    font-size: 2em;
    
}
   h1 a {
      text-decoration: none;
      color:var(--accent);
    }

h2 {
    font-size: 1.5em;
    margin: 1em auto;
    color: var(--accent);
    letter-spacing:.25em;

}

h3 {
    color: var(--background);
    background: var(--accent);
}

h4 {
    font-size: 2em;
    color: black;
    font-weight: normal;
}



.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

/* The actual timeline (the vertical ruler) */
.timeline::after {
  content: '';
  position: absolute;
  width: 3px;
  background-color: var(--accent);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
}

/* Container around content */
.container {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

/* The circles on the timeline */
.container::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 5px;
  top: 30px;
  right: -15px;
  background-color: var(--accent);
  z-index: 1;
}

/* Place the container to the left */
.left {
  left: 0;
}

/* Place the container to the right */
.right {
  left: 50%;
}

/* Add arrows to the left container (pointing right) */
.left::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  right: 30px;
  border: medium solid white;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent var(--accent);
}

/* Add arrows to the right container (pointing left) */
.right::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  left: 30px;
  border: medium solid white;
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--accent) transparent transparent;
}

/* Fix the circle for containers on the right side */
.right::after {
  left: -16px;
}

/* The actual content */
.content {
  padding: 15px 15px;
  background-color: var(--accent);
  position: relative;
  border-radius: 15px;
}

.content h4 {
    font-family:var(--fancyfont);
    margin:auto;
    padding:auto;
    color:white;
    text-transform:italic;
}


/* image gallery */
#gallery {
    margin: var(--doublespacing) auto;
    display: block;
    text-align: center;
    line-height: 1.2em;
    font-size: .9em;
}
#gallery.columns {
    columns: var(--minimum-img-width) var(--maximum-columns);
    gap: var(--column-gap);
}

#gallery img {
    border-radius: var(--border-radius);
    margin: var(--spacing) auto;
    max-width: min(var(--maximum-img-width), 100%);
    display:block;
    background-color:var(--image-background);
}

figure {
    margin: var(--spacing) auto;
    break-inside: avoid;
}

/* lightbox */
#gallery img:hover {
    cursor: pointer;
    outline: var(--border);
}

#lightbox {
    border: none;
    outline: none;
}
#lightbox img {
  max-height:90vh;
  max-width:90vw;
}

#intro {
    max-width: 750px;
    align-items: center;
}

#smol {
    font-size:.75em;
}

::backdrop {
    backdrop-filter: blur(2px) brightness(80%);
}

#gallery:has(~ #lightbox:popover-open) {
    pointer-events: none;
}

/* makes the lightbox work on small screens, like phones */
@media only screen and (min-width: 600px) {
    #lightbox button {
        display: none;
    }
} 
@media only screen and (max-width: 600px) {
    #lightbox button {
        display: block;
        width:30px;
        height:30px;
        margin:10px auto;
    }
} 

/* Media queries - Responsive timeline on screens less than 600px wide */
@media screen and (max-width: 600px) {
  /* Place the timelime to the left */
  .timeline::after {
  left: 31px;
  }
  
  /* Full-width containers */
  .container {
  width: 100%;
  padding-left: 70px;
  padding-right: 25px;
  }
  
  /* Make sure that all arrows are pointing leftwards */
  .container::before {
  left: 60px;
  border: medium solid white;
  border-width: 10px 10px 10px 0;
  border-color: transparent white transparent transparent;
  }

  /* Make sure all circles are at the same spot */
  .left::after, .right::after {
  left: 15px;
  }
  
  /* Make all right containers behave like the left ones */
  .right {
  left: 0%;
  }
}