:root {
    --bg: #0e0e10;
    --surface: #16161a;
    --surface-2: #1c1c21;
    --line: #26262c;
    --line-strong: #34343c;
    --ink: #ececf1;
    --muted: #8d8d98;
    --faint: #5f5f69;
    --accent: #f0a35e;
    --radius: 10px;
    --sans: "Merriweather", Georgia, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 16px; top: 16px; padding: 6px 10px; background: var(--surface-2); color: var(--ink); border-radius: 6px; z-index: 10; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Header */
header { border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 50%; background: #fff; }
nav ul { display: flex; gap: 4px; }
nav a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--muted); font-size: 14px; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); text-decoration: none; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero h1 { margin: 0 0 14px; font-size: clamp(2rem, 6vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.hero h1 span { color: var(--accent); }
.hero p { margin: 0; max-width: 560px; color: var(--muted); font-size: 16.5px; }
.hero p strong { color: var(--ink); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 8px;
    border: 1px solid var(--line-strong); background: var(--surface);
    color: var(--ink); font-size: 14px; font-weight: 500;
    transition: border-color .15s, background-color .15s;
}
.btn:hover { text-decoration: none; border-color: var(--faint); background: var(--surface-2); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { background: #fff; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

/* Sections */
section { padding: 32px 0; border-top: 1px solid var(--line); }
section h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
section .lede { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

/* Project cards */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card {
    position: relative;
    display: flex; flex-direction: column; gap: 10px;
    height: 100%; padding: 16px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); color: var(--ink);
    transition: border-color .15s, background-color .15s, transform .15s;
}
.card:hover { text-decoration: none; border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-head img { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.card-title { font-size: 14px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title .owner { color: var(--muted); }
.card-title b { font-weight: 600; }
.card .ext { position: absolute; top: 14px; right: 14px; width: 14px; height: 14px; fill: var(--faint); }
.card:hover .ext { fill: var(--muted); }
.card p { margin: 0; flex: 1; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12.5px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.meta svg { width: 13px; height: 13px; fill: currentColor; }

/* About / skills */
.about p { margin: 0 0 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 12.5px var(--mono); color: var(--ink); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--faint); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer a { color: var(--muted); }
footer ul { display: flex; gap: 16px; }

@media (max-width: 600px) {
    .hero { padding: 44px 0 32px; }
    .projects { grid-template-columns: minmax(0, 1fr); }
    nav a { padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

/* Featured projects (home) */
.featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.featured .card { padding: 20px; }
.featured .card-head img { width: 44px; height: 44px; border-radius: 11px; }
.featured .card-title { font-size: 16px; }
.more-link { display: inline-block; margin-top: 16px; font-size: 14px; }

/* Recent GitHub activity (home) */
.activity li { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.activity li:last-child { border-bottom: 0; }
.activity time { flex: none; width: 64px; color: var(--faint); font: 12px var(--mono); }
.activity .what { min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
.activity .what a { color: var(--ink); }
.activity .msg { display: block; color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Page title (projects) */
.page-head { padding: 56px 0 28px; }
.page-head h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 5vw, 2.3rem); letter-spacing: -0.02em; line-height: 1.15; }
.page-head p { margin: 0; color: var(--muted); }

@media (max-width: 600px) { .featured { grid-template-columns: minmax(0, 1fr); } }
