/* DEVIX — Website Technical Certificate
   Visual language: technical spec-sheet / blueprint, mobile first, RTL. */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn/Vazirmatn-Variable.woff2") format("woff2-variations"),
       url("../fonts/vazirmatn/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4f3ee;
  --paper-2: #ebe9e1;
  --surface: #ffffff;
  --ink: #0d1321;
  --ink-2: #273044;
  --muted: #5d6576;
  --line: rgba(13, 19, 33, .12);
  --line-strong: rgba(13, 19, 33, .28);
  --grid: rgba(13, 19, 33, .045);
  --accent: #ff4f1f;
  --accent-ink: #ffffff;
  --blue: #2c3cff;
  --ok: #0c8f64;
  --warn: #b7791f;
  --danger: #d0342c;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(13, 19, 33, .06), 0 12px 32px -18px rgba(13, 19, 33, .35);
  --font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b0f17;
    --paper-2: #121826;
    --surface: #141b2a;
    --ink: #e9ecf3;
    --ink-2: #c9cfdc;
    --muted: #8d96a8;
    --line: rgba(233, 236, 243, .1);
    --line-strong: rgba(233, 236, 243, .26);
    --grid: rgba(233, 236, 243, .035);
    --accent: #ff6a3d;
    --blue: #7c87ff;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 16px 40px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0; }
p { margin: 0; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Header / footer */
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(160%) blur(10px); background: color-mix(in srgb, var(--paper) 82%, transparent); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { display: grid; grid-template-columns: repeat(2, 9px); gap: 3px; transform: rotate(45deg); }
.brand__mark span { width: 9px; height: 9px; background: var(--ink); border-radius: 2px; transition: background .3s var(--ease), transform .3s var(--ease); }
.brand__mark span:nth-child(2) { background: var(--accent); }
.brand:hover .brand__mark span:nth-child(3) { background: var(--accent); transform: scale(.8); }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { font-family: var(--mono); font-size: 16px; letter-spacing: .18em; }
.brand__text small { color: var(--muted); font-size: 11px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: background .2s; }
.site-nav a:hover { background: var(--paper-2); }
.site-main { flex: 1; }
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding-block: 28px; color: var(--muted); font-size: 13px; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer__meta { letter-spacing: .2em; font-size: 11px; }

/* Buttons, chips, tags */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; text-decoration: none; font-weight: 600; cursor: pointer; transition: transform .15s var(--ease), background .2s, box-shadow .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { box-shadow: 0 8px 20px -10px var(--ink); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { box-shadow: 0 10px 24px -12px var(--accent); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { background: var(--surface); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: 13px; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.chip small { color: var(--muted); font-size: 11px; }
.chip:hover { border-color: var(--line-strong); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip.is-active small { color: inherit; opacity: .7; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-size: 12px; border: 1px solid var(--line); }
.eyebrow { font-size: 11px; letter-spacing: .28em; color: var(--muted); margin-bottom: 14px; }
.section-title { font-size: clamp(20px, 3vw, 26px); font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.count-badge { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }

/* Hero */
.hero { padding-block: 40px 24px; }
.hero__grid { display: grid; gap: 28px; align-items: center; }
.hero__title { font-size: clamp(32px, 7vw, 60px); font-weight: 900; letter-spacing: -.01em; line-height: 1.2; }
.hero__accent { color: var(--accent); position: relative; white-space: nowrap; }
.hero__accent::after { content: ""; position: absolute; inset-inline: 0; bottom: .08em; height: .12em; background: currentColor; opacity: .25; border-radius: 4px; }
.hero__lead { margin-top: 16px; color: var(--ink-2); max-width: 56ch; font-size: 16px; }
.search { margin-top: 24px; display: flex; gap: 8px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); max-width: 560px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 14px; outline: none; }
.search:focus-within { border-color: var(--ink); }
.spec-plate { position: relative; background: var(--ink); color: var(--paper); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); overflow: hidden; }
.spec-plate::before { content: "SPEC"; position: absolute; inset-inline-end: -8px; top: -18px; font-family: var(--mono); font-size: 84px; font-weight: 800; opacity: .06; letter-spacing: .1em; }
.spec-plate__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-block: 12px; border-bottom: 1px dashed rgba(255, 255, 255, .18); }
.spec-plate__row span { color: rgba(255, 255, 255, .62); font-size: 13px; }
.spec-plate__row strong { font-size: 22px; }
.spec-plate__row strong.mono { font-size: 14px; color: var(--accent); }
.spec-plate__qr { margin-top: 18px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; width: 112px; }
.spec-plate__qr i { aspect-ratio: 1; background: var(--paper); border-radius: 2px; opacity: .9; animation: blink 4s infinite steps(1); }
.spec-plate__qr i:nth-child(3n) { opacity: .1; animation-delay: .6s; }
.spec-plate__qr i:nth-child(5n+1) { opacity: .15; animation-delay: 1.4s; }
.spec-plate__qr i:nth-child(7n+2) { background: var(--accent); }
@keyframes blink { 50% { opacity: .35; } }

/* How it works */
.how { padding-block: 24px; }
.how__steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; counter-reset: step; }
.how__steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; position: relative; overflow: hidden; }
.how__steps li::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .4s var(--ease); }
.how__steps li:hover::after { transform: scaleY(1); }
.how__num { color: var(--accent); font-size: 12px; letter-spacing: .2em; }
.how__steps p { color: var(--muted); font-size: 14px; }

/* Projects grid & cards */
.projects { padding-top: 32px; }
.projects__head { display: grid; gap: 14px; margin-bottom: 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card__link { display: block; text-decoration: none; height: 100%; }
.card__media { position: relative; margin: 0; aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; border-bottom: 1px solid var(--line); }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--paper-2) 0 12px, var(--paper) 12px 24px); }
.card__placeholder span { font-family: var(--mono); font-size: 44px; font-weight: 800; color: var(--line-strong); letter-spacing: .1em; }
.card__code { position: absolute; top: 10px; inset-inline-end: 10px; background: color-mix(in srgb, var(--ink) 88%, transparent); color: var(--paper); font-size: 11px; padding: 3px 9px; border-radius: 6px; backdrop-filter: blur(4px); }
.card__body { padding: 16px 16px 18px; }
.card__title { font-size: 17px; font-weight: 800; }
.card__subtitle { color: var(--muted); font-size: 13px; text-align: end; }
.card__specs { margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px dashed var(--line-strong); }
.card__specs div { padding: 8px 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.card__specs div:nth-child(odd) { padding-inline-end: 10px; }
.card__specs dt { font-size: 11px; color: var(--muted); }
.card__specs dd { margin: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__arrow { position: absolute; bottom: 14px; inset-inline-end: 16px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); opacity: 0; transform: translateX(8px); transition: opacity .3s, transform .3s var(--ease); }
.card:hover .card__arrow, .card__link:focus-visible .card__arrow { opacity: 1; transform: none; }
[data-reveal] { animation: reveal .5s var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper) 50%, var(--paper-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: 6px; }
.skeleton--line { height: 12px; margin-bottom: 10px; }
.skeleton--w70 { width: 70%; height: 16px; }
.skeleton--w55 { width: 55%; }
.skeleton--w40 { width: 40%; }
.card--skeleton .card__media { border-radius: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Feed status / states */
.feed-status { display: grid; place-items: center; gap: 12px; margin-top: 28px; text-align: center; color: var(--muted); }
.feed-status__end { font-size: 13px; letter-spacing: .02em; }
.feed-status__end::before, .feed-status__end::after { content: " — "; color: var(--line-strong); }
.feed-sentinel { height: 1px; }
.state { text-align: center; padding: 40px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); display: grid; gap: 10px; justify-items: center; }
.state__icon { font-size: 40px; font-family: var(--mono); color: var(--accent); }
.state h3, .state h1 { font-size: 20px; }
.state p { color: var(--muted); }
.state--error { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.state--page { margin-block: 64px; padding-block: 56px; }
.state__code { font-size: 72px; font-weight: 800; color: var(--accent); line-height: 1; }

/* Detail page */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); padding-block: 20px 8px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.cert__hero { display: grid; gap: 24px; align-items: start; }
.browser { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.browser__bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.browser__dots { display: inline-flex; gap: 6px; }
.browser__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.browser__dots i:first-child { background: var(--accent); }
.browser__url { flex: 1; font-size: 12px; background: var(--surface); padding: 3px 12px; border-radius: 999px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser__screen { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.browser__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.browser__empty { height: 100%; display: grid; place-content: center; text-align: center; gap: 4px; background: repeating-linear-gradient(135deg, var(--paper-2) 0 14px, var(--paper) 14px 28px); }
.browser__empty span { font-family: var(--mono); font-size: 22px; font-weight: 700; }
.browser__empty small { color: var(--muted); }
.cert__code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.cert__code .mono { background: var(--ink); color: var(--paper); padding: 3px 10px; border-radius: 6px; }
.cert__title { font-size: clamp(26px, 5vw, 40px); font-weight: 900; margin-top: 12px; }
.cert__subtitle { color: var(--muted); text-align: end; font-size: 15px; }
.cert__domain { display: inline-block; margin-top: 8px; color: var(--blue); text-decoration: none; font-size: 14px; }
.cert__domain:hover { text-decoration: underline; }
.spec-list { margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.spec-list div { padding: 12px 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.spec-list div:nth-child(odd) { border-inline-end: 1px solid var(--line); }
.spec-list div:nth-last-child(-n+2) { border-bottom: 0; }
.spec-list dt { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.spec-list dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }

/* Vault (access key) */
.vault { margin-top: 32px; scroll-margin-top: 80px; }
.vault__lock { display: grid; gap: 18px; padding: 22px; border-radius: 20px; background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.vault__lock::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(to left, #000, transparent 70%); pointer-events: none; }
.vault__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); color: #fff; }
.vault__text h2 { font-size: 20px; font-weight: 800; }
.vault__text p { color: rgba(255, 255, 255, .72); margin-top: 6px; font-size: 14px; max-width: 64ch; }
.keyform { position: relative; display: grid; gap: 8px; }
.keyform label { font-size: 13px; color: rgba(255, 255, 255, .8); }
.keyform__row { display: flex; flex-direction: column; gap: 10px; }
.keyform input { min-height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: #fff; font-family: var(--mono); font-size: 17px; letter-spacing: .14em; text-align: center; text-transform: uppercase; transition: border-color .2s, background .2s; }
.keyform input::placeholder { color: rgba(255, 255, 255, .35); }
.keyform input:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, .1); }
.keyform__hint { font-size: 12px; color: rgba(255, 255, 255, .5); }
.field-error { color: #ffb4a8; font-size: 13px; }
.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; }
.alert--danger { background: color-mix(in srgb, var(--danger) 22%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 60%, transparent); color: #ffd8d2; }
.keyform.is-shaking { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.vault__bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px 18px; border-radius: var(--radius); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.vault__bar h2 { font-size: 18px; font-weight: 800; }
.vault__bar p { font-size: 13px; color: var(--muted); }
.panels { display: grid; gap: 16px; margin-top: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; animation: reveal .5s var(--ease) both; }
.panel__title { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel__title .mono { font-size: 11px; color: var(--accent); border: 1px solid currentColor; border-radius: 6px; padding: 1px 6px; }
.panel__title small { color: var(--muted); font-weight: 500; font-size: 12px; }
.kv { margin: 0; display: grid; grid-template-columns: 1fr; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.kv dt { color: var(--muted); font-size: 13px; flex: none; }
.kv dd { margin: 0; font-weight: 600; text-align: end; overflow-wrap: anywhere; min-width: 0; }
.kv a { color: var(--blue); }
.prose { margin-top: 14px; color: var(--ink-2); font-size: 14px; }
.prose p + p { margin-top: 8px; }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; flex-direction: column; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); }
.pill span { font-weight: 700; font-size: 14px; }
.pill small { color: var(--muted); font-weight: 500; }
.pill em { font-style: normal; font-size: 11px; color: var(--muted); }
.pill--primary { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pill--muted { opacity: .55; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rows li:last-child, .kv div:last-child { border-bottom: 0; }
.rows span { color: var(--muted); font-size: 13px; }
.rows p { flex-basis: 100%; font-size: 13px; color: var(--ink-2); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feature-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; }
.feature-list p { color: var(--muted); font-size: 13px; }
.feature-list small { color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 9px; background: var(--muted); }
.dot--active { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot--planned { background: var(--warn); }
.status { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.status--active, .status--final_delivery, .status--support { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.status--planned, .status--development, .status--updating { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.status--initial_delivery { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.status--inactive, .status--archived { background: var(--paper-2); color: var(--muted); }
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.team li { display: flex; gap: 12px; align-items: center; }
.team p { color: var(--muted); font-size: 13px; }
.team small { color: var(--muted); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-weight: 800; }

/* Gallery */
.gallery-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.gallery__item { min-width: 0; }
.gallery__link { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--paper-2); }
.gallery__link img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease), filter .3s; }
.gallery__link:hover img { transform: scale(1.06); }
.gallery__meta { position: absolute; inset-inline: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 18px 8px 6px; background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent); color: #fff; font-size: 11px; }
.gallery__meta .tag { background: rgba(255, 255, 255, .18); color: #fff; border-color: transparent; font-size: 10px; }
.gallery__caption { font-size: 13px; margin-top: 6px; }
.gallery__caption small { display: block; color: var(--muted); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(5, 8, 14, .92); backdrop-filter: blur(4px); }
.lightbox figure { margin: 0; height: 100%; display: grid; place-content: center; gap: 12px; padding: 56px 16px; }
.lightbox img { max-width: min(1200px, 92vw); max-height: 78vh; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: reveal .3s var(--ease); }
.lightbox figcaption { color: #e9ecf3; text-align: center; font-size: 14px; }
.lightbox__btn { position: fixed; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; transition: background .2s; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .2); }
.lightbox__close { top: 14px; inset-inline-end: 14px; }
.lightbox__prev { top: 50%; inset-inline-start: 12px; transform: translateY(-50%); }
.lightbox__next { top: 50%; inset-inline-end: 12px; transform: translateY(-50%); }

/* Breakpoints (mobile first) */
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .how__steps { grid-template-columns: repeat(3, 1fr); }
  .keyform__row { flex-direction: row; }
  .keyform input { flex: 1; min-width: 0; }
  .kv { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .kv div:nth-last-child(2) { border-bottom: 0; }
}
@media (min-width: 900px) {
  body { font-size: 16px; }
  .hero { padding-block: 72px 40px; }
  .hero__grid { grid-template-columns: 1.4fr 1fr; gap: 56px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .projects__head { grid-template-columns: auto 1fr; align-items: center; }
  .projects__head .chips { justify-content: flex-end; }
  .cert__hero { grid-template-columns: 1.15fr 1fr; gap: 36px; }
  .vault__lock { grid-template-columns: auto 1fr; padding: 32px; column-gap: 20px; }
  .vault__lock .keyform, .vault__lock .alert { grid-column: 2; max-width: 620px; }
  .panels { grid-template-columns: 1fr 1fr; }
  .panel--wide { grid-column: 1 / -1; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}
@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .keyform, .vault__bar form, .chips { display: none !important; }
  body { background: #fff; }
}
