html {
    font-size: 60% !important
}

body {
    font-family: 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f7f7;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark {
    background-color: #111827;
    color: #e5e7eb;
}

body.dark .bg-white {
    background-color: #1f2937 !important;
}

body.dark .text-gray-800 {
    color: #e5e7eb !important;
}

body.dark .text-gray-600 {
    color: #9ca3af !important;
}

body.dark .text-gray-700 {
    color: #d1d5db !important;
}

body.dark .border-gray-200 {
    border-color: #374151 !important;
}

body.dark .bg-gray-300 {
    background-color: #4b5563 !important;
}

body.dark .bg-gray-50 {
    background-color: #1f2937 !important;
}

body.dark .bg-gray-100 {
    background-color: #374151 !important;
}

body.dark .bg-gray-200 {
    background-color: #4b5563 !important;
}

body.dark .bg-gray-400 {
    background-color: #6b7280 !important;
}

body.dark .text-gray-400 {
    color: #9ca3af !important;
}

body.dark .text-gray-500 {
    color: #6b7280 !important;
}

body.dark .border-gray-100 {
    border-color: #374151 !important;
}

body.dark .shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important;
}

body.dark .hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2) !important;
}

body.dark .bg-black {
    background-color: #ffffff !important;
}

body.dark .text-black {
    color: #ffffff !important;
}

body.dark .hover\:text-gray-600:hover {
    color: #d1d5db !important;
}

body.dark .hover\:text-gray-800:hover {
    color: #f3f4f6 !important;
}

body.dark .border-t {
    border-color: #374151 !important;
}

.font-pixel {
    font-family: 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 600;
}

.blinking-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.vertical-nav {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
}

.nav-link {
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #888;
}

body.dark .nav-link:hover {
    color: #d1d5db;
}

.section {
    min-height: 100vh;
    padding: 4rem 2rem;
}

.section-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

body.dark .project-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

body.dark .blog-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.blog-content {
    line-height: 1.7;
}

.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #374151;
}

body.dark .blog-content h2 {
    color: #e5e7eb;
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: #374151;
}

body.dark .blog-content h3 {
    color: #e5e7eb;
}

.blog-content p {
    margin-bottom: 1rem;
}

.blog-content ul, .blog-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

body.dark .blog-content code {
    background-color: #374151;
    color: #e5e7eb;
}

.blog-content pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.blog-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.dark-mode-toggle {
    cursor: pointer;
    user-select: none;
}

.dark-mode-toggle:hover {
    opacity: 0.8;
}

.thumb-wrapper {
    position: relative;
}

.thumb-img {
    filter: blur(6px) brightness(0.8);
    transform: scale(1.05);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.thumb-wrapper:hover .thumb-img {
    filter: blur(3px) brightness(0.9);
}

.thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    background: rgba(0,0,0,0.25);
    letter-spacing: 0.02em;
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content { position: relative; z-index: 1; }

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    font-size: 2rem;
    line-height: 1;
    color: #ffffff;
    background: transparent;
    border: none;
    cursor: pointer;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
    text-align: center;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    font-weight: bold;
    z-index: 10001;
}
@media (max-width: 600px) {
    .modal-content {
        padding: 1rem;
    }
    #modal-img {
        max-width: 98vw;
        max-height: 60vh;
    }
}