/* Variables and Defaults */
:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --primary: #8a2be2;
    --secondary: #00ffff;
    --card-bg: rgba(255, 255, 255, 0.02);
    --border-color: rgba(255, 255, 255, 0.08);
    --gradient-1: linear-gradient(90deg, #8a2be2, #00ffff);
    --gradient-2: linear-gradient(135deg, #ff007f, #8a2be2);
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #ffffff;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Utility Components */
.section-padding {
    padding: 120px 5%;
}

.section-title {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.05) 0%, transparent 30%);
    pointer-events: none;
    z-index: -1;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 15px 5%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    cursor: pointer;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    color: #b0b0b0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: #fff;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: var(--font-sans);
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-1);
    color: #000;
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(255,255,255,0.2);
}

.btn-outline {
    background: transparent;
    color: var(--secondary);
    padding: 10px 0;
    position: relative;
    border-radius: 0;
}

.btn-outline::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.btn-outline:hover::after {
    width: 100%;
}

.w-100 { width: 100%; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-image: url('assets/images/hero_bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    mix-blend-mode: screen;
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-size: 5.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.25rem;
    color: #b0b0b0;
    margin-bottom: 3rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Infinite Tech Banner */
.tech-banner {
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.015);
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    position: relative;
    backdrop-filter: blur(5px);
}

.tech-banner::before, .tech-banner::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.tech-banner::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}

.tech-banner::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}

.tech-track {
    display: inline-block;
    animation: scrollTech 25s linear infinite;
}

.tech-track span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.2);
    margin: 0 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.tech-track span:hover {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 20px rgba(138, 43, 226, 0.5);
}

@keyframes scrollTech {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 50px 40px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(0, 255, 255, 0.15));
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.service-card p {
    color: #a0a0a0;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 300;
}

/* Portfolio */
.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 100px;
    max-width: 1100px;
    margin: 0 auto;
}

.portfolio-item {
    display: flex;
    align-items: center;
    gap: 60px;
}

.portfolio-item:nth-child(even) {
    flex-direction: row-reverse;
}

.portfolio-img {
    flex: 1;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.05);
}

.portfolio-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.portfolio-item:hover .portfolio-img::after {
    opacity: 0.2;
}

.portfolio-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.05);
}

.portfolio-info {
    flex: 1;
}

.portfolio-info span {
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 10px;
}

.portfolio-info h3 {
    font-size: 3rem;
    margin: 0 0 20px;
    letter-spacing: -1px;
}

.portfolio-info p {
    color: #a0a0a0;
    margin-bottom: 35px;
    font-size: 1.15rem;
    font-weight: 300;
}

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1100px;
    margin: 0 auto;
}

.about-text {
    flex: 1.2;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.15rem;
    color: #a0a0a0;
    margin-bottom: 25px;
    font-weight: 300;
}

.about-text strong {
    color: #fff;
    font-weight: 500;
}

.stats {
    display: flex;
    gap: 50px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.stat-item strong {
    display: block;
    font-size: 3.5rem;
    font-family: var(--font-heading);
    color: transparent;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-item span {
    color: #888;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.about-visual {
    flex: 0.8;
    display: flex;
    justify-content: center;
    position: relative;
}

.about-visual::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(138,43,226,0.1) 0%, transparent 60%);
    z-index: -1;
}

.circle-decoration {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary), var(--secondary), var(--primary));
    padding: 2px;
    animation: rotate 15s linear infinite;
    box-shadow: 0 0 50px rgba(138,43,226,0.2);
}

.inner-circle {
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7rem;
    font-family: var(--font-heading);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.2);
    animation: rotate-reverse 15s linear infinite;
    position: relative;
    overflow: hidden;
}

.inner-circle::after {
    content: 'ER';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 7rem;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    animation: glitchText 3s infinite;
}

@keyframes glitchText {
    0%, 10% { transform: translate(-50%, -50%); opacity: 1; }
    11% { transform: translate(-52%, -48%); opacity: 0.8; }
    12% { transform: translate(-50%, -50%); opacity: 1; }
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes rotate-reverse {
    100% { transform: rotate(-360deg); }
}

/* Contact Section */
.contact {
    position: relative;
}

.contact-box {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 80px;
    text-align: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.contact-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(138,43,226,0.1), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.contact-box h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.contact-box p {
    color: #a0a0a0;
    margin-bottom: 50px;
    font-size: 1.15rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 700px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    gap: 25px;
}

input, textarea {
    width: 100%;
    padding: 18px 25px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    transition: all 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(138,43,226,0.15);
    background: rgba(0,0,0,0.6);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 50px 5%;
    background: #000;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-content p {
    color: #666;
    font-weight: 300;
}

.social-links {
    display: flex;
    gap: 25px;
}

.social-links a {
    color: #888;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.social-links a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* Media Queries */
@media (max-width: 992px) {
    .hero h1 { font-size: 4rem; }
    .portfolio-item, .portfolio-item:nth-child(even) {
        flex-direction: column;
        gap: 40px;
    }
    .about-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 50px;
    }
    .about-text .section-title {
        text-align: center;
    }
    .stats {
        justify-content: center;
    }
    .circle-decoration {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; 
    }
    .hero h1 { font-size: 3rem; }
    .section-title { font-size: 2.5rem; }
    .input-group {
        flex-direction: column;
        gap: 25px;
    }
    .contact-box {
        padding: 40px 20px;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
