/* ===== VARIABLES ===== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-light: #64748b;
    --background: #ffffff;
    --background-alt: #f8fafc;
    --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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: white;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--background);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

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

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 1;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-image {
    flex-shrink: 0;
}

.profile-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 4px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-lg);
}

.profile-info {
    flex: 1;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.location {
    font-size: 1rem;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

/* ===== SECTIONS ===== */
.section {
    padding: 3rem 2rem;
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 0.6s ease-out;
}

.section:last-of-type {
    border-bottom: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

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

/* ===== ABOUT SECTION ===== */
.about-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

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

/* ===== EXPERIENCE SECTION ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
}

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

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

.timeline-marker {
    position: absolute;
    left: -1rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border: 4px solid var(--background);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--border-color);
    z-index: 1;
}

.timeline-content {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.job-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

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

.location-type {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.job-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ===== PROJECTS SECTION ===== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--background-alt);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-period {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ===== TAGS ===== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--background);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.skill-tag {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(14, 165, 233, 0.1));
    border-color: var(--primary-color);
}

.soft-skill-tag {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    color: #9333ea;
    border-color: #c084fc;
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.skill-category {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

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

.soft-skills {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

/* ===== EDUCATION SECTION ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.education-item {
    display: flex;
    gap: 1rem;
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.education-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.education-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.education-content {
    flex: 1;
}

.education-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.education-institution {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.education-field {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

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

/* ===== FOOTER ===== */
.footer {
    background: var(--background-alt);
    padding: 2rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
}

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

.print-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

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

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }

    .container {
        border-radius: var(--radius-lg);
    }

    .header {
        padding: 2rem 1.5rem;
    }

    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .profile-placeholder {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }

    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1.125rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .contact-item {
        justify-content: center;
        width: 100%;
    }

    .section {
        padding: 2rem 1.5rem;
    }

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

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -0.5rem;
    }

    .job-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .period {
        white-space: normal;
    }

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

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

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

@media (max-width: 480px) {
    .header {
        padding: 1.5rem 1rem;
    }

    .profile-placeholder {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }

    .name {
        font-size: 1.75rem;
    }

    .title {
        font-size: 1rem;
    }

    .section {
        padding: 1.5rem 1rem;
    }

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

    .timeline-content {
        padding: 1rem;
    }

    .skill-category,
    .education-item,
    .project-card {
        padding: 1.25rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    .header {
        background: var(--primary-color) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-btn {
        display: none;
    }

    .section {
        page-break-inside: avoid;
    }

    .timeline-item,
    .project-card,
    .education-item {
        page-break-inside: avoid;
    }

    a {
        text-decoration: none;
        color: inherit;
    }

    .tag {
        border: 1px solid var(--border-color);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item {
    animation: slideIn 0.5s ease-out;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
