/* ==== Global Styles ==== */
:root {
    --primary-color: #4361ee;
    --primary-hover: #3a0ca3;
    --secondary-color: #f72585;
    --dark-bg: #0f172a;
    --text-dark: #1e293b;
    --text-light: #f8fafc;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Typography Utility */
.max-w-700 {
    max-width: 700px;
}

.extra-small {
    font-size: 0.82rem;
}

.divider {
    height: 4px;
    width: 60px;
    border-radius: 2px;
}

/* ==== Navbar ==== */
.navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: var(--transition);
    background-color: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.navbar.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    color: rgba(255, 255, 255, 0.7) !important;
}

.nav-link:hover,
.nav-link.active {
    color: #fff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ==== Hero Section ==== */
#hero {
    background: url('../images/hero-bg.png') center/cover no-repeat;
    background-attachment: fixed;
}

.bg-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(67, 97, 238, 0.4) 100%);
}

.hero-title {
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
}

#typed-text {
    display: inline-block;
    min-width: 3ch;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ==== Hero Mobile Mockup & Animations ==== */
.hero-image-wrapper {
    position: relative;
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-mockup {
    width: 230px;
    height: 430px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    position: relative;
    z-index: 2;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: float-phone 6s ease-in-out infinite;
    overflow: hidden;
}

.mobile-mockup::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.mockup-screen {
    margin-top: 30px;
    padding: 20px;
    height: 100%;
}

.mockup-line {
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    margin-bottom: 15px;
    border-radius: 4px;
    opacity: 0.6;
}

.mockup-card {
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 15px;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.f-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    z-index: 3;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.f-icon-1 {
    top: 15%;
    left: calc(50% + 65px);
    animation: float-element 4s ease-in-out infinite;
    color: #40D0FB;
}

.f-icon-2 {
    bottom: 25%;
    left: calc(50% - 115px);
    animation: float-element 5s ease-in-out infinite 1s;
    color: #FFCA28;
}

.f-icon-3 {
    top: 45%;
    left: calc(50% - 135px);
    animation: float-element 6s ease-in-out infinite 0.5s;
    color: #3DDC84;
}

.ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    filter: blur(100px);
    opacity: 0.3;
    border-radius: 50%;
    z-index: 1;
    animation: glow-pulse 8s ease-in-out infinite alternate;
}

@keyframes float-phone {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes float-element {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(10px, -15px);
    }
}

@keyframes glow-pulse {
    from {
        transform: scale(1);
        opacity: 0.2;
    }

    to {
        transform: scale(1.3);
        opacity: 0.4;
    }
}

.pulse-anim {
    box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(67, 97, 238, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
    }
}

/* ==== Section Padding ==== */
.section-padding {
    padding-top: 100px !important;
    padding-bottom: 100px !important;
}

/* ==== About Section ==== */
.glass-panel {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.about-image-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    top: -15px;
    left: -15px;
    border-radius: 1rem;
    z-index: -1;
    opacity: 0.5;
}

/* ==== Skills Section ==== */
.skill-card {
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.skill-icon {
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
}

/* ==== Value Cards (Why Work With Me) ==== */
.value-card {
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
}

.value-icon-wrapper {
    transition: var(--transition);
}

.value-card:hover .value-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

/* ==== Projects Section ==== */
.project-card {
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.project-img-wrapper {
    overflow: hidden;
}

.project-img-wrapper img {
    transition: transform 0.5s ease;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay a {
    transform: translateY(20px);
    transition: var(--transition);
}

.project-card:hover .project-overlay a {
    transform: translateY(0);
}

/* ==== Contact Section ==== */
.contact-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1557683316-973673baf926?q=80&w=2000&auto=format&fit=crop') center/cover;
    opacity: 0.15;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ==== Footer ==== */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ==== Responsive Adjustments ==== */
@media (max-width: 768px) {
    .display-2 {
        font-size: 2.2rem;
    }

    .hero-title {
        white-space: normal;
        /* Allow wrap if absolutely necessary on tiny screens, but try to avoid it with smaller font */
    }

    #typed-text {
        white-space: nowrap;
    }

    .section-padding {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    .container,
    .container-fluid {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    #hero .btn {
        font-size: 1rem !important;
        padding: 10px 20px !important;
    }

    .about-image-container::before {
        top: 10px;
        left: 10px;
    }

    .hero-image-wrapper {
        height: 320px;
    }

    .mobile-mockup {
        width: 150px;
        height: 300px;
    }

    .f-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .f-icon-1 {
        left: calc(50% + 60px);
    }

    .f-icon-2 {
        left: calc(50% - 100px);
    }

    .f-icon-3 {
        left: calc(50% - 120px);
    }
}

/* Hide scrollbar for screenshot galleries but keep functionality */
.screenshot-gallery::-webkit-scrollbar {
    display: none;
}

.screenshot-gallery {
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

/* Infinite Scrolling Marquee */
.marquee-wrapper {
    white-space: nowrap;
    position: relative;
    margin-left: -3rem;
    margin-right: -3rem;
    width: auto;
    overflow: visible;
}

.marquee-viewport {
    overflow: hidden;
    width: 100%;
}

@media (max-width: 768px) {
    .marquee-wrapper {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }
}

.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

.marquee-content {
    display: flex;
    animation: scroll-marquee 40s linear infinite;
    will-change: transform;
}

@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-img {
    height: 450px;
    width: auto;
    object-fit: contain;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin: 0 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    cursor: zoom-in;
    transition: var(--transition);
}

@media (max-width: 576px) {
    .marquee-img {
        height: 350px;
        margin: 0 5px;
    }
}

.marquee-img:hover {
    transform: scale(1.05);
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.scroll-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-btn.prev {
    left: 10px;
}

.scroll-btn.next {
    right: 10px;
}

/* Ensure gallery can be scrolled manually */
.marquee-viewport {
    overflow-x: auto !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.marquee-viewport::-webkit-scrollbar {
    display: none;
}

.marquee-viewport:active {
    cursor: grabbing;
}

@media (max-width: 768px) {
    .scroll-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .scroll-btn.prev {
        left: -10px;
    }

    .scroll-btn.next {
        right: -10px;
    }
}

#contact {
    scroll-margin-top: 100px;
    padding-bottom: 150px !important;
}

.social-icon-contact:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2) !important;
}