/* Nav + drawer + footer + page-transition styles */

/* ─── Top nav ───────────────────────────────────────────────── */
.tb-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background .35s ease, backdrop-filter .35s ease, border-color .35s ease;
  background: rgba(10, 10, 15, 0.0);
}
.tb-nav.is-scrolled {
  background: rgba(10, 10, 15, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.tb-nav-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08) 30%, rgba(255,255,255,.08) 70%, transparent);
  opacity: 0;
  transition: opacity .35s;
}
.tb-nav.is-scrolled .tb-nav-line { opacity: 1; }

.tb-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 72px;
}
.tb-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.tb-nav-item.has-sub { position: relative; display: inline-flex; align-items: center; }

/* underline-link */
.u-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: var(--ink-2);
  transition: color .25s ease;
  padding: 8px 0;
  cursor: pointer;
}
.u-link > span {
  position: relative;
  display: inline-block;
}
.u-link > span::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.u-link:hover { color: var(--ink); }
.u-link:hover > span::after { transform: scaleX(1); }
.u-link.is-active { color: var(--ink); }
.u-link.is-active > span::after { transform: scaleX(1); background: var(--accent); }

/* dropdown */
.tb-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, -8px);
  min-width: 280px;
  background: rgba(14, 14, 22, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .35s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.tb-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.tb-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background .2s, color .2s, padding-left .25s;
}
.tb-dropdown a:hover {
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  padding-left: 18px;
}

/* lang switch */
.tb-nav-right { display: flex; align-items: center; gap: 16px; }
/* hidden by default — toggled on by Tweaks (.show-lang-switch on body) */
.tb-lang { display: none; }
body.show-lang-switch .tb-lang { display: inline-flex; }

/* Nav contact CTA — compact pill */
.tb-nav-cta {
  padding: 9px 18px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 999px;
  position: relative;
}
.tb-nav-cta .arrow { margin-left: 8px; }
.tb-nav-cta.is-current {
  background: rgba(255,255,255,.08);
  color: var(--ink);
  border-color: rgba(255,255,255,.18);
}
.tb-nav-cta.is-current:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
  box-shadow: none;
  transform: none;
}
@media (max-width: 860px) {
  .tb-nav-cta.hide-mobile { display: none; }
}

.tb-lang {
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.tb-lang button {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 6px 4px;
  cursor: pointer;
  transition: color .2s;
}
.tb-lang button:hover { color: var(--ink); }
.tb-lang button.is-active { color: var(--ink); }
.tb-lang span { color: var(--ink-4); }

/* burger */
.tb-burger {
  appearance: none;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  width: 40px; height: 40px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.tb-burger:hover { background: rgba(255,255,255,0.06); border-color: var(--line-strong); }

/* ─── Mobile drawer ──────────────────────────────────────────── */
.tb-drawer {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(24px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.tb-drawer.open { opacity: 1; pointer-events: auto; }

.tb-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  flex-shrink: 0;
}
.tb-drawer-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 24px;
  padding-bottom: 24px;
  overflow-y: auto;
}
.tb-drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-size: 28px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: transparent;
  appearance: none;
  border-left: 0; border-right: 0; border-top: 0;
  width: 100%;
  text-align: left;
  opacity: 0;
  transform: translateY(12px);
  transition: color .25s, padding-left .3s;
}
.tb-drawer.open .tb-drawer-link { animation: drawer-in .55s cubic-bezier(.2,.8,.2,1) forwards; }
.tb-drawer-link.is-active { color: var(--ink); }
.tb-drawer-link:hover { padding-left: 6px; }

@keyframes drawer-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.tb-drawer-group { display: flex; flex-direction: column; }
.tb-drawer-acc {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  display: flex;
  flex-direction: column;
}
.tb-drawer-acc.open { max-height: 320px; }
.tb-drawer-sublink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 12px 16px;
  font-size: 15px;
  color: var(--ink-2);
  transition: color .2s, padding-left .2s;
}
.tb-drawer-sublink:hover { color: var(--ink); padding-left: 22px; }

.tb-drawer-foot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
}
.tb-drawer-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  opacity: .75;
  transition: opacity .2s;
}
.tb-drawer-linkedin:hover { opacity: 1; }
.tb-drawer-linkedin svg { width: 16px; height: 16px; }

/* ─── Footer ─────────────────────────────────────────────────── */
.tb-footer {
  margin-top: 80px;
  padding: 80px 0 32px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(139,124,255,0.02));
  position: relative;
}
.tb-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,124,255,0.4), transparent);
}
.tb-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
}
@media (max-width: 860px) {
  .tb-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 540px) {
  .tb-footer-grid { grid-template-columns: 1fr; }
}
.tb-foot-h {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0 0 16px;
  font-weight: 500;
}
.tb-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.tb-footer ul a { color: var(--ink-2); }
.tb-footer ul a:hover { color: var(--ink); }
.tb-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── Page transition ───────────────────────────────────────── */
.page-shell { position: relative; }
.page {
  animation: page-in .55s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
