/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
:root {
    /* Colors - Dark Premium Theme */
    --bg-primary: #0a0a0c;
    --bg-secondary: #131316;
    --bg-tertiary: #1c1c21;
    --bg-elevated: rgba(255, 255, 255, 0.03);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-glow: rgba(59, 130, 246, 0.4);

    --border-color: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --container-width: 1200px;
    --section-padding: 6rem;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 600;
}

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

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-label {
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 2px;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    gap: 0.5rem;
    border: none;
    font-family: var(--font-body);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 14px var(--accent-glow);
}

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

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

.btn-outline:hover {
    background: var(--bg-elevated);
    border-color: var(--text-secondary);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 0;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 1rem 0;
    background-color: rgba(10, 10, 12, 0.85);
    border-bottom-color: var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-profile-img {
    width: 56px;
    /* Increased picture size */
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin: -10px 0;
    /* Prevents the image from expanding the navbar height */
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg,
            var(--text-primary) 0%,
            var(--text-primary) 40%,
            var(--accent-primary) 50%,
            var(--text-primary) 60%,
            var(--text-primary) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shineText 4s linear infinite;
}

@keyframes shineText {
    to {
        background-position: 200% center;
    }
}

.logo:hover .nav-profile-img {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

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

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    overflow: hidden;
    z-index: 10;
}

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

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    /* Animation */
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.1s;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    font-weight: 800;
    max-width: 700px;
    /* Constrain width to prevent multiline shifting when typing */
    /* Animation */
    animation: zeroG 6s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.6;
    /* Animation */
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.5s;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    /* Animation */
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.7s;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.hero-actions {
    display: flex;
    gap: 1rem;

    /* Animation */
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.9s;
}

/* Background Effects */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.glow-1 {
    top: -100px;
    right: -100px;
    background: var(--accent-primary);
}

.glow-2 {
    bottom: -200px;
    left: -200px;
    background: var(--accent-secondary);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    background-color: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.about-text strong {
    color: var(--text-primary);
}

.info-badges {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.info-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.info-badge i {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.skills-container {
    background: var(--bg-tertiary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.skills-container h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.skill-tag:hover {
    background: var(--border-color);
    border-color: var(--text-secondary);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-5px);
    background: var(--bg-tertiary);
    border-color: rgba(255, 255, 255, 0.15);
}

.project-card:hover::before {
    opacity: 1;
}

.project-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ==========================================================================
   Experience Timeline
   ========================================================================== */
.experience {
    background-color: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 11px;
    width: 2px;
    background: var(--border-color);
}

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

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

.timeline-dot {
    position: absolute;
    left: 4px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 0 4px var(--bg-secondary);
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.timeline-role {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.timeline-achievements {
    list-style: none;
}

.timeline-achievements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.timeline-achievements li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    box-shadow: 0 0 0 rgba(59, 130, 246, 0.4);
    animation: pulseDot 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* ==========================================================================
   Insights Section
   ========================================================================== */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.insight-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.insight-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.insight-content {
    padding: 2rem;
}

.insight-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.insight-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.read-more i {
    width: 16px;
    height: 16px;
    transition: var(--transition-fast);
}

.insight-card:hover .read-more i {
    transform: translateX(4px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
}

.footer-cta {
    text-align: center;
    max-width: 600px;
    margin-bottom: 4rem;
}

.footer-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-logo span {
    display: block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Typing Effect Cursor */
.typing-cursor {
    color: var(--accent-primary);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes zeroG {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}

/* ==========================================================================
   Custom Cursor Rules
   ========================================================================== */
* {
    /* Hide default cursor to show custom one */
    cursor: none !important;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.custom-cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(59, 130, 246, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    margin-top: -22px;
    margin-left: -22px;
    transition: width 0.2s, height 0.2s, margin 0.2s, background-color 0.2s, border-color 0.2s;
}

/* Hover States for Cursor when over interactive elements */
.custom-cursor.cursor-hover {
    width: 0;
    height: 0;
}

.custom-cursor-follower.follower-hover {
    width: 64px;
    height: 64px;
    margin-top: -32px;
    margin-left: -32px;
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 1);
    backdrop-filter: blur(2px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {

    .nav-links,
    .navbar .btn {
        display: none;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-dot {
        left: -11px;
    }

    .timeline-item {
        padding-left: 2rem;
    }
}