@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700&display=swap');

/* =========================================
   1. Theme Variables
   ========================================= */
:root {
    /* Light Theme (Black & White) */
    --primary-color: #000000;       /* Black */
    --accent-color: #333333;        /* Dark Gray */
    --bg-color: #ffffff;            /* White */
    --bg-alt: #f5f5f5;              /* Light Gray */
    --text-color: #1e1e1e;          /* Almost Black */
    --text-light: #555555;          /* Medium Gray */
    --card-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    
    --nav-glass: rgba(255, 255, 255, 0.85);
    --popup-bg: rgba(255, 255, 255, 0.98); /* Less transparent for popups */
    --border-radius: 12px;
}

[data-theme="dark"] {
    /* Dark Theme (Black & White) */
    --primary-color: #ffffff;       /* White */
    --accent-color: #dddddd;        /* Light Gray */
    --bg-color: #000000;            /* Black */
    --bg-alt: #1a1a1a;              /* Dark Gray */
    --text-color: #eeeeee;          /* Off White */
    --text-light: #aaaaaa;          /* Gray */
    --card-bg: rgba(20, 20, 20, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.1);
    
    --nav-glass: rgba(0, 0, 0, 0.85);
    --popup-bg: rgba(0, 0, 0, 0.98);
}

/* System Theme handled by JS or media query overlap. 
   We default to variables above, JS will toggle attribute. */

/* =========================================
   2. Global Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, .logo {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: var(--accent-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ...existing code... */
/* =========================================
   3. Glassmorphism Utilities
   ========================================= */
.glass-nav {
    background: var(--nav-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius);
}

/* =========================================
   3b. Ambient Background Animation
   ========================================= */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px); /* Creates the soft diffuse look */
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
    border-radius: 50%;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(120, 120, 120, 0.4) 0%, rgba(120, 120, 120, 0) 70%);
    top: -100px;
    left: -150px;
    animation-duration: 25s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(160, 160, 160, 0.4) 0%, rgba(160, 160, 160, 0) 70%);
    bottom: -50px;
    right: -100px;
    animation-delay: -5s;
    animation-duration: 22s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(200, 200, 200, 0.4) 0%, rgba(200, 200, 200, 0) 70%);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    animation-duration: 28s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* =========================================
   4. Navigation
   ========================================= */
/* ...existing code... */
nav {
    height: 70px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Theme Switcher */
.theme-switcher {
    position: relative;
    margin-left: 20px;
}

#theme-toggle {
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: background 0.2s;
}

#theme-toggle:hover {
    background: rgba(125, 125, 125, 0.1);
}

.theme-menu {
    position: absolute;
    top: 50px;
    right: 0;
    width: 150px;
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 5px;
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.theme-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-menu button {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 8px;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-menu button:hover {
    background: rgba(125, 125, 125, 0.1);
}

/* =========================================
   5. Hero Section
   ========================================= */
.hero-section {
    padding-top: 120px;
    padding-bottom: 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 35px;
    max-width: 500px;
}

.hero-tagline {
    font-size: 1.5rem;
    margin-bottom: 25px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.hero-description .highlight {
    color: var(--primary-color);
    font-weight: 500;
}

.cta-buttons {
    display: flex;
    gap: 15px;
}

.mic-callout {
    margin-top: 28px;
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    align-items: flex-start;
    max-width: 520px;
}

.mic-callout p {
    margin-top: 2px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.btn-secondary {
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(5px); /* Just in case */
    color: var(--text-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.hero-image-area {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image-area::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    filter: blur(80px);
    opacity: 0.2;
    z-index: -1;
    border-radius: 50%;
}

.profile-card {
    width: 320px;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    box-shadow: none; /* Remove shadow to let image shine */
    border: none; /* Remove border if using full image */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Image Wrapper */
.profile-img-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Theme Images */
.theme-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease;
}

/* Default State (Light Theme) */
.light-img {
    opacity: 1;
    z-index: 2;
}

.dark-img {
    opacity: 0;
    z-index: 1;
}

/* Dark Theme State */
[data-theme="dark"] .light-img {
    opacity: 0;
    z-index: 1;
}

[data-theme="dark"] .dark-img {
    opacity: 1;
    z-index: 2;
}

.photo-annotation {
    position: absolute;
    right: 14px;
    top: 14px;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    font-size: 0.85rem;
    border: 1px dashed rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    padding: 6px 10px;
    transform: translateY(-12px) rotate(-4deg);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-theme="dark"] .photo-annotation {
    background: rgba(255, 255, 255, 0.88);
    color: #111;
    border-color: rgba(0, 0, 0, 0.45);
}

.profile-img-wrapper:hover .photo-annotation {
    opacity: 1;
    transform: translateY(0) rotate(-4deg);
}

.custom-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--primary-color);
    flex-shrink: 0;
}

.mic-icon {
    width: 28px;
    height: 28px;
}

.profile-stats {
    width: 100%;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat .num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat .label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* =========================================
   6. Sections
   ========================================= */
.section-padding {
    padding: 100px 0;
}

.bg-alt {
    background-color: var(--app-bg-alt, rgba(0,0,0,0.02)); 
    /* Using transparency to let theme bg show through or darken slightly */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto 50px;
    border-radius: 2px;
}

.section-title-left {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.section-desc {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
}

/* About Text */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
}

.about-text p {
    margin-bottom: 20px;
}

/* =========================================
   7. Projects
   ========================================= */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.project-card {
    padding: 22px;
    border: 1px solid var(--glass-border);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.project-card p {
    font-size: 0.93rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.project-card a {
    color: var(--primary-color);
    font-weight: 600;
}

/* =========================================
   8. Skills Dashboard
   ========================================= */
.skills-dashboard {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
}

.skill-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.skill-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    min-height: 78px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.skill-chip:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.skill-chip span {
    font-size: 0.95rem;
    font-weight: 600;
}

.skills-visuals {
    padding: 18px;
    display: grid;
    gap: 16px;
}

.donut-wrapper {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
}

.skills-donut {
    width: 130px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(
        #2f80ed 0 50%,
        #9b51e0 50% 70%,
        #f2994a 70% 85%,
        #27ae60 85% 100%
    );
    position: relative;
    animation: spinIn 1.1s ease;
}

.skills-donut::after {
    content: 'Languages';
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: var(--bg-color);
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    color: var(--text-light);
    border: 1px solid var(--glass-border);
}

.donut-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-python { background: #2f80ed; }
.dot-r { background: #9b51e0; }
.dot-js { background: #f2994a; }
.dot-cpp { background: #27ae60; }

.proficiency-bars {
    display: grid;
    gap: 10px;
}

.bar span {
    font-size: 0.87rem;
    font-weight: 600;
}

.bar div {
    margin-top: 5px;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2f80ed, #27ae60);
    border-radius: inherit;
}

@keyframes spinIn {
    from { transform: scale(0.88) rotate(-25deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}

/* =========================================
   9. Education
   ========================================= */
.education-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px;
    text-align: center;
}

.education-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.education-card p {
    color: var(--text-light);
    margin-bottom: 8px;
}

.education-card small {
    color: var(--text-light);
    font-size: 0.82rem;
}

/* =========================================
   10. Blog
   ========================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.blog-date {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 10px;
}

.blog-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.15); /* Light black/gray tint */
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.blog-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.5;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 8px; /* animation on hover */
}

/* =========================================
   9. Contact
   ========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

.contact-item:hover .icon-box {
    background: rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.contact-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05); /* very subtle fill */
    color: var(--text-color);
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

.full-width {
    width: 100%;
    border: none;
}

/* =========================================
   10. Footer
   ========================================= */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 50px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-light);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text-area {
        order: 2;
    }
    .hero-image-area {
        order: 1;
        margin-bottom: 40px;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .cta-buttons {
        justify-content: center;
    }

    .mic-callout {
        margin-left: auto;
        margin-right: auto;
        text-align: left;
    }
    
    .nav-links, .theme-switcher-text { 
        /* Hide nav links on mobile for now (impl burger later if complex) 
           For simple approach, we'll stack them or use JS to toggle class in real proj.
           Here, i'll do a simple mobile menu style override
        */
        display: none; 
    }

    .mobile-menu-btn {
        display: block;
    }
    
    /* When active class added by JS */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--nav-glass);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        padding: 20px;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .skills-dashboard,
    .donut-wrapper {
        grid-template-columns: 1fr;
    }
    
    .title {
        font-size: 2.5rem;
    }
}

/* =========================================
   Notification Popup
   ========================================= */
.notification-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--popup-bg); /* Uses theme variable */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    z-index: 2000;
    padding: 0; /* Content padding handled inside */
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-width: 350px;
    width: 90%;
}

.notification-popup.active {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 15px;
}

.notification-icon {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon.success i {
    color: #2ecc71;
}

.notification-icon.error i {
    color: #e74c3c;
}

.notification-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.notification-text p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    margin-left: auto;
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: var(--primary-color);
}

.notification-progress {
    width: 100%;
    height: 3px;
    background: transparent;
    position: relative;
}

.notification-progress::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width linear;
}

.notification-popup.active .notification-progress::after {
    width: 100%;
}
