/* Global variables */
:root {
    /* --header_bg_color: #f8f9fa; */
    --header_bg_color: #f8f9fa;

    --profile_photo_border_color: #3498db;
    --profile_name_color: #2c3e50;

    --nav_links_color: #2c3e50;
    --nav_links_hover_color: #3498db;

    --banner_text_color: #2c3e50;
    --banner_bg_color: #2c3e50;

    --normal_content_h1_text_color: white;
    --normal_content_h1_bg_color: rgba(52, 152, 219, 1);

    --contact_banner_bg_color: rgba(44, 62, 80, 0.9);
    --contact_banner_hover_color: #3498db;

    --language_button_hover_color: rgba(44, 62, 80, 0.9);

    --scroll_top_bg_color: rgba(52, 152, 219, 0.8);
    --scroll_top_hover_color: rgba(52, 152, 219, 1);
    --scroll_top_arrow_color: white;

    --toc_content_color:white;
    --toc_button_bg_color: rgba(52, 152, 219, 0.8);
    --toc_button_hover_color: rgba(11, 72, 112, 0.95);
    /* --toc_button_hover_color: rgba(52, 152, 219, 0.95); */
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Styles */
.header {
    padding: 2rem;
    display: flex;
    align-items: bottom;
    gap: 2rem;
    background-color: var(--header_bg_color);
    z-index: 1000;

}
.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.profile-photo {
    width: 125px; /* was 150x150px */
    height: 125px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--profile_photo_border_color);
}
.profile-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--profile_name_color);
}

/* Bottom filler */
.bottom-spacer {
    height: 35px;
    width:max-content;
}

/* Navigation Links */
nav{
    align-content: end;
}
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin-left: 2rem;
}
.nav-links a {
    color: var(--nav_links_color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}
.nav-links a:hover {
    background: var(--nav_links_hover_color);
    color: white;
}

/* Content Banners */
.content-container {
    max-width: 1200px;
    margin: 0rem auto;
    padding: 2rem 0rem;
}
.banner {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1.0);
}
.banner:nth-child(even) {
    flex-direction: row-reverse;
}
.banner-image {
    width: 300px;
    /* height: 200px; */
    object-fit: cover;
    border-radius: 10px;
}
.banner-text {
    text-align: left;
    flex: 1;
}
.banner-text h2 {
    margin-bottom: 0.5rem;
    color: var(--banner_text_color);
}
.banner-text h3 {
    margin-bottom: 0.2rem;
    color: var(--banner_text_color);
}
.banner-text h4 {
    color: var(--banner_text_color);
}

/* Banner Hover Effects */
.content-container:hover .banner:not(:hover) {
    opacity: 0.7;
    transform: scale(0.98);
}
.banner:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 768px) {
    .banner-text {
        text-align: left;
    }
    .content-container:hover .banner:not(:hover) {
        transform: scale(1);
    }
    .banner:hover {
        transform: scale(1);
    }
    
}
    
/* Normal content (Home & contact pages)*/
.container {
    max-width: 48rem;
    margin: 0 auto;
}

.title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
    color: #334155;
}

.description {
    font-size: 1.125rem;
    margin-bottom: 3rem;
    padding-left: 1rem;
    padding-right: 1rem;
    color: #475569;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    text-align: center;
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.stats-grid a:not(hover) {
    text-decoration: none;
}
.stats-grid a:hover {
    text-decoration: underline;
    color: var(--contact_banner_hover_color);
}

.stat-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #334155;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.skill-tag {
    background-color: #e2e8f0;
    color: #334155;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.scroll-indicator {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    .subtitle {
        font-size: 1.25rem;
    }
    .description {
        font-size: 1rem;
    }
}

/* error content (Home & contact pages)*/
.error-content {
    width: 100%;
    background-color:white;
    color: var(--banner_text_color);
    text-align: left;
    padding: 1rem;
    z-index: 100;
}
.error-content h1{
    text-align: center;
}
.error-content a {
    color: var(--banner_text_color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.error-content a:hover {
    color: var(--contact_banner_hover_color);
}

/* Bottom Contact Banner */
.contact-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--contact_banner_bg_color);
    color: white;
    text-align: center;
    padding: 1rem;
    z-index: 100;
}
.contact-banner a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.contact-banner a:hover {
    color: var(--contact_banner_hover_color);
}

/* Change of Language Button */
.language-button {
    position: fixed;
    bottom: 4rem;
    right: 1rem;
    background-color: var(--scroll_top_bg_color);
    color: var(--scroll_top_arrow_color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.5rem;
    z-index: 100;
}
.language-button a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.language-button a:hover {
    color: var(--language_button_hover_color);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 8rem;
    right: 1rem;
    background-color: var(--scroll_top_bg_color);
    color: var(--scroll_top_arrow_color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.5rem;
    z-index: 100;
}
.scroll-top.visible {
    opacity: 1;
}
.scroll-top:hover {
    background-color: var(--scroll_top_hover_color);
    transform: translateY(-3px);
}

/* Table of Contents */
.toc-button {
    position: fixed;
    top: 40%; /* Align with bottom of header */
    left: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--toc_button_bg_color);
    border-radius: 10px;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}
.toc-button:hover {
    width:fit-content;
    background-color: var(--toc_button_hover_color);
}
.toc-button:hover .toc-content {
    display: block;
    background-color: var(--toc_button_hover_color);
    border-radius: 0 10px 10px 0;
}
.toc-icon {
    position: absolute;
    left: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.toc-content {
    display: none;
    padding: 0.5rem 1rem;
    color: var(--toc_content_color);
    text-align: left;
    width:fit-content;
    margin-left: -2rem;
}
.toc-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.toc-content a {
    color: var(--toc_content_color);
    text-decoration: none;
    display: block;
    padding: 0.3rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.toc-content a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        margin-left: 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .banner {
        flex-direction: column !important;
        text-align: center;
    }

    .banner-image {
        width: 100%;
        max-width: 300px;
    }
    .toc-button {
        top: calc(400px - 50px); /* Adjusted for mobile header height */
    }
    .toc-button:hover {
        width: 150px;
    }
}


/* Contact stuff */
.contact-grid {
    display: grid;
    margin-top: 20px;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 48rem;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.icon-circle {
    background-color: #0077b5; 
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform 0.2s;
}

.contact-item:hover .icon-circle {
    transform: scale(1.05);
}

.icon-circle svg {
    width: 2rem;
    height: 2rem;
    fill: white;
}

.contact-item h3 {
    font-size: 1.125rem;
    color: #1f2937;
    transition: color 0.2s;
}

.contact-item:hover h3 {
    color: #4b5563;
}
