/* Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-family: 'Fira Code', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat h3 {
    font-size: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Code Editor */
.hero-editor {
    perspective: 1000px;
}

.editor-window {
    background: var(--darker-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s;
}

.editor-window:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.editor-header {
    background: var(--card-bg);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-buttons {
    display: flex;
    gap: 0.5rem;
}

.editor-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.btn-close {
    background: #ff5f56;
}

.btn-minimize {
    background: #ffbd2e;
}

.btn-maximize {
    background: #27c93f;
}

.editor-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.editor-tabs {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

.tab {
    padding: 0.25rem 0.75rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}

.tab.active {
    background: var(--dark-bg);
    color: var(--primary-color);
}

.editor-body {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    min-height: 400px;
    display: flex;
    gap: 1rem;
    position: relative;
    cursor: text;
}

.line-numbers {
    color: #4b5563;
    text-align: right;
    user-select: none;
    padding-right: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.code-content {
    flex: 1;
    position: relative;
}

.code-content pre {
    margin: 0;
}

.code-content code {
    color: var(--text-secondary);
    line-height: 1.6;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--primary-color);
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 20s infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 10%;
    left: 10%;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: var(--secondary-color);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 60%;
    right: 10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    border-radius: 20%;
    bottom: 20%;
    left: 50%;
    animation-delay: -10s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 30%;
    right: 30%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* Services Section */
.services {
    padding: 6rem 0;
    background: var(--darker-bg);
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-color);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tech-list {
    list-style: none;
}

.tech-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.tech-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Portfolio Section */
.portfolio {
    padding: 6rem 0;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    border-radius: 12px;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.portfolio-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 2rem;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.portfolio-link {
    width: 50px;
    height: 50px;
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.portfolio-link:hover {
    transform: scale(1.1);
}

/* Technologies */
.technologies {
    padding: 6rem 0;
    background: var(--darker-bg);
}

.tech-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    text-align: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    transition: transform 0.3s;
}

.tech-item:hover {
    transform: translateY(-10px);
}

.tech-item i {
    font-size: 3rem;
    color: var(--primary-color);
}

.tech-item span {
    font-weight: 500;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-item i {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-item h4 {
    margin-bottom: 0.5rem;
}

.info-item p {
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--gradient);
    transform: translateY(-5px);
}

/* Contact Editor Form */
.contact-editor {
    perspective: 1000px;
}

.contact-editor .editor-window {
    background: var(--darker-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-editor .editor-body {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    background: var(--darker-bg);
}

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

.code-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.code-line.code-multiline {
    align-items: flex-start;
}

.line-num {
    color: #4b5563;
    min-width: 25px;
    text-align: right;
    user-select: none;
}

.code-keyword {
    color: #c792ea;
    font-weight: 500;
}

.code-var {
    color: #82aaff;
}

.code-function {
    color: #82aaff;
}

.code-operator {
    color: #89ddff;
}

.code-string {
    color: #c3e88d;
}

.code-comment {
    color: #546e7a;
    font-style: italic;
}

.code-line input,
.code-line textarea {
    flex: 1;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: #c3e88d;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.code-line input:focus,
.code-line textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.code-line input::placeholder,
.code-line textarea::placeholder {
    color: #7c9e8a;
}

.code-line textarea {
    resize: vertical;
    width: 100%;
    min-height: 80px;
}

.code-submit {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.code-submit:hover {
    background: var(--gradient);
    border-color: transparent;
    transform: translateX(5px);
}

/* Footer */
.footer {
    background: var(--darker-bg);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p,
.footer-section ul {
    color: var(--text-secondary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section ul li i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--dark-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .editor-body {
        font-size: 0.75rem;
        padding: 1rem;
    }
}

