:root {
  --ink: #0a0f1e;
  --ink-2: #121a2e;
  --ink-3: #1c2640;
  --paper: #f5f3ee;
  --paper-2: #ebe8e0;
  --card: #ffffff;
  --line: #d9d5ca;
  --text: #141a2a;
  --muted: #5a6275;
  --blue: #2f6bff;
  --blue-deep: #1d4fd8;
  --shirt: #8fb8ff;
  --amber: #ffb547;
  --mint: #3ddc97;
  --radius: 14px;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--blue-deep); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 750; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.eyebrow {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue-deep); margin-bottom: .9rem; display: inline-block;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { max-width: 760px; margin-bottom: 48px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  padding: .95em 1.4em; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 24px -10px rgba(47,107,255,.8); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-small { padding: .65em 1em; font-size: .9rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,15,30,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #fff;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; display: block; }
.brand small { display: block; font: 500 .7rem/1 var(--mono); color: #8d97b3; letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: #c9d1e6; text-decoration: none; font-weight: 500; font-size: .95rem; padding: .5em .85em; border-radius: 8px; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav a[aria-current="page"] { color: #fff; background: rgba(47,107,255,.25); }
.nav .btn { margin-left: 8px; color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--ink); padding: 12px 24px 20px; display: none; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #9aa3bb; padding-block: 56px 40px; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer a { color: #dfe5f5; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { background: var(--ink); color: #fff; padding-block: 88px 72px; position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: linear-gradient(180deg, #000, transparent 90%);
}
.page-hero .wrap { position: relative; }
.page-hero .eyebrow { color: var(--shirt); }
.page-hero .lead { color: #b8c1d9; }

/* ---------- portfolio cards ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 28px; }
.work-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
}
.work-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -24px rgba(10,15,30,.35); }
.work-shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.work-shot::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 22px; z-index: 1;
  background: radial-gradient(circle at 12px 11px, #ff6058 4px, transparent 4.5px), radial-gradient(circle at 26px 11px, #ffbd2e 4px, transparent 4.5px), radial-gradient(circle at 40px 11px, #28c840 4px, transparent 4.5px), #e9e6de;
}
.work-shot img { position: absolute; top: 22px; left: 0; width: 100%; height: auto; transition: transform 6s ease; }
.work-card:hover .work-shot img { transform: translateY(-18%); }
.work-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.work-body h3 { margin-bottom: .3em; }
.work-body p { color: var(--muted); font-size: .97rem; }
.work-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag { font: 500 .72rem/1 var(--mono); padding: .45em .65em; border-radius: 6px; background: #eef2ff; color: var(--blue-deep); }
.work-link { font-weight: 600; color: var(--blue-deep); white-space: nowrap; }
.status { font: 500 .72rem/1 var(--mono); padding: .45em .65em; border-radius: 6px; background: #fff3dc; color: #8a5a00; }

/* ---------- misc ---------- */
.cta-band { background: var(--blue); color: #fff; border-radius: 24px; padding: clamp(32px, 6vw, 64px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { margin: 0; max-width: 18ch; }
.cta-band .btn-primary { background: #fff; color: var(--blue-deep); box-shadow: none; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; background: #eef2ff; display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 16px; }
.feature p { color: var(--muted); margin: 0; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 600px) {
  input, select, textarea { font-size: 16px !important; }
}
