body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    margin: 0;
    padding: 0;
    background-color: #0d1117;
    /* Removes default browser margin to make the nav bar flush with the top */
}

.nav-bar {

    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 2rem;
    max-height: 1.5rem;

    background-color: rgba(13, 17, 23, 0.95);
    /* Gives the bar a solid white background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Adds a subtle shadow for a "lifted" effect */
}

.nav-bar h1 {
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 1rem;

}

.nav-bar h1 a {

    text-decoration: none;
    color: #00b4d8;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.nav-bar h1 a i {
    font-size: 1.5rem;
}

.nav-bar h1 img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-bar h1 a:hover {
    color: #00b4d8;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Style the links directly */
.nav-links a {
    text-decoration: none;
    list-style: none;
    color: #e6edf3;
    font-size: 1.1rem;
    font-weight: bold;
}

.nav-links a:hover {
    color: #00b4d8;
}

header {
    background: linear-gradient(180deg, #0d1117 0%, #161B22 100%);
    text-align: center;
}


.hero {
    /* --- Background Image Styles --- */
    background-image: url('images/bg1.jpg');
    height: 90vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero img {
    object-fit: cover;
    object-position: auto;
    border-radius: 50%;
    width: 250px;
    height: 250px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.hero h1 {
    padding-left: 0;
    color: #00b4d8;
    font-size: 3rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    margin: 0.5rem 0;
}

.hero p {
    padding-left: 0;
    color: #d8dee6;
    font-size: 0.9rem;
    margin: 0.2rem 0;
}

/* Floating Code Animation */
.floating-code {
    position: absolute;
    color: red;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    white-space: nowrap;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-20vh) rotate(20deg);
        opacity: 0;
    }
}

.floating-code {
    position: absolute;
    color: rgb(233, 189, 207); /* Reduced opacity for subtler effect */
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    white-space: nowrap;
    animation-name: floatUp;
    animation-timing-function: linear;
}

section#projects {
    background-color: #161B22;
    padding: 60px 20px;
    text-align: center;
}

.projects-section h2 {
    color: #fff;
    font-size: 2rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    margin-bottom: 3rem;
}

.projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.project-card {
    background-color: transparent;
    width: 300px;
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.project-card:hover .card-inner,
.project-card.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-front {
    background-color: #0d1117;
    border: 1px solid #2d333b;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.95);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-card:hover .card-overlay,
.project-card.is-flipped .card-overlay {
    transform: translateY(0);
}

.card-overlay h3 {
    color: #00b4d8;
    margin: 0;
    font-size: 1.2rem;
}

.card-back {
    background: linear-gradient(135deg, #0d1117 0%, #161B22 100%);
    border: 1px solid #00b4d8;
    color: #e6edf3;
    transform: rotateY(180deg);
    padding: 2rem;
    box-sizing: border-box;
}

.card-back h3 {
    color: #00b4d8;
    margin-bottom: 1rem;
}

.card-back p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #8b949e;
}

.click-info {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #00b4d8;
    opacity: 0.8;
    border: 1px solid #00b4d8;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.click-info:hover {
    background: rgba(0, 180, 216, 0.1);
}

section#about {
    padding: 60px 20px;
    background-color: #0d1117;
    text-align: center;

}

.about {
    min-height: 50vh;
    align-content: center;
    align-items: center;
    padding: 2.5rem;

}

.about p {
    padding: 4rem;
    max-width: 600px;
    max-width: 600px;
    margin: auto;
    color: #8b949e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 20px;
    font-weight: 4stify;
    /* Align0 text to both left and righ0 edges */
    ;
    text-align: justify;
    /* Aligns text to both left and right edges */
    line-height: 1.7;
}

.about h2 {
    font-size: 2rem;
    color: #fff;

}

.contact {
    border-top: solid 1px #2d333b;
    background-color: #161B22;
    padding: 60px 20px;
    text-align: center;

}

.contact h2 {

    padding-bottom: 1rem;
    font-size: 2rem;
    color: #fff;
    border-bottom: 1px solid #00b4d8;
    display: inline-block;
}

.con-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    /* Allows items to wrap on smaller screens */
}

.con-links a {
    display: inline-flex;
    /* Aligns icon and text nicely */
    align-items: center;
    gap: 0.5rem;
    /* Space between icon and text */
    color: #e6edf3;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.con-links a:hover {
    color: #00b4d8;
}

.footer {
    background: linear-gradient(135deg, #0a0f14 0%, #161B22 100%);
    border-top: 1px solid #2d333b;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(0, 180, 216, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 180, 216, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    color: #8b949e;
    font-size: 1rem;
    margin: 0 0 20px 0;
    font-weight: 500;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #e6edf3;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-link:hover {
    color: #00b4d8;
    background: rgba(0, 180, 216, 0.1);
    border-color: #00b4d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.2);
}

.footer-link i {
    font-size: 0.9rem;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: auto;
    max-height: auto;
    margin: auto;
}

.modal-content {
    background-color: #0d1117;
    border: 1px solid #2d333b;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {



    position: absolute;
    top: 15px;
    right: 20px;
    color: #e6edf3;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.modal-close:hover {
    color: #00b4d8;
}

.modal-body {
    padding: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.modal-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.modal-left img {
    width: 100%;
    max-width: 350px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.modal-left h3 {
    color: #00b4d8;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-left p {
    color: #e6edf3;
    line-height: 1.6;
    margin-bottom: 0;
}

.modal-right {
    flex: 1;
    text-align: left;
    padding-left: 2rem;
}

#modal-details {
    text-align: left;
    color: #8b949e;
}

#modal-details h3 {
    color: #e6edf3;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

#modal-details ul {
    list-style-type: disc;
    margin-left: 1.5rem;
}

#modal-details li {
    margin-bottom: 0.5rem;
}

.project-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #00b4d8;
    color: #0d1117;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid #00b4d8;
}

.project-link-btn:hover {
    background-color: transparent;
    color: #00b4d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

.project-link-btn i {
    font-size: 0.9rem;
}

/* General tablet and smaller desktop styles */
@media (max-width: 1024px) {
    .nav-bar {
        padding: 1rem 1.5rem;
    }

    .nav-bar h1 a {
        font-size: 1.2rem;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .hero {
        height: 80vh;
        width: auto;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        padding: 1rem;

    }

    .hero img {
        width: 150px;
        height: 150px;
    }

    .hero p {

        font-size: 1rem;

    }

    .hero h1 {
        font-size: 2.5rem;
        /* Slightly reduce hero title size */
    }

    .projects-container {
        padding: 2rem 1rem;
    }

    .modal-content {
        max-width: 700px;
    }

    .modal-left img {
        max-width: 300px;
        height: 200px;
    }

    .modal-left h3 {
        font-size: 1.3rem;
    }

    .modal-right {
        padding-left: 1rem;
    }
}

/* Footer responsive styles */
@media (max-width: 768px) {
    .hero {
        height: 80vh;
        width: auto;
        flex-direction: column;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        padding: 1rem;

    }

    .footer {
        padding: 30px 15px;
    }

    .footer-links {
        gap: 1rem;
    }

    .footer-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Mobile-specific styles */
@media (max-width: 600px) {
    .nav-links a {
        font-size: 0.9rem;

    }

    .nav-links {
        gap: 1rem;
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .nav-bar h1 a {
        font-size: 1rem;
        margin: 0rem;
        padding-left: 0rem;
        padding-right: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
        /* Further reduce hero title on mobile */
    }

    .hero img {
        width: 200px;
        /* Reduce hero image size for mobile */
        height: 200px;
    }

    .about p {
        font-size: 15px;
        font-weight: 200;
        line-height: 1.5;
        padding: 0 1rem;
        /* Add some horizontal padding to the about text */
    }

    .project-card {
        width: 100%;
        max-width: 350px;
    }

    .modal-body {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-left img {
        max-width: 100%;
        height: 200px;
    }

    .modal-left {
        text-align: center;
    }

    .modal-right {
        padding-left: 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-link {
        justify-content: center;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}