/* Modern CSS for catcrafts.net - Dark Theme */ /* Base styles */ :root { --primary-color: #4895ef; --secondary-color: #4361ee; --accent-color: #f72585; --light-color: #f8f9fa; --dark-color: #121212; --dark-secondary: #1e1e1e; --text-color: #e0e0e0; --text-secondary: #a0a0a0; --success-color: #4cc9f0; --border-radius: 12px; --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: var(--text-color); background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); min-height: 100vh; display: flex; flex-direction: column; font-size: 16px; } /* Header and Navigation */ header { background: linear-gradient(135deg, var(--dark-secondary), #1a1a1a); color: white; padding: 1rem 0; box-shadow: var(--box-shadow); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.1); } .nav-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: center; } .logo { font-size: 1.8rem; font-weight: 700; text-decoration: none; color: white; display: flex; align-items: center; gap: 0.5rem; transition: var(--transition); } .logo:hover { opacity: 0.9; transform: scale(1.05); } nav ul { display: flex; list-style: none; gap: 1.5rem; } nav a { color: var(--text-color); text-decoration: none; font-weight: 500; padding: 0.5rem 1rem; border-radius: var(--border-radius); transition: var(--transition); position: relative; overflow: hidden; } nav a:hover, nav a.active { background-color: rgba(255, 255, 255, 0.1); } /* Add underline effect for active nav items */ nav a::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px; background-color: var(--accent-color); transition: var(--transition); transform: translateX(-50%); } nav a:hover::after, nav a.active::after { width: 80%; } /* Main Content */ main { flex: 1; max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; } .hero { text-align: center; padding: 3rem 2rem; margin-bottom: 2rem; background: linear-gradient(135deg, #1e1e1e, #2d2d2d); border-radius: var(--border-radius); box-shadow: var(--box-shadow); border: 1px solid rgba(255, 255, 255, 0.1); animation: fadeInUp 0.8s ease-out; } .hero h1 { font-size: 2.8rem; margin-bottom: 1rem; color: var(--primary-color); background: linear-gradient(to right, var(--primary-color), var(--accent-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .hero p { font-size: 1.3rem; max-width: 600px; margin: 0 auto 1.5rem; color: var(--text-color); font-weight: 300; } /* Blog Posts */ .blog-posts { display: grid; gap: 2rem; margin-top: 2rem; } .post { background: var(--dark-secondary); border-radius: var(--border-radius); padding: 2rem; box-shadow: var(--box-shadow); transition: var(--transition); border-left: 4px solid var(--primary-color); animation: fadeIn 0.6s ease-out forwards; opacity: 0; transform: translateY(20px); animation-fill-mode: forwards; position: relative; overflow: hidden; cursor: pointer; } .post:nth-child(1) { animation-delay: 0.1s; } .post:nth-child(2) { animation-delay: 0.2s; } .post:nth-child(3) { animation-delay: 0.3s; } .post:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); } .post-header { margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; } .post-title { font-size: 1.8rem; color: var(--primary-color); margin-bottom: 0.5rem; flex: 1; } .post-date { color: var(--accent-color); font-weight: 600; background-color: rgba(247, 37, 133, 0.2); padding: 0.5rem 1rem; border-radius: 20px; font-size: 0.9rem; white-space: nowrap; } .post-content { font-size: 1.1rem; line-height: 1.8; color: var(--text-color); animation: fadeIn 0.6s ease-out 0.2s forwards; opacity: 0; } .post-content p { margin-bottom: 1.2rem; } .post-content a { color: var(--primary-color); text-decoration: none; font-weight: 600; transition: var(--transition); } .post-content a:hover { text-decoration: underline; color: var(--accent-color); } .post-footer { margin-top: 1.5rem; text-align: right; } .post-content ul { margin-left: 1.5rem; margin-bottom: 1.2rem; } .post-content li { margin-bottom: 0.5rem; } /* Make entire blog post card clickable */ .post:hover { cursor: pointer; } /* Footer */ footer { background-color: var(--dark-color); color: var(--text-color); text-align: center; padding: 2rem; margin-top: auto; border-top: 1px solid rgba(255, 255, 255, 0.1); } .footer-content { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; } .footer-links a { color: var(--success-color); text-decoration: none; transition: var(--transition); display: inline-block; padding: 0.25rem 0.5rem; border-radius: 4px; } .footer-links a:hover { background-color: rgba(255, 255, 255, 0.1); text-decoration: underline; } /* Responsive Design */ @media (max-width: 768px) { .nav-container { flex-direction: column; gap: 1rem; } nav ul { gap: 0.5rem; flex-wrap: wrap; justify-content: center; } .hero h1 { font-size: 2.2rem; } .hero p { font-size: 1.1rem; } .post { padding: 1.5rem; } .post-title { font-size: 1.5rem; } .post-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; } .post-content { font-size: 1rem; } } @media (max-width: 480px) { main { margin: 1rem auto; } .hero { padding: 2rem 1rem; } .hero h1 { font-size: 1.8rem; } .post { padding: 1rem; } .post-title { font-size: 1.3rem; } .post-date { padding: 0.3rem 0.8rem; font-size: 0.8rem; } } /* Animations */ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } /* Button styles */ .btn { display: inline-block; padding: 0.75rem 1.5rem; background-color: var(--primary-color); color: white; text-decoration: none; border-radius: var(--border-radius); font-weight: 600; transition: var(--transition); border: none; cursor: pointer; text-align: center; box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3); } .btn:hover { background-color: var(--secondary-color); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4); } /* Code blocks styling */ .post-content pre { background-color: #1e1e1e; color: #f8f8f2; padding: 1rem; border-radius: var(--border-radius); overflow-x: auto; margin: 1rem 0; font-size: 0.9rem; line-height: 1.5; } .post-content code { background-color: #2d2d2d; padding: 0.2rem 0.4rem; border-radius: 4px; font-family: 'Courier New', monospace; font-size: 0.9em; color: #f8f8f2; } /* Card hover effect */ .post { position: relative; overflow: hidden; } .post::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent); transition: left 0.5s; } .post:hover::before { left: 100%; } /* Scrollbar styling */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: #1e1e1e; } ::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }