:root {
    --background-dark: #121212;
    --text-color: #ffffff;
    --nav-height: 60px;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color-primary: #cb8b00;
    --accent-color-secondary: #dbae4d;
    --accent-gradient: linear-gradient(90deg, var(--accent-color-primary), var(--accent-color-secondary));
    --card-bg-gradient: linear-gradient(145deg, #1a1a1a, #232323);
    --card-border: #cb8400;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-color);
    min-height: 100vh;
}

.nav-container {
    width: 100%;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: all 0.2s ease;
    padding: 0.5rem 0;
}

.nav-links a:hover {
    opacity: 1;
}

.nav-links a.active {
    opacity: 1;
    font-weight: 500;
    color: var(--accent-color-primary);
}

.nav-links a.active svg {
    color: var(--accent-color-primary);
}

.icon {
    width: 20px;
    height: 20px;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
    display: flex;
    gap: 8rem; /* Increased gap */
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.profile-container {
    flex: 0 0 300px;
}

.about-container {
    width: 50%;
    flex: 1;
}

.profile-box, .about-box {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2rem;
    background-color: rgba(20, 20, 20, 0.4);
}

.profile-box {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 179, 0, 0.14);
}

.about-box {
    background: var(--card-bg-gradient);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-left: 4px solid var(--card-border);
    border-top: transparent;
    border-right: transparent;
    border-bottom: transparent;
    color: #f5f5f5;
    max-width: 800px;
    margin: 0 auto;
}

.about-box h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.about-box p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    opacity: 0.85;
}

.about-box p:last-child {
    margin-bottom: 0;
}

.placeholder-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

.about {
    width: 100%;
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.profile-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.profile-image:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Optional hover effect for card-like feel */
.profile-container:hover .profile-image {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateSize(-2px);
}

/* Contact box styling */
.contact-box {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: var(--card-bg-gradient);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-left: 4px solid var(--card-border);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0;
    color: var(--text-color);
}

.contact-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
}

.contact-item svg {
    color: var(--accent-color-primary);
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.85rem;
    word-break: break-all;
}

.contact-item a:hover {
    color: var(--accent-color-primary);
}

.contact-item span {
    font-size: 0.85rem;
}

/* Section styling */
.about-section {
    width: 100%;
    margin-bottom: 6rem; /* Add space between about and projects sections */
}

.projects-section {
    width: 100%;
    margin-top: 2rem;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header {
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    font-weight: 700;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* Projects Section */
.projects {
    width: 100%;
    margin-top: 6rem;
    padding: 2rem 0;
}

.projects-header {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    max-width: 800px; /* Slightly smaller max-width for better card display */
    overflow: visible; /* Changed from hidden to visible to allow buttons to be outside */
}

.carousel-track-container {
    width: 100%;
    overflow: hidden;
    border-radius: 12px; /* Optional: rounded corners for the container */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.project-card {
    flex: 0 0 100%;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--card-bg-gradient);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-left: 4px solid var(--card-border);
    color: #f5f5f5;
    margin: 0; /* Removed horizontal margins */
    display: flex;
    flex-direction: column;
}

.project-img-container {
    width: 100%;
    height: 250px; /* Increased height from 220px to 250px */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 15, 15, 0.5);
}

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

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

.project-info {
    padding: 0.5rem;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: white;
}

.project-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.tech-tag {
    background: rgba(203, 98, 0, 0.2);
    color: var(--accent-color-primary);
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.project-link:hover {
    color: var(--accent-color-secondary);
}

.carousel-btn {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    position: absolute; /* Position absolutely to place them properly */
}

.prev-btn {
    left: -60px; /* Position outside the carousel */
}

.next-btn {
    right: -60px; /* Position outside the carousel */
}

.carousel-btn:hover {
    background: rgba(203, 81, 0, 0.5);
    transform: scale(1.05);
}

.carousel-nav {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.8rem;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.carousel-indicator.current {
    background: var(--accent-color-primary);
    transform: scale(1.2);
}

.project-3d-container {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: grab;
}

.project-3d-container:active {
    cursor: grabbing;
}

.project-3d-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Skills Section */
.skills-section {
    width: 100%;
    margin-top: 4rem;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin-top: 2rem;
}

.skill-category-card {
    background: #1E1E1E;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--accent-color-primary);
    transition: all 0.3s ease;
}

.skill-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.skill-card-header {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    position: relative;
    border-bottom: 1px solid #2A2A2A;
    background-color: #1A1A1A;
}

.skill-card-header h3 {
    margin-left: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    flex: 1;
}

.skill-card-content {
    padding: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-tag {
    background: #4b2a0f;
    color: var(--accent-color-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.skill-tag:hover {
    background: #3e230d;
    transform: translateY(-2px);
}

/* GitHub Stats Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Darker background as requested */
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    z-index: 1101;
    background: transparent;
    border: none;
    padding: 20px;
    box-shadow: none;
    max-width: 95%;
    width: auto;
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    opacity: 1;
    transform: scale(1);
}

.modal:not(.active) .modal-content {
    transform: scale(0.8);
}

.github-stats-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Reduced gap between stats */
}

.github-stats {
    width: 495px; /* Fixed width for all stat cards */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

/* Make the compact languages card the same width as others */
.github-stats:last-child {
    width: 495px;
}

/* Responsive styling for smaller screens */
@media (max-width: 550px) {
    .github-stats {
        width: 100%;
        max-width: 495px;
    }
}

/* Contact Section */
.contact-section {
    width: 100%;
    margin-top: 4rem;
    padding: 2rem 0 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-container {
    width: 100%;
    max-width: 800px;
    margin-top: 2rem;
    background: var(--card-bg-gradient);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--card-border);
    overflow: hidden;
}

.contact-intro {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.contact-icon {
    color: var(--accent-color-primary);
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
}

.contact-intro p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.contact-form {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group:nth-child(3), .form-group:nth-child(4) {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.form-group input, .form-group textarea {
    background-color: rgba(15, 15, 15, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color-primary);
    box-shadow: 0 0 0 2px rgba(0, 194, 203, 0.2);
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.submit-btn {
    grid-column: 1 / -1;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(203, 143, 0, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Responsive styles for contact form */
@media (max-width: 768px) {
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .contact-intro {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .about-section {
        margin-bottom: 4rem; /* Smaller spacing on mobile */
    }
    
    .project-card {
        flex-direction: column;
    }
    
    .carousel-track-container {
        width: 90%;
    }
    
    .project-img-container {
        height: 180px;
    }
}

@media (max-width: 900px) {
    .carousel-container {
        max-width: 90%;
        overflow: hidden; /* Hide overflow on smaller screens */
        padding: 0 1rem; /* Add padding to give space for buttons */
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .prev-btn {
        left: 0;
    }
    
    .next-btn {
        right: 0;
    }
}
