:root {
    --primary-color: #00ffff;
    --secondary-color: #ff00ff;
    --bg-dark: #0a0a0a;
    --bg-light: #f0f0f5;
    --text-dark: #e0e0e0;
    --text-light: #333333;
    --shadow-glow: 0 0 12px var(--primary-color), 0 0 20px rgba(0, 255, 255, 0.5);
    --shadow-glow-light: 0 0 12px #0077b6, 0 0 20px rgba(0, 119, 182, 0.5);
    --bg-color: var(--bg-dark);
    --text-color: var(--text-dark);
    --section-bg: rgba(0, 0, 0, 0.45);
    --item-bg: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
    --bg-color: var(--bg-light);
    --text-color: var(--text-light);
    --section-bg: rgba(255, 255, 255, 0.9);
    --item-bg: rgba(0, 0, 0, 0.05);
    --shadow-glow: var(--shadow-glow-light);
    --primary-color: #0077b6;
    --secondary-color: #ff0066;
    --text-dark: #1a1a1a;
}

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

body {
    font-family: 'Roboto Mono', monospace;
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
    line-height: 1.7;
    transition: background 0.3s, color 0.3s;
    font-size: clamp(14px, 2.5vw, 16px);
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: clamp(50px, 8vw, 70px);
    height: clamp(50px, 8vw, 70px);
    border: 5px solid transparent;
    border-top: 5px solid var(--primary-color);
    border-right: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1.2s linear infinite, neon-pulse 2s ease-in-out infinite;
    position: relative;
}

.loader-percentage {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    font-size: clamp(0.8rem, 2vw, 1rem);
    text-shadow: var(--shadow-glow);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(180deg, var(--bg-color), rgba(0, 255, 255, 0.25));
    filter: blur(1.5px);
}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1200;
    transition: width 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.progress-circle {
    position: fixed;
    top: clamp(10px, 2vw, 15px);
    right: clamp(5px, 2vw, 10px);
    width: clamp(20px, 5vw, 30px);
    height: clamp(20px, 5vw, 30px);
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0%, transparent 0%);
    z-index: 1200;
    animation: pulse 2s ease-in-out infinite;
}

.progress-circle::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--section-bg);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-circle:hover::after {
    opacity: 1;
}

header {
    position: relative;
    padding: clamp(60px, 15vw, 140px) clamp(10px, 3vw, 20px);
    text-align: center;
    z-index: 10;
    overflow: hidden;
    background-image: url('https://images.pexels.com/photos/109669/neon-sign/pexels-photo-109669.jpeg?auto=compress&cs=tinysrgb&w=1920&h=1080');
    background-size: cover;
    background-position: center;
}

header video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    z-index: -1;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 255, 255, 0.15));
    z-index: -1;
    animation: overlay-pulse 10s ease-in-out infinite;
}

header.scrolled {
    padding: clamp(40px, 10vw, 60px) clamp(10px, 3vw, 20px);
    box-shadow: var(--shadow-glow);
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.pexels.com/photos/109669/neon-sign/pexels-photo-109669.jpeg?auto=compress&cs=tinysrgb&w=1920&h=1080');
}

@keyframes overlay-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.8; }
    100% { opacity: 0.6; }
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: var(--shadow-glow);
    animation: glitch 1.5s ease-in-out infinite;
}

header.scrolled h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

header p {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--primary-color);
    margin: clamp(15px, 4vw, 30px) 0 0;
    overflow: hidden;
    white-space: nowrap;
    border-right: 0.15em solid var(--primary-color);
    width: 0;
    animation: typing 4s steps(40, end) forwards, blink-caret 0.75s step-end infinite;
}

header.scrolled p {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
}

@keyframes glitch {
    0% { transform: translate(0); text-shadow: var(--shadow-glow); }
    20% { transform: translate(-4px, 4px); text-shadow: 0 0 25px var(--secondary-color); }
    40% { transform: translate(4px, -4px); }
    60% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); text-shadow: var(--shadow-glow); }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

nav {
    background: var(--section-bg);
    padding: clamp(10px, 3vw, 20px);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-glow);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(10px, 2vw, 15px);
}

nav a {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    text-decoration: none;
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    padding: clamp(5px, 1vw, 10px);
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

nav a::after, #sidebar a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: left 0.3s ease;
}

nav a:hover, #sidebar a:hover {
    color: #ffffff;
    text-shadow: var(--shadow-glow);
    transform: scale(1.05) translateY(-4px);
}

nav a:hover::after, #sidebar a:hover::after {
    left: 0;
}

.section-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--secondary-color), transparent);
    margin: clamp(20px, 5vw, 40px) 0;
    animation: neon-divider 3s ease-in-out infinite;
}

@keyframes neon-divider {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

section {
    max-width: 1200px;
    margin: clamp(40px, 10vw, 80px) auto;
    padding: clamp(20px, 5vw, 50px);
    background: var(--section-bg);
    border-radius: clamp(10px, 2vw, 20px);
    box-shadow: var(--shadow-glow);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.3s ease, background 0.5s ease;
    position: relative;
    z-index: 1;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Ccircle cx="50" cy="50" r="3" fill="%2300ffff" fill-opacity="0.15"/%3E%3C/svg%3E');
    background-size: clamp(40px, 10vw, 60px);
}

section.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

section:hover .item {
    opacity: 0.95;
    transform: scale(1.04);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

section.visible .item, section.visible ul li {
    animation: slide-in 0.5s ease-in-out forwards;
}

@keyframes slide-in {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: var(--shadow-glow);
    margin-bottom: clamp(20px, 5vw, 40px);
    white-space: normal; /* Allow text to wrap */
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis for overflow text */
    max-width: 100%; /* Prevent overflow */
}

h2.flicker {
    animation: neon-flicker 0.5s ease-in-out 3;
}

@keyframes neon-flicker {
    0%, 100% { text-shadow: var(--shadow-glow); }
    50% { text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--secondary-color); }
}

.item {
    margin-bottom: clamp(20px, 5vw, 40px);
    padding: clamp(15px, 4vw, 30px);
    background: var(--item-bg);
    border-radius: clamp(8px, 2vw, 12px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s, opacity 0.4s;
    opacity: 0;
    transform: translateY(20px);
    backdrop-filter: blur(6px);
    position: relative;
    overflow: hidden;
}

section.visible .item {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(0.3s * var(--item-index));
}

.item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    opacity: 1;
}

.item::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: clamp(8px, 2vw, 15px);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.4;
    transition: opacity 0.3s;
    animation: neon-pulse 4s ease-in-out infinite;
}

.item:hover::before {
    opacity: 0.8;
}

.item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.item:hover::after {
    left: 100%;
}

.item h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 clamp(8px, 2vw, 15px);
}

.item p {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: var(--text-color);
    margin: clamp(5px, 1.5vw, 8px) 0;
    word-wrap: break-word;
}

ul {
    list-style: none;
    padding: 0;
}

ul li {
    margin-bottom: clamp(8px, 2vw, 15px);
    padding-left: clamp(20px, 5vw, 35px);
    position: relative;
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    color: var(--text-color);
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

section.visible ul li {
    opacity: 1;
    transform: translateX(0);
    transition-delay: calc(0.15s * var(--li-index));
}

ul li::before {
    content: '>>';
    position: absolute;
    left: 5px;
    color: var(--primary-color);
    font-weight: 700;
    animation: blink 1.3s ease-in-out infinite;
}

@keyframes blink {
    50% { opacity: 0.5; }
}

.timeline {
    position: relative;
    padding: clamp(20px, 5vw, 40px) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: clamp(10px, 3vw, 30px);
    height: 100%;
    width: 6px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    box-shadow: var(--shadow-glow);
}

.timeline-item {
    position: relative;
    margin-bottom: clamp(30px, 8vw, 60px);
    padding-left: clamp(40px, 10vw, 70px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: clamp(5px, 2vw, 22px);
    top: clamp(8px, 2vw, 15px);
    width: clamp(12px, 3vw, 18px);
    height: clamp(12px, 3vw, 18px);
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: var(--shadow-glow);
    animation: neon-pulse 1.5s ease-in-out infinite;
}

.timeline-item.visible::before {
    transform: scale(1.5);
}

.timeline-item:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px var(--primary-color);
}

.skill-category {
    margin-bottom: clamp(20px, 5vw, 35px);
    position: relative;
}

.skill-category.hidden {
    display: none;
}

.skill-category h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: var(--primary-color);
    margin-bottom: clamp(10px, 3vw, 20px);
    cursor: pointer;
    transition: color 0.3s, text-shadow 0.3s, transform 0.3s;
    position: relative;
    z-index: 2;
    padding-left: clamp(20px, 5vw, 30px);
}

.skill-category h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(15px, 4vw, 20px);
    height: clamp(15px, 4vw, 20px);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    background: transparent;
    transition: background 0.3s ease;
}

.skill-category.active h4::before {
    background: radial-gradient(circle, var(--primary-color) 50%, transparent 50%);
}

.skill-category h4:hover, .skill-category.active h4 {
    color: #ffffff;
    text-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.skill-category ul {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, max-height 0.5s ease;
}

.skill-category.active ul {
    display: block;
    opacity: 1;
    max-height: 1000px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap; /* Allow tags to wrap to the next line */
    gap: clamp(8px, 2vw, 12px); /* Space between tags */
    padding: 0;
    margin: 0;
}

.skills-list li {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--item-bg);
    padding: clamp(6px, 1.5vw, 10px) clamp(10px, 2.5vw, 25px); /* Reduced padding for tag-like look */
    border-radius: clamp(12px, 3vw, 16px); /* Rounded corners for tag appearance */
    color: var(--text-color);
    font-size: clamp(0.7rem, 1.8vw, 0.9rem);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, background 0.3s, opacity 0.3s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(6px);
    border: 1px solid var(--primary-color); /* Border to enhance tag appearance */
    white-space: nowrap; /* Prevent text wrapping within tags */
}

.skills-list li:hover {
    transform: scale(1.1);
    background: rgba(0, 255, 255, 0.3);
    box-shadow: var(--shadow-glow);
}

.skills-list li.hidden {
    display: none;
}

.skills-list li:hover .tooltip {
    opacity: 1;
    transform: translateY(0);
}

.skill-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px; /* Thinner progress bar for tags */
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0;
    transition: width 1s ease-in-out;
}

.skills-list li.visible .skill-progress {
    width: var(--proficiency);
}

.tooltip {
    position: absolute;
    top: clamp(-40px, -8vw, -50px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--section-bg);
    color: var(--text-color);
    padding: clamp(4px, 1.5vw, 8px) clamp(6px, 2vw, 12px);
    border-radius: clamp(4px, 1vw, 6px);
    font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10;
    box-shadow: var(--shadow-glow);
}

#skills-filter {
    display: block;
    width: 100%;
    max-width: clamp(300px, 80vw, 500px);
    margin: 0 auto clamp(15px, 4vw, 30px);
    padding: clamp(8px, 2.5vw, 15px);
    background: var(--item-bg);
    border-radius: clamp(8px, 2vw, 12px);
    color: var(--text-color);
    font-family: 'Roboto Mono', monospace;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    transition: box-shadow 0.3s;
    backdrop-filter: blur(6px);
    position: relative;
    z-index: 1;
}

#skills-filter::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: clamp(8px, 2vw, 15px);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.4;
    transition: opacity 0.3s;
    animation: neon-pulse 4s ease-in-out infinite;
}

#skills-filter:focus::before {
    opacity: 0.8;
}

#skills-filter:focus {
    outline: none;
    box-shadow: var(--shadow-glow);
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 3vw, 15px);
    background: var(--item-bg);
    padding: clamp(15px, 4vw, 30px);
    border-radius: clamp(8px, 2vw, 12px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s;
    backdrop-filter: blur(6px);
    position: relative;
    overflow: hidden;
}

.project-card img, .project-card video {
    width: 100%;
    max-height: clamp(120px, 25vw, 200px);
    object-fit: cover;
    border-radius: clamp(5px, 1.5vw, 8px);
    margin-bottom: clamp(8px, 2vw, 15px);
    transition: transform 0.5s ease;
}

.project-card:hover img, .project-card:hover video {
    transform: scale(1.1) rotate(2deg);
}

.project-card.visible {
    animation: rotate-in 0.5s ease-in-out;
}

@keyframes rotate-in {
    from { transform: translateY(20px) rotateY(10deg); }
    to { transform: translateY(0) rotateY(0deg); }
}

.project-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: clamp(8px, 2vw, 15px);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.4;
    transition: opacity 0.3s;
    animation: neon-pulse 4s ease-in-out infinite;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.project-card:hover::before {
    opacity: 0.8;
}

.project-card:hover::after {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-glow);
}

.project-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--text-color);
}

.project-card p {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    color: var(--text-color);
}

.project-card .tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 2vw, 12px);
    margin: clamp(8px, 2vw, 15px) 0;
}

.project-card .tech-stack span {
    background: rgba(0, 255, 255, 0.2);
    padding: clamp(5px, 1.5vw, 8px) clamp(10px, 2.5vw, 15px);
    border-radius: clamp(5px, 1.5vw, 8px);
    font-size: clamp(0.7rem, 1.8vw, 0.95rem);
    color: var(--text-color);
    transition: transform 0.3s;
}

.project-card .tech-stack span:hover {
    transform: scale(1.1);
}

.project-card a {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    text-decoration: none;
    font-size: clamp(0.8rem, 2vw, 1rem);
    transition: color 0.3s, text-shadow 0.3s;
    position: relative;
    overflow: hidden;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.project-card a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transition: left 0.3s ease;
}

.project-card a:hover::after {
    left: 0;
}

.project-card a:hover {
    color: #ffffff;
    text-shadow: var(--shadow-glow);
}

.project-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: clamp(0.8rem, 2vw, 1rem);
    padding: clamp(10px, 3vw, 20px);
    text-align: center;
    border-radius: clamp(8px, 2vw, 12px);
}

.project-card:hover .project-preview {
    opacity: 1;
}

.contact-button {
    position: fixed;
    bottom: clamp(60px, 15vw, 100px);
    right: clamp(10px, 3vw, 30px);
    padding: clamp(12px, 3vw, 18px);
    background: var(--item-bg);
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s, background 0.3s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 150;
    box-shadow: var(--shadow-glow);
    min-width: 44px;
    min-height: 44px;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.4;
    transition: opacity 0.3s;
    animation: neon-pulse 4s ease-in-out infinite;
}

.contact-button:hover::before {
    opacity: 0.8;
}

.contact-button:hover {
    background: rgba(0, 255, 255, 0.35);
    box-shadow: 0 0 30px var(--primary-color), 0 0 20px var(--secondary-color);
    transform: scale(1.2);
}

button{
    cursor: pointer;
}

.contact-button img {
    width: clamp(18px, 4vw, 22px);
    height: clamp(18px, 4vw, 22px);
    transition: transform 0.3s;
}

.contact-button:hover img {
    transform: rotate(360deg);
}

.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.contact-modal.active {
    display: flex;
}

.contact-modal-content {
    background: var(--section-bg);
    padding: clamp(20px, 5vw, 40px);
    border-radius: clamp(10px, 2vw, 20px);
    max-width: clamp(300px, 90vw, 500px);
    text-align: center;
    box-shadow: var(--shadow-glow);
    animation: zoomIn 0.5s ease;
    backdrop-filter: blur(12px);
    position: relative;
}

.contact-modal-content::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: clamp(10px, 2vw, 23px);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.4;
    transition: opacity 0.3s;
    animation: neon-pulse 4s ease-in-out infinite;
}

.contact-modal-content:hover::before {
    opacity: 0.8;
}

.contact-modal-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    color: var(--primary-color);
    margin-bottom: clamp(15px, 4vw, 30px);
    text-shadow: var(--shadow-glow);
}

.contact-modal-content p {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: var(--text-color);
    margin: clamp(8px, 2vw, 15px) 0;
}

.contact-modal-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(0.8rem, 2vw, 1rem);
    transition: color 0.3s, text-shadow 0.3s;
    position: relative;
    overflow: hidden;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.contact-modal-content a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transition: left 0.3s ease;
}

.contact-modal-content a:hover::after {
    left: 0;
}

.contact-modal-content a:hover {
    color: #ffffff;
    text-shadow: var(--shadow-glow);
}

.close-modal {
    position: absolute;
    top: clamp(10px, 3vw, 20px);
    right: clamp(10px, 3vw, 20px);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #ffffff;
    transform: rotate(90deg);
}

footer {
    text-align: center;
    padding: clamp(20px, 5vw, 50px) clamp(10px, 3vw, 20px);
    background: var(--section-bg);
    color: var(--primary-color);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    position: relative;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-glow);
}

.footer-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(10px, 3vw, 30px);
    margin-top: clamp(15px, 4vw, 25px);
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(10px, 3vw, 25px);
    margin-top: clamp(15px, 4vw, 25px);
    position: relative;
}

.social-links a {
    color: var(--primary-color);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    transition: color 0.3s, transform 0.3s, text-shadow 0.3s;
    perspective: 1000px;
    position: relative;
    overflow: hidden;
    min-width: 44px;
    min-height: 44px;
}

.social-links a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.5), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

.social-links a:hover::after {
    width: clamp(100px, 20vw, 200px);
    height: clamp(100px, 20vw, 200px);
}

.social-links a img {
    width: clamp(18px, 4vw, 22px);
    height: clamp(18px, 4vw, 22px);
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}

.social-links a:hover {
    color: #ffffff;
    text-shadow: var(--shadow-glow);
    transform: translateY(-6px);
}

.social-links a:hover img {
    transform: rotateY(360deg);
}

.social-links a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

.social-links a::before {
    content: attr(aria-describedby);
    position: absolute;
    top: clamp(-30px, -8vw, -40px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--section-bg);
    color: var(--text-color);
    padding: clamp(3px, 1vw, 5px) clamp(5px, 1.5vw, 10px);
    border-radius: clamp(3px, 1vw, 5px);
    font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.social-links a:focus::before {
    opacity: 1;
}

.theme-toggle, .download-cv, .language-toggle, .back-to-top {
    padding: clamp(10px, 3vw, 16px) clamp(15px, 4vw, 30px);
    background: var(--item-bg);
    border-radius: clamp(25px, 5vw, 50px);
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(0.8rem, 2vw, 1rem);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    transition: box-shadow 0.3s, background 0.3s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(6px);
    position: relative;
    z-index: 1;
    min-width: 44px;
    min-height: 44px;
}

.theme-toggle::before, .download-cv::before, .language-toggle::before, .back-to-top::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: clamp(25px, 5vw, 53px);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.4;
    transition: opacity 0.3s;
    animation: neon-pulse 4s ease-in-out infinite;
}

.theme-toggle:hover::before, .download-cv:hover::before, .language-toggle:hover::before, .back-to-top:hover::before {
    opacity: 0.8;
}

.theme-toggle:hover, .download-cv:hover, .language-toggle:hover, .back-to-top:hover {
    background: rgba(0, 255, 255, 0.35);
    box-shadow: 0 0 30px var(--primary-color), 0 0 20px var(--secondary-color);
    transform: translateY(-6px);
}

.language-toggle.flip {
    transform: rotateY(180deg);
}

.language-toggle {
    transition: transform 0.5s ease;
}

.back-to-top {
    position: fixed;
    bottom: clamp(15px, 4vw, 15px);
    right: clamp(10px, 3vw, 30px);
    opacity: 0;
    transform: translateY(30px);
    animation: pulse 1.8s ease-in-out infinite;
    z-index: 150;
    box-shadow: var(--shadow-glow);
}

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

.back-to-top:hover img {
    transform: translateY(-5px) rotate(360deg);
}

.back-to-top img {
    width: clamp(14px, 3.5vw, 18px);
    height: clamp(14px, 3.5vw, 18px);
}

#sidebar-toggle {
    position: fixed;
    top: clamp(10px, 3vw, 20px);
    left: clamp(10px, 3vw, 20px);
    z-index: 1200;
    width: clamp(40px, 10vw, 60px);
    height: clamp(40px, 10vw, 60px);
    background: var(--item-bg);
    border-radius: clamp(10px, 2.5vw, 16px);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: clamp(8px, 2vw, 14px);
    transition: box-shadow 0.3s, background 0.3s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-glow);
    animation: bounce 2s ease-in-out infinite;
    min-width: 44px;
    min-height: 44px;
}

#sidebar-toggle::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: clamp(10px, 2.5vw, 19px);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.3s;
    animation: neon-pulse 4s ease-in-out infinite;
}

#sidebar-toggle:hover::before, #sidebar-toggle.active::before {
    opacity: 0.8;
}

#sidebar-toggle:hover, #sidebar-toggle.active {
    background: rgba(0, 255, 255, 0.35);
    box-shadow: 0 0 35px var(--primary-color), 0 0 25px var(--secondary-color);
    transform: scale(1.2);
}

#sidebar-toggle.active {
    animation: none;
}

#sidebar-toggle .bar {
    height: clamp(4px, 1.5vw, 7px);
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: clamp(4px, 1vw, 7px);
    transition: all 0.3s ease;
    opacity: 0.5;
}

#sidebar-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(clamp(6px, 1.5vw, 10px), clamp(6px, 1.5vw, 10px));
}

#sidebar-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

#sidebar-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(clamp(6px, 1.5vw, 10px), clamp(-6px, -1.5vw, -10px));
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#sidebar {
    height: 100%;
    width: clamp(200px, 60vw, 300px);
    position: fixed;
    top: 0;
    left: calc(-1 * clamp(200px, 60vw, 300px));
    background: var(--section-bg);
    border-radius: 0 clamp(10px, 2vw, 20px) clamp(10px, 2vw, 20px) 0;
    z-index: 1100;
    transition: left 0.4s ease-in-out;
    padding-top: clamp(100px, 25vw, 130px);
    box-shadow: var(--shadow-glow);
    backdrop-filter: blur(12px);
}

#sidebar::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 0 clamp(10px, 2vw, 23px) clamp(10px, 2vw, 23px) 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.3s;
    animation: neon-pulse 4s ease-in-out infinite;
}

#sidebar:hover::before, #sidebar.visible::before {
    opacity: 0.5;
}

#sidebar.visible {
    left: 0;
}

#sidebar-logo {
    position: absolute;
    top: clamp(20px, 5vw, 30px);
    left: 50%;
    transform: translateX(-50%);
}

#sidebar-logo img {
    width: clamp(80px, 20vw, 120px);
    border-radius: 50%;
    opacity: 0.8;
}

#sidebar a {
    padding: clamp(15px, 4vw, 25px) clamp(20px, 5vw, 35px);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 15px);
    transition: color 0.3s, background 0.3s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px;
}

#sidebar a img {
    width: clamp(18px, 4vw, 26px);
    height: clamp(18px, 4vw, 26px);
    filter: invert(72%) sepia(84%) saturate(2677%) hue-rotate(157deg) brightness(95%) contrast(89%);
    transition: filter 0.3s ease, transform 0.3s;
}

#sidebar a:hover img {
    filter: invert(100%) sepia(0%) saturate(7500%) hue-rotate(185deg) brightness(105%) contrast(105%);
    transform: rotate(360deg);
}

#lang-notification {
    position: fixed;
    top: clamp(10px, 3vw, 20px);
    right: clamp(10px, 3vw, 20px);
    background: var(--section-bg);
    color: var(--primary-color);
    padding: clamp(5px, 2vw, 10px) clamp(10px, 3vw, 20px);
    border-radius: clamp(5px, 1.5vw, 8px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1500;
    font-size: clamp(0.8rem, 2vw, 1rem);
}

#lang-notification.visible {
    opacity: 1;
}

[tabindex]:focus, a:focus, button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    box-shadow: 0 0 10px var(--primary-color), 0 0 15px var(--secondary-color);
}

@media (max-width: 1024px) {
    header {
        padding: clamp(50px, 12vw, 100px) clamp(10px, 3vw, 15px);
    }
    header h1 {
        font-size: clamp(2rem, 5vw, 4rem);
    }
    header p {
        font-size: clamp(1rem, 2.5vw, 1.6rem);
    }
    section {
        margin: clamp(30px, 8vw, 60px) clamp(15px, 4vw, 30px);
        padding: clamp(15px, 4vw, 30px);
    }
    .item {
        padding: clamp(10px, 3vw, 20px);
    }
    .skills-list {
        grid-template-columns: repeat(auto-fit, minmax(clamp(80px, 18vw, 100px), 1fr));
    }
    .footer-buttons {
        flex-direction: column;
        align-items: center;
    }
    .social-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    header {
        padding: clamp(40px, 10vw, 80px) clamp(8px, 2vw, 15px);
    }
    header h1 {
        font-size: clamp(1.8rem, 4.5vw, 3.5rem);
    }
    header p {
        font-size: clamp(0.9rem, 2.2vw, 1.4rem);
    }
    header video, #particles-js, .project-card video {
        display: none;
    }
    section {
        margin: clamp(20px, 5vw, 40px) clamp(10px, 2.5vw, 20px);
        padding: clamp(10px, 3vw, 20px);
    }
    .item h3 {
        font-size: clamp(1.2rem, 3vw, 1.5rem);
    }
    .item p {
        font-size: clamp(0.8rem, 2vw, 1rem);
    }
    .skills-list {
        grid-template-columns: repeat(auto-fit, minmax(clamp(70px, 18vw, 90px), 1fr));
        gap: clamp(6px, 1.5vw, 8px);
    }
    .skills-list li {
        min-width: clamp(70px, 18vw, 90px);
        padding: clamp(6px, 1.5vw, 10px) clamp(8px, 2vw, 12px);
        font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    }
    .timeline::before {
        left: clamp(8px, 2vw, 15px);
    }
    .timeline-item {
        padding-left: clamp(30px, 8vw, 50px);
    }
    .timeline-item::before {
        left: clamp(3px, 1vw, 10px);
    }
    #sidebar {
        width: clamp(180px, 50vw, 260px);
        left: calc(-1 * clamp(180px, 50vw, 260px));
    }
    #sidebar.visible {
        left: 0;
    }
    #sidebar-toggle {
        width: clamp(35px, 8vw, 50px);
        height: clamp(35px, 8vw, 50px);
        padding: clamp(6px, 1.5vw, 10px);
        top: clamp(8px, 2vw, 15px);
        left: clamp(8px, 2vw, 15px);
    }
    .contact-button {
        bottom: clamp(50px, 15vw, 80px);
        right: clamp(8px, 2vw, 20px);
        padding: clamp(10px, 2.5vw, 15px);
    }
    .back-to-top {
        bottom: clamp(10px, 3vw, 20px);
        right: clamp(10px, 3vw, 20px);
    }
    .footer-buttons, .social-links {
        gap: clamp(8px, 2vw, 15px);
    }
    .theme-toggle, .download-cv, .language-toggle, .back-to-top {
        padding: clamp(8px, 2vw, 12px) clamp(10px, 3vw, 20px);
    }
}

@media (max-width: 480px) {
    header {
        padding: clamp(30px, 8vw, 60px) clamp(5px, 1.5vw, 10px);
    }
    header h1 {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
    header p {
        font-size: clamp(0.8rem, 2vw, 1.2rem);
    }
    h2 {
        font-size: clamp(1.4rem, 3.5vw, 2rem);
    }
    .item h3 {
        font-size: clamp(1rem, 2.5vw, 1.3rem);
    }
    .item p {
        font-size: clamp(0.7rem, 1.8vw, 0.9rem);
    }
    nav a {
        font-size: clamp(0.8rem, 2vw, 1rem);
        margin: clamp(5px, 1.5vw, 10px);
    }
    .contact-modal-content {
        max-width: clamp(250px, 90vw, 400px);
        padding: clamp(15px, 4vw, 30px);
    }
    .skills-list {
        grid-template-columns: repeat(auto-fit, minmax(clamp(60px, 15vw, 80px), 1fr));
        gap: clamp(4px, 1vw, 6px);
    }
    .skills-list li {
        min-width: clamp(60px, 15vw, 80px);
        font-size: clamp(0.5rem, 1.2vw, 0.7rem);
    }
    .tooltip {
        font-size: clamp(0.5rem, 1.2vw, 0.7rem);
        padding: clamp(3px, 1vw, 5px) clamp(4px, 1.2vw, 8px);
    }
    #sidebar {
        width: clamp(160px, 50vw, 220px);
        left: calc(-1 * clamp(160px, 50vw, 220px));
    }
    #sidebar.visible {
        left: 0;
    }
    #sidebar a {
        font-size: clamp(0.8rem, 2vw, 1rem);
        padding: clamp(10px, 3vw, 15px) clamp(15px, 4vw, 20px);
    }
    #sidebar-logo img {
        width: clamp(60px, 15vw, 80px);
    }
    #skills-filter {
        max-width: clamp(200px, 80vw, 300px);
    }
    .progress-circle {
        width: clamp(15px, 4vw, 20px);
        height: clamp(15px, 4vw, 20px);
    }
}

@media (max-width: 320px) {
    body {
        font-size: clamp(12px, 3vw, 14px);
    }
    header {
        padding: clamp(20px, 6vw, 40px) clamp(5px, 1.5vw, 8px);
    }
    header h1 {
        font-size: clamp(1.2rem, 3.5vw, 2rem);
    }
    header p {
        font-size: clamp(0.7rem, 1.8vw, 1rem);
    }
    h2 {
        font-size: clamp(1.2rem, 3vw, 1.6rem);
    }
    .item h3 {
        font-size: clamp(0.9rem, 2.2vw, 1.1rem);
    }
    .item p {
        font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    }
    nav a {
        font-size: clamp(0.7rem, 1.8vw, 0.9rem);
        margin: clamp(3px, 1vw, 5px);
    }
    .contact-button {
        padding: clamp(8px, 2vw, 10px);
    }
    .contact-modal-content {
        max-width: clamp(200px, 90vw, 300px);
        padding: clamp(10px, 3vw, 20px);
    }
    .skills-list {
        grid-template-columns: repeat(auto-fit, minmax(clamp(50px, 12vw, 70px), 1fr));
        gap: clamp(4px, 1vw, 6px);
    }
    .skills-list li {
        min-width: clamp(50px, 12vw, 70px);
        font-size: clamp(0.4rem, 1vw, 0.6rem);
    }
    #sidebar {
        width: clamp(140px, 50vw, 180px);
        left: calc(-1 * clamp(140px, 50vw, 180px));
    }
    #sidebar a {
        font-size: clamp(0.7rem, 1.8vw, 0.9rem);
    }
    #sidebar-logo img {
        width: clamp(50px, 12vw, 60px);
    }
}