/* Theme Variables */
:root {
    --bg-primary: #f4f4f9;
    --bg-secondary: #ffffff;
    --text-primary: #333;
    --accent: #007bff;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2c2c2c;
    --text-primary: #e0e0e0;
    --card-bg: #2c2c2c;
}

[data-theme="dark"] .about .parallax-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}
/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scroll Progress Bar */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 5px;
    background: var(--accent);
    z-index: 999;
    transition: width 0.3s ease;
}

/* Particle Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-primary);
}

/* Navbar Styles */
/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    backdrop-filter: blur(10px); /* Glossy blur effect */
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 1000;
    transition: background 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.2); /* Slightly more opaque when scrolled */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .navbar {
    background: rgba(0, 0, 0, 0.2); /* Dark mode transparency */
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(0, 0, 0, 0.3);
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    position: relative;
    z-index: 1;
}

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

.nav-links li {
    margin-left: 1.5rem;
    position: relative;
    padding: 0.5rem 0;
    transition: transform 0.3s ease, background 0.3s ease;
}

.nav-links li:hover {
    transform: translateY(-2px); /* Subtle lift on hover */
    background: rgba(255, 255, 255, 0.2); /* Glossy highlight */
    border-radius: 5px;
}

[data-theme="dark"] .nav-links li:hover {
    background: rgba(255, 255, 255, 0.1); /* Lighter highlight in dark mode */
}

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

.nav-links li:hover::after {
    width: 100%; /* Underline effect on hover */
}


.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 400;
    transition: color 0.3s;
    position: relative;
    z-index: 1;
}

.nav-link:hover {
    color: var(--accent);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

/* Scroll Progress Bar */
#scroll-progress-bar {
    position: fixed;
    top: 60px; /* Adjust based on navbar height */
    left: 0;
    width: 0; /* Starts at 0, updated via JS */
    height: 4px;
    background: var(--accent);
    z-index: 999; /* Below navbar but above content */
    transition: width 0.3s ease;
}


/* General Section Styles */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
}

/* Hero Section */
.hero {
    text-align: center;
    background: linear-gradient(rgba(0, 123, 255, 0.3), rgba(0, 123, 255, 0.3)), url('https://images.unsplash.com/photo-1516321310766-61f6f8c0b48f?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3');
    background-size: cover;
    background-position: center;
    color: #fff;
}

.profile-pic-wrapper {
    position: relative;
    display: inline-block;
    width: 150px;
    height: 150px;
}

.progress-bar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(rgba(231, 240, 237, 0) 0deg, var(--accent) 30deg);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.profile-pic {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    z-index: 2;
    transition: opacity 0.3s ease-in-out;
}

.profile-pic-wrapper:hover .progress-bar {
    opacity: 1;
}
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    transform: translateZ(0);
}
.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.typed-text {
    color: var(--accent);
    font-weight: 600;
}

.contact-links a {
    font-size: 1.25rem;
    margin: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.contact-links a:hover {
    color: var(--accent);
}

.contact-links img {
    height: 20px;
    width: 20px;
    vertical-align: middle;
}

/* Button Styles */
.btn, .touch {
    margin-top: 1rem;;
    background: var(--accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn:hover, .touch:hover {
    background: #0056b3;
}

.glow {
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* About Section */
/* About Section */
.about {
    position: relative;
    padding: 5rem 2rem;
    min-height: 100vh; /* Ensure section is tall enough for parallax */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden; /* Prevent overflow issues */
}


.about-content {
    display: flex;
    align-items: justify;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    
}

.about-content img {
    width: 300px;
    height:320px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    object-fit: cover;
}

.about-content div {
    flex: 1;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}


/* Timeline Section */
.timeline {
    position: relative;
    margin:0 auto;
    max-width: 800px;
    padding: 2rem 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 95%;
    background: var(--accent);
    transform: translateX(-50%);
    margin-top:10rem;
    margin-bottom: 100rem;
}

.timeline-item {
    position: relative;
    margin: 2rem 0;
    width: 50%;
    padding: 1.3rem;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left .timeline-card::before {
    right: -32px;
}

.timeline-item.right .timeline-card::before {
    left: -28px;
}

.timeline-card::after {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-item.left .timeline-card::after {
    right: -20px;
    border-left-color: var(--card-bg);
}

.timeline-item.right .timeline-card::after {
    left: -20px;
    border-right-color: var(--card-bg);
}

/* Skills Section */
.skills {
    padding: 2rem 1rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-items: left;
    gap: 2rem;
    max-width: 1200px;
    margin-left:3rem;
    justify-items: center;
    
}

.skill {
    display: flex;
    flex-direction: column;
    flex-wrap:wrap;
    align-items: center;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    width: 160px;
}

.skill img {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.skill p {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.sprogress-bar {
    background: #e0e0e0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.progress {
    background: var(--accent);
    height: 100%;
    width: var(--progress);
    transition: width 1s ease-in-out;
}

.skill:hover {
    transform: translateY(-10px);
}

/* Coding Profiles Section */
.coding-profiles {
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 18px;
    
}

.coding-profiles-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 2rem;
    align-items: left;
    margin-left: 3rem;
}

.coding-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    border-radius: 14px;
    /* box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07); */
    padding: 1.5rem 1.2rem;
    width: 20% ;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    
}

.coding-profile-card img {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    border-radius: 10px;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s;
}

.coding-profile-card span {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.coding-profile-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 123, 255, 0.10);
    background: var(--accent);
}

.coding-profile-card:hover span {
    color: #fff;
}

.coding-profile-card:hover img {
    transform: scale(1.12) rotate(-6deg);
}

/* Projects Section */
.projects {
    padding: 4rem 2rem;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 0.5rem auto;
    border-radius: 2px;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.filter-btn {
    background: var(--card-bg);
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.4), transparent);
    transition: left 0.4s ease;
    z-index: -1;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.projects-grid {
    display:flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 2rem;
    margin-left:6rem;
}

.project-card {
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--card-bg);
    padding: 1.5rem;
    width:300px;
    text-align: justify;
}
.project-card p{
    text-align: justify;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.2);
    border-color: var(--accent);
}
.project-card h3 {
    text-align:center;
}
.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    align-items: center;
    border-radius: 10px;
    margin-bottom: 1rem;
}

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

.project-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1rem;
    text-align: center;
}

.project-card p {
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0 1rem 1rem;
    text-align: center;
}

.project-card .btn {
    display: block;
    margin: 0 auto 1.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.project-card .btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

/* Base Styles */
.modal {
    display: none;
    position: fixed;
    
    width: 2000vw;
    height: 95vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(200, 200, 200, 0.3));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    border: 2px solid var(--accent);
    margin: auto;
    scrollbar-width: none; /* Firefox: Hide scrollbar by default */
    -ms-overflow-style: none; /* IE/Edge: Hide scrollbar by default */
}

.modal-content::-webkit-scrollbar {
    width: 10px; /* Chrome/Safari: Set scrollbar width */
    opacity: 0; /* Hide by default */
    transition: opacity 0.3s ease;
}

.modal-content:hover::-webkit-scrollbar,
.modal-content:focus-within::-webkit-scrollbar {
    opacity: 0; /* Show scrollbar when scrolling */
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

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

.modal-close {
    color:red;
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.project-details {
    font-family: 'Roboto', sans-serif;
    color: var(--text-primary);
}

.project-details h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.project-details p {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: justify;
}

.project-details ul {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style: disc;
}

.project-details a.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    margin: 0.5rem;
    transition: background 0.3s ease, transform 0.3s ease;
    
}

.project-details a.btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}
/* Certifications Section */
/* Certifications Section */
.certifications {
    position: relative;
    padding: 2rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-items: left;
    overflow: hidden;
}
.category-buttons {
    display: flex;
    justify-content: left;
    align-items: left;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.category-btn {
    padding: 10px 20px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.category-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.category-btn.active {
    background: var(--accent);
    color: #fff;
}

.certifications-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    margin-left: 3rem;;
    gap: 2rem;
    position: relative;
    z-index: 1;
    margin-left:5rem;
}

.certification-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.certification-card:not(.show) {
    display: none;
}

.certification-card:hover {
    /* transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); */
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.certification-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: block;
    align-self: center;
    object-fit: fill;
}
.certification-card img:hover {
    transform: scale(1.1);
}
.card-content {
    position: relative;
    z-index: 2;
    opacity: 1; /* Always visible, like timeline-card */
}

.card-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.card-content a:hover {
    color: #0056b3;
}

/* Achievements Section */
.achievements {
    padding: 60px 20px;
}

.achievements-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-items: left;
    gap: 2rem;
    margin-left: 6rem;
    
    
}

.achievement-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
    width: 300px;
    height: 200px;
}

.achievement-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}



.achievement-card:hover {
    transform: translateY(-10px);
}

/* Resume Section */
.resume {
    padding: 60px 20px;
    text-align: center;
    border-radius: 10px;
}

.resume-content {
    width:80%;
    height:100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    
}

.resume-embed-wrapper {
    width: 100%;
}

.resume-embed-wrapper embed {
    width: 100%;
    height: 1200px;
    
}

/* Contact Section */
.contact{
    padding: 60px 20px;
    margin-top:2rem;
}
.contact form {
    /* max-width: 600px; */
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top:1rem;
}

.contact input,
.contact textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

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

/* Confirmation Box */
.confirmation-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    z-index: 2000;
    text-align: center;
}

.confirmation-content .icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.close-btn {
    margin-top: 1rem;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 2rem;
    text-align: center;
}

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

.social-icon {
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-icon:hover {
    color: var(--accent);
}

/* Theme Toggle Button */
#theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 4000;
    background: #333;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

#theme-toggle:hover {
    background: #555;
    transform: scale(1.1);
}

/* Responsive Design */

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.9); /* Match navbar transparency */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 1rem;
        z-index: 999;
    }

    [data-theme="dark"] .nav-links {
        background: rgba(0, 0, 0, 0.9);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .about-content {
        flex-direction: column;
        text-align: justify;
    }

    .about-content img {
        width: 200px;
        align-self: center;
    }

    .timeline-item.left {
        left: 0;
        text-align: right;
        font-size: 1rem;
    }

    .timeline-item.right {
        left: 50%;
        text-align: left;
        font-size: 1rem;
    }

    .coding-profiles-links {
        flex-wrap:wrap;
        justify-content: left;
        align-items: left;
        margin-left:3rem;
    }
    .resume-embed-wrapper embed {
        height: calc(100vw * 1.414);
    }
    .skills-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: left;
        align-items: left;
        gap: 2rem;
        margin-left: 5rem;
        justify-items: center;
    }
    .coding-profiles-links {
        margin-left:12%;

    }
        .filters {
        justify-content: left;
    }

    .projects-grid {
        display: flex;
        flex-wrap:wrap;
        align-items: left;
        flex-wrap:wrap;
        margin: 3rem;
    }
    .project-card {    
        width: 40%;
    }
    .modal {
        display: none;
        position: absolute;
        width: 100%;
        height: 80%;
        background: rgba(0, 0, 0, 0.8);
        align-items: center;
        justify-content: center;
        z-index: 2000;
    }
      .modal {
        backdrop-filter: blur(7px) opacity(0.9);
        -webkit-backdrop-filter: blur(7px) opacity(0.9);
        z-index: 1000; /* Still high enough to overlay */
    }

    .modal-content {
        padding: 1.5rem;
        max-width: 500px;
        width: 92%;
        max-height: 85vh;
        gap: 1rem;
        z-index: 1001;
    }

    .modal-content h3 {
        font-size: 1.6rem;
    }

    .modal-close {
        color:red;
        font-size: 1.3rem;
        top: 10px;
        right: 10px;
        z-index: 1002;
    }

    .project-details p {
        font-size: 0.95rem;
    }

    .project-details ul {
        font-size: 0.95rem;
        padding-left: 1.4rem;
    }

    .project-details a.btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
        min-width: 130px;
    }
    .category-buttons {
        display: flex;
        justify-content: left;
        gap: 10px;
        margin-left:5rem;
        flex-wrap: wrap;
    }

    .certifications {
        padding: 1rem 1rem;
    }

    .certification-card {
        width: 40%;
    }

    
    .achievements-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        margin: 0 auto;
    }
    .achievement-card {
        width: 40%;
    }
    .resume-content {
        width: 100%;
        height:100%;
        margin: 0 auto;
        display: flex;
        flex-wrap: wrap;
        align-items: left;
        justify-content: left;
        
    }

    /* Resume Section */
    .resume {
        padding: 60px 20px;
        background: var(--bg-primary);
        text-align: center;
    }

    .resume-content {
        max-width: 595px; /* A4 width in pixels at 96dpi */
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .resume-embed-wrapper {
        width: 100%;
        box-shadow: var(--shadow);
        border-radius: 10px;
        overflow: hidden; /* Ensure rounded corners apply */
        position: relative;
        padding-top: 141.414%; /* A4 aspect ratio (842/595 ≈ 1.414) */
    }

    .resume-embed-wrapper embed {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%; /* Fill the wrapper while maintaining aspect ratio */
        display: block;
        border: none;
    }

    .resume-content a {
        background: var(--accent);
        color: #fff;
        padding: 0.75rem 1.5rem;
        border-radius: 5px;
        text-decoration: none;
        font-weight: 600;
        transition: background 0.3s;
        box-shadow: 0 0 10px rgba(0, 123, 255, 0.5); /* Glow effect */
    }

    .resume-content a:hover {
        background: #0056b3;
    }

     .resume-embed-wrapper {
            padding-top: 141.414%; /* Maintain A4 aspect ratio */
        }
}
@media (max-width: 480px) { /* Small Mobile Devices */
    body {
        font-size: 14px;
        line-height: 1.5;
    }

    .navbar {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        padding: 1rem;
        z-index: 999;
        animation: slideInLeft 0.5s ease-in-out;
    }

    [data-theme="dark"] .nav-links {
        background: rgba(0, 0, 0, 0.9);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        font-size: 1rem;
    }

    .hamburger {
        display: block;
        font-size: 1.2rem;
    }

    .section {
        padding: 1.5rem;
    }

    .hero {
        background-attachment: scroll;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .profile-pic-wrapper {
        width: 120px;
        height: 120px;
    }

    .progress-bar {
        width: 130px;
        height: 130px;
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }

    .contact-links a {
        font-size: 1rem;
    }

    .btn, .touch {
        margin-top: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .about {
        padding: 3rem 1rem;
    }

    .about-content {
        flex-direction: column;
        flex-wrap: wrap;
        text-align: justify;
        align-items: center;
        gap: 1rem;
    }


    .about-content p {
        font-size: 0.8rem;
    }
/* timeline */
    .timeline {
        margin-top:-2rem;
        margin-bottom:-1rem;
    }
    .timeline::before {
        content: '';
        position: absolute;
        top: -4rem;
        left: 50%;
        width: 4px;
        height: 92%;
        background: var(--accent);
        transform: translateX(-50%);
    }

    .timeline-item {
        position: relative;
        margin: 1rem 0;
        width: 70%;
        
    }

    .timeline-item.left {
        left:-3.5rem ;
        text-align: right;
        font-size: 0.8rem;
    }

    .timeline-item.right {
        left: 50%;
        text-align: left;
        font-size: 0.8rem;
    }

    .timeline-card {
        background: var(--card-bg);
        padding: 1.5rem;
        border-radius: 10px;
        box-shadow: var(--shadow);
        position: relative;
    }

    .timeline-card::before {
        content: '';
        position: absolute;
        top: 20px;
        width: 20px;
        height: 20px;
        background: var(--accent);
        border-radius: 50%;
        z-index: 1;
    }

    .timeline-item.left .timeline-card::before {
        right: -32px;
    }

    .timeline-item.right .timeline-card::before {
        left: -28px;
    }

    .timeline-card::after {
        content: '';
        position: absolute;
        top: 20px;
        width: 0;
        height: 0;
        border: 10px solid transparent;
    }

    .timeline-item.left .timeline-card::after {
        right: -21px;
        border-left-color: var(--card-bg);
    }

    .timeline-item.right .timeline-card::after {
        left: -21px;
        border-right-color: var(--card-bg);
    }


    .skills {
        padding: 40px 15px;
    }

    .skills-grid {
        gap: 1rem;
        display:flex;
        flex-wrap:wrap;
        justify-content: left;
        align-items: left;
        margin-left:3rem;
        
    }

    .skill {
        width: 40%;
    }
    .skill img{
        height:35px;
        width:35px;
    }

    .skill p {
        font-size: 0.8rem;
    }
/* Coding Profiles Section */
    
    .coding-profiles-links {
        flex-wrap:wrap;
        justify-content: center;
        align-items: center;
        margin-left: -5rem;
    }
    
    .coding-profiles-links a {
        width: 40%;
        
    }
    .coding-profile-card span{
        font-size:0.8rem;
    }
    .coding-profile-card img{
        height: 40px;
        width: 40px;
    }
/* projects */
    .filters {
        display: flex;
        justify-content: left;
        flex-direction: row;
        flex-wrap:wrap;
        align-items: left;
        gap: 0.5rem;
        margin-left: 2rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .projects-grid {
        display: flex;
        flex-wrap: wrap;
        align-items:left;
        justify-content: left;
        gap: 1.5rem;
    }

    .project-card {
        flex-wrap: wrap;;
        padding: 1rem;
        text-align: justify;
        align-items:left;
        width:100%;
    }

    .project-card img {
        height: 80px;
    }
    .project-card h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        text-align: center;
    }
    .project-card p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        text-align: justify;
    }

    .modal {
        background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.15),
            rgba(200, 200, 200, 0.25)
        );
        backdrop-filter: blur(6px); /* Lighter blur for performance */
        -webkit-backdrop-filter: blur(6px);
        z-index: 1000; /* High z-index for mobile */
    }

    .modal-content {
        padding: 0.95rem;
        width: calc(100% - 2rem); /* Fluid width */
        max-width: 100%; /* Full width on small screens */
        max-height: 80vh;
        /* gap: 0-prefix="0.8rem; */
        border-radius: 8px;
        margin-left: 0rem;
    
    }

    .modal-content h3 {
        font-size: clamp(1.2rem, 6vw, 1.4rem); /* Scalable font */
        padding-bottom: 0.4rem;
    }

    .modal-close {
        font-size: 3rem;
        color:red;
        top: 8px;
        right: 8px;
        z-index: 1002;
        position:static;

    }

    .project-details {
        gap: 0.8rem;
    }

    .project-details p {
        font-size: clamp(0.8rem, 3.5vw, 0.9rem);
        text-align: justify;
        line-height: 1.5;
    }

    .project-details ul {
        font-size: clamp(0.8rem, 3.5vw, 0.9rem);
        padding-left: 1rem;
        line-height: 1.5;
    }

    .project-details a.btn {
        padding: 0.5rem 1rem;
        font-size: clamp(0.8rem, 3.5vw, 0.9rem);
        width: 80%; /* Balanced width */
        margin: 0.5rem auto; /* Center buttons */
    }

    .certifications {
        padding: 5rem 1rem;
    }

    .certifications h2 {
        font-size: 1.8rem;
    }

    .category-buttons {
        gap: 0.5rem;
        margin-left: 2rem;
    }

    .category-btn {
        padding: 8px 16px;
    }

    .certifications-list {
        display:flex;
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .certification-card {
        width: 100%;
        max-width: 280px;
        padding: 1rem;
        align-items: center;
        margin-left:-2rem;
        
    }

    .certification-card img {
        height: 120px;
        align-self: center;
        object-fit: fill;
        
    }

    .card-content h3 {
        font-size: 1rem;
    }

    .achievements {
        padding: 40px 15px;
    }

    .achievements-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .achievement-card {
        width: 100%;
        max-width: 280px;
        padding: 1rem;
    }


    .resume {
        padding: 40px 15px;
    }

    .resume-content {
        max-width: 100%;
        padding: 0 1rem;
    }

    .resume-embed-wrapper {
        padding-top: 141.414%;
    }

    .contact form {
        padding: 0 1rem;
        width:100%;
    }

    .contact input,
    .contact textarea {
        font-size: 0.9rem;
    }

    .confirmation-box {
        padding: 1.5rem;
    }

    footer {
        padding: 1.5rem;
    }

    .social-icon {
        font-size: 1.2rem;
    }

    #theme-toggle {
        padding: 8px;
    }
}

@media (max-width: 900px) {
    .coding-profiles-links {
        gap: 1.2rem;
    }

    .coding-profile-card {
        width: 120px;
        padding: 1rem 0.5rem;
    }
}

@media (max-width: 600px) {
    .coding-profiles-links {
        flex-wrap:wrap;
        justify-content: left;
        align-items: left;
        margin-left:3rem;
    }

    .coding-profile-card {
        width: 20vw;
        max-width: 320px;
    }
}

