:root {
    /* Core Colors */
    --background: #0a0a0b;
    --surface: #16161a;
    --primary: #ffffff;
    --secondary: #94a1b2;
    --accent: #5865F2;
    
    /* Discord-inspired Colors */
    --discord-blurple: #5865F2;
    --discord-green: #57F287;
    --discord-bg: #36393f;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
    --gradient-text: linear-gradient(135deg, #FFFFFF 0%, #E4E4E4 100%);
    --gradient-surface: linear-gradient(180deg, var(--surface) 0%, rgba(22,22,26,0.9) 100%);
    
    /* Animations */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --shadow-glow: 0 0 20px rgba(88,101,242,0.2);
}

/* Reset & Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--primary);
    line-height: 1.6;
    background-color: var(--background);
    overflow-x: hidden;
}

/* Particles Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.1);
    z-index: 1002;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0;
    transition: width 0.1s ease;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(10,10,11,0.95);
    backdrop-filter: blur(10px);
    z-index: 1001;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: var(--accent);
    filter: blur(8px);
    border-radius: 50%;
    opacity: 0.5;
    animation: logoGlow 2s ease-in-out infinite;
}

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

.nav-item {
    position: relative;
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition-smooth);
}

.nav-text {
    position: relative;
    z-index: 1;
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition-smooth);
}

.nav-item:hover .nav-indicator,
.nav-item.active .nav-indicator {
    width: 100%;
}

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

/* Main Container */
.main-container {
    position: relative;
    z-index: 2;
}

/* Section Styles */
/* Section adjustments */
.section {
    min-height: 100vh;
    padding: 0; /* Removed padding */
    display: flex;
    align-items: center;
    position: relative;
}

/* Container adjustments */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    width: 100%;
}

/* Home Section Fixes */
.home-content {
    padding-top: 80px; /* Reduced from previous value */
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Reduced gap between elements */
}

.title-wrapper {
    margin-bottom: 0.5rem; /* Reduced margin */
}

.main-title {
    font-size: 4rem;
    font-weight: 500;
    line-height: 0.5;
    margin: 0; /* Remove default margins */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.typewriter-wrapper {
    height: 50px; /* Reduced height */
    margin: 0.5rem 0; /* Reduced margin */
    display: flex;
    align-items: center;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--secondary);
    margin: 0.5rem 0 1rem 0;
    max-width: 600px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.3s forwards;
    text-align: center; /* Center the text */
    width: 100%; /* Full width */
    margin-left: auto; /* Center the container */
    margin-right: auto; /* Center the container */
}

.section-subtitle {
    justify-content: center;
    align-items: center;
    justify-self: center;
}

/* CTA Buttons */
.cta-container {
    display: flex;
    gap: 1rem; /* Reduced gap */
    margin: 1rem 0; /* Reduced margin */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.6s forwards;
    justify-content: center; /* Center the buttons */
    width: 100%; /* Full width */
}

.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem; /* Adjusted padding */
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    transition: var(--transition-bounce);
}

.cta-button.primary {
    background: var(--accent);
    color: var(--primary);
    border: none;
    transition: all var(--transition-smooth);
}


.cta-button.primary:hover {
    background: var(--primary); /* White background on hover */
    color: var(--background); /* Black text on hover */
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.cta-button.primary:hover .button-icon {
    color: var(--background); /* Makes the icon black on hover too */
}


.cta-button.secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--accent);
    transition: all var(--transition-smooth);
}

.cta-button.secondary:hover {
    background: var(--primary); /* White background on hover, same as primary */
    color: var(--background); /* Black text on hover */
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary); /* Border becomes white */
}

.cta-button.secondary:hover .button-icon {
    color: var(--background); /* Makes the icon black on hover */
}

/* Button Icon transitions */
.button-icon {
    transition: color var(--transition-smooth);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: #ffffff;
    background-size: 200% auto;
    display: flex;
    justify-content: center;
}

/* Animated Text */
.animated-text-wrapper {
    height: 60px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
}

.animated-text {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
    position: relative;
    display: inline-block;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.about-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.about-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.05);
    border-color: var(--accent);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.about-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.about-card p {
    color: var(--secondary);
    font-size: 0.95rem;
}

/* Skills Container */
.skills-container {
    margin-top: 4rem;
}

.skills-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    background: rgba(255,255,255,0.03);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition-bounce);
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.skill-item i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.skill-item span {
    display: block;
    color: var(--secondary);
    font-size: 0.9rem;
}

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

.project-card {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition-smooth);
}

.project-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(88,101,242,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

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

.project-link {
    color: var(--primary);
    font-size: 1.5rem;
    transition: var(--transition-bounce);
}

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

.project-content {
    padding: 1.5rem;
}

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

.project-description {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.project-tech span {
    background: rgba(88,101,242,0.1);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
}

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

.project-card:hover img {
    transform: scale(1.1);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-form-wrapper {
    background: rgba(255,255,255,0.03);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--primary);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--secondary);
    transition: var(--transition-smooth);
    pointer-events: none;
    background: transparent;
    padding: 0 0.5rem;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:valid ~ label {
    transform: translateY(-1.4rem) scale(0.8);
    color: var(--accent);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Updated Contact Info Styles */
.contact-info {
    padding: 2rem;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.contact-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
    box-shadow: var(--shadow-glow);
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.contact-image:hover img {
    transform: scale(1.1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
    /* Remove any potential borders */
    border: none;
    /* Ensure no pseudo-elements are creating lines */
    position: relative;
}

.social-links::before,
.social-links::after {
    display: none; /* Remove any pseudo-elements */
}

.social-link {
    color: var(--primary);
    font-size: 2rem;
    transition: var(--transition-bounce);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    /* Remove any borders that might appear as lines */
    border-bottom: none;
    text-decoration: none;
}

.social-link:hover {
    color: var(--accent);
    transform: translateY(-3px);
    background: rgba(88,101,242,0.1);
    border-color: var(--accent);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    background: rgba(10,10,11,0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.05);
    position: relative;
    z-index: 2;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.copyright {
    color: var(--primary);
    font-size: 0.9rem;
}

.footer-info {
    display: none;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--secondary);
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

/* Time and User Info Display */
/* Current User and Time Display */
.user-info {
    position: fixed; /* Changed to fixed */
    top: 80px;
    left: 20px;
    font-family: 'Inter', monospace;
    color: var(--secondary);
    font-size: 0.9rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0.7;
    background: rgba(10,10,11,0.8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--secondary);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--secondary);
    border-radius: 2px;
    animation: scrollWheel 1.5s infinite;
}

.scroll-text {
    color: var(--secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(15px); opacity: 0; }
}

/* Typewriter Styles */
.typewriter-wrapper {
    height: 60px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center; /* Center horizontally */
}

.typewriter-text {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    position: relative;
    display: inline-block;
}

.typed-text {
    display: inline-block;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 42px;
    background-color: var(--accent);
    margin-left: 4px;
    animation: blink 1s infinite;
}

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

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

@keyframes logoGlow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.theme-toggle:hover {
    color: var(--accent);
    transform: rotate(45deg);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* General adjustments */
    html {
        font-size: 14px;
    }

    /* Title adjustments */
    .main-title {
        font-size: 2.5rem;
        line-height: 1.2;
        text-align: center;
    }

    /* Typewriter text */
    .typewriter-text {
        font-size: 1.5rem;
        text-align: center;
    }

    /* CTA Buttons */
    .cta-container {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        padding: 0 1rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }

    /* Sections spacing */
    .section {
        padding: 4rem 1rem;
        min-height: auto;
    }

    /* About cards */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Skills grid */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        margin: 0 1rem;
    }

    /* Contact section */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 1rem;
    }

    /* Contact info */
    .contact-info {
        padding: 1.5rem;
    }

    .contact-image {
        width: 150px;
        height: 150px;
    }

    .social-links {
        gap: 1.5rem;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }

    /* User info */
    .user-info {
        display: none; /* Hide on mobile */
    }

    /* Footer */
    .footer {
        padding: 1.5rem;
        margin-bottom: 60px; /* Add space for bottom navigation */
    }
}

/* Additional responsive adjustments */
@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }

    .typewriter-text {
        font-size: 1.2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill-item {
        padding: 1rem;
    }

    .skill-item i {
        font-size: 1.5rem;
    }

    .project-image {
        height: 180px;
    }
}

/* Fix for very small screens */
@media (max-width: 320px) {
    .main-title {
        font-size: 1.8rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .cta-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Fix for landscape mode */
@media (max-height: 500px) and (orientation: landscape) {
    .section {
        padding: 3rem 1rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* Ensure content is visible with bottom navigation */
@media (max-width: 768px) {
    .main-container {
        padding-bottom: 0;
    }
    .footer {
        margin-bottom: 0; /* Remove the extra margin */
    }

    .footer-info {
        display: flex; /* Show info in mobile */
    }

    .copyright {
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        width: 100%;
    }
}

/* Mobile Navigation Styles */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
    transition: var(--transition-smooth);
    z-index: 1002;
}

.menu-toggle:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    /* Navigation */
    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--primary);
        transition: var(--transition-smooth);
        z-index: 1002;
    }

    .menu-toggle:hover {
        color: var(--accent);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: rgba(22, 22, 26, 0.98); /* More visible background */
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.3s ease-in-out;
        z-index: 1001;
        padding: 2rem;
        border-left: 1px solid rgba(255,255,255,0.05);
        display: flex; /* Always keep display flex */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-item {
        opacity: 0;
        transform: translateX(100px);
        transition: 0.3s ease-in-out;
        color: var(--primary);
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
    }

    .nav-links.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active .nav-item:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active .nav-item:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active .nav-item:nth-child(4) { transition-delay: 0.4s; }

    /* Make the nav items more visible */
    .nav-text {
        color: var(--primary);
        font-size: 1.2rem;
        font-weight: 500;
    }

    /* Overlay */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(3px);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s ease-in-out;
        z-index: 1000;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Animation for menu toggle icon */
    .menu-toggle i {
        transition: transform 0.3s ease-in-out;
    }

    .menu-toggle.active i {
        transform: rotate(90deg);
    }
}
