:root {
    --primary-color: #2563eb;
    --dark-bg: #0f172a;
    --light-text: #f8fafc;
    --gray-text: #94a3b8;
    --card-bg: #1e293b;
    --gradient-text: linear-gradient(to right, #60a5fa, #a855f7);
    --hero-gradient: linear-gradient(-45deg, #0f172a, #1e293b, #1e1b4b, #0f172a);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Selection Color */
::selection {
    background: rgba(37, 99, 235, 0.3);
    color: white;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--light-text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--gray-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--light-text);
}

.nav-btn {
    padding: 8px 25px;
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    color: var(--primary-color) !important;
    transition: all 0.3s !important;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white !important;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--card-bg);
    z-index: 1001;
    padding: 60px 30px;
    transition: right 0.4s ease-in-out;
    box-shadow: -5px 0 20px rgba(0,0,0,0.6);
}

.mobile-menu.active {
    right: 0;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-text);
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.mobile-nav-links a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 1.2rem;
    display: block;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 180px 20px 100px;
    background: var(--hero-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-shapes .shape {
    position: absolute;
    color: rgba(255, 255, 255, 0.05);
    font-size: 4rem;
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

.shape-1 { top: 20%; left: 10%; animation-delay: 0s; }
.shape-2 { top: 60%; left: 15%; animation-delay: 1s; font-size: 3rem; }
.shape-3 { top: 30%; right: 10%; animation-delay: 2s; }
.shape-4 { top: 70%; right: 20%; animation-delay: 3s; font-size: 2.5rem; }

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 25px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.3rem;
    color: var(--gray-text);
    max-width: 650px;
    margin: 0 auto 45px;
}

.cta-button {
    display: inline-block;
    padding: 16px 45px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
}

/* Tech Stack Slider */
.tech-stack {
    background: #0b1120;
    padding: 40px 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tech-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.tech-slider::before,
.tech-slider::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
}

.tech-slider::before {
    left: 0;
    background: linear-gradient(to right, #0b1120, transparent);
}

.tech-slider::after {
    right: 0;
    background: linear-gradient(to left, #0b1120, transparent);
}

.tech-track {
    display: flex;
    width: calc(100px * 20); /* 20 icons * width */
    animation: scroll 30s linear infinite;
}

.tech-track i {
    font-size: 3rem;
    width: 100px;
    color: #475569;
    transition: color 0.3s, transform 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-track i:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-100px * 10)); }
}

/* Services */
.services {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--gray-text);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-item {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-item:hover {
    transform: translateY(-10px);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.icon-box {
    width: 70px;
    height: 70px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.3s;
}

.service-item:hover .icon-box {
    background: var(--primary-color);
    transform: scale(1.1);
}

.service-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: color 0.3s;
}

.service-item:hover .service-icon {
    color: white;
}

.service-item h3 {
    margin-bottom: 15px;
    color: var(--light-text);
    font-size: 1.4rem;
}

.service-item p {
    color: var(--gray-text);
    font-size: 1rem;
}

/* Portfolio Section */
.portfolio-section {
    padding: 80px 0;
    background: #162032;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.portfolio-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.portfolio-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.portfolio-card:hover .portfolio-img img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.view-btn {
    padding: 10px 25px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.portfolio-card:hover .view-btn {
    transform: translateY(0);
}

.portfolio-info {
    padding: 25px;
}

.portfolio-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--light-text);
}

.portfolio-info p {
    color: var(--gray-text);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.tags {
    display: flex;
    gap: 10px;
}

.tags span {
    background: rgba(37, 99, 235, 0.1);
    color: #60a5fa;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* About Section */
.about-section {
    padding: 100px 0;
    background: var(--dark-bg); /* Changed back to dark to alternate */
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: transform 0.3s;
}

.about-image img:hover {
    transform: scale(1.02);
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content p {
    color: var(--gray-text);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: var(--light-text);
}

.stat-item i {
    color: #10b981;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    text-align: center;
    background: #162032; /* Alternate bg */
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 50px;
}

.contact-item {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    min-width: 250px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-icon-circle {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-item h4 {
    color: var(--gray-text);
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
footer {
    text-align: center;
    padding: 50px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--gray-text);
    font-size: 0.9rem;
    background: #0b1120;
}

.social-links {
    margin-bottom: 20px;
}

.social-links a {
    color: var(--gray-text);
    font-size: 1.5rem;
    margin: 0 15px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }
    .hero h1 { font-size: 2.8rem; }
    .hero-shapes .shape { opacity: 0.3; }
    
    .tech-track i { font-size: 2.5rem; }
}
