/* Universal Reset and Global Styles */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
}

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

.no-break {
    white-space: nowrap;
}

::selection {
    background-color: rgba(255, 255, 255, 0.2); 
    color: #ffffff;
}

/* CSS Variables */
:root {
    --max-width: 910px;
    --bg-color: #1e1f21;
    --text-color: #bcbcbc;
    --accent-color: #ffffff;
    --link-color: #ffffff;
    --pill-bg: rgba(255, 255, 255, 0.057);
    --pill-border: rgba(255, 255, 255, 0.3);
    --section-gap: 4.5rem;
}

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

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

::-webkit-scrollbar-thumb {
    background-color: #333537;
    border-radius: 0px;
    border: 3px solid var(--bg-color); 
}

::-webkit-scrollbar-thumb:hover {
    background-color: #444648;
}

/* Firefox Scrollbar Styles */
@supports not selector(::-webkit-scrollbar) {
    html {
        scrollbar-width: thin;
        scrollbar-color: #333537 var(--bg-color);
    }
}

/* Navigation Bar */
.top-nav {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    z-index: 1000;
    padding-top: 10px; 
}

.nav-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pill-border);
    
}

.top-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease-in-out;
    opacity: 0.6;
}

.top-nav a:hover {
    color: var(--accent-color);
    opacity: 1;
    transform: translateY(-2px);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

/* Tablets configuration for Navigation Bar*/
@media (max-width: 1024px) {
    .nav-container {
        gap: 35px;
    }
}

/* Mobile configuration for Navigation Bar */
@media (max-width: 480px) {
    .nav-container {
        gap: 25px;
    }
    .top-nav a {
        font-size: 1.1rem;
    }
}

/* Styles Body and Container */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: "Consolas", "Monaco", "Lucida Console", monospace;
    line-height: 1.5;
    font-size: 0.92rem;
    padding: 0px 20px 0px 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.01rem;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

/* Layout Header */
.profile-layout {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 50px;
    margin-top: 3rem;
}

/* Profile Image */
.profile-image {
    margin-top: 50px;
}

.profile-image img {
    width: 155px;
    height: 155px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #333;
}

/* 1. Intro */
.intro {
    flex: 1;
}

/* 2. Contact and Social Icons */
.contact-section {
    margin-top: 0.8rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-section span { opacity: 0.7; }

.social-links {
    display: flex;
    gap: 18px;
}

.social-links a {
    color: var(--link-color);
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease-in-out;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.intro p i, .interests-list li i {
    display: inline;
    white-space: nowrap;
}

/* Typography */
h1 { 
    font-size: 1.8rem; 
    font-weight: 700; 
    margin-bottom: 1.2rem; 
    color: var(--accent-color);
}

h2 {
    font-size: 1.2rem; 
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.4rem;
}

.intro p {
    line-height: 1.85; 
    margin-bottom: 1rem;
    text-align: justify;
}

/* Justify text in sections and lists */
.extra-section p, .interests-list li, .projects-list li, .recommendations-list li, .hackathon-list li, .certifications-list li { 
    text-align: justify;
}

strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* 3. Sections and Lists */
.extra-section {
    margin-top: var(--section-gap);
    width: 100%; 
    display: block;
    overflow: visible;
    scroll-margin-top: 70px;
}

.section-intro {
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}

/* Affects the entire list */
.interests-list, .projects-list, .recommendations-list, .hackathon-list, .certifications-list {
    list-style: none;
    padding-left: 2.5rem;
}

/* Affects each list item */
.interests-list li, .projects-list li, .recommendations-list li, .hackathon-list li, .certifications-list li {
    margin-bottom: 0.2rem; /* Space between list items */
    position: relative;
    z-index: 1;
    transition: z-index 0s; 
}

/* Solution to overlap issue in certifications list badges */
.certifications-list li:hover {
    z-index: 100;
}

/* Affects each list item */
.projects-list li, .recommendations-list li, .hackathon-list li, .certifications-list li {
    margin-bottom: 0.4rem;
}

/* The last element has no margin to avoid false gap between sections */
.interests-list li:last-child, 
.projects-list li:last-child, 
.recommendations-list li:last-child,
.hackathon-list li:last-child,
.certifications-list li:last-child {
    margin-bottom: 0 !important;
}

/* The ">" logo for all lists */
.interests-list li::before, 
.projects-list li::before, 
.recommendations-list li::before,
.hackathon-list li::before,
.certifications-list li::before {
    content: "\f105"; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: -1.2rem; 
    color: var(--accent-color);
    font-size: 0.85rem;
}

/* Hover effects for links */
.project-link, .recommendation-link, .hackathon-link {
    color: var(--accent-color);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease-in-out;
}

.project-link:hover, .recommendation-link:hover, .hackathon-link:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

/* 4. Technologies Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 1.1rem;
    padding-bottom: 0.7rem;
}

.tech-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    background-color: var(--pill-bg);
    border: 1px solid var(--pill-border);
    border-radius: 50px;
    color: var(--accent-color);
    padding: 7px 5px;
    width: 100%;
    max-width: 160px;
    margin: 0 auto;
    font-size: 0.85rem;
}

.tech-item img {
    width: 22px;
    height: 22px;
}

/* 5. Certifications */
.cert-inline-badge {
    width: 30px;
    height: 30px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    margin: -4px 0px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease-in-out;
    cursor: pointer;
    position: relative;
    z-index: 2; 
}

/* Pop-out effect */
.cert-inline-badge:hover {
    transform: scale(7); 
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    z-index: 101;
}

/* 6. Footer */
.site-footer {
    margin-top: var(--section-gap);
    border-top: 1px solid var(--pill-border);
    padding: 0.7rem 0 0.7rem 0;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.6;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.footer-content i {
    color: #e25555; /* Red color for the heart icon */
}

/* 7. Configuration for smaller screens */
@media (max-width: 1024px) {
    body {
        padding: 0px 20px 0px 20px;
    }
    .profile-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    .profile-image {
        margin-top: 0;
    }
    .intro p, .extra-section p, .interests-list li, .projects-list li, .recommendations-list li, .hackathon-list li, .certifications-list li {
        text-align: left;
    }
    .tech-grid {
        grid-template-columns: repeat(auto-fit, 145px);
        justify-content: center;
    }
}

/* Footer configuration for mobile devices */
@media (max-width: 767px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1px;
        font-size: 0.70rem;
    }
}