/* ==================================
   CSS Variables & Theme Setup
================================== */
:root {
    /* Color Palette - Premium Dark Theme */
    --bg-main: #0B0F19;
    /* Deep dark blue */
    --bg-secondary: #1A1F2D;
    /* Slightly lighter dark */
    --primary-color: #5E3BEE;
    /* Vibrant Purple */
    --primary-light: #8E71FF;
    --secondary-color: #00D2FF;
    /* Neon Cyan */
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;

    /* Glassmorphism */
    --glass-bg: rgba(26, 31, 45, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout Variables */
    --container-max: 1200px;
    --nav-height: 80px;

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 90%;
    max-width: var(--container-max);
    margin: 0 auto;
}

/* Sections */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20%;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

/* Utility Classes */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-fast);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #4B2CCC);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(94, 59, 238, 0.4);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(94, 59, 238, 0.6);
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: var(--bg-main);
    transform: translateY(-3px);
}

.text-gradient {
    background: linear-gradient(to right, #00D2FF, #3A7BD5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* ==================================
   Navigation
================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: var(--transition-fast);
    background: transparent;
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-heading);
}

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

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

.nav-item {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.nav-item:hover,
.nav-item.active {
    color: #ffffff;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(11, 15, 25, 0.98);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-nav-overlay.active {
    right: 0;
}

.close-menu-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-nav-links a {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: #fff;
}

.mobile-nav-links a:hover {
    color: var(--secondary-color);
}

/* ==================================
   Hero Section
================================== */
#hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

/* Animated Background glow elements */
#hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(94, 59, 238, 0.15) 0%, rgba(11, 15, 25, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(60px);
}

#hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 40%;
    height: 50%;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.1) 0%, rgba(11, 15, 25, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(60px);
}

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

.hero-text h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-text .typewriter-box {
    margin-bottom: 2rem;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.typewriter-box span {
    color: var(--primary-light);
}

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

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: morph 8s ease-in-out infinite;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    25% {
        border-radius: 50% 50% 30% 70% / 50% 50% 70% 30%;
    }

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

    75% {
        border-radius: 50% 50% 70% 30% / 50% 50% 30% 70%;
    }

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

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================================
   About Section
================================== */
#about {
    background-color: var(--bg-secondary);
}

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

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

.stat-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition-fast);
}

.stat-box:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(94, 59, 238, 0.15);
}

.stat-box h3 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item span.title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-item span.value {
    font-weight: 600;
    color: var(--text-main);
}

/* ==================================
   Services / Skills Section
================================== */
#services {
    background-color: var(--bg-main);
}

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

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform 0.4s ease;
    transform-origin: bottom;
}

.service-card:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
}

.service-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.skills-wrapper {
    margin-top: 5rem;
}

.skills-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.skills-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.skill-tag {
    background: rgba(94, 59, 238, 0.1);
    border: 1px solid rgba(94, 59, 238, 0.3);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.skill-tag:hover {
    background: var(--primary-color);
    box-shadow: 0 0 15px rgba(94, 59, 238, 0.5);
    transform: translateY(-3px);
}

/* ==================================
   Experience Section
================================== */
#experience {
    background-color: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--glass-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-secondary);
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    position: relative;
    border-radius: 15px;
    transition: var(--transition-fast);
}

.timeline-content:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.timeline-content h5 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ==================================
   Portfolio Section
================================== */
#portfolio {
    background-color: var(--bg-main);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
    group: hover;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(11, 15, 25, 0.9) 0%, rgba(11, 15, 25, 0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition-fast);
}

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

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

.portfolio-info h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    color: #fff;
}

.portfolio-info p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.portfolio-item:hover .portfolio-info h4,
.portfolio-item:hover .portfolio-info p {
    transform: translateY(0);
}

/* ==================================
   Reviews Section
================================== */
#reviews {
    background-color: var(--bg-secondary);
}

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

.review-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
}

.review-stars {
    color: #FFD700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.review-text {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.reviewer-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

.reviewer-company {
    font-size: 0.85rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================================
   Contact Section & Footer
================================== */
#contact {
    background-color: var(--bg-main);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

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

.contact-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition-fast);
}

.contact-card:hover {
    border-color: var(--primary-light);
    transform: translateX(10px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(94, 59, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-light);
}

.contact-card h4 {
    margin-bottom: 0.3rem;
}

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

.contact-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 20px;
}

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

.form-control {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.3);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
.footer {
    background-color: #050810;
    padding: 4rem 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-brand h3 span {
    color: var(--secondary-color);
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 350px;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}

.social-links a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact p i {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==================================
   Responsive Design
================================== */
@media (max-width: 991px) {

    .hero-content,
    .about-grid,
    .contact-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-details {
        text-align: left;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 21px;
    }

    .right {
        left: 0;
    }

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

    .footer-brand p {
        margin: 0 auto 1.5rem auto;
    }

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

    .footer-contact p {
        justify-content: center;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .image-wrapper {
        width: 300px;
        height: 300px;
    }

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

    .contact-form {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }

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

    .section-title {
        font-size: 2rem;
    }
}

/* ==================================
   PDF Modals
================================== */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content-box {
    background-color: var(--bg-secondary);
    margin: auto;
    padding: 20px;
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

.iframe-container {
    width: 100%;
    height: 70vh;
    border-radius: 10px;
    overflow: hidden;
}

.pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Utility Classes */
.text-center {
    text-align: center !important;
}
.w-100 {
    width: 100% !important;
}
.mt-2 {
    margin-top: 0.5rem !important;
}
.mt-4 {
    margin-top: 1.5rem !important;
}