:root {
    --primary-color: #2a2a2a;
    --secondary-color: #666666;
    --accent-color: #ffffff;
    --background-color: #f8f9fc;
    --dark-button: #2a2a2a;
    --dark-button-hover: #3a3a3a;
    --brand-color: #000000;
    --divider-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.95);
}

@keyframes navbarSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes section-divider {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 0.7;
    }
}

@keyframes star-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes nav-hover {
    to { transform: translateY(-2px); }
}

@keyframes shine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.1),
                    0 0 10px rgba(255, 255, 255, 0.1),
                    0 0 15px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.2),
                    0 0 20px rgba(255, 255, 255, 0.2),
                    0 0 30px rgba(255, 255, 255, 0.2);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.1),
                    0 0 10px rgba(255, 255, 255, 0.1),
                    0 0 15px rgba(255, 255, 255, 0.1);
    }
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--primary-color);
    line-height: 1.6;
    margin-top: 100px;
    background-color: var(--background-color);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
    border-radius: 50px;
    margin: 20px auto;
    max-width: 900px;
    width: 92%;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1030;
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: navbarSlideIn 0.6s ease-out;
}

.navbar:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15), 0 6px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(-50%) translateY(-2px);
}

.navbar .container {
    padding: 16px 30px;
    border-radius: 50px;
}

.navbar-collapse {
    background-color: transparent;
    transition: all 0.2s ease-out !important;
}

@media (max-width: 992px) {
    .navbar {
        margin: 15px auto;
        max-width: 95%;
        border-radius: 40px;
    }
    
    .navbar .container {
        padding: 14px 24px;
    }

    .navbar-collapse {
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.25s ease-out !important;
        padding: 1rem;
        background-color: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: 25px;
        margin-top: 10px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.6);
    }

    .navbar-collapse.show {
        opacity: 1;
        transform: translateY(0);
    }

    .navbar-collapse .nav-link {
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.15s ease-out, transform 0.15s ease-out !important;
        margin: 0.4rem 0;
        border-radius: 20px;
        padding: 0.8rem 1.2rem !important;
        border: 1px solid transparent;
    }

    .navbar-collapse .nav-item-show {
        opacity: 1;
        transform: translateY(0);
    }

    .navbar-collapse.collapsing {
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.15s ease-out !important;
    }
    
    /* Mobile navigation hover effects */
    .navbar-collapse .nav-link:hover {
        background: linear-gradient(135deg, rgba(42, 42, 42, 0.08) 0%, rgba(42, 42, 42, 0.04) 100%) !important;
        border: 1px solid rgba(42, 42, 42, 0.12) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(42, 42, 42, 0.1) !important;
    }

}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff !important;
    letter-spacing: 1.8px;
    padding: 0.7rem 1.1rem;
    margin-right: 1.2rem;
    position: relative;
    z-index: 1;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background-color: #1a1a1a;
    border-radius: 50%;
    z-index: -1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-link {
    color: var(--dark-button) !important;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0.7rem 0.9rem !important;
    position: relative;
    font-size: 1rem;
    background: none !important;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 22px;
    border: 1px solid transparent;
    letter-spacing: 0.3px;
}

.nav-link:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.08) 0%, rgba(42, 42, 42, 0.04) 100%) !important;
    border: 1px solid rgba(42, 42, 42, 0.12);
    box-shadow: 0 4px 12px rgba(42, 42, 42, 0.1);
    color: var(--dark-button) !important;
}

/* Desktop Navigation */
@media (min-width: 1190px) {
    .navbar-nav {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        margin-right: 1.4rem;
    }
    
    .nav-item {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navbar-nav .nav-item:last-child .nav-link {
        margin-right: 0;
    }

    .nav-link {
        height: 38px;
        box-sizing: border-box;
        min-width: 82px;
        padding: 0.7rem 0.9rem !important;
        border-radius: 22px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border: 1px solid transparent;
        font-size: 1rem;
    }
    
    .nav-link:hover {
        background: linear-gradient(135deg, rgba(42, 42, 42, 0.08) 0%, rgba(42, 42, 42, 0.04) 100%);
        border: 1px solid rgba(42, 42, 42, 0.12);
        box-shadow: 0 4px 12px rgba(42, 42, 42, 0.1);
        transform: translateY(-3px);
    }
}


/* Removed underline animation for cleaner look */

/* Sections */
section {
    padding: 5rem 0;
    position: relative;
    margin-bottom: 3.5rem;
}

/* Consistent section dividers */
section::after {
    content: '';
    position: absolute;
    bottom: -3.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(25, 25, 25, 0.1) 10%,
        rgba(25, 25, 25, 0.25) 25%,
        rgba(25, 25, 25, 0.35) 50%,
        rgba(25, 25, 25, 0.25) 75%,
        rgba(25, 25, 25, 0.1) 90%,
        transparent 100%
    );
    opacity: 2;
}

@media (max-width: 768px) {
    section {
        margin-bottom: 2rem;
        padding: 3rem 0;
    }

    section::after {
        width: 90%;
        bottom: -2rem;
    }
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--primary-color);
}

/* Rounded Section Styles */
.rounded-section {
    border-radius: 20px;
    padding: 2.5rem;
    background-color: var(--dark-button);
    color: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 900px;
    margin: 0 auto;
}

.rounded-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Profile Photo */
.profile-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 1.5rem;
    padding: 4px;
    border-radius: 50%;
    background: transparent;
}

/* Removed hover effects as requested - no changes on mouse hover */

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Removed photo hover effects as requested */

.profile-container::before {
    content: '';
    position: absolute;
    top: -1.5px;
    left: -1.5px;
    right: -1.5px;
    bottom: -1.5px;
    border-radius: 50%;
    /* You can change the animation colors here */
    background: linear-gradient(45deg, 
        transparent 0%,
        rgba(0, 0, 0) 25%,
        transparent 50%,
        rgba(0, 0, 0) 75%,
        transparent 100%
    );
    opacity: 1;
    z-index: 0;
    animation: star-rotate 6s ease-in-out infinite;
    box-shadow: 
        0 0 15px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(0, 0, 0, 0.1),
        inset 0 0 5px rgba(255, 255, 255, 0.1);
}

.profile-container::after {
    content: '';
    position: absolute;
    top: -1.5px;
    left: -1.5px;
    right: -1.5px;
    bottom: -1.5px;
    border-radius: 50%;
    /* You can change the animation colors here */
    background: linear-gradient(135deg, 
        rgba(0, 0, 0) 0%,
        transparent 20%,
        rgba(0, 0, 0) 40%,
        transparent 60%,
        rgba(0, 0, 0, 0.7) 80%,
        transparent 100%
    );
    z-index: -1;
    animation: star-rotate 6s ease-in-out infinite reverse;
    opacity: 1;
}

/* About Section */
.about-section .subsection {
    background-color: rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.about-section .subsection:hover {
    transform: translateY(-3px);
}

.subsection-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.subsection-title i {
    color: white;
    font-size: 1.4rem;
    opacity: 0.9;
}

/* Lists and Tags */
.interests-list, .skills-list, .languages-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.interest-tag, .skill-tag, .language-tag {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    color: white;
    transition: transform 0.3s ease;
}

.interest-tag:hover, .skill-tag:hover, .language-tag:hover {
    transform: translateY(-2px);
}

/* Education Section */
.education-detail {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 16px;
    margin-top: 1.5rem;
}

.education-detail h5 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

.honors-list li {
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 0.5rem;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.project-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #2a2a2a;
    box-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    contain: layout style paint;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: rgb(60, 60, 60);
}

.project-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background-color: rgba(255, 255, 255, 0.05);
    margin: 0 auto 1rem auto;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

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

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

.project-item:hover .project-image {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.project-info {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: center;
}

.project-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-align: center;
}

.project-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.project-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 400;
}

.project-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #4ade80;
    font-weight: 500;
}

.project-status.not-live {
    color: #ef4444;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background-color: #4ade80;
    border-radius: 50%;
    animation: livePulse 2s infinite;
    box-shadow: 0 0 4px #4ade80;
}

.not-live-indicator {
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 4px #ef4444;
}

@keyframes livePulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.project-details-btn {
    margin-top: auto;
    background: linear-gradient(135deg, #ffffff 0%, #dddddd 100%);
    color: rgb(0, 0, 0);
    border: none;
    padding: 0.7rem 1.25rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.project-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
}

/* Project Modal Styles */
.project-modal-content {
    background: #2a2a2a;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    max-width: 760px;
    margin: 0 auto;
}

.project-modal-header {
    background: #333333;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.project-modal-header .modal-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.3rem;
}

.project-modal-body {
    padding: 2.5rem;
    color: #ffffff;
}

.project-modal-image {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 5.5/3;
}

.modal-project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background-color: rgba(255, 255, 255, 0.05);
}

.project-modal-description {
    line-height: 1.6;
}

.project-modal-description p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.9);
}

.project-modal-footer {
    background: #333333;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.project-modal-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.project-modal-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.project-modal-footer .btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #dddddd 100%);
    color: #000000;
    border: none;
    font-weight: 500;
    padding: 0.7rem 1.25rem;
    border-radius: 30px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.project-modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #cccccc 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #000000;
}

/* Responsive adjustments for projects */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .project-image {
        width: 70px;
        height: 70px;
    }
    
    .project-modal-image {
        max-width: 300px;
        aspect-ratio: 3/2;
    }
    
    .project-modal-body {
        padding: 1.5rem;
    }
    
    .project-modal-header,
    .project-modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .project-info {
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-item {
        transition: none;
    }
    .project-item:hover {
        transform: none;
    }
    .project-img {
        transition: none;
    }
    .project-item:hover .project-img {
        transform: none;
    }
}

/* Certificates Section */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
    padding: 0.5rem;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* Certificate optimizations */
.certificate-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #2a2a2a;
    box-shadow: none;
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    contain: layout style paint;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-item.scrolling {
    transition: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

html.scrolling .certificate-item {
    transition: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

@media (not(hover: none)) {
    @supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
        .certificate-item:not(.scrolling) {
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            background: rgba(50, 50, 50, 0.95);
        }
    }
}

@supports not (backdrop-filter: blur(10px)) {
    .certificate-item {
        background: rgba(50, 50, 50, 0.95);
    }
}


.certificate-item:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: none;
    background: rgb(60, 60, 60);
}

@media (prefers-reduced-motion: reduce) {
    .certificate-item {
        transition: none;
    }
    .certificate-item:hover {
        transform: none;
    }
}

.certificate-info {
    text-align: left;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.certificate-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.certificate-info .issuer {
    color: white;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.certificate-info .date {
    color: white;
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.certificate-item .btn {
    margin-top: auto;
    background: linear-gradient(135deg, #ffffff 0%, #dddddd 100%);
    color: rgb(0, 0, 0);
    border: none;
    padding: 0.7rem 1.25rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.certificate-item .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.social-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    width: 60px;
}

.social-links a i {
    width: 60px;
    height: 60px;
    background-color: var(--dark-button);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-links a:hover {
    transform: translateY(-5px);
}

.social-links a:hover i {
    background-color: var(--dark-button-hover);
}

.social-links a p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--secondary-color);
    text-align: center;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .certificates-grid .certificate-item {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* Copyright Section */
.footer {
    padding-top: 0.25rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 0.5px;
}

/* Responsive with fallbacks */
@supports (display: grid) {
    .certificates-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.25rem;
        margin-top: 3rem;
        padding: 0.5rem;
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
}

@supports not (display: grid) {
    .certificates-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
        margin-top: 3rem;
        padding: 0.5rem;
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .certificate-item {
        flex: 0 0 calc(25% - 1.5rem);
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 1400px) {
    .certificates-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .rounded-section {
        padding: 2rem;
    }
    
    .certificates-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .navbar-collapse {
        padding: 1rem;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .nav-link {
        margin: 0.3rem 0;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .nav-link {
        padding: 0.6rem 1rem !important;
        font-size: 1rem;
    }
    
    .rounded-section {
        padding: 1.5rem;
    }
    
    .profile-container {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 576px) {
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0.25rem;
    }
    
    .certificate-item {
        margin: 0;
        padding: 0.75rem;
    }

    .certificate-info h4 {
        font-size: 0.85rem;
    }

    .certificate-info .issuer {
        font-size: 0.75rem;
    }

    .certificate-info .date {
        font-size: 0.7rem;
    }
    
    .profile-container {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 360px) {
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    
    .certificate-item {
        max-width: 300px;
        margin: 0 auto;
    }
}


/* Certificate Card Animations - Simplified */
.certificate-item.fade-in {
    opacity: 0 !important; /* Add !important */
    transform: translateY(20px) !important; /* Add !important */
    transition: opacity 0.6s ease, transform 0.6s ease !important; /* Add !important */
}

.certificate-item.fade-in.visible {
    opacity: 1 !important; /* Add !important */
    transform: translateY(0) !important; /* Add !important */
}

/* Medium screen specific navigation fix (1189px-992px) */
@media (max-width: 1200px) and (min-width: 992px) {
    /* Navigation button styles */
    .nav-link {
        height: 36px !important;
        min-width: 78px !important;
        padding: 0.6rem 0.8rem !important;
        font-size: 0.95rem !important;
        margin: 0 0.2rem !important;
        border: 1px solid transparent !important;
        border-radius: 20px !important;
    }
    
    .nav-link:hover {
        background: linear-gradient(135deg, rgba(42, 42, 42, 0.08) 0%, rgba(42, 42, 42, 0.04) 100%) !important;
        border: 1px solid rgba(42, 42, 42, 0.12) !important;
        box-shadow: 0 4px 12px rgba(42, 42, 42, 0.1) !important;
        transform: translateY(-3px) !important;
    }
    
    /* Navigation container */
    .navbar-nav {
        display: flex !important;
        align-items: center !important;
        gap: 0.8rem !important; /* Optimized gap for medium screens */
    }
    
    /* Reset any background or container styles */
    .navbar-collapse {
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
}

/* Remove focus shadow/outline from navbar toggle button */
.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler-icon:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure no shadow or border when active */
.navbar-toggler.active,
.navbar-toggler:hover {
    outline: none !important;
    box-shadow: none !important;
}

/* Premium tablet navigation styles (992px-768px) */
@media (max-width: 992px) and (min-width: 769px) {
    /* Ensure consistent button styling */
    .navbar-collapse .nav-link {
        padding: 0.8rem 1.4rem !important;
        min-width: 160px !important; /* Make buttons wider */
        text-align: center !important;
        justify-content: center !important;
        border-radius: 22px !important;
        border: 1px solid transparent !important;
        margin: 0.3rem 0 !important;
    }
    
    .navbar-collapse .nav-link:hover {
        background: linear-gradient(135deg, rgba(42, 42, 42, 0.08) 0%, rgba(42, 42, 42, 0.04) 100%) !important;
        border: 1px solid rgba(42, 42, 42, 0.12) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(42, 42, 42, 0.1) !important;
    }
    
    /* Center the navbar items */
    .navbar-collapse .navbar-nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
}

/* Fix for exactly 992px width */
@media (width: 992px) {
    /* Reset any mobile styles */
    body .navbar .navbar-collapse .nav-link {
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Override Bootstrap's navbar-expand-lg behavior */
    body .navbar .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
        opacity: 1 !important;
        width: auto !important;
        margin-left: auto !important;
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        transform: none !important;
    }
    
    /* Force horizontal layout with right alignment */
    body .navbar .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        margin-left: auto !important;
        margin-right: -0.2rem !important; /* Match desktop margin */
        gap: 1.4rem !important; /* Match updated desktop gap */
        align-items: center !important;
    }
    
    /* Hide toggle button */
    body .navbar .navbar-toggler {
        display: none !important;
    }
    
    /* Make the nav items match desktop style exactly */
    body .navbar .nav-item {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Make the links match desktop style exactly */
    body .navbar .nav-link {
        height: 38px !important; /* Match updated desktop height */
        box-sizing: border-box !important;
        min-width: 82px !important; /* Match updated desktop width */
        padding: 0.7rem 0.9rem !important; /* Match updated desktop padding */
        font-size: 1rem !important; /* Match updated desktop font size */
        opacity: 1 !important;
        color: var(--dark-button) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; /* Match new transition */
        margin: 0 !important; /* Reset margins */
        border: 1px solid transparent !important;
        border-radius: 22px !important; /* Match updated desktop border-radius */
    }
    
    /* Make sure collapse is visible */
    .collapse:not(.show) {
        display: flex !important;
    }
    
    /* Match desktop hover effects exactly */
    body .navbar .nav-link:hover {
        background: linear-gradient(135deg, rgba(42, 42, 42, 0.08) 0%, rgba(42, 42, 42, 0.04) 100%) !important;
        border: 1px solid rgba(42, 42, 42, 0.12) !important;
        box-shadow: 0 4px 12px rgba(42, 42, 42, 0.1) !important;
        transform: translateY(-3px) !important; /* Match desktop hover lift */
    }
}

/* Social link sizes and gap reduced for smaller screens */
@media (max-width: 480px) {
    .social-links {
        gap: 2.5rem !important; /* Further reduced gap */
    }
    
    .social-links a {
        width: 55px !important; /* Further reduced */
    }
    
    .social-links a i {
        width: 55px !important; /* Further reduced */
        height: 55px !important; /* Further reduced */
        font-size: 1.6rem !important; /* Further reduced */
    }
}