/* Global Styles */
:root {
    --primary-color: #2d3436;
    --secondary-color: #636e72;
    --accent-color: #6c5ce7;
    --light-color: #f5f6fa;
    --dark-color: #1e272e;
    --font-primary: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--primary-color);
    background-color: #fff;
    overflow-x: hidden;
    padding-top: 70px;
}

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

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.8rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    scroll-margin-top: 120px; /* Added for anchor link positioning */
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

section[id] {
    scroll-margin-top: 100px;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

a:hover {
    color: #5649d6;
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
}

.btn:hover {
    background: #5649d6;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.btn i {
    margin-right: 0.5rem;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.scroll-down header {
    transform: translateY(-100%);
}

.scroll-up header {
    transform: translateY(0);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

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

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2.5rem;
}

.nav-links a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

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

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

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Section Styling */
.section {
    padding: 4rem 0;
    position: relative;
}

.section:first-of-type {
    padding-top: 2rem; /* Even less padding for the first section */
}

.section:not(#about) {
    padding-top: 4rem;
}

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

.section:not(.bg-light) {
  background-color: white;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.name-highlight {
    color: var(--accent-color);
}

.skills {
    margin-top: 2rem;
}

.skills ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
}

.skills li {
    background: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    font-weight: 500;
}

.profile-image-container {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid var(--accent-color);
    box-shadow: 0 20px 40px rgba(108, 92, 231, 0.2);
    flex-shrink: 0;
    margin-top: -150px;
    position: relative;
    top: -80px;
}

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

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

/* Blog Section Specific Styles */
.blogs .gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.blogs .artwork {
    flex: 1 1 350px;
}

.artwork, .game {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.artwork:hover, .game:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.artwork img, .game img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.artwork-info, .game-info, .animation-info, .research-paper {
    padding: 2rem;
}

/* Research Section */
.research-paper {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    width: 100%;
}

/* Mobile App Section */
.mobile-app-container {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.mobile-app-info {
    flex: 1;
    min-width: 300px;
}

.mobile-app-screenshots {
    flex: 1;
}

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

.screenshot-grid img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.screenshot-grid img:hover {
    transform: scale(1.03);
}

.app-features ul {
    list-style: none;
    margin: 1.5rem 0;
}

.app-features li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    color: var(--secondary-color);
}

.app-features i {
    color: var(--accent-color);
    margin-right: 0.8rem;
    font-size: 1.1rem;
}

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

.animation {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.animation:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

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

.animation-info {
    padding: 1.5rem;
}

/* 3D Game Section */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
}

.game-content {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 3rem;
    align-items: flex-start;
}

.game-video {
    flex: 1 1 45%; /* More precise control over flex behavior */
    min-width: 0;
    max-width: 100%; /* Prevent overflow */
}

.game-video h3 {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--primary-color);
}

.game-info {
    flex: 1 1 45%; /* More precise control over flex behavior */
    min-width: 300px;
    max-width: 100%; /* Prevent overflow */
}

.game-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: var(--accent-color);
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    background: var(--dark-color);
    color: white;
}

footer p {
    color: rgba(255, 255, 255, 0.7);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.3);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: #5649d6;
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .about-content {
        flex-direction: column-reverse;
        gap: 3rem;
    }
    
    .profile-image-container {
        width: 280px;
        height: 280px;
        margin-top: 0;
        top: 0;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .mobile-app-container {
        flex-direction: column;
    }
    
    .screenshot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    nav {
        padding: 1rem 0;
    }
    
    .nav-links {
        position: fixed;
        right: 0;
        top: 70px;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .nav-links a {
        font-size: 1.3rem;
    }
    
    .burger {
        display: block;
    }
    
    .section {
        padding: 5rem 0;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .animation-grid {
        grid-template-columns: 1fr;
    }
    
    .blogs .gallery {
        display: flex;
        flex-direction: column;
    }
    
    .blogs .artwork {
        flex: 1 1 100%;
    }
    
    .game-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .game-video, .game-info {
        width: 100%;
	flex: none;
    }
    
    .game-info {
        padding-top: 0;
    }
    
    .screenshot-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .research-paper {
        padding: 2rem;
    }
    
    .scroll-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .about-content {
        margin-top: 2rem;
    }
    
    .profile-image-container {
        margin: 0 auto 2rem;
    }
}

.nav-active {
    transform: translateX(0);
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}