/* Mobile Zoom-Out White Border Fix */
html {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
}

html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #f8fafc;
    z-index: -9999;
    transform: scale(1.1);
    transform-origin: center;
}

:root {
    --primary-color: #E3242B;
    --secondary-color: #c51e24;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --accent-color: #E3242B;
    --text-color: #374151;
    --text-light: #6b7280;
}

/* Font Awesome Icon Fixes */
.fas, .fab, .far, .fal, .fad, .fass, .fasr, .fasl {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro" !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.fas {
    font-weight: 900 !important;
}

.fab {
    font-weight: 400 !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    
    /* Extended background for zoom-out protection */
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center;
}

/* Additional zoom-out protection */
body::before {
    content: '';
    position: fixed;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background-color: var(--light-color);
    z-index: -9998;
}

/* Ensure all sections extend edge-to-edge */
.section,
section,
.container-fluid {
    width: 100%;
    min-width: 100vw;
    margin: 0;
    box-sizing: border-box;
    position: relative;
}

/* Prevent horizontal scrollbars */
* {
    box-sizing: border-box;
}

/* Mobile-specific edge-to-edge fixes */
@media screen and (max-width: 767.98px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
        position: relative;
    }
    
    .container,
    .container-fluid,
    .row {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.7);
    width: 100%;
    min-width: 100vw;
    margin: 0;
    padding: 0;
    left: 0;
    right: 0;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 1;
    padding: 0 20px;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2rem;
    animation: smoothBounce 3s ease-in-out infinite;
    transition: all 0.3s ease;
    opacity: 0.8;
    z-index: 2;
    pointer-events: auto;
    touch-action: manipulation;
}

.scroll-down:hover {
    color: #E3242B;
    transform: translateX(-50%) scale(1.1);
    opacity: 1;
}

.hero-content .btn {
    display: inline-block;
    background-color: #ef4444;
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.hero-content .btn:hover {
    background-color: #dc2626;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(239, 68, 68, 0.4);
}

.hero-content .btn:active {
    transform: scale(0.98) translateY(-1px);
    transition: transform 0.1s ease;
}

@media (hover: none) {
    .hero-content .btn:hover {
        transform: none;
    }
    
    .hero-content .btn:active {
        transform: scale(0.95);
        background-color: #dc2626;
        transition: all 0.15s ease;
    }
}

.hero-subtext {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 2rem;
    color: #f5f5f5;
    letter-spacing: 0.03em;
    line-height: 1.6;
    margin-bottom: 2rem;
    margin-top: 1rem;
    max-width: 650px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.static-text {
    display: inline;
    margin-right: 0;
}

.rotating-text {
    display: inline-block;
    color: #E3242B;
    font-weight: 500;
    min-width: 280px;
    text-align: left;
    position: relative;
    animation: fadeIn 0.5s ease-in-out;
}

.rotating-text.fade-out {
    animation: fadeOut 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Typewriter hero animation */
.animated-text-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 2.4em; /* Increased to accommodate two lines */
    overflow: hidden;
    isolation: isolate; /* prevent blending artifacts */
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding: 0 1rem;
}

.animated-text {
    display: inline-block;
    color: #E3242B;
    font-weight: 800;
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    text-align: center;
    position: relative;
    z-index: 1;
    background: linear-gradient(-45deg, #E3242B 0%, #dc2626 25%, #991b1b 50%, #E3242B 75%, #dc2626 100%);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
    filter: drop-shadow(0 3px 12px rgba(227, 36, 43, 0.6));
    max-width: min(85vw, 500px);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3; /* Slightly increased for better two-line spacing */
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 0;
    padding: 0.25rem 0;
    vertical-align: middle; /* Ensure proper centering */
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Desktop-specific horizontal layout for hero subtext */
@media (min-width: 1024px) {
    .hero-subtext {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.70rem; /* subtle breathing room between static and rotating text */
        flex-wrap: nowrap;
        margin-bottom: 1.5rem;
    }
    
    .static-text {
        flex-shrink: 0;
    }
    
    .animated-text-container {
        flex-shrink: 0;
        min-width: 0;
        white-space: nowrap;
        width: auto; /* prevent full-width container creating a large gap */
        max-width: none;
        padding: 0; /* remove internal padding that adds extra space */
        display: inline-flex;
        align-items: center;
    }
    
    .hero-subtext .static-text {
        font-size: 2rem;
        line-height: 1.2;
    }
    .hero-subtext .animated-text {
        font-size: 2.5rem; /* make rotating headline bigger on desktop */
        line-height: 1.2;
    }
    
    /* Force single-line rotating headline on desktop */
    .animated-text {
        white-space: nowrap;
        max-width: none;
        overflow-wrap: normal;
        word-wrap: normal;
        hyphens: none;
        margin-left: 0; /* ensure spacing relies on gap */
    }

    /* Prevent line breaks injected in phrases from splitting line on desktop */
    .animated-text br { display: none; }
    
    /* Reduce button spacing on desktop */
    .hero-content .btn {
        margin-top: 1rem;
    }
}

/* Tablet layout - stack vertically like mobile */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-subtext {
        display: flex;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px;
        margin-bottom: 1.8rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 0 15px;
        max-width: 95%;
    }
    
    .hero-subtext {
        font-size: 2rem;
        margin-bottom: 1.8rem;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px;
        min-height: 3.2em;
        line-height: 1.4;
    }
    .animated-text { 
        font-size: clamp(2rem, 7vw, 2.6rem); /* larger rotating headline on mobile */
        font-weight: 700;
        line-height: 1.3;
        max-width: min(85vw, 500px);
        padding: 0.25rem 0.5rem;
    }
    
    .project-info {
        padding: 22px;
    }
    
    .project-info p {
        line-height: 1.8;
        margin-bottom: 1.8rem;
    }
    
    .skill-card {
        padding: 28px 22px;
    }
    
    .skill-card p {
        line-height: 1.8;
    }
}

@media (max-width: 576px) {
    .hero-content {
        padding: 0 12px;
        max-width: 98%;
    }
    
    .hero-subtext {
        font-size: 1.8rem;
        line-height: 1.4;
        min-height: 3.6em;
        gap: 10px;
        margin-bottom: 2rem;
        flex-direction: column !important;
        align-items: center !important;
    }
    .animated-text { 
        font-size: clamp(2.2rem, 7.5vw, 2.8rem); /* slightly bigger on small phones */
        font-weight: 700;
        line-height: 1.3;
        max-width: min(85vw, 450px);
        padding: 0.5rem;
    }
    
    .project-info {
        padding: 24px 20px;
    }
    
    .project-info p {
        line-height: 1.9;
        margin-bottom: 2rem;
    }
    
    .skill-card {
        padding: 30px 24px;
    }
    
    .skill-card p {
        line-height: 1.9;
    }
}


@keyframes smoothBounce {
    0%, 100% {
        transform: translateY(0) translateX(-50%);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-15px) translateX(-50%);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}


/* Modern Transparent Navbar */
.navbar {
    transition: all 0.3s ease;
    padding: 15px 0;
    background: transparent !important;
    backdrop-filter: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    min-width: 100vw;
    margin: 0;
    border: none;
    box-sizing: border-box;
}

/* Navbar with background on scroll or light sections */
.navbar.scrolled {
    background: transparent !important;
    backdrop-filter: none;
    box-shadow: none;
    padding: 15px 0;
}

/* Navbar Brand */
.navbar-brand {
    font-weight: 700 !important;
    font-size: 1.5rem;
    color: white !important;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10000;
}

.navbar.scrolled .navbar-brand {
    color: #ff3c3c !important;
    font-weight: 700 !important;
}

/* Ensure brand stays white and bold on mobile */
@media (max-width: 767.98px) {
    .navbar-brand {
        color: white !important;
        font-weight: 700 !important;
    }
    
    .navbar.scrolled .navbar-brand {
        color: white !important;
        font-weight: 700 !important;
    }
}

/* Navigation Links - Default (Dark Background) */
.nav-link {
    color: white !important;
    font-weight: 700 !important;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ff3c3c;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navigation Links - On Light Background */
.navbar.scrolled .nav-link {
    color: #ff3c3c !important;
    font-weight: 700 !important;
}

.navbar.scrolled .nav-link:hover {
    color: #ff3c3c !important;
}

.navbar.scrolled .nav-link::after {
    background-color: #ff3c3c;
}

/* Active Navigation Link */
.nav-link.active {
    color: white !important;
    font-weight: 700 !important;
}

.nav-link.active::after {
    width: 100%;
    background-color: #ff3c3c;
}

.navbar.scrolled .nav-link.active {
    color: #ff3c3c !important;
    font-weight: 700 !important;
}

/* Mobile Hamburger Menu - Hidden on desktop */
.navbar-toggler {
    border: none;
    color: white !important;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 12px;
    position: relative;
    z-index: 10001;
    display: none;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Show hamburger only on mobile */
@media (max-width: 767.98px) {
    .navbar-toggler {
        display: block;
    }
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.navbar-toggler .fas {
    color: white;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-toggler .fas {
    color: white;
}

/* Seamless Mobile Navbar - No Red Header Bar */
@media (max-width: 767.98px) {
    .navbar {
        background: transparent;
        backdrop-filter: none;
        padding: 12px 0;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: none;
    }
    
    .navbar.scrolled {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        padding: 8px 0;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-brand {
        font-size: 1.4rem;
        font-weight: 700;
        color: white !important;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        opacity: 1;
        transform: translateX(0);
    }
    
    .navbar.scrolled .navbar-brand {
        color: var(--text-color) !important;
        text-shadow: none;
        font-size: 1.2rem;
        opacity: 0;
        transform: translateX(-20px);
        pointer-events: none;
    }
    
    .navbar-toggler {
        background: rgba(0, 0, 0, 0.7);
        border-radius: 8px;
        padding: 12px 14px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    .navbar-toggler .fas {
        color: white !important;
        font-size: 1.3rem;
        text-shadow: none;
        transition: all 0.3s ease;
    }
    
    .navbar.scrolled .navbar-toggler {
        background: rgba(0, 0, 0, 0.8);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .navbar.scrolled .navbar-toggler:hover {
        background: rgba(0, 0, 0, 0.9);
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }
    
    .navbar-toggler:hover {
        background: rgba(0, 0, 0, 0.85);
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }
}

/* Desktop Navigation - Default Behavior */
.navbar-collapse {
    display: flex !important;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
}

/* Mobile Menu Overlay Background */
@media (max-width: 767.98px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        z-index: 9998;
        display: flex;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        padding: 0;
        margin: 0;
    }
    
    .navbar-collapse.show {
        opacity: 1;
        visibility: visible;
    }
    
    /* Sliding Menu Panel */
    .navbar-collapse .navbar-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 75vw;
        max-width: 350px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        z-index: 9999;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 30px 30px 30px;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        overflow-y: auto;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    }
    
    .navbar-collapse.show .navbar-nav {
        transform: translateX(0);
    }
    
}

/* Desktop navbar-collapse styling */
.navbar.scrolled .navbar-collapse {
    background: transparent;
}

/* Prevent background scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Resume Button Styling - Always Red */
.resume-btn {
    background-color: #ff3c3c !important;
    color: #fff !important;
    border-radius: 30px !important;
    padding: 10px 24px !important;
    margin-left: 15px !important;
    transition: all 0.3s ease !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    box-shadow: 0 6px 15px rgba(255, 60, 60, 0.3) !important;
    border: none !important;
    display: inline-block !important;
    position: relative !important;
    z-index: 1 !important;
}

.resume-btn,
.resume-btn:visited,
.resume-btn:hover,
.resume-btn:focus,
.resume-btn:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important; /* Safari iOS preserves white text */
}

.resume-btn:hover,
.resume-btn:focus,
.resume-btn:active {
    opacity: 1 !important; /* prevent lightening on tap/click */
}

.resume-btn:hover {
    background-color: #e63030 !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(255, 60, 60, 0.4) !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
}

.resume-btn:focus {
    background-color: #e63030 !important;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 0 0 3px rgba(227, 36, 43, 0.3), 0 6px 15px rgba(255, 60, 60, 0.3) !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
}

.resume-btn:active {
    background-color: #dc2626 !important;
    color: #fff !important;
    transform: translateY(-1px) scale(0.98) !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(255, 60, 60, 0.3) !important;
    font-weight: 700 !important;
    transition: all 0.1s ease !important;
}

.resume-btn:visited {
    background-color: #ff3c3c !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.navbar.scrolled .resume-btn {
    background-color: #ff3c3c !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.navbar.scrolled .resume-btn:hover,
.navbar.scrolled .resume-btn:focus,
.navbar.scrolled .resume-btn:active {
    background-color: #e63030 !important;
    color: #fff !important;
    font-weight: 700 !important;
    transform: translateY(-2px) !important;
}

/* Ensure text remains visible in mobile overlay menu as well */
@media (max-width: 767.98px) {
    .navbar-collapse .resume-btn,
    .navbar-collapse .resume-btn:visited,
    .navbar-collapse .resume-btn:hover,
    .navbar-collapse .resume-btn:focus,
    .navbar-collapse .resume-btn:active {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        opacity: 1 !important;
    }
}

/* Ensure Resume button text is always visible */
.resume-btn i,
.resume-btn span {
    color: #fff !important;
    font-weight: 700 !important;
}

.resume-btn:hover i,
.resume-btn:hover span,
.resume-btn:focus i,
.resume-btn:focus span,
.resume-btn:active i,
.resume-btn:active span {
    color: #fff !important;
    font-weight: 700 !important;
}

/* Desktop Navigation - Default horizontal layout */
.navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.nav-item {
    margin: 0;
}

/* Mobile Navigation Styling */
@media (max-width: 767.98px) {
    .navbar-nav {
        gap: 8px;
        width: 100%;
    }
    
    .nav-item {
        margin: 0;
        width: 100%;
    }
    
    .nav-link {
        padding: 15px 20px;
        margin: 0;
        border-radius: 8px;
        font-size: 1.1rem;
        font-weight: 600;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        width: 100%;
        text-align: left;
        border-left: 3px solid transparent;
    }
    
    .navbar-collapse .nav-link {
        color: white !important;
    }
    
    .navbar-collapse .nav-link:hover,
    .navbar-collapse .nav-link:focus {
        color: #ff3c3c !important;
        background: rgba(255, 255, 255, 0.08);
        border-left: 3px solid #ff3c3c;
        transform: translateX(5px);
    }
    
    .navbar-collapse .nav-link.active {
        color: #ff3c3c !important;
        border-left: 3px solid #ff3c3c;
        background: rgba(255, 60, 60, 0.1);
    }
    
    .navbar.scrolled .navbar-collapse .nav-link {
        color: white !important;
    }
    
    .navbar.scrolled .navbar-collapse .nav-link:hover {
        color: #ff3c3c !important;
    }
    
    /* Mobile Resume Button */
    .navbar-collapse .resume-btn {
        margin-top: 25px;
        font-size: 1.0rem;
        padding: 12px 24px;
        background-color: #ff3c3c !important;
        color: #fff !important;
        font-weight: 700 !important;
        border-radius: 25px !important;
        width: auto !important;
        text-align: center !important;
        border-left: none !important;
        box-shadow: 0 4px 12px rgba(255, 60, 60, 0.3);
    }
    
    .navbar-collapse .resume-btn:hover {
        background-color: #e63030 !important;
        color: #fff !important;
        font-weight: 700 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 16px rgba(255, 60, 60, 0.4);
        transition: all 0.2s ease !important;
    }
    
    .navbar-collapse .resume-btn:focus {
        background-color: #e63030 !important;
        color: #fff !important;
        font-weight: 700 !important;
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(227, 36, 43, 0.3), 0 4px 12px rgba(255, 60, 60, 0.3) !important;
        transition: all 0.2s ease !important;
    }
    
    .navbar-collapse .resume-btn:active {
        background-color: #dc2626 !important;
        color: #fff !important;
        font-weight: 700 !important;
        transform: scale(0.98) !important;
        box-shadow: 0 4px 12px rgba(255, 60, 60, 0.3) !important;
        transition: all 0.1s ease !important;
    }
    
    .navbar-collapse .resume-btn i,
    .navbar-collapse .resume-btn span {
        color: #fff !important;
        font-weight: 700 !important;
    }
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Left: Brand Name */
.header-brand {
    flex-shrink: 0;
}

.brand-link {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.brand-link:hover {
    color: white;
}

/* Brand link on light background - RED BOLD */
.fixed-header.scrolled .brand-link,
.fixed-header.on-light-section .brand-link {
    color: #ef4444;
    font-weight: 700;
}

.fixed-header.scrolled .brand-link:hover,
.fixed-header.on-light-section .brand-link:hover {
    color: #ef4444;
}

/* Center/Right: Navigation Container */
.header-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Desktop Navigation - Visible on Large Screens */
.desktop-nav {
    display: flex;
    align-items: center;
}

.desktop-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.desktop-nav-item {
    margin: 0;
}

.desktop-nav-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 15px;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.desktop-nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.desktop-nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Desktop navigation links on light backgrounds */
.fixed-header.scrolled .desktop-nav-link,
.fixed-header.on-light-section .desktop-nav-link {
    color: #ef4444;
    font-weight: 600;
}

.fixed-header.scrolled .desktop-nav-link:hover,
.fixed-header.on-light-section .desktop-nav-link:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.fixed-header.scrolled .desktop-nav-link.active,
.fixed-header.on-light-section .desktop-nav-link.active {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

/* Desktop Resume Button - Matching Explore My Work Button */
.desktop-resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ef4444;
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 40px !important;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
    white-space: nowrap;
    overflow: hidden;
}

.desktop-resume-btn:hover {
    background-color: #dc2626;
    color: white;
    transform: translateY(-3px);
}

.desktop-resume-btn:active {
    transform: scale(0.98) translateY(-1px);
    transition: transform 0.1s ease;
}

.desktop-resume-btn i {
    font-size: 1rem;
}

@media (hover: none) {
    .desktop-resume-btn:hover {
        transform: none;
    }
    
    .desktop-resume-btn:active {
        transform: scale(0.95);
        background-color: #dc2626;
        transition: all 0.15s ease;
    }
}

/* Mobile Menu - Hidden on Large Screens */
.mobile-menu {
    display: none;
    position: relative;
}

.header-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.header-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Hamburger icon on light backgrounds */
.fixed-header.scrolled .header-menu-toggle,
.fixed-header.on-light-section .header-menu-toggle {
    color: #ef4444;
}

.fixed-header.scrolled .header-menu-toggle:hover,
.fixed-header.on-light-section .header-menu-toggle:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Mobile Dropdown Menu */
.header-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.header-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-nav-list {
    list-style: none;
    margin: 0;
    padding: 15px 0;
}

.dropdown-nav-item {
    margin: 0;
}

.dropdown-nav-link {
    display: block;
    color: #374151;
    text-decoration: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-nav-link:hover {
    background-color: rgba(239, 68, 68, 0.05);
    color: #ef4444;
    transform: translateX(5px);
}

.dropdown-nav-link.active {
    background-color: rgba(239, 68, 68, 0.05);
    color: #ef4444;
}

/* Mobile Resume Button in Dropdown - Matching Explore My Work Button */
.dropdown-resume-item {
    margin-top: 15px;
    padding: 0 25px 15px;
}

.dropdown-resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ef4444;
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
    width: 100%;
    justify-content: center;
    white-space: nowrap;
}

.dropdown-resume-btn:hover {
    background-color: #dc2626;
    color: white;
    transform: translateY(-3px);
}

.dropdown-resume-btn:active {
    transform: scale(0.98) translateY(-1px);
    transition: transform 0.1s ease;
}

.dropdown-resume-btn i {
    font-size: 1rem;
}

@media (hover: none) {
    .dropdown-resume-btn:hover {
        transform: none;
    }
    
    .dropdown-resume-btn:active {
        transform: scale(0.95);
        background-color: #dc2626;
        transition: all 0.15s ease;
    }
}

/* Responsive Navigation */
@media (min-width: 992px) {
    .desktop-nav {
        display: flex;
    }
    .desktop-resume-btn {
        display: inline-flex !important;
    }
    .mobile-menu {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .desktop-nav {
        display: none !important;
    }
    .desktop-resume-btn {
        display: none !important;
    }
    .mobile-menu {
        display: block;
    }
}

.desktop-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 35px;
}

.desktop-nav-item {
    margin: 0;
}

.desktop-nav-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 0;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.desktop-nav-link:hover,
.desktop-nav-link.active {
    color: #ef4444;
}

.desktop-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ef4444;
    transition: all 0.3s ease;
}

.desktop-nav-link:hover::after,
.desktop-nav-link.active::after {
    width: 100%;
}

/* Desktop navigation on light background */
.fixed-header.scrolled .desktop-nav-link,
.fixed-header.on-light-section .desktop-nav-link {
    color: #ef4444;
}

.fixed-header.scrolled .desktop-nav-link:hover,
.fixed-header.scrolled .desktop-nav-link.active,
.fixed-header.on-light-section .desktop-nav-link:hover,
.fixed-header.on-light-section .desktop-nav-link.active {
    color: #dc2626;
}

/* Desktop Resume Button */
.desktop-resume-btn {
    background-color: #ef4444;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
}

.desktop-resume-btn:hover {
    background-color: #dc2626;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* Mobile Menu - Hidden on Desktop */
.mobile-menu {
    position: relative;
    display: none;
}

.header-menu-toggle {
    background-color: #E3242B;
    color: white;
    border: none;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(227, 36, 43, 0.3);
}

.header-menu-toggle:hover {
    background-color: #c51e24;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(227, 36, 43, 0.4);
}

.header-menu-toggle:active {
    transform: scale(0.95);
}

.header-menu-toggle[aria-expanded="true"] {
    background-color: #c51e24;
}

/* Mobile hamburger button on light background */
.fixed-header.scrolled .header-menu-toggle,
.fixed-header.on-light-section .header-menu-toggle {
    background-color: #E3242B;
    box-shadow: 0 4px 12px rgba(227, 36, 43, 0.3);
}

.fixed-header.scrolled .header-menu-toggle:hover,
.fixed-header.on-light-section .header-menu-toggle:hover {
    background-color: #c51e24;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(227, 36, 43, 0.4);
}

/* Dropdown Menu */
.header-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    min-width: 280px;
    background-color: #000;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Arrow */
.header-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #000;
}

/* Dropdown Navigation */
.dropdown-nav {
    padding: 20px 0;
}

.dropdown-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-nav-item {
    margin: 0;
}

.dropdown-nav-link {
    display: block;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.dropdown-nav-link:hover,
.dropdown-nav-link.active {
    background-color: rgba(227, 36, 43, 0.1);
    border-left-color: #E3242B;
    color: #E3242B;
}

/* Dropdown Resume Button */
.dropdown-resume-item {
    margin-top: 10px;
    padding: 0 20px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-resume-btn {
    display: block;
    background-color: #E3242B;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.dropdown-resume-btn:hover {
    background-color: #c51e24;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(227, 36, 43, 0.3);
}

/* Responsive Design */
@media (max-width: 992px) {
    /* Hide desktop navigation on tablets and smaller */
    .desktop-nav {
        display: none;
    }
    
    /* Show mobile menu on tablets and smaller */
    .mobile-menu {
        display: block;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }
    
    .brand-link {
        font-size: 1.3rem;
    }
    
    .header-menu-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .header-dropdown {
        min-width: 260px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .header-dropdown {
        min-width: calc(100vw - 40px);
        right: -15px;
    }
    
    .dropdown-nav-link {
        font-size: 1rem;
        padding: 14px 20px;
    }
}

/* Desktop Only - Fine-tune spacing */
@media (min-width: 1200px) {
    .desktop-nav-list {
        gap: 35px;
    }
    
    .desktop-nav-link {
        font-size: 1.05rem;
        padding: 10px 15px;
    }
}

/* Button General Styles */
.btn, .project-btn, .submit-btn, .filter-btn {
    text-decoration: none !important;
}

.btn:hover, .project-btn:hover, .submit-btn:hover, .filter-btn:hover {
    text-decoration: none !important;
}

/* Section Common Styles */
.section {
    padding: 100px 0;
    min-height: 500px;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #E3242B;
    margin: 15px auto 0;
}

   /* About Section */
        .about-section {
            background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
            padding: 8rem 0;
            min-height: 80vh;
            display: flex;
            align-items: center;
            position: relative;
            overflow: hidden;
        }
        
        .about-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #E3242B 0%, #dc2626 50%, #E3242B 100%);
            z-index: 1;
        }

        .about-section .section-title {
            font-size: 4rem;
            font-weight: 900;
            color: #1f2937;
            margin-bottom: 4rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            position: relative;
            display: inline-block;
        }

        .about-section .section-title::after {
            content: '';
            position: absolute;
            bottom: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 120px;
            height: 6px;
            background: linear-gradient(90deg, #E3242B 0%, #dc2626 50%, #E3242B 100%);
            border-radius: 3px;
            box-shadow: 0 4px 15px rgba(227, 36, 43, 0.3);
        }

        .about-section .section-title::before {
            content: '';
            position: absolute;
            top: 50%;
            left: -100px;
            transform: translateY(-50%);
            width: 80px;
            height: 2px;
            background: linear-gradient(90deg, transparent, #E3242B);
        }

        .about-section .section-title:after {
            right: -100px;
            left: auto;
            background: linear-gradient(90deg, #E3242B, transparent);
        }

        .profile-image-container {
            position: relative;
            display: flex;
            justify-content: center;
            margin-bottom: 3rem;
        }

        .profile-image-container::before {
            content: '';
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 140%;
            height: 140%;
            background: linear-gradient(45deg, rgba(227, 36, 43, 0.1), rgba(220, 38, 38, 0.05));
            border-radius: 50%;
            z-index: -1;
            animation: imageGlow 3s ease-in-out infinite;
        }

        .profile-img {
            width: 100%;
            max-width: 280px;
            border-radius: 25px;
            box-shadow: 0 20px 40px rgba(227, 36, 43, 0.12);
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            border: 3px solid rgba(255, 255, 255, 0.9);
            opacity: 0.95;
        }

        .profile-img:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 30px 60px rgba(227, 36, 43, 0.2);
            border-color: rgba(227, 36, 43, 0.4);
            opacity: 1;
        }

        @keyframes imageGlow {
            0%, 100% { 
                opacity: 0.3; 
                transform: translateX(-50%) scale(1);
            }
            50% { 
                opacity: 0.6; 
                transform: translateX(-50%) scale(1.05);
            }
        }

        .about-content {
            text-align: center;
            padding: 2rem;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .about-content h2 {
            font-size: 3.2rem;
            font-weight: 800;
            margin-bottom: 2rem;
            position: relative;
            display: inline-block;
            color: #1f2937;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .about-content h2 .highlight {
            color: #E3242B;
            position: relative;
            display: inline-block;
        }

        .about-content h2 .highlight::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: -8px;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, #E3242B, #dc2626, #E3242B);
            border-radius: 2px;
            animation: highlightPulse 2s ease-in-out infinite;
        }

        .about-content p {
            font-size: 1.2rem;
            line-height: 1.9;
            margin-bottom: 2.5rem;
            color: #374151;
            text-align: left;
            max-width: 100%;
            font-weight: 400;
            letter-spacing: 0.01em;
            transition: all 0.3s ease;
        }

        .about-content p:last-child {
            margin-bottom: 0;
            font-weight: 500;
            color: #1f2937;
        }

        /* Enhanced spacing between paragraphs for better readability */
        .about-content p + p {
            margin-top: 2.5rem;
        }

        @keyframes highlightPulse {
            0%, 100% { 
                opacity: 1; 
                transform: scaleX(1);
            }
            50% { 
                opacity: 0.7; 
                transform: scaleX(1.05);
            }
        }

        /* Mobile Optimizations */
        @media (max-width: 768px) {
            .section {
                padding: 2rem 0;
            }

            .about-section {
                padding: 4rem 0;
                min-height: 70vh;
            }

            .about-section .section-title {
                font-size: 2.5rem;
                margin-bottom: 3rem;
                letter-spacing: 0.03em;
            }

            .about-section .section-title::after {
                width: 80px;
                height: 4px;
            }

            .about-section .section-title::before,
            .about-section .section-title:after {
                display: none;
            }

            .profile-img {
                max-width: 180px;
                border: 3px solid white;
            }

            .profile-image-container {
                margin-bottom: 1.5rem;
            }

            .about-content {
                padding: 1.5rem;
                margin: 2rem 0;
            }

            .about-content h2 {
                font-size: 2.2rem;
                margin-bottom: 1.5rem;
            }

            .about-content h2 .highlight::after {
                height: 3px;
                bottom: -6px;
            }

            .about-content p {
                font-size: 1.1rem;
                line-height: 1.8;
                margin-bottom: 2rem;
                text-align: center;
            }

            .about-content p + p {
                margin-top: 2rem;
            }

            .container {
                padding-left: 1rem;
                padding-right: 1rem;
            }
        }

        /* Extra small screens */
        @media (max-width: 480px) {
            .section-title {
                font-size: 1.8rem;
            }

            .profile-img {
                max-width: 180px;
            }

            .about-content h2 {
                font-size: 1.6rem;
            }

            .about-content p {
                font-size: 1rem;
                line-height: 1.7;
                margin-bottom: 1.8rem;
            }

            .about-content p + p {
                margin-top: 1.8rem;
            }

            .about-section {
                padding: 2rem 0;
            }
        }

        /* Desktop layout restoration */
        @media (min-width: 992px) {
            .about-content {
                text-align: left;
            }

            .about-content h2::after {
                left: 0;
                transform: none;
            }

            .about-content p {
                text-align: left;
                font-size: 1.1rem;
                line-height: 1.8;
            }

            .profile-img {
                max-width: 260px;
            }

            .profile-image-container {
                margin-bottom: 0;
            }
        }



/* Skills Section */
.skills-section {
    background-color: var(--light-color);
}

.skill-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #E3242B;
}

.skill-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.skill-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Projects Section */
.projects-section {
    background-color: white;
}

/* Custom Tooltip Styles */
.filter-btn {
    position: relative;
}

/* Tooltip content above the button */
.filter-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow pointing down to button */
.filter-btn::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Show tooltip on hover with fade-in effect */
.filter-btn:hover::after,
.filter-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

/* Ensure tooltips work on mobile but with touch delay */
@media (hover: none) {
    .filter-btn::after,
    .filter-btn::before {
        display: none;
    }
}

.project-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid #E3242B;
    color: #E3242B;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: #cc0333;
    color: white;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.project-tag {
    background-color: var(--light-color);
    color: #E3242B;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 8px;
    margin-bottom: 8px;
}

.project-links a {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.project-links a:first-child {
    background-color: #E3242B;
    color: white;
}

.project-links a:last-child {
    border: 1px solid #E3242B;
    color: #E3242B;
}

.project-links a:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Project Button Improvements */
.project-btn {
    background-color: #E3242B !important;
    border-color: #E3242B !important;
    color: white !important;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.project-btn:hover {
    background-color: #c51e24 !important;
    border-color: #c51e24 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(227, 36, 43, 0.3);
}

.project-btn:focus {
    outline: 2px solid #E3242B;
    outline-offset: 2px;
}

/* Contact Section */
.contact-section {
    background-color: var(--light-color);
}

.contact-info {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: #E3242B;
    font-size: 1.2rem;
}

.contact-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-text p, .contact-text a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-text a:hover {
    color: #E3242B;
}

.contact-form {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Desktop contact section - equal height cards */
@media (min-width: 1024px) {
    .contact-section .row {
        display: flex;
        align-items: stretch;
    }
    
    .contact-section .col-lg-5,
    .contact-section .col-lg-7 {
        display: flex;
        flex-direction: column;
    }
    
    .contact-info,
    .contact-form {
        flex: 1;
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    /* Match form spacing to contact info spacing */
    .contact-form {
        justify-content: space-between;
    }
    
    .contact-form h3 {
        margin-bottom: 1rem;
    }
    
    .contact-form .mb-3 {
        margin-bottom: 1.5rem;
    }
    
    .contact-form .row .mb-3 {
        margin-bottom: 1.5rem;
    }
    
    /* Push submit button to align with GitHub link */
    .contact-form form {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    
    .contact-form .submit-btn {
        margin-top: auto;
        align-self: flex-start;
        margin-bottom: -10px; /* Slightly reduce negative margin */
        transform: translateY(-20px); /* Raise button a bit more for better alignment */
    }
    
    /* Ensure the last form element has proper spacing for alignment */
    .contact-form .mb-3:last-of-type {
        margin-bottom: 2rem;
    }
    
    /* Remove bottom margin from last contact item for precise alignment */
    .contact-info .contact-item:last-child {
        margin-bottom: 0;
    }
}

.form-control {
    min-height: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.4;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.4;
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(227, 36, 43, 0.1);
    border-color: #E3242B;
    outline: none;
}

textarea.form-control {
    height: 120px;
    min-height: 120px;
    padding: 12px 16px;
    line-height: 1.5;
    resize: vertical;
}

.submit-btn {
    background-color: #E3242B;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background-color: #6b7280;
    cursor: not-allowed;
    transform: none;
}

/* Form Validation Styles */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Form Status Messages */
.form-status {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-status.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}
.footer {
    background: #000;
    color: white;
    padding: 50px 0 20px;
    text-align: center;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin: 0 6px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    margin-top: 2.5rem !important;
}

.footer-links h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
}

.footer-links h4::after {
    content: '';
    width: 40px;
    height: 2px;
    background: #E3242B;
    display: block;
    margin: 8px auto 0;
}

.footer-links ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-links li {
    display: inline-block;
    margin: 0 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

@media (max-width: 576px) {
    .footer-links li {
        display: block;
        margin: 8px 0;
    }
}


.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Focus States for Accessibility */
*:focus {
    outline: 2px solid #E3242B;
    outline-offset: 2px;
}

/* Remove harsh outlines and replace with subtle effects */
.nav-link:focus {
    outline: 2px solid rgba(227, 36, 43, 0.8);
    outline-offset: 2px;
}

.resume-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(227, 36, 43, 0.3) !important;
}

.resume-btn:focus:not(:focus-visible) {
    box-shadow: 0 6px 15px rgba(255, 60, 60, 0.3) !important;
    outline: none !important;
}

/* Remove focus state after click for better UX */
.resume-btn:focus:not(:hover):not(:active) {
    background-color: #ff3c3c !important;
    transform: none !important;
    box-shadow: 0 6px 15px rgba(255, 60, 60, 0.3) !important;
    transition: all 0.2s ease !important;
}

/* Improved Responsive Typography */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .hero-subtext {
        font-size: 1.8rem;
    }
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-subtext {
        font-size: 1.6rem;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .resume-btn {
        margin-left: 10px !important;
        padding: 6px 16px !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 100vh;
        min-height: 100vh;
        padding: 0;
    }
    
    .hero-content {
        padding: 0 20px;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-top: -60px; /* Offset navbar height */
    }
    
    .hero-content h1 {
        font-size: 3.2rem;
        margin-bottom: 1rem;
        font-weight: 700;
    }
    
    .hero-subtext {
        font-size: 1.5rem;
        margin-bottom: 2rem;
        min-height: 3.2em;
        line-height: 1.4;
    }
    
    .animated-text {
        font-size: clamp(1.5rem, 4.2vw, 1.7rem);
        font-weight: 700;
        line-height: 1.3;
        max-width: min(82vw, 450px);
        padding: 0.25rem 0.5rem;
    }
    
    .hero-content .btn {
        font-size: 1.1rem;
        padding: 16px 36px;
        margin-top: 0.5rem;
    }
    
    .scroll-down {
        bottom: 30px;
        font-size: 2rem;
        padding: 15px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
        min-width: 50px;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .rotating-text {
        min-width: 200px;
        font-size: 1rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .about-content {
        margin-top: 30px;
    }
    
    .project-img {
        height: 180px;
    }
    
    .project-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .skill-card {
        padding: 25px 20px;
    }
    
    
}

@media (max-width: 576px) {
    .hero-section {
        height: 100vh;
        min-height: 100vh;
    }
    
    .hero-content {
        padding: 0 15px;
        height: 100vh;
        margin-top: -50px; /* Adjust for smaller navbar */
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
        margin-bottom: 0.8rem;
        font-weight: 700;
    }
    
    .hero-subtext {
        font-size: 1.6rem;
        line-height: 1.4;
        min-height: 3.4em;
        margin-bottom: 1.8rem;
    }
    
    .animated-text {
        font-size: clamp(1.6rem, 5vw, 1.9rem);
        font-weight: 700;
        line-height: 1.3;
        max-width: min(78vw, 380px);
        padding: 0.25rem 0.5rem;
    }
    
    .hero-content .btn {
        font-size: 1rem;
        padding: 14px 32px;
        margin-top: 0.3rem;
    }
    
    .scroll-down {
        bottom: 25px;
        font-size: 1.8rem;
        padding: 12px;
        background: rgba(0, 0, 0, 0.4);
        border-radius: 50%;
        min-width: 45px;
        min-height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .rotating-text {
        min-width: 180px;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 0.8rem;
        margin: 0 3px 8px;
    }
    
    .project-info {
        padding: 20px;
    }
    
    .project-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .skill-card h3 {
        font-size: 1.2rem;
    }
    
    .skill-card p {
        font-size: 0.9rem;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
    }
    
    .timeline-content p {
        font-size: 0.9rem;
    }
    
    .contact-item {
        margin-bottom: 20px;
    }
    
    .form-control {
        height: 45px;
        font-size: 16px;
    }
    
    textarea.form-control {
        height: 120px;
    }
    
    .submit-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

.about-container {
    padding: 120px 0;
    background-color: #f9fafb;
    position: relative;
    overflow: hidden;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
}

.profile-column {
    position: relative;
}

.image-container {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.image-container img {
    display: block;
    width: 100%;
    height: auto;
    transform: scale(1);
    transition: transform 0.5s ease;
}

.image-container:hover img {
    transform: scale(1.03);
}

.bio-column {
    position: relative;
}

.name-heading {
    font-size: 42px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.title-subheading {
    font-size: 20px;
    font-weight: 500;
    color: #4a5568;
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    position: relative;
}

.title-subheading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #3182ce;
}

.bio-text p {
    font-size: 16px;
    line-height: 1.8;
    color: #2d3748;
    margin-bottom: 24px;
}

.skills-section {
    margin-top: 40px;
}

.skills-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 20px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.skills-grid li {
    background-color: #e2e8f0;
    color: #2d3748;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skills-grid li:hover {
    background-color: #3182ce;
    color: white;
    transform: translateY(-2px);
}

/* Timeline Section */
.timeline-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

/* Journey Section */
.journey-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.journey-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.3), transparent);
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Vertical center line */
.timeline-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: #E3242B;
    transform: translateX(-50%);
}

/* Timeline item */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

/* Dot */
.timeline-dot {
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 4px solid #E3242B;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -12px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -12px;
}

/* Date */
.timeline-date {
    font-weight: 700;
    color: #E3242B;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Content */
.timeline-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    margin-top: 0;
    font-size: 1.3rem;
    color: #333;
}

.timeline-content p {
    color: #666;
    margin-bottom: 0;
}

/* ------------------ Responsive Design ------------------ */
@media screen and (max-width: 768px) {
    .timeline-container::after {
        left: 22px;
        transform: none;
    }

    .timeline-item {
        width: 100%;
        padding: 20px 20px 20px 60px;
        left: 0 !important;
        text-align: left !important;
    }

    .timeline-dot {
        left: 22px !important;
        right: auto;
        transform: translateX(-50%);
    }
}

@media screen and (max-width: 480px) {
    .timeline-container::after {
        left: 18px;
    }
    
    .timeline-item {
        padding: 15px 15px 15px 50px;
    }

    .timeline-dot {
        width: 16px;
        height: 16px;
        left: 18px !important;
        transform: translateX(-50%);
    }

    .timeline-content {
        padding: 15px;
    }

    .timeline-date {
        font-size: 1rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }
}


/* Skills Section */
.skills-section {
    background-color: #f9f9fc;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.skills-section::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.04);
    z-index: 0;
}

.skills-section::after {
    content: '';
    position: absolute;
    bottom: -120px;
    right: -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.06);
    z-index: 0;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: #E3242B;
    border-radius: 2px;
}

.skill-card {
    background: white;
    border-radius: 15px;
    padding: 30px 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    transition: all 0.4s ease;
    height: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid transparent;
}

.skill-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border-bottom: 3px solid #E3242B;
}

.skill-icon {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: #E3242B;
    height: 75px;
    width: 75px;
    line-height: 75px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(var(--primary-rgb), 0.08);
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    background-color: #E3242B;
    color: white;
    transform: scale(1.1);
}

.skill-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.skill-card:hover h3 {
    color: #E3242B;
}

.skill-card p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (max-width: 991px) {
    .skills-section {
        padding: 5rem 0;
    }
    
    .section-title {
        font-size: 2.4rem;
    }
    
    .skill-card {
        padding: 25px 20px;
    }
    
    .skill-icon {
        font-size: 2.5rem;
        height: 65px;
        width: 65px;
        line-height: 65px;
    }
}

@media (max-width: 767px) {
    .section-title {
        font-size: 2.2rem;
    }
    
    .skill-card h3 {
        font-size: 1.2rem;
    }
    
    .skill-icon {
        margin-bottom: 1.2rem;
    }
}

/* Professional UI Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered Animation Delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Enhanced Button Animations */
.btn {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Card Hover Enhancements */
.project-card,
.skill-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.project-card::before,
.skill-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.project-card:hover::before,
.skill-card:hover::before {
    opacity: 1;
}

.project-card:hover,
.skill-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(96, 165, 250, 0.3);
    border-radius: 50%;
    border-top-color: #60a5fa;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}






/* Professional Contact Form Enhancements */
.contact-form {
    position: relative;
}

.contact-form .form-control {
    min-height: 48px;
    height: 48px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
    line-height: 1.4;
    box-sizing: border-box;
}

.contact-form .form-control:focus {
    border-color: #E3242B;
    box-shadow: 0 0 0 3px rgba(227, 36, 43, 0.1);
    outline: none;
}

.contact-form .form-control.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-error:before {
    content: '⚠';
    font-size: 0.75rem;
}

.form-status-message {
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-status-message.success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.form-status-message.success:before {
    content: '✓';
    background: #059669;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.form-status-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.form-status-message.error:before {
    content: '✕';
    background: #dc2626;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.form-status-message.loading {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.form-status-message.loading:before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #bfdbfe;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}


/* Enhanced Button States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Form Animation Enhancements */
.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form .form-control {
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-form .form-control:focus {
    transform: translateY(-1px);
}

/* Mobile Contact Section Improvements */
@media (max-width: 768px) {
    .contact-section {
        padding: 3rem 0;
    }
    
    .contact-info {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .contact-item {
        margin-bottom: 1.5rem;
        align-items: flex-start;
    }
    
    /* Fix contact icon sizing and alignment */
    .contact-icon {
        width: 3rem;
        height: 3rem;
        min-width: 3rem;
        min-height: 3rem;
        margin-right: 1rem;
        font-size: 1.1rem;
        flex-shrink: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Ensure all icons have consistent sizing */
    .contact-icon i {
        font-size: 1.1rem !important;
        line-height: 1;
        width: auto;
        height: auto;
    }
    
    .contact-text {
        flex: 1;
        padding-top: 0.25rem;
    }
    
    .contact-text h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }
    
    .contact-text p,
    .contact-text a {
        font-size: 0.9rem;
        line-height: 1.4;
        margin: 0;
    }
    
    /* Enhanced form styling for mobile */
    .contact-form {
        padding: 1.5rem;
        border-radius: 0.75rem;
        max-width: 100%;
        margin: 0 auto;
        text-align: left;
    }
    
    .contact-form h3 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    /* Standardized input field sizing for mobile (375-480px) */
    .contact-form .form-control {
        font-size: 16px; /* Prevents zoom on iOS while remaining readable */
        padding: 12px 16px;
        min-height: 48px;
        height: 48px; /* Fixed height for all input fields */
        width: 100%;
        border-radius: 8px;
        border: 2px solid #e2e8f0;
        margin-bottom: 20px; /* Consistent spacing between fields */
        transition: all 0.3s ease;
        line-height: 1.4;
        box-sizing: border-box;
        display: block;
    }
    
    .contact-form .form-control::placeholder {
        font-size: 16px; /* Match input font size */
        color: #6b7280;
        line-height: 1.4;
    }
    
    .contact-form .form-control:focus {
        border-color: #E3242B;
        box-shadow: 0 0 0 0.1875rem rgba(227, 36, 43, 0.1);
        outline: none;
        transform: translateY(-0.0625rem);
    }
    
    /* Textarea specific styling - only this should be taller */
    textarea.form-control {
        height: 120px; /* Fixed height for textarea */
        min-height: 120px;
        max-height: 200px; /* Limit maximum height */
        padding: 12px 16px; /* Same padding as other fields */
        resize: vertical;
        line-height: 1.5; /* Slightly better line height for multi-line text */
    }
    
    /* Ensure two-column fields have same sizing */
    /* Make two-column inputs span full width on mobile */
    .contact-form .row {
        margin-left: 0;
        margin-right: 0;
        --bs-gutter-x: 0; /* remove bootstrap horizontal gutters */
    }
    .contact-form .row > * {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .contact-form .row .col-md-6 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    .contact-form .row .col-md-6 .form-control {
        height: 48px; /* Force same height for name and email */
        min-height: 48px;
        margin-bottom: 20px;
        font-size: 16px !important; /* Force same font size for name and email */
        width: 100% !important; /* ensure full width overrides any inline styles */
        max-width: 100% !important;
    }
    
    .contact-form .row .col-md-6 .form-control::placeholder {
        font-size: 16px !important; /* Force same placeholder size for name and email */
        color: #6b7280;
        line-height: 1.4;
    }
    
    /* Submit button mobile optimization */
    .submit-btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        min-height: 3rem;
    }
    
    /* Form validation styling */
    .contact-form .form-control.is-invalid {
        border-color: #dc3545;
        box-shadow: 0 0 0 0.1875rem rgba(220, 53, 69, 0.1);
    }
    
    .contact-form .form-control.is-valid {
        border-color: #198754;
        box-shadow: 0 0 0 0.1875rem rgba(25, 135, 84, 0.1);
    }
    
    /* Responsive two-column form layout */
    .contact-form .row .col-md-6 {
        margin-bottom: 0.5rem;
    }
    
    /* Form status styling */
    .form-status {
        margin-top: 1rem;
        padding: 0.75rem;
        border-radius: 0.5rem;
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .form-status.success {
        background-color: #d1e7dd;
        color: #0f5132;
        border: 0.0625rem solid #badbcc;
    }
    
    .form-status.error {
        background-color: #f8d7da;
        color: #721c24;
        border: 0.0625rem solid #f1aeb5;
    }
}

/* Mobile placeholder consistency and sizing */
@media (max-width: 768px) {
    .contact-form input::placeholder,
    .contact-form textarea::placeholder {
        font-size: 16px !important;
    }
    .contact-form input::-webkit-input-placeholder,
    .contact-form textarea::-webkit-input-placeholder {
        font-size: 16px !important;
    }
    .contact-form input::-moz-placeholder,
    .contact-form textarea::-moz-placeholder {
        font-size: 16px !important;
    }
    .contact-form input:-ms-input-placeholder,
    .contact-form textarea:-ms-input-placeholder {
        font-size: 16px !important;
    }
    .contact-form input::-ms-input-placeholder,
    .contact-form textarea::-ms-input-placeholder {
        font-size: 16px !important;
    }
}

/* Extra small mobile screens (375-480px) optimization */
@media (max-width: 480px) {
    .contact-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .contact-form {
        padding: 1.25rem;
        margin: 0;
    }
    
    .contact-form .form-control {
        font-size: 16px;
        height: 3.25rem;
        padding: 0.875rem 0.875rem;
        margin-bottom: 1.25rem;
    }
    
    .contact-form .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Ensure full-width stacking on very small screens as well */
    .contact-form .row .col-md-6 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 0;
    }
    
    /* Ensure form fields stack properly on very small screens */
    .contact-form .row .col-md-6:first-child {
        margin-bottom: 0;
    }
    
    textarea.form-control {
        height: 7rem;
        min-height: 7rem;
    }
}

/* Final mobile overrides for rotating headline size */
@media (max-width: 768px) {
    .hero-subtext .animated-text {
        font-size: clamp(1.7rem, 5.2vw, 2.0rem);
        transition: opacity 0.35s ease; /* on mobile, use fade-only to prevent twitch */
    }
}

@media (max-width: 576px) {
    .hero-subtext .animated-text {
        font-size: clamp(1.75rem, 5.6vw, 2.1rem);
        line-height: 1.25; /* slightly tighter for two-line variants */
    }
}

/* Slightly reduce the specific long phrase on mobile only */
@media (max-width: 768px) {
    .hero-subtext .animated-text[data-phrase="aws-azure"] {
        font-size: clamp(1.6rem, 4.8vw, 1.9rem);
    }
    .hero-subtext .animated-text[data-phrase="soccer"] {
        font-size: clamp(1.85rem, 5.8vw, 2.2rem); /* slightly larger for short phrase */
    }
}
@media (max-width: 576px) {
    .hero-subtext .animated-text[data-phrase="aws-azure"] {
        font-size: clamp(1.6rem, 5.2vw, 2.0rem);
    }
    .hero-subtext .animated-text[data-phrase="soccer"] {
        font-size: clamp(1.95rem, 6.4vw, 2.3rem);
    }
}

