/* CSS Variables for theming */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-tertiary: #cbd5e0;
    --accent-primary: #3b82f6;
    --accent-hover: #60a5fa;
    --border-color: #4a5568;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.theme-toggle svg {
    color: var(--text-primary);
    transition: opacity 0.3s ease;
}

.theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.header {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-content {
    flex: 1;
    min-width: 250px;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.title {
    font-size: 1.25rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 20px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.contact-item:hover {
    color: var(--accent-primary);
}

.contact-item svg {
    flex-shrink: 0;
}

/* Download button */
.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

.download-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.download-btn:active {
    transform: translateY(0);
}

/* Main content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Section */
.section {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

/* Summary */
.summary-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Experience */
.experience-item {
    margin-bottom: 32px;
}

.experience-item:last-child {
    margin-bottom: 0;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.company-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.job-title {
    font-size: 1rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.date {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 500;
    white-space: nowrap;
}

.achievements {
    list-style: none;
    padding-left: 0;
}

.achievements li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.achievements li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

.achievements li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Skills */
.skills-grid {
    display: grid;
    gap: 24px;
}

.skill-category {
    margin-bottom: 8px;
}

.skill-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Certifications */
.certification-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cert-badge {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-badge svg {
    color: white;
}

.cert-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cert-issuer {
    font-size: 0.95rem;
    color: var(--text-tertiary);
}

/* Education */
.education-item {
    margin-bottom: 16px;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 16px;
}

.school-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

.gpa {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Print styles */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .theme-toggle,
    .download-btn {
        display: none;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .section,
    .header {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .section-title {
        page-break-after: avoid;
    }

    .experience-item {
        page-break-inside: avoid;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .header {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1.1rem;
    }

    .section {
        padding: 24px 20px;
    }

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

    .experience-header {
        flex-direction: column;
        gap: 8px;
    }

    .date {
        white-space: normal;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }

    .theme-toggle {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .contact-info {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 1.75rem;
    }

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

    .company-name {
        font-size: 1.1rem;
    }
}
