/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: #ffffff;
}

.btn-full {
    width: 100%;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 14px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}

.logo span {
    color: #2563eb;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #2563eb;
}

.btn-nav {
    background: #2563eb;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 8px;
}

.btn-nav:hover {
    background: #1d4ed8;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-tag {
    display: inline-block;
    background: #dbeafe;
    color: #2563eb;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    margin-bottom: 24px;
    color: #0f172a;
}

.gradient-text {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    color: #64748b;
    margin-bottom: 36px;
    max-width: 520px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Code Window */
.code-window {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.window-header {
    padding: 14px 18px;
    display: flex;
    gap: 8px;
    background: #0f172a;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.window-body {
    padding: 28px 24px;
}

.window-body code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 2;
    color: #e2e8f0;
}

.code-keyword { color: #c084fc; }
.code-var { color: #67e8f9; }
.code-prop { color: #93c5fd; }
.code-string { color: #86efac; }

/* ===== Sections Common ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: #dbeafe;
    color: #2563eb;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-desc {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 12px auto 0;
}

/* ===== Services ===== */
.services {
    padding: 120px 0;
    background: #ffffff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.service-card {
    padding: 36px 28px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 10px 30px -8px rgba(37, 99, 235, 0.1);
    transform: translateY(-4px);
}

.service-icon {
    width: 52px;
    height: 52px;
    background: #eff6ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 12px;
    color: #0f172a;
}

.service-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Projects ===== */
.projects {
    padding: 120px 0;
    background: #f8fafc;
}

.project-category {
    margin-bottom: 40px;
}

.category-title {
    margin-bottom: 20px;
}

.category-badge {
    display: inline-block;
    background: #1e293b;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.project-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 36px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.project-header h4 {
    font-size: 1.3rem;
    color: #0f172a;
}

.project-tag {
    font-size: 0.8rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.project-card > p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-stack span {
    background: #eff6ff;
    color: #2563eb;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== Process ===== */
.process {
    padding: 120px 0;
    background: #ffffff;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.process-step {
    text-align: center;
    padding: 32px 24px;
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: #dbeafe;
    margin-bottom: 16px;
    line-height: 1;
}

.process-step h3 {
    margin-bottom: 12px;
    color: #0f172a;
}

.process-step p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== Contact ===== */
.contact {
    padding: 120px 0;
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-text .section-tag {
    text-align: left;
}

.contact-text h2 {
    margin-bottom: 16px;
}

.contact-text > p {
    color: #64748b;
    font-size: 1.05rem;
    margin-bottom: 32px;
    line-height: 1.7;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
    font-size: 0.95rem;
}

.contact-item svg {
    color: #2563eb;
    flex-shrink: 0;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    color: #1e293b;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0 30px;
    background: #0f172a;
    color: #94a3b8;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 30px;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 30px;
}

.footer-brand .logo {
    color: #ffffff;
    margin-bottom: 8px;
    display: inline-block;
}

.footer-brand p {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.9rem;
    color: #94a3b8;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: #475569;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-visual {
        order: -1;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 24px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero {
        padding: 120px 0 80px;
        min-height: auto;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        text-align: center;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .footer-links {
        flex-wrap: wrap;
    }

    .services-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .project-card {
        padding: 24px;
    }

    .services {
        padding: 80px 0;
    }

    .projects {
        padding: 80px 0;
    }

    .process {
        padding: 80px 0;
    }

    .contact {
        padding: 80px 0;
    }
}