:root {
    --background-color: #121212;
    --card-color: #1E1E1E;
    --accent-color-1: #007BFF;
    --accent-color-2: #00BFFF;
    --text-color: #EAEAEA;
    --secondary-text-color: #A0A0A0;
    --border-color: #333333;
}

html {
    scroll-padding-top: 4rem;
}

body {
    font-family: 'JetBrains Mono', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: radial-gradient(ellipse at center, #222222 0%, #121212 100%);
    color: var(--text-color);
    caret-color: transparent;
}

#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.sparkle {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: white;
    border-radius: 50%;
    animation: sparkle-animation 5s infinite;
}

@keyframes sparkle-animation {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

.sparkle:nth-child(1) { top: 10%; left: 10%; animation-delay: 0.5s; }
.sparkle:nth-child(2) { top: 20%; left: 80%; animation-delay: 1s; }
.sparkle:nth-child(3) { top: 30%; left: 40%; animation-delay: 1.5s; }
.sparkle:nth-child(4) { top: 40%; left: 90%; animation-delay: 2s; }
.sparkle:nth-child(5) { top: 50%; left: 20%; animation-delay: 2.5s; }
.sparkle:nth-child(6) { top: 60%; left: 70%; animation-delay: 3s; }
.sparkle:nth-child(7) { top: 70%; left: 30%; animation-delay: 3.5s; }
.sparkle:nth-child(8) { top: 80%; left: 60%; animation-delay: 4s; }
.sparkle:nth-child(9) { top: 90%; left: 10%; animation-delay: 4.5s; }
.sparkle:nth-child(10) { top: 95%; left: 90%; animation-delay: 5s; }
.sparkle:nth-child(11) { top: 15%; left: 55%; animation-delay: 0.8s; }
.sparkle:nth-child(12) { top: 25%; left: 25%; animation-delay: 1.2s; }
.sparkle:nth-child(13) { top: 35%; left: 75%; animation-delay: 1.8s; }
.sparkle:nth-child(14) { top: 45%; left: 5%; animation-delay: 2.2s; }
.sparkle:nth-child(15) { top: 55%; left: 65%; animation-delay: 2.8s; }
.sparkle:nth-child(16) { top: 65%; left: 15%; animation-delay: 3.2s; }
.sparkle:nth-child(17) { top: 75%; left: 85%; animation-delay: 3.8s; }
.sparkle:nth-child(18) { top: 85%; left: 45%; animation-delay: 4.2s; }
.sparkle:nth-child(19) { top: 5%; left: 95%; animation-delay: 4.8s; }
.sparkle:nth-child(20) { top: 88%; left: 5%; animation-delay: 5.2s; }
.sparkle:nth-child(21) { top: 3%; left: 33%; animation-delay: 0.3s; }
.sparkle:nth-child(22) { top: 18%; left: 68%; animation-delay: 1.3s; }
.sparkle:nth-child(23) { top: 28%; left: 18%; animation-delay: 1.9s; }
.sparkle:nth-child(24) { top: 38%; left: 88%; animation-delay: 2.3s; }
.sparkle:nth-child(25) { top: 48%; left: 28%; animation-delay: 2.9s; }
.sparkle:nth-child(26) { top: 58%; left: 78%; animation-delay: 3.3s; }
.sparkle:nth-child(27) { top: 68%; left: 8%; animation-delay: 3.9s; }
.sparkle:nth-child(28) { top: 78%; left: 58%; animation-delay: 4.3s; }
.sparkle:nth-child(29) { top: 88%; left: 18%; animation-delay: 4.9s; }
.sparkle:nth-child(30) { top: 98%; left: 88%; animation-delay: 5.3s; }
.sparkle:nth-child(31) { top: 7%; left: 47%; animation-delay: 0.6s; }
.sparkle:nth-child(32) { top: 17%; left: 87%; animation-delay: 1.1s; }
.sparkle:nth-child(33) { top: 27%; left: 37%; animation-delay: 1.6s; }
.sparkle:nth-child(34) { top: 37%; left: 97%; animation-delay: 2.1s; }
.sparkle:nth-child(35) { top: 47%; left: 17%; animation-delay: 2.6s; }
.sparkle:nth-child(36) { top: 57%; left: 77%; animation-delay: 3.1s; }
.sparkle:nth-child(37) { top: 67%; left: 27%; animation-delay: 3.6s; }
.sparkle:nth-child(38) { top: 77%; left: 67%; animation-delay: 4.1s; }
.sparkle:nth-child(39) { top: 87%; left: 7%; animation-delay: 4.6s; }
.sparkle:nth-child(40) { top: 97%; left: 97%; animation-delay: 5.1s; }
.sparkle:nth-child(41) { top: 12%; left: 22%; animation-delay: 0.4s; }
.sparkle:nth-child(42) { top: 22%; left: 72%; animation-delay: 1.4s; }
.sparkle:nth-child(43) { top: 32%; left: 12%; animation-delay: 2.4s; }
.sparkle:nth-child(44) { top: 42%; left: 82%; animation-delay: 3.4s; }
.sparkle:nth-child(45) { top: 52%; left: 22%; animation-delay: 4.4s; }
.sparkle:nth-child(46) { top: 62%; left: 92%; animation-delay: 5.4s; }
.sparkle:nth-child(47) { top: 72%; left: 2%; animation-delay: 0.9s; }
.sparkle:nth-child(48) { top: 82%; left: 52%; animation-delay: 1.9s; }
.sparkle:nth-child(49) { top: 92%; left: 22%; animation-delay: 2.9s; }
.sparkle:nth-child(50) { top: 2%; left: 92%; animation-delay: 3.9s; }

header {
    background-color: var(--card-color);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color-1);
}

main {
    padding: 2rem;
}

section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

#hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--accent-color-1), var(--accent-color-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--secondary-text-color);
    font-family: 'JetBrains Mono', monospace;
}

.quote {
    font-style: italic;
    margin-top: 2rem;
    color: var(--accent-color-1);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(to right, var(--accent-color-1), var(--accent-color-2)) 1;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.project-grid, .experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-item p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--secondary-text-color);
}

.tool-desc {
    font-size: 0.8rem;
    color: var(--secondary-text-color);
}

.tool-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: filter 0.3s ease, transform 0.3s ease;
    position: relative;
}

.tool-logo:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px var(--accent-color-1));
}

.project-card img {
    max-width: 100%;
}

.github-project-card {
    padding: 0.5rem;
}

.download-link {
    display: block;
    margin-top: 1rem;
    text-align: center;
    font-weight: bold;
    color: var(--accent-color-1);
}

.extension-info {
    text-align: center;
    font-size: 0.8rem;
    color: var(--secondary-text-color);
    margin-top: 0.5rem;
}

.experience-card, .education-card, .project-card {
    background-color: var(--card-color);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.experience-card:hover, .education-card:hover, .project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 123, 255, 0.2);
    border-color: var(--accent-color-1);
}

.experience-card h3, .education-card h3, .project-card h3 {
    margin-top: 0;
    color: var(--accent-color-1);
}

.logo-img {
    max-width: 100px;
    max-height: 50px;
    margin-bottom: 1rem;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.experience-card:hover .logo-img {
    transform: scale(1.1);
}

a {
    color: var(--accent-color-1);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-color);
    border-top: 1px solid var(--border-color);
}

#contact .contact-box {
    display: flex;
    gap: 2rem;
    align-items: stretch; /* Make items stretch to same height */
    flex-wrap: wrap;
}

#contact .contact-item {
    background-color: var(--card-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#contact .contact-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 123, 255, 0.2);
    border-color: var(--accent-color-1);
}

.linkedin-box {
    flex-grow: 0;
    min-width: auto;
    padding: 0;
}

.linkedin-box > * {
    max-width: 100%;
}

.contact-item img {
    max-width: 100%;
}

#contact .contact-item h3 {
    margin-top: 0;
    color: var(--accent-color-1);
}

.username-link {
    color: inherit;
    text-decoration: none;
}

.username-link:hover {
    text-decoration: underline;
}

.university-link {
    color: inherit;
    text-decoration: none;
}

.university-link:hover {
    text-decoration: underline;
}

/* Hamburger menu styles */
.hamburger {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger .bar {
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* Responsive navigation */
@media (max-width: 768px) {
    .hamburger {
        display: flex; /* Show hamburger on small screens */
    }

    nav ul.nav-links {
        display: none; /* Hide nav links by default */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Adjust based on header height */
        left: 0;
        background-color: var(--card-color);
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
    }

    nav ul.nav-links.active {
        display: flex; /* Show nav links when active */
    }

    nav ul.nav-links li {
        margin: 0;
        text-align: center;
        padding: 0.5rem 0;
    }

    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    body {
        padding: 1rem; /* Reduce overall padding */
    }

    h1 {
        font-size: 3rem; /* Adjust heading size */
    }

    h2 {
        font-size: 2rem; /* Adjust heading size */
    }

    .hero-text p {
        font-size: 1rem; /* Adjust paragraph size */
    }

    header {
        padding: 0.5rem 1rem; /* Adjust header padding */
    }

    nav ul.nav-links {
        top: 50px; /* Adjust based on new header height */
    }

    .experience-card, .education-card, .project-card, #contact .contact-item {
        padding: 1.5rem; /* Reduce card padding */
        min-width: unset; /* Allow contact items to shrink */
    }

    .linkedin-box {
        max-width: 260px; /* Force LinkedIn box to be smaller */
    }
}