@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap');

html {
    scroll-behavior: smooth;
  }  

body {
    margin: 0;
    padding: 0;
    font-family: Poppins, sans-serif;
    width: 100%;
    height: 100%;
    overflow: auto;

    background-color: #000000;
    background-image: url("files/images/bg.png");
    background-repeat: repeat;
    background-size: 400px; /* or 'cover' or 'auto' depending on effect you want */
    animation: driftBackground 60s linear infinite;
}

@keyframes driftBackground {
    0% {
      background-position: 0 0;
    }
    100% {
      background-position: 100px 100px; /* Moves diagonally */
    }
  }  

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 800px;
    margin: 140px auto 60px auto; /* keeps margin top and bottom */
    padding: 20px;
    border-radius: 10px;
    background-color: #111;
}

h1 {
    text-align: left;
    color: #fff;
    font-size: min(40px, 3.8vw);
}

h2 {
    text-align: left;
    color: #fff;
    font-size: min(20px, 3vw);
    font-weight: 400;
    margin: 0px;
    padding: 0px;
}

h3.tagline {
    text-align: left;
    color: #ccc;
    font-size: min(16px, 2.5vw);
    font-weight: 300;
    margin-top: -10px;
    margin-bottom: 20px;
    padding: 0;
}


img.avatar {
    border-radius: 50%;
    width: clamp(100px, 20vw, 160px);
    height: clamp(100px, 20vw, 160px);
  }  

.icon {
    width: 32px;
    height: 32px;
    transition: transform 0.2s ease;
}


a {
    color: #fff;
}

ul {
    list-style-type: square;
    margin: 0;
}

.icon-list {
    list-style-type: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-left: 0;
    margin-top: 20px;
}

.icon {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
}

.icon:hover {
    transform: scale(1.2);
}

/* Navigation bar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #111;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    z-index: 999;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    margin: 0 20px;
    font-weight: 500;
    position: relative;
    padding: 6px 12px;
    border-radius: 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  
  /* Hover blob effect */
  .navbar a:hover {
    background-color: rgba(255, 255, 255, 0.1); /* subtle white-grey blob */
  }
  
  /* Active page blob effect */
  .navbar a.active {
    background-color: #fff; /* solid white */
    color: #000; /* contrast so text is readable */
    font-weight: 600;
  }  

/* About Section */
.about-section {
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
    color: #eee;
    font-size: 18px;
    line-height: 1.8;
    background-color: #111;
    border-radius: 10px;
    margin-top: 100px;
    text-align: center; /* center everything inside */
}

.about-section h2 {
    font-size: 30px;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1); /* soft white-grey blob */
    padding: 12px 24px;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
  }
  
  .projects-section {
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
    color: #eee;
    font-size: 18px;
    line-height: 1.8;
    background-color: #111;
    border-radius: 10px;
    margin-top: 100px;
    text-align: left; /* keep content left aligned */
  }
  
  .section-title-wrapper h2 {
    font-size: 30px;
    color: #fff;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 12px 24px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
  }  

    .project {
    margin-bottom: 40px;
    }

    pre {
    background-color: #1e1e1e;
    color: #eee;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    }

.myshelf-section {
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
    color: #eee;
    font-size: 25px;
    line-height: 1.8;
    background-color: #111;
    border-radius: 10px;
    text-align: left; /* center everything inside */
}

.glow-link a {
    color: #ffefcc;
    text-decoration: none;
    font-size: 25px; /* smaller than section title */
    font-weight: 400;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-align: left;
    }
    
    .glow-link a:hover {
    background-color: rgba(255, 255, 255, 0.1); /* soft glow bubble on hover */
    }
    
/* For image captions */
.caption {
  display: block; /* Make it a block to allow margin auto for centering if needed */
  text-align: center;
  font-size: 0.9em; /* Slightly smaller than paragraph text */
  color: #aaa; /* Lighter grey for captions */
  margin-top: -10px; /* Reduce space after image */
  margin-bottom: 20px; /* Space before next element */
  font-style: italic;
}

/* For footnotes with hover bubble */
.footnote {
position: relative; /* Needed for absolute positioning of the pseudo-element */
cursor: help;
color: #cceeff; /* Slightly different color for footnote trigger text */
}

.footnote:hover::after {
content: attr(data-footnote); /* Takes the text from the data-footnote attribute */
position: absolute;
bottom: 125%; /* Position above the text */
left: 50%; /* Start from the middle of the trigger text */
transform: translateX(-50%); /* Center the bubble above the text */
background: #333; /* Dark background for the bubble */
color: #fff; /* White text for the bubble */
padding: 8px 12px; /* Padding inside the bubble */
border-radius: 6px; /* Rounded corners */
white-space: normal; /* Allow text to wrap */
width: 250px; /* Max width of the bubble */
font-size: 0.85em; /* Smaller font for footnote text */
line-height: 1.4;
z-index: 1000; /* Ensure it's on top of other elements */
opacity: 0.95; /* Slight transparency */
box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Subtle shadow for the bubble */
text-align: left; /* Align text to the left within the bubble */
border: 1px solid #555; /* Small border for the bubble */
}

/* MathJax specific styling if needed - usually it handles itself well */
mjx-container {
  margin: 1em 0 !important; /* Add some vertical spacing around MathJax blocks */
  overflow-x: auto; /* Allow scrolling for very wide equations */
}

/* Make sure sections on picard-lefschetz.html are styled correctly */
body > section { /* Target sections that are direct children of body */
  margin-top: 80px; /* Account for fixed navbar */
}
body > section:first-of-type {
  margin-top: 100px; /* More space for the first section after navbar */
}