/* --- 1. GLOBAL SETTINGS --- */
:root {
  --bg-color: #355b3a;
  --darker-color: #2f4f2f;
  --lighter-color: #f7f5f0;
  --accent-color: #A7C274;
}

html, body {
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: #1a1a1a;
  font-family: system-ui, -apple-system, sans-serif;
  overflow-x: visible;
}

/* --- 2. STICKY HEADER & NAV --- */

/* This container holds everything that stays at the top */
.sticky-header-container {

  background-color: var(--bg-color);
  width: 100%;
}

.site-header {
  width: 100%;
  line-height: 0; /* Removes dead space under image */
}

.site-header img {
  width: 100%;
  height: auto; /* FIX: Prevents stretching */
  display: block;
}

.main-navigation {
  width: 100%;
  background-color: #FFFFE5 !important;
  border-bottom: 2px solid green;

  /* The critical sticky code */
  position: -webkit-sticky; /* Support for Safari */
  position: sticky;
  top: 0; 
  z-index: 9999; /* Keeps it on top of everything else */
}

.main-navigation ul {
  display: flex !important;
  list-style: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  max-width: 1000px; /* Aligns with content width */
  justify-content: flex-start;
  position: -webkit-sticky;
  position: sticky;
  top: 0; 
  z-index: 9999; 
}

.main-navigation a {
  display: block;
  color: black !important;
  padding: 15px 25px;
  text-decoration: none;
  font-weight: bold;
}

.main-navigation a:hover {
  background-color: #E2E8C1;
  color: purple !important;
}

.main-navigation a.active {
  background-color: #f1c40f;
  color: #000 !important;
}

/* --- 3. MAIN CONTENT AREA --- */

main {
  max-width: 1000px;
  margin: 2rem auto !important; /* Centered, no sidebar margin */
  padding: 0 20px;
  display: block;
}

.card {
  background-color: #FFFFE5;
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 1.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* --- 4. BIO & PROJECTS --- */

/* The Card Container */
.bio-block {
    display: flex;
    flex-direction: column; /* Puts Title on top of everything else */
    padding: 30px;          /* Matches the nice breathing room in your screenshot */
}

/* The Title */
.bio-block h1 {
    margin: 0 0 20px 0;    /* Space below the title */
    font-size: 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.1); /* That line you liked */
    padding-bottom: 15px;
    width: 100%;
}

/* The Container for Text and Photo */
.bio-content {
    display: flex;         /* Puts Text and Photo side-by-side */
    flex-direction: row;
    align-items: center;   /* Centers the photo vertically against the text */
    gap: 40px;             /* The gap between the text and the photo */
}

/* The Text Lane */
.bio-text {
    flex: 1;               /* Text takes up the remaining space */
}

/* The Photo Lane */
.bio-photo {
    flex-shrink: 0;        /* Keeps the photo from getting squashed */
    width: 140px;          /* Matches your small photo size */
}

.bio-photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;    /* Optional: slightly rounded corners like your image */
    border: 1px solid #ddd; /* The subtle frame from your screenshot */
}

/* Fix for mobile: makes the image center and go to the top on small screens */
@media (max-width: 600px) {
    .bio-photo {
        float: none;
        margin: 0 auto 20px auto;
        width: 100%;
    }
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-item img {
  width: 100%;
  border-radius: 12px;
}




/* --- 7. RESPONSIVE --- */
@media (max-width: 800px) {
  .project-grid, .footer-inner, .bio-block {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  
  .bio-photo img {
    width: 100%;
  }
}

/* Plant Decoration */
body::before {
  content: "";
  position: fixed;
  left: 0;
  bottom: 0;
  width: 200px;
  height: 200px;
  background: url("pictures/peppersaxifragegreen.png") no-repeat left bottom;
  background-size: contain;
  pointer-events: none;
  z-index: -1;
}

/* --- Restoring Image Frames & Borders --- */

/* This targets the bio photo and anything you manually labeled 'img-frame' */
.img-frame, 
.bio-photo img, 
.project-item img {
    border: 1px solid rgba(0,0,0,0.2) !important;
    padding: 6px !important;            /* The space between image and border */
    background-color: #f7f5ef !important; /* The off-white "frame" color */
    border-radius: 4px !important;      /* Subtle rounding */
    display: block;
    box-sizing: border-box;            /* Ensures padding doesn't break the layout */
}

/* Optional: Add a slight shadow to make them pop off the green background */
.project-item img, .bio-photo img {
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

/* --- Site Header Alignment & Size --- */

.site-header {
    width: 100%;
    /* This centers the 'invisible' box that holds the image */
    max-width: 1000px; 
    margin: 0 auto !important; 
    line-height: 0;
    padding-left: 20px; /* Aligns the image with your red line */
    box-sizing: border-box;
}

.site-header img {
    /* This controls the height of your banner */
    height: 96px; /* Roughly 1 inch on most desktop screens */
    width: auto;  /* Allows the width to scale proportionally so it doesn't stretch */
    display: block;
    margin: 10px 0; /* Adds a little breathing room above and below the banner */
}


/* --- Restored Footer Layout --- */

.site-footer {
    width: 100%;
    background-color: #FFFFE5;
    color: black;
    font-size: 0.6rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.footer-inner {
    /* This keeps the footer content in line with your red line */
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    /* Column 1 (Logo): Auto-width
       Column 2 (Text): Takes up remaining space
       Column 3 (Contact): Takes up 1 part of space */
    grid-template-columns: auto 2fr 1.2fr; 
    gap: 3rem;
    align-items: start;
}

/* --- Fixing the Huge Icons --- */

/* The Neocities Logo */
.footer-logo img {
    width: 80px; /* Adjust this to your preferred size */
    height: auto;
    display: block;
}

/* The small Social/Email icons */
.footer-icon {
    width: 18px !important; /* Forces icons to stay small */
    height: 18px !important;
    vertical-align: middle;
    margin-right: 8px;
    display: inline-block;
}

.footer-about p, .footer-connect p {
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

/* --- Styling Footer Links --- */

/* Targets links that haven't been clicked AND links that have been visited */
.site-footer a:link, 
.site-footer a:visited {
    color: black !important; /* Matches your cream text color */
    text-decoration: underline; /* Keeps them looking like links */
    transition: color 0.3s ease; /* Smooth color fade */
}

/* Targets the link when the mouse hovers over it */
.site-footer a:hover, 
.site-footer a:active {
    color: #ffffff !important; /* Turns pure white on hover */
    text-decoration: none;     /* Removes underline on hover for a clean look */
}