* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.4;
    color: #333;
    background: #8FDDE7;
}

.resume-container {
    max-width: 210mm;
    margin: 20px auto;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
}

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

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

.title {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.links-section {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.link-button {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    color: #333;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
}

.link-button:hover::before {
    left: 100%;
}

.link-button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.link-button.github {
    background: linear-gradient(145deg, #24292e, #1b1f23);
    color: white;
}

.link-button.github:hover {
    background: linear-gradient(145deg, #2f363d, #24292e);
}

.link-button.linkedin {
    background: linear-gradient(145deg, #0077b5, #005885);
    color: white;
}

.link-button.linkedin:hover {
    background: linear-gradient(145deg, #0088cc, #0077b5);
}

.link-button.whatsapp {
    background: linear-gradient(145deg, #25d366, #128c7e);
    color: white;
}

.link-button.whatsapp:hover {
    background: linear-gradient(145deg, #34e077, #25d366);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

.section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #667eea;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #764ba2;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.skill-tag {
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    text-align: center;
    font-weight: 600;
    border: none;
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f9ca24, #f0932b, #eb4d4b, #6c5ce7);
    background-size: 400%;
    border-radius: 25px;
    z-index: -1;
    animation: rainbowGlow 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-tag::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.8s ease;
    z-index: 1;
}

.skill-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 30px rgba(102, 126, 234, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation-duration: 1.5s;
}

.skill-tag:hover::before {
    opacity: 1;
}

.skill-tag:hover::after {
    left: 100%;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes rainbowGlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 400% 50%;
    }
}

.skill-tag:nth-child(odd) {
    animation-delay: 0.2s;
}

.skill-tag:nth-child(even) {
    animation-delay: 0.4s;
}

.experience-item, .education-item, .project-item {
    margin-bottom: 18px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

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

.item-title {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.item-company {
    font-weight: 500;
    color: #667eea;
    font-size: 0.9rem;
}

.item-date {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.item-description {
    font-size: 0.9rem;
    color: #555;
    margin-top: 8px;
}

.research-link {
    background: linear-gradient(145deg, #667eea, #5a6fd8);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.research-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.research-link:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(145deg, #7c8ceb, #667eea);
}

.research-link:hover::before {
    left: 100%;
}

.research-link:active {
    transform: translateY(0);
}

.research-icon {
    font-size: 1rem;
}

.brief-summary {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    text-align: justify;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.certification-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #28a745;
}

.cert-title {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.cert-score {
    color: #28a745;
    font-weight: 500;
    font-size: 0.85rem;
}

.languages {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.language-item {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.interests {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.interest-item {
    background: #fff3e0;
    color: #f57c00;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
}

@media print {
    body {
        background: white;
    }
    
    .resume-container {
        box-shadow: none;
        margin: 0;
    }
    
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .links-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .link-button {
        width: 100%;
        justify-content: center;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .modal {
        padding: 10px;
    }
    .modal-content {
        width: calc(100vw - 20px);
        height: calc(100vh - 40px);
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 40px);
        padding: 15px;
    }
    .certificate-image-container {
        height: 60vh; /* Responsive height on mobile */
    }
    .certificate-image {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 480px) {
    .certificate-image-container {
        height: 50vh; /* Smaller height on small mobile */
    }
    .certificate-image {
        width: 100%;
        height: 100%;
    }
    .modal-content {
        padding: 12px;
    }
    .certificate-info {
        padding: 15px;
    }
}

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

.header-content {
    animation: fadeIn 1s ease-out forwards;
}



.project-link {
    background: linear-gradient(145deg, #667eea, #5a6fd8);
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(145deg, #7c8ceb, #667eea);
}

.project-link:hover::before {
    left: 100%;
}

.project-link:active {
    transform: translateY(0);
}

/* Certificate Button Styling */
.certificate-btn {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
    box-shadow: 
        0 3px 12px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.certificate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.certificate-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation-duration: 1.5s;
}

.certificate-btn:hover::before {
    left: 100%;
}

.certificate-btn:active {
    transform: translateY(0) scale(1.02);
}

.certificate-btn .icon {
    font-size: 0.8rem;
}

/* Enhanced Modal Styling - Fixed for certificate images */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Changed from 0.8 to 0.9 */
    backdrop-filter: blur(8px); /* Increased from 5px to 8px */
    animation: modalFadeIn 0.3s ease-out;
    padding: 20px; /* Added padding */
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 25px;
    width: 600px; /* Fixed width for certificate display */
    max-width: 95vw;
    height: 700px; /* Fixed height for certificate display */
    max-height: 95vh;
    position: relative;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: scale(0.7);
    animation: modalSlideIn 0.4s ease-out forwards;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Certificate Image Container - Fixed sizing */
.certificate-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 15px;
    background: #f8f9fa;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    height: 450px; /* Fixed height for image container */
    width: 100%;
}

.certificate-image {
    width: 100%; /* Fill container width */
    height: 100%; /* Fill container height */
    object-fit: contain; /* Keep aspect ratio, fit within container */
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    cursor: zoom-in;
    display: block;
}

.certificate-image:hover {
    transform: scale(1.02);
}

/* Full screen image view */
.certificate-image.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    object-fit: contain;
    cursor: zoom-out;
    border-radius: 0;
}

/* Updated Certificate Info Styling */
.certificate-info {
    flex-shrink: 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border-left: 5px solid #28a745;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

@keyframes modalSlideIn {
    from { transform: scale(0.7) translateY(-50px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}
