/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;
    --purple-400: #a78bfa;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-900: #581c87;
    --indigo-400: #818cf8;
    --indigo-500: #6366f1;
    --indigo-900: #312e81;
    --yellow-400: #facc15;
    --green-400: #4ade80;
    --blue-400: #60a5fa;
}

body {
    font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--slate-100);
    background-color: var(--slate-950);
    overflow-x: hidden;
}

/* Accessibility: Skip link */
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -1;
    background: var(--slate-900);
    color: #fff;
    padding: .75rem 1rem;
    border-radius: 8px;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    z-index: 1001;
}

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

/* Background Gradients */
.bg-gradients {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translate3d(0, 0, 0); /* Force hardware acceleration */
}

.bg-gradients::before,
.bg-gradients::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: pulse-slow 8s infinite ease-in-out;
    will-change: transform, opacity;
}

.bg-gradients::before {
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: rgba(88, 28, 135, 0.3);
}

.bg-gradients::after {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: rgba(49, 46, 129, 0.2);
    animation-delay: 1s;
}

@keyframes pulse-slow {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.1); 
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    transition: all 0.3s ease;
    padding: 1.5rem 0;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(to top right, var(--purple-500), var(--indigo-400));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
    font-weight: 800;
    color: #fff;
    font-size: 1.125rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.logo-text-accent {
    color: var(--purple-400);
}

.nav-menu {
    display: none;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-300);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--purple-400);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    display: none;
    padding: 0.625rem 1.25rem;
    background: #fff;
    color: var(--slate-950);
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.nav-cta:hover {
    background: var(--slate-100);
    transform: scale(1.05);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.bar {
    width: 24px;
    height: 2px;
    background: #fff;
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: var(--slate-950);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.mobile-menu-cta {
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background: var(--purple-600);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
    .nav-cta {
        display: block;
    }
    .hamburger {
        display: none;
    }
}

/* Hero Section */
.hero {
    position: relative;
    z-index: 10;
    padding: 8rem 0 5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--purple-300);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    animation: fade-in-up 0.8s ease-out forwards;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-400);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    background: linear-gradient(to bottom, #fff, var(--slate-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fade-in-up 0.8s ease-out 0.1s forwards;
    opacity: 0;
}

.hero-title-br {
    display: none;
}

.hero-title-accent {
    position: relative;
    background: linear-gradient(to right, var(--purple-400), var(--indigo-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title-underline {
    position: absolute;
    width: 100%;
    height: 12px;
    bottom: -4px;
    left: 0;
    color: var(--purple-500);
    opacity: 0.6;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--slate-400);
    max-width: 42rem;
    margin-bottom: 2.5rem;
    line-height: 1.75;
    animation: fade-in-up 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 32rem;
    margin-bottom: 5rem;
    animation: fade-in-up 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 4.5rem;
    }
    .hero-title-br {
        display: block;
    }
    .hero-buttons {
        flex-direction: row;
        width: auto;
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: 12rem 0 8rem;
    }
    .hero-title {
        font-size: 5rem;
    }
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1rem 2rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--purple-600);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--indigo-500), var(--purple-500));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span,
.btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
    transition: transform 0.3s;
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

/* Metrics */
.metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 80rem;
    animation: fade-in-up 0.8s ease-out 0.5s forwards;
    opacity: 0;
}

.metric-card {
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.metric-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.metric-icon-yellow {
    background: rgba(250, 204, 21, 0.05);
    border-color: rgba(250, 204, 21, 0.2);
    color: var(--yellow-400);
}

.metric-icon-green {
    background: rgba(74, 222, 128, 0.05);
    border-color: rgba(74, 222, 128, 0.2);
    color: var(--green-400);
}

.metric-icon-blue {
    background: rgba(96, 165, 250, 0.05);
    border-color: rgba(96, 165, 250, 0.2);
    color: var(--blue-400);
}

.metric-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-300);
    margin-bottom: 0.5rem;
}

.metric-subtext {
    font-size: 0.75rem;
    color: var(--slate-500);
}

@media (min-width: 768px) {
    .metrics {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Services Section */
.services {
    position: relative;
    z-index: 10;
    padding: 6rem 0;
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.services-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
    gap: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.section-title-accent {
    color: var(--purple-400);
    font-style: italic;
    font-family: serif;
}

.services-description {
    color: var(--slate-400);
    max-width: 28rem;
}

.services-link {
    display: none;
    align-items: center;
    gap: 8px;
    color: var(--purple-400);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

.services-link:hover {
    color: var(--purple-300);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.service-card {
    padding: 2rem;
    border-radius: 1rem;
    background: var(--slate-950);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.service-card:hover {
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 20px 40px rgba(88, 28, 135, 0.2);
}

.service-icon {
    width: 2rem;
    height: 2rem;
    color: var(--purple-400);
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.service-card:hover .service-icon {
    color: var(--purple-300);
    transform: scale(1.1);
}

.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-100);
    margin-bottom: 0.75rem;
}

.service-description {
    color: var(--slate-400);
    line-height: 1.75;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .services-header {
        flex-direction: row;
        align-items: flex-end;
    }
    .services-link {
        display: flex;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 3rem;
    }
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Technical Edge Section */
.technical-edge {
    position: relative;
    z-index: 10;
    padding: 6rem 0;
}

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

.technical-visual {
    position: relative;
    order: 2;
}

.code-window {
    position: relative;
    z-index: 10;
    background: var(--slate-900);
    border: 1px solid var(--slate-700);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    transform: rotate(1deg);
    transition: transform 0.5s;
}

.code-window:hover {
    transform: rotate(0deg);
}

.code-window-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    background: var(--slate-800);
    border-bottom: 1px solid var(--slate-700);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot-red {
    background: #ef4444;
}

.code-dot-yellow {
    background: #eab308;
}

.code-dot-green {
    background: #22c55e;
}

.code-content {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.75;
    color: var(--slate-300);
}

.code-keyword {
    color: var(--purple-400);
}

.code-variable {
    color: var(--blue-400);
}

.code-brace {
    color: var(--purple-400);
}

.code-string {
    color: var(--green-400);
}

.code-boolean {
    color: #fb923c;
}

.code-null {
    color: var(--blue-400);
}

.code-comment {
    color: var(--slate-500);
}

.code-class {
    color: var(--yellow-400);
}

.code-indent {
    padding-left: 1rem;
}

.technical-content {
    order: 1;
}

.technical-label {
    color: var(--purple-400);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.technical-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
}

.technical-description {
    color: var(--slate-400);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    line-height: 1.75;
}

.technical-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.technical-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--slate-200);
}

.technical-check {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(167, 139, 250, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple-400);
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .technical-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .technical-visual {
        order: 1;
    }
    .technical-content {
        order: 2;
    }
}

/* Portfolio Section */
.portfolio {
    position: relative;
    z-index: 10;
    padding: 6rem 0;
}

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

.portfolio-item {
    background: var(--slate-900);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
    will-change: transform;
}

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

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.portfolio-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.portfolio-content p {
    color: var(--slate-400);
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

.portfolio-features {
    margin-bottom: 1.5rem;
}

.portfolio-features h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--slate-200);
}

.portfolio-features ul {
    list-style: none;
    padding-left: 1.25rem;
}

.portfolio-features li {
    color: var(--slate-400);
    margin: 0.4rem 0;
    position: relative;
}

.portfolio-features li::before {
    content: '•';
    position: absolute;
    left: -1rem;
    color: var(--purple-400);
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(167, 139, 250, 0.1);
    color: var(--purple-400);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.portfolio-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.portfolio-link {
    color: var(--purple-400);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.portfolio-link:hover {
    color: var(--purple-300);
}

/* CTA Section */
.cta {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--purple-900), var(--indigo-900));
    opacity: 0.2;
    z-index: 0;
}

.cta .container {
    position: relative;
    z-index: 10;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #fff;
}

.cta-description {
    font-size: 1.25rem;
    color: var(--slate-300);
    margin-bottom: 2.5rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.btn-cta {
    min-width: 200px;
}

@media (min-width: 640px) {
    .cta-title {
        font-size: 3.75rem;
    }
    .cta-buttons {
        flex-direction: row;
    }
}

/* Contact Section */
.contact {
    position: relative;
    z-index: 10;
    padding: 6rem 0;
}

.contact-content {
    text-align: center;
}

.contact-subtitle {
    color: var(--slate-400);
    font-size: 1.125rem;
    margin-bottom: 3rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--slate-200);
}

.contact-link {
    color: var(--purple-400);
    text-decoration: none;
    font-size: 1.125rem;
    transition: color 0.3s;
}

.contact-link:hover {
    color: var(--purple-300);
}

@media (min-width: 640px) {
    .contact-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.footer-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.footer-logo .logo-icon {
    width: 24px;
    height: 24px;
    font-size: 0.875rem;
    box-shadow: none;
    border-radius: 6px;
}

.footer-logo h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--slate-300);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--slate-400);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

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

.footer-bottom p {
    color: var(--slate-500);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
    }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Selection */
::selection {
    background: var(--purple-500);
    color: #fff;
}

