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

:root {
    --bg: #070718;
    --cyan: #3cf7f7;
    --purple: #8b5cf6;
    --pink: #f472b6;
    --text: #e8e8f2;
    --text-dim: #9a9ab0;
    --glass: rgba(20, 20, 45, 0.55);
    --glass-border: rgba(60, 247, 247, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

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

.accent {
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* WebGL canvas */
#webgl {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
}

/* Scroll progress */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
    z-index: 200;
    transition: width 0.1s linear;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(7, 7, 24, 0.4);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s;
}

nav.scrolled {
    background: rgba(7, 7, 24, 0.85);
    border-bottom-color: var(--glass-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.06em;
}

.profile-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 2px solid var(--cyan);
}

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

.nav-links a {
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.25s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    transition: width 0.25s;
}

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

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

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--cyan);
}

/* Hero */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1.5rem;
}

.hero-content {
    max-width: 820px;
}

.hero-greeting {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.hero-name {
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 0 40px rgba(60, 247, 247, 0.35);
}

.hero-typed {
    font-size: clamp(1.05rem, 2.6vw, 1.5rem);
    color: var(--cyan);
    min-height: 2.2em;
    margin: 0.8rem 0 0.4rem;
    font-family: 'Space Grotesk', monospace;
}

.cursor {
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-sub {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

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

.btn {
    padding: 0.85rem 2.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.25s, box-shadow 0.25s;
}

.btn-primary {
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    color: #06060f;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(60, 247, 247, 0.35);
}

.btn-secondary {
    border: 1px solid var(--cyan);
    color: var(--cyan);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    background: rgba(60, 247, 247, 0.08);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.25);
}

/* Sections */
.section {
    position: relative;
    z-index: 1;
    padding: 6.5rem 1.5rem;
}

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

.section-header {
    text-align: center;
    margin-bottom: 3.2rem;
}

.section-title {
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    font-weight: 700;
}

.underline {
    width: 90px;
    height: 4px;
    margin: 0.9rem auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--cyan), var(--purple), var(--pink));
}

/* Glass card */
.glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* About */
.about-content {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    padding: 2.5rem;
}

.profile-image {
    flex: 0 0 260px;
}

.profile-image img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 40px rgba(60, 247, 247, 0.15);
}

.about-text h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tech-tag {
    font-size: 0.78rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    color: var(--cyan);
    background: rgba(60, 247, 247, 0.06);
    white-space: nowrap;
}

/* Education */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.6rem;
}

.education-card {
    padding: 1.8rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.education-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 50px rgba(60, 247, 247, 0.12);
}

.education-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
}

.education-card .duration {
    color: var(--purple);
    font-size: 0.88rem;
    font-weight: 600;
}

.education-card .cgpa {
    color: var(--cyan);
    font-size: 0.95rem;
    margin: 0.3rem 0;
}

.education-card .institution {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
}

.project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 60px rgba(139, 92, 246, 0.18);
}

.project-banner {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.texstudio-banner { background: linear-gradient(135deg, #0f4c75, #3282b8); }
.todo-banner      { background: linear-gradient(135deg, #7b2ff7, #f107a3); }
.resellify-banner { background: linear-gradient(135deg, #11998e, #38ef7d); }
.deepfake-banner  { background: linear-gradient(135deg, #c31432, #240b36); }
.car-banner       { background: linear-gradient(135deg, #f7971e, #ffd200); }

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
}

.project-content p {
    color: var(--text-dim);
    font-size: 0.92rem;
    flex: 1;
}

.project-content .tag-row {
    margin: 1rem 0;
}

.project-links {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.know-more {
    font-weight: 600;
    transition: letter-spacing 0.25s;
}

.know-more:hover {
    letter-spacing: 0.04em;
}

.gh-link {
    font-size: 0.88rem;
    color: var(--text-dim);
    border: 1px solid var(--glass-border);
    padding: 0.28rem 0.9rem;
    border-radius: 999px;
    transition: color 0.25s, border-color 0.25s;
}

.gh-link:hover {
    color: var(--cyan);
    border-color: var(--cyan);
}

/* Certificates */
.certificate-slider {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
    padding: 1.2rem;
}

.certificate-slides {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-slides img {
    display: none;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.certificate-slides img.displaySlide {
    display: block;
    animation: slideFade 0.6s ease;
}

@keyframes slideFade {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.certificate-slider .prev,
.certificate-slider .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(7, 7, 24, 0.7);
    color: var(--cyan);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.25s;
    z-index: 2;
}

.certificate-slider .prev { left: 0.8rem; }
.certificate-slider .next { right: 0.8rem; }

.certificate-slider .prev:hover,
.certificate-slider .next:hover {
    background: rgba(60, 247, 247, 0.15);
}

/* Blogs */
.blog-slider {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
    padding: 1.2rem;
}

.blog-slides {
    position: relative;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3rem;
}

.blog-slide {
    display: none;
    text-align: center;
}

.blog-slide.displaySlide {
    display: block;
    animation: slideFade 0.6s ease;
}

.blog-meta {
    color: var(--text-dim);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}

.blog-slide h3 {
    font-size: 1.3rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

.blog-deck {
    color: var(--text-dim);
    margin-bottom: 1.3rem;
}

.blog-slider .prev,
.blog-slider .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(7, 7, 24, 0.7);
    color: var(--cyan);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.25s;
    z-index: 2;
}

.blog-slider .prev { left: 0.8rem; }
.blog-slider .next { right: 0.8rem; }

.blog-slider .prev:hover,
.blog-slider .next:hover {
    background: rgba(60, 247, 247, 0.15);
}

/* Contact */
.map-wrap {
    overflow: hidden;
    padding: 0.6rem;
}

.map-wrap iframe {
    display: block;
    border: 0;
    border-radius: 12px;
    filter: grayscale(0.3) contrast(1.05);
}

/* Footer */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--glass-border);
    background: rgba(7, 7, 24, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.4rem 1.5rem;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-dim);
    font-size: 0.88rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: var(--text-dim);
    transition: color 0.25s, transform 0.25s;
    display: inline-flex;
}

.social-icons a:hover {
    color: var(--cyan);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 820px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(7, 7, 24, 0.96);
        backdrop-filter: blur(16px);
        width: 220px;
        border: 1px solid var(--glass-border);
        border-radius: 0 0 0 14px;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.35s ease;
    }

    .nav-links.active {
        max-height: 420px;
    }

    .nav-links li {
        padding: 0.85rem 1.4rem;
    }

    .about-content {
        flex-direction: column;
        padding: 1.8rem;
        text-align: center;
    }

    .profile-image {
        flex: 0 0 auto;
        max-width: 230px;
    }

    .tag-row {
        justify-content: center;
    }

    .project-content .tag-row,
    .project-card .tag-row {
        justify-content: flex-start;
    }

    .footer-row {
        justify-content: center;
        text-align: center;
    }
}
