/* ==================== ROOT & VARIABLES ==================== */
:root {
    --primary: #00d9ff;
    --secondary: #7c3aed;
    --accent: #ff006e;
    --bg-dark: #0a0e27;
    --bg-darker: #050812;
    --text-primary: #ffffff;
    --text-secondary: #a8adc7;
    --border-color: #1a1f3a;
    --grid-size: 1.5rem;
}

/* ==================== RESET & BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(255, 0, 110, 0.5);
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.logo-icon {
    color: var(--primary);
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    color: var(--text-secondary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

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

.cta-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg-dark);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
}

.cta-button:hover {
    box-shadow: 0 4px 30px rgba(0, 217, 255, 0.5);
    transform: translateY(-2px);
}

/* ==================== HERO SECTION ==================== */
.hero {
    margin-top: 80px;
    min-height: 100vh;
    padding: 4rem 2rem;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
    animation: fadeInUp 0.8s ease;
}

.hero-text h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.word-rotate {
    display: inline-block;
    min-width: 200px;
}

.word {
    position: absolute;
    opacity: 0;
    animation: wordFade 8s ease-in-out infinite;
}

.word:nth-child(1) {
    animation-delay: 0s;
}

.word:nth-child(2) {
    animation-delay: 2.5s;
}

.word:nth-child(3) {
    animation-delay: 5s;
}

@keyframes wordFade {
    0% { opacity: 0; }
    10% { opacity: 1; }
    25% { opacity: 1; }
    35% { opacity: 0; }
    100% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg-dark);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(0, 217, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: inset 0 0 20px rgba(0, 217, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(0, 217, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3), inset 0 0 20px rgba(0, 217, 255, 0.1);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ==================== HERO VISUAL ==================== */
.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: var(--secondary);
    bottom: 0;
    right: 0;
    animation-delay: 1s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 2s;
}

.code-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.2);
}

.code-card code {
    color: var(--primary);
    background: transparent;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-self: end;
    gap: 0.5rem;
    color: var(--text-secondary);
    animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 2px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ==================== SECTION HEADER ==================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease;
}

.section-title {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== SERVICES SECTION ==================== */
.services {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.service-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.2);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.service-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.service-accent {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.service-card:hover .service-accent {
    width: 100%;
}

/* Stats using CSS Subgrid */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    padding: 3rem;
    background: rgba(0, 217, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-family: 'Space Mono', monospace;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== PORTFOLIO SECTION ==================== */
.portfolio {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    grid-auto-rows: 250px;
}

.portfolio-item {
    background: var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.portfolio-item:hover .portfolio-image::before {
    background: rgba(0, 0, 0, 0.5);
}

.portfolio-overlay {
    position: relative;
    z-index: 2;
    color: white;
}

.portfolio-overlay h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

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

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

/* ==================== TESTIMONIALS SECTION ==================== */
.testimonials {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.testimonial-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.2);
}

.stars {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.8;
    font-style: italic;
    color: var(--text-secondary);
}

.testimonial-author {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--bg-dark);
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
}

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

/* ==================== CTA SECTION ==================== */
.cta-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

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

.cta-title {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.cta-form {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 217, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contact-icon {
    font-size: 1.5rem;
}

.cta-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.decoration-element {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.el-1 {
    width: 200px;
    height: 200px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.el-2 {
    width: 150px;
    height: 150px;
    background: var(--secondary);
    bottom: -75px;
    left: 10%;
    animation: float 6s ease-in-out infinite 1s;
}

.el-3 {
    width: 100px;
    height: 100px;
    background: var(--accent);
    top: 50%;
    right: 10%;
    animation: float 7s ease-in-out infinite 2s;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
}

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

.footer-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.footer-section p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

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

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

.footer-section a {
    color: var(--text-secondary);
}

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

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

/* ==================== SCROLL ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        height: 300px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .item-large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .nav-menu {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        display: none;
    }

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

    .hero {
        margin-top: 60px;
        min-height: auto;
    }

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

    .btn {
        width: 100%;
        text-align: center;
    }

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

    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

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

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .cta-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .services {
        padding: 3rem 1rem;
    }

    .portfolio {
        padding: 3rem 1rem;
    }

    .testimonials {
        padding: 3rem 1rem;
    }

    .cta-section {
        padding: 3rem 1rem;
    }

    .footer {
        padding: 2rem 1rem 1rem;
    }

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

    .stat-number {
        font-size: 2rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .navbar,
    .scroll-indicator,
    .cta-section {
        display: none;
    }
}

