/* Custom Typography and Base Styles */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #ECEAE3;  /* warm light taupe page bg — replaces Tailwind bg-gray-100 */
}

.container {
    max-width: 1280px;
}

h1 {
    letter-spacing: -0.5px;
    font-weight: 700;
}

h2 {
    letter-spacing: -0.3px;
    font-weight: 600;
    color: #1f2937;
}

h3 {
    letter-spacing: -0.2px;
    font-weight: 500;
    color: #1f2937;
}

/* Link Styles */
a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 400;
}

a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Reduce visual noise */
strong {
    font-weight: 500;
    color: #1f2937;
}

/* Subtle section dividers - old code commented out after transition to a more semantic CSS focus
.section-border {
    border-bottom: 1px solid #e5e7eb;
}
*/

/* ============================================
   LAYOUT COMPONENTS - NEW
   ============================================ */

/* Container Background */
/* FUTURE LIGHT MODE COLOR OPTIONS:
   Ivory Smoke (#F6F4EE)  — warm card background
   Soft Silver Mist (#E8E6E1) — page/border surround */
.cv-container {
    background-color: #F5F4F0;  /* warm off-white, no blue tint */
    border: 1px solid #E2E0DA;  /* subtle warm-grey edge */
}

/* Profile Image Border */
.profile-image {
    border-color: #DCDDDD;
}


/* ============================================
   SECTION HEADERS
   ============================================ */

/* Main content section headers (Education, Experience, etc.) */
.section-title {
    font-size: 1.875rem;        /* text-3xl */
    font-weight: 700;            /* font-bold */
    border-bottom: 2px solid #9ca3af;  /* border-b-2 border-gray-400 */
    padding-bottom: 0.75rem;     /* pb-3 */
    margin-bottom: 1.25rem;      /* mb-5 */
}

/* Sidebar section headers (Contact, Skills, etc.) */
.sidebar-section-title {
    font-size: 1.5rem;           /* text-2xl */
    font-weight: 600;            /* font-semibold */
    border-bottom: 2px solid #60a5fa;  /* border-b-2 border-blue-400 */
    padding-bottom: 0.5rem;      /* pb-2 */
    margin-bottom: 1rem;         /* mb-4 */
    color: #111827;              /* text-gray-900 */
}


/* ============================================
   CONTENT ENTRIES (Jobs, Education, etc.)
   ============================================ */

/* Entry container spacing */
.entry {
    margin-bottom: 1.5rem;       /* mb-6 */
}

/* Entry title (job title, school name) */
.entry-title {
    font-size: 1.25rem;          /* text-xl */
    font-weight: 700;            /* font-bold */
    color: #111827;              /* text-gray-900 */
}

/* Entry metadata (company, dates, degree info) */
.entry-meta {
    font-weight: 500;            /* font-medium */
    color: #4b5563;              /* text-gray-600 */
    font-size: 1rem;             /* text-base */
}

/* Entry description lists */
.entry-list {
    list-style-type: disc;       /* list-disc */
    list-style-position: outside;
    padding-left: 1.25rem;       /* room for the outside marker (Tailwind preflight zeroes padding) */
    margin-top: 0.5rem;          /* mt-2 */
    color: #374151;              /* text-gray-700 */
    font-size: 0.875rem;         /* text-sm */
}

.entry-list li {
    margin-bottom: 0.25rem;      /* space-y-1 */
}


/* ============================================
   TEXT UTILITIES
   ============================================ */

/* Standard body text */
.text-body {
    color: #374151;              /* text-gray-700 */
    font-size: 1rem;             /* text-base */
}

/* Body text with relaxed line height */
.text-body-relaxed {
    color: #374151;              /* text-gray-700 */
    font-size: 1rem;             /* text-base */
    line-height: 1.625;          /* leading-relaxed */
}

/* Small text */
.text-small {
    font-size: 0.875rem;         /* text-sm */
    color: #374151;              /* text-gray-700 */
}

/* Detail text (for concentration, specialization labels) */
.text-detail {
    color: #374151;              /* text-gray-700 */
    margin-top: 0.5rem;          /* mt-2 */
    font-size: 0.875rem;         /* text-sm */
}

.text-detail:not(:first-child) {
    margin-top: 0;               /* Remove mt-2 for subsequent items */
}


/* ============================================
   SECTION SPACING
   ============================================ */

.section {
    margin-bottom: 2.5rem;       /* mb-10 */
}

.sidebar-section {
    margin-bottom: 2rem;         /* mb-8 */
}


/* ============================================
   LISTS
   ============================================ */

/* Sidebar lists (contact, certifications, etc.) */
.sidebar-list {
    list-style-type: disc;       /* list-disc */
    list-style-position: outside;
    padding-left: 1.25rem;       /* room for the outside marker (Tailwind preflight zeroes padding) */
    font-size: 0.875rem;         /* text-sm */
    color: #374151;              /* text-gray-700 */
}

.sidebar-list li {
    margin-bottom: 0.5rem;       /* space-y-2 */
}

/* Contact list (no bullets) */
.contact-list {
    font-size: 0.875rem;         /* text-sm */
    color: #374151;              /* text-gray-700 */
}

.contact-list li {
    margin-bottom: 0.5rem;       /* space-y-2 */
}


/* ============================================
   SKILLS SECTION
   ============================================ */

.skill-category {
    font-size: 1rem;             /* text-base */
    font-weight: 600;            /* font-semibold */
    margin-bottom: 0.5rem;       /* mb-2 */
    color: #1f2937;              /* text-gray-800 */
}

.skill-list {
    color: #374151;              /* text-gray-700 */
    margin-bottom: 1rem;         /* mb-4 */
    font-size: 0.875rem;         /* text-sm */
    line-height: 1.625;          /* leading-relaxed */
}

.skill-list:last-child {
    margin-bottom: 0;            /* Remove mb-4 for last item */
}


/* ============================================
   ACCESSIBILITY ENHANCEMENTS - Added as complementary features to the cv project, for better accessibility.
   ============================================ */

/* Skip to main content link (for screen readers and keyboard navigation) */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    background: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 0.25rem 0;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Enhanced focus indicators for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Focus visible (only show outline for keyboard, not mouse clicks) */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

/* Reduced motion support - respects user's OS preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        color: #000;
    }
    
    .cv-container {
        background-color: #fff;
        border: 2px solid #000;
    }
    
    a {
        color: #0000ff;
        text-decoration: underline;
    }
}


/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    /* Remove background colors and shadows for better printing */
    body {
        background: white !important;
        color: black !important;
    }
    
    .cv-container {
        background: white !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0.5in !important;
        max-width: 100% !important;
    }
    
    /* Ensure links show their URLs */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
    
    /* Don't show URLs for email and tel links */
    a[href^="mailto:"]:after,
    a[href^="tel:"]:after {
        content: "";
    }
    
    /* Page break control */
    .section,
    .entry {
        page-break-inside: avoid;
    }
    
    h2, h3 {
        page-break-after: avoid;
    }
    
    /* Adjust colors for print */
    .section-title,
    .sidebar-section-title {
        border-bottom-color: #000 !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    /* Hide skip link in print */
    .skip-link {
        display: none;
    }
}


/* ============================================
   RESPONSIVE ENHANCEMENTS
   ============================================ */

/* Ensure text remains readable on small screens */
@media (max-width: 640px) {
    .section-title {
        font-size: 1.5rem;       /* Smaller on mobile */
    }
    
    .sidebar-section-title {
        font-size: 1.25rem;
    }
    
    .entry-title {
        font-size: 1.125rem;
    }
    
    /* Ensure adequate touch targets (min 44x44px for accessibility) */
    a {
        min-height: 44px;
        display: inline-block;
        padding: 0.25rem 0;
    }
}

/* ============================================
   DOWNLOAD BUTTON
   ============================================ */

.download-btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    background-color: transparent;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0.01em;
}

.download-btn:hover {
    background-color: #f3f4f6;
    color: #1f2937;
    border-color: #9ca3af;
    text-decoration: none;
}


/* ============================================
   ACTIONS BAR (download + theme toggle, bottom of page)
   ============================================ */

.actions-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding-bottom: 2rem;
}

/* Small icon-only theme toggle, sits inline with the download button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    color: #4b5563;
    background-color: transparent;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle svg {
    width: 1.05rem;
    height: 1.05rem;
}

.theme-toggle:hover {
    background-color: #f3f4f6;
    color: #1f2937;
    border-color: #9ca3af;
}


/* ============================================
   DARK MODE
   Driven by [data-theme="dark"] on <html>, which an inline script
   sets from the user's saved choice or their OS preference. Using the
   attribute (instead of a bare media query) raises specificity so these
   rules reliably override Tailwind utility classes like .text-gray-900.
   ============================================ */

[data-theme="dark"] {
    color-scheme: dark;
    background-color: #1c1c1e !important;  /* covers the <html> element (e.g. overscroll, top strip) */
}

[data-theme="dark"] body {
    background-color: #1c1c1e !important;  /* page bg — neutral near-black, no blue tint */
    color: #d1d5db !important;             /* light gray body text */
}

[data-theme="dark"] .cv-container {
    background-color: #2a2a2e !important;  /* card bg — lighter neutral grey, clearly distinct from page */
    border: 1px solid #3d3d42 !important;  /* warm-grey edge, no blue */
}

/* headings (element + Tailwind utility overrides) */
[data-theme="dark"] h1,
[data-theme="dark"] .text-gray-900 { color: #f9fafb; }
[data-theme="dark"] h2 { color: #f3f4f6; }
[data-theme="dark"] h3 { color: #e5e7eb; }
[data-theme="dark"] .text-gray-600 { color: #9ca3af; }

[data-theme="dark"] strong {
    color: #e5e7eb;
}

/* section divider lines */
[data-theme="dark"] .section-title {
    border-bottom-color: #48484f;
    color: #f3f4f6;
}

[data-theme="dark"] .sidebar-section-title {
    border-bottom-color: #3b82f6;  /* keep blue accent, slightly muted */
    color: #f3f4f6;
}

/* header border — dark, but with enough contrast to read as a divider */
[data-theme="dark"] header {
    border-bottom-color: #48484f;
}

/* entry text */
[data-theme="dark"] .entry-title  { color: #f9fafb; }
[data-theme="dark"] .entry-meta   { color: #9ca3af; }
[data-theme="dark"] .entry-list   { color: #d1d5db; }
[data-theme="dark"] .text-detail  { color: #d1d5db; }
[data-theme="dark"] .text-body-relaxed { color: #d1d5db; }

/* sidebar lists */
[data-theme="dark"] .sidebar-list  { color: #d1d5db; }
[data-theme="dark"] .contact-list  { color: #d1d5db; }

/* skills */
[data-theme="dark"] .skill-category { color: #e5e7eb; }
[data-theme="dark"] .skill-list     { color: #d1d5db; }

/* links — lighter blue for dark bg readability */
[data-theme="dark"] a { color: #60a5fa; }
[data-theme="dark"] a:hover { color: #93c5fd; }

/* profile image border — dark with subtle contrast against the card */
[data-theme="dark"] .profile-image {
    border-color: #48484f;
}

/* download button — readable on the dark page background */
[data-theme="dark"] .download-btn {
    color: #e5e7eb;
    border-color: #48484f;
}
[data-theme="dark"] .download-btn:hover {
    background-color: #38383d;
    color: #f9fafb;
    border-color: #636368;
}

/* theme toggle button in dark mode */
[data-theme="dark"] .theme-toggle {
    color: #e5e7eb;
    border-color: #48484f;
}
[data-theme="dark"] .theme-toggle:hover {
    background-color: #38383d;
    color: #f9fafb;
    border-color: #636368;
}

/* high contrast override: keep dark mode in dark bg context */
@media (prefers-contrast: high) {
    [data-theme="dark"] body          { color: #ffffff; background-color: #000000; }
    [data-theme="dark"] .cv-container { background-color: #000000; border: 2px solid #ffffff; }
    [data-theme="dark"] a             { color: #7dd3fc; text-decoration: underline; }
}
