/* Last.fm widget rounded corners */
.lastfm-widget {
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    margin: 1rem 0;
}
.lastfm-widget img {
    border-radius: 16px;
    display: block;
    max-width: 100%;
    height: auto;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Custom text selection color */
::selection {
    background: rgba(64, 224, 208, 0.3);
    color: white;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .burger {
        display: flex;
        z-index: 1002;
        position: relative;
    }

    .nav-links {
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        height: 100vh;
        transform: translateY(-110%);
        display: flex;
        flex-direction: column;
        background: rgba(26, 32, 44, 0.98);
        width: 100%;
        text-align: center;
        transition: transform 0.4s ease;
        backdrop-filter: blur(10px);
        padding: 4rem 2rem 2rem;
        z-index: 1001;
        gap: 1rem;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .nav-links.nav-active {
        transform: translateY(0);
    }

    .nav-links.nav-active li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 1rem;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-links a::after {
        display: none;
    }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(64, 224, 208, 0.9);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(64, 224, 208, 1);
    transform: translateY(-5px);
}

/* Image loading state */
img {
    transition: opacity 0.3s ease;
}

img:not([loaded]) {
    opacity: 0;
}

img[loaded] {
    opacity: 1;
}

/* Scroll animation classes */
.scroll-animate {
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: transform, opacity;
}

.animate-in {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}



body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: #1a202c;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

/* Hide scrollbar while keeping functionality */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.6);
    border-radius: 5px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.8);
    background-clip: padding-box;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.hero {
    background: #1a202c;
    color: white;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    --wave1-0: 40%;
    --wave1-10: 44%;
    --wave1-20: 47%;
    --wave1-30: 45%;
    --wave1-40: 42%;
    --wave1-50: 40%;
    --wave1-60: 38%;
    --wave1-70: 35%;
    --wave1-80: 33%;
    --wave1-90: 36%;
    --wave1-100: 40%;
    --wave2-0: 50%;
    --wave2-10: 54%;
    --wave2-20: 56%;
    --wave2-30: 53%;
    --wave2-40: 50%;
    --wave2-50: 47%;
    --wave2-60: 45%;
    --wave2-70: 43%;
    --wave2-80: 46%;
    --wave2-90: 48%;
    --wave2-100: 50%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.16), rgba(96, 165, 250, 0.04));
    clip-path: polygon(
        0% var(--wave1-0),
        10% var(--wave1-10),
        20% var(--wave1-20),
        30% var(--wave1-30),
        40% var(--wave1-40),
        50% var(--wave1-50),
        60% var(--wave1-60),
        70% var(--wave1-70),
        80% var(--wave1-80),
        90% var(--wave1-90),
        100% var(--wave1-100),
        100% 100%,
        0% 100%
    );
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.03));
    clip-path: polygon(
        0% var(--wave2-0),
        10% var(--wave2-10),
        20% var(--wave2-20),
        30% var(--wave2-30),
        40% var(--wave2-40),
        50% var(--wave2-50),
        60% var(--wave2-60),
        70% var(--wave2-70),
        80% var(--wave2-80),
        90% var(--wave2-90),
        100% var(--wave2-100),
        100% 100%,
        0% 100%
    );
    pointer-events: none;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
    z-index: 1000;
}

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

.nav-logo h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 300;
    position: relative;
    padding: 0.5rem;
    display: block;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #40E0D0;
    transition: width 0.3s ease-in-out;
}

.nav-links a:hover::after {
    width: 100%;
}

.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

.hero-content {
    text-align: center;
    padding: 8rem 0 4rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content h1 .cursor {
    font-weight: 100;
    color: #40E0D0;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.highlight {
    background: linear-gradient(45deg, #ffeaa7, #fdcb6e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: #1e293b;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cta-button:hover {
    background: #1e293b;
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

section {
    padding: 5rem 0;
}

h2 h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #e2e8f0;
}

h3 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #e2e8f0;
}

.about {
    background: #1a202c;
    color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.profile-image {
    margin: 0 auto;
    max-width: 100%;
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text {
        order: 2;
    }

    .profile-image {
        order: 1;
        margin-bottom: 3rem;
    }

    .image-placeholder {
        margin: 0 auto;
        padding: 1rem;
    }

    .image-placeholder {
        overflow: visible;
    }

    .lastfm-widget {
        width: 100%;
        max-width: 400px;
        margin-top: 0.5rem;
        position: relative;
        z-index: 5;
        display: block;
        padding: 0;
    }

    .lastfm-widget img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 12px;
    }

    .interests {
        padding-top: 4rem;
    }
}

.image-placeholder {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(5px);
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.image-placeholder p {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.interests {
    background: #1a202c;
    color: white;
    position: relative;
    z-index: 1;
    margin-top: 2rem;
}

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

@media (max-width: 768px) {
    .interests {
        margin-top: 4rem;
        padding-top: 2rem;
    }
    
    .interests-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .interests {
        margin-top: 3rem;
    }
    
    .interests-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.interest-card {
    position: relative;
    background: #1e293b;
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.interest-card:hover {
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.interest-card .icon {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.interest-card .icon i {
    transition: all 0.4s ease;
}

.interest-card:hover .icon i {
    transform: scale(1.1);
}

.interest-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
    transition: color 0.1s ease;
    transition-delay: 0s;
    will-change: color;
}

.interest-card:hover h3 {
    color: #60a5fa;
    transition-delay: 0s;
}

.interest-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.projects {
    background: #1a202c;
    color: white;
}

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

.project-card {
    position: relative;
    background: #1e293b;
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project-image {
    position: relative;
    background: linear-gradient(135deg, 
        rgba(96, 165, 250, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 100%);
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    color: white;
    text-align: center;
    padding: 3rem;
    transition: all 0.4s ease;
}

.project-card:hover .project-image {
    background: linear-gradient(135deg, 
        rgba(96, 165, 250, 0.15) 0%, 
        rgba(139, 92, 246, 0.15) 100%);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
    transition: color 0.1s linear !important;
    transition-delay: 0s !important;
    will-change: color;
}

.project-card:hover .project-content h3 {
    color: #60a5fa;
    transition-delay: 0s !important;
}

.project-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    margin-bottom: 1.5rem;
}


.tech-tag {
    display: inline-block;
    background: #edf2f7;
    color: #4a5568;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.project-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #764ba2;
}


.utilities {
    background: #1a202c;
    color: white;
    position: relative;
    overflow: hidden;
}

.utilities::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, rgba(96, 165, 250, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(96, 165, 250, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    opacity: 0.3;
}

.utilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.utility-card {
    position: relative;
    background: #1e293b;
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: white;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.utility-card:hover {
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.utility-image {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, 
        rgba(96, 165, 250, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(96, 165, 250, 0.2);
    transition: all 0.4s ease;
}

.utility-image::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: linear-gradient(135deg, #60a5fa, #8b5cf6);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: -1;
    filter: blur(4px);
}

.utility-card:hover .utility-image {
    transform: scale(1.05);
    background: linear-gradient(135deg, 
        rgba(96, 165, 250, 0.2) 0%, 
        rgba(139, 92, 246, 0.2) 100%);
}

.utility-card:hover .utility-image::before {
    opacity: 0.2;
}

.utility-image i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #60a5fa, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.4s ease;
}

.utility-card:hover .utility-image i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(96, 165, 250, 0.3));
}

.utility-card h3 {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: #e2e8f0;
    transition: color 0.2s ease;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.utility-card:hover h3 {
    color: #60a5fa;
}

.utility-card:nth-child(1) .utility-image i {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.utility-card:nth-child(2) .utility-image i {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.utility-card:nth-child(3) .utility-image i {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.utility-card:nth-child(4) .utility-image i {
    background: linear-gradient(135deg, #10b981, #059669);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* specific utility icon colors for LaTeX (5), Regex (6), Markdown (7), JSON (8) */
.utility-card:nth-child(5) .utility-image i {
    background: linear-gradient(135deg, #0b79f7, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.utility-card:nth-child(5) .utility-image::before{ background: linear-gradient(135deg, #0b79f7, #3b82f6); }

.utility-card:nth-child(6) .utility-image i {
    background: linear-gradient(135deg, #ff6a00, #ff8a00);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.utility-card:nth-child(6) .utility-image::before{ background: linear-gradient(135deg, #ff6a00, #ff8a00); }

.utility-card:nth-child(7) .utility-image i {
    background: linear-gradient(135deg, #b65d00, #d97706);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.utility-card:nth-child(7) .utility-image::before{ background: linear-gradient(135deg, #b65d00, #d97706); }

.utility-card:nth-child(8) .utility-image i {
    background: linear-gradient(135deg, #01796f, #06b6d4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.utility-card:nth-child(8) .utility-image::before{ background: linear-gradient(135deg, #01796f, #06b6d4); }

@media (max-width: 768px) {
    .utilities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .utility-card {
        padding: 1.5rem;
    }
    
    .utility-image {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .utility-image i {
        font-size: 2rem;
    }
    
    .utility-card h3 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .utilities-grid {
        grid-template-columns: 1fr;
    }
}

.contact {
    background: #1a202c;
    color: white;
    text-align: center;
}

.contact p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    background: #1e293b;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid rgba(96, 165, 250, 0.3);
    min-width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.contact-link:hover {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.15);
}

footer {
    background: #1a202c;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

footer p {
    opacity: 0.8;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .hero {
        cursor: default;
    }

    .hero::before,
    .hero::after {
        opacity: 0.7;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

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

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

    .contact-link {
        width: 200px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-content {
        padding: 6rem 0 3rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    section {
        padding: 3rem 0;
    }

    h2 {
        font-size: 2rem;
    }

    .image-placeholder {
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 0;
        margin: 0 auto;
    }

    .lastfm-widget {
        width: 100%;
        max-width: 100%;
        margin: 1rem 0;
        padding: 0;
    }

    .lastfm-widget img {
        width: 100%;
        height: auto;
    }
}

html {
    scroll-behavior: smooth;
}

/* Custom text selection color */
::selection {
    background: rgba(64, 224, 208, 0.3);
    color: white;
    scroll-behavior: smooth;
}

.interest-card:nth-child(1) .icon { color: #e74c3c; } /* drawing */
.interest-card:nth-child(2) .icon { color: #007bff; } /* programming */
.interest-card:nth-child(3) .icon { color: #f5f5dc; } /* reading */
.interest-card:nth-child(4) .icon { color: #9a0dad; } /* music */
.interest-card:nth-child(5) .icon { color: #1abc9c; } /* gardening */
.interest-card:nth-child(6) .icon { color: #7f8c8d; } /* engineering */
.interest-card:nth-child(7) .icon { color: #2ecc71; } /* chemistry */
.interest-card:nth-child(8) .icon { color: #a3d2ca; } /* sleeping */
.interest-card:nth-child(9) .icon { color: #f1c40f; } /* procrastinating */