/* =========================================
   1. Setup & Variables
   ========================================= */
:root {
    --bg-color: #0a0a1a;
    --bg-secondary: #11112b;
    --primary-color: #7000ff;
    --primary-dark: #5200bd;
    --text-color: #e0e0e0;
    --text-muted: #a0a0b0;
    --white: #ffffff;
    --accent: #00d2ff;

    --font-main: 'Outfit', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;

    --transition: all 0.3s ease;
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    --shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
    --glow: 0 0 20px rgba(112, 0, 255, 0.5);
}

/* =========================================
   1.1 Keyframe Animations
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(112, 0, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(112, 0, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(112, 0, 255, 0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   2. Global Reset & Typography
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

main {
    min-height: calc(100vh - 80px - 150px); /* rough estimate of header + footer */
}

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

.highlight {
    color: var(--primary-color);
    position: relative;
}

.section {
    padding: 100px 0;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--primary-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* =========================================
   3. Buttons & Utilities
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent));
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(112, 0, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(112, 0, 255, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--primary-color);
    margin-left: 15px;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.4);
    transform: translateY(-3px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* =========================================
   4. Header & Navigation
   ========================================= */
.header {
    height: 80px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--white);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.nav-links li a.active {
    color: var(--white);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
}

/* =========================================
   5. Hero Section
   ========================================= */
.hero {
    padding-top: 150px;
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.subtitle {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.title {
    font-size: 4.5rem;
    margin-bottom: 15px;
    line-height: 1.1;
}

.role {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Cursor style moved to JS section at end of file for better organization with JS changes */

.description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    max-width: 500px;
}

.img-box {
    width: 350px;
    height: 350px;
    background: linear-gradient(45deg, var(--bg-secondary), var(--bg-color));
    border-radius: 50%;
    /* Make it circular initially or responsive to image */
    overflow: hidden;
    position: relative;
    z-index: 2;
    border: 3px solid rgba(112, 0, 255, 0.3);
    box-shadow: 0 0 50px rgba(112, 0, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

.img-box img {
    /* Adjust these depending on the bg.png aspect ratio */
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.shape {
    position: absolute;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.6;
    animation: float 8s ease-in-out infinite reverse;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: -50px;
    right: -50px;
    border-radius: 50%;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: var(--accent);
    bottom: -50px;
    left: 0;
    border-radius: 50%;
    animation-delay: 2s;
}

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

.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-text {
    max-width: 800px;
    text-align: center;
}

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

.about-text p {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

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

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   7. Services Section
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-secondary);
    padding: 40px 30px;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    background: #161636;
    border-color: rgba(112, 0, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: all 0.4s ease;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(112, 0, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

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

.service-card:hover::before {
    transform: scaleX(1);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(112, 0, 255, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border-radius: 10px;
    margin-bottom: 25px;
    transition: var(--transition-bounce);
}

.service-card:hover .icon-box {
    background: var(--primary-color);
    color: var(--white);
    transform: rotateY(360deg);
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.4);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    transition: var(--transition);
}

.service-card:hover h3 {
    color: var(--accent);
}

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

/* =========================================
   8. Projects Section
   ========================================= */
.projects {
    background-color: var(--bg-secondary);
}

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

.project-card {
    background: var(--bg-color);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.project-content {
    padding: 30px;
}

.project-tags {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-tags span {
    font-size: 0.8rem;
    padding: 5px 12px;
    background: rgba(112, 0, 255, 0.1);
    color: var(--accent);
    border-radius: 20px;
}

.project-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.project-links {
    display: flex;
    gap: 20px;
}

.project-links a {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

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

/* =========================================
   9. Contact Section
   ========================================= */
.contact-wrapper {
    display: flex;
    gap: 50px;
    /* justify-content: space-between; */
}

.contact-info {
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item .icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

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

.contact-form {
    flex: 1.5;
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background-color: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: var(--white);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #0f0f22;
    box-shadow: 0 0 15px rgba(112, 0, 255, 0.2);
    transform: translateY(-2px);
}

/* =========================================
   10. Footer
   ========================================= */
.footer {
    padding: 50px 0;
    text-align: center;
    background-color: #05050f;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

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

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.5);
}

/* =========================================
   11. Responsiveness
   ========================================= */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 50px;
    }

    .hero-content {
        max-width: 100%;
    }

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

    .description {
        margin-left: auto;
        margin-right: auto;
    }

    .contact-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 3rem;
    }

    .role {
        font-size: 1.5rem;
    }

    .nav-links {
        display: none;
        /* In a real scenario, JS would toggle this */
    }

    .hamburger {
        display: block;
    }

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

/* =========================================
   12. JavaScript Driven Styles
   ========================================= */

/* Mobile Menu Active State */
.nav-links.mobile-active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px; /* Header height */
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(15px);
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideDown 0.3s ease forwards;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing Effect Cursor */
/* We keep the CSS animation as a fallback or enhancement, 
   but ensuring the JS typing doesn't break layout */
.typing-text {
    border-right: 2px solid var(--accent);
    padding-right: 5px;
    animation: blinkCursor 0.7s infinite;
}

@keyframes blinkCursor {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--accent); }
}

.typing-text::after {
    /* Remove the pseudo-element cursor since we are using border-right now for simpler JS compatibility */
    content: none; 
}

/* =========================================
   13. Qualification Section
   ========================================= */
.qualification-container {
    max-width: 800px;
    margin: 0 auto;
}

.qualification-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.qualification-button {
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qualification-button:hover,
.qualification-button.active {
    color: var(--primary-color);
}

.qualification-sections {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qualification-content {
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.qualification-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.qualification-data {
    display: grid;
    grid-template-columns: 1fr max-content 1fr;
    column-gap: 1.5rem;
}

.qualification-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}

.qualification-subtitle {
    display: inline-block;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.qualification-calendar {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.qualification-location {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.qualification-rounder {
    display: inline-block;
    width: 13px;
    height: 13px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.qualification-line {
    display: block;
    width: 1px;
    height: 100%;
    background-color: var(--primary-color);
    transform: translate(6px, -7px);
}

/* Scroll Adjustment for Fixed Header */
section {
    scroll-margin-top: 80px;
}