body {
    margin: 0;
    font-family: sans-serif;
}

        *{ /*universal class*/
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .header{
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 0;
            padding: 20px;
            background-color: black;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            position: relative; 
            overflow: hidden;
        }        
        .background_container { /*header animation*/
            margin: 0;
            padding: 0;
            position: relative;
            width: 100%;
            height: 18vh;
            background: #000;
            overflow: hidden;
            position: absolute;
        }
        .background_svg {
            position: absolute;
            width: 100%;
            top: 50%;
            opacity: .25;
            animation: rotate_grid 50s linear infinite reverse;
        }
        .background_line {
            stroke: white;
            stroke-width: 1;
            stroke-dasharray: 2000;
            stroke-dashoffset: 3000;
            animation: draw_line 20s ease-in-out infinite reverse;
        }
        .accent_line {
            stroke: #38a8e9;
            stroke-width: 2.6;
            opacity: 0.8;
            filter: drop-shadow(0 0 2px rgba(0, 162, 255, 0.5));
        }
        .left-nav, .right-nav {
            display: flex;
            gap: 30px;
            list-style-type: none;
            position: relative;
            z-index: 2;
        }
        .left-nav a, .right-nav a {
            text-decoration: none;
            color: white;
            font-weight: 500;
            transition: color 0.1s ease;
        }
        .left-nav a:hover, .right-nav a:hover {
            color: #007bff;
        }
        .logo {
            display: flex;
            align-items: center;
            position: relative;
        }
        .logo img {
            max-height: 60px;
        }
        .logo h1{
            color: white;
            font-weight: 200;
        }
        @keyframes rotate_grid {
            0% {
                transform: translateY(-50%) perspective(3000px) rotateX(70deg) rotate(0deg);    }
            to {
                transform: translateY(-50%) perspective(33000px) rotateX(70deg) rotate(1turn);  }
        }
        @keyframes draw_line {
            0% { stroke-dashoffset: 8000; }
            30% { stroke-dashoffset: 4000; }
            70% { stroke-dashoffset: 4000; }
            to { stroke-dashoffset: 2000; }
        }
                 /*LESSON GRID*/
        .grid-container{
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-template-rows: repeat(4, 1fr);
            gap: 7px;
            width: 79%;
            max-width: 1200px;
        }
        .grid-item{
            position: relative;
            aspect-ratio: 17/11.4;
            overflow: hidden;
        }
        .grid-item img{
            width: 100%;
            height: calc(100% - 30px);
            object-fit: cover;
            display:block;
        }
        .caption{
            position: relative;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: rgb(251, 253, 253);
            color: black;
            padding: 5%;
            text-align: center;
            font-size: 110%;
            font-family: sans-serif;
            transition: all 0.3s ease;
            min-height: 10px;
            line-height: 6px;
        }
        .grid-item:hover{
                cursor: pointer;
        }
        .grid-item a:hover::after{
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 123, 255, 0.3);
            transition: background 0.3s ease;
            z-index: -1;
        }
        .grid-item:hover .caption{
            background: rgba(0, 123, 255, 0.8);
            color:rgb(173, 245, 244);
        }
        .grid-item a{
            display: block;
            text-decoration: none;
            color: inherit;
            z-index: 1;
            position: relative;
        }
        .grid-item a:hover{
            cursor: pointer;
        }
                /*Patreon info*/
        .button-container {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            padding:  10px 20px;
        }
.buttonj {
            background-color: #2c302d;
            color: white;
            border: none;
            padding: 10px 20px;
            text-align: center; 
            text-decoration: none; 
            display: inline-block; 
            font-size: 14px; 
            font-family: Arial, sans-serif;
            margin-right: 10px; 
            border-radius: 20px;
}
.buttonj:hover { background-color: #2b8bda; }

/* General Resets */

/* Mailing List Section */
.mailing-list-wrapper {
    background-color: white;
    padding: 0.1px;
}

.mailing-list-card {
    max-width: 500px;
    margin: 4rem auto;
    text-align: center;
    padding: 2rem;
    background: white;
    line-height: 26px;
}

.mailing-list-title {
    display: block;
    margin-bottom: 1rem;
    font-size: 19px;
    color: black;
    text-decoration: none;
}

.subscriber-count {
    font-size: 13px;
    color: #999595;
}

.form-container {
    display: flex;
}

.subscribe-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    flex: 1;
}

.email-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    outline: none;
}

.subscribe-button {
    background: #007bff;
    color: white;
    border: 1px solid #007bff;
    padding: 0.75rem 2rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    white-space: nowrap;
    font-size: 1rem;
}

.terms-container {
    line-height: 20px;
}

.terms-text {
    color: #afacac;
    font-size: 11px;
    line-height: 15px;
}

.substack-link {
    display: block;
    text-align: right;
    margin-top: 10px;
}

/* Patreon Section */
.patreon-section {
    background-color: white;
}

.patreon-content {
    display: flex;
    align-items: center;
}

.patreon-image {
    height: 250px;
    width: 225px;
    margin-left: 20%;
    position: relative;
    left: 5%;
}

.patreon-text {
    color: black;
    line-height: 30px;
    margin-left: 10%;
    position: relative;
    font-size: 18px;
}

/* Button Layout */
.button-section {
    display: flex;
    justify-content: flex-start;
    margin-left: 45%;
    position: relative;
    padding-bottom: 30px;
}

.button-container {
    display: flex;
    gap: 15px; 
}

/* Button Styling (Assumed based on your original classes) */
.buttonj {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Footer */
.site-footer {
    background-color: black;
    padding: 2.5%;
    text-align: left;
    color: white;
}

.footer-content {
    font-family: Arial, sans-serif;
    font-size: medium;
}
