/* --- 1. GLOBAL SETTINGS --- */
:root {
  --bg-color: #355b3a;
  --darker-color: #2f4f2f;
  --lighter-color: #FCFCF2; /*#f7f5f0 / #FFFFE5 */
  --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: #FCFCF2 !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 */
  overflow: visible;
}

.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: black !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: #FCFCF2;
  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%;
}


/* 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%;
  }
}


/* --- 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 */
}

/* 1. THE ANCHOR - This MUST be relative */
.dropdown {
    position: relative !important;
    display: inline-block !important; /* Forces it to stay in line with other links */
    vertical-align: top;
}

/* 2. THE MENU - This MUST be absolute to 'float' */
.dropdown-menu {
    display: none !important;  /* Ensure it is hidden until hover */
    position: absolute !important; 
    top: 100% !important;      /* Pushes it BELOW the nav bar */
    left: 0 !important;
    
    /* These prevent it from stretching your nav bar */
    height: auto !important;
    visibility: hidden;
    
    background-color: #E2E8C1;
    min-width: 200px;
    z-index: 99999;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 3. THE HOVER ACTION */
.dropdown:hover .dropdown-menu {
    display: block !important;
    visibility: visible !important;
    border-radius: 4px;
}

/* 4. THE LINKS - Force them to stack */
.dropdown-menu li {
    display: block !important;
    width: 100% !important;
}

/* This targets the link ONLY when your mouse is over it */
.dropdown-menu li a:hover {
    background-color: #ffffe5; /* Same colour as the nav bar*/
    transition: 0.2s;          /* Makes the color change feel smooth, not abrupt */
}

/*SMOOTH SCROLL - for linking within sections*/
html {
  scroll-behavior: smooth;
}

/*For pictures that are links*/
a img {
    border: none;
    transition: opacity 0.3s ease; /* Makes the hover look professional */
}

a img:hover {
    opacity: 0.8; /* Subtle visual cue that it's clickable */
}


/*NEWSLETTER SPECIFIC*/

.newsletter-section {
    background-color: #fffcf5; /* Matching your cream background */
    border: 2px double #2d5a27; /* A 'double' border looks like a classic book binding */
    padding: 30px;
    margin: 40px 0;
    border-radius: 8px;
    text-align: center;
}

.newsletter-section h3 {
    color: #2d5a27;
    font-family: 'Georgia', serif;
    margin-top: 0;
}


.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Creates 3 equal columns */
    gap: 20px; /* Space between the posts */
    margin-bottom: 40px;
}

/* On smaller screens (phones), make them stack 1 by 1 */
@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
}

.botanical-subscription-box {
    background-color: #fffcf5; /* MUST match the Substack embed background */
    border: 2px solid #2d5a27;   /* Your dark green border */
    border-radius: 20px;       /* The curved edges you want */
    padding: 20px;             /* Space between the border and the form */
    max-width: 800px;
    margin: 40px auto;
    text-align: center;
}

/* This part makes the iframe 'invisible' against the background */
.botanical-subscription-box iframe {
    border: none !important;
    border-radius: 0; /* Let the container handle the curves */
}

.card {
    display: flex; /* Aligns children side-by-side */
    align-items: flex-start; /* Aligns logo with the top of the text */
    justify-content: space-between; /* Pushes text to left and logo to right */
    gap: 20px; /* Adds space between text and logo */
    padding: 20px;
    border: 1px solid #ccc; /* Just so you can see the box */
}

.text-content {
    flex: 1; /* Tells the text to take up all available space */
}

.bio-photo img {
    width: 100px; /* Set your preferred size */
    height: auto;
    display: block;
}




/* This ensures the title stays on its own line at the top */
.card {
    display: flex;
    flex-direction: column; 
    align-items: center;
    padding: 20px;
}

/* This puts the three Substack posts in a row */
.post-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap; /* This allows them to stack on mobile so they don't break the box */
}

/* Optional: adjust the width of each item so three fit perfectly */
.grid-item {
    flex: 1;
    min-width: 250px; /* Adjust based on the Substack embed width */
    max-width: 100%;
}

/* This sets up the side-by-side layout */
.substack-section {
    display: flex;
    justify-content: space-between;
    align-items: center; /* This vertically centers the logo relative to the text block */
    gap: 30px;
    padding: 30px;
}

.substack-text {
    flex: 1; /* Lets the text take up the available space */
}

.substack-text h1 {
    margin-top: 0;
    margin-bottom: 8px; /* Tightens the gap between header and paragraph */
    text-align: left;
}

.substack-text p {
    margin: 0;
    text-align: left;
}

/* Creating the "Button" look for the logo */
.substack-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background-color: #fcfcfc;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0; /* Prevents the button from squishing */
}

.substack-btn:hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.substack-btn img {
    height: 30px; /* Adjust this to change the "button" size */
    width: auto;
    display: block;
}

.substack-card {
    display: flex;
    justify-content: space-between; /* This forces the button to the far right */
    align-items: center;            /* This centers the button halfway down the box */
    gap: 40px;                      /* Ensures text doesn't hit the button */
    padding: 30px;
}

.substack-content {
    flex: 1; /* Allows text to take up all the room on the left */
}

.substack-content h1 {
    margin-top: 0;
    margin-bottom: 5px; /* Makes the space between title and text smaller */
}

.substack-btn {
    display: inline-flex;
    padding: 12px;
    background-color: #fcfcfc;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-decoration: none;
    flex-shrink: 0; /* Prevents the button from getting squished */
}

.substack-btn img {
    height: 35px; /* Adjust size as needed */
    width: auto;
    display: block;
}



.substack-button-group {
    display: flex;
    justify-content: flex-end; /* Hard-pushes the content to the right */
}

.substack-btn-link {
    display: inline-flex;
    padding: 10px 15px;
    background-color: #fcfcfc;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-decoration: none;
}

.substack-btn-link img {
    height: 35px;
    width: auto;
    display: block;
}


/* This is the master rule for the newsletter box */
.substack-layout {
    display: flex !important;
    flex-direction: row !important;      /* Forces side-by-side */
    justify-content: space-between !important; /* Pushes button to the far right */
    align-items: center !important;     /* Centers button halfway down vertically */
    text-align: left !important;
    gap: 30px;
}

.substack-text {
    flex: 1; /* Pushes the button to the edge */
}

.substack-text h1 {
    margin-top: 0;
    margin-bottom: 5px; /* The small gap you wanted */
}

/* Your button look */
.substack-btn {
    display: inline-flex;
    padding: 12px;
    background-color: #fcfcfc;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0; /* Keeps it from squishing */
}


/*MAGAZINE RACK STUFF*/
.journal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Exactly two in a row */
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.journal-card {
    aspect-ratio: 1 / 1;        /* Keeps them perfectly square */
    background-size: cover;
    background-position: center;
    border: 1px solid #d4d4d4;   /* The thin grey outline you mentioned */
    border-radius: 15px;        /* Curved corners */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    position: relative;
    transition: border-color 0.3s ease;
}

.journal-card:hover {
    border-color: #2d5a27;      /* Turns your green on hover */
}

.card-inner {
    z-index: 2;
}

.card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #2d5a27;
    font-weight: bold;
}

.card-title {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 10px 0;
    color: #333;
}

.card-snippet {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
}

.read-blog-link {
    font-family: 'Georgia', italic, serif;
    color: #2d5a27;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s ease;
}

.read-blog-link:hover {
    border-bottom: 1px solid #2d5a27;
}

/* For mobile: stack them 1 by 1 */
@media (max-width: 600px) {
    .journal-grid {
        grid-template-columns: 1fr;
    }
}


.transition-text {
    color: #fffcf5;            /* Your off-white/cream color */
    text-align: center;        /* Centers it with your other content */
    font-family:  system-ui, -apple-system, sans-serif; 
    font-style: italic;        /* Italics look great for 'transition' notes */
    font-weight: 300;          /* Makes the text look lighter and more elegant */
    margin: 60px 0 30px 0;     /* Adds extra space above to separate the sections */
    font-size: 1.5rem;
}

.transition-line {
    border: 0;
    height: 1px;               /* Keeps it very thin */
    background: #d4d4d4;       /* The light grey from your boxes */
    max-width: 400px;          /* Making it shorter than the boxes looks elegant */
    margin: 0 auto 40px auto;  /* Centers it and adds space before the grid */
    opacity: 0.6;              /* Softens the grey to look more 'faded' */
}