html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    background-color: #1F1D27;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #ffffff;
    overflow-x: hidden;
}


.custom-line {
    width: 100%;
    height: 1px;
    background-color: #ff4b4b; /* Line color */
    margin: 50px auto; /* Adjust the margin to control spacing */
}


.article-divider {
    width: 30%;
    height: 2px;
    background-color: #ff4b4b;
    margin: 50px auto; /* Adjust spacing between articles */
}


/* Navigation Container */
.nav-container {
    display: flex;
    justify-content: space-between; /* Space between logo and nav links */
    align-items: center;
    padding: 10px 20px; /* Adjust padding for better spacing */
}

/* Blog Name Styling */
.home-link {
    text-decoration: none; /* Remove underline from the link */
    color: inherit; /* Inherit the color from the parent element */
    display: inline-block; /* Make the link an inline block to wrap around the content */
}

.blog-name {
    font-size: 1.8em;
    color: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.thin-text {
    font-weight: 300; /* Thin font weight */
}

.bold-text {
    font-weight: bold; /* Bold font weight */
    color: #ff4b4b;
}

/* Navigation Links */
.nav-links {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links li a.active,
.mobile-menu li a.active {
    color: #ff4b4b;
}

.nav-links li a:hover {
    color: #ff4b4b; /* Change color on hover */
}


/* Header */
header {
    text-align: center;
    margin-top: 100px;
    margin-bottom: 100px;
}


h1.squada-one-regular {
    font-family: 'Squada One', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 6em;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #ffffff;
    margin-top: 5px;
    margin-bottom: 1px;
  }
  
h2.squada-one-regular {
    font-family: 'Squada One', sans-serif;
    font-size: 2em;
    font-weight: 400;
    color: #ffffff; 
    margin-top: 10px;
    letter-spacing: 2.3px;
    margin-bottom: 5px;
}

header h3.tagline {
    font-family: 'Squada One', sans-serif;
    font-size: 2em; 
    color: #ff4b4b; 
    margin-top: -30px; 
    letter-spacing: 2.3px; /* Slightly spaced out letters */
    text-align: center; /* Center-align the tagline */
    font-weight: 200;
    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0.2), /* Light shadow */
                 0px 0px 10px rgba(255, 255, 255, 0.15); /* Glow effect */
}


/* Genre Section */
#genres .squada-one-regular {
    font-family: 'Squada One', sans-serif;
    font-size: 1.5em;
    font-weight: 300;
    color: #ffffff; 
    text-align: center;
    margin-top: 15px; /* Adjust the spacing as needed */
    text-transform: uppercase; /*Makes the text uppercase */
    letter-spacing: 1px; /* Adjust letter spacing if needed */
}

#genres {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

#genres a {
    text-decoration: none; 
    color: inherit;
}

.genre-box {
    margin: 0 20px;
    padding: 10px;
    border: 0.5px solid; 
    border-radius: 15px;
    text-align: center;
    width: 200px; /* Fixed width */
    height: 240px; /* Fixed height */
    transition: all 0.3s ease;
    background-color: #1F1D27; 
    color: #A4A1AC;
    overflow: hidden; /* Ensure content doesn't overflow */
    position: relative;
}


.genre-box img {
    width: 100%; /* Covers the full width of the genre box */
    height: 180px; /* Set height to take up a good portion of the box */
    object-fit: cover; /* Cover the area, cropping if necessary */
    border-radius: 5px;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.genre-box p {
    margin-top: 20px;
    width: 100%;
    text-align: center;
    position: relative;
    text-decoration: none !important; /* Insisting to remove any deco, used in conjuction with #genres a style */
}

/* Hover Effects */
.genre-box:hover {
    background-color: #ff4b4b; 
    color: #ff4b4b;
    transform: translateY(-5px);
}

.genre-box:hover img {
    filter: brightness(80%);
}

.genre-box:hover p {
    color: #ffffff;
    text-decoration: none !important;
}


/* Recommended Articles */
#recommended {
    margin-bottom: 40px;
    padding: 20px; /* Add padding inside the section */
    background-color: #45434F; /* Set the background color to #A4A1AC */
    border-radius: 40px; /* Border radius for modern look */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Slight elevation */
}

#recommended h3.squada-one-regular {
    font-family: 'Squada One', sans-serif;
    text-align: center;
    font-size: 2.5em;
    color: #ffffff; /* Change text color to light for contrast */
    margin-top: -5px;
    margin-bottom: 50px;
    letter-spacing: 3.5px;
    line-height: 1.2;
    font-weight: 300;
}

.recommended-post {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    background-color: #1F1D27; /* A slightly darker shade for the post background */
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Soften the shadow for a subtle effect */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recommended-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 75, 75, 0.3);
}

.recommended-post img {
    width: 150px;
    height: 100px;
    margin-right: 20px;
    border-radius: 25px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.recommended-post:hover img {
    transform: scale(1.02);
}

.post-info {
    flex: 1;
}

.post-info h4 {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff; /* Maintain contrast with the background */
    margin: 10px 0;
}

.post-info p {
    color: #cccccc; /* Adjust the color for contrast */
    font-size: 18px;

}

.post-info p strong {
    font-size: 16px;
    color: #cccccc;
}

.post-info h4 a {
    text-decoration: none;  /* Remove the underline */
    color: #ffffff;  /* Change the link color */
}

.post-info h4 a:hover {
    color: #ff6347;  /* Change the color on hover, e.g., to tomato */
    text-decoration: none; 
}

/* Subscribe Section */
#subscribe {
    text-align: center;
    margin-bottom: 40px;
}

#subscribe h3.squada-one-regular {
    font-family: 'Squada One', sans-serif;
    font-size: 2.5em;
    color: #ffffff; 
    margin-bottom: 20px;
    letter-spacing: 3.5px;
    line-height: 1.2;
    font-weight: 300;
}

#subscribe form {
    display: inline-block;
    background-color: #2c2c2c; 
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

#subscribe input {
    padding: 10px;
    font-size: 1em;
    margin-right: 10px;
    border: 1px solid #ff4b4b; 
    border-radius: 15px;
    width: 250px;
    transition: all 0.3s ease;
    background-color: #1c1c1c; 
    color: #ffffff; 
}

#subscribe input:focus {
    border-color: #ff4b4b; 
}

#subscribe button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    background-color: #ff4b4b;
    color: #ffffff;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#subscribe button:hover {
    background-color: #cc0000; 
}

.message-list {
    list-style-type: none;
    padding: 10px 0;
    text-align: center;
}

.message {
    margin-top: 10px;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

.message.success {
    background-color: #28a745;
    color: white;
}

.message.info {
    background-color: #007bff;
    color: white;
}

.message.error {
    background-color: #dc3545;
    color: white;
}

/* Footer */
footer {
    position: relative;
    bottom: 0;
    width: 100%;
    background-color: #1F1D27;
    padding: 50px 0;
    text-align: center;
}

footer p {
    margin: 8px 0;
}

footer p:first-child {
    color: #ffffff;
    font-size: 14px;
}

.footer-quote {
    font-size: 11px;
    color: #ff4b4b;
}

/* Blog Genre Navigation */
#blog-genres {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    margin-top: 40px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

#blog-genres ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

#blog-genres ul li {
    margin-right: 20px;
}

#blog-genres ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    transition: color 0.3s ease;
}

#blog-genres ul li a.active {
    color: #ff4b4b; 
}

#blog-genres ul li a:hover {
    color: #007BFF;
}

/* Blog Posts */
#blog-posts {
    display: flex;
    flex-direction: column;
    gap: 20px; 
}

.post {
    display: flex;
    padding: 20px;
    background-color: #3A3845;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.05);
}

.post:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 75, 75, 0.3);
}

.post img {
    width: 150px;
    height: 150px;
    margin-right: 20px;
    object-fit: cover;
    border-radius: 25px;
    background-color: #e0e0e0; 
}

.post:hover img {
    transform: scale(1.02);
}

.post-content {
    flex: 1;
}

.post-content p {
    margin-bottom: 10px;
    color: #cccccc; 
}

.post-content p strong {
    margin-bottom: 10px;
    color: #cccccc; 
}

.post-content h2 {
    font-size: 1.5em;
    color: #ffffff;
    margin-bottom: 10px;
}

.post-content h2 a {
    text-decoration: none;  
    color: #ffffff;         
}

.post-content h2 a:hover {
    text-decoration: none;  
    color: #ff4b4b; 
}

.post-content .tags {
    font-size: 0.9em;
    color: #777;
}

.post-content .tags .highlight {
    color: #ff4b4b; 
}

.blog-title {
    color: #242424;  
    font-size: 2.5rem;
    margin-top: 10px;  
    margin-bottom: 5px;
    font-weight: bold;
    letter-spacing: 0.03em;  
}

.blog-subtitle {
    color: #6b6b6b;
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 10px;
    margin-bottom: 5px;
}

.blog-metadata {
    text-align: center;
    font-size: 0.95rem;
    color: #666666;
    margin: 15px 0 25px 0;
}

.blog-content {
    font-size: 0.96rem;
    line-height: 1.8;
    margin: 20px 0;
    text-align: justify;
    color: #444444; /* Base color for paragraph text */
}

.tech-empty-message a,
.tech-empty-message a:visited,
.tech-empty-message a:hover,
.tech-empty-message a:active,
.tech-empty-message a:focus {
    color: #ff4b4b;
    text-decoration: none;
}

.tech-empty-message a:hover {
    text-decoration: underline;
}

/* Paragraphs */
.blog-content p {
    margin-bottom: 20px;
    color: #555555; /* Slightly lighter for comfortable reading */
}

/* Heading 1 inside blog content (CKEditor H1) */
.blog-content h1 {
    font-size: 2.2rem;
    font-weight: bold;
    color: #1f1f1f; /* Darker, matches title */
    margin: 40px 0 20px;
}

/* Heading 2 inside blog content (CKEditor H2) */
.blog-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #3a3a3a;
    margin: 20px 0 12px;
}

.blog-content h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: #3a3a3a;
    margin: 18px 0 12px;
    border-bottom: 1px solid #ddd;       /* Removes underline */
    padding: 0;
}

.blog-content p.section-divider {
    text-align: center;
    font-size: 2rem;
    letter-spacing: 12px;
    color: #999999;
    margin: 15px 0;
    line-height: 1;
}

/* Add a container class for centering */
.blog-container {
    max-width: 800px; 
    margin: 0 auto;
    padding: 30px 20px;
    background-color: #ffffff;
    color: #333333; 
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 10px; 
    overflow: hidden; 
}

/* Default styling for all blog images (desktop first) */
.blog-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.image-credit {
    font-size: 0.7rem;
    margin-top: 4px;
    font-style: italic;
    text-align: center;
}

/* Screen responsiveness */
@media screen and (max-width: 1200px) {
    .blog-container {
        max-width: 90%; 
    }
}

@media screen and (max-width: 768px) {
    .blog-title {
        font-size: 2rem; /* Smaller font for mobile */
    }

    .back-to-blog {
        padding: 8px 20px; /* Adjust padding on smaller screens */
    }
}

.blog-header {
    background-color: #f9f9f9; 
    padding: 20px;
    border-bottom: 2px solid #ddd; 
    text-align: center;
    border-radius: 10px 10px 0 0; 
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.published-date {
    font-size: 1rem;
    margin-bottom: 5px;
}

/* Style for the word 'Genre' */
.genre-label {
    color: #ff4b4b;  /* Font color for 'Genre' */
    font-weight: bold;
}

/* Style for the actual genre (e.g., 'Philosophy') */
.genre-value {
    color: #1F1D27;  
    font-weight: normal;
}

/* Style for the word 'written-by' */
.written-by-label {
    color: #ff4b4b;  /* Font color for 'Genre' */
    font-weight: bold;
}

/* Style for its value*/
.written-by-value {
    color: #1F1D27;  
    font-weight: normal;
}

/* Style for the "Back to Blog" button container */
.back-to-blog {
    display: inline-block;                
    padding: 10px 30px;                    
    color: #000000;                       
    background-color: #ffffff;            
    border: 2px solid #000000;            
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-to-blog:hover {
    background-color: #ff4b4b; 
    color: #ffffff;            
}

.blog-container .blog-footer {
    background-color: transparent !important; 
    padding: 20px 0;
    text-align: center;
}


/* Contact Page */
.contact-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px;
    background-color: #1F1D27; 
    min-height: calc(100vh - 100px); /* Adjust the height minus the header */
    margin-top: -40px;
}

.contact-form {
    flex: 1;
    color: #ffffff;
}

.contact-form h1.squada-one-regular {
    font-family: 'Squada One', sans-serif;
    font-size: 4em;
    font-weight: 500;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 6px;
    color: #ffffff;
}

.contact-form h3.tagline {
    font-family: 'Squada One', sans-serif;
    font-size: 1.4em; 
    color: #ff4b4b; 
    margin-top: 3px; 
    margin-bottom: 30px;
    letter-spacing: 2.3px; 
    text-align: left; /* left-align the tagline */
    font-weight: 200;
    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0.2), /* Light shadow */
                 0px 0px 10px rgba(255, 255, 255, 0.15); /* Glow effect */
    }


.contact-form label {
    font-size: 1em;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: none;
    border-bottom: 1px solid #ffffff;
    background-color: transparent;
    color: #ffffff;
    font-size: 1em;
    outline: none;
}

.contact-form input[type="email"] {
    text-transform: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #ffffff;
}

.contact-form button {
    background-color: #ff4b4b;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #e63946;
}


.message-list {
    list-style-type: none;
    padding: 10px 0;
    text-align: center;
}

.message {
    margin-top: 10px;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

.message.success {
    background-color: #28a745;
    color: white;
}

.message.info {
    background-color: #007bff;
    color: white;
}

.message.error {
    background-color: #dc3545;
    color: white;
}


/* Contact Image */
.contact-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center; 
}

.contact-image img {
    width: 450px;
    height: 450px; 
    border-radius: 50%; /* Making the image circular */
    border: 3px solid #1F1D27; /* Adding a solid border, can change the color */
    object-fit: cover; /* Ensured the image fits inside the circular container */
    margin-top: 150px;
}

/* About Page Styling */
/* Match spacing between sections: 50px padding + 26.8px heading margin = 76.8px total */
.about-page {
    background-color: #1F1D27;
    color: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.about-section {
    text-align: center;
    padding: 50px 0;
}

.writers-section {
    text-align: center;
    padding: 50px 0;
}

/* Background Image Section */
.background-image-section {
    position: relative; /* Position relative to allow further control over the child */
    text-align: center; 
    margin: 26.8px 0 0 0; /* Adjust margin to create space between the sections */
}

.background-image-section img {
    width: 20%; 
    height: auto;
    aspect-ratio: 1/1;
    opacity: 1; 
    display: block;
    margin: 0 auto; 
    z-index: 1; 
    position: relative; 
    border-radius: 15px; /* Added rounded corners, adjust value for more/less rounding */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Headings */
h1 {
    color: #ffffff;
    font-family: 'Squada One', sans-serif;
    font-size: 2.5em;
    letter-spacing: 3.5;
    font-weight: 400;
    margin-top: 26.8px;
    margin-bottom: 26.8px;
}


/* Custom Line Under Headings */
.custom-line {
    width: 100px;
    height: 4px;
    background-color: #ff4b4b;
    margin: 35px auto;
}

/* About Description Text */
.about-description {
    font-size: 1.2em;
    width: 60%;
    margin: 0 auto;
    line-height: 1.8;
    color: #cccccc;
}

/* Writers Section */
.writers-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.writer {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Writer Photos */
.writer-photo {
    width: 170px; 
    height: 170px; 
    object-fit: cover; 
    border-radius: 60%; 
    border: 4px solid #ff4b4b; 
    margin-bottom: 20px;
}

.writer h2 {
    color: #ffffff;
    font-size: 1.5em;
}

.writer p {
    font-size: 1.2em;
    line-height: 1.8;
    color: #cccccc;
    margin: 20px auto;
    width: 70%;
    text-align: justify;
}

.writer p:last-of-type {
    margin: 20px auto 0 auto; /* top | right | bottom | left */
}

/* Timeline Section */
.timeline-section {
    text-align: center;
    padding-bottom: 50px;
}

.timeline-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-top: 40px;
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-year {
    color: #ffffff;
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    background-color: #ffffff;
    border-radius: 50%;
    z-index: 2;
}

.timeline-line {
    width: 3px;
    height: 80px;
    background-color: #ff4b4b;
    margin: 0 auto;
}

.timeline-description {
    font-size: 0.95em;
    color: #cccccc;
    max-width: 500px;
    margin-top: 10px;
    text-align: center;
    line-height: 1.6;
}

/* For Hidden Button and upload form */
.upload-btn {
    background-color: #4CAF50; 
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.upload-btn:hover {
    background-color: #ff4b4b; 
}

/* Universal box-sizing to ensure padding and border are included within the width */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Form container styling */
.form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #1F1D27;
}

/* Title Styling */
.form-container h1 {
    font-size: 2rem;
    color: #333333;
    text-align: center;
    margin-bottom: 20px;
}

/* Label styling */
.form-container label {
    font-weight: bold;
    color: #333333;
    margin-bottom: 5px;
    display: block;
}

/* Input, textarea, and select styling */
.form-container input[type="text"],
.form-container textarea,
.form-container input[type="file"] {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    color: #333333;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

.form-container textarea {
    resize: vertical;
    height: 150px;
}

/* Button styling */
.form-container .btn-submit {
    background-color: #28a745;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: center;
}

.form-container .btn-submit:hover {
    background-color: #218838;
}

/* Back link styling */
.form-container .back-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #007BFF;
    text-decoration: none;
}

.form-container .back-link:hover {
    text-decoration: underline;
}


.submit-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
}

.submit-btn:hover {
    background-color: #45a049;
}

/* ===========================
   Apps Page Styling
=========================== */

/* Whole apps page area */
.apps-page {
  padding: 3rem 1.5rem;
  background: #1a1a1a; /* same tone as About page */
  color: #e5e7eb;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

/* Center all section content */
.centered-section {
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}

/* Subheading under Apps title */
.section-subheading {
  font-size: 1rem;
  color: #9ca3af;
  margin-top: -5px;
  margin-bottom: 10px;
}

/* Keep our global .custom-line styling as is (no duplication) */


/* ===========================
   Apps Page Section
=========================== */
.apps-page.centered-section {
  background: transparent; /* no black background */
  padding: 3rem 1.5rem;
  color: #e5e7eb;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  text-align: center;
}

.apps-page.centered-section h1 {
  font-size: 2.5rem;
  color: #ffffff;
  font-family: 'Squada One', sans-serif;
  margin-bottom: 0.5rem;
}

.section-subheading {
  font-size: 1rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}

/* Keep your global .custom-line styling as it is. It will work here automatically. */

/* ===========================
   App Cards Container
=========================== */
.app-cards-container {
  display: flex;
  flex-direction: column;   /* stack cards vertically */
  align-items: center;      /* center each card horizontally */
  gap: 2rem;                /* space between the two cards */
  padding: 1rem 0 3rem;
}

/* ===========================
   App Card Styling
=========================== */
.app-card {
  background: transparent; /* removed black box */
  border: 1px solid #ff4b4b; /* solid red border */
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 1200px; /* make it wider */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: none; /* remove dark shadow */
}

.app-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

/* Layout inside card */
.app-card-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

/* Left column (image) */
.app-image-wrapper {
  flex: 1 1 300px;
  max-width: 480px;
}

.app-image {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

/* Right column (info) */
.app-info {
  flex: 2 1 400px;
  text-align: left;
}

.app-info h2 {
  font-size: 2rem;
  margin-bottom: 0.4rem;
  margin-top: 0.4rem;
  color: #ffffff;
}

/* MVP / Beta tag */
.status-tag {
  display: inline-block;
  background: #333333;
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* App description */
.app-description {
  margin: 1rem 0 1.5rem;
  color: #cccccc;
}

/* How it works section */
.how-it-works {
  margin-top: 1em;
}

.how-it-works-btn {
  background: #ff4b4b;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease;
}

.how-it-works-btn:hover {
  background: #c23434;
}

/* Smooth expand/collapse */
.how-it-works-list {
  list-style-type: decimal;
  margin-top: 10px;
  padding-left: 1.4rem;
  color: #d1d5db;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

/* Show state */
.how-it-works-list.show {
  max-height: 300px;
  opacity: 1;
}

.how-it-works-list li {
  margin: 6px 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Tech stack title */
.tech-stack-title {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

/* Tech stack badges */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-badge {
  background: #1f2937;
  color: #cccccc;
  border-radius: 12px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border: 1px solid rgba(147, 197, 253, 0.3);
  transition: all 0.2s ease-in-out;
}

/* Links at bottom */
.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.app-link {
  background: #ff4b4b;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.app-link:hover {
  background: #1e40af;
}

.app-note-label {
    font-weight: 900;
    text-decoration: underline;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .app-card-content {
    flex-direction: column;
    text-align: center;
  }

  .app-image-wrapper {
    max-width: 100%;
  }

  .app-info {
    text-align: center;
  }

  .app-info h2 {
    font-size: 1.6rem;
  }

  .app-description {
    font-size: 0.95rem;
  }

  .tech-stack {
    justify-content: center;
  }
}

/* Hide image on small screens */
@media (max-width: 768px) {
  .app-image-wrapper {
    display: none;
  }

  .app-card-content {
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* tighter spacing */
  }

  .app-info {
    text-align: center;
  }

  .app-info h2 {
    margin-top: 0.5rem;
    font-size: 1.6rem;
  }

  .app-description {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .tech-stack {
    justify-content: center;
  }
}

/* Responsive Design */
@media screen and (max-width: 480px) {
    /* Navigation */
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    /* Hide desktop links in mobile */
    .nav-links {
        display: none;
    }

    /* Show hamburger in mobile */
    .hamburger {
        display: block;
        font-size: 2em;
        color: #ffffff;
        cursor: pointer;
    }

    /* Show mobile menu only when toggled */
    .mobile-menu {
        display: none;
        flex-direction: column;
        list-style: none;
        margin: 0;
        padding: 10px;
        background-color: #1F1D27;
    }

    .mobile-menu.active {
        display: flex;
    }

    .mobile-menu li {
        padding: 10px;
        text-align: center;
    }

    .mobile-menu li a {
        color: #ffffff;
        text-decoration: none;
        font-weight: bold;
    }

    .mobile-menu li a:hover {
        color: #ff4b4b;
    }

    .blog-name {
        text-align: left;
        font-size: 1.2em;
    }

    /* Header */
    header h1.squada-one-regular {
        font-size: 2.2em;
        margin: 10px 0;
    }

    header h2.squada-one-regular {
        font-size: 1.2em;
    }

    header h3.tagline {
        font-size: 1.2em;
        margin-top: 0;
    }

    /* Genres section */
    #genres {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 20px;
    }

    .genre-box {
        width: 90vw; /* Fill most of the screen width */
        padding: 10px;
        border: 1px solid #aaa;
        border-radius: 7px;
        height: auto;
    }

    .genre-box img {
        width: 100%;
        height: 160px;
        object-fit: cover;
        border-radius: 5px;
    }

    /* Recommended posts */
    #recommended h3.squada-one-regular {
        font-size: 1.6em;
    }

   .recommended-post {
        background-color: #1F1D27;
        border-radius: 20px;
        padding: 12px 18px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        width: 100%;
        text-align: center;
    }

    .recommended-post img,
    .recommended-post .post-info p {
        display: none;
    }

    .recommended-post h4 {
        font-size: 1em;
        margin: 0;
    }

    .recommended-post h4 a {
        text-decoration: none;
        color: #ffffff;
        font-weight: 600;
    }

    .post-info p,
    .post-info h4,
    .post-info h4 a {
        font-size: 1em;
    }

    /* Subscribe section */
    #subscribe input,
    #subscribe button {
        width: 100%;
        margin: 10px 0;
    }

    #subscribe form {
        padding: 10px;
        width: 100%;
    }

    /* Footer */
    footer ul {
        flex-direction: row;
        justify-content: center;
    }

    footer ul li {
        margin: 0 10px;
    }

    /* About Page Layout */
    .about-section,
    .writers-section {
        padding: 30px 0;
    }

    .writers-section h2 {
        font-size: 2em;
        letter-spacing: 2px;
    }

    .about-section h1 {
        font-size: 2em;
        margin-bottom: 10px;
    }

    .about-description {
        font-size: 1em;          /* Same size as description */
        width: 100%;               /* Full width */
        padding: 0 20px;           /* Add side padding instead */
        line-height: 1.7;          /* Improve vertical rhythm */
        text-align: left;          /* Better natural reading on small screens */
    }

    .background-image-section img {
        width: 70%;
        max-width: 300px;
        height: auto;
        border-radius: 15px;
        margin: 0 auto 30px auto;
        display: block;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .writer-photo {
        width: 140px;
        height: 140px;
    }

    .writer {
        max-width: 100%;
        margin: 20px auto;
    }

    .writer h3 {
        font-size: 1.2em;
    }

    .writer p {
        font-size: 1em;
        line-height: 1.7;
        padding: 0 20px;
        text-align: center;
    }

    h1, h2 {
        font-size: 1.8em;
    }

    .custom-line {
        width: 80px;
        height: 3px;
        margin: 25px auto 30px auto;
    }

    /* Blog Page */
    #blog-posts {
        gap: 15px;
    }

    .post {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
        height: auto; /* allow flexibility */
        background-color: #3A3845;
        border-radius: 40px;
        text-align: center;
    }

    .post img {
        width: 80%;
        height: 120px;
        object-fit: cover;
        margin: 0 auto 10px auto;
        border-radius:25px;
        background-color: #e0e0e0; 
    }

    .post-content {
        width: 100%;
        padding: 0 10px;
    }

    .post-content h2 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }

    .post-content p {
        font-size: 0.95em;
    }

    #blog-genres {
    overflow-x: auto;
    padding-bottom: 10px;
    }

    #blog-genres ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
    }

    #blog-genres ul li {
        margin-right: 0;
        flex: 0 0 auto;
    }

    #blog-genres ul li a {
        display: inline-block;
        padding: 6px 14px;
        font-size: 0.9em;
        background-color: #333;
        border-radius: 20px;
        white-space: nowrap;
        border: 1px solid transparent;
    }

    #blog-genres ul li a.active {
        background-color: #ff4b4b;
        color: #ffffff;
    }

    #blog-genres ul li a:hover {
        border-color: #ff4b4b;
    }

    .article-divider {
        margin: 50px auto;
        height: 1.5px;
    
    }
    /* Contact Page */
    .contact-container {
        flex-direction: column;
        padding: 20px;
        gap: 30px;
        text-align: center;
    }

    .contact-form {
        margin-top: 70px;
    }

    .contact-form h1.squada-one-regular {
        font-size: 2em;
        margin-bottom: 5px;
    }

    .contact-form h3.tagline {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .contact-form label {
        font-size: 0.95em;
        text-align: left;
        display: block;
        margin-bottom: 6px;
        padding-left: 4px;
    }

    .contact-form input,
    .contact-form textarea {
        width: 100%;
        font-size: 0.95em;
        padding: 10px;
        border-radius: 5px;
        border: 1px solid #ffffff;
        background-color: #1a1a1a;
        color: #ffffff;
    }

    .contact-form textarea {
        resize: vertical;
    }

    .contact-form button {
        width: 100%;
        padding: 10px;
        font-size: 1em;
        margin-top: 10px;
    }

    /* Contact Image */
    .contact-image img {
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 10px;
        border: none;
        object-fit: cover;
        display: block;
        margin: 20px 0 0 0;
    }
}

/* Desktop-specific navigation visibility */
@media screen and (min-width: 481px) {
    .nav-links {
        display: flex;
        list-style: none;
        gap: 20px;
        margin: 0;
    }

    .nav-links li a {
        color: #ffffff;
        text-decoration: none;
        font-weight: bold;
    }

    .nav-links li a:hover {
        color: #ff4b4b;
    }

    .hamburger,
    .mobile-menu {
        display: none;
    }

    
}

@media screen and (max-width: 768px) {
    .blog-header {
        padding: 15px 20px;
        background-color: #f7f7f7;
        border: 1px solid #eee;
        border-radius: 12px;
        margin-bottom: 10px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }

    .blog-subtitle {
        font-size: 1rem;
        color: #6b6b6b;
        margin-top: 5px;
        margin-bottom: 15px;
        text-align: center;
        line-height: 1.4;
        padding: 0 15px;
    }

    .blog-metadata {
        font-size: 0.85rem;
        color: #666666;
        text-align: center;
        margin: 10px 0 20px 0;
        padding: 0 10px;
        line-height: 1.4;
    }

    .genre-label,
    .written-by-label {
        color: #ff4b4b;
        font-weight: 600;
    }

    .blog-container {
        padding: 15px;
        margin: 0 auto;
        width: 95%;
    }

    .blog-title {
        font-size: 1.5em;
        text-align: center;
        padding: 0 10px;
    }

    .published-date,
    .written-by,
    .genre {
        font-size: 1em;
        text-align: center;
    }

    .blog-content {
        font-size: 1.05em;
        line-height: 1.8;
        padding: 0 15px;
    }

    .blog-content img {
        max-width: 100%;
        height: auto;
        margin: 20px 0;
        display: block;
    }

    .back-to-blog {
        display: block;
        text-align: center;
        margin: 30px 0;
    }

    .blog-content img {
        max-width: 90%;
        height: auto;
        display: block;
        margin: 20px auto;
        border-radius: 16px;
        object-fit: cover;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

}

/* For slighty larger screen such as ipad mini */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    /* Fix genre section layout */
    #genres {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        padding: 20px;
    }

    .genre-box {
        width: 40vw;
        max-width: 300px;
        min-height: 300px; /* Increased to accommodate fixed image + text */
        padding: 10px;
        border: 1px solid #aaa;
        border-radius: 10px;
        text-align: center;
        background-color: #1F1D27;
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* Ensure image stays on top, text at bottom */
    }

    .genre-box img {
        width: 100%;
        height: 200px; /* fixed height ensures equal layout */
        object-fit: cover;
        border-radius: 8px;
        display: block;
    }

    .genre-box p {
        font-size: 1.1em;
        color: #ffffff;
        margin-top: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Adjust homepage title text size for tablets */
    header h2.squada-one-regular {
        font-size: 1.9em;
        margin-bottom: 10px;
    }

    header h1.squada-one-regular {
        font-size: 4em;
        letter-spacing: 1px;
        margin: 10px 0;
    }

    header h3.tagline {
        font-size: 1.7em;
        margin-top: 10px;
        color: #ff4b4b;
    }

    /* Optional: Reduce overall padding/margin on tablet for better spacing */
    .page-container {
        padding: 0 25px;
    }
}

/* For slightly larger screens such as iPad Air (820px - 1180px) */
@media screen and (min-width: 820px) and (max-width: 1180px) {
    /* Navigation */
    .nav-container {
        padding: 18px 30px;
    }

    .nav-links li {
        margin-left: 28px; /* More spacing between nav items */
    }

    .nav-links li a {
        font-size: 1.2em;  /* Increased font size for better legibility */
        font-weight: 600;
    }

    .blog-name {
        font-size: 1.5em; /* Logo size slightly bigger */
    }
    /* Genres Section */
    #genres {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px;
        padding: 30px;
    }

    .genre-box {
        width: 38vw; /* Slightly narrower to give more breathing room */
        max-width: 360px; /* Increased max size */
        min-height: 340px; /* Taller box */
        padding: 14px;
        border: 1px solid #aaa;
        border-radius: 12px;
        text-align: center;
        background-color: #1F1D27;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .genre-box img {
        width: 100%;
        height: 220px; /* Larger images */
        object-fit: cover;
        border-radius: 10px;
        display: block;
    }

    .genre-box p {
        font-size: 1.25em; /* Larger text under images */
        color: #ffffff;
        margin-top: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Header (Welcome, Title, Tagline) */
    header h2.squada-one-regular {
        font-size: 2.2em;
        margin-bottom: 12px;
    }

    header h1.squada-one-regular {
        font-size: 4.6em;
        letter-spacing: 1.2px;
        margin: 16px 0;
    }

    header h3.tagline {
        font-size: 2em;
        margin-top: 12px;
        color: #ff4b4b;
    }

    /* General container spacing */
    .page-container {
        padding: 0 32px;
    }
}


/* For even larger screens such as iPad Pro (1024px - 1366px) */
@media screen and (min-width: 1024px) and (max-width: 1366px) {

    /* ========== Navigation ========== */
    .nav-container {
        padding: 24px 40px;
    }

    .nav-links li {
        margin-left: 34px;
    }

    .nav-links li a {
        font-size: 1.5em;  /* was 1.35em */
        font-weight: 600;
    }

    .blog-name {
        font-size: 1.9em;  /* was 1.7em */
    }

    /* ========== Genre Section ========== */
    #genres {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
        padding: 40px;
    }

    .genre-box {
        width: 40vw;
        max-width: 420px;
        min-height: 380px;
        padding: 16px;
        border: 1px solid #aaa;
        border-radius: 12px;
        text-align: center;
        background-color: #1F1D27;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .genre-box:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    }

    .genre-box img {
        width: 100%;
        height: 260px;
        object-fit: cover;
        border-radius: 10px;
        display: block;
    }

    .genre-box p {
        font-size: 1.65em;  /* was 1.35em */
        color: #ffffff;
        margin-top: 14px;
        letter-spacing: 0.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ========== Header (Title Section) ========== */
    header h2.squada-one-regular {
        font-size: 2.7em;  /* was 2.4em */
        margin-bottom: 12px;
    }

    header h1.squada-one-regular {
        font-size: 5.5em;  /* was 5em */
        letter-spacing: 1.2px;
        margin: 20px 0;
    }

    header h3.tagline {
        font-size: 2.5em;  /* was 2.2em */
        margin-top: 12px;
        color: #ff4b4b;
    }

    /* ========== General Spacing ========== */
    .page-container {
        padding: 0 40px;
    }

    /* Optional: scale up footer icons a bit */
    footer ul li img {
        width: 36px;
        height: 36px;
    }
    /* ========== Updated Content Text ========== */

    .about-description {
        font-size: 1.5em; /* was 1.2em */
        line-height: 2;
    }

    .writer h2 {
        font-size: 1.7em; /* was 1.5em */
    }

    .writer p {
        font-size: 1.5em; /* was 1.2em */
        line-height: 2;
    }

    .timeline-description {
        font-size: 1.5em; /* was 0.95em */
        line-height: 1.8;
    }

    .timeline-year {
        font-size: 2.2em; /* small bump from 2em */
    }

    #blog-genres ul li a {
        font-size: 1.2em;
     
    }
    
    .post-content h2 {
        font-size: 1.9em;
    }

    .blog-content {
        font-size: 1.40em;
    }

    .blog-content h3 {
        font-size: 1.55rem;
    }

    .app-description {
        font-size: 1.35rem;
    }

    .how-it-works-btn {
        font-size: large;
        }

    .how-it-works-list li {
        font-size: 1.25rem;
       
    }

    .app-note {
        font-size: 1.1rem;
    }

    .app-links {
        font-size: large;
    }

    footer p:first-child {
        font-size: 16px;
    }

    .footer-quote {
        font-size: 13px;
    }
}

/* ===========================
   Responsive Refresh Overrides
=========================== */

:root {
    --page-max-width: 1180px;
    --nav-max-width: 1680px;
    --content-max-width: 860px;
    --wide-page-max-width: 1460px;
    --blog-max-width: 1520px;
    --dark-surface-texture:
        linear-gradient(105deg, rgba(255, 255, 255, 0.032) 0%, rgba(255, 255, 255, 0) 22%),
        linear-gradient(285deg, rgba(255, 255, 255, 0.022) 8%, rgba(255, 255, 255, 0) 34%),
        linear-gradient(180deg, rgba(50, 47, 60, 0.98), rgba(30, 28, 37, 0.99)),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.012) 0 1px,
            rgba(255, 255, 255, 0) 1px 14px
        );
    --page-padding: clamp(1rem, 2vw, 2rem);
    --section-gap: clamp(2rem, 5vw, 4rem);
    --card-radius: clamp(1rem, 2vw, 1.75rem);
}

body {
    font-size: clamp(0.98rem, 0.22vw + 0.92rem, 1.08rem);
    background-color: #1F1D27;
    background-image:
        linear-gradient(108deg, rgba(255, 255, 255, 0.028) 0%, rgba(255, 255, 255, 0) 24%),
        linear-gradient(288deg, rgba(255, 255, 255, 0.02) 6%, rgba(255, 255, 255, 0) 28%),
        linear-gradient(180deg, rgba(36, 34, 44, 0.995), rgba(28, 26, 35, 0.995)),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.008) 0 1px,
            rgba(255, 255, 255, 0) 1px 18px
        );
}

nav,
header,
#genres,
#recommended,
#subscribe,
#blog-genres,
#blog-posts,
.contact-container,
.apps-page.centered-section,
.about-section,
.writers-section,
.timeline-section {
    width: min(100% - (var(--page-padding) * 2), var(--page-max-width));
    margin-left: auto;
    margin-right: auto;
}

nav {
    width: 100%;
}

.nav-container {
    gap: 1rem;
    padding: 1rem 0;
    width: min(100% - max(2rem, 4vw), var(--nav-max-width));
    margin-left: auto;
    margin-right: auto;
}

.blog-name {
    font-size: clamp(1.15rem, 1.4vw + 0.95rem, 1.9rem);
    letter-spacing: 0.04em;
}

.nav-links {
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
    flex-wrap: wrap;
    padding-left: 0;
}

.nav-links li {
    margin-left: 0;
}

.nav-links li a,
.mobile-menu li a {
    font-size: clamp(0.95rem, 0.35vw + 0.88rem, 1.05rem);
}

header {
    margin-top: clamp(3rem, 9vw, 6rem);
    margin-bottom: clamp(3rem, 8vw, 5.5rem);
    padding: 0 var(--page-padding);
}

h1.squada-one-regular {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    letter-spacing: clamp(0.05rem, 0.35vw, 0.2rem);
}

h2.squada-one-regular {
    font-size: clamp(1.35rem, 2vw, 2rem);
}

header h3.tagline {
    font-size: clamp(1.15rem, 2vw, 1.9rem);
    margin-top: clamp(-0.75rem, -1vw, -0.25rem);
}

#genres {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: stretch;
}

.genre-box {
    width: auto;
    height: 100%;
    min-height: 100%;
    margin: 0;
    border-color: rgba(255, 255, 255, 0.16);
    border-radius: var(--card-radius);
    padding: 0.9rem;
    background: var(--dark-surface-texture);
}

.genre-box img {
    height: clamp(160px, 18vw, 230px);
    border-radius: 0.9rem;
}

.genre-box--technology img {
    object-position: center top;
}

.genre-box p {
    margin-top: 1rem;
}

#recommended,
#subscribe,
#blog-posts,
.form-container,
.blog-container {
    border-radius: var(--card-radius);
}

#recommended {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--dark-surface-texture);
}

.recommended-post {
    border-radius: calc(var(--card-radius) - 0.2rem);
    gap: 1rem;
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 22%),
        linear-gradient(180deg, rgba(53, 50, 64, 0.975), rgba(39, 36, 47, 0.99)),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.008) 0 1px,
            rgba(255, 255, 255, 0) 1px 14px
        );
}

.recommended-post img {
    width: clamp(110px, 18vw, 150px);
    height: clamp(88px, 13vw, 100px);
}

.post-info h4,
.post-content h2 {
    font-size: clamp(1.2rem, 1vw + 0.9rem, 1.6rem);
    line-height: 1.2;
}

.post-info p,
.post-content p,
.about-description,
.writer p,
.timeline-description,
.app-description,
.blog-content {
    font-size: clamp(0.98rem, 0.35vw + 0.92rem, 1.08rem);
}

#subscribe form {
    width: min(100%, 42rem);
    display: grid;
    grid-template-columns: auto minmax(18rem, 24rem) auto;
    align-items: center;
    justify-content: center;
    justify-items: center;
    gap: 0.85rem;
    flex-wrap: nowrap;
    margin: 0 auto;
}

#subscribe input {
    width: auto;
    min-width: 14rem;
    flex: 1 1 16rem;
    margin-right: 0;
}

#subscribe label {
    white-space: nowrap;
    font-weight: 600;
    justify-self: end;
}

#subscribe button {
    flex: 0 0 auto;
}

#blog-genres,
#blog-posts {
    width: min(100% - max(2rem, 4vw), var(--blog-max-width));
    margin-left: auto;
    margin-right: auto;
}

#blog-genres {
    padding-bottom: 1rem;
}

#blog-genres ul {
    width: 100%;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

#blog-posts {
    gap: 1.25rem;
}

.post {
    align-items: center;
    gap: 1.2rem;
    padding: clamp(1rem, 2.5vw, 1.4rem);
    border-radius: var(--card-radius);
    background:
        linear-gradient(105deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 22%),
        linear-gradient(180deg, rgba(69, 66, 81, 0.975), rgba(56, 53, 68, 0.99)),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.008) 0 1px,
            rgba(255, 255, 255, 0) 1px 16px
        );
}

.post img {
    width: clamp(120px, 22vw, 170px);
    height: clamp(120px, 22vw, 170px);
    margin-right: 0;
}

.blog-container {
    width: min(100% - (var(--page-padding) * 2), var(--content-max-width));
    padding: clamp(1.25rem, 3vw, 2rem);
    margin-top: clamp(1.25rem, 4vw, 2.5rem);
    margin-bottom: clamp(1.5rem, 5vw, 3rem);
    background:
        linear-gradient(108deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 20%),
        linear-gradient(285deg, rgba(221, 208, 189, 0.18) 8%, rgba(255, 255, 255, 0) 32%),
        linear-gradient(180deg, rgba(252, 249, 244, 0.99), rgba(244, 239, 231, 0.98)),
        repeating-linear-gradient(
            90deg,
            rgba(162, 145, 120, 0.02) 0 1px,
            rgba(255, 255, 255, 0) 1px 18px
        );
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.blog-title {
    font-size: clamp(2rem, 3.2vw, 2.9rem);
    line-height: 1.1;
}

.blog-subtitle {
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.45;
}

.blog-content {
    line-height: 1.85;
}

.blog-content h1 {
    font-size: clamp(1.85rem, 3vw, 2.35rem);
}

.blog-content h2 {
    font-size: clamp(1.5rem, 2.4vw, 1.95rem);
}

.blog-content h3 {
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
}

.article-page .blog-container {
    color: rgba(52, 48, 43, 0.94);
    background:
        linear-gradient(108deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 18%),
        linear-gradient(285deg, rgba(184, 165, 141, 0.11) 10%, rgba(255, 255, 255, 0) 34%),
        linear-gradient(180deg, rgba(235, 229, 219, 0.99), rgba(223, 216, 204, 0.985)),
        repeating-linear-gradient(
            90deg,
            rgba(130, 114, 92, 0.032) 0 1px,
            rgba(255, 255, 255, 0) 1px 18px
        );
    border: 1px solid rgba(115, 101, 84, 0.14);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
}

.article-page .blog-header {
    background:
        linear-gradient(108deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 20%),
        linear-gradient(180deg, rgba(221, 213, 201, 0.98), rgba(205, 196, 184, 0.98));
    border-bottom: 1px solid rgba(115, 101, 84, 0.14);
}

.article-page .blog-title,
.article-page .blog-content h1,
.article-page .blog-content h2,
.article-page .blog-content h3 {
    color: #2f2a24;
}

.article-page .blog-subtitle,
.article-page .blog-metadata {
    color: rgba(78, 70, 60, 0.82);
}

.article-page .blog-content,
.article-page .blog-content p,
.article-page .blog-content li,
.article-page .blog-content ul,
.article-page .blog-content ol {
    color: rgba(62, 56, 49, 0.92);
}

.article-page .blog-content h3 {
    border-bottom-color: rgba(255, 75, 75, 0.42);
}

.article-page .blog-content blockquote {
    color: rgba(59, 53, 47, 0.92);
    background: rgba(255, 255, 255, 0.22);
    border-left-color: #ff6a6a;
}

.article-page .blog-content a,
.article-page .blog-content a:visited {
    color: #b74242;
}

.article-page .blog-content [style*="background-color"],
.article-page .blog-content [style*="background:"],
.article-page .blog-content span[style*="color:rgb"] {
    background: transparent !important;
    background-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}

.article-page .back-to-blog {
    color: #2f2a24;
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(115, 101, 84, 0.22);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.article-page .back-to-blog:hover {
    background-color: #ff4b4b;
    border-color: #ff4b4b;
}

.contact-container {
    gap: clamp(2rem, 5vw, 4rem);
    padding: clamp(1.5rem, 4vw, 3rem) 0;
    min-height: auto;
    margin-top: 0;
}

.contact-form,
.contact-image {
    min-width: 0;
}

.contact-image img {
    width: min(100%, 420px);
    aspect-ratio: 1 / 1;
    height: auto;
    margin-top: 0;
    object-fit: cover;
    border-radius: 50%;
}

.about-section,
.writers-section,
.timeline-section,
.apps-page.centered-section {
    padding-left: 0;
    padding-right: 0;
}

.about-description,
.writer p {
    width: min(100%, 70ch);
}

.background-image-section img {
    width: min(100%, 320px);
}

.timeline-description {
    width: min(100%, 36rem);
    padding: 0 1rem;
}

.app-card {
    padding: clamp(1.2rem, 3vw, 2rem);
}

.app-card-content {
    align-items: flex-start;
}

.form-help,
.form-error {
    margin: -0.5rem 0 0.85rem;
    font-size: 0.9rem;
}

.form-help {
    color: #666666;
}

.form-error {
    color: #dc3545;
}

@media screen and (max-width: 1100px) {
    #genres {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-container {
        align-items: flex-start;
    }
}

@media screen and (max-width: 900px) {
    .contact-container,
    .app-card-content,
    .recommended-post,
    .post {
        flex-direction: column;
    }

    .contact-form,
    .contact-image,
    .app-info,
    .post-content {
        width: 100%;
    }

    .app-info,
    .post-content,
    .recommended-post,
    .recommended-post .post-info {
        text-align: left;
    }

    .post img,
    .recommended-post img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}

@media screen and (max-width: 640px) {
    #genres {
        grid-template-columns: 1fr;
    }

    .mobile-menu {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 0.5rem 0 1rem;
    }

    #blog-genres ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.35rem;
    }

    #subscribe form,
    #subscribe input,
    #subscribe button {
        width: 100%;
    }

    #subscribe form {
        grid-template-columns: 1fr;
    }

    .about-description,
    .writer p,
    .blog-content {
        text-align: left;
    }

    .blog-container {
        width: min(100% - 1rem, var(--content-max-width));
        padding: 1rem;
    }
}

/* ===========================
   Layout Modernization
=========================== */

nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(31, 29, 39, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-main {
    min-height: calc(100vh - 13rem);
    padding-bottom: clamp(2rem, 5vw, 4rem);
}

.page-container {
    width: min(100% - (var(--page-padding) * 2), var(--page-max-width));
    margin: 0 auto;
}

.hamburger {
    border: 0;
    background: transparent;
    padding: 0.25rem;
    line-height: 1;
}

.mobile-menu {
    width: min(100% - max(2rem, 4vw), var(--nav-max-width));
    margin: 0 auto;
    padding-left: 0;
}

.mobile-menu.active {
    display: flex;
}

.contact-honeypot {
    position: absolute;
    left: -9999px;
}

.genre-box,
.recommended-post,
.post,
.app-card,
.form-container,
.blog-container,
.contact-form form {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-form form {
    background: var(--dark-surface-texture);
    border-radius: var(--card-radius);
    padding: clamp(1rem, 2.5vw, 1.5rem);
}

.contact-form input,
.contact-form textarea,
.form-container input[type="text"],
.form-container textarea,
.form-container input[type="file"],
.form-container select {
    border-radius: 0.9rem;
}

.contact-form textarea {
    min-height: 11rem;
}

.about-section h1,
.writers-section h1,
.timeline-section h1,
.apps-page.centered-section h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.about-description,
.writer p,
.timeline-description {
    color: rgba(255, 255, 255, 0.78);
}

.writers-container,
.timeline-container {
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.timeline-item {
    width: min(100%, 38rem);
}

.timeline-line {
    height: clamp(3rem, 7vw, 5rem);
}

.app-card {
    background: var(--dark-surface-texture);
}

.app-description {
    color: rgba(255, 255, 255, 0.8);
}

.tech-badge {
    border-color: rgba(255, 75, 75, 0.26);
}

.app-link:hover {
    background: #d73737;
}

.app-note {
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.7;
}

.blog-header {
    background:
        linear-gradient(108deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0) 22%),
        linear-gradient(180deg, #f9f7f3, #ffffff),
        repeating-linear-gradient(
            90deg,
            rgba(162, 145, 120, 0.015) 0 1px,
            rgba(255, 255, 255, 0) 1px 18px
        );
}

.blog-metadata {
    line-height: 1.6;
}

.blog-content blockquote {
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid #ff4b4b;
    background: #faf7f4;
    border-radius: 0.75rem;
}

.blog-content ul,
.blog-content ol {
    padding-left: 1.4rem;
}

.blog-content li + li {
    margin-top: 0.55rem;
}

.blog-footer {
    margin-top: 2rem;
    text-align: center;
}

.form-container {
    width: min(100% - (var(--page-padding) * 2), 48rem);
}

.form-container form {
    margin-top: 1rem;
}

.form-container input[type="text"],
.form-container input[type="file"],
.form-container textarea,
.form-container select {
    margin-top: 0.35rem;
}

.form-container .django-ckeditor-widget,
.form-container .ck-editor,
.form-container .ck-editor__main {
    width: 100%;
}

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-quote {
    font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-style: italic;
    letter-spacing: 0.08em;
}

.contact-form h1.squada-one-regular,
.contact-form h3.tagline {
    text-align: center;
}

.contact-form h3.tagline {
    width: min(100%, 28rem);
    margin-left: auto;
    margin-right: auto;
}

@media screen and (min-width: 1440px) {
    :root {
        --page-max-width: 1600px;
        --nav-max-width: 1760px;
        --content-max-width: 900px;
        --wide-page-max-width: 1620px;
        --blog-max-width: 1700px;
    }

    .blog-content {
        font-size: 1.1rem;
    }
}

@media screen and (min-width: 1200px) {
    :root {
        --page-max-width: 1460px;
        --nav-max-width: 1700px;
        --wide-page-max-width: 1500px;
        --blog-max-width: 1580px;
    }

    #genres,
    #recommended,
    #subscribe,
    #blog-genres,
    #blog-posts,
    .contact-container,
    .apps-page.centered-section,
    .about-hero-grid,
    .writers-section,
    .timeline-section,
    .page-container {
        width: min(100% - max(2.5rem, 4vw), var(--wide-page-max-width));
    }
}

@media screen and (min-width: 1800px) {
    :root {
        --page-max-width: 1740px;
        --nav-max-width: 1880px;
        --content-max-width: 960px;
        --wide-page-max-width: 1760px;
        --blog-max-width: 1820px;
    }
}

@media screen and (max-width: 900px) {
    .contact-container {
        align-items: stretch;
        gap: 1.5rem;
    }

    .contact-form form {
        padding: 1rem;
    }

    .contact-form {
        text-align: center;
    }

    .contact-form form {
        text-align: left;
    }

    .contact-image {
        justify-content: center;
    }

    .contact-image img {
        width: min(100%, 18rem);
    }

    .timeline-item,
    .writer,
    .about-description {
        width: 100%;
    }
}

@media screen and (max-width: 640px) {
    nav {
        position: sticky;
    }

    .nav-container {
        padding: 0.9rem 0;
    }

    .blog-name {
        max-width: 12rem;
    }

    .post,
    .recommended-post,
    .app-card,
    .genre-box {
        border-radius: 1.15rem;
    }

    .timeline-description {
        padding: 0;
    }

    .blog-metadata {
        font-size: 0.82rem;
    }

    #subscribe form {
        grid-template-columns: 1fr;
        max-width: 22rem;
        gap: 0.75rem;
    }

    #subscribe label {
        justify-self: center;
        text-align: center;
    }

    #subscribe button {
        justify-self: stretch;
    }

    .contact-form h3.tagline {
        letter-spacing: 0.08em;
        margin-bottom: 1.25rem;
    }
}

/* ===========================
   Performance And Mobile Polish
=========================== */

img[loading="lazy"] {
    content-visibility: auto;
}

.about-hero-grid {
    width: min(100% - (var(--page-padding) * 2), var(--page-max-width));
    margin: clamp(1.5rem, 4vw, 3rem) auto 0;
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.about-copy-panel {
    text-align: left;
    padding: clamp(1.25rem, 2vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--card-radius);
    background: var(--dark-surface-texture);
}

.about-copy-panel .custom-line {
    margin-left: 0;
}

.about-description-stack {
    display: grid;
    gap: 1.15rem;
}

.about-copy-panel .about-description {
    width: 100%;
    margin: 0;
    text-align: left;
}

.about-copy-panel .about-description--focus {
    width: min(100%, 34rem);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: #ff8a8a;
    font-weight: 500;
}

.writer-card .writer-highlight {
    color: #ff8a8a;
    font-weight: 500;
}

.about-visual-panel {
    margin: 0;
}

.about-visual-panel img {
    width: 100%;
    max-width: 100%;
    min-height: 22rem;
    object-fit: cover;
    border-radius: clamp(1.25rem, 2vw, 1.8rem);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
}

.writer-card {
    width: min(100%, 72rem);
    padding: clamp(1.25rem, 2.5vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--card-radius);
    background: var(--dark-surface-texture);
}

.writer-card-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    justify-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.writer-intro {
    text-align: center;
    width: min(100%, 52rem);
}

.writer-lead {
    width: 100%;
    margin: 0.4rem 0 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.writer-card .writer-photo {
    width: clamp(9rem, 16vw, 12rem);
    height: clamp(9rem, 16vw, 12rem);
    object-fit: cover;
    border-radius: 50%;
}

.writer-card > p {
    width: min(100%, 70ch);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.recommended-post {
    align-items: stretch;
}

.recommended-post img {
    display: block;
}

.recommended-post .post-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media screen and (max-width: 900px) {
    .about-hero-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .about-visual-panel {
        order: -1;
    }

    .about-visual-panel img {
        min-height: 18rem;
        max-height: 28rem;
    }

    .writer-card-header {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .writer-intro,
    .writer-lead {
        text-align: center;
    }

    .writer-card .writer-photo {
        width: 10.5rem;
        height: 10.5rem;
    }

    .writer-card > p {
        width: min(100%, 34rem);
    }
}

@media screen and (max-width: 640px) {
    .about-hero-grid {
        margin-top: 1rem;
        gap: 1.1rem;
    }

    .about-copy-panel {
        padding: 1.2rem 1rem 1.3rem;
        border-radius: 1.35rem;
    }

    .about-copy-panel .custom-line {
        margin-left: auto;
        margin-right: auto;
    }

    .about-copy-panel h1 {
        margin-top: 0;
        margin-bottom: 0.85rem;
    }

    .about-description-stack {
        gap: 0.9rem;
    }

    .about-page .about-description,
    .about-page .writer-card > p,
    .about-page .writer-lead {
        text-align: left;
    }

    .about-visual-panel img {
        min-height: 0;
        max-height: none;
        aspect-ratio: auto;
        object-fit: contain;
        object-position: center center;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
        padding: 0.3rem;
    }

    .about-page .about-description {
        width: 100%;
        padding: 0;
        font-size: 1rem;
        line-height: 1.85;
        letter-spacing: 0.01em;
        text-wrap: pretty;
    }

    .about-copy-panel .about-description--focus {
        width: 100%;
        padding: 0.95rem 1rem;
        border-radius: 1rem;
        background: rgba(255, 75, 75, 0.08);
        border: 1px solid rgba(255, 75, 75, 0.16);
        text-align: left;
    }

    .writer-card {
        padding: 1rem;
        width: 100%;
    }

    .recommended-post {
        padding: 0.95rem;
        text-align: left;
    }

    .recommended-post img {
        display: block !important;
        width: 100% !important;
        max-width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
        object-fit: cover;
        margin: 0 0 0.85rem;
        border-radius: 1rem;
    }

    .recommended-post .post-info p {
        display: block !important;
        margin-bottom: 0.45rem;
    }

    .recommended-post h4 {
        font-size: 1.1rem;
        margin-bottom: 0.45rem;
    }

    .recommended-post h4 a {
        font-size: inherit;
    }
}
