/* --- 1. Variables & Theme Configuration --- */
:root {
    /* Light Mode (Default) */
    --bg-color: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #2563eb; /* Professional Blue */
    --nav-bg: rgba(255, 255, 255, 0.8);
    --card-bg: #f1f5f9;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8; /* Tech Cyan */
    --nav-bg: rgba(15, 23, 42, 0.9);
    --card-bg: #1e293b;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --- 2. Global Styles --- */
html {
    scroll-behavior: smooth;
    /* Adjust this value to match the exact height of your fixed navbar */
    scroll-padding-top: 80px; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none;     /* IE 10 and Consumer Preview */
    user-select: none;         /* Standard syntax */
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--accent);
    margin: 10px auto 0 auto;
    border-radius: 2px;
}

/* --- 3. Header & Navigation --- */
.navbar {
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 10%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

[data-theme="dark"] .navbar,
[data-theme="dark"] .main-footer {
    background: var(--bg-color);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .hero-image img {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2), 
                10px 10px 40px rgba(56, 189, 248, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #2563eb !important;
    background-color: #eff6ff;
}

[data-theme="dark"] .nav-links a:hover {
    color: #38bdf8 !important;
    background-color: #1e293b;
}

#theme-toggle {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

/* --- 4. Hero Section (Home) --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 80px 10% 0 10%; 
    gap: 4rem;
}

.hero-content {
    flex: 1.2;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
}

/* Typewriter Cursor */
#typewriter {
    color: var(--accent);
    border-right: 3px solid var(--accent);
    padding-right: 5px;
    animation: blink 0.8s step-end infinite;
    font-size: 2.5rem;
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--accent); }
}

/* Tilted Photo Styling */
.hero-image {
    flex: 0.8;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    max-width: 380px;
    height: auto;
    border-radius: 24px;
    transform: rotate(-3deg); 
    box-shadow: #2563eb 15px 15px 40px;
    
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero-image img:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 25px 25px 60px rgba(0, 0, 0, 50%);
}

/* --- 5. About Section --- */
.about-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.about-skills h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-chip {
    background: var(--card-bg);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.skill-chip i {
    color: var(--accent);
}

/* --- 6. Projects Section --- */
.projects-section {
    padding: 6rem 0;
    background: var(--card-bg);
}

/* --- 6. Projects Section --- */
.projects-section {
    padding: 5rem 0; /* Slightly reduced section padding */
    background: var(--card-bg);
}

.projects-grid {
    display: grid;
    /* Forces 3 equal columns on large screens, drops to 2 or 1 gracefully on smaller viewports */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 1.5rem; /* Reduced gap from 2.5rem to 1.5rem for a tighter look */
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr); /* Strict 3-column layout on desktops */
    }
}

.project-card {
    background: var(--bg-color);
    border-radius: 16px; /* Slightly tighter border radius */
    padding: 1.8rem; /* Reduced padding from 2.5rem for a smaller footprint */
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

[data-theme="dark"] .project-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-icon {
    font-size: 1.8rem; /* Made icon slightly smaller */
    color: var(--accent);
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.3rem; /* Scaled down heading text slightly */
    margin-bottom: 0.8rem;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.9rem; /* Scaled down paragraph text slightly */
    margin-bottom: 1.2rem;
flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    font-size: 0.7rem; /* Made tags slightly smaller */
    background: var(--card-bg);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-muted);
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto; /* Pushes link to the bottom if content sizes vary */
}

[data-theme="dark"] .project-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.project-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    min-height: 75px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.project-tags span {
    font-size: 0.75rem;
    background: var(--card-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    color: var(--text-muted);
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link i {
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(5px);
}

/* --- 7. Leadership Section --- */
.leadership-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
    border-left: 3px solid var(--card-bg);
}

[data-theme="dark"] .timeline {
    border-left: 3px solid #1e293b;
}

.timeline-item {
    position: relative;
    margin-bottom: 3.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    left: -2.55rem;
    top: 0.35rem;
    border: 4px solid var(--bg-color);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- 8. Footer Remappings --- */
.main-footer {
    padding: 4rem 10%;
    text-align: center;
    background: var(--bg-color);
    margin-top: 4rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08); 
    border-radius: 20px 20px 0 0;
}

.socials {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.social-icon {
    width: 45px !important;
    height: 45px !important;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.social-icon i {
    display: block !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
}

.social-icon:hover {
    color: #fff !important;
    background: var(--accent) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
}

[data-theme="dark"] .social-icon:hover {
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.6);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.footer-column h3 {
    margin-bottom: 1.2rem;
    color: var(--accent);
    font-size: 1.2rem;
}

.footer-column p, 
.footer-column a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: block;
}

.footer-column a:hover {
    color: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

[data-theme="dark"] .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column .socials {
    justify-content: flex-start;
    margin-top: 0;
    gap: 1rem;
}

/* --- 9. Mobile Responsiveness --- */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.5rem 15px;
        display: flex;
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }

    .nav-right {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        gap: 8px;
    }

    .nav-links {
        display: flex; 
        gap: 6px;
    }

    .nav-links a {
        padding: 4px 6px;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .prabhab {
        width: 35px;
        height: 35px;
        flex-shrink: 0;
    }

    #theme-toggle {
        padding: 4px 8px;
        font-size: 10px;
        white-space: nowrap;
        border-radius: 15px;
    }

    .hero {
        flex-direction: column-reverse;
        padding: 140px 5% 40px 5%;
        text-align: center;
        gap: 1.5rem;
        min-height: auto;
    }
    
    .hero-content h1 {
       font-size: 2rem;
       margin-bottom: 10px;
    }

    .hero-content p {
        font-size: 1rem;
        margin: 0 auto;
    }

    .hero-image img {
        max-width: 240px;
        transform: rotate(-2deg);
        margin-bottom: 1rem;
    }

    #typewriter {
        font-size: 1.8rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-grid {
        text-align: center;
    }

    .footer-column .socials {
        justify-content: center;
    }
}

/* --- 10. Animated Logo Setup --- */
.prabhab {
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #fff;
    transition: opacity .3s ease-out;
    background-color: #9fc;
    background-image: linear-gradient(to bottom, #9fc 0, #9cf 25%, #f9c 50%, #fc9 75%, #9fc 100%);
    background-size: 100% 300%;
    animation: prabhab-anim 8s infinite linear;
    flex-shrink: 0;
}

.prabhab div {
    display: block;
    width: 114%;
    height: 100%;
    color: #fff;
    outline: 0;
    background-image: url(./prabhab.svg);
    background-size: 100% 125%;
    border-radius: 50%;
}

@keyframes prabhab-anim {
    to {
        background-position: 0 300%;
    }     
}

/* --- About Me Button Styling --- */
.about-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--accent);
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Specific text color behavior for Dark Mode button if needed */
[data-theme="dark"] .about-btn {
    color: #0f172a; /* Dark background text color for contrast against bright cyan accent */
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.about-btn i {
    transition: transform 0.3s ease;
}

.about-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    opacity: 0.95;
}

[data-theme="dark"] .about-btn:hover {
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.about-btn:hover i {
    transform: translateX(5px);
}


/*About page*/
/* Container and Layout */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 2rem 80px;
    min-height: 100vh;
}

.about-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

/* Photo Slider Styles */
.photo-slider-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 450px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    z-index: 2;
    background: var(--card-bg);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

.slider-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent);
    border-radius: 30px;
    z-index: 1;
}

/* Content Styles */
.bio-paragraph {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    color: var(--text-main);
    margin-bottom: 2.5rem;
}

.journey-actions {
    display: flex;
    gap: 1.5rem;
}

/* Button Styles */
.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-rotaract {
    background: var(--accent);
    color: white;
}

.btn-personal {
    background: var(--card-bg);
    color: var(--text-main);
    border: 2px solid var(--accent);
}

.btn-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 968px) {
    .about-grid-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .photo-slider-wrapper {
        margin: 0 auto;
        max-width: 350px;
    }

    .journey-actions {
        flex-direction: column;
    }
}.inline-journey-container {
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Modal Overlay (Blur Background) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6); /* Translucent dark tint */
    backdrop-filter: blur(8px); /* Smooth background blur */
    z-index: 9999; /* Higher than navbar */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When active, fade overlay in */
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* --- Modal Content Box --- */
.modal-box {
    background: var(--bg-color);
    color: var(--text-main);
    width: 90%;
    max-width: 850px;
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); /* Deep rich shadow */
    border: 1px solid rgba(255, 255, 255, 0.08);
    
    /* Animation scale drop entry */
    transform: scale(0.85) translateY(-20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Scale up smoothly when active */
.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

/* Theme adaptation safeguards */
[data-theme="light"] .modal-box {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--card-bg);
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #ef4444;
    color: #fff;
}

/* Modal Typography formatting */
.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 2rem;
    font-weight: 800;
}

.modal-icon-accent {
    font-size: 2rem;
    color: var(--accent);
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 15px;
}




/* Iconic Header Section */
.badge-iconic {
    background: var(--accent);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.hero-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1;
    background: linear-gradient(to right, var(--text-main), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stats Bar */
.stats-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat-pill {
    border-left: 3px solid var(--accent);
    padding-left: 15px;
}

.stat-val {
    display: block;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-main);
}

.stat-lab {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Bento Grid */
.about-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.bento-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.main-story {
    grid-column: span 2;
    grid-row: span 2;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    color: var(--accent);
}

/* Sub-card headers */
.card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.card-head i { color: var(--accent); }
.card-head h4 { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* Skill Chips */
.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-chips span {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Responsive Grid */
@media (max-width: 992px) {
    .about-bento-grid { grid-template-columns: 1fr; }
    .main-story { grid-column: span 1; }
    .stats-row { gap: 1rem; }
}

/* Centered Section Dividers */
.category-header {
    display: flex;
    align-items: center;
    justify-content: center; /* Centers the content horizontally */
   gap: 30px; /* Space between the lines and the text */
    margin: 60px 0 40px; /* Space above and below the entire header */
    width: 100%;
}

/* Adds lines to both sides of the text */
.category-header::before,
.category-header::after {
   content: "";
    height: 1px;
    background: var(--border-subtle);
    flex-grow: 1; /* Makes lines fill the remaining space */
}

.category-header span {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    white-space: nowrap; /* Prevents text from wrapping to a new line */
    text-align: center;
}



/* --- Blog Page Styles --- */
.blog-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.blog-hero {
    text-align: center;
    margin-bottom: 60px;
}

.blog-hero h1 {
    font-size: 2.8rem;
    color: var(--text-main);
    margin: 10px 0;
}

.blog-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.category-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Blog Grid Configurations */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Highlight the latest post dynamically as a wide card */
.blog-card.featured {
    grid-column: span 2;
    flex-direction: row;
}

.blog-card.featured .blog-image {
    flex: 1.2;
    min-height: 350px;
}

.blog-card.featured .blog-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-image {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.04);
}

.blog-content {
    padding: 30px;
}

.blog-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.blog-category {
    color: var(--accent);
    font-weight: 600;
}

.blog-content h3 {
    font-size: 1.4rem;
    margin: 0 0 15px 0;
}

.blog-content h3 a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-content h3 a:hover {
    color: var(--accent);
}

.blog-content p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.read-more-btn {
   display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none; /* Removes default button gray background */
    border: none;
    padding: 0;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: gap 0.2s;
}

.read-more-btn:hover {
    gap: 14px;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-card.featured {
        grid-column: span 1;
        flex-direction: column;
    }
    .blog-card.featured .blog-image {
        min-height: 220px;
    }
    .blog-hero h1 {
        font-size: 2.2rem;
    }
}

/* --- Interactive Blog Reader Overlay --- */
.blog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    display: flex;
    justify-content: flex-end; /* Slides in neatly from the right hand side */
}

.blog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-wrapper {
    width: 100%;
    max-width: 750px;
    height: 100%;
    background: var(--bg-color);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    padding: 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.blog-overlay.active .overlay-wrapper {
    transform: translateX(0);
}

/* Close & Control Mechanisms */
.close-overlay-btn {
    align-self: flex-start;
    background: var(--card-bg);
    color: var(--text-main);
    border: none;
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    transition: background 0.2s, transform 0.2s;
}

.close-overlay-btn:hover {
    background: var(--text-main);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* Full Post Typography Architecture */
.full-post-content {
    animation: fadeInContent 0.6s ease outset;
}

.overlay-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

#post-view-title {
    font-size: 2.2rem;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 25px;
}

.overlay-hero-image {
    width: 100%;
    height: 350px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 30px;
}

.overlay-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay-body-text {
    color: var(--text-main);
    line-height: 1.75;
    font-size: 1.05rem;
}

.overlay-body-text p {
    margin-bottom: 20px;
    opacity: 0.95;
}

.overlay-body-text h4 {
    font-size: 1.3rem;
    margin: 30px 0 15px 0;
    color: var(--text-main);
}

.overlay-body-text ul {
    margin: 0 0 20px 20px;
}

.overlay-body-text li {
    margin-bottom: 8px;
}

.overlay-body-text blockquote {
    border-left: 4px solid var(--accent);
    background: var(--card-bg);
    padding: 15px 20px;
    margin: 25px 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

/* Entry Animations */
@keyframes fadeInContent {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Screen Breakpoint Overrides */
@media (max-width: 768px) {
    .overlay-wrapper {
        padding: 20px;
    }
    #post-view-title {
        font-size: 1.7rem;
    }
    .overlay-hero-image {
        height: 220px;
    }
}



/* --- Responsive Navbar Styles --- */

/* Hide hamburger button by default on desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    z-index: 1001;
}

/* Mobile Media Query */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show hamburger button */
    }

    .nav-right {
        position: fixed;
        top: 0;
        right: -100%; /* Hide menu off-screen by default */
        width: 70%;
        height: 100vh;
        background-color: var(--bg-color);
        box-shadow: var(--shadow);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        padding: 2rem;
    }

    /* When JavaScript adds the .active class, slide the menu into view */
    .nav-right.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        padding: 0.5rem 0;
    }
}



/* --- Responsive Navbar Styles --- */

/* Hide hamburger button by default on desktop layout */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    z-index: 1001;
}

/* Mobile Devices (Widths up to 768px) */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block; /* Shows hamburger menu button */
    }

    .nav-right {
        position: fixed;
        top: 0;
        right: -100%; /* Keeps menu off-screen until toggled */
        width: 75%;
        height: 100vh;
        background-color: var(--bg-color);
        box-shadow: var(--shadow);
        
        /* Flexbox configuration aligns options vertically */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        
        /* Layout spacings */
        gap: 2.5rem;
        padding-top: 6rem; 
        transition: right 0.3s ease-in-out;
        z-index: 1000;
    }

    /* Class triggered via JavaScript to slide-in menu */
    .nav-right.active {
        right: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.25rem;
        display: block;
        color: var(--text-main);
        text-decoration: none;
    }

    /* Dark Mode Button specific adjustments for mobile layout view */
    #theme-toggle {
        margin-top: 1rem; /* Creates clean spatial padding separating it from the Contact link */
        padding: 0.6rem 1.5rem;
        width: auto;
        border-radius: 20px;
        background-color: var(--card-bg);
        color: var(--text-main);
        border: 1px solid var(--text-muted);
        font-size: 1rem;
        cursor: pointer;
    }
}