/* =========================================
   VARIABLES & RESET
========================================= */
:root {
    /* Color Palette - Navy blue, lighter blues, and white */
    --bg-dark: #070B19;
    /* Very deep navy */
    --bg-surface: #0f172a;
    /* Navy blue surface */
    --primary: #3b82f6;
    /* Bright blue */
    --primary-light: #60a5fa;
    /* Lighter blue */
    --primary-glow: rgba(59, 130, 246, 0.4);
    --secondary: #1d4ed8;
    /* Deeper blue */
    --text-primary: #f8fafc;
    /* White/off-white */
    --text-secondary: #94a3b8;
    /* Slate gray */

    /* Glassmorphism Variables */
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Typography */
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Particles Container */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg-dark);
}

/* Typography & Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

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

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.w-100 {
    width: 100%;
}

.highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 30%;
    bottom: 5px;
    left: 0;
    background-color: var(--primary-glow);
    z-index: -1;
    border-radius: 4px;
}

/* =========================================
   GLASSMORPHISM UTILITIES
========================================= */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-sans);
    font-size: 1rem;
}

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

.btn-primary:hover {
    box-shadow: 0 6px 20px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-light);
}

/* =========================================
   NAVIGATION
========================================= */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1.5rem 0;
}

.glass-nav.scrolled {
    background: rgba(7, 11, 25, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

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

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

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

/* =========================================
   HERO SECTION
========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 800px;
}

.badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.hero-heading {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 0.5rem;
    min-height: 1.25em;
}

.hero-typewriter {
    white-space: nowrap;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 0.82em;
    margin-left: 0.12em;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: 1px;
    vertical-align: -0.06em;
    animation: cursor-blink 0.85s steps(1, end) infinite;
}

.typing-cursor.is-done {
    animation: none;
    opacity: 0;
    width: 0;
    margin-left: 0;
    transition: opacity 0.35s ease, width 0.2s ease, margin 0.2s ease;
}

@keyframes cursor-blink {
    0%,
    45% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .hero-typewriter {
        white-space: normal;
    }
}

.hero h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
}

/* Ticker Animation */
.tech-stack-ticker {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
}

.ticker {
    display: flex;
    gap: 3rem;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ticker-item i {
    color: var(--primary);
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* =========================================
   SECTIONS GENERAL
========================================= */
.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    display: inline-block;
    position: relative;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* =========================================
   ABOUT SECTION
========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-mono);
}

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

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================
   SKILLS SECTION
========================================= */
.skills-intro {
    max-width: 720px;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-category--wide {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1100px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .skills-category--wide {
        grid-column: 1 / -1;
    }
}

.skills-category {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color 0.3s ease;
}

.skills-category:hover {
    border-color: rgba(59, 130, 246, 0.25);
}

.skills-cat-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.skills-cat-icon {
    flex-shrink: 0;
    width: 2.6rem;
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.06));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    color: var(--primary-light);
    font-size: 1.05rem;
}

.skills-cat-title {
    font-size: 1.15rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.skill-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.skill-list li {
    position: relative;
    padding: 0.55rem 0 0.55rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.45;
}

.skill-list li.skill-list-item--with-icon {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-left: 0;
}

.skill-list li.skill-list-item--with-icon::before {
    display: none;
}

.skill-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.skill-list li:not(.skill-list-item--with-icon)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.78rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.skill-list li:not(.skill-list-item--with-icon):has(.skill-detail)::before {
    top: 0.72rem;
}

.skill-icon-img,
.skill-tag-icon {
    flex-shrink: 0;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

.skill-icon-img {
    width: 22px;
    height: 22px;
    margin-top: 0.12rem;
}

.skill-icon-fa {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.08rem;
    color: var(--primary-light);
    font-size: 0.95rem;
}

.skill-list-item--with-icon .skill-text {
    flex: 1;
    min-width: 0;
}

.skill-text--plain {
    color: var(--text-primary);
    font-weight: 500;
}

.skill-list .skill-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.skill-list .skill-detail {
    display: block;
    margin-top: 0.2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.95;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.12);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.skill-tag-icon {
    width: 18px;
    height: 18px;
}

.skill-tag:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.28);
}

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

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-icon {
    font-size: 2rem;
    color: var(--primary);
}

.icon-link {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-left: 1rem;
}

.icon-link:hover {
    color: var(--primary-light);
}

/* Live Demo Button */
.btn-live-demo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.78rem;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 3px 10px var(--primary-glow);
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 0.75rem;
}

.btn-live-demo:hover {
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.55);
    transform: translateY(-2px);
    color: white;
}

.btn-live-demo i {
    font-size: 0.85rem;
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.project-tags span {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

.mini-chart-container {
    height: 150px;
    width: 100%;
    margin-top: auto;
}

/* =========================================
   CONTACT SECTION
========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

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

.contact-list {
    list-style: none;
    margin-bottom: 2rem;
}

.contact-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.contact-list i {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================
   FOOTER
========================================= */
footer {
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    background: rgba(7, 11, 25, 0.5);
    backdrop-filter: blur(5px);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* =========================================
   TIMELINE (EXPERIENCE & EDUCATION)
========================================= */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(59, 130, 246, 0.3);
    top: 0;
    bottom: 0;
    left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 3px solid var(--bg-dark);
    border-radius: 50%;
    left: -27px;
    top: 24px;
    z-index: 1;
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-content {
    padding: 1.5rem 2rem;
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--primary-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

.timeline-header {
    margin-bottom: 1rem;
}

.timeline-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.timeline-header h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.timeline-item ul {
    list-style-type: none;
    color: var(--text-secondary);
    padding-left: 0;
}

.timeline-item ul li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.5;
}

.timeline-item ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 1.1rem;
}

/* =========================================
   ANIMATIONS & RESPONSIVE
========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide for simple implementation, can add toggle later */
    }

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

    .hero {
        padding-top: 100px;
        text-align: center;
    }

    .hero-content {
        align-items: center;
        text-align: center;
    }

    .hero-heading {
        font-size: 2.2rem;
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    .hero h2 {
        font-size: 1.4rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2.5rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        gap: 1.2rem;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 1rem 1.8rem;
    }
}