/* ====================
   RESET & BASE STYLES
   ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ====================
   HIDE SCROLLBAR
   ==================== */
/* For Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
}

/* For Firefox */
* {
    scrollbar-width: none;
}

/* For IE and Edge Legacy */
body {
    -ms-overflow-style: none;
}

/* ====================
   PRELOADER STYLES
   ==================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    scale: 0.75;
    position: relative;
    width: 200px;
    height: 200px;
    translate: 10px -20px;
}

.loader svg {
    position: absolute;
    top: 0;
    left: 0;
}

.head {
    translate: 27px -30px;
    z-index: 3;
    animation: bob 1s infinite ease-in;
}

.bod {
    translate: 0px 30px;
    z-index: 3;
    animation: bob 1s infinite ease-in-out;
}

.legr {
    translate: 75px 135px;
    z-index: 0;
    animation: rstep 1s infinite ease-in;
    animation-delay: 0.45s;
}

.legl {
    translate: 30px 155px;
    z-index: 3;
    animation: lstep 1s infinite ease-in;
}

@keyframes bob {
    0% {
        transform: translateY(0) rotate(3deg);
    }
    5% {
        transform: translateY(0) rotate(3deg);
    }
    25% {
        transform: translateY(5px) rotate(0deg);
    }
    50% {
        transform: translateY(0px) rotate(-3deg);
    }
    70% {
        transform: translateY(5px) rotate(0deg);
    }
    100% {
        transform: translateY(0) rotate(3deg);
    }
}

@keyframes lstep {
    0% {
        transform: translateY(0) rotate(-5deg);
    }
    33% {
        transform: translateY(-15px) translate(32px) rotate(35deg);
    }
    66% {
        transform: translateY(0) translate(25px) rotate(-25deg);
    }
    100% {
        transform: translateY(0) rotate(-5deg);
    }
}

@keyframes rstep {
    0% {
        transform: translateY(0) translate(0px) rotate(-5deg);
    }
    33% {
        transform: translateY(-10px) translate(30px) rotate(35deg);
    }
    66% {
        transform: translateY(0) translate(20px) rotate(-25deg);
    }
    100% {
        transform: translateY(0) translate(0px) rotate(-5deg);
    }
}

#gnd {
    translate: -140px 0;
    rotate: 10deg;
    z-index: -1;
    filter: blur(0.5px) drop-shadow(1px 3px 5px #a78bfa);
    opacity: 0.25;
    animation: scroll 5s infinite linear;
}

@keyframes scroll {
    0% {
        transform: translateY(25px) translate(50px);
        opacity: 0;
    }
    33% {
        opacity: 0.25;
    }
    66% {
        opacity: 0.25;
    }
    to {
        transform: translateY(-50px) translate(-100px);
        opacity: 0;
    }
}

body.loading {
    overflow: hidden;
}

/* ====================
   TYPOGRAPHY
   ==================== */
.kaushan {
    font-family: 'Kaushan Script', cursive;
}

.code {
    font-family: 'Fira Code', monospace;
}

.cursive {
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
}

/* ====================
   GRID BACKGROUND
   ==================== */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

/* ====================
   HEADER
   ==================== */
header {
    background: transparent;
    backdrop-filter: none;
}

/* ====================
   CODE QUOTES
   ==================== */
.code-quote {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #6366f1;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid #6366f1;
    margin: 2rem 0;
    border-radius: 4px;
}

/* ====================
   HERO SECTION
   ==================== */
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 100vh;
}

.hero-title {
    font-family: 'Kaushan Script', cursive;
    font-size: 5rem;
    line-height: 1.1;
    color: #a78bfa;
    margin-bottom: 2rem;
}

/* Animated Text Lines */
.text-lines {
    position: relative;
    margin: 2rem 0;
}

.text-line {
    height: 3px;
    background: linear-gradient(90deg, #6366f1, transparent);
    margin: 1rem 0;
    animation: expand 2s ease-in-out infinite;
}

.text-line:nth-child(2) {
    animation-delay: 0.3s;
    width: 80%;
}

.text-line:nth-child(3) {
    animation-delay: 0.6s;
    width: 60%;
}

@keyframes expand {
    0%, 100% { width: 100%; opacity: 0.3; }
    50% { width: 120%; opacity: 1; }
}

/* Floating Code Blocks */
.floating-code {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: rgba(99, 102, 241, 0.4);
    animation: float 6s ease-in-out infinite;
}

.floating-code:nth-child(1) {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.floating-code:nth-child(2) {
    top: 50%;
    left: -15%;
    animation-delay: 2s;
}

.floating-code:nth-child(3) {
    bottom: 20%;
    left: -5%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.2; }
    50% { transform: translateY(-20px) translateX(10px); opacity: 0.6; }
}

/* ====================
   CIRCLE CONTAINER
   ==================== */
.circle-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
}

.circle-image {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 0 40px rgba(167, 139, 250, 0.2);
}

/* Orbiting Circles */
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(167, 139, 250, 0.2);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.orbit-1 {
    width: 450px;
    height: 450px;
    animation-duration: 20s;
}

.orbit-2 {
    width: 500px;
    height: 500px;
    animation-duration: 30s;
    animation-direction: reverse;
}

.orbit-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.6);
}

.orbit-1 .orbit-dot {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.orbit-2 .orbit-dot {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Vertical Arrow Lines */
.arrow-lines {
    position: absolute;
    top: 0;
    right: -50px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.arrow-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(180deg, transparent, rgba(167, 139, 250, 0.5), transparent);
    animation: flow 3s ease-in-out infinite;
}

.arrow-line:nth-child(2) {
    animation-delay: 0.5s;
}

.arrow-line:nth-child(3) {
    animation-delay: 1s;
}

@keyframes flow {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(20px); }
}

/* ====================
   STATS
   ==================== */
.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====================
   ABOUT SECTION
   ==================== */
.about-lines {
    position: absolute;
    top: 20%;
    right: -50px;
    width: 100px;
    height: 200px;
}

.about-line {
    height: 2px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.5), transparent);
    margin: 1rem 0;
    animation: slideRight 3s ease-in-out infinite;
}

.about-line:nth-child(2) {
    animation-delay: 0.5s;
}

.about-line:nth-child(3) {
    animation-delay: 1s;
}

@keyframes slideRight {
    0%, 100% { width: 50px; opacity: 0.3; }
    50% { width: 100px; opacity: 1; }
}

/* ====================
   CARDS
   ==================== */
.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(167, 139, 250, 0.5);
    transform: translateY(-8px);
}

/* ====================
   SKILLS
   ==================== */
.skill-icon {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.skill-icon:hover {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.3);
    transform: translateY(-5px);
}

/* ====================
   MARQUEE AUTO-SCROLL PROJECTS
   ==================== */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 40px 0;
}

.marquee-content {
    display: flex;
    gap: 30px;
    animation: marquee 40s linear infinite;
    width: fit-content;
}

/* Pause on hover */
.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Project Card Styles */
.project-card {
    flex-shrink: 0;
    width: 350px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.project-image {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.project-card:hover .project-image {
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: 0 15px 50px rgba(167, 139, 250, 0.3);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

/* Black Overlay with Title at Top */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    padding: 2rem 1.5rem;
    z-index: 10;
    transition: all 0.4s ease;
}

.project-card:hover .project-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 50%, transparent 100%);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #a78bfa;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(167, 139, 250, 0.5);
}

/* ====================
   AWARDS
   ==================== */
.award-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.award-card:hover {
    border-color: rgba(167, 139, 250, 0.5);
    transform: scale(1.05);
}

.award-card img {
    /* No border-radius for square cards */
}

.award-title {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    z-index: 10;
}

/* ====================
   MODAL
   ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* ====================
   CONTACT WIDGET
   ==================== */
.contact-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.contact-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.contact-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.5);
}

.contact-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 340px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.contact-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ====================
   ANIMATIONS
   ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1s; }

/* ====================
   SECTION HEADING
   ==================== */
.section-heading {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

/* ====================
   RESPONSIVE
   ==================== */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
    }
    
    .circle-container {
        width: 300px;
        height: 300px;
    }
    
    .circle-image {
        width: 250px;
        height: 250px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .project-card {
        width: 280px;
    }
    
    .project-image {
        height: 320px;
    }
    
    .section-heading {
        font-size: 2.5rem;
    }
    
    .marquee-content {
        gap: 20px;
    }
}