:root {
    --bg-color: #0f172a;
    --text-color: #94a3b8;
    --heading-color: #e2e8f0;
    --accent-color: #5eead4;
    --transition-duration: 1s;
}

/* Base Styles */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: "League Spartan", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    scrollbar-width: none;
}

/* Typography */
h1, h2, h3 {
    color: var(--heading-color);
    margin: 0;
}

h1 {
    font-size: 3.25rem; /* Increased from 3rem */
    font-weight: 700;
    color: var(--heading-color);
    margin: 0;
    cursor: pointer;
    transition: color var(--transition-duration) ease;
}

h1:hover {
    color: var(--accent-color);
}

h2 {
    font-size: 2.25rem; /* Increased from 2rem */
    font-weight: 500;
    color: var(--heading-color);
    margin: 0;
}

h3 {
    font-size: 1.35rem; /* Increased from base size */
    color: var(--heading-color);
    margin: 0;
}

p {
    font-size: 1.15rem; /* Increased from 1.1rem */
    font-weight: 400;
    line-height: 1.6;
    max-width: 65ch;
}

/* Layout */
#gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: radial-gradient(
        circle 500px at var(--x) var(--y),
        rgba(94, 234, 212, 0.15),
        transparent 80%
    );
}

#about {
    padding-top: 40px !important; /* Aligns with the name on left */
}

#skills {
    padding-top: 40px !important; /* Aligns with the name on left */
}

#projects {
    padding-top: 40px !important; /* Aligns with the name on left */
}

#experience {
    padding-top: 40px !important; /* Aligns with the name on left */
}

.container {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    pointer-events: all;
}

/* Left Pane */
.left-pane {
    width: calc(min(300px, 30%));
    padding: 40px;
    position: fixed;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.left-pane-content {
    flex: 1;
}

/* Navigation */
.section-nav {
    margin-top: 40px;
}

.section-nav ul {
    list-style-type: none;
    padding: 0;
}

.section-nav li {
    margin-bottom: 20px;
}

.section-nav a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-nav a::before {
    content: '';
    width: 40px;
    height: 1px;
    background-color: var(--text-color);
    margin-right: 10px;
    transition: all var(--transition-duration) ease;
}

.section-nav a.active {
    color: var(--accent-color);
}

.section-nav a.active::before {
    width: 80px;
    background-color: var(--accent-color);
}

/* Right Pane */
.right-pane {
    width: calc(100% - min(380px, calc(30% + 80px)));
    margin-left: calc(min(300px, 30%) + 40px);
    padding: 40px;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    pointer-events: all;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
}

/* hide scrollbar */
.right-pane::-webkit-scrollbar {
    display: none;
}

.right-pane section {
    min-height: 100vh;
    scroll-snap-align: start;
    padding: 0;
    position: relative;
    scroll-margin-bottom: 10vh;
}

.right-pane section h2 {
    padding: 20px 0;
    margin-bottom: 24px;
    cursor: pointer;
    transition: color var(--transition-duration) ease;
}

.right-pane section h2:hover {
    color: var(--accent-color);
}

.right-pane section > *:last-child {
    margin-bottom: 15vh;
}

.right-pane section:last-child > *:last-child {
    margin-bottom: 0; /* Keep last section without extra margin */
}

/* Cards (Projects, Experience, Skills) */
.project-card, .experience-item, .skill-category {
    background-color: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 16px;
    border: 1px solid rgba(94, 234, 212, 0.1);
    transition: transform var(--transition-duration) ease, 
    box-shadow var(--transition-duration) ease, 
    opacity var(--transition-duration) ease;
}

.skill-category.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover, .experience-item:hover, .skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(94, 234, 212, 0.1);
}

/* Project Preview */
.project-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin: 24px 0;
}

.project-preview img {
    width: 100%;
    display: block;
    border-radius: 8px;
    transition: transform var(--transition-duration) ease;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-duration) ease;
}

.preview-overlay span {
    color: var(--accent-color);
    font-size: 2rem;
    font-weight: 500;
}

.project-preview:hover .preview-overlay {
    opacity: 1;
}

.project-preview:hover img {
    transform: scale(1.02);
}

.experience-title-group h3 {
    margin-bottom: 12px; /* Add space between title and date */
}

.experience-subtitle {
    color: var(--text-color);
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 16px; /* Add space between date and description */
}

.experience-description {
    margin-bottom: 16px;
    line-height: 1.6;
}

/* Skills and Tags */
.skills-grid, .project-skills, .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.skill-tag, .skill-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: rgba(94, 234, 212, 0.1);
    border-radius: 25px;
    font-size: 15px;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover, .skill-item:hover {
    background-color: rgba(94, 234, 212, 0.2);
    transform: translateY(-2px);
}

.skill-tag i, .skill-item i {
    color: var(--accent-color);
    font-size: 16px;
}

/* Social Links */
.social-links {
    margin-top: auto;
    padding-bottom: 40px;
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--text-color);
    transition: background-color var(--transition-duration) ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
}

.icon {
    width: 20px;
    height: 20px;
    fill: var(--bg-color);
}

/* External Links */
.external-link {
    text-decoration: none;
    color: var(--accent-color);
    transition: all var(--transition-duration) ease;
    opacity: 0.8;
}

.external-link::after {
    content: '↗';
    margin-left: 4px;
}

.external-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Mobile Styles */
@media (max-width: 768px) {
    body, html {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .container {
        flex-direction: column;
        padding: 0;
        height: auto;
    }

    .left-pane {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
        background-color: rgba(15, 23, 42, 0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(94, 234, 212, 0.1);
    }

    .left-pane h1 {
        font-size: 2.5rem;
    }

    .left-pane h2 {
        font-size: 1.5rem;
    }

    .left-pane p {
        font-size: 1rem;
        max-width: 100%;
    }

    .section-nav {
        margin-top: 20px;
    }

    .section-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .section-nav li {
        margin: 0;
    }

    .section-nav a {
        font-size: 14px;
    }

    .section-nav a::before {
        width: 20px;
    }

    .section-nav a.active::before {
        width: 40px;
    }

    .right-pane {
        width: 100%;
        margin-left: 0;
        padding: 20px;
        height: auto;
        overflow-y: visible;
        scroll-snap-type: none;
    }

    .right-pane section {
        min-height: auto;
        scroll-snap-align: none;
        padding: 40px 0;
    }

    .social-links {
        margin-top: 20px;
        justify-content: center;
    }

    #gradient-background {
        z-index: 0;
    }

    .left-pane, .right-pane {
        position: relative;
        z-index: 1;
    }

    .project-card, .experience-item, .skill-category {
        margin-bottom: 20px;
    }

    .resume-button {
        text-align: center;
        margin: 40px 0;
    }

    .resume-link {
        display: inline-block;
        padding: 12px 24px;
        background-color: rgba(94, 234, 212, 0.1);
        border: 1px solid var(--accent-color);
        border-radius: 6px;
        color: var(--accent-color);
        text-decoration: none;
        font-size: 1rem;
        transition: all var(--transition-duration) ease;
    }

    .resume-link:hover {
        background-color: rgba(94, 234, 212, 0.2);
    }
}

.resume-button {
    margin-top: 20px;
    text-align: left;
}

.resume-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: rgba(94, 234, 212, 0.1);
    border-radius: 25px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all var(--transition-duration) ease;
    border: 1px solid rgba(94, 234, 212, 0.1);
}

.resume-link:hover {
    background-color: rgba(94, 234, 212, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(94, 234, 212, 0.1);
}

.view-more-button {
    margin-top: 20px;
    text-align: left;
    ;
}

.view-more-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: rgba(94, 234, 212, 0.1);
    border-radius: 25px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-family: "League Spartan", Arial, sans-serif;
    transition: all var(--transition-duration) ease;
    border: 1px solid rgba(94, 234, 212, 0.1);
    cursor: pointer;
}

.view-more-link:hover {
    background-color: rgba(94, 234, 212, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(94, 234, 212, 0.1);
}

.back-to-top-button {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background-color: rgba(94, 234, 212, 0.1);
    border-radius: 25px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-family: "League Spartan", Arial, sans-serif;
    transition: all var(--transition-duration) ease;
    border: 1px solid rgba(94, 234, 212, 0.1);
    cursor: pointer;
    z-index: 1000;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    z-index: 9999;
}

.back-to-top-button.visible {
    display: block;
}

@media (max-width: 768px) {
    .back-to-top-button {
        position: sticky;
        position: -webkit-sticky;
        bottom: 20px;
        margin-left: auto;
        margin-right: 20px;
    }
}


.back-to-top-button.visible {
    display: block;
}
