@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&family=Oswald:wght@700&display=swap');

/* ─── DESIGN TOKENS ─── */
:root {
  --paper:   #0e0e0c;
  --paper-2: #181816;
  --ink:     #ece7d8;
  --muted:   #7e7a6f;
  --rule:    rgba(236,231,216,0.18);
  --accent:  #9b3d2e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ─── */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px 36px;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
  z-index: 60;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--paper) 80%, transparent);
}
.brand {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -0.045em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
  opacity: 0.78;
}
.nav-links a:hover  { opacity: 1; }
.nav-links a.active { opacity: 1; border-bottom-color: var(--ink); }
.nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}
.est {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 9px 18px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.contact:hover { background: var(--ink); color: var(--paper); }

/* ─── BURGER ─── */
.burger {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  color: var(--ink);
  cursor: pointer;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  margin-right: -8px;
}
.bars {
  width: 22px; height: 14px;
  position: relative;
  display: block;
}
.bars::before,
.bars::after,
.bars span {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.28s ease, opacity 0.2s ease, top 0.28s ease;
}
.bars::before { top: 0; }
.bars span    { top: 6px; display: block; }
.bars::after  { top: 12px; }
.burger.open .bars::before { top: 6px; transform: rotate(45deg); }
.burger.open .bars::after  { top: 6px; transform: rotate(-45deg); }
.burger.open .bars span    { opacity: 0; }

/* ─── MENU OVERLAY ─── */
.menu {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 55;
  display: flex;
  flex-direction: column;
  padding: 84px 28px 28px;
  transform: translateY(-100%);
  transition: transform 0.36s cubic-bezier(.6,.05,.25,1);
  overflow-y: auto;
  visibility: hidden;
}
.menu.open { transform: translateY(0); visibility: visible; }
.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 24px;
}
.menu-nav a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 11vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.menu-nav .ix {
  font-family: "JetBrains Mono", monospace;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-right: 18px;
  vertical-align: middle;
}
.menu-foot {
  margin-top: auto;
  padding-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.menu-foot .col {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.8;
}
.menu-foot .col b { color: var(--ink); font-weight: 500; }

/* ─── RESPONSIVE ─── */
@media (max-width: 760px) {
  .nav {
    grid-template-columns: 1fr auto;
    padding: 16px 18px;
    gap: 12px;
  }
  .nav-links { display: none; }
  .est, .contact { display: none; }
  .nav-right { gap: 0; }
  .burger { display: inline-flex; }
}
