:root {
  --bg: #0c110d;
  --bg-soft: #121a14;
  --surface: #161f18;
  --surface-2: #1d2820;
  --border: #26342a;
  --text: #e8efe9;
  --muted: #9aab9e;
  --accent: #7cc84a;
  --accent-strong: #5aa62d;
  --accent-soft: rgba(124, 200, 74, 0.14);
  --warn: #e6b450;
  --warn-soft: rgba(230, 180, 80, 0.14);
  --radius: 16px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }

.container { width: min(1140px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12, 17, 13, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.15rem var(--font-display); }
.brand img { border-radius: 50%; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  text-decoration: none; color: var(--muted); font-size: 0.93rem; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }

/* Hero */
.hero {
  padding: 96px 0 72px;
  background:
    radial-gradient(700px 360px at 85% 0%, rgba(124, 200, 74, 0.16), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(90, 166, 45, 0.08), transparent 70%);
}
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 0.8rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.8rem); max-width: 16ch; letter-spacing: -0.02em; }
.accent { color: var(--accent); }
.hero__lead { max-width: 58ch; color: var(--muted); font-size: 1.12rem; margin: 22px 0 0; }

.stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 44px 0 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { color: var(--muted); font-size: .88rem; }
.stats dd { margin: 0; font: 700 2rem var(--font-display); }

/* Sections */
section { padding: 72px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }

.filters { display: flex; gap: 6px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.filters button {
  border: 0; background: none; color: var(--muted); font: 500 .9rem var(--font);
  padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: all .2s;
}
.filters button:hover { color: var(--text); }
.filters button[aria-selected="true"] { background: var(--accent); color: #0b1a06; font-weight: 600; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; text-align: left; width: 100%; padding: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: inherit; font: inherit; overflow: hidden; cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  animation: fade-in .4s both;
}
.card:hover, .card:focus-visible { transform: translateY(-4px); border-color: var(--accent-strong); box-shadow: var(--shadow); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.card__cover { aspect-ratio: 1024 / 500; overflow: hidden; background: var(--bg-soft); }
.card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__cover img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; flex: 1; }
.card__title { display: flex; align-items: center; gap: 12px; }
.card__title img { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: var(--bg-soft); }
.card__title h3 { font-size: 1.2rem; }
.card__title p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.card__summary { margin: 0; color: #c7d3ca; font-size: .95rem; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.badge { font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge--dev { background: var(--warn-soft); color: var(--warn); }
.chip { font-size: .75rem; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }

/* About & contact */
.about { background: var(--bg-soft); border-block: 1px solid var(--border); }
.about__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.about p { color: #c7d3ca; max-width: 60ch; }
.skills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skills li { padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; }

.contact__inner { text-align: center; }
.contact p { color: var(--muted); margin: 14px auto 28px; max-width: 50ch; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600;
  padding: 11px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  transition: all .2s;
}
.btn:hover { border-color: var(--accent); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #0b1a06; }
.btn--primary:hover { background: #8fd95c; }

.site-footer { padding: 28px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; text-align: center; }

/* Modal */
.modal {
  width: min(920px, 100% - 24px); max-height: calc(100dvh - 48px); padding: 0;
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow); overflow: auto;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }
.modal[open] { animation: fade .25s both; }
.modal__close {
  position: sticky; top: 12px; float: right; margin: 12px 12px -52px 0; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 1.6rem; line-height: 1;
}
.modal__cover { aspect-ratio: 1024 / 500; overflow: hidden; }
.modal__cover img { width: 100%; height: 100%; object-fit: cover; }
.modal__content { padding: 28px 32px 36px; }
.modal__head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 18px; }
.modal__title { flex: 1 1 180px; min-width: 0; }
.modal__head img { width: 64px; height: 64px; border-radius: 16px; object-fit: contain; background: var(--surface); }
.modal__head h2 { font-size: 1.8rem; }
.modal__head p { margin: 4px 0 0; color: var(--muted); }
.modal__content > p { color: #c7d3ca; }
.modal h3 { font-size: 1.05rem; margin: 26px 0 12px; }
.features { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 20px; }
.features li { position: relative; padding-left: 22px; color: #c7d3ca; }
.features li::before { content: ''; position: absolute; left: 2px; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.shots { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.shots button { flex: 0 0 auto; padding: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: none; cursor: zoom-in; scroll-snap-align: start; }
.shots img { height: 360px; width: auto; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0, 0, 0, 0.92); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100dvh - 48px); border-radius: 12px; }
.lightbox__btn { position: absolute; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 16px; top: 50%; translate: 0 -50%; }

body.no-scroll { overflow: hidden; }

@media (max-width: 720px) {
  .site-nav a:not(:last-child) { display: none; }
  .hero { padding: 64px 0 48px; }
  section { padding: 56px 0; }
  .grid { grid-template-columns: 1fr; }
  .about__inner { grid-template-columns: 1fr; gap: 28px; }
  .modal__content { padding: 22px 18px 28px; }
  .modal__head .links { margin-left: 0; width: 100%; }
  .modal__head .btn { padding: 9px 14px; font-size: .9rem; }
  .modal__head h2 { font-size: 1.45rem; }
  .shots img { height: 300px; }
  .lightbox img { max-width: calc(100vw - 24px); }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; translate: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
