/* =====================
   Design Tokens
   ===================== */

:root {
    --bg: #0b0f1a;
    --surface: #101626;
    --elev: #141b2f;
    --text: #e6e9f1;
    --muted: #a5adc6;
    --accent: #6c7bff;
    /* indigo */
    --accent-2: #b45cff;
    /* purple */
    --success: #2ecc71;
    --danger: #ff6b6b;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --container: 1100px;
}


/* Typography */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background: radial-gradient(1200px 600px at 70% -10%, rgba(108, 123, 255, .15), transparent 60%), linear-gradient(180deg, #0b0f1a 0%, #0a0d17 100%);
    line-height: 1.6;
    font-size: 16px;
}

h1,
h2,
h3 {
    font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    margin: 0 0 .4rem;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.3px;
}

h2 {
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
    margin: 15px;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin: 0 0 1rem;
    color: var(--muted);
}


/* Layout helpers */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}


/* Navbar */

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(160%) blur(10px);
    background: rgba(10, 13, 23, .55);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    max-width: var(--container);
    margin: 0 auto;
}

.navbar::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108, 123, 255, .55), rgba(180, 92, 255, .45), transparent);
    pointer-events: none;
}

.navbar.is-scrolled {
    background: rgba(10, 13, 23, .75);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}

.logo {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: "Poppins";
    padding: 6px 10px;
    border-radius: 10px;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.logo:hover {
    background: linear-gradient(180deg, rgba(108, 123, 255, .18), rgba(180, 92, 255, .14));
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    position: relative;
    color: var(--muted);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 10px;
    transition: color .2s ease, background .2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .04);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 18px;
}


/* Hero */

.hero {
    padding: 96px 0 64px;
}

.hero-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    color: #cfd6ff;
    font-weight: 600;
    letter-spacing: .4px;
    margin-bottom: .5rem;
}

.hero-tagline {
    font-size: 1.05rem;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-top: 22px;
}


/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    transition: transform .15s ease, box-shadow .15s ease, background .2s ease, border-color .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn.primary {
    background: linear-gradient(180deg, rgba(108, 123, 255, .85), rgba(180, 92, 255, .85));
    border-color: transparent;
}

.btn.ghost {
    background: transparent;
}

.btn.small {
    padding: 10px 14px;
    font-size: .95rem;
}


/* About */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    align-items: center;
}

.about-image img {
    width: 100%;
    max-width: 280px;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, .06);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.about-content p {
    margin-bottom: 1rem;
}

.about-details {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    color: var(--muted);
}

.about-details li {
    margin-bottom: 6px;
}

.about-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


/* Skills */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.skill {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .06);
    padding: 16px;
    border-radius: 14px;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}

.skill:hover {
    transform: translateY(-4px) scale(1.01);
    background: #12172a;
    border-color: rgba(108, 123, 255, .22);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .45), 0 0 0 1px rgba(108, 123, 255, .12) inset;
}


/* Decorative gradient glow on hover */

.skill::after {
    content: "";
    position: absolute;
    inset: -40% -60% auto -60%;
    height: 140%;
    background: radial-gradient(600px 240px at 40% 0%, rgba(108, 123, 255, .14), rgba(180, 92, 255, .10), transparent 70%);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}

.skill:hover::after {
    opacity: 1;
    transform: translateY(-6px);
}

.skill-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #dde2ff;
}

.proficiency {
    font-size: .8rem;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(108, 123, 255, .14);
    color: #e6e9f1;
}

.proficiency-advanced {
    background: rgba(108, 123, 255, .12);
    border-color: rgba(108, 123, 255, .24);
}

.proficiency-expert {
    background: linear-gradient(180deg, rgba(108, 123, 255, .2), rgba(180, 92, 255, .18));
    border-color: rgba(180, 92, 255, .36);
}

.progress {
    background: #12172a;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .06);
    position: relative;
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 14px rgba(108, 123, 255, .45);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}


/* Progress hover effects */

.skill:hover .progress span {
    transform: scaleY(1.35);
    box-shadow: 0 0 22px rgba(108, 123, 255, .65);
    filter: saturate(1.2);
}

.progress::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .18) 20%, transparent 40%);
    transform: translateX(-100%);
    pointer-events: none;
}

.skill:hover .progress::after {
    animation: progress-shimmer 900ms ease forwards;
}

@keyframes progress-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}


/* Projects */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.project-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.project-card.featured {
    border-color: rgba(108, 123, 255, .35);
    box-shadow: 0 22px 50px rgba(108, 123, 255, .12), var(--shadow);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    background: #0f1529;
}

.project-card.featured:hover {
    background: #101a33;
    border-color: rgba(108, 123, 255, .55);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #0c1122;
    border-radius: 12px;
}

.project-card img.fit-contain {
    object-fit: contain;
    background: #0e1426;
}

.project-card.featured img {
    background: radial-gradient(600px 200px at 40% -10%, rgba(108, 123, 255, .18), transparent 60%), #0e1426;
    margin: 15px 12px 0;
    width: calc(100% - 24px);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}


/* Ensure project1.jpg always fits inside without cropping */

.project-card img[src$="project1.jpg"] {
    object-fit: contain;
    background: #0e1426;
}

.project-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 4px 0 8px;
    padding: 0;
}

.project-card .tags li {
    font-size: .8rem;
    color: #dfe4ff;
    background: rgba(108, 123, 255, .14);
    border: 1px solid rgba(108, 123, 255, .26);
    padding: 6px 10px;
    border-radius: 999px;
}


/* Contact */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.socials {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.contact-meta {
    list-style: none;
    padding: 0;
    margin: 10px 0 14px;
    color: var(--muted);
    display: grid;
    gap: 6px;
}

.contact-meta span {
    color: #dfe4ff;
    margin-right: 6px;
}

.contact-meta a {
    color: #cfd6ff;
    text-decoration: underline;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #e6e9f1;
    text-decoration: none;
    transition: transform .15s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.social-link img {
    width: 18px;
    height: 18px;
}

.social-link span {
    font-size: .92rem;
}

.social-link:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(108, 123, 255, .16), rgba(180, 92, 255, .12));
    border-color: rgba(108, 123, 255, .28);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}


/* Brand accents */

.social-link.github:hover {
    border-color: rgba(255, 255, 255, .45);
    box-shadow: 0 10px 24px rgba(255, 255, 255, .25);
}

.social-link.linkedin:hover {
    border-color: rgba(10, 102, 194, .45);
    box-shadow: 0 10px 24px rgba(10, 102, 194, .25);
}

.social-link.twitter:hover {
    border-color: rgba(29, 161, 242, .45);
    box-shadow: 0 10px 24px rgba(29, 161, 242, .25);
}

.contact-form {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .06);
    padding: 16px;
    border-radius: 14px;
    box-shadow: var(--shadow);
    max-width: 560px;
    width: 100%;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.contact-form:hover {
    border-color: rgba(108, 123, 255, .3);
    background: #11182c;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

label {
    color: #dfe4ff;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    background: #0e1426;
    border: 1px solid rgba(255, 255, 255, .1);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.contact-form input:hover,
.contact-form textarea:hover {
    border-color: rgba(108, 123, 255, .3);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 123, 255, .2);
}

.error {
    color: var(--danger);
    min-height: 18px;
}

.form-feedback {
    margin-top: 8px;
    color: var(--success);
    min-height: 18px;
}


/* Footer */

.site-footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
    background: #0a0e19;
}

.site-footer p {
    text-align: center;
    color: var(--muted);
}


/* Back to top */

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(180deg, rgba(108, 123, 255, .9), rgba(180, 92, 255, .9));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transform: translateY(120%);
    opacity: 0;
    transition: transform .2s ease, opacity .2s ease;
}

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


/* Responsive */

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-image {
        display: flex;
        justify-content: center;
    }
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-toggle {
        display: inline-block;
    }
    .nav-links {
        position: fixed;
        inset: 56px 12px auto 12px;
        background: rgba(10, 13, 23, .92);
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 14px;
        padding: 12px;
        flex-direction: column;
        gap: 6px;
        display: none;
    }
    .nav-links.show {
        display: flex;
    }
    .section {
        padding: 64px 0;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}


/* Utilities */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
