:root {
    --bg-color: #030308;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #9d4edd;
    /* Electric Purple */
    --secondary: #00f5ff;
    /* Cyan */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-main: 'Outfit', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Utilities */
.highlight {
    color: var(--primary);
}

.gradient-text {
    background: linear-gradient(to right, #c77dff, #00f5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card {
    background: var(--card-bg);
    /* Reduced blur amount for better performance */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    /* Forcing the browser to use GPU for this element */
    transform: translateZ(0);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #7b2cbf, #9d4edd);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(157, 78, 221, 0.6);
}

.btn-primary-small {
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-small:hover {
    background: #7b2cbf;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(0, 245, 255, 0.05);
}

.w-100 {
    width: 100%;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 8%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(3, 3, 8, 0.7);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--card-border);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a:not(.btn-primary-small) {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-links a:not(.btn-primary-small):hover {
    color: var(--secondary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8%;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    max-width: 650px;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(157, 78, 221, 0.1);
    border: 1px solid rgba(157, 78, 221, 0.3);
    color: #e0aaff;
    border-radius: 50px;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.2);
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.hero-graphic {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Glowing Background Orbs */
.glow-orb {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    /* Replaced filter: blur with a radial gradient for massive performance gain */
    background: radial-gradient(circle, rgba(157, 78, 221, 0.3) 0%, rgba(157, 78, 221, 0) 70%);
    z-index: 0;
    animation: float 8s ease-in-out infinite alternate;
    pointer-events: none;
    /* Prevents interaction calculation */
    will-change: transform;
}

.orb-1 {
    top: 0;
    left: 10%;
}

.orb-2 {
    background: radial-gradient(circle, rgba(0, 245, 255, 0.2) 0%, rgba(0, 245, 255, 0) 70%);
    bottom: -10%;
    right: 10%;
    animation-delay: -4s;
}

.main-card {
    padding: 2rem;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    position: relative;
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.main-card:hover {
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg) translateY(-10px);
}

.card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.main-card code {
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 1.05rem;
    display: block;
    line-height: 1.8;
}

.kw {
    color: #f472b6;
}

/* pink */
.var {
    color: #00f5ff;
}

/* cyan */
.str {
    color: #e0aaff;
}

/* light purple */

/* Creations Section */
.creations {
    padding: 120px 8%;
    position: relative;
}

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

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

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

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(157, 78, 221, 0.4);
}

.project-img {
    height: 220px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-overlay {
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 2rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.placeholder-1,
.placeholder-2,
.placeholder-3,
.placeholder-4 {
    background: #111;
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.project-info p {
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    font-size: 1rem;
}

.project-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.project-link:hover {
    color: #fff;
}

/* Contact Section */
.contact {
    padding: 120px 8%;
    display: flex;
    justify-content: center;
    position: relative;
}

.contact-box {
    max-width: 700px;
    width: 100%;
    padding: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-box h2,
.contact-box p,
.contact-form {
    position: relative;
    z-index: 1;
}

.contact-box h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.contact-box p {
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-row {
    display: flex;
    gap: 1.5rem;
}

.input-row .input-group {
    flex: 1;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.1);
}

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 1rem;
    background: rgba(3, 3, 8, 0.9);
}

/* Contact Page Specifics */
.contact-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 120px;
    padding-bottom: 50px;
}

.contact-links-container {
    width: 100%;
    max-width: 900px;
    padding: 3.5rem;
    z-index: 1;
    position: relative;
    text-align: center;
}

.contact-header {
    margin-bottom: 3.5rem;
}

.contact-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-header p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    transform: translateZ(0);
    /* Hardware acceleration */
}

.social-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(157, 78, 221, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.social-icon {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.social-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.social-card:hover .social-info p {
    color: var(--text-main);
}

/* Animations */
@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

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

.reveal-delay-1 {
    transition-delay: 0.2s;
}

.reveal-delay-2 {
    transition-delay: 0.4s;
}

/* Responsive */
@media (max-width: 900px) {
    .input-row {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
        padding-left: 5%;
        padding-right: 5%;
    }

    .hero h1 {
        font-size: 3.2rem;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        margin: 0 auto 2.5rem auto;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
    }

    .hero-graphic {
        margin-top: 5rem;
        margin-bottom: 3rem;
    }

    .main-card {
        transform: none;
    }

    .main-card:hover {
        transform: translateY(-5px);
    }

    .nav-links {
        display: none;
    }

    .contact-box {
        padding: 2rem 1.5rem;
    }

    .contact-box h2 {
        font-size: 2rem;
    }
}