/* =========================
   --- Color Variables ---
   ========================= */
:root {
  /* Base Solarized Light Palette */
  --base03: #002b36;
  --base02: #073642;
  --base01: #586e75;
  --base00: #657b83;
  --base0:  #839496;
  --base1:  #93a1a1;
  --base2:  #eee8d5; 
  --base2-5:#e8e4d8;
  --base3:  #fdf6e3;  

  /* Semantic Colors */
  --yellow: #b58900;
  --orange: #cb4b16;
  --red:    #dc322f;
  --magenta:#d33682;
  --violet: #6c71c4;
  --blue:   #268bd2;
  --cyan:   #2aa198;
  --green:  #859900;

  /* Sidebar Colors */
  --sidebar-bg: #e8e8e8;
  --sidebar-border: #aaaaaa;
  --sidebar-title: #333333;
  --sidebar-hover: #f0f0f0;
  --sidebar-selected: #00a7f5;
  --sidebar-selected-hover: #008fcc; 

  --shadow: rgba(0,0,0,0.15); 

  --sidebar-width: 260px;
  --text-scale: 0.9;
  --sidebarElementPadding:1.2rem;
}

/* =========================
   --- Inline Keyword Classes ---
   Use <span class="color">word</span>
   ========================= */
.blue    { color: var(--blue); }
.green   { color: var(--green); }
.cyan    { color: var(--cyan); }
.red     { color: var(--red); }
.orange  { color: var(--orange); }
.yellow  { color: var(--yellow); }
.magenta { color: var(--magenta); }
.violet  { color: var(--violet); }

/* =========================
   --- Reset / Base Styles ---
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-size: calc(1rem * var(--text-scale));
}

h1 { font-size: calc(2.0rem * var(--text-scale)); } /*if resizing text*/
h2 { font-size: calc(1.5rem * var(--text-scale)); }
h3 { font-size: calc(1.25rem * var(--text-scale)); }
h4 { font-size: calc(1.1rem * var(--text-scale)); }
h5 { font-size: calc(1rem * var(--text-scale)); }
h6 { font-size: calc(0.9rem * var(--text-scale)); }
p, li, a, span { font-size: inherit; }

body, html {
  font-family: 'Fira Code', monospace;
  height: 100%;
  background-color: var(--base3);
  color: var(--base00);
  overflow: hidden; 
}

a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  color: var(--cyan);
}

/* =========================
   --- Layout ---
   ========================= */
#container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* =========================
   --- Sidebar ---
   ========================= */
#sidebar {
  width: var(--sidebar-width);
  height: 100vh;

  background-color: var(--sidebar-bg);
  padding: 1rem;
  border-right: 1px solid var(--sidebar-border);

  position: fixed;
  top: 0;

  overflow-y: auto;
}

.sidebar-title {
  font-size: 1.2rem;
  color: var(--sidebar-title);
  margin-bottom: 1rem;
}

.sidebar-title a { /*links to homepage*/
  text-decoration: none;
  color: var(--sidebar-title);
  display: block; 
}
.sidebar-title a:hover {
  color: var(--sidebar-selected); /* optional hover effect */
}

#sidebar ul li a.active { /*selected sidebar element*/
  color: white;  
  background-color: var(--sidebar-selected);
  padding: 0.3rem 1rem 0.3rem var(--sidebarElementPadding); 
  display: inline-block; 
}

/* Collapsible Section */
.section {
  margin-bottom: 0.4rem;
}
.section label {
  display: block;
  cursor: pointer;
  padding: 0.35rem 1rem;
  font-weight: bold;
  color: var(--sidebar-title);
  transition: background-color 0.05s ease;
  width: 100%;
  box-sizing: border-box;
}
.section label:hover {
  background-color: var(--sidebar-hover);
}
.section.contact ul {
  max-height: 500px; /* always show contact info */
}

.section ul {
  list-style: none; /*No bullets*/
  margin-left: 0;
  max-height: 0;
  /* overflow: hidden; */
  transition: max-height 0.025s ease;
  padding-left: var(--sidebarElementPadding);
}


.section ul li a { /*Target only link elements within the list*/
  display: block;
  width: 100%;
  padding: 0.35rem 1rem;
  transition: background-color 0.05s ease;
}
.section ul li a:hover {
  background-color: var(--sidebar-hover);
}

.section ul li a,
.section ul li > label {
  display: block;
  width: 100%;
  padding: 0.3rem 1rem 0.3rem var(--sidebarElementPadding); 
  text-decoration: none;
  color: inherit; /* inherit parent color */
  transition: background-color 0.05s ease, color 0.1s ease;
}

/* Checkbox to toggle collapse */
.section input[type="checkbox"] {
  display: none;
}
#sidebar input[type="checkbox"]:checked ~ ul,
#sidebar ul li a.active {
  max-height: 500px;
}
.section label::before {
  content: '';
  display: inline-block;
  width: 0.5em;        /* horizontal length */
  height: 0.5em;       /* vertical length */
  border-bottom: 2px solid currentColor; /* horizontal line */
  border-right: 2px solid currentColor;  /* vertical line */
  margin-right: 0.45rem;
  margin-bottom: 0.1rem;
  transform: rotate(-45deg); /* no rotation yet */
  box-sizing: border-box;
}
/* Rotate arrow when the checkbox is checked */
.section input[type="checkbox"]:checked + label::before {
  transform: rotate(45deg);
}
/* Hide arrow on non-collapsible sections */
.section label.no-arrow::before { 
  content: none;
}

/* Hide tab by default on desktop */
#sidebar-tab {
  transition: left 0.3s ease-in-out, background-color 0.3s ease;
  display: none;
}

#container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

#sidebar {
  position: relative;
  flex-shrink: 0;
  width: 260px;
  height: 100vh; /* optional, keeps sidebar full height */
}

#content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* Mobile Sidebar */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--sidebar-width);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    border-right: 1px solid var(--sidebar-border);
  }

  #sidebar.open {
    transform: translateX(0);
  }

  /* Overlay for UX */
  #sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 900;
  }
  #sidebar-overlay.active {
    display: block;
  }

  /* Sidebar tab toggle */
  #sidebar-tab {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    line-height: 1;
    top: 16.666%; 
    left: 0px; /* left edge of screen */
    width: 2rem;
    height: 4rem; /* doubled height */
    background-color: var(--sidebar-bg);
    color: var(--sidebar-title);
    font-weight: bold;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2500;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.25);
    transition: left 0.3s ease-in-out, background-color 0.3s ease
  }
  #sidebar.open ~ #sidebar-tab {
    left: var(--sidebar-width);
  }

  /* Flip when sidebar open */
  #sidebar-tab span {
    display: block;
    transition: transform 0.3s ease;
    transform: none;
  }
  #sidebar-tab.open span {
    transform: scaleX(-1);
  }

}

/* =========================
   --- Main Content ---
   ========================= */
   
main {
  flex: 1;
  height: 100vh;      
  overflow-y: auto;   
  padding: 2rem;
}

@font-face {
  font-family: 'Fira Code';
  src: url('fonts/FiraCode-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Code';
  src: url('fonts/FiraCode-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

#content {
  flex: 1;
  padding: 2rem;
  background-color: var(--base3);
  color: var(--base00);
  overflow-y: auto;
}

#content h1 {
  margin-bottom: 1rem;
  color: var(--base01);
}

#content h2 {
  margin: 1.5rem 0 0.5rem 0;
  color: var(--base00);
}

#content p {
  margin-bottom: 1rem;
  line-height: 1.5;
}


/* =========================
   --- Timeline ---
   ========================= */

/* Timeline base */
#timeline {
  position: relative;
  padding: 2rem 0;
}

#timeline h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: calc(1.8rem * var(--text-scale));
}

/* Central line */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline-container::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: var(--base01);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

/* Individual items */
.timeline-item {
  padding: 1rem 2rem;
  position: relative;
  width: 50%;
}

.timeline-item .content:hover {
  background-color: var(--base1); 
  transition: background-color 0.2s ease;
}

.timeline-container,
.timeline-item,
.timeline-item::before {
  z-index: 0; 
}

.timeline-item.left {
  left: 0;
}
.timeline-item.right {
  left: 50%;
}

/* timeline-content box */
.timeline-item .timeline-content {
  background-color: var(--base2);
  padding: 1rem;
  border-radius: 8px;
  position: relative;
  transition: 
    background-color 0.2s ease,  
    transform 0.2s ease,        
    box-shadow 0.2s ease;        
}
.timeline-item.left .timeline-content {
  margin-right: 30px;
}
.timeline-item.right .timeline-content {
  margin-left: 30px;
}
.timeline-item .timeline-content:hover {
  background-color: var(--base2-5);             
  transform: translateY(-4px) translateX(1.5px); 
  box-shadow: 0 8px 16px var(--shadow)
}


.timeline-item::before { /*timeline marker*/
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  right: -10px;
  background-color: var(--blue);
  border: 4px solid var(--base3);
  top: 10px;
  border-radius: 50%;
  z-index: 1000;
}
.timeline-item.right::before {
  left: -10px;
  z-index: 1000;
}



/* =========================
   --- CV ---
   ========================= */
.pdf-container {
  position: relative;
  width: 100%;
  max-width: 1200px;  /* expand to most of available space */
  margin: auto;
  height: 85vh;        /* take most of viewport height */
  border: 1px solid var(--base0);
  /* overflow: hidden;    */
  border-radius: 8px;
}

.pdf-viewer {
  width: 100%;
  height: 100%; 
  border: none;
}

.pdf-download {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.pdf-download button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  border: none;
  background-color: var(--sidebar-selected); 
  color: white;
  transition: background-color 0.2s ease;
}

.pdf-download button:hover {
  background-color: var(--sidebar-selected-hover);
}


/* =========================
   --- Files table & display ---
   ========================= */
#filesList details {
  margin-bottom: 1.5rem;
  border: 1px solid var(--sidebar-border);
  border-radius: 6px;
  /* overflow: hidden; */
  box-shadow: 0 2px 4px var(--shadow);
  background: var(--base3);
}

#filesList summary {
  padding: 0.75rem 1rem;
  font-weight: bold;
  cursor: pointer;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-title);
  border-bottom: 1px solid var(--sidebar-border);
  list-style: none; /* remove default arrow */
}

#filesList summary:hover {
  background-color: var(--sidebar-hover);
}

/* Table styling */
.files-table {
  width: 100%;
  border-collapse: collapse;
}

.files-table th,
.files-table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--sidebar-border);
}

.files-table img {
  width: 100px;
  max-width: 100%;
  border-radius: 4px;
  border: 1px solid var(--sidebar-border);
}

.files-table a {
  padding: 0.25rem 0.5rem;
  background: var(--sidebar-selected);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.files-table a:hover {
  background: var(--sidebar-selected-hover);
}

.files-description {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--base01);
  line-height: 1.4;
}

.files-addendum {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--base00);
  border-top: 1px solid var(--sidebar-border);
  margin-top: 0.5rem;
}

.files-addendum ul {
  margin: 0.5rem 0 0 1rem;
  padding: 0;
  list-style: disc;
}

.files-addendum a {
  color: var(--blue);
  text-decoration: underline;
}

.nested_folders {
 overflow: hidden;  
}