/* Define CSS variables for colors */
:root {
    --color-primary: 99, 102, 241;
    --color-secondary: 139, 92, 246;
    --color-dark: 10, 10, 10;
    --color-dark-800: 26, 26, 26;
    --color-dark-700: 40, 40, 40;
    --color-success: 16, 185, 129;
    --color-error: 239, 68, 68;
    --color-text-light: #e0e0e0;
    --color-text-medium: rgba(255, 255, 255, 0.85);
    --color-text-faded: rgba(255, 255, 255, 0.6);
    --color-bg-glass: rgba(255, 255, 255, 0.03);
    --color-border-glass: rgba(255, 255, 255, 0.08);
    --color-input-bg: rgba(var(--color-dark-800), 0.7);
    --color-popup-bg: #232531;
}

/* Base styles for the entire page - Light Mode */
body {
    font-family: 'Inter', sans-serif;
    background-color: #fcfcfc;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Custom gradient for buttons and highlights - Blue/Purple */
.gradient-bg {
    background: linear-gradient(to right, #6366f1, #8b5cf6);
}

.gradient-text {
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (min-width: 1024px) and (max-width: 1367px) {
    .max-w-7xl {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
        max-width: 100% !important;
    }

    .sidebar {
        transform: translateX(-1rem);
        width: 25%;
        padding-left: 0;
        margin-right: 2rem;
    }

    main.lg\:w-3\/4 {
        width: 70%;
    }
}

/* Improved Code Block Styling */
pre[class*="language-"] {
    background: #1e1e1e !important;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 1.5em 0;
    overflow: auto;
    position: relative;
    padding: 1.5em 1em;
    border-left: 4px solid #6366f1;
    /* Ensure text wraps within the code block */
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Syntax highlighting colors */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6A9955;
}

.token.punctuation {
    color: #d4d4d4;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #B5CEA8;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #CE9178;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #d4d4d4;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #569CD6;
}

.token.function,
.token.class-name {
    color: #DCDCAA;
}

.token.regex,
.token.important,
.token.variable {
    color: #D16969;
}

/* Improved Copy Button Styling */
div.code-toolbar>.toolbar {
    top: 0.5em;
    right: 0.5em;
    opacity: 1 !important;
}

div.code-toolbar>.toolbar>.toolbar-item>button {
    background: #6366f1 !important;
    color: white !important;
    padding: 0.4em 0.8em !important;
    border-radius: 4px !important;
    font-size: 0.85em !important;
    font-family: 'Inter', sans-serif !important;
    border: none !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    /* Center text/icon */
    gap: 0.5em !important;
}

div.code-toolbar>.toolbar>.toolbar-item>button:hover {
    background: #4f46e5 !important;
    transform: translateY(-1px) !important;
}

div.code-toolbar>.toolbar>.toolbar-item>button:active {
    transform: translateY(0) !important;
}

/* Removed pseudo-elements for copy button text/icon as JS will handle it directly */
/* Success feedback when copied */
div.code-toolbar>.toolbar>.toolbar-item>button.copied {
    background: #f8f8f8 !important;
    color: #4CAF50 !important;
}

/* Style for the navigation bar background when sticky */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Custom primary button style */
.btn-primary {
    @apply px-8 py-3 rounded-full font-semibold text-white transition-all duration-300 ease-in-out;
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    @apply transform -translate-y-1;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Specific styles for the hero section image overlay */
.hero-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 100%);
}

/* Styling for the download button in the hero section */
.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    border-radius: 9999px;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.5);
}

.download-button svg {
    margin-right: 0.75rem;
}

/* Custom list styling with checkmark icons */
.custom-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: #555;
}

.custom-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #6366f1;
}

/* Styling for content cards */
.content-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Adjust text colors for light mode */
.text-gray-700 {
    color: #4a5568;
}

.text-gray-800 {
    color: #2d3748;
}

.text-gray-600 {
    color: #718096;
}

.text-gray-400 {
    color: #a0aec0;
}

/* Sidebar for Latest Projects */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    padding-left: 2rem;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 100%;
        padding-left: 0;
        margin-top: 3rem;
    }

    .content-area {
        flex-direction: column;
    }
}

/* Project Cards (Blog Section Style) */
.project-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.project-card-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.project-card-content {
    padding: 1.25rem;
}

.project-card-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    color: #222;
    word-wrap: break-word;
    /* Ensure text wraps */
}

.project-card-content p {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #555;
    word-wrap: break-word;
    /* Ensure text wraps */
}

.project-card-meta {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #777;
}

.project-card-meta i {
    margin-right: 0.4rem;
}

/* Form Styling - Light Mode (wave animation removed previously) */
.login {
    overflow: hidden;
    padding: 40px 30px 30px 30px;
    border-radius: 10px;
    position: relative;
    margin: 50px auto;
    width: 400px;
    max-width: 90%;
    /* Ensures it shrinks on smaller screens */
    background-color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.login input {
    font-family: "Asap", sans-serif;
    display: block;
    border-radius: 5px;
    font-size: 16px;
    background: #f5f5f5;
    width: 100%;
    border: 1px solid #ddd;
    padding: 10px 10px;
    margin: 15px -10px;
    color: #333;
}

.login button[type="submit"] {
    font-family: "Asap", sans-serif;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    width: 150px;
    border: 0;
    padding: 10px 0;
    margin-top: 10px;
    margin-left: -5px;
    border-radius: 5px;
    background-color: #1a73e8;
    transition: background-color 300ms;
}

.login button[type="submit"]:hover {
    background-color: #0d6efd;
}

/* Info Box */
.info-box {
    background-color: rgba(220, 230, 255, 0.5);
    border: 1px solid #a0c0f0;
    border-radius: 1rem;
    padding: 1.5rem;
    color: #2c3e50;
}

.info-box h3 {
    color: #1a73e8;
}

/* Download Section */
.download-section {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.download-section h3 {
    color: #2d3748;
}

.download-section p {
    color: #555;
}

/* Newsletter Section */
.newsletter-section {
    background-color: #f0f2f5;
}

.newsletter-section h3 {
    color: #2d3748;
}

.newsletter-section p {
    color: #555;
}

.newsletter-section input {
    background-color: #ffffff;
    border-color: #ccc;
    color: #333;
}

.newsletter-section input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 1px #1a73e8;
}

/* Footer */
footer {
    background-color: #e0e0e0;
    border-top: 1px solid #d0d0d0;
    color: #555;
}

footer a {
    color: #555;
}

footer a:hover {
    color: #1a73e8;
}

footer .text-gray-500 {
    color: #777;
}

/* Cursor styles */
#typing-text {
    position: relative;
}

#typing-text::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Improved scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgb(var(--color-dark-800));
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Glassmorphism effect with better performance */
.glass-effect {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Improved buttons with better contrast */
.btn-primary {
    background: linear-gradient(135deg, rgb(var(--color-primary)), rgb(var(--color-secondary)));
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(var(--color-primary), 0.3);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(var(--color-primary), 0.4);
}

.btn-secondary {
    background: transparent;
    color: rgb(var(--color-primary));
    border: 2px solid rgb(var(--color-primary));
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(var(--color-primary), 0.1);
    transform: translateY(-2px);
}

/* Video background with better performance */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.08;
    filter: brightness(0.4);
}

/* Improved animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
    }

    to {
        transform: translateY(0);
    }
}

/* Responsive typography */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.2;
    word-wrap: break-word;
    /* Ensure long words break */
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.3;
    word-wrap: break-word;
    /* Ensure long words break */
}

p {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    word-wrap: break-word;
    /* Ensure long words break */
}

/* Testimonial Carousel */
.testimonial-carousel {
    display: flex;
    gap: 1.5rem;
    overflow: hidden;
    width: 100%;
    position: relative;
}

.testimonial-card {
    flex: 0 0 100%;
    transition: transform 0.5s ease;
}

@media (min-width: 768px) {
    .testimonial-card {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media (min-width: 1024px) {
    .testimonial-card {
        flex: 0 0 calc(33.333% - 1rem);
    }
}

/* Hide scrollbar */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Carousel navigation buttons */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-nav button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-nav button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.carousel-nav button svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, rgb(var(--color-primary)), rgb(var(--color-secondary)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}


/* Special adjustments for 768px-815px range */
@media (min-width: 768px) and (max-width: 815px) {
    nav.glass-effect {
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    nav .max-w-7xl {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    nav a.text-2xl {
        font-size: 1.25rem !important;
    }

    nav .space-x-8 {
        gap: 0.25rem !important;
    }

    nav a.text-gray-300 {
        font-size: 0.875rem !important;
        padding: 0.15rem 0.5rem !important;
    }

    nav .btn-primary {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }
}

/* Add top margin only for screens wider than 768px */
@media (min-width: 769px) {
    section.relative {
        margin-top: 4rem;
    }
}


/* Browse by Tags Section Styles */
.container {
    width: 100%;
    max-width: 1000px;
    background: var(--container-bg);
    border: 1px solid var(--container-border);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, rgba(138, 99, 248, 0.1), transparent 70%);
    filter: blur(100px);
    opacity: 0.2;
    z-index: 0;
}



/* Ensure smooth scrolling for all anchor links */
html {
    scroll-behavior: smooth;
}

/* Adjust scroll padding to account for fixed header */
@media (max-width: 767px) {
    html {
        scroll-padding-top: 80px;
    }
}


/* About ME */

/* ===== Optimized About Me Section ===== */
.about-me {
    --color-primary: 99, 102, 241;
    --color-secondary: 139, 92, 246;
    --color-dark: 15, 15, 15;
    --color-dark-800: 26, 26, 26;
    --base-spacing: 1rem;

    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: calc(var(--base-spacing) * 2) var(--base-spacing);
    line-height: 1.5;
    transform: translateZ(0);
}

.container-about {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--base-spacing);
}

.section-title-about {
    text-align: center;
    margin-bottom: calc(var(--base-spacing) * 2);
}

.section-title-about h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: calc(var(--base-spacing) * 0.5);
    background: linear-gradient(135deg, rgb(var(--color-primary)), rgb(var(--color-secondary)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-title-about p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
    font-size: clamp(0.85rem, 1.25vw, 0.95rem);
}



#mobile-menu {
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    max-height: 0;
}

#hamburger-icon,
#close-icon {
    transition: transform 0.2s ease-out;
}

#hamburger-icon.hidden,
#close-icon.hidden {
    display: none;
}


/* Ensures the parent is a proper flex container */
.button-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    animation: fadeUp 0.8s ease-out 0.5s forwards;
    opacity: 0;
}



.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 2.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    border-radius: 2px;
}



/* --- Popup Message Styling --- */
.popup-message-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: fit-content;
    max-width: 380px;
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.popup-message-container.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.popup-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    height: auto;
    border-radius: 8px;
    background-color: var(--color-popup-bg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.popup-message-content-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.popup-icon-wrapper {
    padding: 6px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.popup-icon-wrapper svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.popup-message.error .popup-icon-wrapper {
    color: #d65563;
}

.popup-message.success .popup-icon-wrapper {
    color: rgb(var(--color-success));
}

.popup-text-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.popup-title {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.popup-description {
    color: #9ca3af;
    font-size: 0.75rem;
    margin: 0;
    padding: 0;
}

.popup-close-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background-color 0.15s ease-linear;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 8px;
}

.popup-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.popup-close-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Responsive adjustments for screens larger than 768px (tablets/laptops) */
@media (min-width: 769px) {

    /* Popup size for tablets/laptops */
    .popup-message-container {
        max-width: 420px;
    }

    .popup-message {
        padding: 15px 20px;
    }

    .popup-icon-wrapper svg {
        width: 24px;
        height: 24px;
    }

    .popup-title {
        font-size: 1rem;
    }

    .popup-description {
        font-size: 0.8rem;
    }

    .popup-close-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* Responsive adjustments for mobile screens (up to 768px) */
@media (max-width: 768px) {

    /* Popup size for mobile */
    .popup-message-container {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .popup-message {
        padding: 10px 14px;
    }

    .popup-title {
        font-size: 0.85rem;
    }

    .popup-description {
        font-size: 0.7rem;
    }

    .popup-icon-wrapper svg,
    .popup-close-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Further refine text sizes for mobile to ensure readability */
    .text-gray-700,
    .text-gray-600,
    .text-gray-500 {
        font-size: 0.9rem;
        /* Slightly smaller body text for mobile */
    }

    .project-card-content p {
        font-size: 0.875rem;
        /* Smaller paragraph text in project cards */
    }

    .project-card-meta {
        font-size: 0.8rem;
        /* Smaller meta info */
    }

    .info-box p {
        font-size: 0.9rem;
    }

    .download-section p {
        font-size: 0.95rem;
    }

    .newsletter-section p {
        font-size: 0.95rem;
    }

    /* Adjust padding and margins for main content on small screens */
    .max-w-7xl.mx-auto.px-4.sm\:px-6.lg\:px-8.pt-28.pb-16 {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 6rem;
        /* Adjust for fixed header height */
    }

    article.bg-white.p-8 {
        padding: 1rem;
        /* Reduce overall padding for article on mobile */
    }

    /* Mobile specific adjustments for the login form in live demo */
    section.mb-12.text-center.bg-white.p-8 {
        padding: 1.5rem;
        /* Slightly reduced padding for the demo section */
    }

    .login {
        padding: 30px 20px 20px 20px;
        /* Reduced padding inside the login form for mobile */
        width: 100%;
        /* Ensure it takes full width within its parent's max-width */
        margin: 20px auto;
        /* Adjust vertical margin */
    }

    .login input {
        font-size: 14px;
        /* Smaller input text */
        padding: 8px;
        /* Smaller input padding */
        margin: 10px -5px;
        /* Adjust input margin */
    }

    .login button[type="submit"] {
        font-size: 14px;
        /* Smaller button text */
        width: 120px;
        /* Smaller button width */
        padding: 8px 0;
        /* Smaller button padding */
        margin-top: 8px;
        /* Smaller button top margin */
    }

    /* Adjust font size for code blocks on mobile */
    pre[class*="language-"] {
        font-size: 0.75rem !important;
        /* Smaller font for code on mobile */
        line-height: 1.4;
    }

    /* Ensure date and time meta info stays on one line */
    .flex.items-center.space-x-4.text-gray-600.text-sm.mb-6 {
        flex-wrap: nowrap;
        /* Prevent wrapping */
        justify-content: center;
        /* Center content */
        font-size: 0.75rem;
        /* Smaller font size for meta info */
        gap: 0.5rem;
        /* Reduce gap between items */
    }

    .flex.items-center.space-x-4.text-gray-600.text-sm.mb-6 span {
        white-space: nowrap;
        /* Prevent individual items from wrapping */
    }

    /* New: Adjust project card grid for smaller screens */
    .project-cards-grid {
        /* Allow grid items to shrink more on very small screens */
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        /* Ensure no horizontal overflow within the grid container */
        overflow-x: hidden;
    }
}

/* NEW: Specific adjustment for screens between 1024px and 1267px */
@media (min-width: 1024px) and (max-width: 1267px) {
    .max-w-7xl.mx-auto.px-4.sm\:px-6.lg\:px-8.pt-28.pb-16 {
        /* Increased padding for this specific range to give more space on the right */
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
    }
}

/* Responsive video container for maintaining aspect ratio */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000; /* Fallback background */
    border-radius: 0.75rem; /* Match other rounded elements */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.video-container video,
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}