/* === GENERAL STYLES === */
/* NOTE: Google Fonts moved to <link rel="preconnect"> + <link rel="stylesheet"> in the HTML <head>
   so the font CSS is fetched in parallel with style.css instead of waiting for it. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
.bengali {
    font-family: 'Anek Bangla', sans-serif;
    line-height: 1.8;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.section {
    padding: 80px 0;
}
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #111;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: #111; /* Changed from gradient */
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    /* Specific properties only — `transition: all` was flagged by PSI as non-composited
       (it animates line-height, padding, margin etc. which trigger layout work on hover). */
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.btn-primary {
    background: white;
    color: #111; /* Changed from #667eea */
    border: 2px solid #111; /* Changed from #667eea */
}
.btn-primary:hover {
    background: #111; /* Changed from #667eea */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.btn-secondary {
    background: transparent;
    color: #333; /* Changed from white for light backgrounds */
    border: 2px solid #333; /* Changed from white */
}
.btn-secondary:hover {
    background: #333;
    color: white; /* Changed from #667eea */
    transform: translateY(-2px);
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    z-index: 1000;
    padding: 1rem 0;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
    contain: layout style;
}
@media (min-width: 1024px) {
    .navbar { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: grid;
    /* minmax(0, 1fr) keeps both side columns EXACTLY equal width (so the logo stays
       truly centered) even though the left/right link lists don't have equal content;
       an unqualified 1fr would let the heavier side grow past its share and drag the
       logo off-center. Excess content wraps within its own column instead. */
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "left logo right";
    align-items: center;
    column-gap: 1rem;
    padding: 0 2rem;
}
.logo {
    grid-area: logo;
    justify-self: center;
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo-img {
    height: 36px;
    width: auto;
    display: block;
}
/* Desktop split nav — half the links left of the logo, half to the right.
   10 links total now, so the type is smaller/tighter than a normal nav-link
   and wraps within its own column rather than overflowing if it doesn't fit. */
.nav-split {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.4rem 1.1rem;
}
.nav-split-left { grid-area: left; justify-self: end; justify-content: flex-end; }
.nav-split-right { grid-area: right; justify-self: start; justify-content: flex-start; }
.nav-split .nav-link { font-size: 0.85rem; }
/* Mobile-only combined drawer (all links) — hidden on desktop, shown by the media query below */
.nav-menu {
    display: none;
    list-style: none;
    gap: 1.8rem;
}
.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}
.nav-link.active,
.nav-link:hover {
    color: #111; /* Changed from #667eea */
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: #111;
    /* `width` only — `all` was animating the transform/background too, both flagged
       as non-composited by PSI. */
    transition: width 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}
.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    border-radius: 3px;
    /* PSI flagged `transition: 0.3s` (shorthand for `all`) here. Switch to the two
       properties that actually change on `.active`: transform and opacity. */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    background: #111;
    padding: 140px 0 60px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    line-height: 0;
}
.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0.68) 55%, rgba(10, 10, 10, 0.85) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
    animation: fadeIn 0.6s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-content { animation: none; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}
.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}
.hero .tagline {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.85;
}
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.hero .btn-primary { background: #fff; color: #111; border-color: #fff; }
.hero .btn-primary:hover { background: transparent; color: #fff; border-color: #fff; }
.hero .btn-secondary { color: #fff; border-color: #fff; }
.hero .btn-secondary:hover { background: #fff; color: #111; }

.hero-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 680px;
    margin: 2.5rem auto 0;
}
.hero-action-box {
    display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
    padding: 1.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.hero-action-box:hover { transform: translateY(-4px); background: #fff; color: #111; border-color: #fff; }
.hero-action-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    font-size: 1rem;
    transition: background 0.25s ease, color 0.25s ease;
}
.hero-action-box:hover .hero-action-icon { background: #111; color: #fff; }
.hero-action-label { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; }

/* === SECTION BACKGROUNDS === */
#about { background: white; }
#experience { background: #f8f9fa; }
#skills { background: white; }
#projects { background: #f8f9fa; }
#gallery { background: white; }
#blog { background: #f8f9fa; }
#education { background: white; }
#contact { background: #f8f9fa; }

/* === ABOUT PAGE (modern redesign) === */
.section-subtitle {
    max-width: 640px; margin: -1.5rem auto 3rem; text-align: center;
    color: #666; font-size: 1.05rem; line-height: 1.6;
}
.about-hero {
    padding: 140px 0 5rem;
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
}
.about-hero-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3.5rem;
    align-items: center;
}
.about-photo-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}
.about-photo-frame::before {
    content: '';
    position: absolute;
    inset: -14px 14px 14px -14px;
    z-index: -1;
    background: #111;
    border-radius: 28px;
}
.about-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-eyebrow {
    display: inline-block; font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase; color: #666;
    margin-bottom: 0.5rem;
}
.about-hero-content h1 { font-size: 2.8rem; margin-bottom: 1rem; color: #111; }
.role-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.5rem; }
.role-tag {
    font-size: 0.8rem; font-weight: 600; padding: 0.4rem 0.9rem;
    border-radius: 20px; background: #111; color: #fff;
}
.role-tag:nth-child(2) { background: #eef1f5; color: #111; border: 1px solid #dde2e8; }
.about-hero-content p { font-size: 1.05rem; line-height: 1.8; color: #444; margin-bottom: 1.25rem; }
.about-hero-content .cta-buttons { justify-content: flex-start; margin-top: 0.5rem; }

.about-stats-modern {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.about-stat-card {
    text-align: center; padding: 2rem 1rem; background: #fff;
    border-radius: 16px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.about-stat-card:hover { transform: translateY(-6px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1); }
.about-stat-icon {
    width: 46px; height: 46px; margin: 0 auto 0.9rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #111; color: #fff; font-size: 1.05rem;
}
.about-stat-number { display: block; font-size: 2.3rem; font-weight: 800; color: #111; letter-spacing: -0.02em; }
.about-stat-label { display: block; margin-top: 0.35rem; font-size: 0.85rem; color: #666; }

.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.75rem;
}
.focus-card {
    display: block;
    background: #fff; padding: 2rem 1.75rem; border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06); text-align: left;
    border-top: 3px solid #111;
    text-decoration: none; color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.focus-card:hover { transform: translateY(-6px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1); }
.focus-icon {
    width: 48px; height: 48px; margin-bottom: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; background: #eef1f5; color: #111; font-size: 1.2rem;
}
.focus-card h3 { font-size: 1.1rem; margin-bottom: 0.6rem; color: #111; }
.focus-card p { font-size: 0.92rem; color: #666; line-height: 1.6; margin: 0; }
.focus-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.course-level {
    flex-shrink: 0; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.03em; padding: 0.25rem 0.6rem; border-radius: 20px;
    background: #eef1f5; color: #555; margin-top: 0.3rem;
}
.course-level.beginner { background: #e3f6ea; color: #1a7a44; }
.course-level.intermediate { background: #fdf1dc; color: #966b13; }
.course-level.advanced { background: #fbe4e4; color: #a13a3a; }

/* Scroll-reveal utility: fades/slides in once, respects reduced-motion */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* === MINIMAL PAGE HERO (Experience, Skills — no photo) === */
.page-hero {
    padding: 140px 0 3.5rem;
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
    text-align: center;
}
.page-hero h1 { font-size: 2.8rem; margin-bottom: 0.75rem; color: #111; }
.page-hero p { max-width: 640px; margin: 0 auto; font-size: 1.1rem; color: #555; line-height: 1.7; }

/* === EXPERIENCE TIMELINE === */
.timeline { position: relative; padding: 2rem 0; }
.timeline::before {
    content: ''; position: absolute; top: 0; left: 50%;
    transform: translateX(-50%); width: 4px; height: 100%;
    background: #e0e0e0; border-radius: 2px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-icon {
    position: absolute; top: 24px;
    width: 42px; height: 42px; border-radius: 50%;
    background: #111; color: #fff; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 6px #fff, 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}
.timeline-item:nth-child(odd) .timeline-icon { right: -21px; }
.timeline-item:nth-child(even) .timeline-icon { left: -21px; }
.timeline-content {
    background: white; padding: 2rem; border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); position: relative;
    transition: transform 0.3s ease;
}
.timeline-content:hover { transform: translateY(-5px); }
.timeline-date {
    background: #111; color: white;
    padding: 0.5rem 1rem; border-radius: 20px; font-size: 0.9rem;
    font-weight: 600; display: inline-block; margin-bottom: 1rem;
}
.timeline-title { font-size: 1.3rem; font-weight: bold; margin-bottom: 0.5rem; color: #333; }
.timeline-company { color: #111; font-weight: 600; margin-bottom: 1rem; }
.timeline-description { color: #666; line-height: 1.6; }
.timeline-achievements { list-style: none; margin-top: 0.9rem; }
.timeline-achievements li { position: relative; padding-left: 1.3rem; margin-bottom: 0.65rem; color: #555; line-height: 1.6; font-size: 0.95rem; }
.timeline-achievements li::before {
    content: ''; position: absolute; left: 0; top: 0.55em;
    width: 6px; height: 6px; border-radius: 50%; background: #111;
}
.timeline-achievements strong { color: #333; }

/* === SKILLS SECTION === */
.skills-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.75rem; }
.skill-category {
    background: white; padding: 2rem; border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    border-top: 3px solid #111;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.skill-category:hover { transform: translateY(-6px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1); }
.skill-category h3 {
    font-size: 1.1rem; margin-bottom: 1.25rem; color: #111;
    display: flex; align-items: center; gap: 0.7rem;
}
.skill-category h3 i {
    width: 38px; height: 38px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #eef1f5; border-radius: 10px; font-size: 1rem; color: #111;
}
.skill-chip-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.skill-chip {
    background: #eef1f5; color: #333; font-size: 0.85rem; font-weight: 500;
    padding: 0.45rem 0.9rem; border-radius: 20px; border: 1px solid #dde2e8;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.skill-chip:hover { background: #111; color: #fff; transform: translateY(-2px); }

/* === PROJECTS SECTION === */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.project-card {
    background: white; border-radius: 10px; overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
}
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.project-image {
    height: 0;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
}
.project-image img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.project-card:hover .project-image img { transform: scale(1.05); }
.project-content { padding: 2rem; flex-grow: 1; display: flex; flex-direction: column; }
.project-title { font-size: 1.3rem; font-weight: bold; margin-bottom: 1rem; color: #333; }
.project-description { color: #666; margin-bottom: 1.5rem; line-height: 1.6; flex-grow: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }
.tech-tag {
    background: #e9ecef; padding: 0.3rem 0.8rem; border-radius: 20px;
    font-size: 0.8rem; color: #666;
}

/* === BLOG SECTION (INDEX & BLOG PAGE) === */
.page-header {
    background: #f8f9fa; /* Changed from gradient */
    color: #333; /* Changed from white */
    padding: 120px 2rem 60px;
    text-align: center;
}
.page-header h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.page-header p { font-size: 1.2rem; opacity: 0.9; }

.blog-listing-section .container {
    padding-top: 80px;
    padding-bottom: 80px;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.blog-card {
    background: white; border-radius: 10px; overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
}
.blog-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.blog-card-image { height: 200px; overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.05); }
.blog-card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.blog-title { font-size: 1.25rem; font-weight: bold; margin-bottom: 0.75rem; color: #333; }
.blog-meta { font-size: 0.85rem; color: #777; margin-bottom: 1rem; }
.blog-excerpt { font-size: 0.95rem; color: #666; line-height: 1.6; margin-bottom: 1.5rem; flex-grow: 1; }
.blog-read-more, .blog-read-more-link {
    display: inline-flex; align-items: center;
    margin-top: auto; align-self: flex-start;
    background: #111; color: #fff;
    font-weight: 600; font-size: 0.85rem;
    padding: 0.55rem 1.3rem;
    border-radius: 50px;
    border: 2px solid #111;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover .blog-read-more-link,
.blog-read-more:hover {
    background: #fff; color: #111;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
/* Project Experience hub cards: no date/category meta */
#project-experience-grid .blog-meta { display: none; }

.view-all-posts-btn, .view-all-gallery-btn {
    display: block;
    width: fit-content;
    margin: 2.5rem auto 0;
    padding: 12px 35px;
}

/* === SINGLE BLOG POST PAGE === */
.container-main {
    display: flex;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 1.5rem;
    gap: 2.5rem;
}
.blog-post-full { flex: 3; }
.post-header-full {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}
.post-title-full {
    font-size: 2.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}
.post-meta-full {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}
.post-meta-full a { text-decoration: none; color: #111;}
.post-feature-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.post-content-full { font-size: 1.1rem; color: #34495e; }
.post-content-full p { margin-bottom: 1.5em; }
.post-content-full h2, .post-content-full h3 { font-weight: 600; color: #2c3e50; margin-top: 2.5em; margin-bottom: 1em; line-height: 1.3; }
.post-content-full h2 { font-size: 1.8rem; }
.post-content-full h3 { font-size: 1.5rem; }
.post-content-full blockquote { margin: 2em 0; padding: 1em 1.5em; border-left: 4px solid #111; background-color: #f8f9fa; font-style: italic; color: #555; border-radius: 0 4px 4px 0; }
.post-content-full ul, .post-content-full ol { margin-bottom: 1.5em; padding-left: 1.5em; }
.cta-section { margin: 3rem 0; padding: 2rem; background: #333; color: white; text-align: center; border-radius: 8px; }
.cta-section h3 { margin: 0 0 1rem; font-size: 1.5rem; color: white; }
.cta-section .btn-primary { border-color: white; background: #333; color: white; }
.cta-section .btn-primary:hover { background: #111; }
.author-bio { margin-top: 4rem; padding: 2rem; background-color: #f8f9fa; border-radius: 8px; display: flex; align-items: center; gap: 1.5rem; border: 1px solid #e9ecef; }
.author-bio-image img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
/* Share-this-post widget (shares the current post's URL, not the author's profiles) */
.post-share { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #eee; text-align: center; }
.post-share h4 { font-size: 1.1rem; margin-bottom: 1rem; }
.post-share-links { display: flex; justify-content: center; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    color: #fff; font-size: 1.05rem;
    border: none; cursor: pointer;
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.3s ease, box-shadow 0.25s ease;
}
.share-btn[hidden] { display: none; }
.share-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18); }
/* Compact variant: sits right under the title/meta line, above the feature image */
.post-share--top {
    margin: 1.1rem 0 0; padding-top: 0; border-top: none; text-align: left;
    display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
}
.post-share--top .post-share-label { font-weight: 600; font-size: 0.85rem; color: #666; text-transform: uppercase; letter-spacing: 0.04em; }
.post-share--top .post-share-links { justify-content: flex-start; gap: 0.5rem; }
.post-share--top .share-btn { width: 32px; height: 32px; font-size: 0.85rem; }
.share-btn.share-facebook { background-color: #3b5998; }
.share-btn.share-x { background-color: #000; }
.share-btn.share-linkedin { background-color: #0077b5; }
.share-btn.share-whatsapp { background-color: #25d366; }
.share-btn.share-native, .share-btn.share-copy { background-color: #111; }
.share-btn.share-copy.copied { background-color: #1a9e5c; }

/* === SIDEBAR === */
.sidebar {
    flex: 1;
    position: sticky;
    top: 120px;
    align-self: flex-start;
}
.sidebar-widget {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}
.sidebar-widget h3 {
    font-size: 1.2rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #111;
    display: inline-block;
}
.search-widget form { display: flex; position: relative; flex-wrap: nowrap; }
.search-widget input[type="text"],
.search-widget input[type="search"] { flex-grow: 1; padding: 0.7rem; border: 1px solid #ddd; border-radius: 4px 0 0 4px; outline: none; transition: border-color 0.3s; min-width: 0; }
.search-widget input[type="text"]:focus,
.search-widget input[type="search"]:focus { border-color: #111; }
.search-widget input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.search-widget button { padding: 0 1rem; border: none; background: #111; color: white; cursor: pointer; border-radius: 0 4px 4px 0; transition: background-color 0.3s; }
.search-widget button:hover { background-color: #555; }

/* === SEARCH SUGGESTIONS DROPDOWN === */
.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    z-index: 200;
    max-height: 440px;
    overflow-y: auto;
    display: none;
}
.search-suggestions.show { display: block; }
.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #f1f3f5;
    text-decoration: none;
    color: #333;
    transition: background-color 0.15s;
}
.search-suggestion-item:last-child { border-bottom: none; }
.search-suggestion-item:hover,
.search-suggestion-item.active {
    background: #f8f9fa;
    color: #111;
}
.search-suggestion-item img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}
.search-suggestion-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.search-suggestion-title {
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1f2937;
}
.search-suggestion-meta {
    font-size: 0.78rem;
    color: #888;
    margin-top: 4px;
}
.search-suggestion-empty {
    padding: 1rem;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}
.search-suggestion-empty small {
    display: block;
    margin-top: 5px;
    color: #aaa;
    font-size: 0.78rem;
}
.related-posts-widget ul, .categories-widget ul { list-style: none; padding: 0; margin: 0; }
.related-posts-widget li, .categories-widget li { margin-bottom: 1rem; }
.related-posts-widget a, .categories-widget a { text-decoration: none; color: #333; transition: color 0.3s; }
.related-posts-widget a:hover, .categories-widget a:hover { color: #111; }
.related-posts-widget a { display: flex; align-items: center; gap: 1rem; }
.related-posts-widget img { width: 70px; height: 70px; object-fit: cover; border-radius: 5px; }
.related-posts-widget .post-title { font-weight: 600; line-height: 1.3; }
.categories-widget .category-count { float: right; color: #999; }

/* === LEGAL / PROSE PAGES (Privacy, Terms, Disclaimer) === */
.legal-content { max-width: 820px; margin: 0 auto; }
.legal-content .updated-note { color: #888; font-size: 0.9rem; margin-bottom: 2.5rem; }
.legal-content h2 { font-size: 1.4rem; color: #111; margin: 2.5rem 0 1rem; }
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p { color: #444; line-height: 1.75; margin-bottom: 1.25rem; }
.legal-content ul { padding-left: 1.4rem; margin-bottom: 1.25rem; color: #444; line-height: 1.75; }
.legal-content li { margin-bottom: 0.5rem; }
.legal-content a { color: #111; text-decoration: underline; }
.legal-content strong { color: #222; }

/* === FAQ ACCORDION (native <details>/<summary>) === */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.85rem; }
.faq-item {
    background: #fff; border: 1px solid #eee; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); overflow: hidden;
}
.faq-item summary {
    cursor: pointer; padding: 1.2rem 1.5rem; font-weight: 700; color: #111;
    list-style: none; display: flex; justify-content: space-between;
    align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+'; font-size: 1.4rem; font-weight: 400; color: #666;
    transition: transform 0.25s ease; flex-shrink: 0; line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer { padding: 0 1.5rem 1.4rem; color: #555; line-height: 1.7; }
.faq-item .faq-answer a { color: #111; }

/* === HTML SITEMAP === */
.sitemap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.75rem; max-width: 1120px; margin: 0 auto; }
.sitemap-card {
    background: white; padding: 1.85rem 1.6rem; border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sitemap-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1); }
.sitemap-card-icon {
    width: 44px; height: 44px; background: #111; color: #fff;
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.1rem; font-size: 1.05rem;
}
.sitemap-group h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: #666; margin-bottom: 1.1rem; }
.sitemap-group ul { list-style: none; }
.sitemap-group li { margin-bottom: 0.65rem; }
.sitemap-group li:last-child { margin-bottom: 0; }
.sitemap-group a { color: #333; font-size: 0.95rem; text-decoration: none; }
.sitemap-group a:hover { color: #111; text-decoration: underline; }

/* === BOOKS === */
.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 260px)); justify-content: center; gap: 2rem; max-width: 860px; margin: 0 auto; }
.book-card {
    background: white; border-radius: 14px; overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none; color: inherit; display: flex; flex-direction: column;
}
.book-card:hover { transform: translateY(-8px); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14); }
.book-cover-wrap { position: relative; aspect-ratio: 800 / 1132; overflow: hidden; background: #f0f0f0; }
.book-cover-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.book-card:hover .book-cover-wrap img { transform: scale(1.04); }
.book-badge {
    position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2;
    background: #111; color: #fff; font-size: 0.72rem; font-weight: 700;
    padding: 0.3rem 0.7rem; border-radius: 20px; letter-spacing: 0.03em;
}
.book-info { padding: 1.25rem 1.25rem 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.book-title { font-size: 1.05rem; font-weight: 700; color: #111; margin-bottom: 0.4rem; }
.book-desc { font-size: 0.88rem; color: #666; line-height: 1.55; margin-bottom: 1rem; flex-grow: 1; }
.book-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; }
.book-price { font-weight: 800; color: #111; }
.book-cta {
    display: inline-flex; align-items: center;
    background: #111; color: #fff;
    font-weight: 600; font-size: 0.78rem;
    padding: 0.5rem 1.15rem;
    border-radius: 50px;
    border: 2px solid #111;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.book-card:hover .book-cta {
    background: #fff; color: #111;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.book-series-intro { text-align: center; max-width: 700px; margin: 0 auto 2.5rem; }
.book-series-intro h2 { font-size: 1.9rem; margin-bottom: 0.6rem; color: #111; }
.book-series-intro p { color: #666; font-size: 1rem; line-height: 1.6; }
.book-group-title {
    font-size: 1.25rem; font-weight: 700; color: #111;
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    margin: 3rem 0 1.25rem; text-align: center;
}
.book-group-title:first-of-type { margin-top: 0; }
.book-group-title i { color: #888; font-size: 1.1rem; }
.book-group-price-note { font-size: 0.85rem; font-weight: 500; color: #888; margin-left: 0.25rem; }

/* === EDUCATION === */
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.education-card {
    background: white; padding: 2rem; border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); text-align: center;
    transition: transform 0.3s ease;
}
.education-card:hover { transform: translateY(-5px); }
.education-icon {
    width: 60px; height: 60px; background: #111;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; color: white; font-size: 1.5rem;
}
.education-card .timeline-title { font-size: 1.2rem; }
.education-card .timeline-company { font-size: 1rem; margin-bottom: 0.5rem; }
.education-card .timeline-date {
    font-size: 0.8rem; padding: 0.3rem 0.8rem;
    background: #e9ecef; color: #555;
    display: inline-block; border-radius: 15px;
}
.education-card-link {
    text-decoration: none;
    color: inherit;
}

/* === CONTACT === */
.contact-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: flex-start; }
.contact-info { padding-top: 1rem; }
.contact-item {
    display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem;
    padding: 1.5rem; background: white; border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-item:hover { transform: translateX(10px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.contact-icon {
    width: 50px; height: 50px; background: #111;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.2rem; flex-shrink: 0;
}
.contact-details h4 { margin-bottom: 0.3rem; color: #333; font-size: 1.1rem; }
.contact-details p, .contact-details p a { color: #555; text-decoration: none; }
.contact-details p a:hover { color: #111; text-decoration: underline; }
.contact-form {
    background: white; padding: 2.5rem; border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: #333; }
.form-group input, .form-group textarea {
    width: 100%; padding: 0.8rem; border: 1px solid #ddd;
    border-radius: 5px; font-size: 1rem; font-family: inherit;
    transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: #111;
}
.social-links-contact { display: flex; justify-content: flex-start; gap: 1rem; margin-top: 2rem; }
.social-link {
    width: 45px; height: 45px; background: #111;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.2rem; text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
}
.social-link:hover { transform: translateY(-5px) scale(1.1); }

/* === FOOTER (single row: hub links, copyright, social icons) === */
.footer {
    background: #2c2c2c; color: #aaa;
    padding: 1.1rem 0;
}
.footer p { margin: 0; font-size: 0.8rem; color: #999; }
.footer a { color: #ffffff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
}
.footer-social { margin: 0; flex-shrink: 0; }
.footer-social .social-link { width: 30px; height: 30px; font-size: 0.8rem; background: rgba(255, 255, 255, 0.1); }
.footer-social .social-link:hover { background: #fff; color: #111; }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.25rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.footer-legal a { color: #999; font-size: 0.8rem; }
.footer-legal a:hover { color: #fff; text-decoration: none; }

/* === HUB CROSS-LINK CARDS (About / Projects "explore more" grids) === */
.hub-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}
.hub-card {
    background: white; padding: 2rem 1.5rem; border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); text-align: center;
    text-decoration: none; color: inherit; display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hub-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12); }
.hub-card-icon {
    width: 56px; height: 56px; background: #111; color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; font-size: 1.3rem;
}
.hub-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: #333; }
.hub-card p { font-size: 0.9rem; color: #666; line-height: 1.5; margin: 0; }

/* === 404 PAGE === */
.notfound-hero { background: #f8f9fa; text-align: center; padding: 140px 2rem 4rem; }
.notfound-illustration { max-width: 420px; margin: 0 auto 1rem; }
.notfound-svg { width: 100%; height: auto; }
.notfound-svg-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 92px; font-weight: 800; fill: none;
    stroke: #111; stroke-width: 1.6;
}
.notfound-svg-underline { fill: none; stroke: #111; stroke-width: 3; stroke-linecap: round; opacity: 0.75; }
.notfound-hero h1 { font-size: 2.2rem; margin-bottom: 0.75rem; color: #111; }
.notfound-hero p { font-size: 1.05rem; color: #666; max-width: 520px; margin: 0 auto 2rem; line-height: 1.6; }
.notfound-search { display: flex; max-width: 460px; margin: 0 auto 1.75rem; }
.notfound-search input[type="search"] {
    flex-grow: 1; padding: 0.8rem 1.1rem; border: 1px solid #ddd; border-radius: 50px 0 0 50px;
    outline: none; font-size: 1rem; min-width: 0; transition: border-color 0.3s ease;
}
.notfound-search input[type="search"]:focus { border-color: #111; }
.notfound-search button {
    padding: 0 1.5rem; border: none; background: #111; color: #fff; cursor: pointer;
    border-radius: 0 50px 50px 0; font-size: 1rem; transition: background-color 0.3s ease;
}
.notfound-search button:hover { background-color: #555; }
.notfound-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.notfound-actions .btn-secondary { cursor: pointer; }
@media (max-width: 480px) {
    .notfound-svg-text { font-size: 78px; }
    .notfound-hero { padding: 120px 1.25rem 3rem; }
}

/* === GALLERY & LIGHTBOX === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.gallery-item {
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 16 / 10;
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.4s ease;
}
.gallery-item:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.gallery-item:hover img { transform: scale(1.1); }

/* The lightbox overlay is intentionally dark to focus the image */
.lightbox-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 2000; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-overlay.show { opacity: 1; visibility: visible; }
.lightbox-content {
    position: relative; max-width: 85vw; max-height: 90vh;
    transform: scale(0.8); transition: transform 0.3s ease;
}
.lightbox-overlay.show .lightbox-content { transform: scale(1); }
.lightbox-content img {
    width: 100%; height: auto; max-height: 80vh;
    object-fit: contain; border-radius: 5px;
}
.lightbox-close {
    position: absolute; top: -45px; right: -10px;
    font-size: 2.5rem; color: white; cursor: pointer;
    background: transparent; border: none;
}
.lightbox-info { color: white; text-align: center; margin-top: 1rem; }
.lightbox-title { font-size: 1.5rem; font-weight: bold; margin: 0; }

#pagination-container {
    display: flex; justify-content: center; align-items: center;
    gap: 0.5rem; margin-top: 3rem;
}
.pagination-btn {
    padding: 10px 15px; border: 1px solid #ddd;
    background-color: white; color: #333; cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
}
.pagination-btn:hover { background-color: #f0f0f0; }
.pagination-btn.active {
    background-color: #111; color: white;
    border-color: #111;
}

/* === RESPONSIVE DESIGN === */
/* Nav switches to the hamburger drawer earlier than the general mobile breakpoint
   (1100px instead of 768px) because the 10-link split nav needs more room than a
   6-link one did to stay on a single line without wrapping. */
@media (max-width: 1100px) {
    .hamburger { display: flex; z-index: 1001; }
    .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    .nav-split { display: none; }
    .nav-menu {
        display: flex;
        position: fixed; left: -100%; top: 0; flex-direction: column;
        background-color: white; width: 80%; max-width: 300px; height: 100vh;
        text-align: left; transition: left 0.3s ease-in-out;
        padding: 6rem 2rem 2rem 2rem; gap: 1.2rem;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    .nav-menu.active { left: 0; }
    .nav-link { font-size: 1.05rem; display: block; padding: 0.4rem 0; }
}

@media (max-width: 1024px) {
    .contact-container { grid-template-columns: 1fr; }
    .timeline::before { left: 20px; transform: translateX(0); }
    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        padding-left: 60px;
        padding-right: 20px;
        left: 0;
    }
    .timeline-item:nth-child(odd) .timeline-icon,
    .timeline-item:nth-child(even) .timeline-icon { left: -2px; right: auto; }
    .about-hero-grid { grid-template-columns: 1fr; text-align: center; }
    .about-photo-frame { max-width: 260px; margin: 0 auto; }
    .role-tags, .about-hero-content .cta-buttons { justify-content: center; }
}

@media (max-width: 992px) {
    .container-main { flex-direction: column; }
    .sidebar { position: static; width: 100%; top: auto; }
}

@media (max-width: 768px) {
    .section-title { font-size: 2rem; }
    .hero h1 { font-size: 2.5rem; }
    .projects-grid, .skills-container, .education-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));}
    .post-title-full { font-size: 2.2rem; }
    .footer-bar { justify-content: center; text-align: center; }
    .footer-meta { flex-direction: column; gap: 0.6rem; }
    .footer-legal { justify-content: center; }
    .hero-actions { grid-template-columns: repeat(2, 1fr); max-width: 320px; }
    .about-stats-modern { grid-template-columns: repeat(2, 1fr); }
    .about-hero { padding-top: 120px; }
    .about-hero-content h1 { font-size: 2.2rem; }
}

@media (max-width: 480px) {
    body { line-height: 1.5; }
    .container { padding: 0 1rem; }
    .nav-container, .container-main { padding: 0 1rem; }
    .logo-img { height: 32px; }
    .hero h1 { font-size: 2rem; }
    .hero .subtitle { font-size: 1.2rem; }
    .hero .tagline { font-size: 1rem; }
    .post-title-full { font-size: 1.8rem; }
}

/* === NEW GALLERY HOVER STYLES === */
.gallery-item {
    position: relative; /* This is crucial for the overlay positioning */
    cursor: pointer;
}

.gallery-item .gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay h3 {
    margin: 0 0 0.4rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.gallery-item-overlay .photo-count {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.75rem;
}

.gallery-item-overlay .visit-link {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid white;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.gallery-item-overlay .visit-link:hover {
    background-color: white;
    color: #333;
}


/* === NEW LIGHTBOX NAVIGATION STYLES === */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 1rem;
    z-index: 2001; /* Ensure it's above the image */
    transition: background 0.3s ease;
    user-select: none;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.6);
}

/* === IELTS BOOKS PROMO POPUP === */
.promo-popup-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center;
    z-index: 3000; opacity: 0; visibility: hidden;
    padding: 1rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.promo-popup-overlay.show { opacity: 1; visibility: visible; }
.promo-popup-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(10px);
    transition: transform 0.3s ease;
}
.promo-popup-overlay.show .promo-popup-modal { transform: scale(1) translateY(0); }
.promo-popup-close {
    position: absolute; top: 0.75rem; right: 0.75rem;
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: #f2f2f2; color: #333;
    font-size: 1.4rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background-color 0.2s ease;
}
.promo-popup-close:hover { background: #e5e5e5; }
.promo-popup-covers {
    display: flex; justify-content: center; align-items: flex-end;
    margin-bottom: 1.5rem; height: 130px;
}
.promo-popup-covers picture {
    display: block; width: 82px; flex-shrink: 0;
    border-radius: 6px; overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}
.promo-popup-covers picture img { width: 100%; height: auto; display: block; }
.promo-popup-covers picture:nth-child(1) { transform: rotate(-8deg) translateX(14px); z-index: 1; }
.promo-popup-covers picture:nth-child(2) { transform: translateY(-10px) scale(1.08); z-index: 2; }
.promo-popup-covers picture:nth-child(3) { transform: rotate(8deg) translateX(-14px); z-index: 1; }
.promo-popup-eyebrow {
    display: inline-block; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; color: #d97706;
    margin-bottom: 0.5rem;
}
.promo-popup-modal h3 { font-size: 1.5rem; margin: 0 0 0.75rem; color: #111; }
.promo-popup-modal p { font-size: 0.95rem; color: #555; line-height: 1.6; margin: 0 0 1.5rem; }
.promo-popup-cta {
    display: inline-block; width: 100%;
    padding: 13px 20px; border-radius: 50px;
    background: #111; color: #fff; font-weight: 600; font-size: 1rem;
    text-decoration: none; margin-bottom: 0.9rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.promo-popup-cta:hover { background: #333; transform: translateY(-2px); }
.promo-popup-dismiss {
    display: block; width: 100%; background: none; border: none;
    color: #888; font-size: 0.85rem; text-decoration: underline;
    cursor: pointer; padding: 0.25rem;
}
.promo-popup-dismiss:hover { color: #555; }

@media (max-width: 480px) {
    .promo-popup-modal { padding: 2.25rem 1.25rem 1.5rem; border-radius: 12px; }
    .promo-popup-covers { height: 105px; margin-bottom: 1.25rem; }
    .promo-popup-covers picture { width: 66px; }
    .promo-popup-modal h3 { font-size: 1.25rem; }
    .promo-popup-modal p { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    .promo-popup-overlay, .promo-popup-modal, .promo-popup-covers picture { transition: none; }
}