/* --- Blurred Background Image --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('Background.png');
    background-size: cover;
    background-position: center;
    filter: blur(5px);
    transform: scale(1.1);
}

/* --- Basic Setup & Variables --- */
:root {
    --primary-color: #fff;
    --secondary-color: #f4f4f4;
    --accent-color: #edda73;
    --text-color: #fff;
    --light-text: #fff;
    --nav-top-position: 60px; /* ADD THIS VARIABLE */
}
body {
    margin: 0;
    font-family: "SF Mono", "Consolas", "Liberation Mono", "Menlo", "Courier", monospace;
    line-height: 1.6;
    background-color: transparent;
    color: var(--text-color);
    position: relative;
}

/* --- General Layout & Typography --- */
main {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0px 0 20px 0; /* Added 180px of top padding */
}

footer {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3 {
    line-height: 1.2;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 3.2em;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Page Titles & Captions --- */
.page-title {
    text-align: center;
    font-size: 3.8em;
    margin-top: 0;
    padding-top: 20px;
    margin-bottom: 5px;
    color: var(--light-text);
}

/* --- Content Box for Text Pages --- */
.content-box {
    background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent black */
    backdrop-filter: blur(10px); /* The blur effect */
    border-radius: 8px; /* Rounds the corners */
    padding: 20px 40px; /* Adds space inside the box (top/bottom, left/right) */
    margin: 40px auto; /* Adds space outside the box and centers it */
    max-width: 800px; /* Sets a max width for readability */
}
.content-box p:last-child {
    margin-bottom: 0;
}
/* This targets the title inside the new box */
.content-box h2 {
    font-size: 2.5em; /* You can adjust this size */
    text-align: left; /* Aligns the title to the left */
    margin-bottom: 20px; /* Space between title and text */
}
.scroll-caption {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1em;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

/* --- Header & Navigation --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    text-align: left;
    position: relative; /* THIS IS THE CRITICAL LINE THAT FIXES THE OVERLAP */
}

.site-title { 
    font-weight: bold; 
    font-size: 2.2em; 
    margin: 0;
    padding: 2px 1%;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-nav {
    position: absolute;
    top: var(--nav-top-position);
    right: 0; /* Changed to 0 to stick to the edge */
    width: 120px; /* Made the bar slimmer (was 180px) */
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 0px 0 0 0px; /* Rounds the corners on the left side only */
}
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: var(--accent-color);
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 3px;
    transition: all 0.2s ease-in-out;
    display: block;
    text-align: left;
}

.site-nav a:hover,
.site-nav a:focus {
    color: #fff;
    background-color: var(--accent-color);
}
/* --- Hero Image --- */
.hero-image {
    max-width: 250px;
    height: auto;
    margin: 0 auto 57px auto;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* --- Hero Section (for index.html) --- */
.hero {
    text-align: center;
    padding: 45px 0px; 
}

.hero h1 { 
    margin-top: 0; /* Add this line */
    font-size: 3em;
    margin-bottom: 10px; 
}

.hero .subtitle {
    font-size: 1.6em;
    color: var(--light-text);
}

/* --- Projects Section (for projects.html) --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 40px auto;
}

.project-card {
    height: 350px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease-in-out;
    z-index: 1;
}

.project-card:hover::before {
    transform: scale(1.1);
}

.project-info {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 2;
}

.project-info h3 {
    margin: 0 0 5px 0;
}

/* --- Reusable Components --- */
.button {
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-block;
    background-color: var(--accent-color); /* This is the button's main yellow background */
    color: #000; /* Black text for better contrast on a yellow background */
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
    text-decoration: none; /* Ensures no underline appears */
}

/* This creates the hidden white box for the hover effect */
.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.25); /* Semi-transparent WHITE */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: -1;
}

/* This makes the white box appear when you hover */
.button:hover::before {
    opacity: 1;
}

/* --- Reusable Components --- */
.button {
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--light-text);
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
}

/* --- Reusable Components --- */
.button {
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--light-text);
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    
    /* 1. The box starts as invisible */
    opacity: 0; 
    
    /* 2. This line creates the smooth 0.3-second fade animation */
    transition: opacity 0.3s ease-in-out; 
    
    z-index: -1;
}

.button:hover::before {
    /* 3. The box becomes visible on hover, triggering the transition */
    opacity: 1; 
}

/* --- Assigning Your Project Images --- */
.project-card.project-1::before { background-image: url('Images/Testimage1.png'); }
.project-card.project-2::before { background-image: url('Images/Testimage2.png'); }
.project-card.project-3::before { background-image: url('Images/Testimage3.png'); }
.project-card.project-4::before { background-image: url('Images/Testimage4.png'); }
.project-card.project-5::before { background-image: url('Images/Testimage5.png'); }
.project-card.project-6::before { background-image: url('Images/Testimage6.png'); }

/* --- Payment Page --- */
.payment-buttons-container {
    display: flex;
    justify-content: center;
    gap: 30px; /* Space between the buttons */
    margin-top: 40px;
    flex-wrap: wrap; /* Allows buttons to stack on small screens */
}
/* --- Payment Page Additions --- */
.button-with-caption {
    /* This container centers the button and the caption below it */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; /* Space between the button and caption */
}

.button-caption {
    /* This styles the caption text */
    font-style: italic;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin: 0;
    max-width: 220px; /* Ensures the text wraps nicely under the button */
}
.payment-button {
    /* This overrides the project card size to make the buttons smaller */
    width: 220px;
    height: 140px;
}

/* You will need to upload your own logos for these */
.payment-button.paypal-button::before {
    background-image: url('Paypal.png');
   
}

.payment-button.kofi-button::before {
    background-image: url('Ko-fi.png');
   
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    margin-top: 20px; /* Reduced from 40px */
    padding-top: 40px;
    /* ... other styles ... */
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        max-width: 90%;
    }
}