/* Font imports for logo and headings */
@import url('https://fonts.googleapis.com/css2?family=Audiowide&family=Montserrat:wght@500;600;700&display=swap');

/* Gallery Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.5s ease, filter 0.3s ease;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    animation: scaleIn 0.3s ease;
}

.modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Category Button Styles */
.category-btn {
    transition: all 0.3s ease;
    background: rgba(31, 41, 55, 0.8);
    color: #e5e7eb;
    border: 1px solid rgba(75, 85, 99, 0.5);
}

.category-btn:hover {
    background: rgba(55, 65, 81, 0.9);
    border-color: rgba(99, 102, 241, 0.5);
    color: white;
}

.category-btn.active {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    border-color: rgba(99, 102, 241, 0.6);
}

/* Masonry Grid */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Typewriter Effect */
.typewriter-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2rem;
    background-color: #4f46e5;
    animation: blink 1s infinite;
}

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

/* Markdown Content Styles */
.markdown-content {
    line-height: 1.8;
}

/* Logo badge and site mark */
.logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 2px 8px; /* fonta göre yanlarda daha dengeli boşluk */
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-weight: 800;
    font-family: "Audiowide", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    letter-spacing: 0.6px;
    font-size: 1.02rem;
    border-top-left-radius: 4px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 6px 20px rgba(79,70,229,0.35);
}

.site-mark {
    font-size: 1.08rem;
    padding: 0.35rem 0.75rem;
    border-top-left-radius: 6px;
    border-bottom-right-radius: 6px;
    background: linear-gradient(90deg, rgba(49,46,129,0.6), rgba(196,181,253,0.25));
    font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.markdown-content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.markdown-content h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #a5b4fc;
}

.markdown-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #c4b5fd;
}

.markdown-content p {
    margin-bottom: 1.25rem;
    color: #d1d5db;
}

.markdown-content ul, .markdown-content ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
    color: #d1d5db;
}

.markdown-content code {
    background-color: rgba(99, 102, 241, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875em;
    color: #c7d2fe;
}

.markdown-content pre {
    background-color: rgba(31, 41, 55, 0.8);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    border-left: 4px solid #6366f1;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
    color: #e5e7eb;
}

.markdown-content blockquote {
    border-left: 4px solid #6366f1;
    padding-left: 1rem;
    margin-bottom: 1.25rem;
    font-style: italic;
    color: #9ca3af;
}

.markdown-content a {
    color: #818cf8;
    text-decoration: none;
}

.markdown-content a:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

.markdown-content strong {
    font-weight: 600;
    color: #f3f4f6;
}

.markdown-content em {
    font-style: italic;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
}

.markdown-content th, .markdown-content td {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.markdown-content th {
    background-color: rgba(99, 102, 241, 0.2);
    font-weight: 600;
}

/* Loader Overlay */
.app-loader {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Dark, matte gradient inspired by Palestinian flag colors */
    background: radial-gradient(1200px 800px at 20% 20%, rgba(220, 38, 38, 0.089), transparent 60%),
                radial-gradient(1000px 700px at 80% 80%, rgba(18, 155, 109, 0.144), transparent 55%),
                linear-gradient(135deg, #0b0b0c 0%, #272147 60%, #0c0d0f 100%);
    transition: opacity 300ms ease, visibility 300ms ease;
}

.app-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Minimal geometric loader: nested rotating squares */
.loader-shape {
    position: relative;
    width: 56px;
    height: 56px;
}

.loader-shape .sq {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(229, 231, 235, 0.35); /* nötr açık gri */
    border-radius: 4px;
    animation: spin 1.2s linear infinite;
}

.loader-shape .sq.s2 {
    inset: 8px;
    border-color: rgba(220,38,38,0.35); /* kırmızı (mat) */
    animation-duration: 1.6s;
    animation-direction: reverse;
}

.loader-shape .sq.s3 {
    inset: 16px;
    border-color: rgba(16,185,129,0.35); /* yeşil (mat) */
    animation-duration: 2s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
