:root {
    --bg-color: #0b1121;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --primary-color: #06b6d4;
    --secondary-color: #3b82f6;
    --accent-color: #8b5cf6;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --card-hover-bg: rgba(255, 255, 255, 0.06);
    --font-family: 'Outfit', sans-serif;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-text: linear-gradient(135deg, #22d3ee 0%, #818cf8 100%);
    --gradient-glow: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.15), transparent 70%);
}

[data-theme="light"] {
    --bg-color: #f1f5f9;
    --text-color: #0f172a;
    --text-muted: #475569;
    --primary-color: #0891b2;
    --secondary-color: #2563eb;
    --accent-color: #7c3aed;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-hover-bg: rgba(255, 255, 255, 0.8);
    --gradient-text: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
    --gradient-glow: radial-gradient(circle at 50% 50%, rgba(8, 145, 178, 0.1), transparent 70%);
}

/* Theme Toggle Button */
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    color: var(--primary-color);
    transform: rotate(15deg);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
    color: var(--text-color);
    font-family: var(--font-family);
    overflow-x: hidden;
    line-height: 1.7;
    min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Particles Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: transparent;
}

@media (max-width: 768px) {
    #particles-canvas {
        display: none;
    }
}



/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.logo a {
    text-decoration: none;

}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Layout & Utils */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 800;
    position: relative;
    display: block;
    /* ensure it takes full width */
    width: 100%;
    /* Removed transformation hack to fix centering */
}

.section-title span {
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover-bg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 2rem;
    /* Account for navbar */
    position: relative;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    text-align: center;
    margin-top: -80px;
}

.hero-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.greeting {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.greeting::before {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.greeting::after {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-title .highlight {
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
}

.hero-bio {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 550px;
    line-height: 1.8;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Hero Image Styling */
.hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.hero-img-bg {
    position: absolute;
    width: min(420px, 75vw);
    height: min(420px, 75vw);
    background: conic-gradient(from 0deg, transparent 0%, var(--primary-color) 40%, var(--accent-color) 70%, transparent 100%);
    border-radius: 50%;
    animation: rotate 4s linear infinite;
    z-index: 1;
    opacity: 0.8;
    filter: blur(10px);
}

.hero-img {
    width: min(360px, 70vw);
    height: min(360px, 70vw);
    object-fit: cover;
    display: block;
    overflow: hidden;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    border: 4px solid rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
    transition: transform 0.5s ease;
    max-width: 100%;
}

/* Disable tilt/transform side effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .hero-img {
        transform: none !important;
    }

    .hero-image-container {
        perspective: none;
    }
}

.hero-img:hover {
    transform: scale(1.05);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate-centered {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Stats Section */
.stats-section {
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* About Section */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.about-img-wrapper {
    position: relative;
}

.about-img-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    z-index: 0;
    opacity: 0.5;
}

.about-img {
    width: 100%;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.about-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.skills-wrapper {
    margin-top: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    background: var(--glass-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-value {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    position: relative;
}

.progress-value::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Projects & Blog Grid */
.projects-grid,
.blog-grid {
    display: grid;
    /* smaller min to work better on phones */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2.5rem;
}

.project-card,
.blog-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-img-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.glass-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.card-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.tech-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tech-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.card-link:hover {
    gap: 0.8rem;
}

/* Contact Section */
.contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: var(--glass-bg);
    padding: 4rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

/* Timeline / Experience Styles */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    /* Adjust for mobile, desktop usually center */
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 80px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s ease;
}

.timeline-item.active {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    position: absolute;
    left: 21px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    z-index: 2;
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

.timeline-date {
    position: absolute;
    left: -120px;
    /* Only works if layout allows, for mobile we stack */
    top: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    width: 100px;
    display: none;
    /* Hidden by default, enable on large screens if desired */
}

.timeline-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
    position: relative;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(6, 182, 212, 0.3);
}

.timeline-header h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.timeline-body p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-wrapper {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(11, 17, 33, 0.95);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid var(--glass-border);
    }

    .navbar .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero-image-container {
        margin-top: 60px;
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .greeting {
        justify-content: center;
    }

    .greeting::before {
        display: none;
    }

    .hero-image-container {
        order: -1;
    }

    .hero-img {
        width: 320px;
        /* Increased for tablets */
        height: 320px;
    }

    .hero-img-bg {
        width: 350px;
        height: 350px;
    }

    .about-wrapper {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 4rem 0;
    }

}

/* Small Mobile */
@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-bio {
        font-size: 1rem;
        max-width: 320px;
    }

    /* Fix large gap at top on mobile */
    .hero-section {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 3rem;
        align-items: flex-start;
    }

    /* Larger, perfectly square hero image on small devices and pushed down from top */
    .hero-img {
        width: min(300px, 66vw);
        height: min(300px, 66vw);
        aspect-ratio: 1/1;
        object-fit: cover;
        object-position: center;
        display: block;
        margin: 0 auto;
        /* Force centering */
    }

    .hero-image-container {
        margin-top: 20px;
        margin-bottom: 2rem;
        padding: 0;

        /* Remove padding to simplify centering */
    }

    .hero-img-bg {
        width: min(380px, 67vw);
        height: min(380px, 69vw);
        top: 50%;
        left: 50%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        animation: rotate-centered 4s linear infinite;
        /* Use centered rotation */
    }

    .nav-links a {
        font-size: 1rem;
    }

    .container {
        padding: 0 16px;
    }

    .card-img-wrapper {
        height: 180px;
    }

    .contact-wrapper {
        padding: 2.5rem;
    }

    .timeline {
        padding-left: 0;
    }

    .timeline-item {
        padding-left: 0;
    }
}


/* Scroll Animation Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Typing Effect Cursor */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--primary-color);
    margin-left: 5px;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Footer Styles */
/* Footer Styles */
footer {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-heading {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--gradient-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Smoke Button Hover Effect (Cloud) */
.smoke-btn {
    position: relative;
    z-index: 1;
    /* Keep button text above smoke */
    transition: transform 0.3s ease;
}

.smoke-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(135, 206, 235, 0.6) 0%, rgba(135, 206, 235, 0.1) 60%, transparent 80%);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0;
    transition: all 0.5s ease-out;
    z-index: -1;
}

.smoke-btn:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.8);
    /* Cloud expands */
}

.smoke-btn:hover {
    transform: translateY(-3px);
    /* Gentle lift */
}

/* Add a second layer for more "fluffiness" */
.smoke-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.3);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(135, 206, 235, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0;
    transition: all 0.7s ease-out;
    z-index: -2;
}

.smoke-btn:hover::after {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(2.2);
    /* Outer cloud expands more */
}