/**
 * Custom CSS for Portfolio Enhancements - Version 2
 * Maintains Hyperbolic theme consistency
 */

/* ========================================
   Mobile Menu - Hide hamburger menu
   ======================================== */

/* Hide mobile hamburger menu button */
#header > .navPanelToggle {
    display: none !important;
}

/* Hide mobile navigation panel */
#navPanel {
    display: none !important;
}

/* ========================================
   Language Toggle - Modern Switch
   ======================================== */

/* Navigation layout with toggle on right */
#nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-text {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.075em;
}

/* The switch - the box around the slider */
.switch {
    font-size: 14px;
    position: relative;
    display: inline-block;
    width: 3.5em;
    height: 2em;
    top: 0.05rem;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #9fccfa;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slider:before {
    position: absolute;
    content: "";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2em;
    width: 2em;
    inset: 0;
    background-color: white;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.switch input:checked + .slider {
    background: #0974f1;
}

.switch input:focus + .slider {
    box-shadow: 0 0 1px #0974f1;
}

.switch input:checked + .slider:before {
    transform: translateX(1.6em);
}

/* ========================================
   Who I Am Section
   ======================================== */

.who-section {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin: 2rem 0;
}

.who-content {
    flex: 1;
}

.who-image {
    flex: 0 0 350px;
    position: relative;
}

.who-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.who-image img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.who-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #4797ec;
    font-weight: 300;
}

.who-content p {
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.8);
    font-size: 1.05rem;
}

@media screen and (max-width: 980px) {
    .who-section {
        flex-direction: column;
        gap: 2rem;
    }

    .who-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
    }
}

/* ========================================
   Individual Collapsible Timeline Items
   ======================================== */

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem 0;
}

/* Timeline center line */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #4797ec 0%, #884beb 100%);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

/* Alternate left and right */
.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: calc(50% - 2.5rem);
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(71, 151, 236, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-expand-icon {
    font-size: 1rem;
    color: #4797ec;
    transition: transform 0.3s ease;
}

.timeline-item.expanded .timeline-expand-icon {
    transform: rotate(180deg);
}

.timeline-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.timeline-item.expanded .timeline-details {
    max-height: 500px;
    margin-top: 1rem;
}

/* Timeline icon */
.timeline-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4797ec, #884beb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    z-index: 3;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    color: #4797ec;
    font-size: 1.5rem;
    font-weight: 300;
}

.timeline-years {
    display: inline-block;
    background: linear-gradient(135deg, #4797ec, #884beb);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    letter-spacing: 0.05em;
}

.timeline-content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Mobile timeline */
@media screen and (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: row;
    }

    .timeline-content {
        width: calc(100% - 80px);
        margin-left: auto;
    }

    .timeline-icon {
        left: 30px;
    }
}

/* ========================================
   Certifications with Image Support
   ======================================== */

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.cert-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Badge links */
.cert-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.cert-link:hover {
    color: inherit;
}

.cert-link h3 {
    margin-top: 1rem;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4797ec, #884beb);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.cert-card:hover::before {
    transform: scaleX(1);
}

.cert-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(71, 151, 236, 0.3);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.cert-image {
    width: 100%;
    max-width: 180px;
    height: auto;
    margin: 0 auto 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cert-card:hover .cert-image {
    transform: scale(1.05);
}

/* Certification date styling */
.cert-date {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.cert-date i {
    margin-right: 0.4rem;
    color: #4797ec;
}

/* Certification renewal badge */
.cert-renewal {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #4ade80;
    font-weight: 500;
}

.cert-renewal i {
    margin-right: 0.4rem;
}

/* ========================================
   Revamped Core Skills Section
   ======================================== */

.skills-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.skill-card {
    background: linear-gradient(135deg, rgba(71, 151, 236, 0.15), rgba(136, 75, 235, 0.15));
    border: 1px solid rgba(71, 151, 236, 0.3);
    border-radius: 12px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(71, 151, 236, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.skill-card:hover {
    border-color: rgba(71, 151, 236, 0.6);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(71, 151, 236, 0.4);
    background: linear-gradient(135deg, rgba(71, 151, 236, 0.25), rgba(136, 75, 235, 0.25));
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.skill-icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4797ec, #884beb);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.skill-card:hover .skill-icon-wrapper {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 8px 20px rgba(71, 151, 236, 0.4);
}

.skill-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 400;
    color: #ffffff;
}

.skill-description {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin: 0;
    position: relative;
    z-index: 1;
}

@media screen and (max-width: 980px) {
    .skills-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media screen and (max-width: 736px) {
    .skills-showcase {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ========================================
   DevOps Journey - Progress Bar Style
   ======================================== */

.devops-journey {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 3rem 2rem;
    background: transparent;
    border-radius: 0;
    border: none;
}

.journey-path {
    position: relative;
    padding: 2rem 0;
}

/* Progress bar background */
.journey-progress-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    transform: translateY(-50%);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Progress bar fill */
.journey-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #4797ec 0%, #884beb 100%);
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 0 20px rgba(71, 151, 236, 0.5);
}

/* Skill stages container */
.journey-stages {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.journey-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Add more space to the last stage (Automation) */
.journey-stage:last-child {
    flex: 1.2;
}

.stage-marker {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 3px solid rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    margin-bottom: 1rem;
    position: relative;
}

.stage-marker::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #4797ec, #884beb);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.journey-stage.completed .stage-marker,
.journey-stage.current .stage-marker {
    background: linear-gradient(135deg, #4797ec, #884beb);
    border-color: #4797ec;
    color: white;
    box-shadow: 0 0 20px rgba(71, 151, 236, 0.6);
}

.journey-stage.current .stage-marker {
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(71, 151, 236, 0.6);
    }
    50% {
        box-shadow: 0 0 30px rgba(71, 151, 236, 0.9), 0 0 40px rgba(136, 75, 235, 0.6);
    }
}

.stage-label {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.journey-stage.completed .stage-label,
.journey-stage.current .stage-label {
    color: #4797ec;
}

.stage-status {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.5);
    font-style: italic;
    font-weight: 600;
}

.journey-stage.completed .stage-status {
    color: #4ade80;
}

.journey-stage.current .stage-status {
    color: #fbbf24;
}

/* Journey legend */
.journey-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(0, 0, 0, 0.7);
    font-size: 0.9rem;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-dot.completed {
    background: linear-gradient(135deg, #4797ec, #884beb);
    box-shadow: 0 0 10px rgba(71, 151, 236, 0.5);
}

.legend-dot.upcoming {
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.2);
}

/* Mobile DevOps Journey */
@media screen and (max-width: 768px) {
    .journey-stages {
        flex-direction: column;
        gap: 2rem;
    }

    .journey-progress-bg {
        width: 8px;
        height: 100%;
        left: 25px;
        top: 0;
        transform: none;
    }

    .journey-progress-fill {
        width: 8px !important;
        height: 20%;
    }

    .journey-stage {
        flex-direction: row;
        align-items: center;
        text-align: left;
        width: 100%;
    }

    .stage-marker {
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .stage-info {
        flex: 1;
    }

    .journey-legend {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ========================================
   Dark Section Color Fixes
   ======================================== */

.wrapper.style2 .timeline-content,
.wrapper.style2 .cert-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.wrapper.style2 .timeline-content:hover,
.wrapper.style2 .cert-card:hover {
    background: rgba(0, 0, 0, 0.3);
}

.wrapper.style1 .skill-card {
    background: linear-gradient(135deg, rgba(71, 151, 236, 0.15), rgba(136, 75, 235, 0.15));
    border-color: rgba(71, 151, 236, 0.3);
}

.wrapper.style1 .skill-card:hover {
    background: linear-gradient(135deg, rgba(71, 151, 236, 0.25), rgba(136, 75, 235, 0.25));
    border-color: rgba(71, 151, 236, 0.6);
}

/* Ensure text visibility on white backgrounds */
.wrapper.style1 .skill-description {
    color: rgba(0, 0, 0, 0.8);
}

.wrapper.style1 .skill-title {
    color: #000000;
}

/* ========================================
   Responsive Design
   ======================================== */

@media screen and (max-width: 980px) {
    .certifications-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.5rem;
    }

    .language-toggle {
        margin-left: 0.5rem;
    }

    .devops-journey {
        padding: 2rem 1rem;
    }
}

@media screen and (max-width: 736px) {
    .certifications-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding: 1rem 0;
    }

    .timeline-content {
        padding: 1rem;
    }

    .language-toggle {
        padding: 0.2rem;
    }

    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   Smooth Animations
   ======================================== */

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

.timeline-item,
.cert-card,
.skill-card,
.journey-stage {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.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; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }

/* Disable animations on preload */
body.is-preload .timeline-item,
body.is-preload .cert-card,
body.is-preload .skill-card,
body.is-preload .journey-stage {
    animation: none;
}
