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

:root {
    --primary-color: #2563eb;
    --secondary-color: #9aa0a6;
    --accent-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #eff6ff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-6: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 25%, #764ba2 75%);
    --gradient-bg: linear-gradient(135deg, #1e3a8a 0%, #581c87 25%, #4c1d95 50%, #065f46 75%, #166534 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.4;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #f1f5f9 50%, #e5e7eb 75%, #f3f4f6 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    height: 50px
}

.logo {
    display: block;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

/* Hamburger Menu */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 110;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--gradient-hero);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
    border-radius: 2px; /* makes them look cleaner */
}

.hamburger {
    position: relative;
    top: 0;
}

.hamburger::before {
    content: '';
    top: -8px;
}

.hamburger::after {
    content: '';
    top: 8px;
}

/* Show X icon when menu is open */
.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        width: 150px;
        box-shadow: var(--shadow-lg);
        display: none;
        text-align: center;
    }
    
    .nav-links.show {
        display: flex;
        align-items: center;
    }
}
/* End of  Hamburger Menu */

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 2rem 0;
    border-radius: 1rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-wrap: balance;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 48px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--gradient-1);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    background-clip: padding-box;
    position: relative;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-1);
    border-radius: 48px;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

.btn-secondary:hover {
    /*background: var(--gradient-1);*/
    background: rgba(210, 210, 210, 0.3);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Newsletter Banner - FIXED */
.newsletter-banner {
    background: var(--gradient-1);
    color: white;
    padding: 2rem 0;
    margin: 2rem 0;
    border-radius: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Fixed: Added pointer-events: none to prevent blocking interactions */
.newsletter-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none; /* This fixes the interaction blocking */
    z-index: 1; /* Ensure it stays behind content */
}

/* Ensure content stays above the pseudo-element */
.newsletter-banner > * {
    position: relative;
    z-index: 2;
}

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

.newsletter-banner h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.newsletter-banner p {
    opacity: 0.9;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.newsletter-banner .btn {
    background: white;
    color: var(--primary-color);
}

.newsletter-banner .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Sections */
.section {
    scroll-margin-top: 10vh;
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 2rem 0;
    border-radius: 1rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: -.5px;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.section-description {
    text-align: center;
    text-wrap: balance;
    max-width: 38.5rem; 
    margin: 1rem auto 3rem auto; /* Top, Right/Left auto, Bottom */
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: -2rem;
}

/* Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-3);
}

.project-card:nth-child(2)::before {
    background: var(--gradient-4);
}

.project-card:nth-child(3)::before {
    background: var(--gradient-5);
}

.project-card:nth-child(4)::before {
    background: var(--gradient-6);
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-wrap: balance;
    line-height: 1.6;
    flex-grow: 1;
}

.project-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.project-link {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 48px; 
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.project-link:hover {
    background: rgba(210, 210, 210, 0.3);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Special note card */
.note-card {
    /* Inherit common project card styles */
    background: var(--gradient-1); /* Use a strong gradient for distinction */
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px; /* Maintain consistent height with other cards */

    /* Span two columns */
    grid-column: 1 / span 2;

    /* Text styling for contrast */
    color: white; /* White text for better readability on dark gradient */
}

.note-card h3 {
    font-size: 1.8rem; /* Slightly larger heading for emphasis */
    font-weight: 600;
    margin-bottom: 1rem;
    color: white; /* Ensure heading is white */
    background: none; /* Remove text gradient for this card's heading */
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.note-card p {
    color: rgba(255, 255, 255, 0.9); /* Slightly transparent white for body text */
    margin-bottom: 1rem;
    text-wrap: balance;
    line-height: 1.7;
    flex-grow: 1;
}

.note-card:hover {
    transform: translateY(-5px) scale(1.01); /* Slightly less aggressive hover for a larger card */
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Contact Section */
.contact {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    margin: 2rem 0;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-3);
}

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

.contact p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-email {
    font-family: 'Monaco', 'Menlo', monospace;
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    background-clip: padding-box;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: inline-block;
    position: relative;
}

.contact-email::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-1);
    border-radius: 0.5rem;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none; /* Fix for email selection */
    z-index: 1;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 48px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    transition: left 0.3s ease;
    z-index: -1;
}

.social-link:hover::before {
    left: 0;
}

.social-link:hover {
    color: white;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: rgba(31, 41, 55, 0.9);
    backdrop-filter: blur(20px);
    color: var(--text-light);
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

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

    .contact {
        padding: 2rem;
    }

    .note-card {
        grid-column: auto;
    }
}

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

.hero-content > * {
    animation: fadeInUp 0.6s ease-out;
}

.project-card {
    animation: fadeInUp 0.6s ease-out;
}

