:root {
    --accent-purple: #c084fc;
}

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("Project Files/Fonts/Plus_Jakarta_Sans/static/PlusJakartaSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("Project Files/Fonts/Plus_Jakarta_Sans/static/PlusJakartaSans-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("Project Files/Fonts/Plus_Jakarta_Sans/static/PlusJakartaSans-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
}

body {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #2A2A2A;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 700;
    color: var(--accent-purple);
}

h3, h4, h5, h6 {
    font-weight: 600;
}

code {
    font-family: 'JetBrains Mono', monospace;
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.btn-pastel-purple {
    background-color: var(--accent-purple);
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-pastel-purple:hover {
    background-color: rgba(192, 132, 252, 0.85);
}

.nav-tab {
    background-color: #ddd6fe;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.nav-link {
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.nav-link:hover, .nav-link.active {
    background-color: #454545;
}

.btn-dark-purple {
    background-color: #7c46af;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-dark-purple:hover {
    background-color: #9333ea;
}

.floating-nav {
    background-color: #323232; /* Elevated charcoal */
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.01em;
}

.floating-nav.shrunk {
    transform: scale(0.95);
}

.icon-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.icon-btn img {
    width: 24px;
    height: 24px;
}

.project-pane, .hero-container, .blog-card {
    background-color: #1F1F1F; /* Uniform dark charcoal for all containers */
    border-radius: 0.5rem; /* Consistent radius */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); /* Subtle elevation */
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-pane:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.project-pane:hover h3,
.project-pane:hover p {
    opacity: 0.95;
}

.blog-card {
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.blog-card:hover h3,
.blog-card:hover p {
    opacity: 0.95;
}

/* Subtle neighboring card effect */
.grid:hover .project-pane:not(:hover) {
    transform: scale(0.98);
    opacity: 0.9;
}

.footer-bg {
    background-color: #2A2A2A;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.footer-divider {
    height: 1px;
    background-color: #6b6b6b;
    border: none;
    margin: 2rem 0 2.5rem 0;
}

.footer-inner {
    max-width: 56rem; /* 896px to match max-w-4xl */
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 0.8fr;
    column-gap: 24px;
    align-items: start;
}

.footer-inner .footer-section:first-child {
    justify-self: start;
    text-align: left;
}

.footer-inner > *:nth-child(2) {
    justify-self: end;
    text-align: left;
    transform: translateX(40px);
}

.footer-inner .footer-section:nth-child(3) {
    justify-self: end;
    text-align: left;
}

.footer-bg .footer-section h4 {
    color: #d4d4d4;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.footer-bg .footer-section a {
    color: #d4d4d4;
    font-weight: 400;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.footer-bg .footer-section a:hover {
    color: var(--accent-purple);
}

.footer-bg .identity-section h3 {
    color: var(--accent-purple);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.footer-bg .identity-section p {
    color: #bdbdbd;
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-description {
    text-wrap: balance;
    hyphens: auto;
    overflow-wrap: normal;
    word-break: normal;
}

.footer-description span {
    display: block;
}

.footer-bg .social-icons {
    display: flex;
    gap: 1rem;
}

.footer-bg .social-icons img {
    width: 22px;
    height: 22px;
}

.footer-bg .social-icons a {
    color: white;
    transition: color 0.2s ease;
    margin-bottom: 0;
}

.footer-bg .social-icons a:hover {
    color: var(--accent-purple);
}

.accent-purple {
    color: var(--accent-purple);
}

/* Projects page section headers - neutral color */
#projects-page h2 {
    color: #ffffff;
}

/* Modal backdrop */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 998;
}

/* Capstone modal container */
.capstone-modal {
    position: fixed;
    z-index: 999;
    pointer-events: auto;
}

/* Capstone focused overlay canvas */
.capstone-focus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.capstone-focus-overlay.active {
    opacity: 1;
}

.capstone-focus-content {
    position: relative;
    width: 100%;
    max-width: 1100px;
    max-height: 85vh;
    margin: auto;
    background: #141414;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    padding-left: 0;
    padding-right: 24px;
}

.capstone-scroll-inner {
    flex: 1;
    min-height: 0;
    padding: 0 2.5rem 2.5rem 4rem;
    margin-top: 0;
    direction: ltr;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0px,
        black 24px,
        black 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0px,
        black 24px,
        black 100%
    );
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.capstone-scroll-inner .simplebar-track.simplebar-vertical {
    background: transparent;
    left: 0 !important;
    right: auto !important;
    margin-top: 24px;
    margin-bottom: 24px;
}

.capstone-scroll-inner .simplebar-scrollbar:before {
    background: #767676;
}

.capstone-scroll-inner {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.capstone-scroll-inner::-webkit-scrollbar {
    display: none;
}

.capstone-focus-overlay.active .capstone-focus-content {
    /* transform: scale(1); */
}

.capstone-focus-header {
    position: relative;
    margin-bottom: 20px;
    margin-top: 0;
    border-bottom: 1px solid rgba(192, 132, 252, 0.2);
    padding-bottom: 20px;
    padding-top: 70px;
    direction: ltr;
}

.capstone-focus-header + * {
    border-top: none !important;
    margin-top: 0;
}

.capstone-focus-header + *::before {
    content: none !important;
    display: none !important;
}

.capstone-focus-header + hr {
    display: none !important;
}

.capstone-focus-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
    border-top: none;
    margin-top: 0;
    direction: ltr;
}

.capstone-focus-article {
    color: #e5e5e5;
    border-top: none;
    margin-top: 0;
}

.capstone-focus-media {
    position: sticky;
    top: 2rem;
}

.capstone-media-grid {
    display: grid;
    gap: 1rem;
}

.capstone-media-item img {
    transition: transform 0.2s ease;
}

.capstone-media-item img:hover {
    transform: scale(1.02);
}

.capstone-close-btn {
    position: absolute;
    top: 12.5px;
    right: 12.5px;
    background: none;
    border: none;
    color: rgba(229, 229, 229, 0.6);
    font-size: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, opacity 0.15s ease;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    z-index: 50;
    border-radius: 0 24px 0 0;
}

.capstone-close-btn:hover {
    color: #c084fc;
    text-shadow: none;
}

.capstone-close-btn:focus {
    outline: 2px solid rgba(192, 132, 252, 0.5);
    outline-offset: 2px;
}

.capstone-close-btn:active {
    transform: none;
}

/* Capstone tile background when modal is open */
.capstone-card.capstone-open {
    background-color: #2A2A2A;
}

/* Blog modal container */
.blog-modal {
    position: fixed;
    z-index: 999;
    pointer-events: auto;
}

/* Blog focused overlay canvas */
.blog-focus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-focus-overlay.active {
    opacity: 1;
}

.blog-focus-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: 70vh;
    margin: auto;
    background: #141414;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    padding-left: 0;
    padding-right: 24px;
}

.blog-scroll-inner {
    flex: 1;
    min-height: 0;
    padding: 0 2.5rem 2.5rem 4rem;
    margin-top: 0;
    direction: ltr;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0px,
        black 24px,
        black 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0px,
        black 24px,
        black 100%
    );
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.blog-scroll-inner .simplebar-track.simplebar-vertical {
    background: transparent;
    left: 0 !important;
    right: auto !important;
    margin-top: 24px;
    margin-bottom: 24px;
}

.blog-scroll-inner .simplebar-scrollbar:before {
    background: #767676;
}

.blog-scroll-inner {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.blog-scroll-inner::-webkit-scrollbar {
    display: none;
}

.blog-focus-overlay.active .blog-focus-content {
    /* transform: scale(1); */
}

.blog-focus-header {
    position: relative;
    margin-bottom: 20px;
    margin-top: 0;
    border-bottom: 1px solid rgba(192, 132, 252, 0.2);
    padding-bottom: 20px;
    padding-top: 70px;
    direction: ltr;
}

.blog-focus-header + * {
    border-top: none !important;
    margin-top: 0;
}

.blog-focus-header + *::before {
    content: none !important;
    display: none !important;
}

.blog-focus-header + hr {
    display: none !important;
}

.blog-focus-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-top: none;
    margin-top: 0;
    direction: ltr;
}

.blog-focus-article {
    color: #e5e5e5;
    border-top: none;
    margin-top: 0;
}

.blog-close-btn {
    position: absolute;
    top: 12.5px;
    right: 12.5px;
    background: none;
    border: none;
    color: rgba(229, 229, 229, 0.6);
    font-size: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, opacity 0.15s ease;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    z-index: 50;
    border-radius: 0 24px 0 0;
}

.blog-close-btn:hover {
    color: #c084fc;
    text-shadow: none;
}

.blog-close-btn:focus {
    outline: 2px solid rgba(192, 132, 252, 0.5);
    outline-offset: 2px;
}

.blog-close-btn:active {
    transform: none;
}

/* Blog tile background when modal is open */
.blog-card.blog-open {
    background-color: #2A2A2A;
}

/* Responsive adjustments for blog modal */
@media (max-width: 768px) {
    .blog-focus-content {
        margin: 1rem;
        padding: 1.5rem;
        max-height: 90vh;
    }
}

/* Image lightbox overlay */
.image-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-lightbox-overlay.active {
    opacity: 1;
}

.image-lightbox-content {
    position: relative;
    background-color: #1F1F1F;
    border-radius: 0.5rem;
    padding: 4rem 1rem 2rem 1rem;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.image-lightbox-caption {
    color: #FFFFFF;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1rem;
    max-width: 100%;
}

.image-lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.25rem;
}

.image-lightbox-close-btn {
    position: absolute;
    top: 13px;
    right: 18px;
    background: none;
    border: none;
    color: rgba(229, 229, 229, 0.6);
    font-size: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, opacity 0.15s ease;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    z-index: 1101;
}

.image-lightbox-close-btn:hover {
    color: #c084fc;
    text-shadow: none;
}

.image-lightbox-close-btn:focus {
    outline: 2px solid rgba(192, 132, 252, 0.5);
    outline-offset: 2px;
}

.image-lightbox-close-btn:active {
    transform: none;
}

/* Inactive lightbox should not capture events */
.image-lightbox-overlay:not(.active) {
    pointer-events: none;
}

/* Capstone badge container */
.capstone-badge {
    position: absolute;
    top: -23px;
    left: -16px;
}

/* Capstone heading text */
.capstone-heading-text {
    flex: 1;
}

.bsg-logo {
    width: 275px;
    height: auto;
    object-fit: contain;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.bsg-logo:hover {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.4));
    transform: scale(1.04);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .capstone-focus-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .capstone-focus-media {
        position: static;
    }

    .capstone-media-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .capstone-focus-content {
        margin: 1rem;
        padding: 1.5rem;
        max-height: 95vh;
    }
}

.carousel-images {
    scrollbar-width: thin;
    scrollbar-color: #666 #333;
}

.carousel-images::-webkit-scrollbar {
    height: 6px;
}

.carousel-images::-webkit-scrollbar-track {
    background: #333;
    border-radius: 3px;
}

.carousel-images::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 3px;
}

.carousel-images::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Projects heading scroll emphasis */
.page-title-wrap {
    /* centered by justify-content, but now scoped */
}

.projects-heading {
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f5f5f5;
    text-align: center;
}

.about-section .projects-heading {
    width: calc(100% - 320px - 24px);
    text-align: center;
}

.about-section img {
    margin-top: -135px;
}

/* Mobile navbar starts shrunk */
@media (max-width: 768px) {
    .floating-nav {
        transform: scale(0.95);
    }

    .floating-nav.mobile-shrunk {
        transform: scale(0.9);
    }
}

/* Mobile dropdown button and menu styles - dark gray theme */
@media (max-width: 768px) {
    .more-btn:hover {
        background-color: rgba(255, 255, 255, 0.12) !important;
    }

    .more-btn:focus {
        background-color: rgba(255, 255, 255, 0.08);
        outline: none;
    }

    .more-btn:active {
        background-color: rgba(255, 255, 255, 0.18);
        transform: scale(0.98);
    }

    .more-btn:focus-visible {
        outline: none;
        background-color: rgba(255, 255, 255, 0.08);
    }

    /* Dropdown menu background - match navbar dark gray */
    .more-dropdown {
        background-color: #323232 !important; /* Same as navbar */
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Dropdown menu items hover/active states */
    .more-dropdown a:hover {
        background-color: rgba(255, 255, 255, 0.08) !important;
    }

    .more-dropdown a:active {
        background-color: rgba(255, 255, 255, 0.12) !important;
    }
}

/* Desktop hero layout - original spacing */
@media (min-width: 769px) {
    .hero-container .flex.flex-wrap {
        gap: 1rem;
    }

    .hero-container .flex.flex-wrap .btn-dark-purple {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Mobile hero layout - center-aligned action row */
@media (max-width: 768px) {
    .hero-container .flex.flex-wrap {
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
    }

    .hero-container .flex.flex-wrap > * {
        flex-shrink: 0;
    }

    .hero-container .flex.flex-wrap .btn-dark-purple {
        flex-shrink: 1;
        min-width: 0;
        white-space: nowrap;
        justify-content: center;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .hero-container .flex.flex-wrap .flex {
        gap: 0.625rem;
    }
}

/* Mobile responsive styles */
@media (max-width: 640px) {
    .floating-nav {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .floating-nav .text-xl {
        font-size: 1rem;
    }

    .projects-heading {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

    .hero-container {
        padding: 1rem;
    }

    .hero-container .flex {
        gap: 3rem;
    }

    .hero-container .flex-1 {
        text-align: center;
    }

    .footer-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

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

    .identity-section {
        display: contents;
    }

    .identity-section h3,
    .identity-section p {
        order: 1;
    }

    .identity-section .social-icons {
        order: 2;
        justify-content: center;
    }

    .footer-inner > .footer-section:nth-child(2) {
        order: 3;
    }

    .footer-inner > .footer-section:nth-child(3) {
        order: 4;
    }

    .capstone-focus-content,
    .blog-focus-content {
        margin: 1rem;
        padding: 1rem;
        max-height: 90vh;
    }

    .capstone-scroll-inner,
    .blog-scroll-inner {
        padding: 1rem 1rem 1rem 2rem;
    }

    .capstone-focus-header,
    .blog-focus-header {
        padding-top: 50px;
    }

    .capstone-focus-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .capstone-media-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .icon-btn {
        padding: 0.25rem;
    }

    .icon-btn img {
        width: 20px;
        height: 20px;
    }

    .nav-link {
        padding: 0.25rem 0.375rem;
        font-size: 0.9rem;
    }

    .floating-nav .flex {
        gap: 0.75rem;
    }
}
