/* ============================================================
   MUNITIONS 3D — "Field Dossier" — light editorial spec-sheet theme
   (inspired by, not copied from, the Ayumi Nova Models dossier)
   ============================================================ */
:root {
  --paper: #f3f0e8;
  --paper-2: #ebe7dd;
  --paper-3: #e3ded1;
  --ink: #17181c;
  --ink-2: #33353b;
  --ink-soft: #5c5e66;
  --line: #cdc7b7;
  --line-2: #b7b1a0;
  --accent: #2a4e86;      /* navy blueprint accent */
  --accent-deep: #1d3a66;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.62;
  overflow-x: hidden;
  position: relative;
}
img, video { display: block; max-width: 100%; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; font-weight: 700; letter-spacing: .005em; }
.mono, .kicker { font-family: var(--mono); }

/* ---- graph-paper background field ---- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 82% -10%, rgba(42,78,134,.05), transparent 60%),
    var(--paper);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .6;
  background-image:
    linear-gradient(rgba(23,24,28,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,24,28,.045) 1px, transparent 1px);
  background-size: 42px 42px;
}
::selection { background: var(--accent); color: var(--paper); }

/* ---- FX: subtle paper grain + document corner brackets ---- */
.fx { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.fx__grain {
  position: absolute; inset: -50%; opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.fx::before, .fx::after,
.fx__brackets::before, .fx__brackets::after {
  content: ""; position: fixed; width: 22px; height: 22px; pointer-events: none;
  border: 2px solid var(--accent);
}
.fx::before { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.fx::after  { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.fx__brackets::before { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.fx__brackets::after  { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }

/* ============ NAV ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; padding: 0 clamp(16px, 4vw, 46px);
  background: rgba(243,240,232,.9); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.nav__brand { display: flex; align-items: center; gap: 11px; }
.nav__mark { width: 18px; height: 18px; flex: 0 0 auto; background: var(--accent); position: relative; }
.nav__mark::after { content: ""; position: absolute; inset: 4px; border: 2px solid var(--paper); }
.nav__name { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: .05em; color: var(--ink); text-transform: uppercase; }
.nav__name .nm-a { color: var(--accent); }
.nav__name b { color: var(--ink); font-weight: 700; margin-left: .28em; }
.nav__name i { color: var(--ink-soft); font-style: normal; font-weight: 400; margin-left: 5px; }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink); padding: 8px 14px; transition: .18s; border: 1px solid transparent;
}
.nav__links a:hover { background: var(--ink); color: var(--paper); }
.nav__burger { display: none; background: none; border: 0; border-left: 1px solid var(--line); padding: 0 18px; cursor: pointer; align-self: stretch; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ============ HERO ============ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 62px 0 0; overflow: hidden; }
.hero__grid {
  position: absolute; inset: 0; z-index: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(42,78,134,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,78,134,.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 85%);
}
.hero__inner {
  position: relative; z-index: 1; width: 100%; max-width: 1420px; margin: 0 auto;
  padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: 1.02fr 1fr;
  gap: clamp(28px, 4vw, 64px); align-items: center;
}
.hero__kicker {
  display: inline-block; font-family: var(--mono); font-size: clamp(11px, 1.3vw, 13px);
  letter-spacing: .22em; color: var(--accent); margin-bottom: 22px; text-transform: uppercase;
}
.hero__kicker::before { content: "● "; }
.hero__title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(48px, 8vw, 104px); line-height: .92; letter-spacing: .002em; color: var(--ink);
}
.hero__title .nm-a { color: var(--accent); display: block; }
.hero__title span { color: var(--ink); }
.hero__title em { font-style: normal; -webkit-text-stroke: 2px var(--line-2); color: transparent; }
.hero__sub { max-width: 46ch; margin: 24px 0 30px; color: var(--ink-soft); font-size: clamp(15px, 1.7vw, 17px); }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__plate { position: relative; border: 2px solid var(--ink); background: #101114; aspect-ratio: 16 / 11; }
.hero__plate::before, .hero__plate::after {
  content: ""; position: absolute; width: 15px; height: 15px; z-index: 3; border: 2px solid var(--accent);
}
.hero__plate::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; transform: translate(-6px,-6px); }
.hero__plate::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; transform: translate(6px,6px); }
.hero__slides { position: absolute; inset: 0; overflow: hidden; }
.hero__slides .slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.05); transition: opacity 1.4s ease, transform 7s linear; }
.hero__slides .slide.is-active { opacity: 1; transform: scale(1); }
.hero__figcap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--paper);
  background: rgba(16,17,20,.82); border-top: 1px solid rgba(255,255,255,.14);
  padding: 9px 13px;
}
.hero__scroll { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 2; font-family: var(--mono); font-size: 10px; letter-spacing: .3em; color: var(--ink-soft); }
.hero__scroll span { display: block; width: 1px; height: 34px; margin: 8px auto 0; background: linear-gradient(var(--accent), transparent); animation: drop 1.8s infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); } 100% { opacity: 0; } }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block; padding: 13px 26px; border: 2px solid var(--ink);
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; cursor: pointer; transition: .2s;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost { background: none; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* ============ STATS (spec strip) ============ */
.stats {
  position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--paper-2);
  max-width: 1420px; margin: 0 auto;
}
.stats__item { padding: 24px 16px; text-align: center; border-right: 1px solid var(--line); }
.stats__item:last-child { border-right: 0; }
.stats__item strong { display: block; font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1; }
.stats__item span { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

/* ============ SECTIONS ============ */
.section { padding: clamp(58px, 8vw, 100px) clamp(16px, 5vw, 60px); max-width: 1420px; margin: 0 auto; position: relative; z-index: 2; }
.section--alt { max-width: none; background: var(--paper-2); border-block: 2px solid var(--ink); }
.section__head { text-align: left; margin-bottom: 34px; border-bottom: 2px solid var(--ink); padding-bottom: 16px; }
.section__head h2 { font-size: clamp(30px, 4.5vw, 46px); color: var(--ink); }
.section__head h2::before { content: "◢ "; color: var(--accent); font-size: .6em; vertical-align: middle; }
.section__head p { color: var(--ink-soft); max-width: 640px; margin: 10px 0 0; font-size: 15px; }
.contact h2, .about h2 { font-size: clamp(30px, 4.5vw, 46px); color: var(--ink); }
.about h2::after { content: ""; display: block; width: 60px; height: 3px; background: var(--accent); margin: 14px 0 0; }

/* ============ FILTER ============ */
.filter { display: flex; gap: 8px; justify-content: flex-start; flex-wrap: wrap; margin-bottom: 34px; }
.filter__btn {
  background: none; border: 1px solid var(--ink); color: var(--ink);
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 8px 15px; cursor: pointer; transition: .18s;
}
.filter__btn:hover { background: var(--paper-3); }
.filter__btn.is-active { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ============ SEARCH ============ */
.search { position: relative; max-width: 560px; margin-bottom: 20px; }
.search::before {
  content: "\2315"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%) rotate(-45deg);
  color: var(--accent); font-size: 17px; line-height: 1; pointer-events: none; z-index: 1;
}
.search__input {
  width: 100%; font-family: var(--mono); font-size: 13px; letter-spacing: .02em;
  padding: 13px 40px 13px 38px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
}
.search__input::placeholder { color: var(--ink-soft); }
.search__input:focus { outline: none; border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent); }
.search__clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; font-size: 22px; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 2px 8px;
}
.search__clear:hover { color: var(--accent); }
.search__suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; list-style: none; margin: 0;
  background: var(--paper); border: 2px solid var(--ink); max-height: 340px; overflow-y: auto;
  box-shadow: 6px 6px 0 rgba(23,24,28,.14);
}
.search__sug {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line);
}
.search__sug:last-child { border-bottom: 0; }
.search__sug:hover, .search__sug.is-active { background: var(--paper-3); }
.search__sug-label { font-family: var(--body); font-size: 14px; color: var(--ink); }
.search__sug-label mark { background: transparent; color: var(--accent); font-weight: 600; }
.search__sug-type {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); border: 1px solid var(--line); padding: 2px 7px; white-space: nowrap;
}
.search__empty { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); text-align: center; padding: 40px 0; }

/* ============ WORK GRID ============ */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
.card {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--ink); transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: 8px 8px 0 var(--ink); }
.card.is-hidden { display: none; }
.card::before, .card::after {
  content: ""; position: absolute; width: 14px; height: 14px; z-index: 3; pointer-events: none;
  border: 2px solid var(--accent); opacity: 0; transition: opacity .25s;
}
.card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.card::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.card:hover::before, .card:hover::after { opacity: 1; }
.card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #101114; border-bottom: 1.5px solid var(--ink); }
.card__img img, .card__img video { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card__img img, .card:hover .card__img video { transform: scale(1.05); }
.card__badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--paper); background: var(--ink); padding: 4px 8px;
}
.card__badge--video::before { content: "▶ "; font-size: 8px; }
.card__body { padding: 16px 18px 18px; }
.card__cat { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 7px; }
.card__title { font-size: 23px; font-weight: 700; color: var(--ink); line-height: 1.05; }
.card__blurb { color: var(--ink-soft); font-size: 13.5px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card__tags span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; color: var(--ink-soft); border: 1px solid var(--line); padding: 3px 7px; text-transform: uppercase; }
.card__count { font-family: var(--mono); font-size: 12px; color: var(--accent); white-space: nowrap; }

/* ============ ABOUT ============ */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 68px); align-items: center; max-width: 1420px; margin: 0 auto; }
.about__text p { color: var(--ink-soft); margin-top: 18px; }
.about__text p strong { color: var(--ink); }
.about__skills { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin-top: 26px; }
.about__skills li { font-family: var(--mono); font-size: 12.5px; color: var(--ink); padding-left: 20px; position: relative; text-transform: uppercase; letter-spacing: .02em; }
.about__skills li::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 9px; height: 9px; background: var(--accent); }
.about__img { position: relative; border: 2px solid var(--ink); overflow: hidden; }
.about__img img { width: 100%; display: block; }

/* ============ CONTACT / FOOTER ============ */
.contact { text-align: center; }
.contact > p { color: var(--ink-soft); margin: 14px 0 34px; }
.contact__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 380px)); gap: 20px; justify-content: center; }
.contact__card { background: var(--paper); border: 2px solid var(--ink); padding: 30px 26px 26px; transition: box-shadow .25s, transform .25s; }
.contact__card:hover { transform: translateY(-4px); box-shadow: 8px 8px 0 var(--accent); }
.contact__icon { font-size: 24px; margin-bottom: 8px; color: var(--accent); }
.contact__card h3 { font-size: 20px; color: var(--ink); }
.contact__value { font-family: var(--mono); color: var(--accent); font-size: 14px; margin: 8px 0 18px; word-break: break-all; }
.contact__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.contact__note { color: var(--ink-soft); font-size: 12.5px; margin-top: 14px; }
.footer { border-top: 2px solid var(--ink); padding: 22px 20px; text-align: center; color: var(--ink-soft); font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; position: relative; z-index: 2; }

/* ============ MODAL / LIGHTBOX (ink viewer) ============ */
.modal {
  position: fixed; inset: 0; z-index: 250; background: rgba(16,17,20,.97);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 70px 14px;
}
.modal.is-open { display: flex; }
.modal__stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; max-width: 92vw; }
.modal__stage img, .modal__stage video { max-width: 100%; max-height: calc(100vh - 220px); object-fit: contain; border: 2px solid var(--paper); }
.modal__stage figcaption { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; justify-content: center; order: 2; }
#modalProject { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--paper); }
#modalLabel { color: #d7d3c9; font-size: 14px; }
#modalCount { font-family: var(--mono); color: var(--accent); font-size: 12px; filter: brightness(1.6); }
.modal__close { position: absolute; top: 14px; right: 20px; z-index: 2; background: none; border: 0; color: var(--paper); font-size: 36px; cursor: pointer; line-height: 1; transition: color .2s; }
.modal__close:hover { color: #7aa2d8; }
.modal__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: none; border: 2px solid rgba(242,239,232,.4); color: var(--paper);
  font-size: 18px; width: 46px; height: 60px; cursor: pointer; transition: .2s;
}
.modal__nav:hover { background: var(--paper); color: var(--ink); }
.modal__nav--prev { left: 14px; }
.modal__nav--next { right: 14px; }
.modal__thumbs { display: flex; gap: 7px; padding: 12px 4px 6px; max-width: 92vw; overflow-x: auto; scrollbar-width: thin; }
.modal__thumbs .thumb { position: relative; width: 82px; height: 55px; flex: 0 0 auto; cursor: pointer; border: 1px solid rgba(242,239,232,.25); overflow: hidden; opacity: .5; transition: .2s; }
.modal__thumbs .thumb img, .modal__thumbs .thumb video { width: 100%; height: 100%; object-fit: cover; }
.modal__thumbs .thumb:hover { opacity: .85; }
.modal__thumbs .thumb.is-current { opacity: 1; border-color: var(--paper); }
.modal__thumbs .thumb--video::after { content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; text-shadow: 0 1px 4px #000; }
body.modal-open { overflow: hidden; }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__plate { order: -1; }
}
@media (max-width: 760px) {
  .nav__links {
    position: fixed; top: 62px; right: 0; left: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 2px solid var(--ink);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav__links.is-open { max-height: 280px; }
  .nav__links a { padding: 15px 24px; border-top: 1px solid var(--line); }
  .nav__burger { display: block; }
  .about { grid-template-columns: 1fr; }
  .about__img { order: -1; }
  .card:hover { box-shadow: 5px 5px 0 var(--ink); }
  .modal { padding: 56px 8px 8px; }
  .modal__nav { width: 38px; height: 50px; }
  .modal__nav--prev { left: 4px; }
  .modal__nav--next { right: 4px; }
  .modal__stage img, .modal__stage video { max-height: calc(100vh - 190px); }
  .fx::before, .fx::after, .fx__brackets::before, .fx__brackets::after { width: 16px; height: 16px; }
}
