*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --text-color: #e5e7eb;
    --light-text: #9ca3af;
    --background: #111827;
    --dark-background: #0f172a;
    --card-background: #1f2937;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    background-color: var(--dark-background);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: var(--transition);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
}

.navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-collapse {
    display: flex;
    justify-content: center;
    width: 100%;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.nav-item {
    display: flex;
    align-items: center;
}

.nav-item a {
    color: #acbfdc !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
    font-size: 1rem;
    white-space: nowrap;
}

.nav-item a:hover {
    color: white !important;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

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

/* Hero Section */
.cover {
    background: linear-gradient(135deg, var(--dark-background) 0%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

.cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.5;
    pointer-events: none;
}

.title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.secondTitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #94a3b8;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

/* Project Cards */
.project-card {
    background: var(--card-background);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    margin: 2rem 0;
    border: none;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.project-card-body {
    padding: 1.5rem;
}

.project-content {
    padding: 1.5rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Technology Badges */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 9999px;
    transition: var(--transition);
    margin: 0.25rem;
    font-size: 0.875rem;
    display: inline-block;
    color: white;
}

/* Time badge specific styles */
.time-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    margin: 0;
}

.badge-primary {
    background-color: var(--primary-color);
}

.badge-secondary {
    background-color: #4b5563;
}

.badge-success {
    background-color: #059669;
}

.badge-danger {
    background-color: #dc2626;
}

.badge-warning {
    background-color: #d97706;
}

.badge-info {
    background-color: #0891b2;
}

.badge-light {
    background-color: #6b7280;
    color: white;
}

.badge-dark {
    background-color: #1f2937;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-stack .badge {
    margin: 0;
}

.badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* About Section */
#aboutCard {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    border: none;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    transition: var(--transition);
    object-fit: cover;
}

.avatar:hover {
    transform: scale(1.05);
}

/* Contact Section */
#contact {
    background-color: var(--card-background);
    padding: 4rem 0;
    margin-top: 2rem;
}

#contact h2 {
    color: var(--text-color);
}

#contact p {
    color: var(--light-text);
}

.social-links .btn {
    padding: 0.75rem 1.5rem;
    margin: 0.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
    background-color: var(--dark-background);
    border-color: var(--primary-color);
    color: var(--text-color);
}

.social-links .btn:hover {
    transform: translateY(-2px);
    background-color: var(--primary-color);
    color: white;
}

/* Footer */
.footer-bottom {
    background: var(--dark-background);
    padding: 2rem 0;
    color: var(--light-text);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
    }

    .navbar-nav {
        gap: 0.5rem;
        justify-content: space-around;
    }

    .nav-item a {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .project-card {
        margin: 1rem 0;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .cover {
        padding: 4rem 0;
    }

    .project-card-body {
        padding: 1rem;
    }

    .project-content {
        padding: 1rem !important;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

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

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

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

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

/* Bootstrap Overrides */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-outline-light {
    color: var(--text-color);
    border-color: var(--text-color);
}

.btn-outline-light:hover {
    background-color: var(--text-color);
    color: var(--dark-background);
}

.text-gradient {
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Project Images */
.project-image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio (9/16 = 0.5625) */
    overflow: hidden;
    border-radius: 1rem;
}

.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-image:hover {
    transform: scale(1.05);
}

.project-card .img-square-wrapper {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Add background color to portfolio section */
#portfolio {
    background-color: var(--background);
    padding-top: 6rem;
}

/* Text Colors */
.text-muted {
    color: var(--light-text) !important;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 6rem;
    position: relative;
    color: var(--text-color);
    background: linear-gradient(to right, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}