/* Material Symbols Configuration */
.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* Grid Lines */
.grid-line-vertical {
    width: 1px;
    height: 100%;
    background-color: #4c4546;
    position: absolute;
}

.grid-line-horizontal {
    height: 1px;
    background-color: #4c4546;
    width: 100%;
}

/* Grid Background for 404 */
.grid-background {
    background-image: 
        linear-gradient(to right, #262626 1px, transparent 1px),
        linear-gradient(to bottom, #262626 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Article Image Hover Effect */
.article-hover:hover .article-image {
    filter: grayscale(0%);
    transform: scale(1.02);
}

.article-image {
    filter: grayscale(100%);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glitch Text Effect for 404 */
.glitch-text:hover {
    text-shadow: 2px 0 #ffb59a, -2px 0 #c6c6c6;
}

/* Form Focus States */
input:focus,
textarea:focus {
    outline: none;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

/* Grainy Overlay Effect */
.grainy-overlay {
    position: relative;
}

.grainy-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url(https://lh3.googleusercontent.com/aida-public/AB6AXuCrmBawQWdDAfd27l1sMz6NnnC8hJikH6jPqDFTRj2mgl_kp-YDKjNL45AGeTpyR_UcZ8Uk7BWS2BCBPW1Raqf4evYU2oEut36ZrSNlDB0DBwag8Btk0vdv51g0VwNJvwoMYNjaumMzKjPCW7Neog3NyLvNayKIW91xUm84tJZa6VZu1Ngo3OAMCC_u7KTGXL-rcYG9_hXV1Tk8ktxRCXGP3O7-E3K2KqyXxylAg5HzCzZOxjOoHCPpMD_lGFAm4mgD3EBpXdNtKmU);
    opacity: 0.15;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #131313;
}

::-webkit-scrollbar-thumb {
    background: #4c4546;
}

.mobile-nav-panel {
    display: none;
}

.mobile-nav-panel.is-open {
    display: grid;
}

@media (min-width: 768px) {
    .mobile-nav-panel.is-open {
        display: none;
    }
}

@media (max-width: 767px) {
    body {
        cursor: auto;
    }

    body::after,
    .grainy-overlay::after {
        position: fixed;
    }

    nav,
    header {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    nav > .font-headline-lg,
    header .font-headline-lg {
        font-size: clamp(24px, 8vw, 34px) !important;
        line-height: 1 !important;
        max-width: calc(100vw - 88px);
        letter-spacing: 0 !important;
        overflow-wrap: anywhere;
    }

    header nav > a[download] {
        display: none !important;
    }

    body > header > .md\:flex {
        display: none !important;
    }

    .mobile-menu-button {
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #4c4546;
        background: #131313;
        color: #e2e2e2;
    }

    .mobile-nav-panel {
        position: fixed;
        top: 61px;
        left: 0;
        right: 0;
        z-index: 49;
        gap: 1px;
        padding: 1px;
        border-bottom: 1px solid #4c4546;
        background: #4c4546;
    }

    .mobile-nav-panel a {
        display: flex;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        background: #131313;
        color: #e2e2e2;
        font-family: "JetBrains Mono", monospace;
        font-size: 12px;
        line-height: 16px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    main {
        width: 100%;
    }

    .text-headline-xl,
    .md\:text-\[180px\] {
        font-size: clamp(42px, 16vw, 64px) !important;
        line-height: 0.95 !important;
        letter-spacing: 0 !important;
        overflow-wrap: anywhere;
    }

    .text-headline-lg,
    .text-headline-lg-mobile {
        font-size: clamp(26px, 9vw, 34px) !important;
        line-height: 1.05 !important;
        letter-spacing: 0 !important;
        overflow-wrap: anywhere;
    }

    .text-code-snippet,
    .font-code-snippet {
        overflow-wrap: anywhere;
    }

    .p-margin-desktop,
    .md\:p-margin-desktop {
        padding: 16px !important;
    }

    .px-margin-desktop,
    .md\:px-margin-desktop {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .py-margin-mobile {
        padding-top: 16px !important;
        padding-bottom: 16px !important;
    }

    .min-h-\[40vh\] {
        min-height: 28vh !important;
    }

    .border-r,
    .md\:border-r {
        border-right-width: 0 !important;
    }

    section .sticky {
        position: static !important;
    }

    section h2 {
        margin-bottom: 0 !important;
    }

    .aspect-square {
        aspect-ratio: 4 / 3 !important;
    }

    .absolute.bottom-0.left-0 {
        max-width: calc(100% - 24px);
        padding: 12px !important;
    }

    .flex.items-center.gap-4,
    .flex.gap-4,
    .flex.gap-8 {
        flex-wrap: wrap;
    }

    .grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    .md\:col-span-6.pr-10 {
        padding-right: 0 !important;
    }

    article {
        row-gap: 20px;
    }

    .mb-20 {
        margin-bottom: 40px !important;
    }

    .mt-20,
    .mt-24 {
        margin-top: 40px !important;
    }

    .pb-20 {
        padding-bottom: 32px !important;
    }

    button,
    a {
        min-height: 44px;
    }

    a.inline-block,
    button,
    .group.relative.inline-flex {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    form {
        gap: 28px !important;
    }

    input,
    textarea,
    button {
        font-size: 16px !important;
    }

    .h-\[400px\] {
        height: 280px !important;
    }

    .flex-grow.grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    footer,
    footer > div {
        padding-left: 16px !important;
        padding-right: 16px !important;
        align-items: flex-start !important;
        text-align: left;
    }

    footer .flex {
        gap: 16px !important;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
