@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css');

html {
    scroll-behavior: smooth;
}

section::before {
    content: "";
    display: block;
    height: 60px; /* Adjust this value based on your header's height */
    margin-top: -60px; /* Negative margin of the same value */
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Header and Navigation */
header {
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s, color 0.3s;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    overflow: hidden;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    list-style-type: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    margin-right: 20px;
}

.nav-links li {
    flex-shrink: 0;
}

.nav-links li a {
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.nav-links li a:hover,
.nav-links li a:focus {
    color: #ffd700;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 60px; /* Adjust based on header height */
        left: 0;
        width: 100%;
        background-color: rgb(0, 115, 206);
        flex-direction: column;
        align-items: center;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .nav-links li a {
        color: white;
        font-size: 1.2rem;
    }

    /* Adjust header padding if necessary */
    header {
        padding: 0.5rem 1rem;
    }

    /* Social Sidebar Adjustment */
    .social-sidebar {
        flex-direction: row;
        left: 50%;
        top: auto;
        bottom: 20px;
        transform: translateX(-50%);
        border: none;
        background-color: rgba(0, 0, 0, 0.5);
        padding: 5px 10px;
    }

    .social-sidebar a {
        color: white;
        font-size: 20px;
    }
}

/* General Section Styles */
section {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    background-size: cover;
    background-position: center;
}

/* Color Schemes */
.scheme-1 {
    /* background-image: url('blue_bg.jpg'); Ensure the path and filename are correct */
    background-color: rgb(0, 115, 206); /* Fallback color matching your intended scheme */
    color: white;
    background-size: cover;
    background-repeat: no-repeat;
}

.scheme-1 header {
    background-color: white;
    color: rgb(0, 115, 206);
}

.scheme-1 nav ul li a {
    color: rgb(0, 115, 206);
}

.scheme-2 {
    background-color: rgb(255, 255, 255);
    color: rgb(0, 115, 206);
    background-size: cover;
    background-repeat: no-repeat;
}

.scheme-2 header {
    background-color: rgb(0, 115, 206);
    color: white;
}

.scheme-2 nav ul li a {
    color: white;
}

/* Social Sidebar */
.social-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 999;
    background-color: transparent;
    border: 2px solid black;
    border-radius: 10px;
    padding: 10px;
}

.social-sidebar a {
    color: #333;
    font-size: 32px;
    transition: all 0.3s ease;
}

.social-sidebar a:hover {
    color: #ffd700;
    transform: scale(1.2);
}

.social-sidebar .cv-icon {
    width: 32px;
    height: 32px;
    transition: all 0.3s ease;
}

.social-sidebar a:hover .cv-icon {
    transform: scale(1.2);
}

/* Home Section */
#home {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1rem;
    line-height: 1.6;
}

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

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.photo-container {
    grid-column: 1;
    grid-row: 1;
}

.profile-photo {
    width: 100%; /* Adjust this value as needed */
    max-width: 400px; /* Increase max-width to make the image larger */
    height: auto; /* Maintain aspect ratio */
    border-radius: 50%;
    /* Optional: Add a transition for smooth resizing */
    transition: width 0.3s ease;
}

.about-text {
    grid-column: 2;
    grid-row: 1;
}

.about-text h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Skills Section */
.skills-section {
    grid-column: span 1;
    grid-row: 2;
}

.skills-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.badge {
    background-color: #e0e0e0;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.badge:hover {
    background-color: #ffd700;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
    }

    .photo-container,
    .about-text,
    .skills-section {
        grid-column: 1;
    }

    .skills-section {
        grid-row: 3;
    }
}

@media (max-width: 1024px) {
    .projects-container {
        grid-template-columns: repeat(1, 1fr); /* Single column on medium screens */
    }
}

/* Projects Section */
.projects-title {
    font-size: 2.25rem;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: bold;
}

.projects-note {
    font-size: 0.9em;
    color: #ffffff; /* Light grey */
    margin-top: -30px; /* Adjust this based on your layout */
    margin-bottom: 20px;
    text-align: center; /* Center it under the heading */
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Fit project cards */
    gap: 2rem;
    justify-items: center;
    padding: 2rem;
    width: 90%;
    margin: auto;
}

.project-card {
    perspective: 1000px;
    width: 100%;
    max-width: 300px;
    height: 300px; /* Set a fixed height */
    position: relative;
    overflow: visible; /* Change from hidden to visible */
    cursor: pointer;
}

.project-front,
.project-back {
    width: 100%;
    height: 100%; /* Ensure full height */
    position: absolute; /* Change from relative to absolute */
    backface-visibility: hidden;
    transition: transform 0.6s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.project-front img {
    width: 100%;
    height: 80%; /* Adjust as needed */
    object-fit: cover;
}

.project-summary {
    font-size: 0.95em;
    color: #ffffff; /* White for contrast */
    margin-top: 10px;
    text-align: center; /* This should already be center, but let's ensure it */
    padding: 0.5rem;
    width: 100%; /* Ensure it takes full width of its container */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-back {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transform: rotateY(180deg);
    padding: 1rem;
    text-align: center;
    border: 2px solid rgb(255, 255, 255);
    border-radius: 15px;
    box-sizing: border-box;
    overflow: hidden; /* Hide overflow */
}

.project-back-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
    /* Styling for webkit-based browsers */
    &::-webkit-scrollbar {
        width: 8px;
    }
    &::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }
    &::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.5);
        border-radius: 4px;
    }
    /* Styling for Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.5) rgba(255, 255, 255, 0.1);
}

.project-card:hover .project-front {
    transform: rotateY(-180deg);
}

.project-card:hover .project-back {
    transform: rotateY(0);
}

@media (hover: none) and (pointer: coarse) {
    .project-card:hover .project-front,
    .project-card:hover .project-back {
        transform: none;
    }

    .project-card.active .project-front {
        transform: rotateY(180deg);
    }

    .project-card.active .project-back {
        transform: rotateY(360deg);
    }
}

/* Footer */
footer {
    padding: 2rem;
    background-color: rgb(0, 115, 206);
    color: white;
    text-align: center;
}

@media (max-width: 768px) {
    footer {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* Contact Section Styles */
#contact {
    padding: 50px 0;
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

#contact h2 {
    text-align: center;
    margin-bottom: 20px;
}

#contact p {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-group textarea {
    height: 150px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #555;
}