You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

267 lines
6.9 KiB
CSS

:root {
--bg: #fafbfc;
--surface: #ffffff;
--text: #1a202c;
--text-soft: #4a5568;
--muted: #718096;
--border: #e2e8f0;
--accent: #6366f1;
--accent-2: #8b5cf6;
--accent-soft: #eef2ff;
--code-bg: #1e1e2e;
--shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
--shadow-lg: 0 4px 12px rgba(99,102,241,.15), 0 20px 48px rgba(99,102,241,.12);
--radius: 16px;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0f1117;
--surface: #171923;
--text: #f7fafc;
--text-soft: #cbd5e0;
--muted: #a0aec0;
--border: #2d3748;
--accent: #818cf8;
--accent-2: #a78bfa;
--accent-soft: #1e1b4b;
--code-bg: #0d0d16;
--shadow: 0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
--shadow-lg: 0 4px 12px rgba(0,0,0,.4), 0 20px 48px rgba(0,0,0,.35);
}
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
font-family: 'Inter', -apple-system, system-ui, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.7;
margin: 0;
-webkit-font-smoothing: antialiased;
font-feature-settings: "cv02","cv03","cv04","cv11";
}
/* ---- Top bar ---- */
.topbar {
position: sticky;
top: 0;
z-index: 50;
backdrop-filter: saturate(180%) blur(12px);
background: color-mix(in srgb, var(--surface) 80%, transparent);
border-bottom: 1px solid var(--border);
}
.topbar-inner {
max-width: 1080px;
margin: 0 auto;
padding: .9rem 1.5rem;
display: flex;
align-items: center;
gap: .6rem;
}
.brand {
font-weight: 800;
font-size: 1.05rem;
color: var(--text);
text-decoration: none;
display: flex;
align-items: center;
gap: .55rem;
letter-spacing: -.01em;
}
.brand .logo {
width: 30px; height: 30px;
display: grid; place-items: center;
border-radius: 9px;
background: linear-gradient(135deg, var(--accent), var(--accent-2));
color: #fff; font-size: .95rem;
box-shadow: var(--shadow-lg);
}
.nav-links { margin-left: auto; display: flex; gap: 1.4rem; }
.nav-links a {
color: var(--text-soft);
text-decoration: none;
font-weight: 500;
font-size: .92rem;
transition: color .15s;
}
.nav-links a:hover { color: var(--accent); }
/* ---- Layout ---- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
main { padding: 3rem 0 5rem; }
/* ---- Hero ---- */
.hero {
text-align: center;
padding: 4.5rem 1.5rem 3.5rem;
position: relative;
overflow: hidden;
}
.hero::before {
content: "";
position: absolute; inset: 0;
background:
radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
pointer-events: none;
}
.hero .eyebrow {
display: inline-block;
font-size: .78rem;
font-weight: 600;
letter-spacing: .08em;
text-transform: uppercase;
color: var(--accent);
background: var(--accent-soft);
padding: .35rem .8rem;
border-radius: 999px;
margin-bottom: 1.2rem;
}
.hero h1 {
font-size: clamp(2.2rem, 5vw, 3.4rem);
line-height: 1.1;
letter-spacing: -.03em;
margin: 0 0 1rem;
background: linear-gradient(135deg, var(--text), var(--accent));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.15rem; color: var(--text-soft); max-width: 640px; margin: 0 auto; }
/* ---- Cards ---- */
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 1.2rem;
margin: 2.5rem 0;
}
.card {
display: block;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1.6rem;
text-decoration: none;
color: var(--text);
box-shadow: var(--shadow);
transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-lg);
border-color: var(--accent);
}
.card .icon {
width: 44px; height: 44px;
display: grid; place-items: center;
border-radius: 12px;
background: var(--accent-soft);
color: var(--accent);
font-size: 1.3rem;
margin-bottom: 1rem;
}
.card h3 { margin: 0 0 .4rem; font-size: 1.15rem; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.card .arrow { color: var(--accent); font-weight: 700; margin-top: .8rem; display: inline-block; }
/* ---- Article ---- */
.article {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 3rem clamp(1.5rem, 5vw, 3.5rem);
box-shadow: var(--shadow);
max-width: 820px;
margin: 0 auto;
}
.article h1 {
font-size: 2.4rem;
letter-spacing: -.025em;
margin: 0 0 1.5rem;
line-height: 1.15;
}
.article h2 {
font-size: 1.6rem;
letter-spacing: -.02em;
margin: 2.5rem 0 1rem;
padding-top: 1.5rem;
border-top: 1px solid var(--border);
}
.article h3 { font-size: 1.25rem; margin: 1.8rem 0 .8rem; }
.article p, .article li { color: var(--text-soft); }
.article a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s; }
.article a:hover { border-bottom-color: var(--accent); }
/* ---- Code ---- */
code {
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: .87em;
background: var(--accent-soft);
color: var(--accent);
padding: .15em .4em;
border-radius: 6px;
}
pre {
background: var(--code-bg) !important;
border: 1px solid var(--border);
border-radius: 12px;
padding: 1.25rem 1.4rem !important;
overflow-x: auto;
box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
position: relative;
}
pre code {
background: none;
color: #e2e8f0;
padding: 0;
font-size: .88rem;
line-height: 1.6;
}
/* ---- Tables ---- */
table {
border-collapse: collapse;
width: 100%;
margin: 1.5rem 0;
font-size: .92rem;
border-radius: 12px;
overflow: hidden;
box-shadow: var(--shadow);
}
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--accent-soft); color: var(--text); font-weight: 600; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
/* ---- Blockquote ---- */
blockquote {
border-left: 4px solid var(--accent);
background: var(--accent-soft);
margin: 1.5rem 0;
padding: 1rem 1.4rem;
border-radius: 0 10px 10px 0;
color: var(--text-soft);
}
blockquote p { margin: 0; }
.back-link {
display: inline-flex; align-items: center; gap: .4rem;
margin-top: 2.5rem;
color: var(--accent);
text-decoration: none;
font-weight: 600;
}
/* ---- Footer ---- */
footer {
border-top: 1px solid var(--border);
padding: 2rem 0;
text-align: center;
color: var(--muted);
font-size: .88rem;
}