html {
    scroll-behavior: smooth;
}

/* theme toggle option start */
#theme-toggle {
    margin-left: auto;
    /* Keep this to push it to the right */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 1rem;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

body.dark-theme {
    --primary-blue: #60a5fa;
    --secondary-blue: #93c5fd;
    --light-blue: #1e3a8a;
    --dark-gray: #111827;
    --medium-gray: #9ca3af;
    --light-gray: #1f2937;
    --white: #111827;
    --text-dark: #f9fafb;
    --text-light: #d1d5db;
    --gradient-bg: linear-gradient(135deg, #111827 0%, #1e293b 100%);
    background-color: var(--light-gray);
    color: var(--text-dark);
}

body.dark-theme header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-dark);
}

body.dark-theme header::before {
    opacity: 0.05;
}

body.dark-theme header h1,
body.dark-theme header p {
    text-shadow: none;
    color: var(--text-dark);
}

body.dark-theme nav {
    background: var(--dark-gray);
}

body.dark-theme header {
    color: var(--text-dark);
}

body.dark-theme nav a {
    color: var(--text-dark);
}

body.dark-theme nav a:hover {
    background: var(--light-blue);
}

body.dark-theme .section-card {
    background: var(--dark-gray);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .portfolio-item {
    background: linear-gradient(135deg, var(--primary-blue) 0%, rgba(229, 224, 224, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .portfolio-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

body.dark-theme .section-card p {
    font-size: 1.1rem;
    color: #ece7e7;
    margin-bottom: 1.5rem;
}

body.dark-theme .contact-item {
    background: #1f2937;
}

body.dark-theme footer {
    color: var(--text-dark);
}

footer {
    background: var(--dark-gray);
    color: var(--text-dark);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

body.dark-theme #back-to-top {
    background-color: #1f2937;
    color: #f9fafb;
}

body.dark-theme #back-to-top:hover {
    background-color: #374151;
}

body.dark-theme .download-btn {
    background-color: #60a5fa;
    color: #1e3a8a;
}

body.dark-theme .download-btn:hover {
    background-color: #3b82f6;
}

body.dark-theme .contact-item a {
    color: #93c5fd;
}

body.dark-theme .contact-item a:hover {
    color: #60a5fa;
}

body.dark-theme .timeline {
    border-left-color: #60a5fa;
}

body.dark-theme .timeline-icon {
    background-color: #60a5fa;
}

body.dark-theme .read-more-btn {
    background-color: #272e35;
}

:root {
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --dark-gray: #1f2937;
    --medium-gray: #6b7280;
    --light-gray: #f9fafb;
    --white: #ffffff;
    --text-dark: #111827;
    --text-light: #6b7280;
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--light-gray);
}

header {
    background: var(--gradient-bg);
    color: var(--white);
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

header .content {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

nav {
    background: var(--white);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 1rem;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 1.2rem 2rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--primary-blue);
    background: var(--light-blue);
}

nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 80%;
}

.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
    display: grid;
    gap: 2rem;
}

.section-card {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.section-card h2 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-card h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--secondary-blue);
    border-radius: 2px;
}

.section-card p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.portfolio-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.15);
}

.portfolio-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-item {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: var(--light-blue);
}

.contact-item a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

footer {
    background: var(--dark-gray);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    font-size: 0.95rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    header p {
        font-size: 1.1rem;
    }

    .section-card {
        padding: 2rem;
    }

    nav a {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .container {
        margin: 1.5rem auto;
    }
}

@media (max-width: 480px) {
    header {
        padding: 3rem 0 2rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .section-card {
        padding: 1.5rem;
    }

    .nav-container {
        flex-direction: column;
    }

    nav a {
        padding: 0.8rem 1rem;
        text-align: center;
    }
}

/* back to top button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.7rem 1rem;
    font-size: 1.2rem;
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: background-color 0.3s, opacity 0.3s ease;
}

#back-to-top:hover {
    background-color: var(--secondary-blue);
}

#back-to-top i {
    font-size: 1.4rem;
}

/* resume download */
.download-btn {
    display: inline-block;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: var(--card-shadow);
}

.download-btn:hover {
    background-color: var(--secondary-blue);
    transform: translateY(-2px);
}

/* contact social media links styles*/
.contact-item a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* blog section styles */
.blog-post {
    margin-top: 2rem;
}

.blog-post img.blog-img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.blog-post pre {
    background: #f3f4f6;
    color: #111;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.95rem;
}

.blog-post pre code {
    font-family: Consolas, Monaco, 'Courier New', monospace;
}

body.dark-theme .blog-post pre {
    background: #1f2937;
    color: #e5e7eb;
}

.blog-post a {
    color: var(--primary-blue);
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

.blog-post a:hover {
    color: var(--secondary-blue);
}

/* external blog styles */
.external-blogs {
    margin-top: 1rem;
    padding-left: 1.2rem;
    list-style-type: none;
}

.external-blogs li {
    margin-bottom: 0.5rem;
}

.external-blogs a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.external-blogs a:hover {
    text-decoration: underline;
}

/* videos section styles */
.video-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-top: 1.5rem;
}

.video-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: scale(1.02);
}

.video-caption {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 500;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.video-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: var(--card-shadow);
}

/* RESPONSIVE EMBED WRAPPER */
.video-item iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 6px;
}

/* CAPTION STYLING */
.video-caption {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

.video-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-item iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* Ensure caption wraps and doesn't overflow */
.video-caption {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-top: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.video-item:hover {
    transform: translateY(-5px);
}

.video-item iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    border: none;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.video-item {
    background: var(--light-blue);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

/* other stuff */
:root {
    --bg-color: #fff;
    --text-color: #222;
    --primary-color: #0066ff;
    --secondary-color: #0044cc;
    --skill-bar-bg: #e0e0e0;
    --skill-bar-fill: #0066ff;
    --blockquote-bg: #f9f9f9;
    --blockquote-border: #ccc;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #eee;
    --primary-color: #3399ff;
    --secondary-color: #2288ee;
    --skill-bar-bg: #333;
    --skill-bar-fill: #3399ff;
    --blockquote-bg: #1f1f1f;
    --blockquote-border: #555;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-right: 0.8rem;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s, color 0.3s;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero-section {
    padding: 5rem 1rem;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
}

.hero-section .btn-primary {
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
}

.hero-section .btn-primary:hover {
    background-color: #e6e6e6;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.skill {
    margin-bottom: 1rem;
}

.skill-bar {
    background-color: var(--skill-bar-bg);
    height: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.skill-progress {
    background-color: var(--skill-bar-fill);
    height: 100%;
    width: 0;
    border-radius: 8px 0 0 8px;
    transition: width 1.5s ease-in-out;
}

/* work */
.timeline {
    position: relative;
    margin-top: 2rem;
    padding-left: 2rem;
    border-left: 3px solid var(--primary-blue);
}

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

.timeline-icon {
    position: absolute;
    top: 0;
    left: -1.6rem;
    width: 2rem;
    height: 2rem;
    background-color: var(--primary-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.timeline-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--primary-blue);
}

.timeline-company {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
}

.timeline-date {
    display: block;
    font-size: 0.9rem;
    color: var(--text-grey);
    margin-bottom: 0.8rem;
}

.responsibilities {
    list-style: disc inside;
    font-size: 1rem;
    color: var(--text-dark);
    padding-left: 1rem;
}

/* Responsive Navigation */
nav .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    flex-wrap: wrap;
}

nav .brand {
    font-weight: 600;
    font-size: 1.2rem;
}

nav .menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

nav .nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 768px) {
    nav .menu-toggle {
        display: block;
    }

    nav .nav-links {
        flex-direction: column;
        width: 100%;
        display: none;
        margin-top: 1rem;
    }

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

    nav .nav-links a,
    nav .nav-links button {
        width: 100%;
        text-align: left;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 768px) {
    #theme-toggle {
        order: 3;
        /* Ensure it comes last on small screens */
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
        gap: 1.2rem;
    }
}

.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
    display: grid;
    gap: 2rem;
}

body {
    overflow-x: hidden;
}

@media (max-width: 480px) {

    .download-btn,
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

.video-item:hover {
    transform: translateY(-5px);
}

/* ===== Root Variables ===== */
:root {
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --dark-gray: #1f2937;
    --medium-gray: #6b7280;
    --light-gray: #f9fafb;
    --white: #ffffff;
    --text-dark: #111827;
    --text-light: #6b7280;
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    line-height: 1.7;
    background-color: var(--light-gray);
    color: var(--text-dark);
    transition: background-color 0.3s, color 0.3s;
}

/* ===== Header ===== */
header {
    background: var(--gradient-bg);
    color: var(--white);
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header p {
    font-size: 1.3rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Navigation Bar ===== */
nav {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

nav .menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
}

#theme-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-dark);
    margin-left: auto;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 1rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

/* ===== Dark Theme Overrides ===== */
body.dark-theme {
    --primary-blue: #60a5fa;
    --secondary-blue: #93c5fd;
    --light-blue: #1e3a8a;
    --dark-gray: #111827;
    --light-gray: #1f2937;
    --white: #111827;
    --text-dark: #f9fafb;
    --text-light: #d1d5db;
    background-color: var(--light-gray);
    color: var(--text-dark);
}

body.dark-theme nav {
    background: var(--dark-gray);
    color: var(--text-light);
}

body.dark-theme nav a {
    color: var(--text-light);
}

body.dark-theme nav a:hover {
    background: var(--light-blue);
    color: var(--white);
}

body.dark-theme .menu-toggle,
body.dark-theme #theme-toggle {
    color: var(--text-light);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    nav .nav-container {
        flex-direction: column;
        align-items: center;
    }

    nav .menu-toggle {
        display: block;
        align-self: center;
        margin: 0.5rem auto;
    }

    nav .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 0.5rem;
        background: var(--white);
    }

    nav .nav-links a {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1rem;
    }

    #theme-toggle {
        align-self: center;
        margin-top: 0.5rem;
    }

    body.dark-theme nav .nav-links {
        background: var(--dark-gray);
    }
}

/* Add this section to your existing style.css */
/* --- Navbar Action Container (mobile) --- */
.nav-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Ensure theme toggle button stays inline on all screens */
#theme-toggle {
    font-size: 1.5rem;
    background: none;
    border: none;
    padding: 0.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* Mobile layout adjustments */
@media (max-width: 768px) {
    nav .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    nav .menu-toggle,
    #theme-toggle {
        font-size: 1.5rem;
        padding: 0.5rem;
    }

    .nav-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    nav .menu-toggle {
        order: 1;
    }

    #theme-toggle {
        order: 2;
    }
}

/* === MENU TOGGLE ANIMATION === */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
    padding: 0;
}

.bar {
    width: 28px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 4px 0;
    transition: 0.4s;
    border-radius: 2px;
}

.menu-toggle.change .bar1 {
    transform: translateY(8px) rotate(-45deg);
}

.menu-toggle.change .bar2 {
    opacity: 0;
}

.menu-toggle.change .bar3 {
    transform: translateY(-8px) rotate(45deg);
}

/* Dark theme bar color */
body.dark-theme .bar {
    background-color: var(--text-light);
}

/* Ensure nav-container uses flexbox */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    position: relative;
}

/* Menu toggle button base style */
.menu-toggle {
    display: none;
    /* Hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1001;
    /* Ensure it's above nav links */
}

/* Bars inside toggle */
.menu-toggle .bar {
    width: 100%;
    height: 4px;
    background-color: #333;
    margin: 4px 0;
    transition: 0.4s;
}

/* When menu toggle is changed to X */
.menu-toggle.change .bar1 {
    transform: translateY(10px) rotate(-45deg);
}

.menu-toggle.change .bar3 {
    transform: translateY(-10px) rotate(45deg);
}

/* Mobile styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        /* Show toggle on small screens */
    }

    .nav-links {
        flex-direction: column;
        position: absolute;
        top: 100%;
        /* Appear below nav bar */
        left: 0;
        right: 0;
        background: var(--bg-color);
        display: none;
        text-align: center;
    }

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

    /* Fix theme toggle and menu on same row */
    .nav-container {
        flex-wrap: nowrap;
    }

    #theme-toggle {
        margin-left: auto;
        margin-right: 0.5rem;
    }
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    /* Increased from 35px */
    height: 50px;
    /* Increased from 30px */
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 40px;
    /* Increased from 35px */
    height: 6px;
    /* Increased from 4-5px */
    background-color: #333;
    margin: 5px 0;
    transition: 0.4s ease-in-out;
}

.menu-toggle.change .bar1 {
    transform: translateY(11px) rotate(-45deg);
}

.menu-toggle.change .bar3 {
    transform: translateY(-11px) rotate(45deg);
}


/* projects */
.portfolio-item {
    background: linear-gradient(145deg, #f5f7fa, #e2e8f0);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, background 0.3s;
}

.github-btn {
    background-color: #333;
    color: white;
}

.github-btn:hover {
    background-color: #24292e;
    transform: scale(1.05);
}

.read-more-btn {
    background-color: #007bff;
    color: white;
}

.read-more-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    filter: invert(1);
}

.more-info {
    display: none;
    margin-top: 0.8rem;
    animation: fadeIn 0.3s ease-in-out;
    font-size: 0.95rem;
    color: #333;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

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

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.certification-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.2s ease-in-out;
}

.certification-item:hover {
    transform: translateY(-5px);
}

.certification-item img {
    max-width: 120px;
    margin-bottom: 1rem;
}

body.dark-theme .certification-item {
    background: #000;
}

/* new update */


/* ================================
   Skills – Grid Layout
   ================================ */
.skills-matrix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding-top: 15px;
}

@media (max-width: 768px) {
    .skills-matrix {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Card Styling
   ================================ */
.skill-category-card {
    background-color: var(--card-background-color);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
    .skill-category-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    }
}

/* ================================
   Headings
   ================================ */
.skill-category-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.2em;
}

body.dark-theme .skill-category-card h3 {
    color: black;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.2em;
}

/* ================================
   Icons
   ================================ */
.clean-list {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1.7;
}

.clean-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clean-list .icon {
    font-size: 1.2em;
}

.clean-list li strong {
    font-weight: 700;
    color: var(--text-color-strong);
}

/* ================================
   Scroll Reveal Animation
   ================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

.reveal:nth-child(1) {
    animation-delay: 0.1s;
}

.reveal:nth-child(2) {
    animation-delay: 0.2s;
}

.reveal:nth-child(3) {
    animation-delay: 0.3s;
}

.reveal:nth-child(4) {
    animation-delay: 0.4s;
}

.reveal:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* ================================
   Dark Mode Icons & Cards
   ================================ */
body.dark-theme .skill-category-card {
    background-color: #1f1f1f;
    border-color: #333;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}


/* CONTACT SECTION REDESIGN */
.contact-section {
    text-align: center;
    padding-top: 50px;
}

.contact-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: 0.3s ease-in-out;
    box-shadow: var(--shadow);
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.contact-card i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
    color: var(--accent);
}

body.dark-theme .contact-card {
    background: #000;
    --text-color: white;
}

/* Force icons visible in LIGHT THEME */
:root {
    --accent: #0078ff;
    --text-color: #111;
    --card-bg: #fff;
    --border-color: #ddd;
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* DARK MODE FIXES */
body.dark {
    --accent: #4ca8ff;
    --text-color: #e6e6e6;
    --card-bg: #1f1f1f;
    --border-color: #333;
    --shadow: 0 2px 6px rgba(255, 255, 255, 0.08);
}