@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #0f172a;
  --text-dim: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; color: var(--text); background: var(--bg); line-height: 1.7; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }

/* ─── Header ─── */
header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
header .inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
header .logo { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
header .logo-icon { font-size: 28px; }
header nav { display: flex; gap: 24px; }
header nav a { color: var(--text-dim); font-size: 14px; font-weight: 500; }
header nav a:hover { color: var(--primary); text-decoration: none; }
.lang-toggle { display: flex; gap: 4px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.lang-toggle a { padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.lang-toggle a.active { background: var(--primary); color: white; }

/* ─── Hero ─── */
.hero { padding: 80px 0; text-align: center; background: linear-gradient(135deg, var(--bg-alt), white); }
.hero h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; line-height: 1.1; margin-bottom: 16px; letter-spacing: -0.03em; }
.hero p { font-size: 18px; color: var(--text-dim); max-width: 600px; margin: 0 auto 32px; }
.hero .search-box { max-width: 560px; margin: 0 auto; position: relative; }
.hero .search-box input { width: 100%; padding: 16px 20px 16px 48px; font-size: 16px; border: 2px solid var(--border); border-radius: 14px; outline: none; transition: border-color 0.2s; }
.hero .search-box input:focus { border-color: var(--primary); }
.hero .search-box .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-dim); }

/* ─── Article Grid ─── */
.grid-section { padding: 64px 0; }
.grid-section h2 { font-size: 28px; font-weight: 800; margin-bottom: 32px; letter-spacing: -0.02em; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.article-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all 0.3s; }
.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); border-color: var(--primary-light); }
.article-card .thumb { aspect-ratio: 16/9; background: var(--bg-alt); overflow: hidden; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.article-card:hover .thumb img { transform: scale(1.05); }
.article-card .body { padding: 20px; }
.article-card .category { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); margin-bottom: 8px; }
.article-card h3 { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.article-card .excerpt { font-size: 14px; color: var(--text-dim); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card .meta { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-dim); }

/* ─── Article Page ─── */
.article { padding: 48px 0 80px; }
.article h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; line-height: 1.15; margin-bottom: 16px; letter-spacing: -0.02em; }
.article .article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-dim); margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article-content { font-size: 17px; line-height: 1.8; }
.article-content h2 { font-size: 24px; font-weight: 800; margin: 40px 0 16px; }
.article-content h3 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.article-content p { margin-bottom: 20px; }
.article-content ul, .article-content ol { margin: 16px 0 24px 24px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote { border-left: 4px solid var(--primary); padding: 16px 24px; background: var(--bg-alt); border-radius: 0 12px 12px 0; margin: 24px 0; font-style: italic; }
.article-content table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.article-content th, .article-content td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.article-content th { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; background: var(--bg-alt); }
.article-content img { border-radius: 12px; margin: 24px 0; }

/* ─── Sidebar ─── */
.content-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; }
@media (max-width: 960px) { .content-layout { grid-template-columns: 1fr; } }
.sidebar .widget { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.sidebar .widget h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar .widget ul { list-style: none; }
.sidebar .widget ul li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.sidebar .widget ul li:last-child { border-bottom: none; }
.sidebar .widget ul li a { font-size: 14px; color: var(--text); font-weight: 500; }

/* ─── Footer ─── */
footer { background: var(--text); color: white; padding: 48px 0 24px; }
footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
@media (max-width: 768px) { footer .footer-grid { grid-template-columns: 1fr 1fr; } }
footer h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; opacity: 0.5; }
footer p, footer a { font-size: 14px; color: rgba(255,255,255,0.7); }
footer a:hover { color: white; }
footer .copyright { text-align: center; font-size: 12px; color: rgba(255,255,255,0.3); padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); }

/* ─── Chat Widget Prompt ─── */
.chat-prompt { position: fixed; bottom: 24px; right: 24px; background: var(--primary); color: white; padding: 14px 20px; border-radius: 50px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 20px rgba(79,70,229,0.4); z-index: 1000; display: flex; align-items: center; gap: 8px; transition: transform 0.2s; }
.chat-prompt:hover { transform: scale(1.05); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 28px; }
  header nav { display: none; }
  .article-grid { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
}
