/* Mazycoy.info — Design System
   Tek dosya, no-build, no-tailwind. Tüm tokenlar :root altında. */

:root {
  --bg: #0b0b0c;
  --bg-1: #111113;
  --bg-2: #16161a;
  --bg-3: #1d1d22;
  --line: #25252b;
  --line-2: #34343c;
  --fg: #ebe9e4;
  --fg-2: #a4a29c;
  --fg-3: #6b6964;
  --accent: oklch(0.78 0.14 65);
  --accent-dim: oklch(0.78 0.14 65 / 0.18);
  --accent-line: oklch(0.78 0.14 65 / 0.4);
  --green: oklch(0.78 0.14 155);
  --blue: oklch(0.78 0.12 240);
  --pink: oklch(0.78 0.14 350);
  --radius: 6px;
  --pad: 32px;
}

[data-theme="light"] {
  --bg: #f7f5f0;
  --bg-1: #ffffff;
  --bg-2: #efece5;
  --bg-3: #e6e2d9;
  --line: #d8d4ca;
  --line-2: #c4bfb3;
  --fg: #1a1a1c;
  --fg-2: #4d4c47;
  --fg-3: #7a7872;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist", -apple-system, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.muted { color: var(--fg-3); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad); }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--fg); }
code { font-family: "JetBrains Mono", monospace; font-size: 0.92em; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11,11,12,0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
[data-theme="light"] .topbar {
  background: rgba(247,245,240,0.85);
}
.topbar-inner {
  display: flex; align-items: center; gap: 24px;
  height: 56px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -0.01em;
  color: var(--fg);
}
.brand-dot {
  width: 22px; height: 22px; border-radius: 5px;
  background: var(--accent);
  display: grid; place-items: center;
  color: #1a1305; font-family: "JetBrains Mono", monospace;
  font-weight: 700; font-size: 12px;
}
.topnav {
  display: flex; gap: 18px;
  font-size: 14px;
}
.topnav a { color: var(--fg-2); }
.topnav a:hover { color: var(--accent); }
.topbar-meta { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.theme-toggle {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 14px;
  position: relative;
}
.theme-toggle .t-sun { display: none; }
.theme-toggle .t-moon { display: block; }
[data-theme="light"] .theme-toggle .t-sun { display: block; }
[data-theme="light"] .theme-toggle .t-moon { display: none; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent-line); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(800px 400px at 80% -10%, oklch(0.78 0.14 65 / 0.08), transparent 60%),
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
  mask-image: linear-gradient(to bottom, black 60%, transparent);
  pointer-events: none;
}
[data-theme="light"] .hero::before {
  background-image:
    radial-gradient(800px 400px at 80% -10%, oklch(0.78 0.14 65 / 0.18), transparent 60%),
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
}
.hero-inner { position: relative; z-index: 1; }
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.15em;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
h1.hero-title {
  font-size: clamp(40px, 6vw, 72px); line-height: 1.04;
  font-weight: 500; letter-spacing: -0.035em;
  margin: 0 0 28px;
  text-wrap: balance;
}
h1.hero-title em {
  font-style: italic; font-weight: 400;
  color: var(--accent);
}
.hero-sub {
  max-width: 680px;
  color: var(--fg-2);
  font-size: 19px; line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- Block / Sections ---------- */
section.block { padding: 64px 0; border-bottom: 1px solid var(--line); }
.sec-mini {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 18px;
}

/* ---------- Filterbar ---------- */
.filterbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 20px 0 32px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 32px;
}
.pg-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.pg-filter {
  padding: 6px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--fg-3);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.pg-filter:hover { color: var(--fg-2); border-color: var(--fg-3); }
.pg-filter.on {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-dim);
}
.pg-filter .count { color: var(--fg-3); font-size: 10px; }
.pg-filter.on .count { color: var(--accent); }
.search { display: flex; align-items: center; gap: 8px; }
.search input[type="search"] {
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 7px 12px;
  border-radius: 6px;
  width: 240px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.search input[type="search"]:focus { border-color: var(--accent-line); }
.search kbd {
  font-size: 11px; color: var(--fg-3);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ---------- Project grid ---------- */
.pg-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pg-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  display: flex; flex-direction: column;
  color: var(--fg);
}
.pg-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
}
.pg-thumb {
  aspect-ratio: 16 / 10;
  background-image: repeating-linear-gradient(
    135deg, var(--bg-2), var(--bg-2) 6px, var(--bg-3) 6px, var(--bg-3) 12px
  );
  background-size: cover; background-position: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.pg-thumb.has-cover { background-color: var(--bg-2); }

/* ---------- Live preview (hover-scroll iframe) ---------- */
.live-preview {
  position: absolute; inset: 0;
  overflow: hidden;
  background: var(--bg-1);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 1;
}
.live-frame {
  position: absolute;
  top: 0; left: 0;
  width: 1280px;
  height: 1800px;
  border: 0;
  background: var(--bg);
  transform-origin: top left;
  transform: scale(var(--live-scale, 0.32)) translateY(0);
  transition: transform 0.4s ease-out;
  pointer-events: none;
  user-select: none;
}
/* Active card: kullanıcı kart üstünde — preview görünsün */
.pg-card.has-live:hover .live-preview,
.feat-card.has-live:hover .live-preview,
.live-preview.is-active { opacity: 1; }

/* Animasyon: hover'da iframe yukarı kayar (alt kısımları görünür) */
.pg-card.has-live:hover .live-frame,
.feat-card.has-live:hover .live-frame,
.live-frame.is-scrolling {
  transition: transform 5s linear;
  transform: scale(var(--live-scale, 0.32)) translateY(-1200px);
}

.live-overlay {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(11,11,12,0.78);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  border: 1px solid var(--accent-line);
  backdrop-filter: blur(6px);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s;
}
.pg-card.has-live:hover .live-overlay,
.feat-card.has-live:hover .live-overlay { opacity: 1; }

/* Mobil / dokunmatik: hover yok → preview kapalı */
@media (hover: none), (pointer: coarse) {
  .live-preview { display: none; }
}

/* Cover + live birlikte: cover'ı arkada tutuyoruz, live üstte */
.pg-thumb, .feat-cover { position: relative; }
.pg-thumb .pg-badge, .pg-thumb .pg-thumb-label,
.feat-cover .feat-badge { z-index: 3; }
.pg-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; padding: 3px 7px; border-radius: 999px;
  background: var(--accent); color: #1a1305; font-weight: 600;
}
.pg-thumb-label {
  position: absolute; bottom: 10px; left: 10px;
  font-size: 10px;
  color: var(--fg-2);
  background: rgba(11,11,12,0.7);
  padding: 3px 7px; border-radius: 4px;
  backdrop-filter: blur(4px);
}
.pg-card-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pg-card-name {
  font-size: 16px; font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}
.pg-card-tagline {
  font-size: 13px;
  color: var(--fg-2);
  margin: 0;
  line-height: 1.5;
  text-wrap: pretty;
  flex: 1;
}
.pg-card-meta {
  display: flex; gap: 8px; align-items: center;
  color: var(--fg-3); font-size: 11px;
}
.pg-card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.pg-card-tags span {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--fg-2);
  border: 1px solid var(--line);
}

.empty {
  text-align: center;
  padding: 64px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--bg-1);
}
.empty-tag {
  display: inline-block;
  background: var(--bg-2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--fg-3);
  margin-bottom: 16px;
}
.empty h3 { margin: 0 0 8px; font-weight: 500; }

/* ---------- Project detail ---------- */
.project { padding: 56px 0 96px; }
.breadcrumbs {
  font-size: 12px;
  color: var(--fg-3);
  margin-bottom: 24px;
  display: flex; gap: 8px; align-items: center;
}
.breadcrumbs a { color: var(--fg-3); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs em { color: var(--fg); font-style: normal; }
.breadcrumbs .sep { opacity: 0.4; }

.proj-head {
  display: grid; grid-template-columns: 1fr 240px; gap: 48px;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.proj-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500; letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 6px 0 16px;
}
.proj-tagline {
  color: var(--fg-2);
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 24px;
  max-width: 580px;
}
.proj-tech { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 28px; }
.proj-tech span {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--fg-2);
}
.proj-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: #1a1305; border-color: var(--accent); }
.btn-primary:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-ghost { color: var(--fg); border-color: var(--line-2); background: transparent; }
.btn-ghost:hover { border-color: var(--fg-3); background: var(--bg-1); }
.btn-danger { color: oklch(0.78 0.14 25); border-color: oklch(0.78 0.14 25 / 0.4); background: transparent; }
.btn-danger:hover { background: oklch(0.78 0.14 25 / 0.1); }

.proj-meta {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  align-self: start;
}
.meta-list { margin: 0; font-size: 12px; }
.meta-list dt { color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.meta-list dd { margin: 0 0 12px; color: var(--fg); }
.meta-list dd:last-child { margin-bottom: 0; }

.proj-desc { font-size: 16px; color: var(--fg-2); line-height: 1.6; max-width: 720px; margin-bottom: 36px; text-wrap: pretty; }
.proj-features ul { padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; margin-bottom: 36px; }
.proj-features li { color: var(--fg-2); padding-left: 18px; position: relative; }
.proj-features li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: monospace; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 36px; }
.gallery-item { padding: 0; border: 1px solid var(--line); background: var(--bg-1); border-radius: 6px; cursor: zoom-in; overflow: hidden; }
.gallery-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.snippet { background: var(--bg-1); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 0 0 16px; }
.snippet figcaption {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.snippet figcaption .name { color: var(--accent); font-size: 12px; }
.copy-btn {
  background: transparent; color: var(--fg-3); border: 1px solid var(--line-2);
  border-radius: 4px; padding: 3px 10px; font-size: 11px; cursor: pointer;
}
.copy-btn:hover { color: var(--fg); border-color: var(--fg-3); }
.copy-btn.ok { color: var(--green); border-color: var(--green); }
.snippet .code { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 12.5px; line-height: 1.65; color: var(--fg); }

.prev-next {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.pn {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-1);
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s;
}
.pn:hover { border-color: var(--accent-line); }
.pn-next { text-align: right; }
.pn .mono { font-size: 11px; color: var(--fg-3); }
.pn strong { color: var(--fg); font-weight: 500; }

/* ---------- Demo shell ---------- */
.demo-shell {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
}
.demo-toolbar {
  background: linear-gradient(to bottom, var(--bg-2), var(--bg-1));
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  height: 54px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 56px; z-index: 20;
}
.demo-toolbar .brand-dot { text-decoration: none; }
.tb-title { font-size: 13px; font-weight: 500; }
.tb-title a { color: var(--fg); }
.tb-title a:hover { color: var(--accent); }
.tb-title small { color: var(--fg-3); font-size: 11px; margin-left: 8px; font-weight: 400; }
.tb-devices {
  display: flex; gap: 2px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.tb-dev {
  padding: 4px 10px; border-radius: 4px;
  font-size: 11px; color: var(--fg-3);
  cursor: pointer; background: transparent; border: none;
  transition: color .15s, background .15s;
}
.tb-dev:hover { color: var(--fg-2); }
.tb-dev.on { background: var(--bg-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.tb-spacer { flex: 1; }
.tb-select {
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  color: var(--fg-2);
  position: relative;
}
.tb-select summary {
  list-style: none;
  cursor: pointer;
  outline: none;
}
.tb-select summary::-webkit-details-marker { display: none; }
.tb-list {
  position: absolute; right: 0; top: 100%;
  margin-top: 6px;
  list-style: none; padding: 4px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 220px;
  max-height: 320px; overflow-y: auto;
  z-index: 10;
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.tb-list li a {
  display: block; padding: 6px 10px;
  font-size: 12px;
  color: var(--fg-2);
  border-radius: 4px;
}
.tb-list li a:hover { background: var(--bg-2); color: var(--fg); }
.tb-list li a.current { color: var(--accent); }
.tb-copy {
  background: transparent;
  color: var(--fg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}
.tb-copy:hover { color: var(--fg); border-color: var(--fg-3); }
.tb-copy.ok { color: var(--green); border-color: var(--green); }
.tb-buy {
  padding: 7px 14px;
  background: var(--accent);
  color: #1a1305;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.tb-buy:hover { background: var(--fg); color: var(--bg); }

.demo-stage {
  background: var(--bg);
  display: grid; place-items: center;
  padding: 24px;
  position: relative;
  overflow: auto;
}
.demo-stage::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(45deg, var(--bg-2) 25%, transparent 25%),
    linear-gradient(-45deg, var(--bg-2) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--bg-2) 75%),
    linear-gradient(-45deg, transparent 75%, var(--bg-2) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  opacity: 0.25;
  pointer-events: none;
}
.demo-frame-wrapper {
  position: relative;
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
  transition: max-width .35s ease;
  max-width: 100%;
}
.demo-shell[data-viewport="mobile"]  .demo-frame-wrapper { max-width: 375px; }
.demo-shell[data-viewport="tablet"]  .demo-frame-wrapper { max-width: 768px; }
.demo-shell[data-viewport="desktop"] .demo-frame-wrapper { max-width: 1280px; }
.demo-frame {
  width: 100%;
  height: calc(100vh - 56px - 54px - 56px - 48px);
  min-height: 480px;
  border: none;
  background: var(--bg);
  display: block;
}
.demo-bottom {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  font-size: 12px;
}
.demo-bottom a:first-child { text-align: left; }
.demo-bottom a:last-child  { text-align: right; }
.demo-bottom .back-link { color: var(--fg-2); text-align: center; }
.demo-bottom .back-link:hover { color: var(--accent); }

/* ---------- Personal Hero ---------- */
.hero-personal { padding: 88px 0 72px; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 280px; gap: 48px;
  align-items: center;
}
.hero-text { max-width: 720px; }
.hero-personal h1.hero-title {
  font-size: clamp(40px, 6.2vw, 76px);
  margin: 12px 0 16px;
}
.hero-personal h1.hero-title .alias {
  display: inline-block;
  font-size: 0.42em;
  color: var(--fg-3);
  vertical-align: middle;
  margin-top: 12px;
  letter-spacing: 0;
}
.hero-personal .hero-sub {
  font-size: 18px;
  margin-bottom: 20px;
}
.hero-personal .hero-sub strong { color: var(--fg); font-weight: 500; }
.hero-bio {
  color: var(--fg-2);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 600px;
  margin: 0 0 32px;
  text-wrap: pretty;
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.status-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fg-3);
  margin-right: 0;
}
.status-dot.on {
  background: var(--green);
  box-shadow: 0 0 0 4px oklch(0.78 0.14 155 / 0.18);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px oklch(0.78 0.14 155 / 0.18); }
  50%      { box-shadow: 0 0 0 8px oklch(0.78 0.14 155 / 0.04); }
}
.eyebrow .status-dot { margin-right: 0; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.hs { padding-right: 16px; border-right: 1px dashed var(--line); }
.hs:last-child { border-right: none; }
.hs-val {
  font-size: 24px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.hs-lbl { font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.1em; }

.hero-side {
  display: flex; flex-direction: column;
  align-items: center; gap: 14px;
}
.avatar-wrap {
  position: relative;
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), oklch(0.78 0.14 350));
  box-shadow: 0 20px 60px oklch(0.78 0.14 65 / 0.25);
}
.avatar {
  width: 220px; height: 220px;
  border-radius: 50%;
  display: block;
  border: 4px solid var(--bg);
}
.avatar-tag {
  position: absolute; bottom: 8px; right: -8px;
  background: var(--bg-1);
  color: var(--fg-2);
  border: 1px solid var(--line-2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  display: flex; align-items: center; gap: 6px;
}
.avatar-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.hero-meta-line { font-size: 11px; color: var(--fg-3); display: flex; gap: 8px; }

/* ---------- Section head (numbered) ---------- */
.sec-head {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.sec-num {
  font-size: 12px; color: var(--fg-3);
  letter-spacing: 0.1em;
}
.sec-num strong { color: var(--accent); font-weight: 500; margin-right: 10px; font-size: 13px; }
.sec-title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}
.sec-title em { color: var(--accent); font-style: normal; font-weight: 400; }
.sec-lede { color: var(--fg-2); font-size: 16px; max-width: 600px; text-wrap: pretty; margin: 0; }

/* ---------- About ---------- */
.about-para {
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 16px;
  max-width: 680px;
  text-wrap: pretty;
}

/* ---------- /now widget ---------- */
.block-now { padding: 40px 0; border-bottom: 1px solid var(--line); }
.now-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 22px 28px;
}
.now-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
  font-size: 11px;
}
.now-tag { color: var(--accent); font-size: 12px; }
.now-text {
  margin: 0;
  font-size: 17px;
  color: var(--fg);
  line-height: 1.55;
  text-wrap: pretty;
}
.now-cursor {
  color: var(--accent);
  display: inline-block;
  margin-right: 8px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.skill-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 26px;
  transition: border-color .15s;
}
.skill-card:hover { border-color: var(--accent-line); }
.skill-name {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.skill-items { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-2);
  background: var(--bg-2);
}

/* ---------- Featured ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}
.feat-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  color: var(--fg);
  transition: border-color .2s, transform .2s;
}
.feat-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.feat-cover {
  aspect-ratio: 16/9;
  background: var(--bg-2) repeating-linear-gradient(135deg,
      var(--bg-2) 0, var(--bg-2) 6px, var(--bg-3) 6px, var(--bg-3) 12px);
  background-size: cover; background-position: center;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.feat-cover.has-cover { background-color: var(--bg-2); }
.feat-badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: var(--accent); color: #1a1305; font-weight: 600;
}
.feat-body {
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.feat-meta { font-size: 11px; color: var(--fg-3); }
.feat-title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.feat-tagline { color: var(--fg-2); margin: 0; flex: 1; line-height: 1.5; text-wrap: pretty; }
.feat-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.feat-tags span {
  font-size: 11px; padding: 3px 8px;
  border-radius: 4px; background: var(--bg-2);
  color: var(--fg-2); border: 1px solid var(--line);
}
.feat-arrow {
  color: var(--accent);
  font-size: 12px;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* ---------- Contact ---------- */
.contact-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 100% 0%, oklch(0.78 0.14 65 / 0.10), transparent 60%);
  pointer-events: none;
}
.contact-text { position: relative; }
.contact-title {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 12px 0 16px;
}
.contact-title em { color: var(--accent); font-style: normal; font-weight: 400; }
.contact-lede { color: var(--fg-2); font-size: 15px; line-height: 1.6; margin: 0; }
.contact-grid {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  position: relative;
}
.contact-link {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  transition: border-color .15s, background .15s, transform .15s;
}
.contact-link:hover {
  border-color: var(--accent-line);
  background: var(--bg-3);
  transform: translateX(2px);
}
.cl-icon {
  width: 36px; height: 36px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
}
.cl-key { font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.1em; }
.cl-val { font-size: 14px; color: var(--fg); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px 0 64px;
  color: var(--fg-3);
  border-top: 1px solid var(--line);
}
.footer-grid { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px; }
.signoff {
  font-size: 22px;
  color: var(--fg);
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 540px;
}
.signoff em { color: var(--accent); font-style: italic; font-weight: 400; }
.footer-meta { text-align: right; font-size: 11px; line-height: 1.7; }
.footer-meta .k { color: var(--fg-3); }
.footer-meta .v { color: var(--fg-2); }

/* ---------- Lightbox ---------- */
.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 96vw; max-height: 96vh;
}
.lightbox::backdrop { background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 4px; }
.lb-close {
  position: absolute; top: -36px; right: 0;
  background: transparent; border: none; color: white;
  font-size: 28px; cursor: pointer;
  line-height: 1;
}

/* ---------- Admin ---------- */
.admin-block { padding: 40px 0 80px; }
.admin {
  display: grid;
  grid-template-columns: 200px 1fr;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-height: 480px;
}
.admin-side {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 18px 12px 18px;
  display: flex; flex-direction: column;
}
.admin-brand {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 16px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.admin-brand .ab-name { font-weight: 600; color: var(--fg); font-size: 14px; }
.admin-brand .ab-meta { color: var(--fg-3); font-size: 10px; margin-left: auto; }
.admin-side h5 {
  margin: 14px 0 6px 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.admin-side h5:first-of-type { margin-top: 0; }
.admin-side-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.admin-side .item.ext { color: var(--fg-3); font-style: italic; }
.admin-side .item.ext:hover { color: var(--accent); }

/* Brand-dot with image (avatar uploaded) */
.brand-dot.has-image {
  background-size: cover;
  background-position: center;
  color: transparent;
  text-indent: -999px;
  overflow: hidden;
}

/* Admin mobile bar (mobile only) */
.admin-mobile-bar {
  display: none;
  position: sticky; top: 56px; z-index: 18;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  align-items: center;
  gap: 10px;
}
.admin-burger {
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid; place-items: center;
  cursor: pointer;
  padding: 0;
}
.admin-burger span {
  display: block;
  width: 16px; height: 2px;
  background: var(--fg);
  margin: 2px 0;
  transition: transform 0.2s, opacity 0.2s;
}
.admin-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.admin-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.admin-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.amb-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}
.amb-out {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg-2);
  text-decoration: none;
  font-family: ui-monospace, monospace;
}
.amb-out:hover { color: var(--accent); }

.admin-side-close {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-2);
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.admin-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 39;
  opacity: 0;
  transition: opacity 0.2s;
}
.admin-backdrop.is-open { display: block; opacity: 1; }
.admin-side .item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--fg-2);
  border-radius: 4px;
  margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.admin-side .item:hover { background: var(--bg-3); color: var(--fg); }
.admin-side .item .glyph { width: 14px; height: 14px; background: var(--line-2); border-radius: 3px; flex-shrink: 0; }
.admin-side .item.on { background: var(--bg-3); color: var(--fg); }
.admin-side .item.on .glyph { background: var(--accent); }
.admin-main { padding: 24px 28px; }
.admin-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-h h4 { margin: 0; font-size: 18px; font-weight: 500; }
.admin-h .new {
  padding: 7px 14px; font-size: 13px;
  background: var(--accent); color: #1a1305;
  border-radius: 6px; font-weight: 600;
  text-decoration: none;
}
.admin-h .new:hover { background: var(--fg); color: var(--bg); }
.admin-list { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.admin-row {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 110px 70px 70px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--fg);
  text-decoration: none;
  background: var(--bg-1);
  transition: background .12s;
}
.admin-row:last-child { border-bottom: none; }
.admin-row:hover:not(.h) { background: var(--bg-2); }
.admin-row.h {
  background: var(--bg-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: default;
}
.admin-row .cat { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--fg-3); }
.admin-row .stat { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--fg-2); }
.admin-row .stat.status-published { color: var(--green); }
.admin-row .stat.status-draft     { color: var(--accent); }
.admin-row .badge-feat { color: var(--accent); font-size: 11px; margin-left: 6px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}
.stat-card .lbl { font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.stat-card .val { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
.stat-card.accent { background: var(--accent-dim); border-color: var(--accent-line); }
.stat-card.accent .val { color: var(--accent); }

.alert {
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 12px;
  margin-bottom: 16px;
  color: var(--fg-2);
}
.alert.ok { background: oklch(0.78 0.14 155 / 0.1); border-color: oklch(0.78 0.14 155 / 0.4); color: var(--green); }

/* Form */
.form { display: flex; flex-direction: column; gap: 20px; max-width: 720px; }
.proj-form { max-width: 100%; }
.form-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: span 2; }
.field.span-3 { grid-column: span 3; }
.field .lbl { font-size: 11px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em; }
.field input[type="text"],
.field input[type="number"],
.field input[type="search"],
.field input[type="password"],
.field select,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 9px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-line); }
.field textarea { resize: vertical; font-family: "JetBrains Mono", monospace; font-size: 12.5px; }
.field.check { flex-direction: row; align-items: center; gap: 8px; }
.field.check input { width: 18px; height: 18px; }
.field fieldset { all: unset; display: block; }
fieldset.field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px 16px;
}
fieldset.field legend { padding: 0 6px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.form-actions { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.btn-sm { padding: 4px 10px; font-size: 11px; }

/* Settings — fieldset groups */
.field-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px 22px;
  background: var(--bg-2);
}
.field-group legend {
  padding: 0 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--bg-2);
  border-radius: 4px;
}
.hint { font-size: 11px; color: var(--fg-3); margin: 8px 0 0; }

/* Stat rows (about) */
.stat-rows { display: flex; flex-direction: column; gap: 8px; }
.stat-row { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.stat-row input {
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 12px; font-family: inherit; font-size: 13px; outline: none;
}
.stat-row input:focus { border-color: var(--accent-line); }

/* Skill rows */
.skill-rows { display: flex; flex-direction: column; gap: 12px; }
.skill-row {
  display: grid; grid-template-columns: 1fr 2fr; gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Category rows */
.cat-rows { display: flex; flex-direction: column; gap: 6px; }
.cat-row {
  display: grid; grid-template-columns: 1fr 2fr; gap: 8px;
}
.cat-row.h {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 4px 12px;
}
.cat-row input {
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 9px 12px; font-family: inherit; font-size: 13px; outline: none;
}
.cat-row input:focus { border-color: var(--accent-line); }

/* Token display */
.token-display {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.token-display code {
  flex: 1;
  font-size: 13px;
  color: var(--fg);
  user-select: all;
  word-break: break-all;
}

/* admin-h optional sub */
.admin-h {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-h > div:first-child { min-width: 0; flex: 1 1 auto; }
.admin-h h4 { font-size: 20px; margin-bottom: 4px; }
.admin-h .muted { font-size: 13px; margin: 0; }
.admin-h .new {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Diagnostics page */
.diag-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.diag-cell {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}
.diag-cell .lbl { font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.diag-cell .val { font-size: 13px; color: var(--fg); word-break: break-all; }

.diag-perm-table {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: var(--bg-1);
}
.diag-row {
  display: grid; grid-template-columns: 1fr 50px 50px 50px 70px 100px;
  gap: 8px; padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  align-items: center; font-size: 13px;
}
.diag-row:last-child { border-bottom: none; }
.diag-row.h {
  background: var(--bg-2);
  font-family: ui-monospace, monospace;
  font-size: 10px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.1em;
}
.diag-row.bad { background: oklch(0.78 0.14 25 / 0.08); }
.diag-row .muted { font-size: 10px; }

.diag-write { display: flex; flex-direction: column; gap: 6px; }
.diag-write-row {
  display: flex; gap: 12px; padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px;
  align-items: center;
}
.diag-write-row.ok  { border-color: oklch(0.78 0.14 155 / 0.4); background: oklch(0.78 0.14 155 / 0.06); }
.diag-write-row.bad { border-color: oklch(0.78 0.14 25 / 0.4);  background: oklch(0.78 0.14 25 / 0.06); }

.diag-list {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden;
}
.diag-list-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.diag-list-row:last-child { border-bottom: none; }

.diag-errlog {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--fg-2);
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}

/* Mobile diag */
@media (max-width: 700px) {
  .diag-row { grid-template-columns: 1fr 30px 30px 30px; gap: 4px; font-size: 11px; }
  .diag-row > div:nth-child(5),
  .diag-row > div:nth-child(6) { display: none; }
}

/* Demo rows (panel/demos) */
.demo-rows { display: flex; flex-direction: column; gap: 8px; }
.demo-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex-wrap: wrap;
}
.demo-row.orphan { border-left: 3px solid var(--accent); }
.demo-row-main { flex: 1 1 280px; min-width: 0; }
.demo-row-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.demo-row-head .path {
  font-size: 13px; color: var(--fg);
  background: var(--bg-2);
  padding: 3px 8px; border-radius: 4px;
  word-break: break-all;
}
.badge {
  font-size: 10px; padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.orphan-badge { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-line); }
.linked       { background: oklch(0.78 0.14 155 / 0.18); color: var(--green); border: 1px solid oklch(0.78 0.14 155 / 0.4); }
.warn         { background: oklch(0.78 0.14 25 / 0.15); color: oklch(0.78 0.14 25); border: 1px solid oklch(0.78 0.14 25 / 0.4); }
.demo-row-meta { font-size: 11px; color: var(--fg-3); }
.demo-row-actions {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  flex-shrink: 0;
}

/* Adopt form (inline collapse) */
.adopt-form { position: relative; }
.adopt-form summary {
  list-style: none; cursor: pointer;
}
.adopt-form summary::-webkit-details-marker { display: none; }
.adopt-inner {
  display: flex; gap: 8px; align-items: end;
  padding: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.adopt-inner .field { gap: 4px; min-width: 140px; }
.adopt-inner .lbl { font-size: 9px; }
.adopt-inner input, .adopt-inner select {
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 6px 9px; font-size: 12px; outline: none; font-family: inherit;
}

/* Avatar upload */
.avatar-upload-row {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px;
  align-items: center;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.avatar-preview {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), oklch(0.78 0.14 350));
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 24px oklch(0.78 0.14 65 / 0.2);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview {
  margin-top: 6px;
  width: 100%; max-width: 360px; aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-1);
  border: 1px dashed var(--line-2);
  border-radius: 8px; overflow: hidden;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-placeholder {
  font-size: 40px; font-weight: 700;
  color: #1a1305;
}
.avatar-controls { display: flex; flex-direction: column; gap: 8px; }
.avatar-controls input[type="file"] {
  background: var(--bg-1);
  color: var(--fg-2);
  border: 1px dashed var(--line-2);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
}
.avatar-controls input[type="text"] {
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 8px 12px;
  border-radius: 6px;
  font-family: inherit; font-size: 12.5px;
  outline: none;
}

/* Login card */
.login-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 36px 36px 32px;
}
.login-card .eyebrow { margin-bottom: 14px; }
.login-title {
  font-size: 28px; font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.login-card .muted { margin: 0 0 20px; font-size: 14px; }
.login-card .alert { margin-bottom: 14px; color: oklch(0.78 0.14 25); border-color: oklch(0.78 0.14 25 / 0.4); background: oklch(0.78 0.14 25 / 0.08); }
.login-card .form-actions { padding-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 64px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-side { order: -1; }
  .avatar { width: 140px; height: 140px; }
  .sec-head { grid-template-columns: 1fr; gap: 8px; }
  .skills-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; padding: 28px; gap: 24px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hs:nth-child(2) { border-right: none; }
  .pg-grid { grid-template-columns: 1fr 1fr; }
  .proj-head { grid-template-columns: 1fr; gap: 24px; }
  .proj-features ul { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .prev-next { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-grid, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .field.span-2, .field.span-3 { grid-column: span 1; }
  .admin-block { padding: 0; border-bottom: none; }
  .admin-block .wrap { padding: 0; max-width: 100%; }
  .admin {
    grid-template-columns: 1fr;
    border: none; border-radius: 0;
    min-height: calc(100dvh - 56px);
  }
  .admin-main { padding: 18px 16px; }
  .admin-h h4 { font-size: 18px; }
  .admin-h .new { font-size: 12px; padding: 6px 12px; }
  .admin-mobile-bar { display: flex; }
  .admin-side {
    display: flex;
    position: fixed;
    top: 0; left: 0;
    width: 84%; max-width: 320px; height: 100dvh;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    box-shadow: 4px 0 30px rgba(0,0,0,0.5);
    overflow-y: auto;
  }
  .admin-side.is-open { transform: translateX(0); }
  .admin-side-close { display: block; }
  .admin-side-foot { padding-bottom: 24px; }
  .topnav { display: none; }
  .demo-toolbar { flex-wrap: wrap; height: auto; padding: 8px 12px; }
}
@media (max-width: 600px) {
  .pg-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
  .filterbar { flex-direction: column; align-items: stretch; }
  .search input[type="search"] { width: 100%; }
  .admin-row { grid-template-columns: 1fr 80px; }
  .admin-row > div:nth-child(3),
  .admin-row > div:nth-child(4) { display: none; }
}
