/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    font-family: 'Poppins', sans-serif;
    color: white;
    min-height: 100vh;
    padding: 30px 40px;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

/* ===== Mobile Menu Toggle ===== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: #0a192f;
    border: 2px solid #64ffda;
    border-radius: 8px;
    padding: 10px;
    color: #64ffda;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: #64ffda;
    color: #0a192f;
    transform: scale(1.05);
}

/* ===== Mobile Overlay ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    backdrop-filter: blur(5px);
}

.mobile-overlay.active {
    display: block;
}

/* ===== Sidebar Styles ===== */
.sidebar {
    width: 260px;
    background: #0a192f;
    padding: 25px;
    border-radius: 15px;
    position: fixed;
    left: 40px;
    top: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 0 25px rgba(100, 255, 218, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #64ffda;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.sidebar-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.profile-photo-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.profile-photo-container img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: 3px solid wheat;
    object-fit: cover;
}

.profile-photo-container::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #3aff3a;
    border-radius: 50%;
    bottom: 5px;
    right: 5px;
    border: 2px solid #fff;
    box-shadow: 0 0 8px rgba(58, 255, 58, 0.7);
    z-index: 2;
}

.name {
    font-size: 20px;
    margin-bottom: 5px;
}

.title {
    font-size: 0.8rem;
    color: white;
    position: relative;
    display: inline-block;
    padding: 8px 20px;
    margin: 15px 0;
    border-radius: 4px;
    background: linear-gradient(to right, 
        #0a192f 20%, 
        #112240 50%, 
        #0a192f 80%);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.2);
    overflow: hidden;
}

.title::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #64ffda 0%, 
        rgba(100, 255, 218, 0.4) 50%, 
        #64ffda 100%);
    z-index: -1;
    animation: borderGlow 3s linear infinite;
    background-size: 400% 400%;
}

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.title::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: #0a192f;
    border-radius: 3px;
    z-index: -1;
}

.contact-info {
    margin: 20px 0;
    width: 100%;
}

.contact-info p {
    font-size: 12px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
    word-break: break-word;
}

.contact-info i {
    color: #64ffda;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.social-links {
    margin-top: auto;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(100, 255, 218, 0.1);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #64ffda;
    transform: translateY(-3px);
}

.social-icon:hover svg {
    fill: #0a192f;
}

/* ===== Main Content Area ===== */
.main-content {
    margin-left: 340px;
    padding: 0 40px 60px;
    width: calc(100% - 380px);
    min-height: 100vh;
}

/* Navigation Bar */
.nav-bar {
    background: #0a192f;
    border-radius: 10px;
    padding: 15px 30px;
    margin: 0 0 40px;
    display: flex;
    justify-content: flex-end;
    gap: 25px;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    color: #64ffda !important;
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
}

/* Content Sections */
.content-section {
    background: #0a192f;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 50px;
    border: 1px solid rgba(100, 255, 218, 0.1);
    animation: fadeIn 0.3s ease-in;
}

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

.section-heading {
    font-size: 28px;
    color: #64ffda;
    margin-bottom: 30px;
    text-align: center;
}

.subsection-heading {
    font-size: 20px;
    color: #ccd6f6;
    margin: 30px 0 20px;
}

/* About Section */
.about-description {
    font-size: 16px;
    line-height: 1.8;
    color: #8892b0;
    margin-bottom: 40px;
    text-align: justify;
}

/* Roles Grid */
.roles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.role-box {
    background: #112240;
    padding: 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.role-box:hover {
    transform: translateY(-5px);
    border-color: #64ffda;
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.1);
}

.role-box h4 {
    color: #64ffda;
    margin: 15px 0 10px;
    font-size: 18px;
}

.role-box p {
    color: #8892b0;
    font-size: 14px;
    line-height: 1.6;
}

.role-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: brightness(1.2);
}

/* Skills Grid */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.skill-item span {
    font-size: 14px;
    font-weight: 500;
    color: #ccd6f6;
}

.skill-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #112240;
    padding: 12px;
    object-fit: contain;
    transition: all 0.3s ease;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.skill-img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(100, 255, 218, 0.2);
    border-color: #64ffda;
}

/* Resume Section Styling */
.resume-container {
    max-width: 900px;
    margin: 0 auto;
}

.resume-card {
    background: #112240;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    transition: transform 0.3s ease;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.resume-card:hover {
    transform: translateY(-5px);
    border-color: #64ffda;
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.1);
}

.timeline-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-icon {
    font-size: 1.5rem;
    color: #64ffda;
    margin-right: 1rem;
    width: 30px;
}

.timeline-line {
    position: absolute;
    left: 0.65rem;
    top: 2.5rem;
    bottom: 0;
    width: 2px;
    background: rgba(100, 255, 218, 0.3);
}

.timeline-item {
    margin-left: 2.5rem;
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.85rem;
    top: 0.4rem;
    width: 12px;
    height: 12px;
    background: #64ffda;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
    border: 2px solid #0a192f;
}

.timeline-item h4 {
    color: #ccd6f6;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0.5rem 0;
    color: #8892b0;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-company {
    font-weight: 500;
    color: #64ffda;
}

.timeline-date {
    font-style: italic;
    white-space: nowrap;
}

.timeline-description {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.timeline-description li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
    color: #8892b0;
}

.timeline-description .fa-caret-right {
    position: absolute;
    left: 0;
    top: 0.3rem;
    color: #64ffda;
}

/* Certifications Grid */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(100, 255, 218, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(100, 255, 218, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
}

.cert-item:hover {
    background: rgba(100, 255, 218, 0.1);
    border-color: #64ffda;
    transform: translateY(-2px);
}

.cert-icon {
    color: #64ffda;
    font-size: 1.2rem;
    width: 20px;
    flex-shrink: 0;
}

.cert-item span {
    color: #8892b0;
    font-size: 0.9rem;
    flex-grow: 1;
}

.cert-link {
    color: #64ffda;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.cert-item:hover .cert-link {
    opacity: 1;
}

/* Download Button */
.download-container {
    text-align: center;
    margin-top: 3rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #64ffda, #0a192f);
    color: #0a192f;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #64ffda;
    position: relative;
    overflow: hidden;
}

.download-btn svg {
    margin-left: 0.8rem;
    transition: transform 0.3s ease;
}

.download-btn:hover {
    background: linear-gradient(45deg, #0a192f, #64ffda);
    color: #64ffda;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}

.download-btn:hover svg {
    transform: translateY(3px);
}

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.project-card {
    background: #112240;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(100, 255, 218, 0.1);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(100, 255, 218, 0.1);
    border-color: #64ffda;
}

.project-image-container {
    position: relative;
    overflow: hidden;
    height: 220px;
    padding: 1rem;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-categories {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 90%;
}

.category-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    background-color: rgba(16, 24, 39, 0.8);
    color: white;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.category-badge.web-app { 
    border-color: #64ffda; 
    color: #64ffda;
}
.category-badge.backend { 
    border-color: #ff6464; 
    color: #ff6464;
}
.category-badge.uiux { 
    border-color: #ffb864; 
    color: #ffb864;
}
.category-badge.frontend { 
    border-color: #64b8ff; 
    color: #64b8ff;
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    color: #64ffda;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.project-description {
    color: #8892b0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-links {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #64ffda;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.github-link:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
    border-color: #64ffda;
}

.github-link i {
    font-size: 16px;
}

/* Contact Form Styling */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.contact-form {
    display: grid;
    gap: 1.8rem;
}

.form-group {
    position: relative;
    margin-bottom: 1rem;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 0.9rem;
    color: #64ffda;
    font-size: 0.9rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: #0a192f;
    padding: 0 0.3rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: #112240;
    border: 2px solid rgba(100, 255, 218, 0.1);
    border-radius: 4px;
    color: #ccd6f6;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group input:not(:placeholder-shown),
.form-group textarea:not(:placeholder-shown) {
    border-color: #64ffda;
    outline: none;
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -0.6rem;
    font-size: 0.8rem;
    color: #64ffda;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #64ffda, #0a192f);
    border: 2px solid #64ffda;
    border-radius: 4px;
    color: #0a192f;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.submit-btn:hover {
    background: linear-gradient(45deg, #0a192f, #64ffda);
    color: #64ffda;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.2);
}

.submit-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Responsive */
@media (max-width: 1200px) {
    body {
        padding: 20px;
    }
    
    .sidebar {
        left: 20px;
        width: 240px;
    }
    
    .main-content {
        margin-left: 280px;
        width: calc(100% - 320px);
        padding: 0 20px 40px;
    }
    
    .nav-bar {
        padding: 15px 20px;
        gap: 15px;
    }

    .projects-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        border-radius: 0;
        z-index: 1000;
        overflow-y: auto;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 80px 20px 40px;
    }
    
    .nav-bar {
        justify-content: center;
        gap: 10px;
        padding: 12px 15px;
        margin-bottom: 30px;
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
        margin: 2px;
    }

    .content-section {
        padding: 25px 20px;
        margin-bottom: 30px;
    }
    
    .section-heading {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .about-description {
        font-size: 15px;
        text-align: left;
    }

    .roles-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .skills-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 0;
    }

    .skill-img {
        width: 60px;
        height: 60px;
    }

    .skill-item span {
        font-size: 12px;
    }

    .role-image {
        width: 50px;
        height: 50px;
    }

    /* Resume Mobile Styles */
    .resume-container {
        padding: 0;
    }

    .resume-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .timeline-header {
        margin-bottom: 1.5rem;
    }

    .timeline-item {
        margin-left: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .timeline-line {
        left: 0.75rem;
        top: 2rem;
    }

    .timeline-dot {
        left: -1.25rem;
        top: 0.3rem;
        width: 10px;
        height: 10px;
    }

    .timeline-meta {
        flex-direction: column;
        gap: 0.3rem;
        align-items: flex-start;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    .timeline-description li {
        font-size: 0.9rem;
        padding-left: 1rem;
    }

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

    /* Projects Mobile Styles */
    .projects-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }
    
    .project-image-container {
        height: 200px;
        padding: 0.8rem;
    }

    .project-content {
        padding: 1.2rem;
    }

    .project-title {
        font-size: 1.1rem;
    }

    .project-description {
        font-size: 0.9rem;
    }

    /* Contact Form Mobile */
    .contact-container {
        padding: 1rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .download-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Small Mobile Responsive */
@media (max-width: 480px) {
    .main-content {
        padding: 70px 15px 30px;
    }

    .nav-bar {
        gap: 8px;
        padding: 10px 5px;
    }

    .nav-link {
        font-size: 12px;
        padding: 6px 8px;
    }

    .content-section {
        padding: 20px 15px;
    }

    .section-heading {
        font-size: 22px;
    }

    .subsection-heading {
        font-size: 18px;
    }

    .skills-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .skill-img {
        width: 50px;
        height: 50px;
    }

    .resume-card {
        padding: 1rem;
    }

    .timeline-item {
        margin-left: 1rem;
    }

    .timeline-line {
        left: 0.5rem;
    }

    .timeline-dot {
        left: -0.9rem;
        width: 8px;
        height: 8px;
    }

    .timeline-description li {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .timeline-company {
        font-size: 0.9rem;
    }

    .contact-form {
        gap: 1.5rem;
    }

    .project-categories {
        bottom: 0.5rem;
        left: 0.5rem;
    }

    .category-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.6rem;
    }
}

/* Better touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .nav-link {
        padding: 12px 16px;
        margin: 4px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .social-icon {
        width: 44px;
        height: 44px;
        min-height: 44px;
    }
    
    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }
    
    .project-card,
    .resume-card,
    .role-box {
        transform: none !important;
    }
}

/* Prevent text overflow and ensure readability */
.timeline-description li,
.project-description,
.about-description {
    word-break: break-word;
    hyphens: auto;
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Loading states and transitions */
.content-section * {
    transition: all 0.3s ease;
}

/* Print styles */
@media print {
    .sidebar,
    .nav-bar,
    .mobile-menu-toggle,
    .mobile-overlay {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    
    .content-section {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
        margin-bottom: 20px !important;
    }
}