html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: #000;
    color: #fff;
    font-family: Arial, sans-serif;
}

/* ===== NAVIGATION BAR ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    z-index: 100;
    backdrop-filter: blur(5px);
}
#navbar a {
    color: #fff;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s;
}
#navbar a:hover {
    color: #99CCFF;
}

/* ===== INTRO SECTION ===== */
#intro-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}
#intro-section canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ===== SOCIAL ICONS ===== */
#social-links {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 30px;
    z-index: 10;
}
#social-links img {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#social-links img:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

/* ===== TEXT ELEMENTS ===== */
#subtext {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Caveat', cursive;
    font-size: 1.5em;
    color: #ffffff;
    text-align: center;
    z-index: 10;
}
.star-link {
    color: #ffffff;
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: rainbow-glow 3s ease-in-out infinite, pulse 1.5s ease-in-out infinite;
}
.star-link:hover {
    opacity: 1;
    transform: scale(1.3);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 0 25px rgba(255, 255, 255, 0.7);
}
@keyframes rainbow-glow {
    0% { text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000; }
    16% { text-shadow: 0 0 5px #ff9900, 0 0 10px #ff9900; }
    33% { text-shadow: 0 0 5px #ffff00, 0 0 10px #ffff00; }
    50% { text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00; }
    66% { text-shadow: 0 0 5px #0000ff, 0 0 10px #0000ff; }
    83% { text-shadow: 0 0 5px #9900ff, 0 0 10px #9900ff; }
    100% { text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.8); }
}
#scroll-down {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1em;
    opacity: 0.7;
    animation: bounce 2s infinite;
    z-index: 10;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
}

/* ===== DIALOG OVERLAY ===== */
#dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}
#dialog-text {
    font-family: 'Caveat', cursive;
    font-size: 2em;
    color: #fff;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}
@media (max-width: 768px) {
    #dialog-text {
        font-size: 1.5em;
    }
}

/* ===== SECTIONS ===== */
#summary, #skills, #projects, #blogs, #footer {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background: #000;
    opacity: 0;
    transition: opacity 0.5s ease-in, transform 0.5s ease-in;
    transform: translateY(20px);
}
#summary.visible, #skills.visible, #projects.visible, #blogs.visible, #footer.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Summary Section */
#summary {
    margin-top: 50px;
    padding: 50px;
}
#summary h2 {
    font-family: 'Caveat', cursive;
    font-size: 2.5em;
    margin-bottom: 20px;
}
#summary p {
    font-size: 1.2em;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Skills Section */
#skills {
    margin-top: 50px;
    padding: 50px 0;
}
#skills h2 {
    font-family: 'Caveat', cursive;
    font-size: 2.5em;
    margin-bottom: 40px;
}
.skills-container {
    width: 100vw;
    margin: 0;
    padding: 0 15px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}
.skills-row {
    display: flex;
    gap: 30px;
    padding: 15px 0;
    white-space: nowrap;
    will-change: transform;
}
.skills-row:nth-child(1) .skill-card:hover {
    background: rgba(255, 100, 100, 0.3);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 100, 100, 0.2);
    z-index: 1;
}
.skills-row:nth-child(2) .skill-card:hover {
    background: rgba(255, 255, 0, 0.3);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 255, 0, 0.2);
    z-index: 1;
}
.skills-row:nth-child(3) .skill-card:hover {
    background: rgba(100, 255, 100, 0.3);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(100, 255, 100, 0.2);
    z-index: 1;
}
.skill-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 15px 40px;
    font-size: 1.2em;
    color: #fff;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.skill-card:hover {
    transform: scale(1.1);
    z-index: 1;
}

/* Projects Section */
#projects {
    margin-top: 50px;
    padding: 50px;
}
#projects h2 {
    font-family: 'Caveat', cursive;
    font-size: 2.5em;
    margin-bottom: 40px;
}
#projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.project-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}
.project-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}
.project-card p {
    font-size: 1em;
    margin-bottom: 15px;
    color: #ddd;
}
.project-card a {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}
.project-card a:hover {
    background: #ddd;
}

/* Blogs Section */
#blogs {
    margin-top: 50px;
    padding: 50px;
    width: 80%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
#blogs h2 {
    font-family: 'Caveat', cursive;
    font-size: 2.5em;
    margin-bottom: 30px;
}
#blog-content {
    text-align: left;
    color: #fff;
    line-height: 1.6;
    font-size: 1.2em;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
}
#blog-content h1 {
    font-size: 1.8em;
    margin-bottom: 20px;
}
#blog-content p {
    margin-bottom: 15px;
}

/* Footer */
#footer {
    margin-top: 50px;
    padding: 20px;
    color: #aaa;
    font-size: 1em;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #intro-section {
        height: 100vh;
    }
    #summary, #skills, #projects, #blogs {
        padding: 30px;
    }
    #summary h2, #skills h2, #projects h2, #blogs h2 {
        font-size: 2em;
    }
    #social-links {
        top: 70%;
    }
    #subtext {
        font-size: 1.2em;
    }
    #blog-content {
        font-size: 1em;
        padding: 20px;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .skills-container {
        padding: 0 10px;
    }
    
    .skill-card {
        padding: 12px 30px;
        font-size: 1.1em;
    }
    
    #summary p {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    #navbar {
        padding: 10px;
        gap: 15px;
    }
    
    #navbar a {
        font-size: 0.9em;
    }
    
    #intro-section {
        height: 90vh;
    }
    
    #summary, #skills, #projects, #blogs {
        padding: 30px 20px;
    }
    
    #summary h2, #skills h2, #projects h2, #blogs h2 {
        font-size: 2em;
    }
    
    #social-links {
        gap: 20px;
    }
    
    #social-links img {
        width: 30px;
        height: 30px;
    }
    
    #subtext {
        font-size: 1.2em;
        width: 90%;
    }
    
    .skill-card {
        padding: 10px 20px;
        font-size: 1em;
    }
    
    .project-card {
        width: 100%;
        margin: 10px 0;
    }
    
    #blog-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    #navbar {
        padding: 8px;
        gap: 10px;
    }
    
    #navbar a {
        font-size: 0.8em;
    }
    
    #intro-section {
        height: 85vh;
    }
    
    #summary h2, #skills h2, #projects h2, #blogs h2 {
        font-size: 1.8em;
    }
    
    #summary p {
        font-size: 1em;
        max-width: 95%;
    }
    
    #social-links {
        gap: 15px;
    }
    
    #social-links img {
        width: 25px;
        height: 25px;
    }
    
    #subtext {
        font-size: 1em;
        width: 95%;
    }
    
    .skill-card {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    #scroll-down {
        font-size: 0.9em;
    }
    
    #dialog-text {
        font-size: 1.2em;
        padding: 0 15px;
    }
}

/* Add viewport meta tag to HTML */
@media (max-width: 320px) {
    #navbar a {
        font-size: 0.7em;
    }
    
    #summary h2, #skills h2, #projects h2, #blogs h2 {
        font-size: 1.5em;
    }
    
    .skill-card {
        padding: 6px 12px;
        font-size: 0.8em;
    }
}