:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --fg: #1b2437;
  --card: #ffffff;
  --muted: #5c6b82;
  --line: rgba(27, 36, 55, 0.12);
  --brand: #1d6fe8;
  --brand-2: #1293b5;
  --soft: #eef3fb;
  --danger: #b42318;
  --ok: #067647;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(18, 32, 64, 0.08);
}
html.dark {
  color-scheme: dark;
  --bg: #0d1424;
  --fg: #eef3fb;
  --card: #141c2f;
  --muted: #a9b6c9;
  --line: rgba(255, 255, 255, 0.1);
  --brand: #7ee0f2;
  --brand-2: #7aa2ff;
  --soft: #1c263c;
  --danger: #ffb4ab;
  --ok: #8ee7bf;
  --shadow: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.5rem); margin: 0 0 0.6rem; font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); font-weight: 600; margin: 0; }
h3 { margin: 0; font-weight: 600; }
.grad { display: block; background: linear-gradient(100deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { width: min(72rem, calc(100% - 2.5rem)); margin: 0 auto; }
@media (min-width: 40rem) { .wrap { width: min(72rem, calc(100% - 4rem)); } }
.narrow { width: min(760px, 100%); }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 42rem; line-height: 1.7; }
.muted { color: var(--muted); }
.eyebrow { color: var(--brand); font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 0.75rem; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.bg-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%); }
.border-top { border-top: 1px solid var(--line); }
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch a { padding: 0.28rem 0.55rem; font-size: 0.75rem; font-weight: 650; color: var(--muted); text-decoration: none; }
.lang-switch a[aria-current="true"] { background: var(--soft); color: var(--fg); }
.header-actions, .actions, .row-actions, .chips, .tags, .socials { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.header-row { display: flex; align-items: center; height: 4rem; justify-content: space-between; gap: 0.6rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 650; text-decoration: none; }
.mark { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 0.6rem; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #07111f; font-family: ui-monospace, monospace; font-size: 0.75rem; font-weight: 700; }
.desktop-nav { display: flex; gap: 0.25rem; padding: 0.25rem; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--card) 70%, transparent); }
.desktop-nav a, .mobile-nav a { text-decoration: none; color: var(--muted); padding: 0.4rem 0.8rem; border-radius: 999px; font-size: 0.92rem; }
.desktop-nav a[aria-current="page"] { color: var(--fg); background: var(--soft); }
.mobile-only { display: none; }
.mobile-nav { border-top: 1px solid var(--line); padding: 0.8rem 1rem 1rem; }
.mobile-nav nav { display: grid; gap: 0.4rem; }
.icon-btn, .linkish, button { font: inherit; }
.icon-btn, .linkish { background: none; border: 0; color: var(--fg); cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.7rem; padding: 0.55rem 1.1rem; border-radius: 999px; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--brand); color: #07111f; font-weight: 650; }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--fg); }
.hero { position: relative; overflow: hidden; padding: 3.5rem 0 2rem; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 0.45rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.75rem; color: var(--muted); font-size: 0.75rem; font-weight: 500; background: color-mix(in srgb, var(--card) 50%, transparent); margin-bottom: 1.4rem; }
.badge::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px var(--brand); }
.caps { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; gap: 0.65rem 1.5rem; grid-template-columns: 1fr 1fr; color: var(--muted); font-size: 0.92rem; }
.caps li::before { content: "✓ "; color: var(--brand); }
.caps-list { grid-template-columns: 1fr; margin-top: 0.4rem; }
.card { background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line); border-radius: 1rem; }
.hero-code { position: relative; }
.code-window { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: color-mix(in srgb, var(--card) 88%, transparent); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); }
.code-bar, .code-steps { display: flex; align-items: center; gap: 0.45rem; }
.code-bar { border-bottom: 1px solid var(--line); padding: 0.75rem 1rem; background: color-mix(in srgb, var(--soft) 55%, transparent); }
.dot { width: 0.65rem; height: 0.65rem; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.code-file { margin-left: 0.6rem; font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.75rem; color: var(--muted); }
.code-tag { margin-left: auto; border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); border-radius: 0.4rem; padding: 0.1rem 0.45rem; font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.65rem; }
.code-window pre { margin: 0; padding: 1.1rem 1.15rem; overflow-x: auto; font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.8rem; line-height: 1.7; }
.code-window pre div { display: flex; }
.ln { width: 1.4rem; margin-right: 1rem; text-align: right; color: color-mix(in srgb, var(--muted) 55%, transparent); }
.code-window .fn { color: var(--brand-2); } .code-window .name { color: var(--brand); } .code-window .type { color: #e2b15a; } .code-window .ok { color: var(--ok); } .code-window .cm { color: var(--muted); }
.caret { display: inline-block; width: 7px; height: 0.95em; margin-left: 2px; background: var(--brand); animation: blink 1s steps(1) infinite; vertical-align: text-bottom; }
@keyframes blink { 50% { opacity: 0; } }
.code-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; border-top: 1px solid var(--line); padding: 0.9rem; background: color-mix(in srgb, var(--soft) 40%, transparent); list-style: none; margin: 0; }
.code-steps li { text-align: center; color: var(--muted); font-size: 0.68rem; }
.code-float { position: absolute; margin: 0; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 92%, transparent); border-radius: 0.8rem; padding: 0.7rem 0.9rem; box-shadow: var(--shadow); }
.code-float small { display: block; font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-size: 0.62rem; }
.code-float strong { font-size: 0.9rem; } .code-float span, .code-float.right strong { color: var(--brand); }
.code-float.left { left: -0.5rem; bottom: -2.4rem; } .code-float.right { right: -0.4rem; top: -1.1rem; }
.highlights { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 2rem 0 0; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: color-mix(in srgb, var(--card) 55%, transparent); }
.highlights div { padding: 1.15rem 1.4rem; }
.highlights div + div { border-left: 1px solid var(--line); }
.highlights dt { color: var(--muted); font-size: 0.9rem; }
.highlights dd { margin: 0 0 0.15rem; font-size: 1.25rem; font-weight: 650; }
.page-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding: 4rem 0 4.5rem; }
.page-hero h1 { max-width: 46rem; }
.section { padding: 5rem 0; }
.section-head { display: flex; justify-content: space-between; gap: 1.5rem; align-items: end; margin-bottom: 2.5rem; }
.section-copy { max-width: 42rem; display: grid; gap: 0.75rem; margin-bottom: 2rem; }
.section-head .section-copy { margin-bottom: 0; }
.about-grid, .about-story { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: start; }
.about-story { grid-template-columns: 1fr 1.1fr; }
.callout { margin-top: 1.5rem; border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); background: color-mix(in srgb, var(--brand) 8%, transparent); border-radius: 1rem; padding: 1.1rem 1.2rem; }
.callout p, .principle { margin: 0; }
.principle { margin-top: 1.2rem; border-left: 2px solid var(--brand); padding-left: 1rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; border-left: 1px solid var(--line); display: grid; gap: 0.2rem; }
.timeline li { position: relative; padding: 0 0 1.4rem 0.4rem; }
.timeline li::before { content: ""; position: absolute; left: -1.72rem; top: 0.35rem; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.period { margin: 0; color: var(--brand); font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.78rem; }
.timeline-title { margin: 0.2rem 0; font-weight: 600; }
.timeline p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.92rem; }
.cards { display: grid; gap: 1rem; }
.cards-2 { grid-template-columns: 1fr 1fr; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card { padding: 1.35rem; }
.service-compact { display: block; text-decoration: none; min-height: 100%; transition: border-color .2s; }
.service-compact:hover, .project-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.service-compact p, .project-body p { color: var(--muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.icon-box { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 0.8rem; border: 1px solid var(--line); color: var(--brand); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, transparent), color-mix(in srgb, var(--brand-2) 10%, transparent)); margin-bottom: 1rem; }
.icon { width: 1.2rem; height: 1.2rem; }
.project-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: 100%; }
.cover-frame { position: relative; aspect-ratio: 16/10; border-bottom: 1px solid var(--line); background: var(--soft); overflow: hidden; }
.cover-frame img { width: 100%; height: 100%; object-fit: cover; }
.cover { width: 100%; border-radius: 12px; margin: 1rem 0; }
.cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.cover-fallback span { font-family: "Geist Mono", ui-monospace, monospace; font-size: 2rem; font-weight: 650; color: color-mix(in srgb, var(--fg) 16%, transparent); }
.cover-chip { position: absolute; top: 0.75rem; left: 0.75rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.6rem; font-size: 0.7rem; background: color-mix(in srgb, var(--bg) 72%, transparent); }
.project-body { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.15rem 1.2rem 1.25rem; flex: 1; }
.project-title { display: flex; justify-content: space-between; gap: 0.6rem; }
.project-title a { text-decoration: none; }
.project-title a::after { content: ""; position: absolute; inset: 0; }
.stack { display: grid; gap: 0.8rem; }
.service-full { scroll-margin-top: 5.5rem; display: flex; flex-direction: column; }
.service-title { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.8rem; }
.service-title .icon-box { margin: 0; }
.service-full .btn { margin-top: auto; align-self: flex-start; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps li { border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 70%, transparent); border-radius: 1rem; padding: 1.3rem; }
.step-top { display: flex; justify-content: space-between; margin-bottom: 0.8rem; }
.steps span, .step-arrow { color: var(--brand); font-family: "Geist Mono", ui-monospace, monospace; }
.step-arrow { color: var(--muted); }
.steps p { color: var(--muted); font-size: 0.92rem; }
.ai-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; border: 1px solid var(--line); border-radius: 1.4rem; background: color-mix(in srgb, var(--card) 70%, transparent); padding: 2rem; }
.ai-uses { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.ai-uses li { border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.9rem 1rem; background: color-mix(in srgb, var(--bg) 55%, transparent); }
.ai-uses li::before { content: "✓ "; color: var(--brand); }
.tech-list { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.tech-list li { border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.75rem 0.9rem; background: color-mix(in srgb, var(--bg) 45%, transparent); }
.tech-list span { display: block; color: var(--muted); font-size: 0.9rem; }
.cta-section { padding-top: 1rem; }
.cta { position: relative; overflow: hidden; text-align: center; border: 1px solid var(--line); border-radius: 1.5rem; background: var(--card); padding: 4rem 1.5rem; }
.cta .bg-grid { opacity: 0.7; mask-image: radial-gradient(ellipse at center, black, transparent 75%); }
.cta h2, .cta .lede, .cta .eyebrow, .cta .actions, .cta .note { position: relative; }
.cta .lede { margin: 0.8rem auto 0; }
.cta .actions { justify-content: center; margin-top: 1.6rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 2.5rem; align-items: start; }
.filters, .stack-form { display: grid; gap: 0.8rem; }
.filters { grid-template-columns: 1fr 220px auto; margin: 1rem 0; }
input, textarea, select { width: 100%; padding: 0.7rem 0.8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.field { display: grid; gap: 0.3rem; }
.field small, .note { color: var(--muted); }
.check { display: flex; gap: 0.5rem; align-items: center; }
.check input { width: auto; }
.chip, .tags a, .tags span { border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.7rem; text-decoration: none; color: var(--muted); }
.chip.on { color: var(--fg); border-color: var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; }
.prose p, .prose-list { margin: 0.6rem 0; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.shot img { aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.82); display: grid; place-items: center; z-index: 50; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1000px, 92vw); max-height: 88vh; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; font-size: 2rem; background: none; border: 0; color: white; cursor: pointer; }
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; align-items: start; }
.footer-name { margin: 0 0 0.8rem; font-size: 1.125rem; font-weight: 650; }
.footer-label { margin: 0 0 0.9rem; font-weight: 600; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--fg); }
.availability { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.75rem; color: var(--muted); font-size: 0.78rem; }
.pulse { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ok); }
.footer-base-wrap { border-top: 1px solid var(--line); margin-top: 2.5rem; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: 0.78rem; padding: 1.4rem 0; }
.text-link { color: var(--brand); display: inline-block; margin-top: 1.4rem; text-decoration: none; }
.empty { position: relative; overflow: hidden; padding: 4rem 1.5rem; border: 1px dashed var(--line); border-radius: 1rem; background: color-mix(in srgb, var(--card) 30%, transparent); color: var(--muted); text-align: center; }
.empty-title { position: relative; margin: 0; color: var(--fg); font-size: 1.15rem; font-weight: 650; }
.empty p, .empty .btn, .empty .bg-grid { position: relative; }
.empty .bg-grid { position: absolute; }
.cards > .empty { grid-column: 1 / -1; }
.project-card { position: relative; }
.hp { position: absolute; left: -9999px; }
.error { color: var(--danger); }
.success { outline: 1px solid var(--ok); }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth .card { width: min(440px, 100%); }
.admin-body { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-side { border-right: 1px solid var(--line); padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.admin-side nav { display: grid; gap: 0.2rem; }
.admin-side a { text-decoration: none; padding: 0.4rem 0.5rem; border-radius: 8px; color: var(--muted); }
.admin-side a[aria-current="page"] { background: var(--soft); color: var(--fg); }
.admin-side-foot { margin-top: auto; display: grid; gap: 0.4rem; }
.admin-main { padding: 1.2rem 1.4rem 3rem; }
.admin-top { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.table { width: 100%; border-collapse: collapse; }
.table td { border-top: 1px solid var(--line); padding: 0.8rem 0.2rem; vertical-align: top; }
.thumb { width: 160px; border-radius: 12px; }
.gallery-admin { display: grid; grid-template-columns: 120px 1fr; gap: 0.8rem; margin: 0.6rem 0; }
.flash { padding: 0.7rem 0.9rem; border-radius: 12px; background: var(--soft); }
.flash-err { color: var(--danger); }
code { font-family: "Geist Mono", ui-monospace, monospace; }
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
.footer-grid nav, .socials { display: grid; gap: 0.45rem; }
@media (max-width: 860px) {
  .desktop-nav, .desktop-only, .code-float { display: none; }
  .mobile-only { display: inline-flex; }
  .hero-grid, .cards, .cards-2, .cards-3, .cards-4, .highlights, .filters, .contact-grid, .footer-grid, .about-grid, .about-story, .steps, .ai-panel, .admin-body, .stats, .gallery, .caps { display: grid; grid-template-columns: 1fr; }
  .highlights div + div { border-left: 0; border-top: 1px solid var(--line); }
  .admin-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .footer-base, .section-head { display: grid; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .cards-3, .cards-4, .steps { grid-template-columns: 1fr 1fr; }
}
