:root {
  --navy: #111111; --navy-2: #1c1c1c; --gold: #ffffff; --gold-soft: #ececec;
  --bg: #ffffff; --alt: #f3f3f3; --text: #1a1a1a; --muted: #606060; --line: #e2e2e2;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
a { color: #111111; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.sub { color: var(--muted); margin-top: -.25em; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: var(--navy); border-bottom: 1px solid #2e2e2e; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { color: var(--gold); font-weight: 800; letter-spacing: .18em; text-decoration: none; font-size: 1.15rem; }
nav { display: flex; align-items: center; gap: 22px; }
nav a { color: #e6e6e6; text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--gold); }
.menu-btn { display: none; background: none; border: 1px solid #444444; color: #e6e6e6;
  padding: 6px 12px; border-radius: 6px; font: inherit; cursor: pointer; }

/* Buttons */
.btn { display: inline-block; background: var(--gold); color: var(--navy) !important; font-weight: 600;
  padding: 12px 22px; border-radius: 8px; text-decoration: none; border: 0; cursor: pointer; font-size: 1rem; }
.btn:hover { filter: brightness(1.08); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn.ghost { background: transparent; color: #fff !important; border: 1px solid #666666; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 88px 0 72px; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 600; margin: 0 0 14px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 18em; }
.lead { color: #cfcfcf; font-size: 1.12rem; max-width: 40em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: -36px; position: relative; }
.stats div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.stats strong { display: block; font-size: 1.15rem; color: var(--navy); }
.stats span { color: var(--muted); font-size: .9rem; }

/* Sections */
.section { padding: 72px 16px; }
.section.alt { background: var(--alt); padding-left: 0; padding-right: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 28px; }
.card { border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 12px; padding: 22px; background: var(--bg); }
.card h3 { font-size: 1.1rem; }
.card p { color: var(--muted); margin: 0; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-top: 28px; }
.project { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.project img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.project div { padding: 18px 20px 22px; }
.project h3 { font-size: 1.1rem; }
.project p { color: var(--muted); margin: 0; font-size: .95rem; }
.tag { display: inline-block; background: var(--gold-soft); color: #333333; font-size: .75rem; font-weight: 600;
  padding: 3px 10px; border-radius: 99px; margin-bottom: 8px; }

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.checks { list-style: none; margin: 0; padding: 22px; background: var(--navy); color: #fff; border-radius: 12px; }
.checks li { padding: 10px 0 10px 28px; position: relative; border-bottom: 1px solid #2e2e2e; }
.checks li:last-child { border: 0; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
input, textarea { font: inherit; padding: 10px 12px; border: 1px solid #cfcfcf; border-radius: 8px; background: #fff; }
input:focus, textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
form .btn { justify-self: start; }

footer { background: var(--navy); color: #a0a0a0; padding: 24px 0; font-size: .9rem; }

/* Mobile */
@media (max-width: 760px) {
  .menu-btn { display: block; }
  nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: flex-start;
    gap: 0; background: var(--navy); padding: 8px 16px 16px; border-bottom: 1px solid #2e2e2e; }
  nav.open { display: flex; }
  nav a { padding: 10px 0; width: 100%; }
  .stats, .about, .contact { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 64px; }
}

/* Gallery page */
.page-hero { padding: 56px 0 48px; }
nav a[aria-current="page"] { color: var(--gold); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { font: inherit; font-size: .9rem; padding: 7px 16px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--navy); color: var(--gold); border-color: var(--navy); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--bg); }
.gallery figure[hidden] { display: none; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; transition: transform .25s; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figure { overflow: hidden; }
figcaption { padding: 12px 16px 16px; position: relative; background: var(--bg); }
figcaption strong { display: block; }
figcaption span { color: var(--muted); font-size: .88rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 10, 10, .94); display: flex;
  flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 80vh; border-radius: 8px; }
.lb-cap { color: #e6e6e6; margin: 14px 0 0; text-align: center; font-size: .95rem; }
.lb-close, .lb-nav { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; line-height: 1; }
.lb-close { top: 14px; right: 20px; font-size: 2.4rem; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 3.2rem; padding: 12px; }
.lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }
.lb-close:hover, .lb-nav:hover { color: var(--gold); }
.more { margin-top: 24px; text-align: right; }

/* Monotone overrides: keep accents visible on light backgrounds */
.section .btn { background: var(--navy); color: #fff !important; }
.section .btn.ghost { background: transparent; }
.card { border-top-color: var(--navy); }
.chip:hover { border-color: var(--navy); }
input:focus, textarea:focus { outline-color: var(--navy); }
.tag { border: 1px solid #d6d6d6; }
a { text-decoration-color: #999; }

/* Platform icons */
.stats { grid-template-columns: 1.6fr 1fr 1fr; }
.platforms-card small { display: block; color: var(--muted); font-size: .9rem; margin-top: 10px; text-align: center; }
.platforms { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-around; gap: 8px; }
.platforms li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.platforms svg { width: 38px; height: 38px; fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.platforms span { font-weight: 600; font-size: .9rem; color: var(--navy); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }

.icon-stat { text-align: center; }
.icon-stat svg { width: 38px; height: 38px; display: block; margin: 0 auto 6px; fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Combined platform icon: larger and dominant */
.platform-card svg { width: 96px; height: 82px; margin-bottom: 10px; }
.platform-card svg .cover { fill: var(--bg); }
.platform-card strong { font-size: 1.2rem; }
.stats { grid-template-columns: 1.5fr 1fr 1fr; align-items: stretch; }
.stats > div { display: flex; flex-direction: column; justify-content: center; }

/* Icon scale fix: balanced sizes, aligned titles */
.icon-stat svg { width: 56px; height: 56px; margin: 17px auto; stroke-width: 2; }
.platform-card svg { width: 100px; height: 85px; margin: 0 auto 5px; stroke-width: 1.8; }
.platform-card strong { font-size: 1.1rem; }

/* Clients */
.clients { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-top: 28px; }
.client { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 24px 16px 20px; text-align: center; }
.client .mono { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-weight: 700; letter-spacing: .04em; font-size: 1rem; }
.client h3 { font-size: 1.02rem; margin-bottom: 2px; }
.client span { color: var(--muted); font-size: .85rem; }

/* Client logo slots: show logo if the file exists, else the initials */
.logo-slot { height: 72px; display: grid; place-items: center; margin-bottom: 12px; }
.logo-slot img { max-width: 100%; max-height: 72px; object-fit: contain; }
.logo-slot .mono { margin: 0; }
.logo-slot:not(.nologo) .mono { display: none; }
.logo-slot.nologo img { display: none; }
.client { padding-left: 8px; padding-right: 8px; }
.client span { display: block; }

/* Brand badge */
.brand { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px;
  padding: 3px 12px 3px 8px; font-size: .8rem; font-weight: 600; color: var(--text); margin: 0 0 10px; background: var(--bg); }
.brand img { width: 18px; height: 18px; }

/* Technology grid: centre an uneven last row */
#stack .grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
#stack .card { flex: 0 1 calc(33.333% - 12px); min-width: 260px; }

.details { font-style: normal; margin-top: 18px; }
.details p { margin: 0 0 14px; }
.details strong { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
