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

html {
    scroll-behavior: smooth;
    overflow: hidden;
}

body {
    font-family: 'Courier Prime', monospace;
    background: radial-gradient(circle at center, oklch(11% 0.005 95) 0%, oklch(0% 0 0) 100%);
    color: oklch(100% 0 0);
    overflow-x: hidden;
    overflow-y: scroll;
    height: 100vh;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Custom Scrollbar - Webkit (Chrome, Safari, Edge) */
body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: oklch(0% 0 0);
}

body::-webkit-scrollbar-thumb {
    background: oklch(23% 0.003 95);
    border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
    background: oklch(35% 0.004 95);
}

/* Custom Scrollbar - Firefox */
body {
    scrollbar-width: thin;
    scrollbar-color: oklch(23% 0.003 95) oklch(0% 0 0);
}

#bubbles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    filter: blur(12px);
}

.content-overlay {
    position: relative;
    z-index: 2;
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    gap: 4rem;
}

.text-content {
    flex: 1;
}

.greeting {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: oklch(100% 0 0);
    line-height: 1.3;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8),
                 0 0 20px rgba(0, 0, 0, 0.6);
}

.name-wrapper {
    position: relative;
    display: inline-block;
}

.underline {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 20px;
    pointer-events: none;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: oklch(73% 0.002 95);
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Discord Activity */
.activity-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    max-width: fit-content;
}

.activity-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.activity-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.activity-name {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: oklch(100% 0 0);
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.activity-details {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: oklch(73% 0.002 95);
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.avatar-container {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid oklch(87% 0.18 95);
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.avatar-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top-color: oklch(87% 0.18 95);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.avatar-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: oklch(87% 0.18 95);
    margin-bottom: 3.5rem;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8),
                 0 0 20px rgba(0, 0, 0, 0.6);
}

#projects, #skills, #contact {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    content-visibility: auto;
    contain-intrinsic-size: 1px 900px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.project-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    contain: layout paint style;
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.7);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 12px 48px rgba(255, 215, 0, 0.2);
}

.project-card h3 {
    font-size: 1.5rem;
    color: oklch(87% 0.18 95);
    margin-bottom: 1rem;
}

.project-card p {
    color: oklch(73% 0.002 95);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(255, 215, 0, 0.1);
    color: oklch(87% 0.18 95);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.tag-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 215, 0, 0.1);
    color: oklch(87% 0.18 95);
    text-decoration: none;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: flex-end;
}

.project-link:hover {
    background: oklch(87% 0.18 95);
    color: oklch(0% 0 0);
    border-color: oklch(87% 0.18 95);
    transform: translateX(3px);
}

.link-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link:hover .link-icon {
    transform: translate(2px, -2px);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.skill-category {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    contain: layout paint style;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.7);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 12px 48px rgba(255, 215, 0, 0.2);
}

.skill-category h3 {
    font-size: 1.5rem;
    color: oklch(87% 0.18 95);
    margin-bottom: 1.5rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    color: oklch(73% 0.002 95);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-category li:last-child {
    border-bottom: none;
}

.skill-category li::before {
    content: "";
    color: oklch(87% 0.18 95);
    font-weight: bold;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-icon {
    width: 18px;
    height: 18px;
    fill: oklch(87% 0.18 95);
    flex-shrink: 0;
}

/* GitHub Activity Section */
#github-activity {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.github-graph-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
    width: fit-content; /* Fit to the graph size */
    max-width: 100%;
    margin: 0 auto; /* Center the card */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow: hidden;
}

.graph-header {
    font-size: 1.1rem;
    color: oklch(100% 0 0);
    margin-bottom: 0.5rem;
}

.github-graph-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.3) transparent;
    scroll-behavior: smooth;
}

.github-graph {
    display: grid;
    grid-template-columns: repeat(53, 14px);
    grid-template-rows: repeat(7, 14px);
    grid-auto-flow: column;
    gap: 4px;
    width: max-content;
}

/* Custom Scrollbar for graph on mobile */
.github-graph-wrapper::-webkit-scrollbar {
    height: 6px;
}

.github-graph-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.github-graph-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

.graph-cell {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: crosshair;
}

.graph-cell:hover {
    transform: scale(1.3);
    z-index: 10;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.level-0 { background: rgba(255, 255, 255, 0.05); }
.level-1 { background: rgba(255, 215, 0, 0.2); }
.level-2 { background: rgba(255, 215, 0, 0.4); }
.level-3 { background: rgba(255, 215, 0, 0.7); }
.level-4 { background: rgba(255, 215, 0, 1.0); }

.graph-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: oklch(73% 0.002 95);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.graph-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-cells {
    display: flex;
    gap: 4px;
}

.legend-cells .graph-cell {
    width: 12px;
    height: 12px;
    cursor: default;
}

.legend-cells .graph-cell:hover {
    transform: none;
    box-shadow: none;
}

.graph-loader {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.graph-loader::after {
    content: "";
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 215, 0, 0.1);
    border-top-color: oklch(87% 0.18 95);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    color: oklch(60% 0.19 25);
    font-size: 1rem;
    padding: 2rem;
}

/* Contact Section */
.contact-content {
    text-align: center;
}

.contact-content p {
    font-size: 1.2rem;
    color: oklch(73% 0.002 95);
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-links a {
    color: oklch(87% 0.18 95);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.contact-links a:hover {
    background: oklch(87% 0.18 95);
    color: oklch(0% 0 0);
    transform: translateY(-3px);
    border-color: oklch(87% 0.18 95);
    box-shadow: 0 12px 48px rgba(255, 215, 0, 0.2);
}

/* Scroll Indicator (Arrow) */
.scroll-indicator {
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-text {
    color: oklch(87% 0.18 95);
    font-size: 0.9rem;
    text-transform: lowercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.scroll-arrow {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Dots Navigation */
.dots-navigation {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dot:hover {
    background: rgba(255, 215, 0, 0.6);
    transform: scale(1.2);
}

.dot.active {
    background: oklch(87% 0.18 95);
    border-color: oklch(87% 0.18 95);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.dot::after {
    content: attr(title);
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: oklch(87% 0.18 95);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dot:hover::after {
    opacity: 1;
}

/* End Message */
.end-message {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    color: oklch(87% 0.18 95);
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8),
                 0 0 20px rgba(0, 0, 0, 0.6);
}

.end-message.visible {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    #bubbles-canvas {
        filter: blur(10px);
    }

    .project-card,
    .skill-category,
    .contact-links a {
        backdrop-filter: blur(15px);
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        scroll-snap-type: none;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        align-items: center;
    }

    .avatar {
        width: 140px;
        height: 140px;
    }

    .section {
        padding: 3rem 1.5rem;
        min-height: auto;
        height: auto;
        scroll-snap-align: none;
        margin-bottom: 3rem;
    }

    #hero {
        min-height: 100vh;
        margin-bottom: 0;
    }

    #projects, #skills, #contact {
        max-width: 100%;
        padding: 3rem 1rem;
    }

    #contact {
        padding-bottom: 5rem;
        margin-bottom: 5rem;
    }

    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0;
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
    }

    .project-card,
    .skill-category {
        padding: 1.5rem;
        border-radius: 8px;
        min-height: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .project-card,
    .skill-category,
    .contact-links a {
        backdrop-filter: blur(8px);
    }

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

    .project-card p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }

    .skill-category li {
        font-size: 0.95rem;
        padding: 0.5rem 0;
    }

    .tag {
        font-size: 0.8rem;
        padding: 0.25rem 0.7rem;
    }

    .project-tags {
        margin-bottom: 1.25rem;
    }

    .project-link {
        font-size: 0.9rem;
        padding: 0.6rem 1.1rem;
    }

    section h2 {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    .contact-content p {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .contact-links a {
        font-size: 1.05rem;
        padding: 0.7rem 1.3rem;
        width: 100%;
        max-width: 320px;
    }

    .scroll-text {
        display: none;
    }

    .scroll-indicator::before {
        content: 'swipe down';
        color: oklch(87% 0.18 95);
        font-size: 0.85rem;
        position: absolute;
        top: -1.5rem;
        white-space: nowrap;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    }

    .dots-navigation {
        right: 0.75rem;
        gap: 1.25rem;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .dot::after {
        display: none;
    }

    .activity-container {
        padding: 0.7rem 1.1rem;
        gap: 0.9rem;
        margin: 1.5rem auto 0;
        max-width: calc(100% - 2rem);
    }

    .activity-icon {
        width: 52px;
        height: 52px;
        border-radius: 8px;
    }

    .activity-name {
        font-size: 1rem;
    }

    .activity-details {
        font-size: 0.9rem;
    }
}

/* Cursor trail effect */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, rgba(255, 215, 0, 0.3) 50%, rgba(255, 215, 0, 0) 100%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.6s ease-out;
    opacity: 1;
    will-change: transform, opacity;
}

@media (max-width: 768px) {
    .cursor-trail {
        display: none;
    }
}

/* Footer */
.footer {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    text-align: center;
    pointer-events: auto;
}

.footer-text {
    color: oklch(73% 0.002 95);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

.footer-text a {
    color: oklch(87% 0.18 95);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-text a:hover {
    color: oklch(100% 0 0);
}

.footer.visible .footer-text {
    opacity: 1;
}

@media (max-width: 768px) {
    .end-message {
        bottom: 4.5rem;
        font-size: 1.3rem;
    }
    
    .footer {
        bottom: 1rem;
    }
    
    .footer-text {
        font-size: 0.8rem;
        padding: 0 1rem;
    }
}
