/* Modern Portfolio CSS with Enhanced Design */
:root {
    --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --secondary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --light-gradient: linear-gradient(135deg, #f7f9fc 0%, #e9ecef 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #e0e6ed;
    --shadow-light: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-heavy: 0 15px 35px rgba(31, 38, 135, 0.5);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background: var(--primary-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
    position: relative;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><radialGradient id="a"><stop offset="0" stop-color="%23fff" stop-opacity=".1"/><stop offset="1" stop-color="%23fff" stop-opacity="0"/></radialGradient></defs><circle cx="20" cy="20" r="2" fill="url(%23a)"/><circle cx="80" cy="40" r="1.5" fill="url(%23a)"/><circle cx="40" cy="80" r="1" fill="url(%23a)"/><circle cx="90" cy="90" r="2.5" fill="url(%23a)"/><circle cx="10" cy="60" r="1.2" fill="url(%23a)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Light Mode */
body.light-mode {
    background: var(--light-gradient);
    background-attachment: fixed;
    color: #2c3e50;
}

body.light-mode::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><radialGradient id="a"><stop offset="0" stop-color="%23000" stop-opacity=".05"/><stop offset="1" stop-color="%23000" stop-opacity="0"/></radialGradient></defs><circle cx="20" cy="20" r="2" fill="url(%23a)"/><circle cx="80" cy="40" r="1.5" fill="url(%23a)"/><circle cx="40" cy="80" r="1" fill="url(%23a)"/><circle cx="90" cy="90" r="2.5" fill="url(%23a)"/><circle cx="10" cy="60" r="1.2" fill="url(%23a)"/></svg>') repeat;
}

/* Enhanced Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-light);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    background: transparent;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Only opacity transitions */
    border-radius: 12px;
    /* Keep corners rounded always */
    z-index: -1;
}

.nav-links a:hover::before {
    opacity: 1;
    border-radius: 12px;
    /* or a smaller value like 8px if you want less rounding */
}

.nav-links a:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 198, 255, 0.3);
}

/* Theme Toggle Button */
#theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

#theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#theme-toggle i {
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Main Content */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 2rem 2rem;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    position: relative;
}

#logo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-heavy);
    margin-bottom: 2rem;
    transition: var(--transition);
    animation: fadeInUp 1s ease-out;
}

#logo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.6);
}

#name {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Glass Card Sections */
.section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin: 3rem 0;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition);
}

.section:hover::before {
    left: 100%;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.section-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

.section-content a {
    color: #4facfe;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.section-content a:hover {
    color: #00c6ff;
    text-shadow: 0 0 10px rgba(0, 198, 255, 0.5);
}


/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.skill:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-heavy);
}

.skill img {
    width: 60px;
    height: 60px;
    transition: var(--transition);
}

.skill:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(0, 198, 255, 0.5));
}

.skill::after {
    content: attr(title);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 10;
}

.skill:hover::after {
    opacity: 1;
    bottom: -35px;
}

/* Projects Section */
.projects-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.bot {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    min-width: 280px;
    position: relative;
    overflow: hidden;
}

.bot::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(0, 198, 255, 0.1), transparent);
    animation: rotate 4s linear infinite;
    z-index: -1;
}

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

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

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.bot:hover .profile-pic {
    transform: scale(1.1);
    border-color: #00c6ff;
    box-shadow: 0 0 30px rgba(0, 198, 255, 0.5);
}

.add-bot-button-aimi {
    background: var(--secondary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.add-bot-button-aimi:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.bot p {
    margin-bottom: 8px;
}

.bot img.profile-pic {
    margin-bottom: 8px;
}

.bot button.add-bot-button-aimi {
    margin-top: 8px;
}

/* Contact Form */
.contact-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-light);
}

.contact-container h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: #00c6ff;
    box-shadow: 0 0 20px rgba(0, 198, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

button[type="submit"] {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

/* Social Buttons */
.button-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.button {
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.button:hover::before {
    opacity: 1;
}

.button:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-heavy);
}

.button-icon {
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.button:hover .button-icon {
    color: white;
    transform: scale(1.2);
}

/* Enhanced Footer */
.footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 2rem 2rem;
    text-align: center;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-gradient);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.footer-links a:hover {
    color: #00c6ff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: var(--accent-gradient);
    margin: 2rem auto;
    border-radius: 1px;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-text .heart {
    color: #ff6b6b;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-heavy);
}

.back-to-top i {
    font-size: 1.5rem;
    color: white;
}

/* Success/Error Messages */
.success-message,
.error-message {
    display: none;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    font-weight: 600;
    text-align: center;
}

.success-message {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.error-message {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Light Mode Adjustments */
body.light-mode {
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.8);
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.8);
}

body.light-mode .section {
    background: rgba(255, 255, 255, 0.8);
}

body.light-mode .contact-container {
    background: rgba(255, 255, 255, 0.8);
}

body.light-mode input[type="text"],
body.light-mode input[type="email"],
body.light-mode textarea {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
    color: rgba(44, 62, 80, 0.6);
}

body.light-mode .logo,
body.light-mode #name {
    background: none !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    color: var(--text-primary);
    -webkit-background-clip: unset;
    background-clip: unset;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid var(--glass-border);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .content {
        padding: 100px 1rem 1rem;
    }

    #name {
        font-size: 2.5rem;
    }

    .section {
        padding: 2rem 1.5rem;
        margin: 2rem 0;
    }

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

    .skills-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .skill {
        padding: 1rem;
    }

    .skill img {
        width: 50px;
        height: 50px;
    }

    .contact-container {
        padding: 2rem 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    #logo {
        width: 150px;
        height: 150px;
    }

    #name {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

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

    .button-container {
        gap: 0.5rem;
    }

    .button {
        width: 50px;
        height: 50px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}