@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

:root {
    /* Light Theme (Default) */
    --bg-main: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --text-on-accent: #FFFFFF;
    --accent: #70AFF6;
    --accent-gold: #FCB908;
    --border-color: #E1E2DF;
    --hero-bg: #232334;
    --hero-bg-darker: #1E1E2D;
    --hero-text-light: #D1D1D1;
    --hero-cta: #E4A807;
    --accent-dark: #4A90E2;
    --accent-gold-dark: #E4A807;
}

body.dark-mode {
    /* Dark Theme */
    --bg-main: #1A1A2E;
    --bg-secondary: #2A2A4E;
    --text-primary: #FFFFFF;
    --text-secondary: #A4CBEA;
    --text-on-accent: #000000;
    --accent: #70AFF6;
    --accent-gold: #FCB908;
    --border-color: #3A3A5E;
    --hero-bg: #232334;
    --hero-bg-darker: #1E1E2D;
    --hero-text-light: #D1D1D1;
    --hero-cta: #E4A807;
    --accent-dark: #4A90E2;
    --accent-gold-dark: #E4A807;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-secondary);
    margin: 0;
    padding: 0 5%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

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

/* Header & Nav */
header {
    padding: 2rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo-link {
    display: block;
}

.header-profile-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--accent);
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: var(--text-secondary);
    transition: fill 0.3s ease;
}

.social-icon:hover {
    fill: var(--accent);
}

.rss-icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.125em;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-secondary);
    padding: 3rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
}

.modal-content h2 {
    color: var(--text-primary);
    margin-top: 0;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.3s ease;
}

.social-link-item:hover {
    background-color: var(--accent);
    color: var(--text-on-accent);
}

.social-link-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Blog Pages */

.post-date-label {
    display: inline-block;
    font-size: 0.9rem;
    padding: 0.15rem 0.35rem;
    background-color: var(--accent-gold);
    color: var(--text-primary);
    border-radius: 4px;
}

.post-list-item {
    display: block;
    padding: 2rem;
    margin-bottom: 1.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.post-list-item:hover {
    transform: translateY(-5px);
    background-color: var(--accent);
}

.post-list-item h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.post-list-item p {
    color: var(--text-secondary);
    margin: 0;
}

.post-list-item:hover h2, .post-list-item:hover p {
    color: var(--text-on-accent);
}

.post-meta {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-content h2, .post-content h3 {
    color: var(--text-primary);
    margin-top: 2.5rem;
}

/* Jumbotron & Hero Section (New Design) */
.home-page .jumbotron {
    position: relative;
    overflow: hidden;
}

.home-page::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 45%;
    height: 50vh;
    background-color: var(--bg-secondary);
    z-index: -999;
}

.hero-split {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-split-text {
    padding: 6rem 2rem 6rem 0;
    position: relative;
    z-index: 3; /* Ensure text is on top */
    transform: translateX(5%); /* Overlap effect */
}

.hero-split-text h1 {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0;
}

.dark-mode .hero-split-text h1 {
    color: #FFFFFF;
}

.hero-split-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 45ch;
    margin: 2rem 0;
}

.dark-mode .hero-split-text p {
    color: var(--hero-text-light);
}

.hero-split-text .cta-link {
    font-weight: 500;
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
}

.dark-mode .hero-split-text .cta-link {
    color: var(--hero-cta);
}

.hero-split-image {
    height: 500px;
    position: relative;
    z-index: 2;
    margin-left: 30px;
}

.hero-split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-stats {
    position: absolute;
    top: 2rem;
    right: 1rem; /* Adjusted from 0 */
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .hero-stats {
    background-color: rgba(42, 42, 78, 0.8);
}

.stat {
    margin-bottom: 1.5rem;
}

.stat:last-child {
    margin-bottom: 0;
}

.stat h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.stat p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Services Section */
.services-section {
    padding: 4rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2.5rem;
    color: var(--text-on-accent);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-on-accent);
}

.service-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
}

.service-card.blue {
    background-color: var(--accent-dark);
}

.service-card.gold {
    background-color: var(--accent-gold-dark);
}

/* Projects Preview */
.projects-preview {
    padding: 4rem 0;
}

.projects-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: flex-start;
}


.projects-preview-text p {
    line-height: 1.7;
    margin-bottom: 3rem;
}

.core-values {
    margin-top: 3rem;
}

.value-item {
    margin-bottom: 2rem;
}

.value-item:last-child {
    margin-bottom: 0;
}

.value-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.value-item p {
    margin: 0;
    line-height: 1.6;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.project-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.project-initials {
    width: 60px;
    height: 60px;
    text-align: center;
    border:1px solid var(--border-color);
    font-size: 2rem;
    padding-top: 1rem;
}

.project-info {
    flex-grow: 1;
}

.project-card h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-primary);
}

.project-card p {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
}

.project-arrow {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease, color 0.3s ease;
}

.project-card:hover .project-arrow {
    transform: translateX(10px);
    color: var(--accent);
}

/* Map Section */
.map-section {
    padding: 4rem 0;
    text-align: center;
}


.world-map {
    width: 100%;
    height: 600px;
}

/* Style overrides for jsvectormap */
.jvm-container {
    touch-action: none;
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

.site-footer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Inner Page Styles (Projects, Contact) */
.projects-full, .contact-info {
    padding: 4rem 0;
}

.projects-full h1, .contact-info h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 3rem;
    font-weight: 400;
}

/* Projects Page */
.project-entry {
    background-color: var(--bg-secondary);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.project-entry h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Contact Page */
.contact-info p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.email-link {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 2rem 0;
    border-bottom: 2px solid var(--accent);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.email-link:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 2rem;
}

.social-links a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--text-primary);
}

/* Now Page */
.now-page .subtitle a {
    font-size: 1.2rem;
    text-decoration: underline;
}

.now-entry {
    background-color: var(--bg-secondary);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.now-entry h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.text-center {
    text-align: center;
}

.margin-top-xl {
    margin-top: 4rem;
}

/* About Page */

.about-page .subtitle {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 3rem;
    font-weight: 400;
}

.about-section {
    background-color: var(--bg-secondary);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.about-section h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

.about-section p, .about-section ul {
    line-height: 1.8;
    font-size: 1.1rem;
}

.about-section ul {
    padding-left: 1.5rem;
}

.about-section ul li {
    margin-bottom: 1rem;
}

/* Interests Section */
.interests-section {
    padding: 4rem 0;
    text-align: center;
}


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

.interest-card {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.interest-card:hover {
    transform: translateY(-5px);
    background-color: var(--accent);
}

.interest-card h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.interest-card:hover h3 {
    color: var(--text-on-accent);
}

/* ===================================
   Typography & Heading Styles
   =================================== */

/* Page Titles (h1 on inner pages) */
.about-page h1, .now-page h1, .blog-overview h1, .post h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Section Titles (h2) */
/* Section Titles (h2) */
.projects-preview-text h2, .interests-section h2, .map-section h2, .about-section h2, .now-entry h2, .timeline-section h2 {
    font-size: 2.5rem;
    font-weight: 500; /* Reduced from 700 */
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.highlight {
    color: var(--accent);
    font-weight: 700; /* Make highlighted text bold */
}

/* Subtitles */
.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.about-page .subtitle, .now-page .subtitle {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}
/* Timeline Section */
.timeline-section {
    padding: 4rem 0;
    text-align: center;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: -30px;
    text-align: right;
    padding-right: 30px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 30px;
    text-align: left;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 13px;
    height: 13px;
    background-color: var(--bg-main);
    border: 3px solid var(--accent-gold);
    top: 0;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -9px;
}

.timeline-item:nth-child(even)::after {
    left: -9px;
}

.timeline-content {
    padding: 0 1.5rem;
    position: relative;
    text-align: left;
}

.timeline-content h3 {
    margin-top: 0;
    color: var(--text-primary);
}

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

    .hero-split-text {
        transform: none; /* Remove overlap on mobile */
        padding: 4rem 0;
        text-align: center;
    }

    .hero-split-image {
        margin-right: 0; /* Remove margin on mobile */
        width: 100%;
    }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .hero-image-container {
        order: -1; /* Move image above text on smaller screens */
        margin-bottom: 3rem;
    }

    .hero-stats {
        position: static;
        display: flex;
        justify-content: center;
        gap: 2rem;
        background-color: transparent;
        backdrop-filter: none;
        padding: 0;
        margin-top: 2rem;
    }

    .stat {
        background-color: var(--bg-secondary);
        padding: 1rem;
    }

    .projects-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0 3%;
    }

    nav {
        flex-direction: column;
        gap: 1.5rem;
    }

    nav ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-text h2 {
        font-size: 1.2rem;
    }

    .hero-image {
        max-width: 280px;
    }

    .projects-preview h2, .projects-full h1, .contact-info h1, .map-section h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    nav ul {
        gap: 1rem;
    }

    nav ul li a {
        font-size: 0.9rem;
    }

    .hero-stats {
        flex-direction: column;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-card h3 {
        font-size: 1.2rem;
    }
}
