:root {
    --primary: #00f0ff;
    --secondary: #ff00f0;
    --dark: #0a0a0f;
    --light: #f0f0f0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
}

body.light-mode {
    background-color: #f5f5f5;
    color: #333;
    --primary: #0077ff;
    --secondary: #ff5500;
    --dark: #f5f5f5;
    --light: #333;
}

.neon-text {
    text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary), 0 0 20px var(--primary);
}

.light-mode .neon-text {
    text-shadow: none;
    color: var(--primary);
}

.neon-border {
    box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary), inset 0 0 5px var(--primary);
}

.light-mode .neon-border {
    box-shadow: 0 0 0 1px var(--primary);
}

.neon-hover:hover {
    text-shadow: 0 0 5px var(--secondary), 0 0 10px var(--secondary);
    transition: all 0.3s ease;
}

.light-mode .neon-hover:hover {
    text-shadow: none;
    color: var(--secondary);
}

.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
    }
    to {
        box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 30px var(--primary);
    }
}

.light-mode .glow {
    animation: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.avatar {
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px var(--primary), inset 0 0 10px var(--primary);
}

.light-mode .avatar {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skill-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 8px;
    border-radius: 4px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border-radius: 50%;
    left: -10px;
    top: 0;
    box-shadow: 0 0 10px var(--primary);
}

.light-mode .timeline-item::before {
    box-shadow: none;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.3);
}

.light-mode .project-card:hover {
    box-shadow: 0 10px 20px rgba(0, 119, 255, 0.2);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background-color: var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Language switch styles */
.language-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.language-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.language-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
}

.language-slider:before {
    position: absolute;
    content: "VI";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

input:checked + .language-slider {
    background-color: #2196F3;
}

input:checked + .language-slider:before {
    content: "EN";
    transform: translateX(30px);
}

.language-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Adjust spacing between elements */
}

.flag-icon {
    width: 40px; /* Ensure consistent size */
    height: auto;
}

.language-switch {
    display: flex;
    align-items: center;
    position: relative;
}

.contact-wrapper {
    position: relative;
    padding: 100px 0;
    background-color: #212529;
    overflow: hidden;
}

#particles-js2 {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.txt-bg {
    position: relative;
    z-index: 2;
}

.txt-bg-contact {
    margin-bottom: 50px;
}

.text-custom {
    color: #007bff;
}

.pointer {
    cursor: pointer;
}

.contact-links {
    color: #f8f9fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-links:hover {
    color: #007bff;
}

.contact-card {
    background: rgba(33, 37, 41, 0.8);
    border-radius: 10px;
    padding: 30px 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Grid lines background */
.grid-lines {
    background-image: linear-gradient(#0f172a 1px, transparent 1px), 
                      linear-gradient(90deg, #0f172a 1px, transparent 1px);
    background-size: 20px 20px;
    width: 100%;
    height: 100%;
    opacity: 0.2;
    position: absolute;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(20px);
    }
}

/* Neon text effect */
.neon-text {
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.7),
                 0 0 10px rgba(0, 255, 255, 0.5),
                 0 0 15px rgba(0, 255, 255, 0.3);
    color: #00FFFF;
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #00FFFF; }
}

/* Cyberpunk style panels */
.cyberpunk-panel {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid #00FFFF;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    position: relative;
    padding: 1.5rem;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.cyberpunk-panel::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    background: linear-gradient(45deg, 
        transparent 20%, 
        rgba(0, 255, 255, 0.8) 40%, 
        rgba(0, 255, 255, 0.8) 60%, 
        transparent 80%);
    background-size: 200% 200%;
    z-index: -1;
    animation: borderglow 6s linear infinite;
}

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

/* Skill heading style */
.skill-heading {
    color: #00FFFF;
    font-weight: bold;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-left: 15px;
}

.skill-heading::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #00DDFF;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Skill icon wrapper */
.skill-icon-wrapper {
    transition: all 0.3s ease;
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.skill-icon-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 255, 255, 0.1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.skill-icon-wrapper:hover::before {
    transform: scaleX(1);
}

.skill-icon-wrapper:hover {
    transform: translateY(-5px);
}

.skill-icon-wrapper img {
    transition: all 0.3s ease;
    filter: grayscale(50%);
    max-height: 50px;
    margin: 0 auto 5px;
}

.skill-icon-wrapper:hover img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.skill-name {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #ccc;
    transition: color 0.3s ease;
}

.skill-icon-wrapper:hover .skill-name {
    color: #00FFFF;
}

/* Certificate cards */
.cert-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cert-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(225deg, transparent 40%, rgba(0, 255, 255, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.3);
}

.cert-card:hover::after {
    opacity: 1;
}

.cert-img {
    transition: all 0.3s ease;
    filter: grayscale(50%);
}

.cert-card:hover .cert-img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

@keyframes headingGlow {
    0%, 100% { opacity: 0.5; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1.1); }
}

/* Make card containers more futuristic */
.skill-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.skill-card {
    position: relative;
    transition: all 0.5s ease;
}

.skill-card:hover {
    transform: scale(1.02);
}

.skill-card:before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    height: 10px;
    width: 20%;
    background-color: #00FFFF;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

.skill-card:after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    height: 10px;
    width: 20%;
    background-color: #FF00FF;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Icons row */
.skill-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.heart {
    display: inline-block;
    animation: heartbeat 1.2s infinite;
  }
  
  @keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
  }
