/* =========================================================================
   GLOBAL VARIABLES & THEME (Light, Flat, Colorful)
   ========================================================================= */
:root {
    --bg-color: #faf9f6;       /* Warm cream background */
    --surface-color: #ffffff;  /* Pure white cards */
    --surface-border: #e0e0e0; /* Subtle borders */

    --primary-accent: #E91E63;    /* Pink/Red */
    --secondary-accent: #008b8b;  /* Teal/Blue */
    --tertiary-accent: #f5b041;   /* Yellow */
    
    --text-primary: #1a1a1a;
    --text-secondary: #5a5a5a;
    
    /* Code font priority as requested */
    --font-ui: 'Fira Code', monospace;
    --font-serif: Georgia, 'Times New Roman', Times, serif;

    --transition: all 0.3s ease;
}

/* =========================================================================
   RESET & BASE
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

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

a:hover {
    color: var(--primary-accent);
    text-decoration: underline;
    text-decoration-style: wavy;
}

/* =========================================================================
   TYPOGRAPHY
   ========================================================================= */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--secondary-accent);
    font-family: var(--font-ui);
    border-bottom: 2px dashed var(--surface-border);
    padding-bottom: 1rem;
}

/* =========================================================================
   LAYOUT (MainLayout)
   ========================================================================= */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 8rem 2rem 4rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* =========================================================================
   HEADER & NAVIGATION
   ========================================================================= */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(250, 249, 246, 0.95);
    border-bottom: 2px solid var(--text-primary);
    z-index: 1000;
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-ui);
}

.logo span {
    color: var(--primary-accent);
}

.desktop-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.desktop-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
}

.desktop-nav a:hover {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--primary-accent);
    text-decoration-thickness: 3px;
}

.btn-glow {
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    background: var(--text-primary);
    border: none;
    color: var(--bg-color) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    box-shadow: 4px 4px 0px var(--tertiary-accent);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    white-space: nowrap;
}

.btn-glow:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--tertiary-accent);
    text-decoration: none;
}

/* =========================================================================
   LANGUAGE TOGGLE
   ========================================================================= */
.lang-toggle {
    background: transparent;
    border: none;
    padding: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    white-space: nowrap;
    align-items: center;
    gap: 0.5rem;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}


.lang-toggle:hover {
    color: var(--text-primary);
}

.lang-toggle span.active {
    color: var(--text-primary);
    border-bottom: 2px solid var(--tertiary-accent);
}

/* =========================================================================
   CARDS & CONTAINERS
   ========================================================================= */
.glass-card {
    background: var(--surface-color);
    border: 2px solid var(--text-primary);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.1);
}

/* =========================================================================
   TIMELINE (For Experience / Education)
   ========================================================================= */
.timeline {
    position: relative;
    margin: 2rem 0;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--surface-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

/* The colorful dots on the timeline */
.timeline-item:nth-child(3n+1)::before { background: var(--secondary-accent); }
.timeline-item:nth-child(3n+2)::before { background: var(--primary-accent); }
.timeline-item:nth-child(3n+3)::before { background: var(--tertiary-accent); }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.9rem; /* Positioning over the timeline line */
    top: 0.2rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    z-index: 10;
}

/* =========================================================================
   EXPERIENCE CARD SPECIFICS
   ========================================================================= */
.experience-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.experience-card:hover {
    transform: none;
    box-shadow: none;
}

.experience-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--text-primary);
    padding-bottom: 0.5rem;
}

.experience-card .role {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 800;
}

.experience-card .date {
    color: var(--secondary-accent);
    font-size: 0.9rem;
    font-weight: 600;
}

.experience-card .company {
    margin-bottom: 1rem;
    color: var(--primary-accent);
    font-weight: 800;
    font-size: 1.1rem;
}

.description-list {
    margin-bottom: 1.5rem;
    padding-left: 0;
    color: var(--text-primary);
    opacity: 0.82;
    font-size: 0.95rem;
    list-style: none;
}

.description-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.description-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--tertiary-accent);
    font-weight: bold;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: #f0f0f0;
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: lowercase;
}
.tech-tag:hover {
    background: var(--tertiary-accent);
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* =========================================================================
   LOADING SCREEN
   ========================================================================= */
.loading-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    color: var(--text-primary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--surface-border);
    border-top-color: var(--primary-accent);
    border-right-color: var(--tertiary-accent);
    border-bottom-color: var(--secondary-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.glass-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    border-top: 2px dashed var(--surface-border);
    background: var(--bg-color);
    font-family: var(--font-ui);
}

/* =========================================================================
   HAMBURGER BUTTON (hidden on desktop)
   ========================================================================= */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* =========================================================================
   SIDEBAR (Mobile)
   ========================================================================= */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
    display: block;
    opacity: 1;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: #ffffff !important;
    border-left: 2px solid #e0e0e0;
    z-index: 1100;
    display: none;
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.5rem;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed #e0e0e0;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #1a1a1a;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.sidebar a {
    padding: 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a !important;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.sidebar a:hover {
    color: #E91E63 !important;
    text-decoration: none;
    padding-left: 0.5rem;
}

.sidebar .sidebar-btn {
    margin-top: 1rem;
    text-align: center;
    display: block;
    color: #faf9f6 !important;
}

/* =========================================================================
   RESPONSIVE — TABLET (≤ 900px)
   ========================================================================= */
@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .hamburger   { display: flex; }

    .sidebar {
        display: flex;
    }

    .header-content {
        gap: 1rem;
    }

    .main-content {
        padding: 6rem 1.5rem 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* =========================================================================
   RESPONSIVE — MOBILE (≤ 600px)
   ========================================================================= */
@media (max-width: 600px) {
    .main-content {
        padding: 5rem 1rem 2rem;
    }

    .glass-header {
        padding: 0.75rem 1rem;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .glass-card {
        padding: 1.25rem;
    }

    /* Experience card */
    .experience-card .card-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .experience-card .role {
        font-size: 1.1rem;
    }

    .experience-card .date {
        font-size: 0.8rem;
    }

    .description-list {
        font-size: 0.85rem;
    }

    .description-list li {
        padding-left: 1.2rem;
    }

    /* Timeline */
    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -1.85rem;
        width: 0.75rem;
        height: 0.75rem;
    }

    /* Tech tags */
    .tech-tag {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }

    /* Footer */
    .glass-footer {
        padding: 1.5rem 1rem;
        font-size: 0.8rem;
    }
}