/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-accent: #eff6ff;
    --border-color: #e5e7eb;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Shadows */
    --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);

    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 200ms ease-in-out;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== Container ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-2xl) 0;
    margin-bottom: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
}

.name {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.02em;
}

.title {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: var(--spacing-lg);
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    font-size: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: white;
    opacity: 0.95;
    transition: opacity var(--transition-fast);
}

.contact-item:hover {
    opacity: 1;
    color: white;
}

.icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== Main Content ===== */
.main {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

/* ===== Sections ===== */
.section {
    margin-bottom: var(--spacing-2xl);
}

.section:last-child {
    margin-bottom: 0;
}

.section-title {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    font-size: 1.75rem;
}

/* ===== Objective ===== */
.objective-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ===== Experience ===== */
.job {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
}

.job:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

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

.job-title {
    font-size: 1.375rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.company {
    font-size: 1.125rem;
    color: var(--primary-color);
    font-weight: 500;
}

.job-period {
    font-size: 1rem;
    color: var(--text-light);
    white-space: nowrap;
    font-weight: 500;
}

.job-focus {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
}

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

.job-achievements li {
    position: relative;
    padding-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    line-height: 1.6;
}

.job-achievements li:last-child {
    margin-bottom: 0;
}

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

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

/* ===== Skills ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
}

.skill-category {
    background-color: var(--bg-accent);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.skill-category-title {
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: var(--spacing-md);
}

.skill-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* ===== Education ===== */
.education-item {
    padding: var(--spacing-lg);
    background-color: var(--bg-accent);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.degree {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.school {
    font-size: 1.125rem;
    color: var(--primary-color);
}

.education-year {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

/* ===== Footer ===== */
.footer {
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.print-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.print-button:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.print-button:active {
    transform: translateY(0);
}

.print-button .icon {
    width: 18px;
    height: 18px;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .name {
        font-size: 2.25rem;
    }

    .title {
        font-size: 1.25rem;
    }

    .contact-info {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .main {
        padding: var(--spacing-lg);
    }

    .job-header {
        flex-direction: column;
    }

    .job-period {
        font-size: 0.875rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .education-header {
        flex-direction: column;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .name {
        font-size: 1.875rem;
    }

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

    .job-title {
        font-size: 1.25rem;
    }
}

/* ===== Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .job,
    .skill-category,
    .education-item {
        animation: fadeInUp 0.5s ease-out;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
