/* ==========================================================================
   CSS Variables & Theme
   ========================================================================== */
   :root {
    /* Colors */
    --bg-grad-1: #FFFFFF;
    --bg-grad-2: #F8FBFF;
    --bg-grad-3: #F2F8FF;
    --bg-grad-4: #EEF6FF;
    
    --accent: #4F8EF7;
    --accent-hover: #3a75d6;
    --accent-secondary: #7CB7FF;
    
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-light: #6B7280;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 10px 40px rgba(31, 38, 135, 0.05);
    --glass-shadow-hover: 0 15px 50px rgba(31, 38, 135, 0.1);
    
    /* Layout & Spacing */
    --max-width: 1200px;
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
   max-width: 100vw;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 35%, var(--bg-grad-3) 70%, var(--bg-grad-4) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
   width: 100%;
   max-width: 100vw;
}


.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
    color: var(--text-primary);
    line-height: 1.2;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Glassmorphism Utilities
   ========================================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow-hover);
    background: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 8px 20px rgba(79, 142, 247, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(79, 142, 247, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: white;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-link {
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.icon-link:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: rgba(79, 142, 247, 0.15);
    top: -10%;
    right: -5%;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: rgba(124, 183, 255, 0.15);
    bottom: 10%;
    left: -5%;
    animation-delay: -10s;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
    min-height: 1.2em; /* Prevents layout shift during typing */
}

.cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-tagline {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.hero-desc {
    font-size: 1.0rem;
    max-width: 700px;
    margin-bottom: 3rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-card {
    font-size: 1.0rem;
    line-height: 1.8;
}

.about-card p:last-child {
    margin-bottom: 0;
}

.about-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-image-placeholder {
    width: 100%; /* Added edge to edge spanning */
    height: 220px;
    background: linear-gradient(135deg, rgba(79,142,247,0.1), rgba(124,183,255,0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--glass-border);
}

.featured .project-image-placeholder {
    width:100%;    
    height: 100%;
    min-height: 350px;
    border-bottom: none;
    border-right: 1px solid var(--glass-border);
}

.overlay {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(79, 142, 247, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.project-content {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-content p {
    font-size: 1rem;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-stack span {
    font-size: 0.8rem;
    padding: 4px 12px;
    background: rgba(79, 142, 247, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-weight: 500;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Forces exactly 3 columns */
    gap: 1.5rem;
}

.skill-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.skill-tags span:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* ==========================================================================
   Achievements Timeline
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: rgba(79, 142, 247, 0.2);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 12px;
    top: 30px;
    width: 18px;
    height: 18px;
    background: var(--accent);
    border-radius: 50%;
    border: 4px solid #F2F8FF;
    box-shadow: 0 0 0 4px rgba(79, 142, 247, 0.2);
}

.timeline-content {
    padding: 1.5rem 2rem;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    margin-bottom: 0;
    font-size: 1rem;
}


/* ==========================================================================
   Certifications Section
   ========================================================================== */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.cert-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.cert-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cert-card li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.cert-card li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cert-card li span {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ==========================================================================
   Interests Section
   ========================================================================== */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.interest-card {
    text-align: left;
}

.interest-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.interest-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.interest-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ==========================================================================
   GitHub Section (Updated)
   ========================================================================== */
.github-card {
    max-width: 900px; /* Slightly wider to comfortably fit the heatmap */
    margin: 0 auto;
}

.gh-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gh-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
}

.gh-heatmap-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.heatmap-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Scroll wrapper ensures the heatmap doesn't squish on mobile phones */
.heatmap-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
}

/* Custom scrollbar for the heatmap on mobile */
.heatmap-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}
.heatmap-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(79, 142, 247, 0.05);
    border-radius: 10px;
}
.heatmap-scroll-wrapper::-webkit-scrollbar-thumb {
    background: rgba(79, 142, 247, 0.2);
    border-radius: 10px;
}

.github-heatmap-img {
    width: 100%;
    min-width: 700px; /* Prevents the SVG squares from getting too tiny on small screens */
    height: auto;
    display: block;
    margin: 0 auto;
    opacity: 0.9;
    mix-blend-mode: multiply; /* Blends the SVG background perfectly with the glass card */
}
/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.contact-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-content p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.footer-tech {
    font-size: 0.85rem !important;
    color: var(--text-light) !important;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes blink {
    50% { opacity: 0; }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 992px) {
    .featured {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .featured .project-image-placeholder {
        min-height: 250px;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }
    .hero-title {
        font-size: 3.5rem;
    }
    .hero-subtitle {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
   .skills-grid {
        grid-template-columns: 1fr;
    }
   
   .project-grid {
        grid-template-columns: 1fr;
    }

    .nav-actions {
        display: none; 
    }
    .nav-links, .nav-actions .btn {
        display: none; /* simple mobile hide for minimal setup */
    }
    
    .mobile-menu-btn {
        display: flex;
    }

    /* Minimal mobile menu behavior added via JS */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow);
    }

    .hero-title {
        font-size: 2.8rem;
    }
    
    .contact-title {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 80px 0;
    }

    .timeline::before {
        left: 15px;
    }
    .timeline-dot {
        left: 7px;
        width: 16px;
        height: 16px;
    }
    .timeline-item {
        padding-left: 45px;
    }
    .timeline-content {
        padding: 1.5rem;
    }
}
