/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* CSS Variables for GIS Theme */
:root {
    --primary-color: #2C5F7C;
    --secondary-color: #4A8BA6;
    --tertiary-color: #3F6E7A;
    --accent-color: #7CB342;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --card-bg: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* General body styling */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* OpenStreetMap background styling with overlay */
#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
}

#map::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(44, 95, 124, 0.15) 0%,
        rgba(74, 139, 166, 0.1) 50%,
        rgba(124, 179, 66, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Wrapper to manage content and footer */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

/* Container that holds all content */
.container {
    position: relative;
    z-index: 1;
    padding: 0 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern Card/White box styling */
.white-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: calc(100% - 40px);
    margin: 20px auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    border: 1px solid rgba(44, 95, 124, 0.1);
    transition: var(--transition);
}

.white-box:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

h4 {
    font-size: 1.25rem;
    color: var(--text-dark);
}

h5 {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Core Proficiencies styling */
ul.core-proficiencies {
    list-style: none;
    padding: 0;
    text-align: left;
    column-count: 2;
    column-gap: 30px;
    margin: 20px auto;
    max-width: 700px;
}

ul.core-proficiencies li {
    padding: 8px 0 8px 30px;
    position: relative;
    color: var(--text-dark);
    font-size: 0.95rem;
}

ul.core-proficiencies li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Modern Header and Navigation */
header {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-color) 100%);
    color: white;
    padding: 25px 0;
    text-align: center;
    z-index: 1000;
    position: sticky;
    top: 0;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(124, 179, 66, 0.2);
}

header h1 {
    margin: 0 0 18px 0;
    font-size: 1.9rem;
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

nav ul li {
    display: inline-block;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
    display: block;
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

nav ul li a:hover::before {
    width: 80%;
}

nav ul li a.active {
    background: rgba(255, 255, 255, 0.12);
    border-bottom: 3px solid var(--accent-color);
    box-shadow: 0 2px 10px rgba(124, 179, 66, 0.3);
}

nav ul li a.active:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Links */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Main content area */
section {
    text-align: center;
    flex: 1;
    margin-bottom: 2rem;
}

article {
    background: rgba(248, 249, 250, 0.5);
    border-radius: 10px;
    padding: 30px;
    margin: 25px 0;
    border-left: 4px solid var(--accent-color);
    text-align: left;
    transition: var(--transition);
}

article:hover {
    background: rgba(248, 249, 250, 0.8);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

article h3 {
    font-size: 1.5em;
    margin-top: 0;
    color: var(--primary-color);
}

article h4 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
}

article h5 {
    color: var(--text-dark);
    margin-top: 1rem;
}

p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: center;
    margin: 1.2rem 0;
    max-width: 75ch;
    margin-left: auto;
    margin-right: auto;
}

article p {
    text-align: left;
    max-width: 100%;
}

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

/* Lists inside articles */
article ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

article ul li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: var(--text-dark);
    line-height: 1.6;
}

article ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 1.5rem;
    line-height: 1;
}

article ul li strong {
    color: var(--primary-color);
}

/* Images */
img, .responsive-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

img:hover, .responsive-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

figure {
    margin: 30px 0;
}

figcaption {
    margin-top: 10px;
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Badge/Tag styling for technologies */
.tech-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    margin: 6px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(74, 139, 166, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.tech-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.tech-badge:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(74, 139, 166, 0.5);
}

.tech-badge:hover::before {
    left: 100%;
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(44, 95, 124, 0.4);
}

#back-to-top.show {
    display: flex;
}

/* Footer Styling */
footer {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-color) 100%);
    color: white;
    text-align: center;
    padding: 20px;
    width: 100%;
    position: relative;
    bottom: 0;
    flex-shrink: 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Iframe styling */
iframe {
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin: 20px 0;
}

/* LinkedIn and GitHub link styling */
.linkedin-link, .github-link {
    color: var(--secondary-color);
    font-weight: 500;
    transition: var(--transition);
}

.linkedin-link:hover, .github-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive layout for smaller screens */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    header {
        padding: 20px 0;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav ul {
        flex-direction: column;
        gap: 5px;
    }

    nav ul li a {
        padding: 10px 20px;
    }

    .white-box {
        padding: 25px;
        margin: 15px auto;
    }

    .journey-map-container {
        padding: 25px;
        margin: 25px auto;
    }

    .journey-map-container h2 {
        font-size: 1.6rem;
    }

    .journey-map-container .subtitle {
        font-size: 1rem;
    }

    #journeyMap {
        height: 400px;
    }

    article {
        padding: 20px;
    }

    ul.core-proficiencies {
        column-count: 1;
    }

    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    footer {
        position: relative;
    }

    p {
        font-size: 1rem;
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .white-box {
        max-width: 900px;
    }
}
