.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: var(--card-bg, #ffffff);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light, #eaeaea);
    padding: 6px 0 calc(6px + var(--safe-bottom, 0px));
    justify-content: space-around;
    align-items: center;
    height: calc(var(--nav-height, 68px) + var(--safe-bottom, 0px));
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.06);
    transition: background 0.4s ease, border-color 0.4s ease;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    overscroll-behavior: contain;
}

[data-theme="dark"] .bottom-nav {
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
    background: var(--card-bg, #121212);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted, #999999);
    font-size: 0.6rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 16px;
    transition: color 0.25s ease, transform 0.25s ease;
    position: relative;
    min-width: 52px;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    touch-action: manipulation;
    cursor: pointer;
}

.bottom-nav .nav-item .material-icons-round {
    font-size: 24px;
    transition: transform 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
}

.bottom-nav .nav-item .nav-label {
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.8;
}

.bottom-nav .nav-item.active-nav {
    color: var(--accent, #000000);
}

.bottom-nav .nav-item.active-nav .material-icons-round {
    transform: scale(1.1);
}

.bottom-nav .nav-item:active {
    transform: scale(0.92);
}

.bottom-nav .nav-item .nav-dot {
    position: absolute;
    top: -2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent, #000000);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bottom-nav .nav-item.active-nav .nav-dot {
    opacity: 1;
}

.touch-ripple {
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.touch-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    will-change: opacity;
    backface-visibility: hidden;
}

.touch-ripple:active::after {
    opacity: 1;
}

[data-theme="dark"] .touch-ripple::after {
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.08) 0%, transparent 70%);
}

@media (max-width: 968px) {
    .bottom-nav {
        display: flex !important;
    }
    .navbar-premium {
        display: none !important;
    }
    body {
        padding-bottom: calc(var(--nav-height, 68px) + 20px + var(--safe-bottom, 0px));
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: none;
    }
    #tsparticles {
        display: none !important;
        opacity: 0 !important;
        animation: none !important;
    }
    .hero-premium {
        padding: 80px 5% 40px;
        min-height: 100vh;
        will-change: transform;
    }
    .hero-container {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
        max-width: 100%;
    }
    .hero-left {
        text-align: center;
    }
    .hero-title {
        font-size: 2.4rem;
        word-break: break-word;
        -webkit-hyphens: auto;
        hyphens: auto;
    }
    .hero-description-premium {
        font-size: 0.95rem;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
        word-break: break-word;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        width: 100%;
    }
    .hero-actions .btn-primary-premium,
    .hero-actions .btn-ghost-premium {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        box-sizing: border-box;
    }
    .hero-stats {
        display: flex !important;
        gap: 1.5rem !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        margin-top: 0.5rem !important;
        width: 100%;
        max-width: 100%;
    }
    .hero-stats .stat-premium {
        display: flex !important;
        align-items: baseline !important;
        flex-wrap: wrap !important;
        gap: 0.1rem !important;
        justify-content: center !important;
        flex-direction: row !important;
        min-width: auto !important;
        padding: 0 !important;
        flex: none !important;
    }
    .hero-stats .stat-number {
        font-size: 1.6rem !important;
        line-height: 1.2;
    }
    .hero-stats .stat-plus {
        font-size: 1.2rem !important;
        line-height: 1.2;
    }
    .hero-stats .stat-label {
        font-size: 0.7rem !important;
        margin-left: 0.1rem !important;
        width: auto !important;
        line-height: 1.2;
    }
    .hero-right {
        display: none !important;
    }
    .marquee-premium {
        display: none !important;
    }
    .theme-switch-wrapper {
        position: fixed !important;
        top: 12px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
        touch-action: manipulation;
    }
    .theme-switch-track {
        width: 48px !important;
        height: 26px !important;
        padding: 0 4px !important;
        border-radius: 30px !important;
        cursor: pointer;
        touch-action: manipulation;
    }
    .theme-switch-track i {
        font-size: 11px !important;
        pointer-events: none;
    }
    .theme-switch-thumb {
        width: 20px !important;
        height: 20px !important;
        left: 2px !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: left;
        backface-visibility: hidden;
    }
    [data-theme="dark"] .theme-switch-thumb {
        left: calc(100% - 22px) !important;
    }
    .floating-badge {
        display: none !important;
    }
    .hero-scroll-indicator {
        display: none !important;
    }
    .about-grid,
    .contact-wrapper-premium {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
    .skills-showcase {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
    }
    .section-title {
        font-size: 2rem !important;
        word-break: break-word;
    }
    .about-title {
        font-size: 1.8rem !important;
        word-break: break-word;
    }
    .contact-left h2 {
        font-size: 1.8rem !important;
        word-break: break-word;
    }
    .contact-wrapper-premium {
        padding: 0 !important;
    }
    .contact-form-premium {
        padding: 1.5rem !important;
        box-sizing: border-box;
        width: 100%;
    }
    .footer-content-premium {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
    }
    .footer-links {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 1.2rem !important;
    }
    .cursor-follower,
    .cursor-dot-premium {
        display: none !important;
    }
    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column !important;
        cursor: pointer !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-menu-btn span {
        width: 24px;
        height: 2px;
        background: var(--text-primary, #111111);
        margin: 3px 0;
        transition: 0.3s;
        border-radius: 2px;
        will-change: transform, opacity;
        backface-visibility: hidden;
    }
    @supports (scroll-behavior: smooth) {
        html {
            scroll-behavior: smooth;
        }
    }
    .work-grid-wrapper {
        padding: 0.5rem 1rem !important;
    }
    .work-grid-wrapper::before,
    .work-grid-wrapper::after {
        width: 40px !important;
    }
    .work-grid {
        gap: 1rem !important;
        animation-duration: 30s !important;
    }
    .work-card {
        flex: 0 0 240px !important;
        min-width: 200px !important;
        max-width: 280px !important;
    }
    .work-card-inner {
        padding: 1.2rem !important;
    }
    .work-image {
        height: 130px !important;
    }
    .work-info h3 {
        font-size: 1.1rem !important;
    }
    .work-info p {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem !important;
    }
    .section-title {
        font-size: 1.6rem !important;
    }
    .hero-badge-premium {
        font-size: 0.7rem !important;
        padding: 4px 12px !important;
    }
    .hero-actions .btn-primary-premium,
    .hero-actions .btn-ghost-premium {
        max-width: 100% !important;
        font-size: 0.9rem !important;
        padding: 12px 20px !important;
    }
    .btn-primary-premium,
    .btn-outline-premium {
        padding: 0.8rem 1.2rem !important;
        font-size: 0.85rem !important;
    }
    .contact-form-premium {
        padding: 1rem !important;
    }
    .form-group-premium input,
    .form-group-premium textarea {
        font-size: 0.85rem !important;
        padding: 12px 40px 6px 12px !important;
        box-sizing: border-box;
        width: 100%;
    }
    .form-group-premium label {
        font-size: 0.75rem !important;
        left: 12px !important;
        top: 12px !important;
    }
    .hero-stats {
        gap: 1rem !important;
    }
    .hero-stats .stat-number {
        font-size: 1.3rem !important;
    }
    .hero-stats .stat-plus {
        font-size: 1rem !important;
    }
    .hero-stats .stat-label {
        font-size: 0.6rem !important;
    }
    .theme-switch-wrapper {
        top: 8px !important;
    }
    .theme-switch-track {
        width: 42px !important;
        height: 22px !important;
    }
    .theme-switch-track i {
        font-size: 10px !important;
    }
    .theme-switch-thumb {
        width: 17px !important;
        height: 17px !important;
        left: 2px !important;
    }
    [data-theme="dark"] .theme-switch-thumb {
        left: calc(100% - 19px) !important;
    }
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    .container-premium {
        padding: 0 4% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .hero-title {
        font-size: 2.2rem !important;
    }
    .work-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .skills-showcase {
        grid-template-columns: 1fr 1fr !important;
    }
    .hero-stats {
        gap: 1.5rem !important;
    }
}

@media (min-width: 969px) {
    .bottom-nav {
        display: none !important;
    }
    #tsparticles {
        display: block !important;
        opacity: 1 !important;
        animation: particlesFadeIn 1.5s ease 0.5s forwards !important;
    }
    .navbar-premium {
        display: block !important;
    }
    body {
        padding-bottom: 0 !important;
        -webkit-overflow-scrolling: auto;
        overscroll-behavior: auto;
    }
    .cursor-follower,
    .cursor-dot-premium {
        display: block !important;
    }
    .touch-ripple::after {
        display: none !important;
    }
    .theme-switch-wrapper {
        position: fixed !important;
        top: 24px !important;
        right: 24px !important;
        left: auto !important;
        transform: none !important;
    }
    .theme-switch-track {
        width: 64px !important;
        height: 32px !important;
        padding: 0 8px !important;
    }
    .theme-switch-track i {
        font-size: 14px !important;
    }
    .theme-switch-thumb {
        width: 26px !important;
        height: 26px !important;
        left: 3px !important;
    }
    [data-theme="dark"] .theme-switch-thumb {
        left: calc(100% - 29px) !important;
    }
    .mobile-menu-btn {
        display: none !important;
    }
}

@supports not (backdrop-filter: blur(20px)) {
    .bottom-nav {
        background: var(--card-bg, #ffffff) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .navbar-premium {
        background: var(--card-bg, #ffffff) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

@supports not (display: flex) {
    .bottom-nav {
        display: block !important;
        text-align: center !important;
    }
    .bottom-nav .nav-item {
        display: inline-block !important;
        margin: 0 8px !important;
    }
    .hero-stats {
        display: block !important;
        text-align: center !important;
    }
    .hero-stats .stat-premium {
        display: inline-block !important;
        margin: 0 10px !important;
    }
}

@supports not (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: 6px !important;
    }
    body {
        padding-bottom: calc(var(--nav-height, 68px) + 20px) !important;
    }
}

* {
    -webkit-tap-highlight-color: transparent;
}

:focus {
    outline: 2px solid var(--accent, #000000);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--accent, #000000);
    outline-offset: 2px;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
a,
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

@media (max-width: 968px) {
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

@media print {
    .bottom-nav,
    .theme-switch-wrapper,
    .cursor-follower,
    .cursor-dot-premium,
    .hero-bg-premium,
    .hero-scroll-indicator {
        display: none !important;
    }
    body {
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
    .hero-premium {
        min-height: auto !important;
        padding: 40px 5% !important;
    }
}