/*
 * Design Tokens & Reset
 */
 :root {
    --bg-color: #000000;
    --card-bg: #0A0A0A;
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --accent: #4F46E5; /* Indigo */
    --accent-hover: #4338CA;
    --accent-glow: rgba(79, 70, 229, 0.3);

    --font-main: 'Lato', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-full: 9999px;

    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 96px;
}

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

html {
    scroll-behavior: smooth;
}

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

/*
 * Utility & Layout
 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-spacing {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

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

.text-white { color: white; }
.accent { color: var(--accent); }

/*
 * Background Glows
 */
.background-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.15;
}

.top-left { top: -200px; left: -200px; }
.bottom-right { bottom: -200px; right: -200px; }

/*
 * Header & Nav
 */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: var(--spacing-sm) 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    border: 2px solid var(--accent);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
}

.logo:hover {
    box-shadow: 0 0 12px rgba(79, 70, 229, 0.5);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

.nav-links .btn {
    margin-left: var(--spacing-xs);
}



/*
 * Typography
 */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: var(--spacing-lg); }
h3 { font-size: 1.5rem; margin-bottom: var(--spacing-sm); }

@media (min-width: 768px) {
    h1 { font-size: 4.5rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 1.25rem; }
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 65ch;
}

/*
 * Buttons
 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px -5px var(--accent-glow);
}

.btn-primary-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-full);
    background-color: var(--accent);
    color: white;
}

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/*
 * Hero Section
 */
.hero-section {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px; /* Offset fixed header */
    position: relative;
}

@media (min-width: 768px) {
    .hero-section {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--spacing-lg);
    }
}

.hero-content {
    flex: 1;
    max-width: 100%;
    z-index: 2;
    position: relative;
}

@media (min-width: 768px) {
    .hero-content {
        max-width: 66.67%;
    }
}

/* Particle Network Background */
#particle-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 33.33%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    display: none;
}

@media (min-width: 768px) {
    #particle-bg {
        display: block;
    }
}

#particle-bg canvas {
    width: 100% !important;
    height: 100% !important;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.label-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.label-text {
    color: var(--text-secondary);
}

.label-sep {
    color: var(--card-border);
    font-weight: 300;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.hero-title {
    margin-bottom: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.hero-greeting {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    display: block;
}

.typing-container {
    display: inline;
}

.typing-text {
    color: var(--accent);
    font-weight: 600;
}

.typing-cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@media (min-width: 768px) {
    .hero-greeting {
        font-size: 4rem;
    }
    .hero-tagline {
        font-size: 2rem;
    }
}

.hero-subtitle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-sm);
}

.hero-stack {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.hero-stack:hover {
    color: var(--accent);
}

.hero-divider {
    color: var(--card-border);
    font-size: 0.9rem;
    font-weight: 300;
}

.hero-philosophy {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
}

.btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(79, 70, 229, 0.1);
}

.btn-ghost i {
    width: 20px;
    height: 20px;
}

/*
 * About Section
 */
.about-content {
    max-width: 800px;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.about-text:last-child {
    margin-bottom: 0;
}

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

/*
 * Cards & Bento Grid
 */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    border-color: rgba(79, 70, 229, 0.4);
    transform: translateY(-4px);
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

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

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: var(--spacing-sm);
}

.skill-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-card:hover,
.skill-card:focus {
    transform: translateY(-6px);
    border-color: var(--accent);
    outline: none;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.skill-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent);
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon,
.skill-card:focus .skill-icon {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

.skill-card h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    transition: color 0.2s ease;
}

.skill-card:hover h4,
.skill-card:focus h4 {
    color: var(--accent);
}

.skill-detail {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-xs);
    border-top: 1px solid var(--card-border);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-detail,
.skill-card:focus .skill-detail {
    opacity: 1;
    max-height: 50px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: var(--spacing-sm);
}

.tags span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all 0.2s;
    letter-spacing: -0.02em;
}

.card:hover .tags span {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.08);
}

/*
 * Timeline / Experience
 */
.timeline {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    position: relative;
    padding-left: 40px;
    margin-top: var(--spacing-md);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent) 50%, var(--card-border) 100%);
}

.timeline-item {
    position: relative;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -41px;
    top: 24px;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 3px solid var(--accent);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -25px;
    top: 31px;
    width: 24px;
    height: 2px;
    background: var(--card-border);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.role {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
}

.date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.location {
    font-size: 0.85rem;
    margin-bottom: var(--spacing-sm);
    opacity: 0.7;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.05) 100%);
    border: 1px solid rgba(79, 70, 229, 0.25);
    border-radius: var(--radius-md);
    min-width: 90px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.timeline-subtext {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: var(--spacing-xs);
    font-style: normal;
    letter-spacing: -0.02em;
}

.timeline-section-title {
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: var(--spacing-md) 0 var(--spacing-sm) 0;
    font-weight: 600;
}

.timeline-content ul {
    list-style-position: inside;
    margin-top: var(--spacing-sm);
    color: var(--text-secondary);
}

.timeline-content li {
    margin-bottom: 6px;
    line-height: 1.5;
}

/*
 * Lists
 */
.check-list {
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/*
 * Footer
 */
footer {
    border-top: 1px solid var(--card-border);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
    text-align: center;
}

.footer-content h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.footer-content p {
    max-width: 50ch;
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    flex-wrap: wrap;
}

.link-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.link-item:hover {
    color: var(--accent);
}

.education {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.3);
}

.template-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: var(--spacing-sm);
    font-size: 0.8rem;
}

.template-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.template-link a:hover {
    color: var(--accent);
}

.template-link a i {
    width: 14px;
    height: 14px;
}

.template-link .version {
    font-family: var(--font-mono);
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
}

/*
 * Animation Base
 */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/*
 * Enhanced Animations
 */

/* Scroll Progress Bar */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: var(--scroll-progress, 0%);
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #ff6b6b);
    z-index: 1000;
    transition: width 0.1s linear;
}

/* Tag Hover Effects */
.tags span:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--accent-glow);
    cursor: default;
}

/* Button Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    pointer-events: none;
    left: var(--ripple-x, 50%);
    top: var(--ripple-y, 50%);
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Logo Accent Pulse */

/* Card Glow on Hover (mouse-follow) */
.card {
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        var(--accent-glow) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

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

.card > * {
    position: relative;
    z-index: 1;
}

/* Timeline Slide-in Animation */
.timeline-item.is-visible {
    animation: slideInFromLeft 0.6s ease-out forwards;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Timeline Item Hover */
.timeline-item:hover {
    border-color: var(--accent);
    background: rgba(79, 70, 229, 0.03);
}

.timeline-item:hover::before {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    transform: scale(1.2);
}

.timeline-item:hover::after {
    background: var(--accent);
}

/* Hero Animation */
.hero-section {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s ease forwards;
    animation-delay: 0.2s;
}

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

.hero-title .accent,
.hero-title .text-white {
    display: inline;
}

/* Staggered Card Animation */
.bento-grid .card {
    opacity: 0;
    transform: translateY(30px);
}

.bento-grid .card.is-visible {
    animation: cardReveal 0.6s ease forwards;
}

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

/* Skip to Content Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    z-index: 1001;
    transition: top 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
    top: 0;
}

/* Noscript Fallback */
noscript .fade-in-section {
    opacity: 1;
    transform: none;
}

/*
 * Projects Section
 */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

.project-card {
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.project-icon {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.project-icon svg {
    width: 100%;
    height: 100%;
}

.project-links {
    display: flex;
    gap: var(--spacing-xs);
}

.project-links a {
    color: var(--text-secondary);
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 4px;
}

.project-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.project-links svg {
    width: 20px;
    height: 20px;
}

/* Flagship badge - corner ribbon style */
.project-card.flagship {
    position: relative;
    overflow: hidden;
}

.flagship-badge {
    position: absolute;
    top: 12px;
    right: -30px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 36px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
    z-index: 10;
}

.project-card.flagship .project-links {
    margin-right: 40px;
}

.project-card h3 {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-xs);
    transition: color 0.2s ease;
}

.project-card:hover h3 {
    color: var(--accent);
}

.project-card p {
    font-size: 0.95rem;
    flex-grow: 1;
}

.project-card .tags {
    margin-top: auto;
}

.projects-more {
    text-align: center;
    margin-top: var(--spacing-lg);
}

.projects-more a {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

.projects-more a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(79, 70, 229, 0.05);
}

.projects-more a i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.projects-more a:hover i {
    transform: translateX(4px);
}

/* Open Source Section - Horizontal Scroll */
.opensource-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--card-bg);
}

.opensource-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.opensource-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 3px;
}

.opensource-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.opensource-grid {
    display: flex;
    gap: var(--spacing-md);
    width: max-content;
    padding: 0 var(--spacing-md);
}

.opensource-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 280px;
    min-width: 280px;
}

.opensource-card:hover {
    border-color: var(--accent);
}

.opensource-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
}

.opensource-icon {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.opensource-icon i {
    width: 100%;
    height: 100%;
}

.opensource-stats {
    display: flex;
    gap: 8px;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

.stat-badge i {
    width: 12px;
    height: 12px;
}

.opensource-card h3 {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    transition: color 0.3s ease;
}

.opensource-card:hover h3 {
    color: var(--accent);
}

.opensource-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: var(--spacing-sm);
}

.opensource-card .tags {
    margin-top: auto;
}

/* Posts - Horizontal Scroll */
.posts-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--card-bg);
}

.posts-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.posts-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 3px;
}

.posts-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.posts-grid {
    display: flex;
    gap: var(--spacing-md);
    width: max-content;
    padding: 0 var(--spacing-md);
}

.posts-grid .twitter-tweet {
    margin: 0 !important;
    flex-shrink: 0;
}

.posts-grid .twitter-tweet,
.posts-grid .twitter-tweet-rendered,
.posts-grid iframe.twitter-tweet {
    width: 280px !important;
    max-width: 280px !important;
}

/*
 * Mobile Menu
 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    bottom: -7px;
}

/* Hamburger X transformation */
.mobile-menu-btn.active .hamburger {
    background: transparent;
}

.mobile-menu-btn.active .hamburger::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #000;
        flex-direction: column;
        padding: var(--spacing-md) var(--spacing-lg);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        border-bottom: 1px solid var(--card-border);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        display: flex !important;
    }

    .nav-links a {
        display: block !important;
        padding: 0.75rem 0;
        text-align: left;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links .btn {
        margin: var(--spacing-md) 0 0 0;
        padding: 0.75rem 1.5rem;
        text-align: center;
        display: inline-block !important;
        width: 100%;
    }
}

/* Section Title Styling */
.section-title {
    text-align: left;
}

.section-tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-weight: 300;
}

.section-tagline a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.section-tagline a:hover {
    color: var(--accent);
}

@media (min-width: 768px) {
    .section-tagline {
        font-size: 1.75rem;
    }
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.cta-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

.cta-icon svg {
    width: 36px;
    height: 36px;
    color: var(--accent);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-glow); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px 10px var(--accent-glow); }
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cta-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.cta-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.cta-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cta-actions .btn svg {
    width: 18px;
    height: 18px;
}

@media (min-width: 768px) {
    .cta-title {
        font-size: 2.5rem;
    }
    .cta-subtitle {
        font-size: 1.5rem;
    }
    .cta-icon {
        width: 100px;
        height: 100px;
    }
    .cta-icon svg {
        width: 44px;
        height: 44px;
    }
}

/* Tech Stack Horizontal Scroll */
.tech-stack-section {
    overflow: hidden;
}

.tech-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    mask-image: linear-gradient(
        to right,
        transparent,
        black 8%,
        black 92%,
        transparent
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        black 8%,
        black 92%,
        transparent
    );
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tech-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.tech-scroll-track {
    display: flex;
    align-items: stretch;
    gap: var(--spacing-lg);
    width: max-content;
}

/* Tech Group - Label + Logos */
.tech-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    padding-left: 60px;
}

/* Vertical timeline line */
.tech-group::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--card-border) 30%, var(--card-border) 100%);
}

.tech-category-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.05) 100%);
    border: 1px solid rgba(79, 70, 229, 0.4);
    border-radius: var(--radius-md);
    white-space: nowrap;
    position: relative;
    margin-bottom: var(--spacing-sm);
}

/* Horizontal connector from timeline to label */
.tech-category-label::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 2px;
    background: var(--accent);
}

/* Timeline dot for label */
.tech-category-label::after {
    content: '';
    position: absolute;
    left: -46px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--accent);
    border: 3px solid var(--bg-color);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent);
}

.tech-logos-row {
    display: flex;
    gap: var(--spacing-sm);
    position: relative;
}

/* Horizontal line above logos */
.tech-logos-row::before {
    content: '';
    position: absolute;
    left: -40px;
    top: -12px;
    right: 0;
    height: 2px;
    background: var(--card-border);
}

/* Connector from vertical timeline to horizontal logos line */
.tech-logos-row::after {
    content: '';
    position: absolute;
    left: -40px;
    top: -12px;
    width: 2px;
    height: 12px;
    background: var(--card-border);
}


.tech-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    cursor: default;
    min-width: 75px;
    height: 85px;
    flex-shrink: 0;
    position: relative;
}

/* Vertical connector from logo to horizontal line */
.tech-logo-item::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 12px;
    background: var(--card-border);
    transition: all 0.3s ease;
}

/* Node dot on horizontal line */
.tech-logo-item::after {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--bg-color);
    border: 2px solid var(--card-border);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.tech-logo-item:hover {
    transform: translateY(2px);
    border-color: var(--accent);
    background: rgba(79, 70, 229, 0.08);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.2);
}

.tech-logo-item:hover::before {
    background: var(--accent);
}

.tech-logo-item:hover::after {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.tech-logo-item i {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tech-logo-item:hover i {
    color: var(--text-primary);
    transform: scale(1.1);
}

.tech-logo-item span {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
}

.tech-logo-item:hover span {
    color: var(--accent);
}

@media (min-width: 768px) {
    .tech-logo-item {
        min-width: 85px;
        height: 90px;
        padding: var(--spacing-sm);
    }

    .tech-logo-item i {
        font-size: 2.25rem;
    }

    .tech-logo-item span {
        font-size: 0.7rem;
    }

    .tech-category-label {
        font-size: 1rem;
        padding: 14px 24px;
    }
}

/* Lucide Icon Animations */
.project-icon i,
.skill-icon i {
    width: 40px;
    height: 40px;
    stroke: var(--accent);
    transition: all 0.3s ease;
}

.skill-icon i {
    width: 20px;
    height: 20px;
}

.project-links a i {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    transition: all 0.3s ease;
}

.project-links a:hover i {
    stroke: var(--accent);
    transform: translateY(-2px);
}

/* Icon hover animations */
.project-card:hover .project-icon i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px var(--accent));
}

.skill-card:hover .skill-icon i {
    transform: rotate(10deg) scale(1.1);
    filter: drop-shadow(0 0 6px var(--accent));
}

/* Specific icon animations */
[data-lucide="shopping-cart"] {
    animation: cartBounce 3s ease-in-out infinite;
}

[data-lucide="bot"] {
    animation: botPulse 2s ease-in-out infinite;
}

[data-lucide="trending-up"] {
    animation: trendFloat 2.5s ease-in-out infinite;
}

[data-lucide="zap"] {
    animation: zapFlash 2s ease-in-out infinite;
}

@keyframes cartBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes botPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes trendFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-2px) rotate(2deg); }
}

@keyframes zapFlash {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.8; filter: brightness(1.3); }
}
