/* ==========================================
   1. GLOBAL RESETS & FONTS
   ========================================== */
* {
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* <-- Enables beautiful, smooth automatic scrolling */
    scroll-padding-top: 120px; /* Prevents the sticky menu from covering up section headings */
}

body {
    font-family: 'Raleway', sans-serif;
    line-height: 1.6;
    background-color: #f4f3ef; /* Off-White background */
    color: #1a1a1a;           
}

/* ==========================================
   2. STICKY TOP NAVBAR
   ========================================== */
.top-navbar {
    position: sticky;       /* <-- Locks the menu to the view screen */
    top: 0;                 /* Pins it to the absolute top */
    z-index: 1000;          /* Ensures it stays stacked above everything else */
    background-color: rgba(244, 243, 239, 0.95); /* Matches body color with slight transparency */
    backdrop-filter: blur(5px); /* Elegant modern glass-blur effect behind menu */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 15px 0;
    border-bottom: 1px solid #e8e7e3;
}

.top-navbar .logo a {
    color: #1a1a1a; 
    text-decoration: none;
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px; 
}

nav a {
    color: #708238; /* Sage Green */
    text-decoration: none;
    font-size: 16px;
    font-weight: 600; 
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover {
    color: #ffffff;
    background-color: #708238; 
}

/* ==========================================
   3. SCROLLABLE SECTIONS (CENTERED CONTENT)
   ========================================== */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center; 
}

/* Gives each content section plenty of breathing room to act like its own page */
.page-section {
    padding: 100px 0;
    min-height: 80vh; /* Ensures sections feel distinct and full-screen */
    border-bottom: 1px solid #e8e7e3;
}

/* Removes the bottom line from the very last section */
.page-section:last-child {
    border-bottom: none;
    padding-bottom: 150px;
}

h1 {
    font-size: 2.8rem;
    color: #1a1a1a;
    margin-bottom: 25px;
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-top: 40px;
    margin-bottom: 20px;
    display: inline-block;
}

p {
    margin-bottom: 20px;
    font-size: 1.15rem;
    color: #2d2d2d; 
}

ul {
    display: inline-block;
    text-align: left; 
    padding-left: 20px;
    margin: 0 auto;
}

li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #2d2d2d;
}

/* ==========================================
   4. PROJECTS GRID
   ========================================== */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left; 
}

.project-list article {
    background-color: #ffffff; 
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); 
    border: 1px solid #e8e7e3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-list article:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.project-list article h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1a1a1a;
    display: block; 
}

/* ==========================================
   5. CUSTOM SVG BACKGROUND SHAPE
   ========================================== */
.custom-svg-shape {
    position: fixed;
    right: 07%;           
    top: 07%;             /* Starts centered vertically */
    /* REMOVED: transform: translateY(-50%) - Let's handle alignment via GSAP instead */
    transform-origin: center center; /* Ensures it rotates around its own center axis */
    z-index: -1;          
    pointer-events: none; 
    opacity: 0.8;         
}

/* ==========================================
   6. CROSSING BACKGROUND CIRCLE
   ========================================== */
.background-circle {
    position: fixed;
    top: 45%;             /* Positions it vertically in the mid-lower viewport */
    left: -300px;         /* <-- Starts completely hidden off the left side of the screen */
    width: 250px;
    height: 250px;
    background-color: rgba(112, 130, 56, 0.05); /* Even softer Sage Green tint */
    border: 2px solid rgba(112, 130, 56, 0.15); /* Clean, solid soft outline */
    border-radius: 50%;   /* Makes the box a perfect circle */
    z-index: -1;          /* Stays safely behind the white project cards */
    pointer-events: none; /* Won't interfere with links or scrolling */
}

/* ==========================================
   7. FLUID FULL-WIDTH CHECKERED DIVIDER
   ========================================== */
:root {
    --square-size: 8vw; 
}

/* Add a smooth transition to the main body background */
body {
    transition: background-color 0.8s ease;
}

/* This class gets added permanently when you hit the divider */
body.body-color-shift {
    background-color: #eae7df; /* A slightly deeper, warmer tinted off-white to complement the new pattern hue */
}

#pattern-divider {
    width: 100vw;         
    margin-left: calc(-50vw + 50%); 
    left: 0;
    height: calc(var(--square-size) * 5); 
    position: relative;
    overflow: hidden;
    background-color: #f4f3ef; 
    transition: background-color 0.8s ease;
}

/* Update the background color of the divider to match the body shift */
body.body-color-shift #pattern-divider {
    background-color: #eae7df;
}

.checkered-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, rgba(112, 130, 56, 0.15) 25%, transparent 25%), 
        linear-gradient(-45deg, rgba(112, 130, 56, 0.15) 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, rgba(112, 130, 56, 0.15) 75%), 
        linear-gradient(-45deg, transparent 75%, rgba(112, 130, 56, 0.15) 75%);
        
    background-size: var(--square-size) var(--square-size); 
    background-position: 
        0 0, 
        0 calc(var(--square-size) / 2), 
        calc(var(--square-size) / 2) calc(var(--square-size) / -2), 
        calc(var(--square-size) / -2) 0;
    
    /* Smooth CSS transition for the filter color morph */
    transition: filter 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* When this class is added, it stays permanently */
#pattern-divider.color-shift .checkered-pattern {
    filter: hue-rotate(140deg) saturate(1.5); /* Permanently shifts the palette */
}