/* General body styles */
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;

    /* Warm off-white + Indigo */
    --primary-bg: #F8F7F4;
    --secondary-bg: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --accent-color: #4F46E5;
    --link-color: #4F46E5;
    --link-hover-color: #3730A3;
    --skill-bg: #4F46E5;
    --skill-text: #FFFFFF;
    --lang-button-bg: #E0E7FF;
    --lang-button-text: #4338CA;
    --lang-button-active-bg: #4F46E5;
    --lang-button-active-text: #FFFFFF;
    --lang-button-hover-bg: #C7D2FE;
    --profile-bg: #E0E7FF;
    --profile-border: #4F46E5;
}

/* Dark Mode Colors (manual toggle or system preference via JS-applied class) */
html.dark body:not(.colorblind-active) {
    --primary-bg: #0F172A;
    --secondary-bg: #1E293B;
    --text-primary: #E2E8F0;
    --text-secondary: #94A3B8;
    --accent-color: #818CF8;
    --link-color: #818CF8;
    --link-hover-color: #A5B4FC;
    --skill-bg: #3730A3;
    --skill-text: #E0E7FF;
    --lang-button-bg: #293548;
    --lang-button-text: #E2E8F0;
    --lang-button-active-bg: #818CF8;
    --lang-button-active-text: #0F172A;
    --lang-button-hover-bg: #334155;
    --profile-bg: #1E3A5F;
    --profile-border: #818CF8;
}

/* Colorblind Mode Colors */
body.colorblind-active {
    --primary-bg: #F0F0F0; /* Very light grey */
    --secondary-bg: #FFFFFF; /* White */
    --text-primary: #212121; /* Very dark grey */
    --text-secondary: #424242; /* Dark grey */
    --accent-color: #007BFF; /* Strong blue */
    --link-color: #FFA000; /* Amber/Orange */
    --link-hover-color: #D88800; /* Darker amber */
    --skill-bg: #007BFF; /* Skill tag background (same as accent) */
    --skill-text: #FFFFFF; /* Skill tag text */
    --lang-button-bg: #E0E0E0; /* Light grey */
    --lang-button-text: #212121; /* Very dark grey */
    --lang-button-active-bg: #007BFF; /* Active language button background */
    --lang-button-active-text: #FFFFFF; /* Active language button text */
    --lang-button-hover-bg: #BDBDBD; /* Medium grey */
    --profile-bg: #E0E0E0; /* Profile image background */
    --profile-border: #007BFF; /* Profile image border */
}


/* Print-specific styles */
@media print {
    body {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }

    .no-print {
        display: none !important;
    }

    .page-break {
        page-break-after: always;
    }

    .bg-white { /* This class is now overridden by variables, but keeping for safety if not all instances are changed */
        background-color: #fff !important;
    }

    .shadow-lg {
        box-shadow: none !important;
    }
}

/* Contact link icon alignment */
.contact-link p svg {
    vertical-align: middle;
}

/* Link highlight style */
.link-highlight {
    color: var(--link-color);
    text-decoration: underline;
}

.link-highlight:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Language button styles */
.lang-button {
    background-color: var(--lang-button-bg);
    color: var(--lang-button-text);
    padding: 0.5rem 0.75rem;
    min-height: 2.75rem; /* 44px tap target */
    min-width: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.lang-button.active {
    background-color: var(--lang-button-active-bg);
    color: var(--lang-button-active-text);
    border-color: var(--lang-button-active-bg);
}

.lang-button:hover:not(.active) {
    background-color: var(--lang-button-hover-bg);
}

/* Skill tag styles - using CSS variables */
.bg-\[\#2E4057\].text-\[\#ECEFF1\] { /* This specific class will be overridden */
    background-color: var(--skill-bg);
    color: var(--skill-text);
}

/* ── Navbar ── */
#main-nav {
    transition: box-shadow 0.2s;
}

#main-nav.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    text-decoration: none;
}

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

/* ── Hero name accent ── */
.hero-name {
    display: inline-block;
    position: relative;
    padding-bottom: 6px;
}

.hero-name::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 3rem;
    height: 3px;
    background: var(--accent-color);
    opacity: 0.5;
    border-radius: 2px;
}

/* ── Contact chips ── */
.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    min-height: 2.75rem; /* 44px tap target */
    border-radius: 9999px;
    background-color: var(--lang-button-bg);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    overflow: hidden;
    transition: background-color 0.2s, color 0.2s;
}

.contact-chip:hover {
    background-color: var(--lang-button-hover-bg);
    color: var(--text-primary);
}

/* ── Section headings ── */
.section-heading {
    position: relative;
    padding-bottom: 0.625rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2rem;
    height: 2px;
    background: var(--accent-color);
    opacity: 0.4;
    border-radius: 2px;
}

/* ── Skill tags (generated by JS — must not rely on Tailwind CDN scanning) ── */
.skill-tag {
    display: inline-block;
    background-color: var(--skill-bg);
    color: var(--skill-text);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ── Skill categories ── */
.skill-category-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0.375rem;
    top: 0.5rem;
    bottom: 0;
    width: 2px;
    background: var(--accent-color);
    opacity: 0.2;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.5rem;
    top: 0.3rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: var(--secondary-bg);
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 0 3px var(--primary-bg);
    transition: background-color 0.2s;
}

.timeline-item.is-current .timeline-dot {
    background-color: var(--accent-color);
}

/* ── Mobile tweaks ── */
@media (max-width: 639px) {
    /* Compact nav buttons so all 4 fit beside the name */
    .lang-button {
        padding: 0.3rem 0.5rem;
        min-height: unset;
        min-width: unset;
        font-size: 0.8rem;
    }

    /* Larger body text in experience/education timeline */
    .timeline-item p[data-translate-key],
    .timeline-item ul {
        font-size: 0.875rem; /* 14px instead of 12px */
    }

    /* Tighter timeline so dots don't clip against card edge */
    .timeline {
        padding-left: 1.25rem;
    }

    .timeline::before {
        left: 0.3125rem;
    }

    .timeline-dot {
        left: -1.25rem;
    }
}

/* ── Show more button ── */
.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid var(--accent-color);
    padding: 0.4rem 0.875rem;
    border-radius: 0.375rem;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background-color 0.2s, color 0.2s;
    opacity: 0.8;
}

.show-more-btn:hover {
    opacity: 1;
    background-color: var(--accent-color);
    color: var(--secondary-bg);
}
