/* Email copy code */
.copy-indicator {
  display: inline-block;
  opacity: 0;
  margin-left: 5px;
  color: green;
  transition: opacity 0.3s;
}

.copy-indicator::before {
  content: "Copied";
  margin-right: 5px;
  color: green;
}

.copy-indicator.show {
    opacity: 1;
}

/* Importing the font */
@import url(https://fonts.googleapis.com/css?family=Anonymous+Pro);

/* General link styling */
a {
  color: #7BCCDE; /* Light Blue */
  text-decoration: none; /* Optional: removes underline from links */
  transition: color 0.3s ease;
}

a:hover {
  color: #A9D9E5; /* Lighter Blue on hover */
  text-decoration: underline; /* Optional: adds underline on hover for better feedback */
}

/* Styling for links within .markdown-link class */
.markdown-link a {
  color: #58b6d9; /* A bright blue, consistent with other action links */
  text-decoration: none; /* Optional: if you prefer no underline by default */
  transition: color 0.3s ease;
}

.markdown-link a:hover {
  color: #7ccbea; /* An even brighter blue for hover, consistent with other hovers */
  text-decoration: underline; /* Optional: add underline on hover */
}

/* Text */
html {
  min-height: 100%;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* Background color and format */
body {
  height: calc(100vh - 8em);
  padding: 4em;
  color: rgba(255,255,255,.75);
  font-family: 'Anonymous Pro', monospace;  
  background-color: rgb(25,25,25);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  margin: 0;
}

/* Add container for main content + sidebar */
.content-container {
  display: flex;
  flex-direction: row;
  gap: 2em;
  max-width: 1200px;
  margin: 0 auto;
}

/* Main content area */
main {
  flex: 1;
  max-width: 800px; /* Adjust as needed */
  margin: 0 auto; /* Centers the content */
  background-color: rgba(40, 40, 40, 0.85); /* Lighter background color */
  padding: 2em;
  border-radius: 10px; /* Optional: Adds rounded corners */
}

/* Filter sidebar styles */
.filter-sidebar {
  width: 240px;
  background-color: rgba(40, 40, 40, 0.85);
  padding: 1.5em;
  border-radius: 10px;
  position: sticky;
  top: 2em;
  align-self: flex-start;
}

.filter-sidebar h3 {
  margin-top: 0;
  color: #00ff00;
  font-weight: normal;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5em;
}

.tech-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.filter-item {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: background-color 0.2s;
  cursor: pointer; /* Add this to show it's clickable */
}

.filter-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.filter-item.active {
  background-color: rgba(0, 255, 0, 0.1);
  color: #00ff00;
}

/* Portrait image */
.portrait-image {
  float: left;
  width: 180px;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 20px;
  margin-bottom: 10px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.eth-image {
  position: absolute;
  width: 100%;
  height: 320px;
  top: 73%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  background-image: url('eth-night.png');
  background-size: cover;
  background-position: center;
  border-radius: 0px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: -1; /* Places it behind other content */
}

/* First line of text (my name) */
.line-1 {
  position: relative;
  margin-top: 30px;
  margin-bottom: 30px;
  width: 7.8em;
  border-right: 3px solid rgba(255,255,255,.75);
  font-size: 150%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  color: #00ff00; /* Changed to green */
}

/* Typing animation for first line */
.anim-typewriter {
  animation: typewriter 2s steps(25) 2s 1 normal both,
             blinkTextCursor 800ms steps(25) infinite 0.1s,
             turnoff 500ms steps(20) 5s 1 normal forwards;
}

/* Keyframes for typing animation */
@keyframes typewriter {
  from { width: 0; }
  to { width: 7.8em; }
}

/* Blinking cursor effect */
@keyframes blinkTextCursor {
  50% { border-right-color: transparent; }
}

/* Turns of the cursor on the first line */
@keyframes turnoff {
  from { border-right-color: rgba(255,255,255,.75); }
  to { border-right-color: transparent; }
}

/* Updates section (NEW) */
.updates-section {
  margin: 3em 0;
  padding: 1em 0;
}

.updates-container {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
}

.update-column {
  flex: 1;
  min-width: 300px;
}

.update-heading {
  color: #00ff00;
  font-size: 1.2em;
  margin-bottom: 1em;
  font-weight: normal;
  border-bottom: 1px solid rgba(0, 255, 0, 0.3);
  padding-bottom: 0.5em;
}

.update-card {
  background-color: rgba(30, 30, 40, 0.8);
  border-left: 3px solid #00ff00;
  padding: 1em;
  margin-bottom: 1.5em;
  border-radius: 0 4px 4px 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.update-card:hover {
  transform: translateX(5px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.update-card h4 {
  margin: 0 0 0.5em 0;
  color: #00ff00;
  font-weight: normal;
}

.update-date {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 0.8em 0;
}

.update-excerpt {
  font-size: 0.9em;
  margin: 0 0 0.8em 0;
}

.update-tags {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.8em;
}

.update-link {
  font-size: 0.85em;
  color: #58b6d9; /* Changed from #00ff00 or previous dark color */
  text-decoration: none;
  transition: opacity 0.2s;
}

.update-link:hover {
  color: #7ccbea; /* Brighter on hover */
  opacity: 0.8;
}

/* About section */
.about-section {
  max-width: 2000px;
  margin-top: 40px;
  padding-top: 40px; /* Space for scrolling to */
  scroll-margin-top: 80px; /* Ensures scrolling positions the section correctly */
}

.section-title {
  color: #00ff00;
  font-size: 1.5em;
  font-weight: normal;
  margin-bottom: 1em;
  padding-bottom: 0.3em;
}

.about-content {
  line-height: 1.6;
}

/* Navigation container */
.nav-container {
  display: flex;
  gap: 2em;
  margin-bottom: 3em;
}

.nav-link {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 1.1em;
  transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
  color: #00ff00;
}

/* Social links section */
.social-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.social-icon {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
  display: inline-block;
}

.social-icon:hover {
  color: rgba(255, 255, 255, 0.9);
}

.ascii-icon {
  font-family: monospace;
  font-size: 7px;
  line-height: 1;
  margin: 0;
  white-space: pre;
}

/* Project item styles */
.project-item {
  margin-bottom: 2.5em; /* Or your desired margin */
  padding-bottom: 1.5em; /* Or your desired padding */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Or your border color */
}

/* New styles for project and post item layout */
.project-item-content,
.post-item-content { /* Added .post-item-content here */
  display: flex;
  align-items: flex-start; /* Aligns items to the top */
  /* margin-bottom: 2em; */ /* Removed from here, handled by .project-item and .post-item */
}

.project-thumbnail-container {
  margin-right: 20px; /* Space between thumbnail and text */
  flex-shrink: 0; /* Prevents thumbnail from shrinking if text is long */
}

.project-thumbnail {
  width: 120px; /* Adjusted to 120px for smaller thumbnails */
  height: auto; /* Maintain aspect ratio */
  border-radius: 4px; /* Optional: rounded corners */
}

.project-details {
  flex-grow: 1; /* Allows details section to take remaining space */
}

/* Styling for project and blog item title links */
.project-item h2 a,
.post-item h2 a {
  color: #00ff00; /* Bright green, matching other section titles */
  text-decoration: none; /* Titles usually don't have underlines by default */
  transition: color 0.3s;
}

.project-item h2 a:hover,
.post-item h2 a:hover {
  color: #33ff33; /* A slightly lighter green for hover effect */
  text-decoration: underline; /* Optional: add underline on hover for better feedback */
}

/* Brighter links for project and post item details/actions */
.project-item p a,
.post-item p a {
  color: #58b6d9; /* A brighter blue, similar to .update-link */
  text-decoration: none; /* Optional: remove underline if desired */
  transition: color 0.3s;
}

.project-item p a:hover,
.post-item p a:hover {
  color: #7ccbea; /* Even brighter on hover */
  text-decoration: underline; /* Optional: add underline on hover */
}

/* Apply similar styling to post items */
.post-item {
  margin-bottom: 2.5em; /* Match project-item */
  padding-bottom: 1.5em; /* Match project-item */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Match project-item */
}

/* If you had a .post-divider class, you might not need it anymore,
   or you can remove its border and adjust its margin/padding if it was just for space.
   For example, to remove it if border-bottom on .post-item handles the line: */
.post-divider {
  display: none; 
}

/* Make all images in project content responsive */
.project-content img, 
.post-content img {
  max-width: 100%; /* Changed from 80% to 100% */
  height: auto;
  display: block;
  margin: 1rem auto; /* Changed to auto for horizontal centering */
}

/* Styles for images within your post content, especially for the gallery */
.post-content .img-gallery-item {
  display: block; /* Allows margin auto to work for centering */
  margin-left: auto;
  margin-right: auto;
  margin-top: 1em;
  margin-bottom: 1em;
  max-width: 100%; /* Default: makes images responsive */
  height: auto;   /* Maintain aspect ratio */
  border-radius: 4px; /* Optional: adds slightly rounded corners */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Optional: subtle shadow */
}

.post-content .img-small {
  max-width: 350px; /* Adjust this value as needed for "small" images */
}

.post-content .img-medium {
  max-width: 550px; /* Adjust this value as needed for "medium" images */
}

.post-content .img-large {
  max-width: 750px; /* Adjust this value as needed for "large" images, if you use it */
}

/* Syntax Highlighting (Rouge) */
.highlight {
  background: #272822; /* Dark background for code blocks */
  color: #f8f8f2;     /* Light text color */
  padding: 1em;
  margin-bottom: 1.5em;
  overflow: auto;
  border-radius: 0.3em;
}
.highlight pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */

/* Responsive adjustments */
@media (max-width: 767px) {
  body {
    padding: 1em; /* Reduced padding */
  }
  
  main {
    padding: 1em; /* Less padding on mobile */
    width: calc(100% - 2em); /* Ensure it accounts for padding */
    max-width: 100%; /* Prevent overflow */
    box-sizing: border-box; /* Include padding in width calculation */
  }
  
  .updates-container {
    flex-direction: column;
  }
  
  .update-column {
    min-width: 100%;
  }
  
  .line-1 {
    position: relative;
    margin-top: 20px;
    margin-bottom: 30px;
  }
  
  .project-content,
  .post-content {
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }
}

/* Responsive layout */
@media (max-width: 900px) {
  .content-container {
    flex-direction: column;
  }
  
  .filter-sidebar {
    width: 100%;
    position: static;
  }
  
  .tech-filters {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Loading indicator */
.loading {
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 15px;
}

/* Highlight links to main site */
a[href^="https://n.ethz.ch/~arestrepo"] {
  color: #3696b6;
  position: relative;
}

a[href^="https://n.ethz.ch/~arestrepo"]:hover::after {
  content: "↗";
  position: absolute;
  top: -5px;
  right: -10px;
  font-size: 0.8em;
}

/* Style for headings */
h1, h2, h3, h4, h5, h6 {
  color: #00ff00;
  font-weight: normal;
}

/* Additional tag styling */
.tag {
  display: inline-block;
  background-color: rgba(0, 255, 0, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 0.75em;
  margin-right: 5px;
}