:root {
    --primary-color: #3273dc;
    --accent-color: #00d1b2;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --card-bg: rgba(20, 20, 20, 0.8);
    --text-light: #f5f5f5;
    --text-muted: #b5b5b5;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #00d1b2 0%, #3273dc 100%);
    --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(50, 115, 220, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.navbar {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* fix mobile navigation background */
.navbar-menu {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(10px);
}

/* force dark background for all navbar elements */
.navbar,
.navbar-brand,
.navbar-menu,
.navbar-start,
.navbar-end {
    background: rgba(10, 10, 10, 0.95) !important;
}

.navbar-item {
    color: var(--text-light) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent !important;
}

.navbar-item:hover,
.navbar-item:focus,
.navbar-item.is-active {
    color: var(--primary-color) !important;
    background: transparent !important;
}

/* ensure mobile menu items stay dark - universal approach */
@media screen and (max-width: 1023px) {
    .navbar-menu {
        background: rgba(10, 10, 10, 0.98) !important;
        backdrop-filter: blur(15px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }
    
    .navbar-item {
        color: var(--text-light) !important;
        background: transparent !important;
    }
    
    .navbar-item:hover,
    .navbar-item:focus,
    .navbar-item.is-active {
        color: var(--primary-color) !important;
        background: rgba(50, 115, 220, 0.1) !important;
    }
}

/* webkit specific fixes for Chrome and Safari */
@media screen and (max-width: 1024px) {
    .navbar.is-dark,
    .navbar.is-dark .navbar-menu,
    .navbar.is-dark .navbar-brand,
    .navbar.is-dark .navbar-start,
    .navbar.is-dark .navbar-end {
        background: rgba(10, 10, 10, 0.98) !important;
    }
    
    .navbar.is-dark .navbar-item {
        color: var(--text-light) !important;
        background: transparent !important;
    }
    
    .navbar.is-dark .navbar-item:hover,
    .navbar.is-dark .navbar-item:focus {
        color: var(--primary-color) !important;
        background: rgba(50, 115, 220, 0.1) !important;
    }
}

/* mobile-first approach - force dark on small screens */
@media (max-width: 768px) {
    .navbar,
    .navbar-menu,
    .navbar-brand,
    .navbar-start,
    .navbar-end,
    .navbar-item {
        background: rgba(10, 10, 10, 0.98) !important;
    }
    
    .navbar-item {
        color: var(--text-light) !important;
    }
    
    .navbar-item:hover,
    .navbar-item:focus {
        color: var(--primary-color) !important;
        background: rgba(50, 115, 220, 0.1) !important;
    }
}

.hero.is-large .hero-body {
    padding-top: 8.5rem;
    padding-bottom: 6rem;
}

.hero-gradient {
    background: linear-gradient(135deg, 
        rgba(10, 10, 10, 0.9) 0%, 
        rgba(20, 20, 30, 0.9) 50%, 
        rgba(30, 30, 50, 0.9) 100%);
    position: relative;
    overflow: hidden;
}

/* subtle grid pattern overlay for texture */
.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero .title {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
}

.hero .subtitle {
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.7;
}

.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
    position: relative;
}

.tech-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* shimmer effect on tech icons */
.tech-icon-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.tech-icon-wrapper:hover::before {
    left: 100%;
}

.tech-icon-wrapper:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

.tech-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0.9);
    transition: all 0.3s ease;
}

.tech-icon-wrapper:hover .tech-icon {
    filter: brightness(1.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    display: inline-block;
    color: var(--text-light);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    transition: color 0.3s ease;
}

.scroll-arrow:hover {
    color: var(--primary-color);
}

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

.section {
    background: var(--dark-bg);
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-dark);
    border-color: var(--accent-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.skills-section {
    padding: 1rem;
}

.content strong {
    color: var(--text-light) !important;
    font-weight: 600;
}

.skill-category {
    margin-bottom: 2rem;
}

.skill-category .tags {
    gap: 0.5rem;
}

.tag.is-dark {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.tag.is-dark:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.project-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-dark);
    border-color: var(--primary-color);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: var(--gradient-primary);
    color: white;
}

.project-tech-icon {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1);
    transition: all 0.3s ease;
}

.project-card:hover .project-tech-icon {
    transform: scale(1.1);
    filter: brightness(1.4) contrast(1.2);
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-highlights ul {
    list-style: none;
    padding: 0;
}

.project-highlights li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

/* custom bullet point styling for project highlights */
.project-highlights li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 0.8rem;
}

.project-links {
    margin-top: auto;
}

.contact-content .title {
    margin-bottom: 2rem !important;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
}

.contact-item .icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: 8px;
}

.social-links .title {
    margin-top: 4.5rem;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* slide-in background effect for social buttons */
.social-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    transition: left 0.3s ease;
    z-index: -1;
}

.social-button:hover::before {
    left: 0;
}

.social-button:hover {
    transform: translateX(10px);
    color: white;
    box-shadow: var(--shadow-glow);
}

.social-button.github:hover {
    border-color: #333;
}

.social-button.linkedin:hover {
    border-color: #0077b5;
}

.social-button.email:hover {
    border-color: var(--accent-color);
}

.button.is-primary {
    background: var(--gradient-primary);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.button.is-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.button.is-light.is-outlined {
    border-color: var(--text-light);
    color: var(--text-light);
    background: transparent;
}

.button.is-light.is-outlined:hover {
    background: var(--text-light);
    color: var(--dark-bg);
    transform: translateY(-2px);
}

.footer {
    background: var(--darker-bg) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
}

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

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

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

@media (max-width: 768px) {
    .hero .title {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

    .tech-stack-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }

    .tech-icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .tech-icon {
        width: 30px;
        height: 30px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .social-buttons {
        gap: 0.5rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tech-stack-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .tech-icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .tech-icon {
        width: 25px;
        height: 25px;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

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

::selection {
    background: var(--primary-color);
    color: white;
}

[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-hover:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.navbar-item:focus,
.button:focus,
.social-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* staggered animation timing for tech icon grid */
.tech-icon-wrapper {
    animation: fadeInUp 0.6s ease forwards;
}

.tech-icon-wrapper:nth-child(1) { animation-delay: 0.1s; }
.tech-icon-wrapper:nth-child(2) { animation-delay: 0.2s; }
.tech-icon-wrapper:nth-child(3) { animation-delay: 0.3s; }
.tech-icon-wrapper:nth-child(4) { animation-delay: 0.4s; }
.tech-icon-wrapper:nth-child(5) { animation-delay: 0.5s; }
.tech-icon-wrapper:nth-child(6) { animation-delay: 0.6s; }
.tech-icon-wrapper:nth-child(7) { animation-delay: 0.7s; }
.tech-icon-wrapper:nth-child(8) { animation-delay: 0.8s; }
.tech-icon-wrapper:nth-child(9) { animation-delay: 0.9s; }
