:root {
    --bg: #18181b;
    --surface: #222226;
    --border: #3f3f46;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --accent: #3ea6ff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4rem; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }
a:hover { text-decoration: none; }

h1, h2, h3 { line-height: 1.25; }
h2 { margin: 0 0 1rem; font-size: 1.5rem; }
h3 { margin: 0; font-size: 1.15rem; }

.meta { margin: .2rem 0 .6rem; color: var(--muted); font-size: .9rem; }

/* Top bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    padding: .8rem max(16px, calc((100% - 820px) / 2));
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.topbar a { color: var(--text); text-decoration: none; }
.topbar a:hover { color: var(--accent); }
.brand { font-weight: 600; }
.links { display: flex; flex-wrap: wrap; gap: 1.2rem; }

main, footer { max-width: 820px; margin: 0 auto; padding: 0 16px; }
section { padding: 2.5rem 0 1rem; }

/* Hero */
.hero { display: flex; align-items: center; gap: 2rem; padding: 3rem 0 1rem; }
.hero img { flex: none; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); }
.hero h1 { margin: 0; font-size: 2.4rem; }
.hero p { margin: .4rem 0; }
.role { color: var(--accent); font-size: 1.2rem; font-weight: 600; }
.contact, .actions { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }

/* Work cards */
.card {
    margin-bottom: 1.2rem;
    padding: 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.card p, .card ul { margin: .5rem 0; }
.card ul { padding-left: 1.2rem; }

figure { margin: 1rem 0 0; }
figcaption { margin-top: .5rem; color: var(--muted); font-size: .85rem; }
.flow { display: flex; align-items: center; gap: 1.6rem; margin: 0; padding: 0; list-style: none; }
.flow li { position: relative; padding: .4rem .8rem; border: 1px solid var(--accent); border-radius: 6px; font-size: .95rem; }
.flow li:not(:last-child)::after {
    content: "→";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translate(.4rem, -50%);
    color: var(--muted);
}

.video { aspect-ratio: 16 / 9; margin-top: 1rem; }
.video iframe { width: 100%; height: 100%; border: 0; border-radius: 6px; }
.itch { display: block; max-width: 100%; margin-top: 1rem; border: 0; }

/* Experience */
.timeline { margin: 0; padding: 0 0 0 1.2rem; list-style: none; border-left: 2px solid var(--border); }
.timeline li { position: relative; margin-bottom: 1.6rem; }
.timeline li::before {
    content: "";
    position: absolute;
    left: calc(-1.2rem - 6px);
    top: .55rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}
.timeline .meta { margin: 0; }
.timeline p { margin: .3rem 0; }

/* Skills */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.tags li { padding: .3rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: .9rem; }

footer { padding: 2rem 16px 3rem; color: var(--muted); }

@media (max-width: 600px) {
    body { font-size: 16px; }
    .topbar .brand { display: none; }
    .hero { flex-direction: column; text-align: center; padding-top: 2rem; }
    .hero img { width: 150px; height: 150px; }
    .hero h1 { font-size: 2rem; }
    .contact { justify-content: center; }
    .flow { flex-direction: column; align-items: flex-start; gap: 1.4rem; }
    .flow li:not(:last-child)::after { content: "↓"; left: 1rem; top: 100%; transform: translateY(.1rem); }
}
