:root {
    --primary-color: #00ffff;
    --primary-dark: #00cccc;
    --accent-color: #ff6b6b;
    --text-color: #ffffff;
    --text-secondary: #ccd6f6;
    --bg-color: #0a192f;
    --card-bg: rgba(2, 12, 27, 0.8);
    --overlay-color: rgba(10, 25, 47, 0.85);
    --shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.7);
    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    --border-radius: 4px;
    --nav-height: 70px;
    --scroll-progress: 0;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.6;
    font-size: 18px;
    overflow-x: hidden;
}

/* Background Animation */
#bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

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

h1 {
    font-size: 3.5rem;
    background: linear-gradient(45deg, var(--primary-color), #ffffff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

ul {
    list-style-position: inside;
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--text-color);
}

/* Layout & Content */
.content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
}

nav a {
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
}

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

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

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: var(--nav-height);
}

.hero-content {
    padding: 2rem;
    max-width: 900px;
    animation: fadeIn 1s ease;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tagline {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 1rem 0 2rem;
    color: var(--text-secondary);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.primary-btn, .secondary-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    letter-spacing: 1px;
    transition: var(--transition);
    text-transform: uppercase;
}

.primary-btn {
    background: var(--primary-color);
    color: var(--bg-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.primary-btn:hover {
    background: var(--primary-dark);
    color: var(--bg-color);
}

.secondary-btn:hover {
    background: rgba(0, 255, 255, 0.1);
}

/* About Section */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.about-text {
    flex: 1;
}

.skills-list {
    flex: 1;
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem 1rem;
    padding: 0;
    margin: 0;
}

.skills-list h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.skills-list li {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 1.5rem;
}

.skills-list li:before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -15px rgba(0, 0, 0, 0.8);
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-content h3 {
    color: var(--text-color);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-stack span {
    font-size: 0.8rem;
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

.project-link {
    margin-top: auto;
    padding-top: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.timeline:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--primary-color);
}

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

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

.timeline-item:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
}

.timeline-content {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.date {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.company {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.achievements {
    list-style-type: none;
    padding-left: 0;
}

.achievements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.achievements li:before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    padding: 0.5rem;
    width: 100%;
    max-width: 400px;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.contact-item:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 90%;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .section {
        padding: 4rem 0;
    }

    .hero {
        align-items: flex-start;
        text-align: left;
        padding-left: 2rem;
    }

    .hero-content {
        padding: 0;
    }

    .cta-buttons {
        justify-content: flex-start;
    }

    nav ul {
        gap: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .timeline:before {
        left: 20px;
    }

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

    .timeline-item:before {
        left: 12px;
    }

    .contact-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 85%;
    }

    .section {
        padding: 3rem 0;
    }

    header {
        padding: 0 1rem;
    }

    nav ul {
        gap: 0.5rem;
        justify-content: space-around;
        width: 100%;
    }

    nav a {
        font-size: 0.9rem;
        padding: 0.5rem 0.3rem;
    }
}

/* Tech Stack Banner */
.tech-banner-container {
    width: 100vw;
    background: rgba(2, 12, 27, 0.3);
    overflow: hidden;
    padding: 1.5rem 0;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 4rem;
}

.tech-banner-container::before,
.tech-banner-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.tech-banner-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}

.tech-banner-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}

.tech-banner {
    width: 100%;
    overflow: hidden;
}

.tech-banner-track {
    display: flex;
    animation: tech-scroll 60s linear infinite;
    width: auto;
}

.tech-logo {
    flex: 0 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
}

.tech-logo img {
    height: 48px;
    max-width: 90px;
    object-fit: contain;
    filter: grayscale(20%) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) brightness(1.1);
    opacity: 0.9;
    transition: all 0.3s ease;
    background: transparent;
}

.tech-logo:hover img {
    filter: grayscale(0%) drop-shadow(0 3px 6px rgba(0, 255, 255, 0.3)) brightness(1.2);
    opacity: 1;
    transform: scale(1.2);
}

@keyframes tech-scroll {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0%);
    }
}

/* Pause animation on hover */
.tech-banner:hover .tech-banner-track {
    animation-play-state: paused;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fade-in.active {
    opacity: 1;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.slide-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Add a new media query for larger screens to change about-content layout */
@media (min-width: 769px) {
    .about-content {
        flex-direction: row;
        align-items: flex-start;
    }

    .about-text {
        flex-basis: 55%;
        margin-right: 2rem;
    }

    .skills-list {
        flex-basis: 40%;
    }
}

/* Contributions Graph */
.contributions-graph {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center; /* Center children (the graph grid) horizontally */
}

#contributions-container {
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: min-content;
    gap: 3px;
    margin-bottom: 1.5rem;
}

.contribution-day {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    position: relative;
    transition: transform 0.2s ease;
}

.contribution-day:hover {
    transform: scale(1.2);
    z-index: 2;
}

.contribution-day.month-separator {
    margin-left: 6px; /* Creates the gap between months */
}

.contribution-day .tooltip {
    visibility: hidden;
    width: 200px;
    background-color: #0d1117;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* So it doesn't interfere with hover */
}

.contribution-day:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.contributions-legend {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    width: 100%; /* Make legend take full width to align its content */
    justify-content: flex-end; /* Align content (text/colors) to the right */
}

.contributions-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.stat-item {
    background: var(--card-bg);
    padding: 1.5rem 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -10px rgba(0, 0, 0, 0.6);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.contributions-legend {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    width: 100%; /* Make legend take full width to align its content */
    justify-content: flex-end; /* Align content (text/colors) to the right */
}