/**
 * Typography & Text styles
 */

/* html is set to 62.5% so that all the REM measurements are based on 10px sizing. So basically 1.5rem = 15px */
html {
  font-size: 62.5%;
}
body {
  font-size: 1.5em; /* currently ems cause chrome bug misinterpreting rems on body element */
  line-height: 1.6;
  font-weight: 400;
  font-family: "Roboto", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #FFFFFF;
}

/**
 * Links
 */
a {
  font-weight: normal;
  text-decoration: none; 
  color:#EF6D3D;
}
a:focus {
  outline: thin dotted;
}

small {
  font-size: 75%;
}

/**
 * Headings
 */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1;
  text-rendering: optimizeLegibility; /*  voodoo to enable ligatures and kerning | https://developer.mozilla.org/en-US/docs/CSS/text-rendering */
  margin-top: 0;
  margin-bottom: 2rem;
  font-weight: 300;
}
h1 { font-size: 3.6rem; line-height: 1.25; letter-spacing: -.1rem; }
h2 { font-size: 3.0rem; line-height: 1.3;  letter-spacing: -.1rem; }
h3 { font-size: 2.4rem; line-height: 1.35; letter-spacing: -.08rem; }
h4 { font-size: 1.8rem; line-height: 1.5;  letter-spacing: -.05rem; }
h5 { font-size: 1.5rem; line-height: 1.6;  letter-spacing: 0; }
h6 { font-size: 1.4rem; line-height: 1.6;  letter-spacing: 0; }

/**
 * Paragraphs
 */
p {
  margin: 0 auto 1.5em auto; /* bottom margin for paragraphs */
}
p + p {

}

/**
 * Quotes & Blockquotes
 */
q {
  quotes: '\00201C' '\00201D';
}
q:before {
  content: open-quote;
}
q:after {
  content: close-quote;
}

blockquote {
  /*background-color: #F8F8F8;*/
  border-left: 2px solid #AFC0D2;
  margin: 1.6em 10%;
  padding: .75em 1em;
  font-size:1.8rem;
}
blockquote p:last-child {
  margin-bottom: 0;  
}

/**
 * Layout styles
 */

/* Full size background image */
html, #container, .inner { background-color:transparent;}
html {
  background:url(background.jpg) center center no-repeat fixed;
  background-size:cover;
}
body {
  max-width:800px;
  margin:25px auto;
}
header, #content, footer { 
  background: rgba(0,0,0,.8); 
  padding:25px;
  color:#FFFFFF; 
}

#header img {
  width: 200px;
  height: 200px;
  border-radius: 50%; /* Makes it circular */
  border: 4px solid #333; /* Add a border - adjust color as needed */
  object-fit: cover; /* Ensures the image fills the circle properly */
  margin-bottom: 10px; /* Adds space below the image before the menu */
  display: block;
}
#header img {
  box-shadow: 0px 0px 4px 4px rgb(0, 0, 0);
}

iframe {
  max-width:100%;
}

/* Menu Links */
ul.main-menu {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  list-style: none;
}
ul.main-menu li a {
  margin-right:20px;
  font-size:2.0rem;
  border-bottom: solid transparent 3px;
  color:#cfd2da;
}
ul.main-menu li a:hover {
  color:#FFFFFF;
}
ul.main-menu li a.active {
  color:#FFFFFF;
  border-bottom-color:#EF6D3D;
}

/* Utility classes */
.hide {
  display:none;
}
.show {
  display:block;
}



/* Ensure the list doesn't get messed up if you want it below the h1/img line */
.main-menu {
  /* Forces the menu onto the next line and spans full width */
  order: 3;
  width: 100%;
  margin-top: 1px; /* Space below H1/IMG */
  /* Center the menu items */
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
}

#header {
  display: flex;
  flex-wrap: wrap; /* Allows items to wrap onto the next line */
  justify-content: space-between; /* Pushes H1 and IMG to the edges */
  align-items: center; 
  padding: 20px;
  /* Defines a width if needed */
}

#header h1 {
  /* Stays on the left */
  order: 1;
}

#header img {
  /* Moves to the right */
  order: 2;
}

/* If you want the image to be placed immediately after the text on the left, 
 the H1 and IMG wou

 /* --- Tooltip Styles --- */

/* 1. Base Container: Set up relative positioning for absolute child positioning */
.tooltip {
  position: relative;
  display: inline-block; /* Essential to wrap the text nicely */
  cursor: help; /* Change cursor to indicate interaction */
  margin-left: 5px;
    color: #ffffff;
    text-decoration: dotted underline;
    text-underline-offset: 3px;
}

/* 2. Hidden Pop-out Text */
.tooltip-text {
  /* Positioning relative to the .tooltip container */
  position: absolute;
  z-index: 100; /* Ensure it's above other elements */
  bottom: 125%; /* Position above the trigger text */
  left: 50%;
  transform: translateX(-50%); /* Center the pop-out text horizontally */
  
  /* Appearance */
  width: 300px; /* Adjust width as needed */
  background-color: #333; /* Dark background */
  color: #fff; /* White text */
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  
  /* Hiding mechanism */
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* 3. The Hover Effect: Make it visible and adjust opacity/position */
.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-5px); /* Pops up slightly */
}

/* Optional: Pointer/Arrow */
.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%; /* At the bottom edge of the tooltip box */
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent; /* Creates a downward-pointing triangle */
}

/* Optional: The Trigger Icon */
.tooltip-trigger {
  font-size: 14px;
  color: #4299e1; /* A distinct color */
}

/* Styling for the inner project navigation list */
.sub-menu {
  list-style: none;
  padding: 0;
  margin-bottom: 10px;
  border-bottom: 2px solid #ccc;
  display: flex; /* Makes the links display horizontally */
}

.sub-menu li a {
  display: block;
  padding: 0px 15px;
  text-decoration: none;
  color: #ffffff;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.sub-menu li a:hover {
  color: #ffffff;
  background-color: rgba(239, 109, 61, 0.3);
}

/* Style for the currently active sub-menu link */
.sub-menu li a.active-project {
  color: #ffffff; /* Highlight color */
  border-bottom: 5px solid #EF6D3D;
  font-weight: 3000;
}

/* Hide all project content areas by default */
.project-content {
  display: none;
  padding-top: 1px;
}

/* Show only the content area with this class */
.active-project-content {
  display: block;
}

.img-with-text {
  display: flex;
  align-items: center;
  gap: 20px;        /* Space between image and text */
  margin: 20px 0;  /* Spacing around the block */
}

.img-with-text img {
  width: 300px;
  height: 300px;
}

.img-with-text p {
  margin: 0;
  max-width: 400px;  /* Prevent the text from stretching too wide */
}
.white-box {
  background: white;
  padding: 10px;        /* optional */
  display: inline-block;
  border-radius: 4px;   /* optional */
}

@media (max-width: 768px) {
  .node {
    font-size: 11px;
    padding: 6px 10px;
    min-width: 50px;
  }
  
  .node.active {
    font-size: 14px;
    padding: 10px 16px;
  }
  
  .info-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 50vh;
    border-radius: 16px 16px 0 0;
    transition: transform 0.3s ease;
  }
  
  .info-panel.collapsed {
    transform: translateY(calc(100% - 60px));
  }
  
  .info-panel-toggle {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
  }
}

@media (min-width: 769px) {
  .info-panel-toggle {
    display: none;
  }
}
.main-menu .first-social-link {
  /* Add horizontal space to the left of the first social icon */
  margin-left: 200px; 
}

/* --- Thoughts/Blog Section Styling --- */

/* Initially hide the content */
.article-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
  padding: 0 20px; /* Initial zero padding */
  border-left: 5px solid #eee; /* Visual separation for content */
  margin-bottom: 20px;
}

/* When the 'hidden-content' class is removed, reveal the content */
.article-content:not(.hidden-content) {
  max-height: 2000px; /* Large value to ensure all content fits */
  padding: 15px 20px; /* Add padding when revealed */
}

/* Style the clickable preview area */
.article-preview {
  border-bottom: 1px solid #eee;
  padding: 15px 20px;
  cursor: pointer; /* Show that it's clickable */
  background-color: #f9f9f9; /* Light background for contrast */
  margin-bottom: 5px;
  transition: background-color 0.2s;
  border-radius: 4px;
}

.article-preview:hover {
  background-color: #f0f0f0;
}

.article-preview h3 {
  margin-top: 0;
  font-size: 1.2em;
}

.article-preview .summary {
  color: #666;
  font-size: 0.9em;
}


/* --- Thoughts/Blog Section Styling --- */

/* The class to initially hide the remaining article content */
.full-content.hidden-content {
  /* Set display to none to completely hide the text */
  display: none; 
}

/* Style for the continuous article container */
.article {
  border: 1px solid #ddd;
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.article-title {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.3em;
  cursor: pointer; /* Optional: Make title clickable too if you modify JS */
}

/* Style the clickable toggle element */
.read-more-toggle {
  display: inline-block; /* Ensure it stays inline with the text */
  font-style: italic;
  color: #667eea; /* Your accent color */
  cursor: pointer;
  margin-left: 5px; /* Small space after the summary text */
  font-weight: 500;
}

/* Ensure the close button is hidden by default (will be toggled by JS) */
.close-toggle {
  display: none; 
  margin-top: 15px; /* Space above the close button */
  font-weight: 700;
  cursor: pointer;
  color: #cc0000; /* Use a distinct color for closing */
}

/* Ensure the initial 'read more' toggle is inline with the text */
.read-toggle {
  /* (Use your previous styling for .read-more-toggle) */
  display: inline-block;
  font-style: italic;
  color: #667eea; 
  cursor: pointer;
  margin-left: 5px; 
  font-weight: 500;
}

/* --- Image Modal (Click-to-expand) --- */
.img-modal {
  display: none; 
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.8);
}

.img-modal img {
  display: block;
  margin: 50px auto;
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 0 10px black;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  font-size: 40px;
  font-weight: bold;
  color: white;
  cursor: pointer;
}