/*=============================================
=            Global Styles & Reset            =
=============================================*/
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-bg-color: rgba(255, 255, 255, 0.05);
    --fill-color: rgba(0, 0, 0, 0.5); /* Slightly transparent black */

    --font-headline: 'Poppins', sans-serif;
    --font-main: 'Open Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --padding-base: 1.25rem;
    --section-padding-y: 2.5rem; 
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

/*=============================================
=                 Layout                      =
=============================================*/
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.content-wrapper {
    padding: 0 var(--padding-base);
    max-width: 1100px;
    margin: 0 auto;
}

/*=============================================
=                   Header                    =
=============================================*/
.header {
    padding: var(--section-padding-y) 0;
}

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

.logo-link {
    display: flex;
    align-items: center;
    height: 3rem; /* Fixed height for alignment */
}

.logo {
    height: 3rem; /* Match the text block height */
    width: auto;
}

.logo:hover {
    opacity: 0.7;
}

.header-text {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 3rem; /* Match logo height */
}

.name {
    font-family: var(--font-headline);
    font-size: 1.375rem; /* Increased from 1.125rem */
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.location {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/*=============================================
=              Section Styling                =
=============================================*/
.main-content .site-section:first-child {
    padding-top: 0; 
}

.site-section {
    padding: var(--section-padding-y) 0;
    border-bottom: 1px solid var(--border-color);
}

.site-section:last-of-type {
    border-bottom: none;
}

.section-header {
    margin-bottom: 2rem;
}

/*=============================================
=            Typography System                =
=============================================*/
.text-title {
    font-family: var(--font-headline);
    font-size: 1.75rem;
    line-height: 1.4;
    color: var(--text-primary);
    font-weight: 500;
    max-width: 25em;
}

.text-section-title {
    font-family: var(--font-headline);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.text-subsection-title {
    font-family: var(--font-headline);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.text-description {
    font-size: 1rem;
    color: var(--text-secondary);
}

.text-monospace-details {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/*=============================================
=              Component Styling              =
=============================================*/
/* Intro Section */
.intro-hook {
    margin-bottom: 3rem;
}

.intro-details .text-section-title {
    margin-bottom: 1rem;
}

.intro-details .text-description + .text-description {
    margin-top: 1.5rem;
}

.text-description strong {
    color: var(--text-primary);
    font-weight: 500;
}

.inline-link {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--text-muted);
    color: var(--text-primary);
}

.inline-link:hover {
    text-decoration-color: var(--text-primary);
}

/* Experience Section */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.experience-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.experience-header {
    display: flex;
    flex-direction: column;
    text-align: left; /* Left-aligned on mobile */
    justify-content: flex-start;
    line-height: 1.4;
}

.company-name {
    font-family: var(--font-headline);
    font-size: 1.375rem; /* Match name size */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.role-title {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.date-range {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    letter-spacing: 0.025em;
}

.experience-description {
    margin-top: 1rem; /* Increased from 0.5rem for better mobile spacing */
}

.experience-description .text-description {
    text-align: left;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.project-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--fill-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
}

.project-card:active,
.project-card:hover {
    background-color: var(--hover-bg-color);
}

.project-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-icon {
    font-size: 1.75rem;
    opacity: 0.4;
}

/* Footer */
.footer {
    padding: var(--section-padding-y) 0;
    background-color: transparent;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.version {
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    background-color: var(--fill-color);
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.75rem;
}

.footer-link {
    background-color: var(--fill-color);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color); 
    border-radius: 6px;
}

.footer-link:active,
.footer-link:hover {
    background-color: var(--hover-bg-color);
    color: var(--text-primary);
}

/*=============================================
=            Desktop Layout (Tablet+)          =
=============================================*/
@media (min-width: 768px) {
    :root {
        --padding-base: 1.5rem;
        --section-padding-y: 3rem;
    }
    
    .content-wrapper {
        padding: 0 2rem;
    }

    .text-title {
        font-size: 2.25rem;
    }

    /* Experience Section - Two Column Layout */
    .experience-section .section-header {
        margin-bottom: 2.5rem;
    }

    .experience-list {
        gap: 3rem; /* Increased gap between items on desktop */
    }

    .experience-item {
        display: grid;
        grid-template-columns: 2fr 3fr;
        column-gap: 3rem;
        align-items: start;
    }

    .experience-header {
        text-align: right; /* Right-aligned only on desktop */
        padding-right: 0; /* Ensure proper alignment */
    }

    .experience-description {
        margin-top: 0;
    }

    /* Slightly larger date range on desktop for better readability */
    .date-range {
        font-size: 0.9rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .project-card:hover {
        transform: translateY(-2px);
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .footer-info {
       flex-direction: row;
       gap: 1.25rem;
    }

    .footer-links {
        flex-direction: row;
        width: auto;
        gap: 0.5rem;
    }

    .footer-link {
        border-color: var(--border-color);
    }
}

/*=============================================
=            Animation Classes                =
=============================================*/
.fade-init {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}