@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1E3A8A;
    --primary-soft: rgba(30, 58, 138, 0.1);
    --secondary: #3B82F6;
    --dark: #0F172A;
    --light-dark: #1E293B;
    --text-main: #334155;
    --text-muted: #64748B;
    --white: #FFFFFF;
    --bg-light: #F8FAFC;
    --gradient: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(30, 58, 138, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--dark);
    font-weight: 700;
}

.section-tag {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
}

/* Ghost Text System */
.bg-ghost-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15rem;
    font-weight: 900;
    color: rgba(99, 68, 231, 0.03);
    text-transform: uppercase;
    z-index: 1;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(99, 68, 231, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(99, 68, 231, 0.5);
}

header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

header.scrolled {
    top: 15px;
    width: 90%;
    max-width: 1100px;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.8rem 2.5rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.05),
        0 5px 15px -3px rgba(0, 0, 0, 0.02);
    width: 100%;
    transition: all 0.5s ease;
}

header.scrolled .main-nav {
    padding: 0.6rem 2rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

.nav-left,
.nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-right {
    justify-content: flex-end;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
    flex: 0 0 auto;
    background: rgba(15, 23, 42, 0.03);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    margin: 0 2rem;
}

.nav-cta {
    background: var(--primary);
    color: var(--white);
    padding: 0.7rem 1.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.2);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    z-index: 1001;
    margin-left: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    padding: 0.4rem 0.6rem;
    position: relative;
    transition: var(--transition);
    opacity: 0.7;
}

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

.nav-links a::after {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
    padding-top: 140px;
}

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

.hero-content h1 {
    font-size: 5.5rem;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.hero-content h1 span {
    color: var(--primary);
    position: relative;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 550px;
    margin-bottom: 2.5rem;
}

.hero-img-box {
    position: relative;
    z-index: 1;
}

.hero-img-box::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 110%;
    height: 110%;
    background: var(--primary-soft);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: -1;
    animation: blobMorph 10s infinite alternate;
}

@keyframes blobMorph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
    }
}

.hero-img {
    width: 100%;
    border-radius: 30px;
    mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

/* Decorations */
.decor-dots {
    position: absolute;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(var(--primary) 1.5px, transparent 1.5px);
    background-size: 15px 15px;
    opacity: 0.1;
    z-index: 0;
}

/* Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.service-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(99, 68, 231, 0.05);
    position: relative;
    z-index: 2;
}

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

.icon-box {
    width: 60px;
    height: 60px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* Timeline */
.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8rem;
}

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::after {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 2px;
    height: 100%;
    background: var(--primary-soft);
    border-radius: 10px;
}

.timeline-item {
    position: relative;
    padding-bottom: 4rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border: 4px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
    transform: translateX(-9px);
}

.timeline-item.current::before {
    background: var(--primary);
    box-shadow: 0 0 0 5px rgba(30, 58, 138, 0.1);
    animation: markerPulse 2s infinite;
}

@keyframes markerPulse {
    0% { box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(30, 58, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 58, 138, 0); }
}

.timeline-item.previous-group::before {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.timeline-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.8rem;
    display: block;
}

.previous-group .timeline-label {
    color: var(--text-muted);
}

.timeline-content h3, .sub-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
}

.institution {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.sub-timeline {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sub-item {
    position: relative;
}

.sub-item::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 10px;
    width: 10px;
    height: 10px;
    background: #cbd5e1;
    border-radius: 50%;
    transform: translateX(-4px);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    background: var(--primary);
    color: var(--white);
}

.stat-item h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.stat-item:hover h2 {
    color: var(--white);
}

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

.portfolio-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-info {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

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

.portfolio-card:hover .portfolio-info {
    opacity: 1;
}

/* Responsive */
@media (max-width: 992px) {
    header {
        top: 10px;
        width: 100%;
        padding: 0 1rem;
    }

    .main-nav {
        padding: 0.6rem 1.5rem;
        border-radius: 20px;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: 1rem;
        width: calc(100% - 2rem);
        height: auto;
        min-height: 300px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        padding: 2.5rem 0;
        border-radius: 25px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.05);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1000;
        margin: 0;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        right: 1rem;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 600;
    }

    .nav-cta {
        display: none;
    }

    .nav-links::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--primary-soft);
        z-index: -1;
        opacity: 0.3;
    }

    .mobile-nav-toggle {
        display: block;
    }

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

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

    .hero-content h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-desc {
        text-align: center;
        margin: 0 auto 2.5rem;
    }

    .hero-btns {
        text-align: center;
    }

    .hero-img-box {
        max-width: 400px;
        margin: 0 auto;
    }

    .bg-ghost-text {
        font-size: clamp(4rem, 15vw, 8rem);
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1.5rem;
    }

    .section-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .hero-content h1 {
        font-size: clamp(2.2rem, 10vw, 3rem);
    }

    .bg-ghost-text {
        display: none;
    }
}

/* Footer */
.footer {
    background-color: var(--dark);
    padding-bottom: 30px;
    padding-top: 30px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    padding-bottom: 20px;
}

.footer-nav {
    padding-left: 150px;
}

.footer-brand p {
    color: #94a3b8;
    margin: 1.5rem 0 2rem;
    font-size: 0.95rem;
}

.footer-nav h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
}

.footer-info {
    list-style: none;
}

.footer-info li {
    color: #94a3b8;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.footer-info li i {
    color: var(--primary);
    width: 20px;
}

.newsletter-form button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 1.2rem;
    list-style: none;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.3);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.85rem;
}

.branding a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

@media (max-width: 992px) {
    section {
        padding: 60px 0;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-nav {
        padding-left: 0;
    }

    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-info li {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    .about-grid {
        display: flex;
        flex-direction: column-reverse;
        text-align: center;
    }
}