/* Modern Premium Design System */
:root {
    --bg-dark: #0a0a0c;
    --bg-card: rgba(20, 20, 24, 0.8);
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main) !important;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading) !important;
    font-weight: 700;
    color: var(--text-primary);
}

/* Fix for Resume Nav Links visibility */
#navi ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

#navi li a {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 10px 0;
    display: block;
    transition: all 0.3s ease;
}

#navi li a.current,
#navi li a:hover {
    color: var(--accent) !important;
    padding-left: 10px;
}

/* Fix for Resume Nav Links visibility */
#navi li a.current:after {
    display: none !important;
}

#navi li a.current::before {
    content: "— ";
    color: var(--accent);
}

/* Glassmorphism Utility */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-5px);
}

/* Navigation Overhaul */
.ftco_navbar {
    background: transparent !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.ftco_navbar.scrolled {
    background: rgba(10, 10, 12, 0.8) !important;
    padding: 0.5rem 0;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem !important;
    color: var(--text-primary) !important;
}

.navbar-brand span {
    color: white !important;
    /* Better contrast in the blue circle */
    background: var(--accent);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 10px;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1.2rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: var(--accent) !important;
}

/* Hero Section */
.hero-wrap {
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.hero-wrap .text h1 {
    font-size: 4rem;
    letter-spacing: -2px;
    margin-bottom: 1rem;
}

.hero-wrap .text h2 {
    font-size: 1.8rem;
    color: var(--text-secondary);
}

.hero-wrap .text .subheading {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 600;
    font-size: 14px;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    padding: 1rem 0;
}

.skill-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0.8rem 0.4rem;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.skill-item:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
    transform: scale(1.05);
}

.skill-item img {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
    margin-bottom: 0.75rem;
}

.skill-item span {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Resume Section */
.resume-wrap {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px;
    padding: 1.2rem !important;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.resume-wrap:hover {
    border-color: var(--accent) !important;
}

.resume-wrap .date {
    color: var(--accent) !important;
    font-weight: 700;
}

.resume-wrap h2 {
    color: white !important;
    font-size: 1.5rem !important;
    margin-bottom: 5px !important;
}

.resume-wrap .position {
    color: var(--text-secondary) !important;
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.resume-wrap p,
.resume-wrap li {
    color: var(--text-secondary) !important;
}

/* Projects Overhaul */
.project {
    border-radius: 30px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 3/2;
    height: auto !important;
    margin-bottom: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--bg-card);
}

.project .overlay {
    background: linear-gradient(to top, rgba(10, 10, 12, 0.9) 0%, transparent 100%) !important;
    opacity: 1 !important;
}

.project .text {
    opacity: 1 !important;
    bottom: 20px !important;
    padding: 2rem !important;
}

.project .text h3 a {
    color: var(--text-primary) !important;
    font-weight: 700;
}

.project .badge {
    background: rgba(59, 130, 246, 0.2) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
}

/* Footer Reduction (User Request) */
.ftco-footer {
    padding: 0.8em 0 !important;
    /* Reduced further from 1.5em */
    background: var(--bg-dark) !important;
    border-top: 1px solid var(--glass-border);
}

.ftco-footer .row.mb-4 {
    margin-bottom: 8px !important; /* Overriding Bootstrap mb-4 */
}

.ftco-footer .ftco-footer-widget {
    margin-bottom: 8px !important;
}

.ftco-footer .ftco-footer-widget h2 {
    font-size: 16px !important;
    /* Reduced size */
    margin-bottom: 8px !important;
}

.ftco-footer p,
.ftco-footer li,
.ftco-footer a {
    font-size: 13.5px !important;
    /* Reduced font size */
    color: var(--text-secondary) !important;
    margin-bottom: 0 !important; /* Remove legacy paragraph margins */
}

.ftco-footer-social {
    margin-top: 8px !important;
}

.ftco-footer-social li a {
    width: 32px !important;
    /* Reduced size */
    height: 32px !important;
    line-height: 32px !important;
}

.ftco-footer-social li a span {
    font-size: 16px !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Typing animation cursor color */
.txt-rotate>.wrap {
    border-right: 0.08em solid var(--accent) !important;
}

/* Ensure all project badges are readable */
/* Optimized project styles for horizontal scroll & modern cards */
.projects-scroll-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.projects-scroll-container {
    display: flex;
    flex-flow: row nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 30px;
    padding: 20px 10px 30px 10px;
    scrollbar-width: none; /* Firefox */
}

.projects-scroll-container::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.projects-scroll-container .project-card-col {
    flex: 0 0 360px;
    max-width: 360px;
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .projects-scroll-container {
        gap: 20px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .projects-scroll-container .project-card-col {
        flex: 0 0 290px;
        max-width: 290px;
    }
}

.project {
    position: relative;
    border-radius: 24px !important;
    overflow: hidden;
    width: 100%;
    height: 400px !important; /* uniform height */
    margin-bottom: 0 !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--glass-border) !important;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.project:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 15px 35px var(--accent-glow) !important;
    transform: translateY(-8px) !important;
}

/* Icon stack positioning: Top Left for Year, Top Right for GitHub */
.icon-stack {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    right: 20px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: calc(100% - 40px) !important;
    z-index: 10 !important;
}

.year-badge {
    background: rgba(10, 10, 12, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    padding: 6px 14px !important;
    border-radius: 30px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
}

.github-icon {
    background: rgba(10, 10, 12, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    font-size: 1.2rem !important;
    margin: 0 !important;
}

.github-icon:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    transform: scale(1.1) !important;
    color: #fff !important;
    box-shadow: 0 0 12px var(--accent-glow) !important;
}

/* Overlay & text styling */
.project .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.05) 0%, rgba(10, 10, 12, 0.4) 40%, rgba(10, 10, 12, 0.95) 100%) !important;
    opacity: 1 !important;
    transition: all 0.4s ease !important;
    z-index: 1;
}

.project:hover .overlay {
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.1) 0%, rgba(10, 10, 12, 0.55) 35%, rgba(10, 10, 12, 0.98) 100%) !important;
}

.project .text {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-width: 100% !important;
    padding: 1.5rem !important;
    z-index: 2;
    opacity: 1 !important;
    text-align: left !important;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.project .text h3 {
    font-size: 1.25rem !important;
    margin-bottom: 5px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.project .text h3 a {
    color: #fff !important;
    transition: color 0.3s ease !important;
}

.project .text h3 a:hover {
    color: var(--accent) !important;
}

.project .text span.category {
    display: block !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: var(--accent) !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
}

/* Premium Tags */
.project .badge {
    display: inline-block !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 4px 10px !important;
    margin: 2px 4px 4px 0 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    opacity: 0.95 !important;
}

.project:hover .badge {
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #fff !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

/* Navigation Buttons */
.projects-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.projects-nav-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    color: #fff;
}

.projects-nav-btn.prev {
    left: -20px;
}

.projects-nav-btn.next {
    right: -20px;
}

.projects-nav-btn.disabled {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.9);
}

@media (max-width: 991.98px) {
    .projects-nav-btn {
        display: none;
    }
}

/* Scroll Progress Track */
.projects-progress-wrapper {
    width: 100%;
    max-width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 25px auto 0 auto;
    overflow: hidden;
    position: relative;
}

.projects-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent) 0%, #60a5fa 100%);
    border-radius: 10px;
    transition: width 0.15s ease-out;
}

/* Fix for section headers */
.heading-section h2 {
    color: white !important;
}

.heading-section .big {
    color: rgba(255, 255, 255, 0.05) !important;
}

/* Contact Section Corner Fix */
.contact-section .box {
    border-radius: 30px !important;
}

/* Remove white diamond background from scroll indicator */
.mouse-icon:after {
    display: none !important;
}

.mouse-wheel span {
    color: var(--accent) !important;
    font-size: 30px;
}