:root {
    --gold: #E8B923;
    --gold-light: #F5D76E;
    --gold-pale: #FFF8E7;
    --gold-soft: #FDF3D7;
    --charcoal: #3D4852;
    --charcoal-dark: #2D3436;
    --text-muted: #6B7280;
    --bg-light: #FAFBFC;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(45, 52, 54, 0.06);
    --shadow-md: 0 8px 30px rgba(45, 52, 54, 0.08);
    --shadow-lg: 0 20px 60px rgba(45, 52, 54, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    touch-action: manipulation;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--charcoal);
    background: var(--bg-light);
    overflow-x: hidden;
}

.text-gold {
    color: var(--gold) !important;
}

/* ── Navbar ── */
.site-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1rem 0;
    transition: padding var(--transition), box-shadow var(--transition), background var(--transition);
    border-bottom: 1px solid transparent;
}

.site-navbar.scrolled {
    padding: 0.6rem 0;
    box-shadow: var(--shadow-sm);
    border-bottom-color: rgba(232, 185, 35, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.site-logo {
    transition: transform var(--transition);
}

.site-logo:hover {
    transform: scale(1.03);
}

.site-navbar .nav-link {
    color: var(--charcoal);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color var(--transition);
}

.site-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition), left var(--transition);
    border-radius: 2px;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: var(--charcoal-dark);
}

.site-navbar .nav-link:hover::after,
.site-navbar .nav-link.active::after {
    width: 24px;
    left: calc(50% - 12px);
}

.site-menu-toggle,
.site-menu-toggle:focus,
.site-menu-toggle:active,
.site-menu-toggle:focus-visible {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

.site-menu-toggle .navbar-toggler-icon {
    pointer-events: none;
}

.btn-lang {
    background: var(--gold-pale);
    color: var(--charcoal-dark);
    border: 1px solid rgba(232, 185, 35, 0.25);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    transition: all var(--transition);
}

.btn-lang:hover {
    background: var(--gold-soft);
    border-color: var(--gold);
}

.btn-theme-toggle {
    background: var(--gold-pale);
    color: var(--charcoal-dark);
    border: 1px solid rgba(232, 185, 35, 0.25);
    border-radius: 50%;
    font-size: 1rem;
    padding: 0.45rem 0.55rem;
    line-height: 1;
    transition: all var(--transition);
}

.btn-theme-toggle:hover,
.btn-theme-toggle:focus,
.btn-theme-toggle:active,
.btn-theme-toggle.show {
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--charcoal-dark);
    box-shadow: none;
}

.theme-switcher .dropdown-item:hover,
.theme-switcher .dropdown-item:focus,
.lang-switcher .dropdown-item:hover,
.lang-switcher .dropdown-item:focus {
    background: rgba(232, 185, 35, 0.12);
    color: #e8b923;
}

.theme-switcher .dropdown-item.active,
.theme-switcher .dropdown-item:active,
.lang-switcher .dropdown-item.active,
.lang-switcher .dropdown-item:active {
    background: rgba(232, 185, 35, 0.18);
    color: #e8b923;
    font-weight: 600;
}

/* ── Buttons ── */
.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--charcoal-dark);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(232, 185, 35, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(232, 185, 35, 0.4);
    color: var(--charcoal-dark);
}

.btn-outline-gold {
    background: transparent;
    color: var(--charcoal-dark);
    border: 2px solid var(--gold);
    border-radius: 50px;
    font-weight: 600;
    padding: 0.7rem 1.75rem;
    transition: all var(--transition);
}

.btn-outline-gold:hover {
    background: var(--gold-pale);
    color: var(--charcoal-dark);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* ── Hero ── */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 185, 35, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero-section::after {
    content: '< />';
    position: absolute;
    bottom: 15%;
    left: 5%;
    font-size: 8rem;
    font-weight: 800;
    color: rgba(232, 185, 35, 0.06);
    pointer-events: none;
    user-select: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

.hero-badge {
    display: inline-block;
    background: var(--gold-pale);
    color: var(--charcoal);
    border: 1px solid rgba(232, 185, 35, 0.2);
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--charcoal-dark);
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-visual {
    position: relative;
}

.hero-visual-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(232, 185, 35, 0.1);
    animation: float 6s ease-in-out infinite;
}

.hero-code {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--charcoal);
}

.hero-code .tag { color: var(--gold); }
.hero-code .attr { color: #7C6AEF; }
.hero-code .val { color: #10B981; }

/* ── Stats ── */
.stats-section {
    background: var(--white);
    border-top: 1px solid rgba(232, 185, 35, 0.1);
    border-bottom: 1px solid rgba(232, 185, 35, 0.1);
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* ── Sections ── */
.section-padding {
    padding: 5rem 0;
}

.section-badge {
    display: inline-block;
    background: var(--gold-pale);
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--charcoal-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    line-height: 1.7;
}

/* ── Service Cards ── */
.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--gold-pale);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1.25rem;
    transition: all var(--transition);
}

.service-card:hover .service-icon {
    background: var(--gold);
    color: var(--white);
    transform: rotate(-5deg) scale(1.05);
}

.service-card h4 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--charcoal-dark);
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── Portfolio Cards ── */
.portfolio-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.portfolio-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.portfolio-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .portfolio-card-image img {
    transform: scale(1.08);
}

.portfolio-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(45, 52, 54, 0.7) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.portfolio-card:hover .portfolio-card-overlay {
    opacity: 1;
}

.portfolio-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-card-body h5 {
    font-weight: 700;
    color: var(--charcoal-dark);
    margin-bottom: 0.5rem;
}

.portfolio-card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gold-pale) 0%, var(--gold-soft) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gold);
}

/* ── Page Header ── */
.page-header {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--gold-pale) 0%, var(--white) 50%, var(--bg-light) 100%);
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232, 185, 35, 0.3), transparent);
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--charcoal-dark);
}

/* ── About ── */
.about-image-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
}

.about-image-wrap::before {
    content: '';
    position: absolute;
    inset: -3px;
    border: 3px solid var(--gold);
    border-radius: calc(var(--radius) + 3px);
    opacity: 0.3;
    z-index: -1;
}

.about-photo {
    width: 100%;
    height: 500px;
    display: block;
    object-fit: cover;
    border-radius: var(--radius);
}

.value-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 1.75rem;
    border-left: 4px solid var(--gold);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    height: 100%;
}

.value-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.value-card h5 {
    font-weight: 700;
    color: var(--charcoal-dark);
    margin-bottom: 0.5rem;
}

/* ── Services Detail ── */
.service-detail-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    height: 100%;
    transition: all var(--transition);
}

.service-detail-card:hover {
    box-shadow: var(--shadow-md);
}

.service-detail-card .service-icon {
    width: 64px;
    height: 64px;
    font-size: 1.75rem;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
}

.service-list li {
    padding: 0.4rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-list li::before {
    content: '\F26E';
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.85rem;
}

/* ── Contact ── */
.contact-form-wrap {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(232, 185, 35, 0.1);
}

.contact-info-card {
    background: linear-gradient(135deg, var(--charcoal-dark) 0%, var(--charcoal) 100%);
    color: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    height: 100%;
}

.contact-info-card h4 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-info-item i {
    width: 40px;
    height: 40px;
    background: rgba(232, 185, 35, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    flex-shrink: 0;
}

.form-control,
.form-select {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: all var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(232, 185, 35, 0.15);
}

/* ── CTA Banner ── */
.cta-banner {
    background: linear-gradient(135deg, var(--charcoal-dark) 0%, var(--charcoal) 100%);
    border-radius: var(--radius);
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 185, 35, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-banner h2 {
    color: var(--white);
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
}

/* ── Portfolio Detail ── */
.portfolio-detail-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.portfolio-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.portfolio-detail-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--charcoal);
}

.portfolio-detail-content p {
    margin-bottom: 1.25rem;
}

/* ── Tech stack ── */
.tech-stack-grid {
    max-width: 1100px;
    margin: 0 auto;
}

.tech-stack-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 1.5rem 1rem;
    text-align: center;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130px;
}

.tech-stack-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(232, 185, 35, 0.25);
}

.tech-stack-item i.devicon,
.tech-stack-item [class*=" devicon-"] {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.75rem;
    display: inline-block;
    min-height: 3rem;
}

.tech-stack-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1.3;
}

/* ── Mobile drawer ── */
.mobile-drawer {
    width: min(320px, 88vw);
    border-right: 3px solid var(--gold);
    background: var(--white);
    z-index: 1055;
}

.mobile-drawer .offcanvas-body,
.mobile-drawer .mobile-nav-list a,
.mobile-drawer .mobile-drawer-link {
    position: relative;
    z-index: 1;
}

.mobile-drawer .offcanvas-header {
    border-bottom: 1px solid rgba(232, 185, 35, 0.15);
    padding: 1.25rem 1.5rem;
}

.mobile-nav-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav-list a {
    display: block;
    padding: 1rem 0;
    color: var(--charcoal-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition), padding-left var(--transition);
}

.mobile-nav-list a.active,
.mobile-nav-list a:hover {
    color: var(--gold);
    padding-left: 0.5rem;
}

.mobile-drawer-lang-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
}

/* ── Home chart ── */
.home-chart-wrap {
    position: relative;
    max-width: 360px;
    margin: 0 auto;
}

.home-donut-chart {
    width: 100%;
    height: auto;
    display: block;
}

.donut-bg {
    fill: none;
    stroke: var(--gold-pale);
    stroke-width: 28;
}

.donut-segment {
    fill: none;
    stroke-width: 28;
    stroke-linecap: round;
}

.donut-center-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 800;
    fill: var(--charcoal-dark);
}

.donut-center-sub {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    fill: var(--text-muted);
}

.chart-glow {
    position: absolute;
    inset: 10%;
    background: radial-gradient(circle, rgba(232, 185, 35, 0.15) 0%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
}

.chart-legend li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    color: var(--charcoal);
    font-weight: 500;
}

.chart-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--dot-color);
    flex-shrink: 0;
}

.chart-legend strong {
    margin-left: auto;
    color: var(--charcoal-dark);
}

/* ── Footer ── */
.site-footer {
    background: var(--charcoal-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
    margin-top: 0;
}

.footer-logo {
    filter: brightness(1.1);
}

.footer-tagline {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 280px;
}

.footer-heading {
    color: var(--white);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--gold-light);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0 1.5rem;
}

.footer-copy {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* ── Animations ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
    display: block;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero-section::after {
        display: none;
    }

    .hero-visual {
        margin-top: 3rem;
    }

    .section-padding {
        padding: 3.5rem 0;
    }

    .cta-banner {
        padding: 3rem 2rem;
        text-align: center;
    }

    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .contact-form-wrap,
    .contact-info-card {
        padding: 1.75rem;
    }

    .service-detail-card {
        padding: 1.75rem;
    }
}
