/* ============================================
   SOUMYAJIT BIR - GAME DEVELOPER PORTFOLIO
   Modern Cyber-Space Theme
   ============================================ */

:root {
    --bg-dark: #0a0a1a;
    --bg-alt: #11112d;
    --accent-primary: #00d4ff;
    --accent-secondary: #7b68ee;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
}

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

.section {
    padding: 100px 0;
    position: relative;
}

.bg-alt {
    background-color: var(--bg-alt);
}

.text-gradient {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==================== CUSTOM CURSOR ==================== */
.cursor {
    display: none;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: transparent;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    height: 35px;
    width: auto;
    object-fit: contain;
    display: block;
    filter: invert(53%) sepia(93%) saturate(1478%) hue-rotate(159deg) brightness(101%) contrast(105%);
    transition: var(--transition-smooth);
}

.logo-img:hover {
    transform: scale(1.05);
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    position: relative;
}

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

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

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

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-dark);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

/* ==================== HERO SECTION ==================== */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 1rem;
}

.hero-pre-title {
    font-size: 1.2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    opacity: 0.8;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    color: var(--text-muted);
    height: 2.5rem; /* Prevent layout shift */
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn-main {
    padding: 1rem 2.5rem;
    background: var(--accent-primary);
    color: var(--bg-dark);
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.btn-outline {
    padding: 1rem 2.5rem;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.btn-main:hover, .btn-outline:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.2);
}

/* Hero CV Button */
.hero-cv {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.btn-cv {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-cv:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}
.btn-outline:hover {
    background: rgba(0, 212, 255, 0.1);
}

/* ==================== ABOUT SECTION ==================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.subtitle {
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    font-size: 0.9rem;
}

.title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-top: 0.5rem;
}

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

.about-image-card {
    position: relative;
    border-radius: 20px;
    padding: 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.image-wrapper {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 15px;
    overflow: hidden;
    background: var(--bg-alt);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.image-placeholder i {
    font-size: 5rem;
    color: var(--glass-border);
}

.about-text .lead {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

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

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

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

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

.stat-plus {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* ==================== EDUCATION SECTION ==================== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.education-item {
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: var(--transition-smooth);
}

.education-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-secondary);
}

.edu-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.edu-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

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

.edu-date {
    display: block;
    margin-top: 0.5rem;
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ==================== SKILLS SECTION ==================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

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

.skill-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
}

.skill-card i {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skill-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.skill-level span:last-child {
    color: var(--accent-primary);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    width: 0; /* Animated with JS */
}

/* ==================== EXPERIENCE SECTION ==================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--glass-border);
}

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

.timeline-dot {
    position: absolute;
    left: -6.5px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-content span.time {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.timeline-content h3 {
    margin: 0.5rem 0;
    font-size: 1.5rem;
}

.timeline-content .company {
    color: var(--text-muted);
}

.timeline-role {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.timeline-details {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.timeline-details li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.timeline-details li::before {
    content: "•";
    position: absolute;
    left: 0.25rem;
    top: 0;
    color: var(--accent-primary);
    font-size: 1.2rem;
}

/* ==================== PROJECTS SECTION ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--glass-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
}

.project-img-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Responsive Iframe Embeds */
.project-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    width: 100%;
}

.project-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-info p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    color: var(--accent-primary);
    border: 1px solid rgba(0, 212, 255, 0.2);
    white-space: nowrap;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Play button overlay on project card cover */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.play-overlay i {
    font-size: 3rem;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    transform: scale(0.8);
    transition: var(--transition-smooth);
}

.project-card:hover .play-overlay {
    opacity: 1;
}

.project-card:hover .play-overlay i {
    transform: scale(1);
}

/* ==================== VIDEO MODAL ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1040px;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2001;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(10, 10, 26, 0.8);
    border: 1px solid var(--glass-border);
    color: var(--accent-primary);
    font-size: 1.8rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 2002;
    line-height: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.modal-close:hover {
    background: var(--accent-primary);
    color: var(--bg-dark);
    transform: scale(1.1);
}

.modal-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.modal-video-container iframe {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Image Modal Styles */
.img-modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
    max-width: 90vh;
}

.modal-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 10px;
    box-sizing: border-box;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* ==================== CONTACT SECTION ==================== */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-info h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
}

.detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.detail i {
    color: var(--accent-primary);
    width: 25px;
}

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

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    border: 1px solid var(--glass-border);
}

.social-links a:hover {
    background: var(--accent-primary);
    color: var(--bg-dark);
    transform: translateY(-5px);
}

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

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

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--accent-primary);
    border: none;
    border-radius: 10px;
    color: var(--bg-dark);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

/* ==================== FOOTER ==================== */
footer {
    padding: 4rem 0;
    background: #05050f;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .about-grid, .contact-wrapper {
        grid-template-columns: 1fr;
    }
    .about-text {
        order: 2;
    }
    .about-image-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.5s ease-in-out;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--text-main);
        z-index: 1001;
    }

    .nav-cta {
        display: none;
    }
}

@media (min-width: 993px) {
    .menu-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-btns {
        flex-direction: column;
        gap: 1rem;
    }
    .btn-main, .btn-outline {
        width: 100%;
    }
    .section {
        padding: 60px 0;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .about-stats {
        grid-template-columns: 1fr;
    }
}

/* ==================== LOCAL FILE MODE WARNING ==================== */
.local-file-notice {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0b0b14;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    text-align: center;
    color: #fff;
    z-index: 5;
    box-sizing: border-box;
}

.local-file-notice i {
    font-size: 3.5rem;
    color: #ff0055;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 0, 85, 0.4));
}

.local-file-notice h3 {
    margin-bottom: 1rem;
    color: var(--accent-primary);
    font-size: 1.6rem;
    font-weight: 800;
}

.local-file-notice p {
    font-size: 0.95rem;
    max-width: 500px;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.local-file-notice code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--accent-secondary);
}

.local-file-notice .btn-submit {
    max-width: 250px;
    text-decoration: none;
    font-size: 1rem;
}
