@tailwind base; @tailwind components; @tailwind utilities; /* Dark theme (default) - CSS custom properties */ :root { --bg: #060b10; --bg2: #0c1520; --bg2-rgb: 12, 21, 32; --surface: #101e2d; --surface-rgb: 16, 30, 45; --border: #182840; --accent: #a855f7; --accent2: #00ff88; --accent-glow: rgba(168, 85, 247, 0.12); --text: #c4d6e8; --text-dim: #7a9bb8; --muted: #304860; /* Article type colors - dark */ --type-tech: #a855f7; --type-life: #f59e0b; --type-quote: #00ff88; --type-link: #38bdf8; --type-photo: #ec4899; } /* Light theme overrides */ html.theme-light { --bg: #ffffff; --bg2: #f8f9fa; --bg2-rgb: 248, 249, 250; --surface: #f0f3f7; --surface-rgb: 240, 243, 247; --border: #d9dfe8; --accent: #9333ea; --accent2: #10b981; --accent-glow: rgba(147, 51, 234, 0.1); --text: #1f2937; --text-dim: #374151; --muted: #d1d5db; /* Article type colors - light */ --type-tech: #7c3aed; --type-life: #d97706; --type-quote: #008f5a; --type-link: #0284c7; --type-photo: #be185d; } /* No-JS fallback: prefers-color-scheme light */ @media (prefers-color-scheme: light) { html:not(.theme-dark) { --bg: #ffffff; --bg2: #f8f9fa; --bg2-rgb: 248, 249, 250; --surface: #f0f3f7; --surface-rgb: 240, 243, 247; --border: #d9dfe8; --accent: #9333ea; --accent2: #10b981; --accent-glow: rgba(147, 51, 234, 0.1); --text: #1f2937; --text-dim: #374151; --muted: #d1d5db; --type-tech: #7c3aed; --type-life: #d97706; --type-quote: #008f5a; --type-link: #0284c7; --type-photo: #be185d; } } @layer base { body { @apply bg-bg text-text font-body; } h1, h2, h3, h4, h5, h6 { @apply font-bold; font-family: 'Oxanium', monospace; } h1 { @apply text-3xl md:text-4xl; } h2 { @apply text-2xl md:text-3xl; } h3 { @apply text-xl md:text-2xl; } a { @apply text-accent hover:opacity-80 transition-opacity; } code { @apply font-mono bg-surface border border-border px-1.5 py-0.5 rounded text-accent2; } pre { background-color: rgba(var(--surface-rgb), 0.8); @apply p-4 rounded border border-border overflow-x-auto; } pre code { @apply bg-transparent border-0 p-0 text-text; } *:focus-visible { @apply ring-2 ring-accent ring-offset-2; ring-offset-color: var(--bg); } button, input, textarea, select { @apply transition-colors duration-200; } } @layer components { .container { @apply max-w-4xl mx-auto; } /* Background utilities */ .bg-bg { background-color: var(--bg); } .bg-bg2 { background-color: var(--bg2); } .bg-surface { background-color: var(--surface); } /* Border utilities */ .border-border { border-color: var(--border); } /* Text color utilities */ .text-accent { color: var(--accent); } .text-accent2 { color: var(--accent2); } .text-text { color: var(--text); } .text-text-dim { color: var(--text-dim); } /* Additional semantic utilities */ .text-muted { color: var(--muted); } .bg-muted { background-color: var(--muted); } /* Glow effect utility */ .glow-accent { box-shadow: 0 0 20px var(--accent-glow); } /* Frosted glass bar (header/footer) */ .frosted-bar { background-color: rgba(var(--bg2-rgb), 0.75); backdrop-filter: blur(10px); box-shadow: 0 0 20px var(--accent-glow); /* border applied via utility classes in templates */ } /* Border utilities for frosted-bar component */ .frosted-bar.border-b, .frosted-bar.border-t { border-color: var(--border); } /* Button component styles */ .btn { @apply inline-flex items-center justify-center px-4 py-2 rounded font-bold transition-all duration-200 cursor-pointer; background-color: var(--accent); color: #ffffff; border: none; outline: none; } .btn:hover:not(:disabled) { opacity: 0.85; transform: translateY(-1px); } .btn:focus-visible { @apply ring-2 ring-offset-2; ring-color: var(--accent); ring-offset-color: var(--bg); } .btn:active:not(:disabled) { transform: translateY(0); opacity: 0.75; } .btn:disabled { opacity: 0.5; cursor: not-allowed; } /* Button variants */ .btn-primary { background-color: var(--accent); color: #ffffff; } .btn-primary:hover:not(:disabled) { background-color: var(--accent); } .btn-secondary { background-color: var(--accent2); color: var(--bg); font-weight: 600; } .btn-secondary:hover:not(:disabled) { background-color: var(--accent2); } .btn-outline { background-color: transparent; color: var(--accent); border: 2px solid var(--accent); } .btn-outline:hover:not(:disabled) { background-color: var(--accent); color: #ffffff; } /* Button sizes */ .btn-sm { @apply px-3 py-1 text-sm; } .btn-lg { @apply px-6 py-3 text-lg; } /* Icon button (for icons without text) */ .btn-icon { @apply p-2 rounded-full inline-flex items-center justify-center; width: 40px; height: 40px; } .btn-icon svg { width: 20px; height: 20px; } /* Badge base style */ .badge { @apply inline-flex items-center px-2.5 py-1 rounded text-sm font-mono font-semibold whitespace-nowrap transition-all duration-200; border: 1px solid; } /* Article type badge styles */ .badge-tech { color: var(--type-tech); background-color: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.3); } .badge-tech:hover { background-color: rgba(168, 85, 247, 0.2); } .badge-life { color: var(--type-life); background-color: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); } .badge-life:hover { background-color: rgba(245, 158, 11, 0.2); } .badge-quote { color: var(--type-quote); background-color: rgba(0, 255, 136, 0.1); border-color: rgba(0, 255, 136, 0.3); } .badge-quote:hover { background-color: rgba(0, 255, 136, 0.2); } .badge-link { color: var(--type-link); background-color: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.3); } .badge-link:hover { background-color: rgba(56, 189, 248, 0.2); } .badge-photo { color: var(--type-photo); background-color: rgba(236, 72, 153, 0.1); border-color: rgba(236, 72, 153, 0.3); } .badge-photo:hover { background-color: rgba(236, 72, 153, 0.2); } /* Legacy type-* classes for compatibility (with badge styling) */ .type-tech { color: var(--type-tech); background-color: rgba(168, 85, 247, 0.1); } .type-life { color: var(--type-life); background-color: rgba(245, 158, 11, 0.1); } .type-quote { color: var(--type-quote); background-color: rgba(0, 255, 136, 0.1); } .type-link { color: var(--type-link); background-color: rgba(56, 189, 248, 0.1); } .type-photo { color: var(--type-photo); background-color: rgba(236, 72, 153, 0.1); } /* Card component */ .card { @apply border border-border rounded-lg overflow-hidden transition-all duration-200; box-shadow: 0 0 20px var(--accent-glow); } .card:hover { transform: translateY(-2px); box-shadow: 0 0 30px var(--accent-glow); } .card-image { @apply aspect-video object-cover w-full; } .card-body { @apply p-5 md:p-6 space-y-3; } .card-title { @apply text-xl font-semibold; } .card-excerpt { @apply text-text-dim text-sm line-clamp-3; } .card-footer { @apply flex items-center justify-between gap-4; } /* Header navigation styling */ .header { @apply fixed top-0 left-0 right-0 z-40; } .header-nav { @apply hidden md:flex items-center gap-6; } .nav-link { @apply text-text hover:text-accent transition-colors; } .header-actions { @apply flex items-center gap-4; } /* Mobile menu overlay */ .menu-overlay { @apply fixed inset-0 bg-bg z-40 opacity-0 invisible transition-all duration-300; } .menu-overlay.active { @apply opacity-100 visible; } .menu-nav { @apply flex flex-col gap-4 p-6 text-lg font-semibold; } .menu-nav a { @apply text-text hover:text-accent transition-colors; } /* Breadcrumb navigation */ .breadcrumb { @apply flex items-center gap-2 text-sm text-text-dim; } .breadcrumb a { @apply hover:text-accent transition-colors; } .breadcrumb-separator { @apply opacity-50; } /* Article metadata styling (with icons) */ .article-meta { @apply flex flex-wrap items-center gap-4 text-sm text-text-dim; } .article-meta-item { @apply flex items-center gap-2; } .article-meta-item i { @apply w-4 h-4 flex-shrink-0; color: var(--accent2); } /* Hero typography with fluid sizing */ .hero-title { font-size: clamp(2rem, 5vw + 1rem, 4.5rem); } .section-title { font-size: clamp(1.5rem, 3vw + 0.5rem, 2.5rem); } } /* Prose overrides for light theme */ html.theme-light .prose, html.theme-light .prose-invert { color: var(--text); } html.theme-light .prose a, html.theme-light .prose-invert a { color: var(--accent); } html.theme-light .prose strong, html.theme-light .prose-invert strong { color: var(--text); } html.theme-light .prose code, html.theme-light .prose-invert code { color: var(--accent2); } html.theme-light .prose pre, html.theme-light .prose-invert pre { background-color: var(--surface); color: var(--text); } html.theme-light .prose h1, html.theme-light .prose h2, html.theme-light .prose h3, html.theme-light .prose h4, html.theme-light .prose h5, html.theme-light .prose h6, html.theme-light .prose-invert h1, html.theme-light .prose-invert h2, html.theme-light .prose-invert h3, html.theme-light .prose-invert h4, html.theme-light .prose-invert h5, html.theme-light .prose-invert h6 { color: var(--text); } html.theme-light .prose blockquote, html.theme-light .prose-invert blockquote { color: var(--text); border-left-color: var(--accent); } /* Responsive container utilities - mobile-first */ .container { @apply max-w-full px-4; } @media (min-width: 768px) { .container { @apply max-w-4xl px-6; } } @media (min-width: 1060px) { .container { @apply max-w-5xl px-8; } } /* Respect user's motion preferences */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } /* Matrix rain canvas background */ #matrix-rain { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; } /* Dark theme: 13% opacity (inner pages) */ html.theme-dark #matrix-rain { opacity: 0.13; } /* Light theme: 18% opacity (inner pages) */ html.theme-light #matrix-rain { opacity: 0.18; } /* Homepage: more prominent background */ html.theme-dark body[data-page-kind="home"] #matrix-rain { opacity: 0.28; } html.theme-light body[data-page-kind="home"] #matrix-rain { opacity: 0.35; } /* Reduced motion: hide canvas entirely */ @media (prefers-reduced-motion: reduce) { #matrix-rain { display: none; } } /* Content grid background — blocks rain under text, visible in gutters (single pages only) */ .grid.md\:grid-cols-3.gap-8.max-w-7xl.content-grid { position: relative; z-index: 10; background-color: var(--bg); padding: 2rem; border: 1px solid var(--border); box-shadow: 0 0 20px var(--accent-glow); } /* Article list items — soft glow effect */ article.border.border-border\/30.rounded-lg.overflow-hidden.group.bg-bg { border-color: var(--border); box-shadow: 0 0 20px var(--accent-glow); }