/* ===== VARIABLES ===== */
:root {
    --primary-color: #048f96;
    --primary-light: #00bcd4;
    --primary-dark: #006064;
    --secondary-color: #f5f5f5;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #bdc3c7;
    --background: #ffffff;
    --background-light: #fafafa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    
    /* Typography */
    --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

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

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Universal responsive media */
img, svg, video, canvas, audio, iframe {
    max-width: 100%;
    height: auto;
}

/* Better wrapping for long words/urls on small screens */
*, *::before, *::after {
    word-wrap: break-word;
}

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

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

/* ===== LAYOUT ===== */
.main-container {
    min-height: calc(100vh - 80px);
    padding-top: 80px;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.header-logo {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
}

/* ===== DASHBOARD ===== */
.dashboard {
    padding: var(--spacing-2xl) var(--spacing-lg);
}

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

/* Default welcome section center for standalone usage */
.welcome-section {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

/* When used in a row with a CTA button, align left perfectly */
.welcome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}
.welcome-row .welcome-section {
    text-align: left;
    margin: 0;
}
.welcome-row .dashboard-actions {
    justify-content: flex-end;
    margin: 0;
}

.welcome-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.welcome-name {
    color: var(--primary-color);
    font-weight: 700;
}

.welcome-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    font-weight: 400;
}

.dashboard-actions {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-2xl);
}

.dashboard-content {
    background: var(--background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: var(--spacing-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-primary);
}

.section-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon {
    margin-bottom: var(--spacing-lg);
    color: var(--text-light);
}

.empty-icon svg {
    width: 64px;
    height: 64px;
}

.empty-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

/* ===== RESUMES GRID ===== */
.resumes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.resume-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    transition: var(--transition);
    cursor: pointer;
}

.resume-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.resume-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.resume-card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.resume-card-date {
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

.resume-card-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.resume-card-preview {
    background: var(--background-light);
    border-radius: var(--border-radius);
    height: 200px;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    overflow: hidden;
    position: relative;
}

.resume-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: var(--transition);
}

.resume-card:hover .resume-preview-image {
    transform: scale(1.05);
}

/* ===== SKELETON / SHIMMER ===== */
.skeleton {
    position: relative;
    overflow: hidden;
    background: #f0f2f5;
}
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
    100% { transform: translateX(100%); }
}
.skeleton-line {
    height: 12px;
    border-radius: 6px;
}
.skeleton-line.sm { height: 10px; }
.skeleton-line.lg { height: 16px; }

.skeleton-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    background: var(--background);
}
.skeleton-card .skeleton-preview {
    height: 180px;
    border-radius: var(--border-radius);
}
.skeleton-card .skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}
.skeleton-chip {
    width: 80px; height: 28px;
    border-radius: 999px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    :root {
        /* Lighter effects and tighter spacing for mobile */
        --shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
        --shadow-light: 0 1px 2px rgba(0, 0, 0, 0.08);
        --spacing-xl: 1.25rem;
        --spacing-2xl: 2rem;
    }

    .header-container {
        padding: 0 var(--spacing-md);
    }
    
    .dashboard {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .dashboard-content {
        padding: var(--spacing-lg);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .resumes-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .welcome-title {
        font-size: var(--font-size-2xl);
    }
    .welcome-row { flex-direction: column; align-items: stretch; gap: var(--spacing-md); }
    .welcome-row .dashboard-actions { justify-content: flex-start; }
    /* Reduce fixed header height footprint on mobile */
    .header { height: 64px; }
    .main-container { padding-top: 64px; }
}

/* Utility: visually hidden but accessible */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}
/* Remove focus outline completely */
*:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove mobile tap highlight (iOS/Android) */
* {
    -webkit-tap-highlight-color: transparent; /* removes blue flash on tap */
    -webkit-touch-callout: none;             /* disables long press menu on iOS */
    -webkit-user-select: none;               /* optional: disables text selection */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
