:root {
    /* Dark theme colors */
    --primary-color-dark: #1a1a2e;
    --secondary-color-dark: #16213e;
    --text-color-dark: #e0e0e0;
    --background-color-dark: #0f3460;
    --accent-color-dark: #00fff5;
    --highlight-color-dark: #ff9900;
    
    /* Light theme colors */
    --primary-color-light: #ffffff;
    --secondary-color-light: #f0f0f0;
    --text-color-light: #333333;
    --background-color-light: #e0e0e0;
    --accent-color-light: #3a86ff;
    --highlight-color-light: #ff006e;
    
    /* Default to dark theme */
    --primary-color: var(--primary-color-dark);
    --secondary-color: var(--secondary-color-dark);
    --text-color: var(--text-color-dark);
    --background-color: var(--background-color-dark);
    --accent-color: var(--accent-color-dark);
    --highlight-color: var(--highlight-color-dark);
    
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: background-color 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--primary-color);
    transition: background-color 0.3s ease;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    justify-content: space-around;
    width: 40%;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 10px;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a:hover::before {
    transform: scaleX(1);
}

/* Add this new rule for the active link */
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a.active::before {
    transform: scaleX(1);
}

main {
    padding-top: 80px;
}

section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5rem 10%;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background-color: var(--background-color);
    transition: background-color 0.3s ease;
}

section:not(:first-child) {
    margin-top: 5rem;
}

.content {
    max-width: 1200px;
    width: 100%;
    z-index: 2;
    position: relative;
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: background-color 0.3s ease;
}

h1, h2 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

h1 {
    font-size: 4rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background-color: var(--highlight-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px var(--shadow-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 1rem;
}

.skill-item {
    background-color: var(--background-color);
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--accent-color);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.skill-item span {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.skill-bar {
    background-color: var(--highlight-color);
    height: 8px;
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

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

.skill-item {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.project {
    background-color: var(--background-color);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 2px solid var(--accent-color);
}

.project:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info p {
    margin-bottom: 1rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input, textarea {
    padding: 0.8rem;
    border-radius: 5px;
    border: none;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 2px solid var(--accent-color);
}

input:focus, textarea:focus {
    border-color: var(--highlight-color);
}

.social-icons {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
}

.social-icons a {
    color: var(--accent-color);
    font-size: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    width: 70px;
    height: 70px;
    line-height: 70px;
    text-align: center;
    border-radius: 50%;
    background-color: var(--secondary-color);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.social-icons a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--accent-color);
    top: 0;
    left: 0;
    z-index: -1;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.social-icons a:hover::after {
    transform: scale(1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.social-icons a:hover i {
    animation: bounce 0.8s ease infinite;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--secondary-color);
    color: var(--text-color);
    margin-top: 2rem;
}

#sphere-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 255, 245, 0.4), rgba(0, 255, 245, 0.1) 30%, rgba(0, 255, 245, 0) 70%);
    box-shadow: inset 0 0 20px rgba(0, 255, 245, 0.2), 0 0 20px rgba(0, 255, 245, 0.1);
    opacity: 0.7;
    transition: transform 0.3s ease-out;
    z-index: 11;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    z-index: 10000;
    mix-blend-mode: difference;
}

.custom-cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.custom-cursor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s, width 0.3s, height 0.3s;
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 255, 245, 0.1);
}

.custom-cursor.hover::after {
    opacity: 1;
    width: 40px;
    height: 40px;
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--background-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        opacity: 0;
    }

    .burger {
        display: block;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

.nav-active {
    transform: translateX(0%);
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

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

.skill-bar {
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 5px;
    margin-top: 10px;
    transition: width 1s ease-in-out;
}

.dynamic-text {
    color: var(--accent-color);
    font-weight: bold;
}

.parallax {
    transition: transform 0.5s ease-out;
}

.scrolled {
    background-color: rgba(26, 26, 46, 0.95);
}

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

/* Form validation feedback */
input.error, textarea.error {
    border: 2px solid red;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.project-item {
    background-color: var(--secondary-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.project-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-item h3 {
    font-size: 1.4rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.project-item p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 15px;
    flex-grow: 1;
}

.project-link {
    align-self: flex-start;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.project-link:hover {
    background-color: var(--highlight-color);
}

/* Theme switch styles */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 20px;
    background-color: var(--secondary-color);
    border-radius: 30px;
    padding: 5px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.theme-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 15px;
}

.dark-label, .light-label {
    color: var(--text-color);
    opacity: 0.6;
}

.theme-dark .dark-label,
.theme-light .light-label {
    color: var(--accent-color);
    opacity: 1;
    background-color: var(--primary-color);
}

.theme-label:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.theme-switch {
    display: inline-block;
    height: 28px;
    position: relative;
    width: 52px;
    margin: 0 10px;
}

.slider {
    background-color: var(--accent-color);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: var(--primary-color);
    bottom: 4px;
    content: "";
    height: 20px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 20px;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--text-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0px);
    }
}

.theme-dark .dark-label,
.theme-light .light-label {
    animation: float 3s ease-in-out infinite;
}

/* Add a glow effect to the logo */
@keyframes glow {
    0% {
        text-shadow: 0 0 5px var(--accent-color);
    }
    50% {
        text-shadow: 0 0 20px var(--accent-color), 0 0 30px var(--highlight-color);
    }
    100% {
        text-shadow: 0 0 5px var(--accent-color);
    }
}

.logo {
    animation: glow 2s infinite;
}

.hidden-message {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 10px;
  border-radius: 5px;
  font-size: 0.8em;
  white-space: nowrap;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

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

.logo-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: var(--accent-color);
  border-radius: 50%;
  transition: all 0.5s ease;
}