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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    font-size: 14px;
}

.container {
    max-width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.8s ease-out;
    display: flex;
    flex-direction: column;
}

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

/* Header Styles */
.header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 25px 30px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar i {
    font-size: 26px;
    color: white;
}

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

.title {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 400;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 3px;
    border-radius: 5px;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.contact-item i {
    width: 16px;
    text-align: center;
    opacity: 0.8;
}

/* Main Content */
.main-content {
    padding: 25px 30px;
    flex: 1;
    overflow: hidden;
}

.section {
    margin-bottom: 15px;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }
.section:nth-child(5) { animation-delay: 0.5s; }
.section:nth-child(6) { animation-delay: 0.6s; }

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

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 2px;
}

.section-title i {
    font-size: 1rem;
    color: #7c3aed;
}

/* Two Column Layout */
.two-column-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 30px;
    height: 100%;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
}

/* Summary Section */
.summary-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #4b5563;
    text-align: justify;
}

/* Compact Timeline Styles */
.timeline-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid #4f46e5;
    background: rgba(79, 70, 229, 0.02);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-item:hover {
    background: rgba(79, 70, 229, 0.05);
    transform: translateX(3px);
}

.timeline-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 3px;
}

/* Job header with logo */
.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3px;
}

.company-logo {
    flex-shrink: 0;
    position: absolute;
    right: 10px;
    top: 5px;
}

.logo-small {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-okay {
    width: 65px;
    height: auto;
}

.logo-placeholder {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: white;
}

.logo-placeholder.basketball {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
}

.logo-placeholder.retail {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
}

.honor {
    color: #059669;
    font-weight: 500;
    font-size: 0.75rem;
}

.institution,
.company {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.date {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-bottom: 5px;
}

.description {
    color: #4b5563;
    line-height: 1.3;
    font-size: 0.8rem;
}

/* Compact Skills Section */
.skills-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-category {
    transition: transform 0.3s ease;
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.skill-category h3 i {
    color: #7c3aed;
    font-size: 0.75rem;
}

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

.skill-tag {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #374151;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    transform: translateY(-1px);
}

/* Compact Languages Section */
.languages-compact {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.language-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    background: #f9fafb;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.language-item:hover {
    background: #f3f4f6;
    transform: translateX(3px);
}

.language-name {
    font-weight: 600;
    color: #374151;
    font-size: 0.75rem;
}

.language-level {
    font-size: 0.65rem;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 6px;
}

.language-level.native {
    background: #dcfce7;
    color: #166534;
}

.language-level.fluent {
    background: #dbeafe;
    color: #1e40af;
}

.language-level.beginner {
    background: #fef3c7;
    color: #92400e;
}

/* Career Objectives Section */
.career-objectives p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #4b5563;
    margin-bottom: 12px;
    text-align: justify;
}

.objectives-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.objective-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: rgba(79, 70, 229, 0.02);
    border-radius: 6px;
    border-left: 3px solid #4f46e5;
    transition: all 0.3s ease;
}

.objective-item:hover {
    background: rgba(79, 70, 229, 0.05);
    transform: translateX(3px);
}

.objective-item i {
    color: #7c3aed;
    font-size: 0.85rem;
    min-width: 16px;
}

.objective-item span {
    font-size: 0.75rem;
    color: #4b5563;
    line-height: 1.3;
}

.language-level.fluent {
    background: #dbeafe;
    color: #1d4ed8;
}

.language-level.beginner {
    background: #fef3c7;
    color: #92400e;
}

.language-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.language-progress {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 3px;
    transition: width 1s ease-out;
    animation: progressFill 2s ease-out;
}

@keyframes progressFill {
    from {
        width: 0%;
    }
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.achievement-item {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.6s ease-out;
    animation-fill-mode: both;
}

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

.achievement-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 15px 15px 0 0;
}

.achievement-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.15);
    border-color: #c7d2fe;
}

.achievement-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.achievement-icon i {
    font-size: 1.5rem;
    color: white;
}

.achievement-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.achievement-content p {
    color: #6b7280;
    line-height: 1.5;
    font-size: 0.95rem;
}

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

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.2rem;
}

/* Print Button */
.print-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10;
}

.print-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Copy to Clipboard Animation */
.contact-item.copied {
    background: rgba(34, 197, 94, 0.2) !important;
    transform: translateX(5px) scale(1.02);
}

.copy-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #059669;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(300px);
    transition: transform 0.3s ease;
}

.copy-feedback.show {
    transform: translateX(0);
}

/* QR Code Inline Section */
.qr-container-inline {
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-image-inline {
    width: 120px;
    height: auto;
    border-radius: 4px;
}

/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body.dark-mode .container {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .header {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

body.dark-mode .section-title {
    color: #8b5cf6;
    border-bottom-color: #374151;
}

body.dark-mode .section-title::after {
    background: linear-gradient(90deg, #8b5cf6, #a855f7);
}

body.dark-mode .timeline::before {
    background: linear-gradient(180deg, #8b5cf6, #a855f7);
}

body.dark-mode .timeline-marker {
    background: #1e293b;
    border-color: #8b5cf6;
}

body.dark-mode .timeline-content h3 {
    color: #f1f5f9;
}

body.dark-mode .institution,
body.dark-mode .company {
    color: #94a3b8;
}

body.dark-mode .date {
    color: #64748b;
}

body.dark-mode .description,
body.dark-mode .summary-content p {
    color: #cbd5e1;
}

body.dark-mode .skill-tag {
    background: linear-gradient(135deg, #374151, #4b5563);
    color: #e2e8f0;
    border-color: #4b5563;
}

body.dark-mode .skill-tag:hover {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

body.dark-mode .language-item {
    background: #374151;
    border-color: #4b5563;
}

body.dark-mode .language-item:hover {
    background: #4b5563;
    border-color: #6b7280;
}

body.dark-mode .language-name {
    color: #f1f5f9;
}

body.dark-mode .language-bar {
    background: #4b5563;
}

body.dark-mode .achievement-item {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-color: #4b5563;
}

body.dark-mode .achievement-item:hover {
    border-color: #6b7280;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
}

body.dark-mode .achievement-content h3 {
    color: #f1f5f9;
}

body.dark-mode .achievement-content p {
    color: #cbd5e1;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 30px 20px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-item {
        padding-left: 25px;
    }
    
    .timeline-marker {
        left: -32px;
    }
    
    .theme-toggle {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .print-button {
        bottom: 15px;
        right: 15px;
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .achievement-item {
        padding: 20px;
    }
    
    .achievement-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .achievement-icon i {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .contact-info {
        width: 100%;
    }
    
    .contact-item {
        justify-content: center;
    }
}

/* Print Styles for A4 Format */
@media print {
    @page {
        size: A4;
        margin: 0.4in 0.3in;
    }
    
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    body {
        background: white !important;
        padding: 0;
        font-size: 11px;
        line-height: 1.3;
        color: #000 !important;
    }
    
    .container {
        max-width: none;
        min-height: auto;
        height: auto;
        box-shadow: none;
        border-radius: 0;
        background: white;
        margin: 0;
        padding: 0;
        position: relative;
    }
    
    .header {
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
        color: white !important;
        padding: 15px 20px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        margin-bottom: 15px;
    }
    
    .header::before {
        display: none;
    }
    
    .main-content {
        padding: 0 20px !important;
    }
    
    .two-column-layout {
        gap: 15px !important;
    }
    
    .section {
        margin-bottom: 10px !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .section-title {
        font-size: 0.9rem !important;
        margin-bottom: 8px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .timeline-item,
    .objective-item,
    .skill-category {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 6px !important;
    }
    
    .theme-toggle,
    .print-button,
    .save-pdf-button {
        display: none !important;
    }
    
    .skill-tag:hover,
    .timeline-item:hover,
    .achievement-item:hover,
    .language-item:hover {
        transform: none !important;
        background: initial !important;
    }
    
    .two-column-layout {
        grid-template-columns: 0.8fr 1.2fr;
        gap: 25px;
    }
    
    .name {
        font-size: 1.6rem !important;
    }
    
    .profile-avatar {
        width: 55px !important;
        height: 55px !important;
    }
    
    .profile-avatar i {
        font-size: 22px !important;
    }
    
    /* QR Code print styles */
    .qr-image-inline {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Additional Interactive Effects */
.animate-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Theme Toggle and Control Buttons */
.theme-toggle,
.print-button,
.save-pdf-button {
    position: fixed;
    top: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle {
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    justify-content: center;
}

.print-button {
    right: 90px;
}

.save-pdf-button {
    right: 180px;
    background: rgba(79, 70, 229, 0.9);
    color: white;
}

.theme-toggle:hover,
.print-button:hover,
.save-pdf-button:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.save-pdf-button:hover {
    background: rgba(79, 70, 229, 1);
    color: white;
}

/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e5e7eb;
}

body.dark-mode .container {
    background: #1f2937;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

body.dark-mode .section-title {
    color: #818cf8;
}

body.dark-mode .timeline-item,
body.dark-mode .achievement-item {
    background: rgba(129, 140, 248, 0.05);
    border-left-color: #818cf8;
}

body.dark-mode .skill-tag {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

body.dark-mode .skill-tag:hover {
    background: linear-gradient(135deg, #818cf8, #a855f7);
}

body.dark-mode .language-item {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

body.dark-mode .theme-toggle,
body.dark-mode .print-button {
    background: rgba(31, 41, 55, 0.9);
    color: #e5e7eb;
}

body.dark-mode .save-pdf-button {
    background: rgba(129, 140, 248, 0.9);
    color: white;
}

body.dark-mode .save-pdf-button:hover {
    background: rgba(129, 140, 248, 1);
}
.section.in-view {
    animation: slideInFromBottom 0.8s ease-out;
}

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