:root {
  color-scheme: light;
  --navy: #101826;
  --ink: #1f2937;
  --muted: #aab3c0;
  --accent: #d8bd78;
  --topbar-height: 58px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f2f3f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; min-width: 320px; margin: 0; }

body { height: 100vh; height: 100dvh; overflow: hidden; }

button, a { font: inherit; }

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
  padding: 0 clamp(12px, 3vw, 42px);
  background: var(--navy);
  color: #f7f7f3;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  width: fit-content;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 12px;
  letter-spacing: -.06em;
}

.brand-name {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  align-items: center;
  overflow-x: auto;
  padding: 0 clamp(0px, 1vw, 10px);
  scrollbar-width: none;
}

.project-nav::-webkit-scrollbar { display: none; }

.project-tab {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  height: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #aab3c0;
  cursor: pointer;
  padding: 0 clamp(9px, 1.15vw, 16px);
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.project-tab:hover { background: rgb(255 255 255 / 5%); color: #fff; }

.project-tab[aria-selected="true"] {
  border-bottom-color: var(--accent);
  background: rgb(255 255 255 / 4%);
  color: #fff;
}

.tab-number { color: #828e9e; font-family: Georgia, serif; font-size: 10px; font-style: italic; }

.project-tab[aria-selected="true"] .tab-number { color: var(--accent); }

.tab-name { font-size: 11px; font-weight: 600; white-space: nowrap; }

.open-link {
  flex: 0 0 auto;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 3px;
  color: #f7f7f3;
  font-size: 10px;
  letter-spacing: .04em;
  padding: 9px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.open-link:hover { border-color: var(--accent); color: var(--accent); }

.open-link span { margin-left: 5px; color: var(--accent); font-size: 13px; }

.project-tab:focus-visible, .open-link:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

main { width: 100%; height: calc(100vh - var(--topbar-height)); height: calc(100dvh - var(--topbar-height)); background: #fff; }

#siteFrame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

@media (max-width: 900px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .brand-name { display: none; }
  .project-tab { gap: 5px; padding: 0 10px; }
  .open-link { padding: 8px 10px; }
}

@media (max-width: 560px) {
  :root { --topbar-height: 52px; }
  .topbar { gap: 8px; padding: 0 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .project-nav { padding: 0; }
  .project-tab { gap: 0; padding: 0 11px; }
  .tab-number { display: none; }
  .tab-name { font-size: 10px; }
  .open-link { width: 32px; padding: 7px 8px; overflow: hidden; font-size: 0; text-align: center; }
  .open-link span { margin: 0; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
