html {
    scroll-behavior: smooth;
    background-color: #1a1a2e;
}

body {
    font-family: 'Inter', sans-serif;

    scroll-behavior: smooth;
    margin: 0;
    min-height: 100vh;
    box-sizing: border-box;

}


@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* 
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.4s ease-in forwards;
} */

/* .main-content {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.main-content.fade-in {
    opacity: 1;
}

.main-content.fade-out {
    opacity: 0;
} */


body.preload {
    opacity: 0;
    transition: none !important;
}

.main-content.fade-in {
    animation: fadeIn 0.4s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-out {
    animation: fadeOut 0.4s ease-in forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.fade-out {
    animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.main-content.fade-in {
    animation: fadeIn 0.4s ease-in forwards;
}

.main-content.fade-out {
    animation: fadeOut 0.4s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}


.fade {
    opacity: 0;
    transition: opacity 0.4s ease-in;
    pointer-events: none;
}

.fade.show {
    opacity: 1;
    pointer-events: auto;
}




.border-container {
    border: 30px solid #1a1a2e;
    border-top: none;
    box-sizing: border-box;
}

@media (max-width: 400px) {
    .border-container {
        border: 10px solid #1a1a2e;
    }
}



.main-content {

    min-height: 100vh;
}

@media (min-width: 992px) {
    .main-content {
        border-width: 40px;
    }
}

h2,
h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.navbar {
    background-color: #1a1a2e;
}

.navbar-brand,
.nav-link {
    color: #fff !important;
    font-weight: 500;
}

.nav-link:hover {
    color: #dcdcdc !important;
}

section {
    padding: 80px 0;
}

.card {
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
}

footer {
    background-color: #1a1a2e;
    color: #ccc;
}

.btn-primary {
    background-color: #1a1a2e;
    border-color: #1a1a2e;
}

.btn-primary:hover {
    background-color: #0d0d1a;
}


.see-more-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.1rem;
    color: #ffffff;
    background-color: #1a1a2e;
    border: 2px solid #1a1a2e;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.see-more-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 0%;
    top: 0;
    left: 0;
    background: #16213e;
    opacity: 0.2;
    z-index: 0;
    transition: height 0.3s ease;
}

.see-more-btn:hover::after {
    height: 100%;
}

.see-more-btn:hover {
    color: #fff;
}

.see-more-btn span {
    position: relative;
    z-index: 1;
}



.card-img-top {
    height: 200px;
    /* or 180px, adjust as needed */
    object-fit: cover;
}



.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: #1a1a2e;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    position: relative;
    width: 100%;
    margin-bottom: 3rem;
    z-index: 2;
}

.timeline-item.left,
.timeline-item.right {
    width: 50%;
}

.timeline-item.left {
    padding-right: 60px;
    text-align: right;
}

.timeline-item.right {
    padding-left: 60px;
    text-align: left;
    margin-left: 50%;
}

/* Circle dots */
.timeline-item::before {
    content: '';
    position: absolute;
    top: 0.75rem;
    width: 20px;
    height: 20px;
    background-color: #1a1a2e;
    border: 4px solid #fff;
    border-radius: 50%;
    z-index: 3;
}

/* Connector line from dot to content */
.timeline-item.left::before {
    right: -10px;
}

.timeline-item.right::before {
    left: -10px;
}

.timeline-content {
    display: inline-block;
    max-width: 100%;
    position: relative;
}

/* Horizontal connector lines */
.timeline-item::after {
    content: '';
    position: absolute;
    top: 1.25rem;
    /* aligns with dot */
    width: 40px;
    height: 3px;
    background-color: #1a1a2e;
    z-index: 2;
}

.timeline-item.left::after {
    right: 0;
    margin-right: 10px;
}

.timeline-item.right::after {
    left: 0;
    margin-left: 10px;
}


@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
        /* Keep line on the left */
        transform: none;
        /* Cancel centering */
    }

    .timeline-item.left,
    .timeline-item.right {
        width: 100%;
        text-align: left;
        padding-left: 3rem;
        /* room for line + dot */
        padding-right: 0;
        margin-left: 0;
    }

    .timeline-item.left::before,
    .timeline-item.right::before {
        left: 12px;
        right: auto;
        /* Clear conflicting desktop rule */
        top: 1rem;
        transform: none;
        background-color: #1a1a2e;
        /* your test color */
    }



    .timeline-item::after {
        display: none;
        /* no horizontal connector lines on mobile */
    }
}


.timeline-arrow {
    width: 30px;
    text-align: center;
    font-size: 1.25rem;
    position: relative;
    z-index: 3;
    color: #1a1a2e;
}


.more-text {
    display: none;
}

.more-text.show {
    display: inline;
}




@keyframes centre {
    50% {
        transform: scale(5);
    }

    99% {
        transform: scale(1);
        display: inline;
    }

    100% {
        display: none;
    }
}

.centre-card {
    animation-name: centre;
    animation-duration: 3s;
    animation-iteration-count: 1;
    animation-direction: normal;
    animation-fill-mode: forwards;
}


.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.7);
    /* Dark background */
    border-radius: 50%;
    /* Round buttons */
    background-size: 50%, 50%;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
    transform: scale(1.03);
}




.scroll-down-outer {
    position: absolute;
    bottom: 20vh;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-down-anim {
    animation: bounce 2s ease-in-out infinite;
    display: inline-block;
}

.see-more-btn:hover {
    background-color: #343a40;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(50px);
    }
}

.profile-img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#specific-project-title {
    font-size: 2.5rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1a1a2e;
}

#specific-project {
    padding: 4rem 2rem;
    padding-top: 0;
    padding-bottom: 2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    background-color: transparent;
    /* Remove grey! */
    position: relative;
    margin-bottom: 0;
}




#specific-project-tags .badge {
    background-color: transparent !important;
    border: 1px solid #1a1a2e;
    /* Slightly lighter than before */
    color: #1a1a2e !important;
    /* Softer text color */
    font-weight: 300 !important;
    /* Lighter font weight */
    opacity: 0.85;
    font-size: 0.75rem !important;
    transition: all 0.2s ease;
    cursor: default;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    box-shadow: none;
}

.specific-tag:hover {
    transform: scale(1.05) !important;
    background-color: red !important;
    opacity: 1;
}


#thumbnail-project-tags .badge {
    background-color: transparent !important;
    border: 1px solid #1a1a2e;
    /* Slightly lighter than before */
    color: #1a1a2e !important;
    /* Softer text color */
    font-weight: 300 !important;
    /* Lighter font weight */
    opacity: 0.85;
    font-size: 0.75rem !important;
    transition: all 0.2s ease;
    cursor: default;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    box-shadow: none;
}

#thumbnail-project-tags .badge:hover {
    transform: scale(1.03);
    opacity: 1;
}

.lightbox-overlay.d-none {
    display: none !important;
    pointer-events: none;
    opacity: 0;
}

.text-content {
    max-width: 500px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #2c2c2c;
    padding: 1rem;
    border-radius: 10px;
    background-color: #f9f9f9;
}



.project-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}


.contact-container {
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    padding: 2rem !important;
}







/* Responsive tweaks for smaller screens */
@media (max-width: 768px) {
    .carousel-inner {
        height: 220px;
    }

    .text-content {
        font-size: 1rem;
        padding: 0.8rem;
    }
}

.carousel-wrapper {
    width: 400px;
}

@media (max-width: 992px) {
    .carousel-wrapper {
        width: 100%;
    }
}





/* HERE */


/* Base carousel styles */
.carousel-inner {
    height: 30vh;
    background-color: transparent;
    overflow: visible;
    position: relative;
}

/* Carousel item fills container and centers content */
.carousel-item {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    /* vertical centering */
    justify-content: center;
    /* horizontal centering */
    width: 100%;
    height: 100%;
}

/* Image scales proportionally and stays centered */
.carousel-item img {
    max-height: 100%;
    max-width: 100%;
    object-fit: scale-down;
    display: block;
    margin: auto;
    border-radius: 12px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: zoom-in;
    color: transparent;
}



/* Carousel wrapper: default to compact width */
.carousel-wrapper {
    width: 400px;
    background-color: #f9f9f9 !important;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-radius: 13px;
    padding: 3rem;
}




/* Smaller screen adjustments */
@media (max-width: 800px) {
    .carousel-inner {
        height: 25vh;
    }

    .text-content {
        font-size: 1rem;
        padding: 0.8rem;
    }

    #return-card-display {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
        /* display: block; */
    }

    .carousel-wrapper {
        padding: 1.5rem !important;
    }
}



/* Expand wrapper on medium screens */
@media (max-width: 992px) {
    .carousel-wrapper {
        width: 100%;
    }

    .carousel-wrapper {
        padding: 1.5rem;
    }
}

/* Larger screens: increase height slightly */
@media (min-width: 992px) {
    .carousel-inner {
        height: 25vh;
    }

    .carousel-wrapper {
        width: 40%;
    }
}

/* Extra large screens */
@media (min-width: 1200px) {
    .carousel-inner {
        height: 30vh;
    }

    .carousel-wrapper {
        width: 50%;
    }
}


/* END */


.back-arrow-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    color: #1a1a2e;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    padding: 0;
    margin: 0;
    cursor: pointer;
    z-index: 10;
    display: inline-block;
    pointer-events: all;
}


.back-arrow-btn:hover {
    color: #34345a;
}

.back-arrow-btn {
    background-color: #1a1a2e;
    color: #fff;
    border: none;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 6px;
    opacity: 0.85;
}

.back-arrow-btn:hover {
    opacity: 1;
    background-color: #34345a;
}

/* Optional: move tags under text-content */
@media (min-width: 768px) {
    #specific-project-tags {
        order: 3;
        margin-top: 1rem;

    }
}


#specific-project {
    position: relative;
}

.back-arrow-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-block;
    padding: 8px 16px;
    font-size: 1rem;
    color: #ffffff;
    background-color: #1a1a2e;
    border: 2px solid #1a1a2e;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    overflow: hidden;
}

.back-arrow-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 0%;
    top: 0;
    left: 0;
    background: #16213e;
    opacity: 0.2;
    z-index: 0;
    transition: height 0.3s ease;
}

.back-arrow-btn:hover::after {
    height: 100%;
}

.back-arrow-btn:hover {
    color: #fff;
    background-color: #1a1a2e;
    /* Optional: slightly darker if needed */
}

.back-icon {
    display: none;
}

@media (max-width: 900px) {
    .back-label {
        display: none;
    }

    .back-icon {
        display: inline;
    }

    .back-arrow-btn {
        padding: 8px;
        font-size: 1.2rem;

    }
}

#projects {
    padding-top: 2rem;
}

#prof-photo:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}


.contact-icon i {
    width: 100px;
    height: 100px;
}

.contact-icon:hover {
    transform: scale(1.05);
}

/* Wrapper to help with relative positioning inside the card */
.top-left-btn-wrapper {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    z-index: 20;
    /* ensure it's above carousel */
}

/* Your existing see-more-btn stays intact */

/* Tweak specifically for this button */
#top-left-back-btn {
    position: relative;
    /* required by you */
    margin: 0;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.25rem;
}

/* Optional hover effect improvement */
#top-left-back-btn:hover {
    background-color: #292948;
    border-color: #292948;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* medium boostrap size  */
@media (max-width: 768px) {
    #top-left-back-btn {
        display: none !important;
    }
}

.form-control:focus {
    border-color: #1a1a2e !important;
    box-shadow: none !important;
    outline: none;
}


/* ===== Bubble Mind Map ===== */
.bubblemap-section {
    scroll-margin-top: 80px;
}

.bubblemap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 360px;
    background: radial-gradient(120% 120% at 10% 10%, #eef2ff, #f8fafc 45%, #ffffff);
    border-radius: 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    overflow: hidden;
}

.bubblemap-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.bubblemap-details {
    position: absolute;
    inset: auto 1rem 1rem 1rem;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(6px);
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
    transition: transform .25s ease, opacity .25s ease;
    max-width: 680px;
    margin: 0 auto;
}

.bubblemap-details-inner {
    padding: .9rem 1rem;
}

.bubblemap-title {
    font-size: 1.1rem;
    margin: 0 0 .25rem 0;
}

.bubblemap-desc {
    margin: 0;
    color: #334155;
}

.bubblemap-fallback {
    margin: 0;
    padding-left: 1.2rem;
}

/* Bubble styles via SVG classes */
.bubble {
    cursor: grab;
    transition: filter .2s ease;
}

.bubble:active {
    cursor: grabbing;
}

.bubble .bubble-ring {
    fill: url(#bubbleGrad);
    opacity: .85;
}

.bubble .bubble-core {
    fill: white;
}

.bubble .bubble-label {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    font-weight: 600;
    font-size: 12px;
    fill: #0f172a;
    pointer-events: none;
    user-select: none;
}

.bubble.is-active {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .15));
}

.link {
    stroke: rgba(15, 23, 42, .15);
    stroke-width: 2;
}

@media (max-width: 768px) {
    .bubblemap {
        min-height: 320px;
        aspect-ratio: 4 / 3;
    }

    .bubblemap-details {
        inset: auto .75rem .75rem .75rem;
    }
}

/* Reduced motion: stop physics and show a tidy layout */
@media (prefers-reduced-motion: reduce) {
    .bubblemap {
        background: #ffffff;
    }

    .bubblemap-canvas {
        display: none;
    }

    .bubblemap-details {
        position: static;
        margin-top: 1rem;
    }
}