body {
    font-family: "Krub", sans-serif;
    font-weight: 400;
    font-style: normal;
    background-color: #020d18;
    min-width: 320px;
    font-size: 1rem;
}

@media (max-width: 767px) {
    body {
        font-size: 0.8rem; /* Reduce font size for smaller screens */
    }
}

#footer {
    font-size: 1rem !important;
}

@media (max-width: 767px) {
    #footer {
        font-size: 0.8rem !important; /* Reduce font size for smaller screens */
    }
}

h1,
h2,
h3 {
    font-family: "Krona One", sans-serif;
    font-weight: 400;
    font-style: normal;
}


h2 {
    font-size: 2rem;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    h2 {
        font-size: 1.2rem; /* Reduce font size for smaller screens */
    }
}

h3 {
    font-size: 1.2rem;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    h3 {
        font-size: 1rem; /* Reduce font size for smaller screens */
    }
}

h4 {
    font-size: 1rem;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    h4 {
        font-size: 0.8rem; /* Reduce font size for smaller screens */
    }
}

#name {
    height: 50%;
    font-size: 2rem;
    color: #ffffff;
    text-shadow: 1px 1px 1px black;
    text-align: left; /* Default alignment for larger screens */
}

/* Mobile styles */
@media (max-width: 767px) {
    #name {
        font-size: 1.2rem; /* Further reduce font size */
        height: auto; /* Fully responsive height */
        text-align: center; /* Keep centered */
        text-shadow: none; /* Simplify shadow for smaller screens */
        padding: 0.5rem 0; /* Adjust spacing */
        line-height: 1.4; /* Improve readability */
    }
}

#profession {
    height: 50%;
    font-size: 1rem; /* 'medium' translated to a specific value */
    color: #ffe752;
    text-transform: uppercase;
    text-shadow: 1px 1px 1px black;
    text-align: left; /* Default alignment for larger screens */
}


/* Mobile styles */
@media (max-width: 767px) {
    #profession {
        font-size: 0.8rem; /* Further reduce font size */
        height: auto; /* Fully responsive height */
        text-align: center; /* Center text for better readability */
        text-shadow: none; /* Remove shadow for better clarity */
        padding: 0.5rem 0; /* Adjust spacing */
        line-height: 1.3; /* Improve readability for smaller text */
    }
}

/* Default styles for desktop */
.avatar-photo {
    margin: 0 auto; /* Centers the avatar */
    position: static; /* Resets position */
    transition: all 0.4s ease-in-out;
    width: 150px; /* Default size */
    height: 150px;
    border: 1px solid black;
    object-fit: cover; /* Ensures the image fits the container */
}

/* Mobile styles */
@media (max-width: 767px) {
    .avatar-photo {
        width: 80px; /* Smaller avatar size for mobile */
        height: 80px;
        border: none; /* Remove border for simplicity */
    }
}

.header-content {
    background-image: url("images/header.jpg");
    background-position: 50% 70%;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.user-info a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
}

/* Mobile styles */
@media (max-width: 767px) {
    .user-info a {
        font-size: 0.7rem;
    }
}

.user-info a:hover {
    color: #ffc107;
}

.sub-header-content {
    margin-top: 20px;
}

.user-info p {
    margin-bottom: 0;
}

.user-socials .bi:hover {
    color: var(--bs-warning) !important;
}

.list-group-item {
    background-color: tomato;
    list-style-type: none;
    list-style-position: inside;
    padding-left: 20px;
}

.accordion-item {
    border: none;
    background-color: transparent;
}

.accordion-collapse {
    border: none;
}

.accordion-body {
    border: none;
    background-color: transparent;
}

/* Remove the default accordion arrow */
.accordion-button::after {
    display: none;
}

/* Remove background and shadow */
.accordion-button {
    background-color: transparent;
    box-shadow: none;
    border: none;
    outline: none; /* Removes focus outline */
}

/* Remove the light blue outline on click */
.accordion-button:focus {
    outline: none; /* Completely remove focus outline */
    box-shadow: none; /* Removes focus shadow */
}

/* Optional: Adjust hover effect */
.accordion-button:not(.collapsed) {
    color: #000; /* Active color */
    background-color: transparent;
    box-shadow: none;
    border: none;
}

/* Default size for larger screens */
.footer-icon {
    height: 2em; /* Default height for company logos */
    transition: all 0.3s ease; /* Smooth size transition */
}

/* Smaller size for mobile screens */
@media (max-width: 767px) {
    .footer-icon {
        height: 1.2em; /* Reduce the logo size */
    }
}

/* Initial styles */

.fixed-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: white;
    transition: all 0.4s ease-in-out;
}

.shrunk-header {
    height: 65px;
}

.shrunk-avatar {
    width: 55px;
    height: 55px;
    transform: translateX(100%);
}

/* Name and Profession transitions */
#name, #profession {
    transition: font-size 0.4s ease-in-out, transform 0.4s ease-in-out;
}

/* Shrunk text with transition */
.shrunk-text h1 {
    font-size: 1.3rem;
    transform: translateX(0);
}

.shrunk-text h2 {
    font-size: 1.0rem;
    transform: translateX(0);
}

/* Collage Button Floating on Right Side */
.collage-button {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    opacity: 0; /* Start hidden */
    transition: opacity 0.5s ease;
    cursor: pointer;
    pointer-events: auto;
}

/* Grid Layout for the Collage */
.collage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 5px;
}

.collage-grid img {
    width: 75px; /* Small thumbnails */
    height: 75px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

/* Fade-In/Out Effect */
.collage-button.fade-out {
    opacity: 0;
}

.collage-button.fade-in {
    opacity: 1;
}

/* Ensure the collage button scrolls with the page */
.collage-button.scrollable {
    position: fixed;
}

.tech-badge {
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.tech-badge:hover {
    background-color: #ffc107 !important; /* Bootstrap warning color */
    color: #212529 !important; /* Bootstrap dark text color */
}

.toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed) .toggle-icon {
    transform: rotate(90deg); /* Rotates arrow to point down when expanded */
}

/* 1) The container that holds the fan of images */
.fan-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* 2) The base style for each image in the fan */
.fan-container .fan-image {
    width: 120px;
    height: auto; /* or set a fixed height/width if you prefer squares */
    border-radius: 10px;
    box-shadow: 0 4px 4px 5px rgba(0, 0, 0, 0.25);
    object-fit: cover; /* ensure images fill the shape nicely */
    transition: transform 0.3s ease;
}

@media (max-width: 767px) {
    .fan-container .fan-image {
        width: 80px;
    }
}

/* 3) Use nth-child to rotate each image a bit.
   Adjust angles and translateX as you like. */
.fan-container .fan-image:nth-child(1) {
    transform: rotate(-10deg) translateX(20px);
}

.fan-container .fan-image:nth-child(2) {
    transform: rotate(0deg);
}

.fan-container .fan-image:nth-child(3) {
    transform: rotate(10deg) translateX(-20px);
}

/* If you have more images, keep going or adjust logic accordingly */
/* For a hover effect, you could do something like: */
.fan-container .fan-image:hover {
    z-index: 999; /* bring hovered image on top */
    transform: scale(1.1);
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}


@media (max-width: 767px) {
    .logo-img {
        width: 30px;
        height: 30px;
    }
}

.card {
    background-color: transparent;
    padding: 40px !important; /* remove default padding */
    border: none !important; /* or border: 0 !important; */
    box-shadow: none !important; /* if you want to remove the default card shadow too */
}

/* Floating portfolio button styles */
.floating-portfolio-button {
    position: fixed;
    width: auto;
    right: 1rem;
    bottom: 1rem;
    text-align: center;
    line-height: 1.2; /* Align text vertically */
    font-size: 1.5rem !important;
    transition: transform 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 1221px) {
    .floating-portfolio-button {
        top: auto;
        bottom: 50%;
        right: 10rem;
        left: auto;
        transform: none;
    }
}

@media (max-width: 1220px) {
    .floating-portfolio-button {
        bottom: auto;
        top: 18rem;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media screen and (max-width: 767px) {
    .floating-portfolio-button {
        font-size: 1rem !important;
    }
}

/* Hover effect for button */
.floating-portfolio-button:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
}

/* === Floating Back button (base look) === */
.floating-portfolio-button-back {
    position: fixed;
    z-index: 1100; /* above .fixed-header (1000) */
    width: auto;
    text-align: center;
    line-height: 1.2;
    font-size: 1.5rem !important;
    display: flex;
    justify-content: center;
    align-items: center;
    /* smooth, snappy motion */
    transition: top 0.25s cubic-bezier(0.25, 1, 0.5, 1),
    bottom 0.25s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* Hover effect (kept subtle to avoid jitter with transitions) */
.floating-portfolio-button-back:hover {
    transform: scale(1.06);
}

/* === LARGE screens (≥1221px): keep your current spot by default ===
   Default (scrolling up / no .stick-bottom):
   - stays where you placed it originally: bottom: 70%; left: 15rem
*/
@media (min-width: 1221px) {
    .floating-portfolio-button-back {
        top: auto;
        bottom: 65%;
        left: 15rem;
        transform: none;
    }
}

/* === STRETCHED & SMALL screens (≤1220px): default at TOP-CENTER ===
   Default (scrolling up / no .stick-bottom):
   - top: 1rem; centered on X axis
*/
@media (max-width: 1220px) {
    .floating-portfolio-button-back {
        top: auto;
        bottom: 65%;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Mobile font size tweak (kept from your file) */
@media (max-width: 767px) {
    .floating-portfolio-button-back {
        font-size: 1rem !important;
    }
}

/* === SCROLLING DOWN state (all breakpoints) ===
   When .stick-bottom is added by JS:
   - Only change vertical anchor to bottom (keep horizontal position as defined above)
*/
.floating-portfolio-button-back.stick-bottom {
    top: auto !important;
    bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
}

/* Optional: lift when footer is visible (JS adds .avoid-footer) */
.floating-portfolio-button-back.stick-bottom.avoid-footer {
    bottom: calc(6rem + env(safe-area-inset-bottom)) !important;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .floating-portfolio-button-back {
        transition: none;
    }
}


/* Dock-to-bottom state for Go-to-Projects */
.floating-portfolio-button.stick-bottom {
    top: auto !important;
    bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
}

/* Lift above footer when visible */
.floating-portfolio-button.stick-bottom.avoid-footer {
    bottom: calc(6rem + env(safe-area-inset-bottom)) !important;
}

@media (prefers-reduced-motion: reduce) {
    .floating-portfolio-button {
        transition: none;
    }
}

/* === Responsive Project Card Images Only === */
#projects-container .card img:not(.logo-img):not(.footer-icon) {
    width: 100%; /* Fit container width */
    height: auto; /* Preserve aspect ratio */
    border-radius: 10px; /* Keep consistent rounded corners */
    object-fit: cover; /* Prevent stretching or squishing */
    transition: transform 0.3s ease;
}

/* Subtle zoom effect on hover (optional, remove if not desired) */
#projects-container .card img:not(.logo-img):not(.footer-icon):hover {
    transform: scale(1.03);
}

/* Medium screens (tablets) — reduce image height */
@media (max-width: 992px) {
    #projects-container .card img:not(.logo-img):not(.footer-icon) {
        max-height: 220px;
    }
}

/* Small screens (phones) — smaller image area */
@media (max-width: 767px) {
    #projects-container .card img:not(.logo-img):not(.footer-icon) {
        max-height: 180px;
    }
}

/* Extra-small screens (very narrow phones) */
@media (max-width: 480px) {
    #projects-container .card img:not(.logo-img):not(.footer-icon) {
        max-height: 150px;
        border-radius: 8px;
    }
}

/* Cross-browser stable sizing for project thumbnails ONLY (not logos) */
#projects-container .card img:not(.logo-img):not(.footer-icon) {
    display: block;
    width: 100%;
    /* Give the image an explicit, responsive height so object-fit works in Safari/Chrome */
    height: clamp(150px, 28vw, 260px); /* tweak the middle 28vw to taste */
    object-fit: cover; /* crop to frame without distortion */
    border-radius: 10px;
    transition: transform 0.25s ease;
}

/* Optional hover */
#projects-container .card img:not(.logo-img):not(.footer-icon):hover {
    transform: scale(1.02);
}

/* Fine-tune for very small phones */
@media (max-width: 480px) {
    #projects-container .card img:not(.logo-img):not(.footer-icon) {
        height: 150px; /* keeps cards compact on tiny screens */
        border-radius: 8px;
    }
}

#imageModal .modal-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh; /* vertically center */
}

#imageModal .modal-content {
  background: transparent !important;
  border-radius: 12px;
  width: auto;
  overflow: hidden;
  margin: 0 auto; /* ensure horizontal centering */
}

#imageModal img {
    display: block;
    margin: 0 auto;
    max-width: 90vw; /* never exceed 90% of viewport width */
    max-height: 85vh; /* never exceed 85% of viewport height */
    object-fit: contain; /* keep proportions */
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

/* Optional: small hover pop */
#imageModal img:hover {
    transform: scale(1.02);
}

/* Tweak padding for smaller screens */
@media (max-width: 767px) {
    #imageModal img {
        max-width: 95vw;
        max-height: 70vh;
    }
}