/* Modern Tech Dark Theme */
:root {
    --bg-primary: #0a0a14;
    --bg-secondary: #121220;
    --bg-card: #1a1a2e;
    --accent-primary: #4fd8d9;
    --accent-secondary: #56d49f;
    --accent-purple: #a855f7;
    --text-primary: #e0e0ff;
    --text-secondary: #a0a0c0;
    --border-glow: rgba(79, 216, 217, 0.2);
    --gradient-start: linear-gradient(135deg, #4fd8d9, #56d49f, #a855f7);
    --shadow-glow: 0 0 15px rgba(79, 216, 217, 0.15);
    --transition-fast: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: 
        radial-gradient(circle at 10% 20%, rgba(79, 216, 217, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 20%),
        var(--bg-primary);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

/* Floating Particles Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20px 30px, #4fd8d9, transparent),
        radial-gradient(2px 2px at 60px 10px, #a855f7, transparent),
        radial-gradient(2px 2px at 120px 80px, #56d49f, transparent);
    background-size: 200px 200px;
    opacity: 0.3;
    z-index: -1;
    animation: float 20s ease-in-out infinite alternate;
}

/* Header Section - Glowing Gradient */
.header {
    background: var(--gradient-start);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
    color: var(--bg-primary);
    padding: 40px;
    grid-column: 1 / -1;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: var(--transition-slow);
}

.header:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(79, 216, 217, 0.3);
}

.header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.name {
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.title {
    font-size: 1.4em;
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--bg-primary);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 1em;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 247, 255, 0.2);
}

.contact-icon {
    margin-right: 8px;
    display: inline-block;
}

.mail-icon {
    color: #ffd700; /* Bright gold for high contrast on the gradient */
    font-weight: bold;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
}

.link-icon {
    color: #ffffff; /* Crisp white for high contrast */
    font-weight: bold;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
}

.header-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out 0.6s both;
}

.logo-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.logo-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-label {
    font-size: 0.75em;
    font-weight: 800;
    color: rgba(10, 10, 20, 0.6);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.logo-items img {
    height: 40px;
    max-width: 140px;
    width: auto;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    object-fit: contain;
    opacity: 0.9;
    transition: var(--transition-fast);
}

.logo-items img:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

/* Media Icons Hover Effects */
.media-icon {
    transition: var(--transition-fast);
}

.media-icon:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

/* Grid Layout */
.resume-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

/* Sidebar - Glass Morphism */
.sidebar {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-glow);
    transition: var(--transition-fast);
    align-self: start;
}

.sidebar:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 216, 217, 0.25);
}

.sidebar-section {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideIn 0.6s ease-out forwards;
}

.sidebar-section:nth-child(1) { animation-delay: 0.1s; }
.sidebar-section:nth-child(2) { animation-delay: 0.3s; }
.sidebar-section:nth-child(3) { animation-delay: 0.5s; }
.sidebar-section:nth-child(4) { animation-delay: 0.7s; }

.sidebar-section h3 {
    color: var(--accent-primary);
    font-size: 1.3em;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-start);
    border-radius: 2px;
    animation: expandLine 1s ease-out 0.2s both;
}

/* Main Content */
.main-content {
    padding: 10px;
}

.section {
    margin-bottom: 40px;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-glow);
    transition: var(--transition-fast);
    opacity: 0;
    transform: translateY(30px);
}

.section:nth-child(1) { animation: slideIn 0.8s ease-out 0.2s forwards; }
.section:nth-child(2) { animation: slideIn 0.8s ease-out 0.4s forwards; }
.section:nth-child(3) { animation: slideIn 0.8s ease-out 0.6s forwards; }
.section:nth-child(4) { animation: slideIn 0.8s ease-out 0.8s forwards; }
.section:nth-child(5) { animation: slideIn 0.8s ease-out 1.0s forwards; }
.section:nth-child(6) { animation: slideIn 0.8s ease-out 1.2s forwards; }
.section:nth-child(7) { animation: slideIn 0.8s ease-out 1.4s forwards; }

.section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(79, 216, 217, 0.2);
}

.section-header {
    color: var(--accent-primary);
    font-size: 1.6em;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-start);
    border-radius: 2px;
    animation: expandLine 1s ease-out both;
}

/* Experience Items */
.experience-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-fast);
}

.experience-item:hover {
    transform: translateX(10px);
}

.experience-item:last-child {
    border-bottom: none;
}

.job-title {
    font-weight: 700;
    font-size: 1.2em;
    color: var(--accent-secondary);
    margin-bottom: 5px;
}

.company {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.dates {
    color: var(--accent-purple);
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 15px;
}

.achievements {
    padding-left: 25px;
}

.achievements li {
    margin-bottom: 12px;
    text-align: justify;
    position: relative;
    padding-left: 20px;
    transition: var(--transition-fast);
}

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

.achievements li:hover {
    color: var(--accent-secondary);
    transform: translateX(5px);
}

/* Skills */
.skill-category {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 3px solid var(--accent-primary);
    transition: var(--transition-fast);
}

.skill-category:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-left: 3px solid var(--accent-secondary);
}

.skill-category strong {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-primary);
    font-size: 1.1em;
}

/* Animations */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes shine {
    0%, 100% { transform: rotate(45deg) translateX(-100%); }
    50% { transform: rotate(45deg) translateX(100%); }
}

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

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

@keyframes expandLine {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(2px, 2px); }
    50% { transform: translate(0, 4px); }
    75% { transform: translate(-2px, 2px); }
}

/* Hover Glow Effects */
.glow-on-hover {
    transition: var(--transition-fast);
}

.glow-on-hover:hover {
    box-shadow: 0 0 15px rgba(79, 216, 217, 0.3);
    filter: brightness(1.05);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .resume-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .header {
        padding: 30px;
    }
    
    .name {
        font-size: 2.5em;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .header {
        padding: 25px;
    }

    .header-logos {
        gap: 20px;
        flex-direction: column;
    }
    
    .name {
        font-size: 2em;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-item {
        justify-content: center;
    }
}

@media print {
    body {
        padding: 0;
        background: white;
    }
    
    .header {
        background: #2c3e50 !important;
        color: white !important;
    }
    
    .sidebar, .section {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Certificate Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-glow);
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.modal-content h3 {
    color: var(--accent-primary);
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    transition: var(--transition-fast);
}

.close:hover,
.close:focus {
    color: var(--accent-primary);
    transform: scale(1.1);
}

.modal-body {
    margin-top: 30px;
}

.certificate-detail {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 3px solid var(--accent-primary);
    transition: var(--transition-fast);
}

.certificate-detail:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.certificate-detail strong {
    display: block;
    color: var(--accent-secondary);
    margin-bottom: 5px;
}

.certificate-item {
    cursor: pointer;
    padding: 10px;
    margin: 5px 0;
    border-radius: 8px;
    transition: var(--transition-fast);
    background: rgba(255, 255, 255, 0.05);
}

.certificate-item:hover {
    background: rgba(79, 216, 217, 0.2);
    transform: translateX(5px);
    box-shadow: 0 0 10px rgba(79, 216, 217, 0.3);
}

/* Animations for modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .modal-content h3 {
        font-size: 1.5em;
    }
    
    .close {
        top: 15px;
        right: 15px;
        font-size: 24px;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

/* Footer Styles */
.footer {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-glow);
    margin-top: 20px;
    padding: 30px;
    transition: var(--transition-fast);
    opacity: 0;
    transform: translateY(30px);
    animation: slideIn 0.8s ease-out 1s forwards;
}

.footer:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 216, 217, 0.25);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section h4 {
    color: var(--accent-primary);
    font-size: 1.2em;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-start);
    border-radius: 2px;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9em;
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 216, 217, 0.3);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-secondary);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(86, 212, 159, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px) scale(1.05);
}

/* Video Grid Styles */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.video-card {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid var(--border-glow);
    padding: 20px;
    transition: var(--transition-fast);
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.6s ease-out forwards;
    box-shadow: var(--shadow-glow);
}

.video-card:nth-child(1) { animation-delay: 1.1s; }
.video-card:nth-child(2) { animation-delay: 1.3s; }
.video-card:nth-child(3) { animation-delay: 1.5s; }
.video-card:nth-child(4) { animation-delay: 1.7s; }

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 216, 217, 0.3);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(79, 216, 217, 0.1);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    object-fit: cover;
}

.video-container video {
    object-fit: cover;
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(79, 216, 217, 0.1), transparent);
    animation: shine 3s infinite;
    pointer-events: none;
}

.video-card h4 {
    color: var(--accent-primary);
    font-size: 1.2em;
    margin-bottom: 10px;
}

.video-card p {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.5;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    margin-top: 20px;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid var(--border-glow);
    padding: 20px;
    box-shadow: var(--shadow-glow);
}

.carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
}

.carousel-slide.active {
    opacity: 1;
}

.image-container {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(79, 216, 217, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.05);
}

.carousel-content {
    padding: 20px;
    text-align: center;
}

.carousel-content h4 {
    color: var(--accent-primary);
    font-size: 1.4em;
    margin-bottom: 10px;
}

.carousel-content p {
    color: var(--text-secondary);
    font-size: 1em;
    line-height: 1.6;
}

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(79, 216, 217, 0.2);
    color: var(--accent-primary);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: rgba(79, 216, 217, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--accent-primary);
    transform: scale(1.2);
}

.indicator:hover {
    background: var(--accent-secondary);
}

/* Responsive Carousel */
@media (max-width: 768px) {
    .carousel {
        height: 400px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .carousel-content h4 {
        font-size: 1.2em;
    }
    
    .carousel-content p {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        padding: 15px;
    }
    
    .carousel {
        height: 350px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
    
    .carousel-content {
        padding: 15px;
    }
    
    .carousel-content h4 {
        font-size: 1.1em;
    }
    
    .carousel-content p {
        font-size: 0.8em;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

/* Responsive Video Grid */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        gap: 15px;
    }
    
    .video-card {
        padding: 12px;
    }
    
    .video-card h4 {
        font-size: 1.1em;
    }
}
