/* Modern Design System Tokens */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #f59e0b;
    --accent: #10b981;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(99, 102, 241, 0.05) 0px, transparent 50%);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

p {
    color: var(--text-muted);
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    padding: 0.75rem 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

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

@media (max-width: 768px) {
    .header-content {
        padding: 0 1.25rem;
    }
}

.logo-section a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-section img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

nav a:not(.btn):hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
}

/* Mobile Nav Toggle Button */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
    width: 44px;
    height: 44px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.mobile-nav-toggle.active .hamburger {
    background: transparent;
}

.mobile-nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

body.nav-open {
    overflow: hidden;
}

/* Main Layout */
main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    main {
        padding: 0 1.25rem;
    }
}

/* Hero Section */
#hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.hero-content h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.cta-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    margin-bottom: 5rem;
}

@media (max-width: 640px) {
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #f1f5f9;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Stats Section */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

.stat {
    padding: 2.5rem;
    border-radius: var(--radius-3xl);
    text-align: center;
    transition: transform 0.4s ease;
}

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

.stat i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Section Common */
section {
    padding: 8rem 0;
}

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

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 2.5rem;
}

.service-card {
    padding: 3rem;
    border-radius: var(--radius-3xl);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 1.75rem;
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: white;
    transform: rotate(10deg);
}

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

.service-features {
    list-style: none;
    margin-top: 1.5rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.service-features li::before {
    content: '→';
    color: var(--primary);
    font-weight: bold;
}

/* Portfolio / Featured Works */
#portfolio {
    background: #0f172a;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 10rem 0;
    color: white;
}

#portfolio .section-header h2 {
    color: white;
}

.featured-card {
    max-width: 1200px;
    margin: 0 auto 8rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.featured-card:last-child {
    margin-bottom: 0;
}

.featured-image {
    position: relative;
    border-radius: var(--radius-3xl);
    overflow: hidden;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
}

.featured-image img {
    width: 100%;
    height: auto;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.project-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    display: inline-block;
}

#portfolio h3 {
    color: white;
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
}

#portfolio p {
    color: #94a3b8;
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

/* Alternate Layout for Portfolio Cards */
.featured-card.reverse .featured-image {
    order: 2;
}

.featured-card.reverse .featured-content {
    order: 1;
}

@media (max-width: 1024px) {
    .featured-card.reverse .featured-image {
        order: 1;
    }

    .featured-card.reverse .featured-content {
        order: 2;
    }
}

.project-tags {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.project-tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-intro {
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 2rem;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
}

.about-feature {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-feature i {
    font-size: 1.5rem;
    color: var(--primary);
}

.about-feature h4 {
    font-size: 1.1rem;
}

.tech-stack-card {
    background: white;
    padding: 3.5rem;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid #f1f5f9;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.tech-tag {
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--radius-xl);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: white;
}

/* Contact Section */
#contact {
    background: #f1f5f9;
    border-radius: var(--radius-3xl);
    padding: 6rem;
    margin-bottom: 6rem;
}

.contact-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.contact-form-section {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

textarea {
    min-height: 150px;
    resize: none;
}

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

.info-item {
    display: flex;
    gap: 1.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

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

.info-content a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-content a:hover {
    color: var(--primary);
}

.map-card {
    margin-top: 1rem;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    background: #0f172a;
    padding: 6rem 0 3rem;
    color: white;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 40px;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 300px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 2rem;
}

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

.footer-col li {
    margin-bottom: 1rem;
}

.footer-col a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-col a:hover {
    color: white;
    padding-left: 5px;
}

.social-group {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {

    .about-content,
    .contact-container,
    .featured-card {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

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

@media (max-width: 768px) {
    nav {
        display: none;
    }

    #hero {
        padding: 6rem 0 2rem;
    }

    .hero-content h2 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        word-wrap: break-word;
    }

    .hero-content h2 br {
        display: none;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

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

    .stat {
        padding: 1.5rem;
    }

    #portfolio {
        width: 100%;
        margin-left: 0;
        padding: 6rem 0;
    }

    #portfolio .section-header {
        margin-bottom: 3rem;
        padding: 0 1.25rem;
    }

    .featured-card {
        padding: 0 1.25rem;
        gap: 1.5rem;
        margin-bottom: 6rem;
    }

    .featured-card .featured-content {
        text-align: left;
    }

    .featured-card h3 {
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }

    .featured-card .project-tags {
        margin-bottom: 1.5rem;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .featured-card .project-tags span {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .featured-card .btn {
        width: auto;
        display: inline-flex;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        display: flex;
        z-index: 1000;
    }

    #nav-menu.active {
        right: 0;
    }

    #nav-menu a {
        font-size: 1.25rem;
        width: 100%;
        text-align: center;
        padding: 1rem;
        color: var(--text-main);
    }

    #nav-menu .btn {
        margin-top: 1rem;
        width: auto;
    }

    #portfolio h3 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    #portfolio p {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
    }

    .project-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 0.5rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    #contact {
        padding: 3rem 1rem;
        margin-bottom: 3rem;
    }

    .contact-form-section {
        padding: 1.5rem;
    }

    .about-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

/* Animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal].active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@media (max-width: 640px) {
    .finance-promo {
        padding: 1rem !important;
        margin-top: 1.5rem !important;
    }

    .finance-promo p {
        font-size: 0.9rem !important;
        line-height: 1.5;
    }

    .finance-promo .mobile-break {
        display: block !important;
        margin-bottom: 0.25rem;
    }
}