/* Base / layout */
:root{
    --navy:#1E3A8A;
    --light:#F3F4F6;
    --muted:#4B5563;
    --container:1100px;
    --radius:10px;
    --bg: #ffffff;
    --text: #111111;
    --accent: #0077ff;
    --card-bg: #f9f9f9;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Dark Theme */
body.dark-mode {
    --bg: #121212;
    --text: #eeeeee;
    --accent: #66aaff;
    --card-bg: #1e1e1e;
    --shadow: rgba(0, 0, 0, 0.5);
}
.card, .post, .testimonial {
    background: var(--card-bg);
    box-shadow: 0 2px 8px var(--shadow);
    transition: background 0.3s, box-shadow 0.3s;
}
*{box-sizing:border-box}
html {
    height:100%;
    scroll-behavior: smooth;
}
body{
    height:100%;
    margin:0;
    font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial, Vazirmatn, sans-serif;
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
    background-color: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}
body {
    background-color: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}
a {
    color: var(--accent);
}
/* container */
.container{max-width:var(--container);margin:0 auto;padding:2rem}

/* Hero */
.hero{background:linear-gradient(180deg,var(--navy) 0%, #0f2b5a 100%);color:#fff;padding:4.5rem 0}
.hero-inner{display:grid;grid-template-columns:1fr 320px;gap:2.5rem;align-items:center}
.hero h1{font-size:2.4rem;margin:0 0 .25rem;font-weight:800;letter-spacing:-0.01em}
.lead{opacity:.92;margin:0 0 1.25rem;font-size:1.05rem}
.hero-actions .btn{margin-right:.5rem}
.avatar{width:100%;height:auto;border-radius:8px;box-shadow:0 8px 28px rgba(2,6,23,0.35)}

/* Sections */
.section{padding:3rem 0}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:1rem}
.section-head h2{margin:0;font-size:1.6rem;color:var(--navy)}
.muted{color:var(--muted)}

/* About */
.about-grid{display:grid;grid-template-columns:1fr 340px;gap:2rem;align-items:start}
.profile-card{background:#fff;border-radius:var(--radius);padding:1rem;box-shadow:0 6px 18px rgba(16,24,40,0.06);text-align:center}
.profile-img{width:100%;height:220px;object-fit:cover;border-radius:8px}
.facts{margin:1rem 0 0;padding-left:1rem;color:var(--muted)}

/* Blog grid */
.posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.4rem;margin-top:1.25rem}
.post{background:#fff;border-radius:10px;padding:1rem;border:1px solid #eef2ff}
.post .thumb{height:140px;background:#e6eefc;border-radius:8px;overflow:hidden;margin-bottom:.8rem}
.post h3{margin:0 0 .45rem;font-size:1.05rem;color:var(--navy)}
.post p.excerpt{color:var(--muted);font-size:.95rem}

/* contact form */
.contact-form{display:grid;gap:.8rem;max-width:680px}
.contact-form label{display:block}
.contact-form input,.contact-form textarea{width:100%;padding:.7rem;border-radius:8px;border:1px solid #e6e9ef;font-size:1rem}
.contact-form .label{display:block;font-weight:600;margin-bottom:.35rem}
.small{font-size:.9rem}
.center{text-align:center}

/* buttons */
.btn{display:inline-block;padding:.6rem 1rem;border-radius:8px;text-decoration:none;font-weight:700;cursor:pointer;border:0}
.btn.primary{background:var(--accent);color:#fff}
.btn.outline{border:1px solid var(--navy);color:var(--navy);background:transparent}
.btn.ghost{background:transparent;border:1px solid rgba(255,255,255,0.12);color:#fff}

/* utilities */
.card{background:#fff;border-radius:12px;padding:1rem;box-shadow:0 6px 18px rgba(16,24,40,0.04)}
.muted.small{color:var(--muted);font-size:.92rem}
/* Experience */
.timeline{border-left:3px solid var(--navy);margin-top:2rem;padding-left:1.5rem}
.exp-item{margin-bottom:2rem;position:relative}
.exp-item::before{content:"";width:14px;height:14px;background:var(--navy);
    border-radius:50%;position:absolute;left:-25px;top:5px}
.exp-meta{color:var(--muted);font-size:.9rem;margin:.3rem 0}

/* About Me enhancements */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}
.about-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #111827;
}
.about-text h3 {
    margin-top: 1.5rem;
    color: var(--navy);
}
.about-text ul {
    list-style: disc inside;
    margin: 0.8rem 0;
    padding-left: 1rem;
}
.details-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.details-grid div strong {
    color: var(--navy);
}
.about-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.blog-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.blog-card img {
    object-fit: cover;
    width: 100%;
    height: 200px;
}
.blog-content {
    padding: 1rem 1.2rem;
}
.blog-content h3 {
    margin-bottom: 0.6rem;
    color: var(--navy);
}
.blog-content p {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 0.8rem;
}
.btn-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}
.btn-link:hover {
    color: var(--navy);
}
.blog-footer {
    text-align: center;
    margin-top: 2rem;
}
/* Experience Section */
.timeline {
    border-left: 3px solid var(--navy);
    margin-top: 2rem;
    padding-left: 1.5rem;
}
.exp-item {
    margin-bottom: 2.5rem;
    position: relative;
}
.exp-item::before {
    content: "";
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    left: -25px;
    top: 10px;
}
.exp-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.exp-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
}
.exp-item h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--navy);
}
.exp-meta {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0.3rem 0 0.6rem;
}
.exp-meta a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.exp-meta a:hover {
    text-decoration: underline;
}
.exp-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}
.exp-item.visible {
    opacity: 1;
    transform: translateY(0);
}
.exp-desc {
    max-height: 60px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.exp-item.expanded .exp-desc {
    max-height: 500px;
}
.toggle-desc {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    margin-top: 6px;
}
.logo-tooltip {
    position: fixed;
    background: var(--navy);
    color: #fff;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    gap: 1rem;
}

.carousel-controls button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-controls button:hover {
    background: var(--navy);
}

.dots {
    display: flex;
    gap: 0.5rem;
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dots span.active {
    background: var(--accent);
}
/* Add fade animation */
.testimonial {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial.active {
    opacity: 1;
    transform: translateY(0);
}

/* Logo */
.logo-link {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--navy);
    text-decoration: none;
}
.tagline {
    font-size: 0.78rem;
    color: var(--muted);
    margin-left: 8px;
    display: inline-block;
}

.nav-list {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-list a {
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    padding: 0.35rem;
}
.nav-list a:hover {
    color: var(--accent);
}

/* CTA */
.cta-btn {
    background: var(--accent);
    color: #fff;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

/* Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background: rgba(0,0,0,0.5); /* semi-transparent black */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 5; /* ✅ BELOW menu */
    backdrop-filter: blur(3px); /* ✅ adds blur */
}

/* Show overlay */
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Adjust nav z-index so it's above overlay */
.main-nav {
    display: flex;
}
.nav-list {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

.main-nav.open {
    transform: translateX(0);
}
/* ===== Mobile styles ===== */
@media (max-width: 768px) {
    /* Hide desktop nav layout; we will show slide-panel nav */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 260px;
        max-width: 86%;
        background: #fff;
        box-shadow: -4px 0 15px rgba(0,0,0,0.15);
        transform: translateX(100%); /* off-screen */
        transition: transform 0.3s ease;
        display: flex;
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 1.2rem;
        z-index: 2001;
    }

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

    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }

    .menu-toggle {
        display: block; /* show ☰ on mobile */
        border: none;
        font-size: 2rem;
        cursor: pointer;
        z-index: 2100; /* above everything */
    }
}
@media (max-width: 768px) {
    .main-nav.open .nav-list li {
        opacity: 0;
        transform: translateX(20px);
        animation: slideIn 0.4s forwards;
    }

    .main-nav.open .nav-list li:nth-child(1) { animation-delay: 0.1s; }
    .main-nav.open .nav-list li:nth-child(2) { animation-delay: 0.2s; }
    .main-nav.open .nav-list li:nth-child(3) { animation-delay: 0.3s; }
    .main-nav.open .nav-list li:nth-child(4) { animation-delay: 0.4s; }
    .main-nav.open .nav-list li:nth-child(5) { animation-delay: 0.5s; }

    @keyframes slideIn {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Prevent body scroll when menu is open (JS toggles body.menu-open) */
body.menu-open {
    overflow: hidden;
}

/* Responsive tweaks */
@media (max-width:900px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    .about-image {
        order: -1;
        text-align: center;
    }
}
/* responsive */
@media (max-width:1000px){
    .hero-inner{grid-template-columns:1fr 260px}
    .about-grid{grid-template-columns:1fr}
    .posts-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:700px){
    .hero-inner{grid-template-columns:1fr;text-align:center}
    .hero-side{order:2}
    .posts-grid{grid-template-columns:1fr}
    /*.header-inner{gap:.5rem}*/
    .footer-grid{flex-direction:column;align-items:flex-start}
}
/**/
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
p  { font-size: clamp(1rem, 2vw, 1.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
.btn.primary:hover {
    background: #b45309; /* darker shade of accent */
}
.btn:focus {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
}
.btn, .blog-card, .testimonial {
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
a:focus {
    outline: 2px dashed var(--accent);
    outline-offset: 2px;
}
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.social {
    display: flex;
    gap: 1rem;
}
.social a {
    color: #fff;
    background: var(--navy);
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}
.social a:hover {
    background: var(--accent);
}
.social svg {
    width: 20px;
    height: 20px;
}
.hero-social {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.hero-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.hero-social a:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}
/* Individual brand colors */
.hero-social a[aria-label="GitHub"] {
    background: #333; /* GitHub dark */
}
.hero-social a[aria-label="LinkedIn"] {
    background: #0077b5; /* LinkedIn blue */
}
.hero-social a[aria-label="Twitter"] {
    background: #1DA1F2; /* Twitter blue */
}
.hero-social a[aria-label="Medium"] {
    background: #000000; /* Medium black */
}
.hero-social a[aria-label="Dev.to"] {
    background: #0A0A0A; /* Dev.to black */
}
.hero-social a[aria-label="Stack Overflow"] {
    background: #f48024; /* Stack Overflow orange */
}
.hero-social svg {
    width: 20px;
    height: 20px;
}
/* Mobile: center socials under avatar */
@media (max-width: 700px) {
    .hero-social {
        justify-content: center;
        margin-top: 1rem;
    }
    .hero-copy .hero-social {
        order: 3;
    }
    .hero-side {
        order: 1;
        text-align: center;
    }
    .hero-copy {
        order: 2;
        text-align: center;
    }
}
/* ===== Contact Links ===== */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.contact-links p {
    margin: 0;
    font-size: 1rem;
    color: #444;
}

.contact-links a {
    color: #0073e6; /* Primary link color */
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

.contact-links a:hover {
    color: #005bb5;
    transform: translateX(3px); /* subtle movement */
}

/* Optional: add icons before links */
.contact-links a[href*="mailto"]::before {
    content: "✉️ ";
}
.contact-links a[href*="linkedin.com"]::before {
    content: "🔗 ";
}
.contact-links a[href*="github.com"]::before {
    content: "🐙 ";
}
/* Modern Footer */
.site-footer {
    background: #0f172a;
    color: #f9fafb;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}
.footer-brand p {
    margin: 0.3rem 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

/* Nav links */
.footer-nav {
    display: flex;
    gap: 1.2rem;
}
.footer-nav a {
    color: #d1d5db;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-nav a:hover {
    color: var(--accent);
}

/* Social links */
.footer-socials {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}
.footer-socials a {
    font-size: 1.3rem;
    color: #d1d5db;
    transition: color 0.3s ease, transform 0.2s ease;
}
.footer-socials a:hover {
    color: var(--accent);
    transform: scale(1.2);
}
/* Footer updates */
.footer-brand p {
    margin: 0.3rem 0;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    background: #333;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
}
#backToTop.show { display: block; }
#backToTop:hover {
    background: var(--navy);
    transform: scale(1.1);
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-socials {
        justify-content: center;
    }
    .footer-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
}
/* =====================
   DARK MODE THEME

/* General sections/cards */
body.dark-mode .section,
body.dark-mode .card,
body.dark-mode .blog-card,
body.dark-mode .testimonial,
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background: #1f2937;
    color: #f9fafb;
    border: 1px solid #374151;
}

/* Headings keep accent/navy tone */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #e5e7eb;
}

/* Hero section */
body.dark-mode .hero {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f9fafb;
}

/* Buttons */
.dark-mode .menu-toggle{
    color: #dbdbff;
}
body.dark-mode .btn.primary {
    background: var(--accent);
    color: #fff;
}
body.dark-mode .btn.primary:hover {
    background: #b45309;
}
body.dark-mode .btn.ghost {
    border-color: rgba(255,255,255,0.3);
    color: #f9fafb;
}
body.dark-mode .btn-link {
    color: var(--accent);
}
body.dark-mode .btn-link:hover {
    color: #f9fafb;
}

/* Navbar + menu */
body.dark-mode .site-header {
    background: rgba(17,24,39,0.95);
    border-bottom: 1px solid #374151;
}
body.dark-mode .nav-list a {
    color: #f9fafb;
}
body.dark-mode .nav-list a:hover {
    color: var(--accent);
}
body.dark-mode .cta-btn {
    background: var(--accent);
    color: #fff;
}

/* Footer */
body.dark-mode .site-footer {
    background: #0a0e1a;
    color: #f9fafb;
}
body.dark-mode .footer-nav a {
    color: #d1d5db;
}
body.dark-mode .footer-nav a:hover {
    color: var(--accent);
}
body.dark-mode .footer-socials a {
    color: #f9fafb;
}

/* Blog cards */
body.dark-mode .blog-card {
    background: #1f2937;
    border: 1px solid #374151;
}
body.dark-mode .blog-content p {
    color: #d1d5db;
}

/* Contact links */
body.dark-mode .contact-links a {
    color: #60a5fa; /* lighter blue for dark bg */
}
body.dark-mode .contact-links a:hover {
    color: #93c5fd;
}

/* Timeline (experience) */
body.dark-mode .timeline {
    border-left: 3px solid #93c5fd;
}
body.dark-mode .exp-item::before {
    background: var(--accent);
}
body.dark-mode .exp-meta {
    color: #9ca3af;
}
/* ===== About Section Dark Mode ===== */
body.dark-mode .about-text p {
    color: #e5e7eb; /* softer white for readability */
}

body.dark-mode .about-text h3 {
    color: var(--accent); /* highlight headings with accent color */
}

body.dark-mode .about-text ul {
    color: #d1d5db; /* lighter gray for list text */
}

body.dark-mode .details-grid {
    background: #1f2937;   /* dark panel */
    border: 1px solid #374151;
}

body.dark-mode .details-grid div strong {
    color: #facc15; /* a yellow highlight for labels */
}

body.dark-mode .about-image img {
    box-shadow: 0 4px 16px rgba(0,0,0,0.6); /* stronger shadow to stand out */
}
/* ===== Unified Dark Mode Cards ===== */

/* General section backgrounds */
body.dark-mode .section {
    background: #111827; /* dark background */
    color: #f9fafb;
}

/* All cards (projects, skills, blog, about details, etc.) */
body.dark-mode .card,
body.dark-mode .details-grid,
body.dark-mode .project-card,
body.dark-mode .blog-card,
body.dark-mode .testimonial,
body.dark-mode .skills-grid div {
    background: #1f2937;
    color: #f9fafb;
    border: 1px solid #374151;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Headings inside dark cards */
body.dark-mode .card h3,
body.dark-mode .project-card h3,
body.dark-mode .blog-card h3,
body.dark-mode .testimonial strong {
    color: #e5e7eb;
}

/* Muted text in dark mode */
body.dark-mode .muted,
body.dark-mode .blog-content p,
body.dark-mode .exp-meta {
    color: #9ca3af; /* softer gray */
}

/* Links inside cards */
body.dark-mode .btn-link {
    color: var(--accent);
}
body.dark-mode .btn-link:hover {
    color: #facc15; /* warm yellow for hover */
}

/* Project / blog images */
body.dark-mode .project-card img,
body.dark-mode .blog-card img {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}
body.dark-mode .project-card img:hover,
body.dark-mode .blog-card img:hover {
    opacity: 1;
}

/* Skills section cards */
body.dark-mode .skills-grid div {
    padding: 0.75rem;
}
/* Smooth transition for dark mode toggle */
body,
.section,
.card,
.details-grid,
.project-card,
.blog-card,
.testimonial,
.skills-grid div,
.site-header,
.site-footer,
.nav-list a,
.btn,
input, textarea {
    transition:
            background-color 0.4s ease,
            color 0.4s ease,
            border-color 0.4s ease,
            box-shadow 0.4s ease;
}
/* ===== Dark Mode Toggle Button ===== */
#darkModeToggle {
    border: none;
    background: var(--light);
    color: var(--navy);
    font-size: 1.1rem;
    border-radius: 50%;
    padding: 0.5rem;
    margin-left: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s, color 0.3s;
}

#darkModeToggle:hover {
    background: var(--accent);
    color: #fff;
    transform: rotate(20deg);
}

/* Dark mode version */
body.dark-mode #darkModeToggle {
    background: #1f2937;
    color: #f9fafb;
}

body.dark-mode #darkModeToggle:hover {
    background: var(--accent);
    color: #fff;
}

#darkModeToggle:active {
    transform: rotate(180deg);
}
/* ===== Mobile Nav Dark Mode ===== */
body.dark-mode .main-nav {
    /*background: #1f2937; !* dark panel *!*/
    box-shadow: -4px 0 15px rgba(0,0,0,0.4);
}

body.dark-mode .main-nav a {
    color: #f9fafb;
}

body.dark-mode .main-nav a:hover {
    color: var(--accent);
}

body.dark-mode .cta-btn {
    background: var(--accent);
    color: #fff;
}

/* ===== Mobile Nav Overlay Dark Mode ===== */
body.dark-mode .menu-overlay {
    background: rgba(255, 255, 255, 0.1); /* lighter translucent white */
    backdrop-filter: blur(6px); /* subtle blur */
}

.logo-img { height:36px; width:auto; display:inline-block; vertical-align:middle; }
.form-response {
    margin-top: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
}
/* ===== Projects Section ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.project-card h3 {
    margin: 0.5rem 0;
    color: var(--navy);
    font-size: 1.2rem;
}

.project-card p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Dark mode for projects */
body.dark-mode .project-card {
    background: #1f2937;
    border: 1px solid #374151;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

body.dark-mode .project-card h3 {
    color: #e5e7eb;
}

body.dark-mode .project-card p {
    color: #9ca3af;
}

.projects-grid, .posts-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
#mobile-nav {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

#mobile-nav.open {
    transform: translateX(0);
}
#backToTop {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
#backToTop.show {
    opacity: 1;
    visibility: visible;
}
/* ===== Header Layout ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.8rem 1.2rem;
}

/* Nav */
.main-nav {
    display: flex;
}
.nav-list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-list a {
    font-weight: 600;
    color: #374151;
    text-decoration: none;
}
.nav-list a:hover {
    color: var(--accent);
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dark mode switch */
.theme-switch {
    position: relative;
    width: 50px;
    height: 26px;
}
.theme-switch input { display: none; }
.slider {
    position: absolute;
    inset: 0;
    background: #e5e7eb;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    transition: background 0.3s;
}
.slider::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.4s;
}
.theme-switch input:checked + .slider::before {
    transform: translateX(24px);
}
.sun-icon { color: #fbbf24; font-size: 0.8rem; }
.moon-icon { color: #3b82f6; font-size: 0.8rem; }

/* Mobile styles */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100vh;
        background: #fff;
        box-shadow: -4px 0 15px rgba(0,0,0,0.2);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        padding: 2rem 1.5rem;
        z-index: 2000;
    }
    body.dark-mode .main-nav{
        background: #000000;
    }
    .main-nav.open {
        transform: translateX(0);
    }
    .menu-toggle {
        display: block;
    }
}
/* Review Slider */
.review-slider-wrapper {
    overflow: hidden;
    max-width: 700px;
    margin: 2rem auto;
    position: relative;
}

.review-slider-track {
    display: flex;
    transition: transform 0.6s ease;
    will-change: transform;
}

.review-slide {
    min-width: 100%;
    background: linear-gradient(135deg, #ffffff, #f9fafb);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.review-text {
    font-size: 1.1rem;
    font-style: italic;
    color: #885959;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.review-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.review-author img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

/* Controls */
.review-slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.review-slider-controls button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.review-slider-controls button:hover {
    background: var(--accent-dark);
}

/* Dots */
.review-dots {
    display: flex;
    gap: 8px;
}
.review-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: background 0.3s;
}
.review-dots span.active {
    background: var(--accent);
}

/* Dark mode */
body.dark-mode .review-slide {
    background: linear-gradient(135deg, #1f2937, #111827);
    border: 1px solid #374151;
    color: #e5e7eb;
}
/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: linear-gradient(135deg, #ffffff, #f9fafb);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

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

.blog-content h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--navy);
}

.blog-content .meta {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0.5rem 0;
}

.blog-content .excerpt {
    flex-grow: 1;
    color: #374151;
    margin-bottom: 1rem;
}

.readmore {
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.readmore:hover {
    text-decoration: underline;
}
.view-all {
    text-align: center;
    margin-top: 2rem;
}
.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}
/* Sticky Contact Buttons */
.sticky-contacts {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.sticky-contacts a {
    width: 45px;
    height: 45px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
    color: #000;
    transition: all 0.3s ease;
}

.sticky-contacts a:hover {
    transform: scale(1.1);
}

.sticky-contacts a.telegram {
    background-color: #0088cc;
    color: white;
}

.sticky-contacts a.whatsapp {
    background-color: #25D366;
    color: white;
}
.form-response {
    margin-top: 10px;
    font-weight: 500;
    transition: color 0.3s ease;
}
@media (max-width:700px) { .logo-img { height:30px } }
