/* Base Styles */
:root {
    --primary: #6c63ff;
    --primary-dark: #4d44db;
    --secondary: #ff6584;
    --accent: #00d1b2;
    --dark: #0f0f1a;
    --darker: #080811;
    --light: #ffffff; /* Changed to pure white for better visibility */
    --gray: #cccccc; /* Lightened gray for better contrast */
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --text-glow: 0 0 10px rgba(108, 99, 255, 0.7);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    line-height: 1.6;
}

/* Text Contrast Improvements */
h1, h2, h3, h4, h5, h6 {
    color: var(--light);
    font-weight: 600;
}

p, span, li, a {
    color: var(--light);
    opacity: 0.9;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.3s ease;
}

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

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    overflow: hidden;
}

/* Mouse Trail */
.mouse-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.mouse-trail-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

/* Theme Toggle Styles */
.theme-toggle {
    position: relative;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light);
    background: rgba(108, 99, 255, 0.1);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--primary);
}

.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 180px;
    z-index: 1001;
}

.theme-toggle:hover .theme-dropdown {
    display: flex;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.theme-option i {
    width: 20px;
    text-align: center;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light);
    text-decoration: none;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(108, 99, 255, 0.1);
}

.nav-link.active {
    background: var(--primary);
}

.link-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.nav-link:hover .link-icon {
    transform: translateY(-3px);
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1001;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.mobile-menu-toggle .dot {
    width: 6px;
    height: 6px;
    background: var(--light);
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 5% 3rem;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.title-line {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.title-name {
    color: var(--primary);
    display: inline-block;
    position: relative;
}

.glitch {
    position: relative;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    color: #0ff;
    z-index: -1;
    animation: glitch-effect 3s infinite;
}

.glitch::after {
    color: #f0f;
    z-index: -2;
    animation: glitch-effect 2s infinite reverse;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    margin-bottom: 2rem;
    color: var(--light);
    font-weight: 400;
    height: 2.5rem;
    overflow: hidden;
}

.subtitle-part {
    display: inline-block;
    position: relative;
    animation: rotate-text 12s infinite ease-in-out;
    opacity: 0;
    transform: translateY(20px);
    animation-fill-mode: forwards;
}

.subtitle-part:nth-child(1) { animation-delay: 0s; }
.subtitle-part:nth-child(2) { animation-delay: 4s; }
.subtitle-part:nth-child(3) { animation-delay: 8s; }

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--light);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(108, 99, 255, 0.1);
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-icon {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.magnetic:hover .btn-icon {
    transform: translateX(5px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    position: relative;
}

.hexagon-container {
    position: relative;
    width: 350px;
    height: 400px;
}

.hexagon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 350px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--glass);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hexagon-inner {
    width: 280px;
    height: 330px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    overflow: hidden;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hexagon-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(45deg, var(--primary), var(--accent));
    z-index: -1;
    animation: rotate-gradient 8s linear infinite;
}

.hexagon-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 45%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 55%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: shine 4s infinite;
}

.tech-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.tech-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--glass);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tech-icon:nth-child(1) {
    top: 10%;
    left: 10%;
}

.tech-icon:nth-child(2) {
    bottom: 10%;
    right: 10%;
}

.tech-icon:nth-child(3) {
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
}

/* Sections */
section {
    padding: 6rem 5%;
    position: relative;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.title-text {
    position: relative;
    padding: 0 1.5rem;
    color: var(--light);
}

.title-decorator {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0.5;
}

.title-decorator:last-child {
    background: linear-gradient(90deg, transparent, var(--primary));
}

/* About Section */
.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--light);
}

/* Skills Section */
.skills-bars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.skill-bar {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-bar:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: 600;
    color: var(--light);
}

.skill-percentage {
    color: var(--light);
    opacity: 0.8;
}

.skill-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.project-bg {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.red-developing {
    background: linear-gradient(-45deg, #ff0000, #990000, #660000, #330000);
    background-size: 400% 400%;
    animation: gradient-shift 5s ease infinite;
}

.minecraft {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="50" height="50" x="0" y="0" fill="%2344aa33"/><rect width="50" height="50" x="50" y="0" fill="%2344aa33"/><rect width="50" height="50" x="0" y="50" fill="%2355bb44"/><rect width="50" height="50" x="50" y="50" fill="%2355bb44"/></svg>');
    background-size: 50px;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.project-description {
    color: var(--light);
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.project-tag {
    background: rgba(108, 99, 255, 0.2);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

.project-buttons {
    display: flex;
    gap: 1rem;
}

/* Contact Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.discord-widget {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.discord-widget:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.discord-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.discord-header i {
    font-size: 2rem;
    color: #7289da;
}

.discord-header h3 {
    font-size: 1.5rem;
    color: var(--light);
}

.discord-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--light);
    opacity: 0.8;
}

.discord-id {
    margin-bottom: 2rem;
}

.discord-username {
    display: inline-block;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    color: var(--light);
    font-family: monospace;
}

.discord-buttons {
    display: flex;
    gap: 1rem;
}

/* Footer */
.main-footer {
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0 1.5rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.footer-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light);
    letter-spacing: 2px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--light);
    opacity: 0.8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary);
    opacity: 1;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    color: var(--light);
    opacity: 0.7;
}

/* Animations */
@keyframes rotate-gradient {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes shine {
    0% { transform: rotate(30deg) translateX(-100%); }
    100% { transform: rotate(30deg) translateX(100%); }
}

@keyframes glitch-effect {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

@keyframes rotate-text {
    0% { opacity: 0; transform: translateY(20px); }
    5% { opacity: 1; transform: translateY(0); }
    25% { opacity: 1; transform: translateY(0); }
    30% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 0; transform: translateY(-20px); }
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .about-content {
        flex-direction: column;
    }
}

@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .discord-buttons {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 80px);
        background: rgba(15, 15, 26, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 1.5rem;
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .theme-toggle {
        width: 100%;
        justify-content: space-between;
    }
    
    .theme-dropdown {
        position: static;
        display: none;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .theme-toggle.active .theme-dropdown {
        display: flex;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    section {
        padding: 4rem 5%;
    }
    
    .hero-section {
        padding-top: 8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hexagon-container {
        width: 280px;
        height: 320px;
    }
    
    .hexagon {
        width: 250px;
        height: 290px;
    }
    
    .hexagon-inner {
        width: 230px;
        height: 270px;
    }
}
