@tailwind base;
@tailwind components;
@tailwind utilities;

/**
 * Main Stylesheet - Letu Profile Theme (Source)
 *
 * @package dev-portfolio
 * @since 1.0.0
 */

/* Configure Tailwind via CSS variables and custom config */
@layer base {
    :root {
        --color-primary: #137fec;
        --color-bg: #f8f9fa;
        --color-text: #1a1a1a;
        --color-text-dim: #6b7280;
        --color-border: #e5e7eb;
        --color-terminal-bg: #ffffff;
        --color-terminal-border: #e5e7eb;
    }

    .dark {
        --color-bg: #000000;
        --color-text: #ffffff;
        --color-text-dim: #71717a;
        --color-border: #18181b;
        --color-terminal-bg: #0d0d0d;
        --color-terminal-border: #1a1a1a;
    }

    body {
        @apply font-sans bg-[var(--color-bg)] text-[var(--color-text)] antialiased transition-colors duration-300;
    }
}

/* ==========================================
   Typography & Base Styles
   ========================================== */

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.font-mono {
    font-family: 'Space Mono', 'Courier New', monospace;
}

/* ==========================================
   Custom Color Classes
   ========================================== */

.bg-primary {
    background-color: #137fec;
}

.text-primary {
    color: #137fec;
}

.border-primary {
    border-color: #137fec;
}

.bg-background-dark {
    background-color: #0a0a0a;
}

.bg-terminal-bg {
    background-color: #0d0d0d;
}

.border-terminal-border {
    border-color: #1a1a1a;
}

/* ==========================================
   Terminal Component Styles
   ========================================== */

.terminal-shadow {
    box-shadow: 0 0 40px rgba(19, 127, 236, 0.08);
}

.scanline {
    background: linear-gradient(to bottom, rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* ==========================================
   Scrollbar Styling
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #137fec;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) var(--color-bg);
}

/* ==========================================
   Button Components
   ========================================== */

.btn-primary {
    background-color: #137fec;
    color: white;
    padding: 0.5rem 2rem;
    border-radius: 0.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: rgba(19, 127, 236, 0.9);
    transform: translateY(-2px);
}

/* ==========================================
   Project & Blog Card Styles
   ========================================== */

.project-card {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: rgba(19, 127, 236, 0.5);
}

.blog-card {
    @apply bg-[var(--color-terminal-bg)] p-8 rounded-xl border border-[var(--color-border)] transition-all flex flex-col h-full;
}

.blog-card:hover {
    border-color: rgba(19, 127, 236, 0.5);
}

/* ==========================================
   Image Effects
   ========================================== */

.grayscale {
    filter: grayscale(100%);
}

.grayscale-0 {
    filter: grayscale(0%);
}

/* Group hover effect for images */
.group:hover .group-hover\:grayscale-0 {
    filter: grayscale(0%);
}

.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ==========================================
   Prose/Content Styling
   ========================================== */

.prose {
    max-width: 65ch;
}

.prose h2 {
    @apply text-3xl font-bold mt-12 mb-6 text-[var(--color-text)] tracking-tight;
}

.prose h3 {
    @apply text-2xl font-semibold mt-8 mb-4 text-[var(--color-text)];
}

.prose p {
    @apply text-lg mb-6 text-[var(--color-text-dim)] font-normal leading-relaxed;
}

.prose a {
    @apply text-primary no-underline hover:underline;
}

.prose ul,
.prose ol {
    @apply my-6 pl-6;
}

.prose li {
    @apply mb-2 text-[var(--color-text-dim)];
}

.prose code {
    @apply bg-[var(--color-terminal-bg)] border border-[var(--color-border)] px-1.5 py-0.5 rounded font-mono text-sm text-emerald-500;
}

.prose pre {
    @apply bg-[var(--color-terminal-bg)] p-6 rounded-lg overflow-x-auto my-8 border border-[var(--color-border)];
}

.prose pre code {
    @apply bg-transparent p-0 text-zinc-300;
}

/* ==========================================
   Form Styles
   ========================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
    @apply bg-transparent border-0 border-b border-[var(--color-border)] text-[var(--color-text)] py-3 w-full font-sans transition-all focus:outline-none focus:border-primary;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

::placeholder {
    @apply text-zinc-600;
}

/* ==========================================
   Utility Classes
   ========================================== */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* ==========================================
   Animation Classes
   ========================================== */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 40s linear infinite;
}

/* ==========================================
   Navigation Styles
   ========================================== */

.site-header {
    @apply sticky top-0 z-50;
}

.main-navigation a {
    @apply no-underline transition-colors duration-300;
}

.mobile-navigation {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Pagination Styles
   ========================================== */

.pagination {
    @apply flex gap-4 justify-center items-center py-16;
}

.pagination a,
.pagination span {
    @apply px-5 py-2 border border-zinc-800 rounded-lg text-zinc-500 no-underline font-bold text-[10px] uppercase tracking-widest transition-all hover:border-zinc-500 hover:text-white;
}

.pagination .current {
    @apply bg-zinc-900 border-zinc-800 text-white;
}

/* ==========================================
   Footer Styles
   ========================================== */

.site-footer a {
    @apply no-underline transition-colors duration-300;
}

.footer-menu a:hover {
    @apply text-primary;
}

/* ==========================================
   Responsive Utilities
   ========================================== */

@media (max-width: 768px) {
    .site-header {
        @apply px-6 py-4;
    }

    h1 {
        @apply text-5xl;
    }

    .terminal-shadow {
        box-shadow: 0 0 20px rgba(19, 127, 236, 0.05);
    }
}

/* ==========================================
   WordPress Core Compatibility
   ========================================== */

.screen-reader-text {
    @apply sr-only;
}

.screen-reader-text:focus {
    @apply not-sr-only bg-zinc-100 rounded shadow text-zinc-900 block text-sm font-bold h-auto left-1.5 p-4 no-underline top-1.5 w-auto z-[100000];
}

.alignleft {
    @apply float-left mr-6 mb-4;
}

.alignright {
    @apply float-right ml-6 mb-4;
}

.aligncenter {
    @apply block mx-auto;
}

.wp-caption {
    @apply max-w-full;
}

.wp-caption-text {
    @apply text-center text-sm text-zinc-500 mt-2;
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {

    .site-header,
    .site-footer,
    .floating-action,
    .mobile-menu-toggle {
        @apply hidden;
    }

    body {
        @apply bg-white text-black;
    }
}