/* ===== RESET & VARIABLES ===== */
:root {
    /* Colors - Purple Theme */
    --primary: #7c3aed;
    /* Vibrant Purple */
    --primary-hover: #6d28d9;
    --primary-light: #ddd6fe;
    --secondary: #8b5cf6;

    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    /* Very light slate for sections */
    --bg-card: #ffffff;

    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-light: #94a3b8;

    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(124, 58, 237, 0.15);
    /* Purple tinted shadow */

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 2rem;

    --container-max: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ===== UTILITIES ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 7rem 0;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
}



.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

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

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: radial-gradient(circle at 100% 0%, rgba(124, 58, 237, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeUp 0.8s ease-out;
}

.hero-greeting {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    background: var(--bg-alt);
    padding: 2rem 3rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
    min-width: 320px;
    align-items: center;
}

.stat-item {
    text-align: center;
    min-width: 80px;
}

.stat-item h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    line-height: 1;
    display: block;
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.hero-visual {
    position: relative;
    height: 500px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Soft gradient background instead of image */
    background: linear-gradient(135deg, #f3e8ff 0%, #e0e7ff 100%);
    box-shadow: var(--shadow-lg);
    animation: fadeScale 1s ease-out;
}

.abstract-shape {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    filter: blur(40px);
    opacity: 0.4;
    position: absolute;
}

.code-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10;
    width: 80%;
    max-width: 400px;
    border: 1px solid var(--border);
    transform: rotate(-3deg);
    transition: transform 0.3s;
}

.code-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.code-line {
    height: 8px;
    background: var(--bg-alt);
    margin-bottom: 8px;
    border-radius: 4px;
}

.code-line.short {
    width: 60%;
}

.code-line.medium {
    width: 80%;
}

.code-line.long {
    width: 100%;
}

.code-line.active {
    background: var(--primary-light);
}

/* ===== PAGE HEADER (Generic for inner pages) ===== */
.page-header {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, var(--bg-alt), #f0efff);
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 10px;
    /* Prevent clipping of descenders */
}

.page-subtitle {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CARDS & GRIDS ===== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    align-items: flex-start;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

/* Project Card Specifics */
.project-card {
    overflow: hidden;
    padding: 0;
}

.project-img {
    height: 200px;
    background-color: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 3rem;
}

.project-info {
    padding: 2rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-alt);
    color: var(--text-muted);
    border-radius: 50px;
    font-weight: 500;
}

/* Contact Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Footer */
footer {
    background: var(--bg-alt);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

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

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f1f5f9;
    /* Light slate 100 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: visible;
}

.social-icon:hover {
    background: var(--primary);
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.25);
}

.social-icon i {
    transition: color 0.3s ease;
}

.social-icon:hover i {
    color: white !important;
}

/* Icons within content */
.icon-box {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }

    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }

    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* Footer Socials */
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.social-icon:hover {
    color: var(--primary);
    transform: translateY(-3px) scale(1.1);
}

/* Filters */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    border-radius: 999px;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--bg-alt);
    color: var(--primary);
    font-weight: 600;
}

/* ===== CERTIFICATIONS & ACHIEVEMENTS ===== */
.cert-section {
    background: white;
    position: relative;
    overflow: hidden;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cert-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.cert-card:hover::before {
    transform: scaleX(1);
}

.cert-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
    margin: 0 auto 1.5rem;
}

.ranger-banner {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: var(--radius-md);
    padding: 3rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.ranger-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fbbf24, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.ranger-badge {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #d97706;
    transition: var(--transition);
}

.ranger-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.ranger-stats {
    display: flex;
    gap: 2rem;
    text-align: center;
}

.ranger-stat {
    color: #cbd5e1;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ranger-stat strong {
    display: block;
    font-size: 1.5rem;
    color: #fbbf24;
    margin-bottom: 0.25rem;
}

.ranger-badge:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

/* Contact Page Specifics */
.contact-info-wrapper {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Override icon-box generic style for this specific use if needed,
   but usually generic is fine. We just removed inline styles. */
.contact-item .icon-box {
    margin-bottom: 0;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    /* Prevent icon shrinking */
}

.contact-item h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.text-break {
    color: var(--text-muted);
    word-break: break-all;
}

.link-primary {
    color: var(--primary);
    font-weight: 500;
}

.social-title {
    margin-bottom: 1rem;
}

.contact-socials {
    justify-content: flex-start;
}

/* MEDIA QUERIES */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-main);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border);
    }

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

    .mobile-menu-btn {
        display: block;
    }

    .hero-grid,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 3rem;
        /* Increased gap for better spacing */
        text-align: center;
    }

    .section-padding {
        padding: 6rem 0;
        /* More breathing room */
    }

    .page-header {
        padding: 120px 0 60px;
        margin-bottom: 2rem;
    }

    .hero-greeting,
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-visual {
        display: none;
    }

    .project-card,
    .card {
        text-align: center;
        /* Enforce center alignment */
        padding: 2rem;
    }

    .project-tags {
        justify-content: center;
    }

    /* Contact Items on Mobile */
    .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 2rem;
        background: white;
        padding: 1.5rem;
        border-radius: var(--radius-md);
        border: 1px solid var(--border);
    }

    .contact-item .icon-box {
        margin: 0 auto 1rem auto;
        /* Center icon */
    }

    .contact-socials {
        justify-content: center;
        margin-bottom: 2rem;
    }

    .form-group {
        text-align: left;
        /* Keep form labels left aligned for readability */
    }

    .ranger-banner {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        gap: 1.5rem;
    }

    .ranger-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .hero-stats {
        display: flex;
        width: 100%;
        min-width: 0;
        justify-content: center;
        gap: 2rem;
        margin-top: 2rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

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

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

    .btn {
        width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .timeline-container {
        padding-left: 1.5rem;
    }

    .timeline-dot {
        left: -2.1rem;
        /* Adjusted for smaller padding: -1.5 - 0.6 */
    }
}

/* Timeline Component Classes */
.timeline-section {
    padding-top: 5rem;
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
    border-left: 2px solid var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.6rem;
    top: 0;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    border: 4px solid white;
    z-index: 1;
}

.timeline-dot.primary {
    background: var(--primary);
}

.timeline-dot.secondary {
    background: var(--border);
}

/* Particle Background */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    background-color: var(--primary);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    opacity: 1;
}