:root {
    --primary: #1e5f31;
    --primary-light: #2d8a48;
    --accent: #d4af37;
    --bg-body: #f8faf9;
    --bg-card: #ffffff;
    --text-main: #0f1a12;
    --text-muted: #5e6d62;
    --border: #e2ede5;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 4px 12px rgba(15, 26, 18, 0.02);
    --shadow-md: 0 10px 30px rgba(15, 26, 18, 0.06);
    --nav-height: 85px;
}

[data-theme="dark"] {
    --bg-body: #0a0f0b;
    --bg-card: #141d16;
    --text-main: #f0f4f1;
    --text-muted: #a1b0a5;
    --border: #1f2b22;
    --navbar-bg: rgba(10, 15, 11, 0.95);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.75;
    overflow-x: hidden;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1.5rem; 
}

/* --- Premium Dynamic Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.3s ease, 
                box-shadow 0.3s ease;
}

.navbar.scrolled {
    --nav-height: 65px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
}

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

.logo { 
    font-size: 1.12rem; 
    font-weight: 800; 
    text-decoration: none; 
    color: var(--text-main); 
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: translateY(-0.5px);
}

.logo span { 
    font-size: 0.68rem; 
    color: var(--primary); 
    display: block; 
    font-weight: 600; 
    text-transform: none;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 2.4rem; 
    align-items: center; 
}

.nav-links li {
    position: relative;
}

.nav-links a { 
    text-decoration: none; 
    color: var(--text-muted); 
    font-weight: 500; 
    font-size: 0.95rem; 
    padding: 8px 0;
    display: inline-block;
    transition: color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active, .nav-links a:hover { 
    color: var(--text-main); 
}

.nav-links a:focus-visible,
.theme-toggle:focus-visible,
.mobile-nav-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    z-index: 1010;
}

.theme-toggle:hover {
    background: var(--border);
    transform: scale(1.05);
}

.theme-toggle i {
    font-size: 0.95rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1010;
    position: relative;
    width: 40px;
    height: 40px;
}

.hamburger-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-main);
    position: absolute;
    left: 9px;
    top: 19px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--text-main);
    position: absolute;
    left: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), top 0.3s ease, bottom 0.3s ease;
}

.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { bottom: -6px; }

.mobile-nav-toggle.menu-open .hamburger-icon {
    background: transparent;
}
.mobile-nav-toggle.menu-open .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
}
.mobile-nav-toggle.menu-open .hamburger-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* --- Hero Section Optimization --- */
.hero-header {
    padding: clamp(40px, 10vh, 100px) 1.5rem 40px;
    text-align: center;
}
.hero-header h1 {
    font-size: clamp(1.8rem, 5.5vw, 4rem);
    letter-spacing: -0.03em;
    line-height: 1.2;
}
.hero-header p {
    max-width: 650px;
    margin: 1.5rem auto;
    color: var(--text-muted);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    padding: 0 10px;
}

/* --- Info Blocks --- */
.info-block { 
    background: var(--bg-card); 
    padding: clamp(1.25rem, 4vw, 3.5rem); 
    border-radius: 24px; 
    margin-bottom: 2.5rem; 
    border: 1px solid var(--border); 
    box-shadow: var(--shadow-md);
}

.block-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    color: var(--primary);
}
.block-title h2 { font-size: clamp(1.3rem, 4vw, 2rem); margin: 0; }

/* --- Optimized Responsive Slideshow Structural Framework --- */
.certificate-slideshow-wrapper, .services-slider-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.certificate-slideshow, .services-slider-wrapper {
    height: clamp(480px, 70vh, 700px); 
    overflow: hidden;
    border-radius: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

/* Override container rules specifically for certificate slider on about page */
.certificate-slideshow {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.slide, .service-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px max(20px, 6vw);
    box-sizing: border-box;
}

.slide.active, .service-slide.active { 
    opacity: 1; 
    visibility: visible;
    z-index: 10; 
}

/* --- Slider Navigation Arrows --- */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: #ffffff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.slider-arrow:hover {
    background: var(--primary-light);
    transform: translateY(-50%) scale(1.05);
}

.prev-arrow { left: 16px; }
.next-arrow { right: 16px; }

/* --- Services Slider Specifics --- */
.service-slide img {
    max-width: 90%;
    max-height: 60%; 
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 12px;
    cursor: zoom-in; 
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.service-slide img:hover {
    transform: scale(1.02);
}

.service-slide-content h3 { 
    font-size: clamp(1.2rem, 3vw, 1.7rem); 
    color: var(--primary); 
    margin-bottom: 10px;
    line-height: 1.3;
}
.service-slide-content p { 
    color: var(--text-muted); 
    max-width: 600px; 
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.5;
}

/* --- About Slides Layout Specific Extensions --- */
.slide h3 {
    color: var(--primary);
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    margin-bottom: 20px;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    text-align: left;
    width: 100%;
}
.slide ul {
    width: 100%;
    text-align: left;
    max-height: 70%;
    overflow-y: auto;
    padding-right: 5px;
}
.slide ul li {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

/* Custom layout scrollbars for slides overflow contents */
.slide ul::-webkit-scrollbar { width: 4px; }
.slide ul::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* --- Qualifications Alignment Layout Grid --- */
.qualifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.qualifications-grid > div {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-card);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
}

/* --- About Myself Text Block Alignment --- */
.text-bio-block {
    margin-top: 40px;
    box-shadow: none;
    border: none;
    padding: 0;
}
.text-bio-block p {
    color: var(--text-muted);
    font-size: clamp(0.92rem, 2vw, 1rem);
    line-height: 1.7;
    text-align: justify;
}

/* --- Navigation Dots --- */
.dots-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: max(6px, 1vw);
    z-index: 20;
    max-width: 80%;
    overflow-x: auto;
    padding: 4px;
}
.dots-container::-webkit-scrollbar { display: none; }

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    flex-shrink: 0;
}

.dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* --- Contact Card --- */
.contact-card { 
    background: var(--bg-card); 
    padding: clamp(1.5rem, 4vw, 3.5rem); 
    border-radius: 32px; 
    border: 1px solid var(--border); 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2.5rem; 
    user-select: text;
    -webkit-user-select: text;
}
.contact-card h3 {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    color: var(--primary);
}
.contact-card p {
    margin-top: 10px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.price-tag { 
    background: var(--primary); 
    color: white; 
    padding: 12px 24px; 
    border-radius: 12px; 
    display: inline-block; 
    margin-top: 20px; 
    font-weight: 700;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.btn-premium {
    background: var(--primary);
    color: white;
    padding: 0.85rem 2.2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-size: clamp(0.9rem, 2vw, 1rem);
}
.btn-premium:hover {
    background: var(--primary-light);
}

/* --- Footer --- */
.footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.88rem;
}
.footer strong { color: var(--primary); }

/* --- About Page Hero Structure --- */
.about-hero {
    display: grid;
    grid-template-columns: 1fr 260px; 
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 40px;
}
.about-image-side {
    position: relative;
    display: flex;
    justify-content: center;
}
.profile-img-small {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 24px;
    border: 4px solid var(--bg-card);
    box-shadow: var(--shadow-md);
}
.about-text-side h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
}

/* --- Lightbox Zoom Overlay Framework --- */
.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 11, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 16px;
}
.image-lightbox.open {
    opacity: 1;
    pointer-events: auto;
}
.image-lightbox img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.image-lightbox.open img {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* --- Mobile Responsive Layout Configuration Adjustments --- */
@media (max-width: 850px) {
    .mobile-nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-card);
        border-left: 1px solid var(--border);
        box-shadow: -10px 0 40px rgba(0,0,0,0.1);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 100px 2rem 40px;
        gap: 1.5rem;
        transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1005;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        width: 100%;
        font-weight: 600;
        padding: 8px 0;
    }
    .nav-links a::after { display: none; }
    .nav-links a.active { color: var(--primary); }

    .about-hero { 
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 1.5rem; 
    }
    .about-image-side { 
        order: -1; 
    }
    .certificate-slideshow, .services-slider-wrapper {
        height: 520px; 
    }
    .slide, .service-slide {
        padding: 30px max(16px, 4vw) 45px;
    }
    .slider-arrow {
        width: 38px;
        height: 38px;
    }
    .prev-arrow { left: 8px; }
    .next-arrow { right: 8px; }
    
    .contact-card { gap: 1.5rem; padding: 1.5rem; }
}

/* --- Disable Printing --- */
@media print {
    body { display: none !important; }
}