/* Modern Portfolio Improvements */

/* Skip to Main Content Link */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background: var(--primary-gradient);
    color: #0a0a0a;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--hover-glow);
}

.skip-to-main:focus {
    left: 0;
    top: 0;
}

/* Focus Visible Styles */
.focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px var(--hover-glow);
}

/* Updated Color Scheme - Vibrant Cyan/Teal for Dark Backgrounds */
:root {
    --primary-gradient: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
    --primary-color: #00d4ff;
    --secondary-color: #00a8cc;
    --accent-color: #00ffcc;
    --hover-glow: rgba(0, 212, 255, 0.3);
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-light: #eee;
}

/* Better Typography */
body {
    font-size: 16px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Modern Header Photo */
.header-photo {
    position: relative;
    width: 180px;
    margin: 0 auto 30px;
    z-index: 1;
}

.header-photo img {
    border: 4px solid transparent;
    background: var(--primary-gradient);
    border-radius: 50%;
    box-shadow: 0 10px 30px var(--hover-glow), 0 0 40px rgba(0, 212, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-photo:hover img {
    transform: scale(1.05);
    box-shadow: 0 15px 40px var(--hover-glow), 0 0 60px rgba(0, 212, 255, 0.4);
}

.header-photo:after {
    display: none;
}

/* Tagline Style */
.tagline {
    font-size: 13px;
    color: #aaa;
    margin-top: 8px;
    font-weight: 300;
}

/* Modern Skill Tags */
.skill-tags {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.skill-tag.expert {
    background: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
    color: #0a0a0a;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--hover-glow), 0 0 20px rgba(0, 212, 255, 0.2);
}

.skill-tag.advanced {
    background: linear-gradient(135deg, #00ffcc 0%, #00d4aa 100%);
    color: #0a0a0a;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.3), 0 0 20px rgba(0, 255, 204, 0.15);
}

.skill-tag.intermediate {
    background: linear-gradient(135deg, #5eead4 0%, #14b8a6 100%);
    color: #0a0a0a;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(94, 234, 212, 0.3), 0 0 20px rgba(94, 234, 212, 0.15);
}

.skill-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px var(--hover-glow), 0 0 30px rgba(0, 212, 255, 0.3);
}

/* Gradient Buttons */
.btn-primary, button, input[type=submit] {
    background: var(--primary-gradient);
    border: none;
    color: #0a0a0a;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--hover-glow), 0 0 20px rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover, button:hover, input[type=submit]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--hover-glow), 0 0 40px rgba(0, 212, 255, 0.4);
    background: linear-gradient(135deg, #00ffcc 0%, #00d4ff 100%);
}

/* Modern Cards for Timeline */
.timeline-item {
    background: rgba(0, 212, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.timeline-item:hover {
    background: rgba(0, 212, 255, 0.06);
    transform: translateX(5px);
    box-shadow: -4px 0 0 0 var(--primary-color), 0 5px 20px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
}

/* Enhanced Social Links */
.social-links ul li a {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 20px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.social-links ul li a:hover {
    background: var(--primary-gradient);
    color: #0a0a0a;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px var(--hover-glow), 0 0 25px rgba(0, 212, 255, 0.3);
    border-color: var(--primary-color);
}

/* Page Title Enhancement */
.page-title h2 {
    color: var(--primary-color);
    text-shadow: 0 0 30px var(--hover-glow);
}

/* Certificate Cards */
.certificate-item {
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
    background: rgba(0, 212, 255, 0.02);
}

.certificate-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--hover-glow), 0 0 40px rgba(0, 212, 255, 0.2);
}

.certi-logo {
    background: rgba(0, 212, 255, 0.1);
}

/* Info Blocks Enhancement */
.lm-info-block, .info-block-w-icon {
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
    background: rgba(0, 212, 255, 0.02);
}

.lm-info-block:hover, .info-block-w-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--hover-glow);
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 212, 255, 0.05);
}

.lm-info-block i, .info-block-w-icon i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px var(--hover-glow));
}

/* Form Improvements */
.form-control:focus ~ .form-control-border {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--hover-glow), 0 0 20px rgba(0, 212, 255, 0.1);
}

.form-group label {
    font-weight: 500;
}

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

.animated-section.section-active .timeline-item,
.animated-section.section-active .certificate-item,
.animated-section.section-active .lm-info-block {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Loading State */
.preloader-spinner {
    background: var(--primary-gradient);
    box-shadow: 0 0 40px var(--hover-glow);
}

/* Accessibility Improvements */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--hover-glow);
}

/* Better Contrast */
.item-company, .item-period {
    color: #bbb;
}

/* Mobile Optimizations */
@media only screen and (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    .skill-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .header-photo {
        width: 150px;
    }
    
    .social-links ul li a {
        width: 44px;
        height: 44px;
        line-height: 44px;
        font-size: 18px;
    }
    
    .resume-adaptive-layout {
        flex-direction: column !important;
    }
    
    .resume-left-column,
    .resume-right-column {
        flex: 1 1 100% !important;
        padding: 0 !important;
    }
}

/* Lazy Load Images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Enhanced Menu */
ul.main-menu a.active {
    background: var(--primary-gradient);
    color: #0a0a0a;
    border-radius: 10px;
    box-shadow: 0 0 20px var(--hover-glow);
    font-weight: 600;
}

/* Better Scrollbar */
.ps > .ps__scrollbar-y-rail > .ps__scrollbar-y {
    background: var(--primary-gradient);
    box-shadow: 0 0 10px var(--hover-glow);
}

/* Improved Block Titles */
.block-title h3 span {
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--hover-glow);
}

/* Enhanced Knowledges Tags */
.knowledges li {
    background: var(--primary-gradient);
    color: #0a0a0a;
    font-weight: 600;
    box-shadow: 0 2px 8px var(--hover-glow), 0 0 15px rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.knowledges li:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px var(--hover-glow), 0 0 25px rgba(0, 212, 255, 0.3);
}

/* Skills Section Layout Fixes */
.col-xs-12.col-sm-5 .block-title {
    margin-bottom: 20px;
    margin-top: 0;
}

.col-xs-12.col-sm-5 .block-title:first-child {
    margin-top: 0;
}

.col-xs-12.col-sm-5 .white-space-10 {
    height: 25px;
    margin: 25px 0;
}

.skill-tags {
    margin-bottom: 25px;
    padding: 0;
}

.knowledges {
    margin-bottom: 25px;
    padding: 0;
}

/* Consistent spacing for all skill sections */
.col-xs-12.col-sm-5 > div:not(:last-child) {
    margin-bottom: 25px;
}

/* Remove extra spacing from last elements */
.col-xs-12.col-sm-5 > div:last-child .knowledges,
.col-xs-12.col-sm-5 > div:last-child .skill-tags {
    margin-bottom: 0;
}

/* Ensure consistent block title spacing */
.block-title h3 {
    margin-bottom: 15px;
    margin-top: 0;
}

/* Adaptive Resume Layout - Override Bootstrap */
.resume-adaptive-layout {
    display: flex !important;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
}

.resume-left-column {
    flex: 1 1 60% !important;
    min-width: 300px;
    width: auto !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 15px !important;
}

.resume-right-column {
    flex: 0 0 35% !important;
    min-width: 300px;
    width: auto !important;
    float: none !important;
    padding-left: 15px !important;
    padding-right: 0 !important;
}

.resume-full-width {
    flex: 1 1 100% !important;
    width: 100% !important;
    margin-top: 30px;
}

/* Mobile responsive */
@media only screen and (max-width: 768px) {
    .col-xs-12.col-sm-5 .white-space-10 {
        height: 20px;
        margin: 20px 0;
    }
    
    .col-xs-12.col-sm-5 .block-title {
        margin-bottom: 15px;
    }
    
    .skill-tags,
    .knowledges {
        margin-bottom: 20px;
    }
}col-xs-12.col-sm-5 > div:not(:last-child) {
    margin-bottom: 25px;
}

/* Remove extra spacing from last elements */
.col-xs-12.col-sm-5 > div:last-child .knowledges,
.col-xs-12.col-sm-5 > div:last-child .skill-tags {
    margin-bottom: 0;
}

/* Ensure consistent block title spacing */
.block-title h3 {
    margin-bottom: 15px;
    margin-top: 0;
}

/* Adaptive Layout for Resume Section */
.resume-adaptive-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.resume-left-column {
    flex: 1;
    min-width: 300px;
}

.resume-right-column {
    flex: 0 0 350px;
    min-width: 300px;
}

.resume-full-width {
    flex: 1 1 100%;
    width: 100%;
}

/* Mobile responsive spacing */
@media only screen and (max-width: 768px) {
    .resume-adaptive-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .resume-left-column,
    .resume-right-column {
        flex: 1 1 100%;
        min-width: auto;
    }
    
    .col-xs-12.col-sm-5 .white-space-10 {
        height: 20px;
        margin: 20px 0;
    }
    
    .col-xs-12.col-sm-5 .block-title {
        margin-bottom: 15px;
    }
    
    .skill-tags,
    .knowledges {
        margin-bottom: 20px;
    }
}ol-xs-12.col-sm-5 > div:not(:last-child) {
    margin-bottom: 25px;
}

/* Remove extra spacing from last elements */
.col-xs-12.col-sm-5 > div:last-child .knowledges,
.col-xs-12.col-sm-5 > div:last-child .skill-tags {
    margin-bottom: 0;
}

/* Ensure consistent block title spacing */
.block-title h3 {
    margin-bottom: 15px;
    margin-top: 0;
}

/* Mobile responsive spacing */
@media only screen and (max-width: 768px) {
    .col-xs-12.col-sm-5 .white-space-10 {
        height: 5px;
        margin: 20px 0;
    }
    
    .col-xs-12.col-sm-5 .block-title {
        margin-bottom: 15px;
    }
    
    .skill-tags,
    .knowledges {
        margin-bottom: 20px;
    }
}
