:root {
    /* Colors */
    --bg-main: #050505;
    --bg-secondary: rgba(20, 20, 20, 0.5);
    --bg-nav: rgba(5, 5, 5, 0.85);
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    
    --accent: #22d3ee; 
    --accent-glow: rgba(34, 211, 238, 0.4);
    --accent-hover: #06b6d4;
    --accent-secondary: #c026d3; 
    --accent-tertiary: #ec4899;

    --gradient-primary: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    --gradient-text: linear-gradient(to right, var(--accent), var(--accent-secondary), var(--accent-tertiary));

    /* Typography */
    --font-main: 'Outfit', -apple-system, system-ui, sans-serif;
    
    /* Layout */
    --nav-height: 85px;
    --section-pad: 120px;
    --max-width: 1100px;
    
    /* Transition */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.08), transparent 25%);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated grid pattern */
body::before {
    content: "";
    position: fixed;
    top: -50vh; left: -50vw; width: 200vw; height: 200vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    animation: gridPan 30s linear infinite;
    will-change: transform;
}

@keyframes gridPan {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

::selection {
    background-color: var(--accent-glow);
    color: var(--text-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Custom glow cursor */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(10,15,28,0) 60%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: color-dodge;
    transition: width 0.3s, height 0.3s;
    will-change: transform;
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

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

a:hover {
    color: var(--accent-hover);
}

ul {
    list-style: none;
}

input, textarea, button {
    font-family: var(--font-main);
}

/* Utility Classes */
.section {
    padding: var(--section-pad) 20px;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: clamp(26px, 5vw, 32px);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    position: relative;
    white-space: nowrap;
}

.section-title::after {
    content: "";
    display: block;
    height: 1px;
    width: 300px;
    background: #334155;
    margin-left: 20px;
    max-width: 100%;
}

.card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.3), rgba(15, 23, 42, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 30px;
    transition: var(--transition-bounce);
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: all 0.6s ease;
    transform: skewX(-20deg);
}

.card:hover::before {
    left: 200%;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.6), 0 0 20px rgba(59, 130, 246, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-bounce);
    text-align: center;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-image: var(--gradient-primary);
    background-size: 200% 100%;
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background-position: 100% 0;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-3px);
}

.btn-contact {
    padding: 10px 20px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-size: 14px;
    color: var(--accent) !important;
}

.btn-contact:hover {
    background: var(--accent-glow);
    color: #fff !important;
}

.center-btn {
    display: table;
    margin: 50px auto 0;
}

.hidden {
    display: none;
}

/* Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-fade {
    opacity: 0;
    transition: opacity 1.2s ease;
}

.active.reveal-up, .active.reveal-left, .active.reveal-scale, .active.reveal-fade {
    opacity: 1;
    transform: translate(0) scale(1);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    height: 70px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    position: relative;
}

.nav-link:not(.btn-contact)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-link:not(.btn-contact):hover::after, .nav-link.active:not(.btn-contact)::after {
    width: 100%;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 101;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.greeting {
    color: var(--accent-secondary);
    font-family: var(--font-main);
    font-size: clamp(18px, 5vw, 20px);
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.name {
    font-size: clamp(40px, 8vw, 80px);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
    margin-bottom: 5px;
    line-height: 1.1;
    font-weight: 800;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.title {
    font-size: clamp(30px, 6vw, 55px);
    color: var(--text-primary);
    margin-bottom: 30px;
    line-height: 1.1;
    opacity: 0.9;
}

.description {
    color: var(--text-secondary);
    font-size: clamp(18px, 4vw, 20px);
    max-width: 600px;
    margin-bottom: 50px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

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

.blob {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-secondary) 0%, var(--accent) 100%);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: pulse 8s ease-in-out infinite alternate;
    z-index: 0;
    will-change: transform;
}

.blob-2 {
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--accent-tertiary) 0%, var(--accent-secondary) 100%);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    right: 50px;
    bottom: -50px;
    animation: pulse 6s ease-in-out infinite alternate-reverse;
    z-index: 0;
    will-change: transform;
}

@keyframes pulse {
    0% { transform: scale(0.8) translate(10px, 10px); }
    100% { transform: scale(1.2) translate(-10px, -10px); }
}

.hero-image-placeholder {
    width: 250px;
    height: 250px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--accent);
    position: relative;
    z-index: 2;
    animation: morph 8s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 19px;
}

.tech-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 10px;
    margin-top: 20px;
}

.tech-list li {
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
    font-family: var(--font-main);
    font-size: 17px;
}

.tech-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 14px;
}

.image-wrapper {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.image-wrapper::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 12px;
    z-index: -1;
    transition: var(--transition);
}

.image-wrapper:hover::after {
    top: 10px;
    left: 10px;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.skill-category h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags span {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.1) inset;
    transition: var(--transition-bounce);
}

.skill-tags span:hover {
    transform: translateY(-2px);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4) inset, 0 0 10px rgba(139, 92, 246, 0.2);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-content {
    flex-grow: 1;
}

.project-overline {
    display: inline-block;
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-tertiary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(244, 63, 94, 0.2);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.project-title {
    font-size: 26px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.project-tech li {
    font-family: var(--font-main);
    font-size: 15px;
    color: var(--text-tertiary);
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.project-links a {
    color: var(--text-secondary);
    font-size: 20px;
}

.project-links a:hover {
    color: var(--accent);
}

/* Contact Section */
.contact {
    display: flex;
    justify-content: center;
    text-align: center;
    max-width: 600px;
    margin-bottom: 50px;
}

.contact-overline {
    color: var(--accent);
    margin-bottom: 15px;
    font-weight: 500;
    letter-spacing: 1px;
}

.contact-title {
    font-size: clamp(30px, 5vw, 50px);
    margin-bottom: 20px;
}

.contact-desc {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.contact-form {
    text-align: left;
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(10, 15, 28, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Footer */
footer {
    padding: 30px;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 24px;
    transition: var(--transition);
}

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

.footer-text {
    color: var(--text-tertiary);
    font-size: 16px;
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
    }
    
    .image-wrapper {
        margin: 0 auto;
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70vw;
        max-width: 300px;
        background: var(--bg-secondary);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px -15px rgba(0,0,0,0.5);
    }

    .nav-links.open {
        right: 0;
    }
    
    .menu-toggle.open .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.open .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: var(--nav-height);
    }

    .hero-content {
        margin-bottom: 50px;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        display: none; /* Hide visual on mobile to focus on content */
    }

    .section {
        padding: 60px 20px;
    }

    .section-title::after {
        width: 100%;
    }
}
