:root {
  --bg: #0f1115;
  --card: #171a21;
  --line: #262b36;
  --text: #e6e8ee;
  --muted: #8b93a7;
  --accent: #4f8cff;
  --danger: #e5484d;
  --ok: #30a46c;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }
h2 { margin-top: 0; }
img { max-width: 100%; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main { min-height: 70vh; padding-bottom: 40px; }
section { padding: 40px 0; border-bottom: 1px solid var(--line); }
section:last-child { border: 0; }

.nav { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(15,17,21,.92); backdrop-filter: blur(6px); z-index: 10; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.nav nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav nav a { color: var(--text); font-size: 15px; }
.logo { font-weight: 700; font-size: 20px; color: var(--text) !important; }
.logo span { color: var(--accent); }
.pill { border: 1px solid var(--line); padding: 4px 12px; border-radius: 99px; }

.hero { display: flex; gap: 32px; align-items: center; padding: 60px 0; }
.hero h1 { font-size: 38px; margin: 4px 0 12px; }
.avatar { border-radius: 50%; flex-shrink: 0; background: var(--card); }
.lead { font-size: 18px; color: #c9cedb; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.card h3 { margin: 8px 0; }
.project img, .cert img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #0b0d11; }
.meta { color: var(--muted); font-size: 13px; margin-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { font-size: 12px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 99px; color: #c9cedb; }

.skill { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; font-size: 14px; }
.bar { width: 90px; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; flex-shrink: 0; }
.bar i { display: block; height: 100%; background: var(--accent); }

.btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent); padding: 8px 16px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 15px; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { padding: 3px 10px; font-size: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form.narrow { max-width: 380px; margin: 60px auto; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
input, textarea, select { background: #0b0d11; border: 1px solid var(--line); color: var(--text); padding: 9px 12px; border-radius: 8px; font: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.inline-form { flex-direction: row; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search { display: flex; gap: 8px; margin: 16px 0 24px; flex-wrap: wrap; }
.search input { flex: 1; min-width: 200px; }

.table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.table th, .table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 500; font-size: 14px; }
.right { text-align: right !important; white-space: nowrap; }
.inline { display: inline; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.flash { margin-top: 16px; padding: 10px 14px; border-radius: 8px; border: 1px solid; }
.flash.success { border-color: var(--ok); color: #8ee0b4; }
.flash.error { border-color: var(--danger); color: #ffa7aa; }
.crumbs { margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.detail .banner { border-radius: 12px; margin: 16px 0; border: 1px solid var(--line); }
.thumb { width: 160px; border-radius: 6px; }
.msg p { white-space: pre-wrap; margin-bottom: 0; }
.center { text-align: center; padding: 80px 0; }
.center h1 { font-size: 64px; margin: 0; }
.footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 14px; }

@media (max-width: 800px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .hero { flex-direction: column; text-align: center; }
  .hero .tags, .hero .actions { justify-content: center; }
  .hero h1 { font-size: 28px; }
  .nav-inner { height: auto; padding: 10px 16px; flex-direction: column; gap: 6px; }
  .table { font-size: 14px; }
}
